@bettergi/types 0.1.14 → 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.
Files changed (37) hide show
  1. package/bindings/RealtimeTimer.d.ts +1 -1
  2. package/bindings/getAvatars.d.ts +3 -2
  3. package/bindings/htmlMask.d.ts +5 -0
  4. package/bindings/htmlMask.webview.d.ts +92 -0
  5. package/package.json +7 -1
  6. package/types/BetterGenshinImpact/Core/BgiVision/BvLocator.d.ts +16 -21
  7. package/types/BetterGenshinImpact/Core/Script/Dependence/Dispatcher.d.ts +4 -3
  8. package/types/BetterGenshinImpact/Core/Script/Dependence/Genshin.d.ts +20 -9
  9. package/types/BetterGenshinImpact/Core/Script/Dependence/Http.d.ts +1 -0
  10. package/types/BetterGenshinImpact/Core/Script/Dependence/KeyMouseHook.d.ts +11 -7
  11. package/types/BetterGenshinImpact/Core/Script/Dependence/LimitedFile.d.ts +12 -5
  12. package/types/BetterGenshinImpact/Core/Script/Dependence/Model/RealtimeTimer.d.ts +63 -8
  13. package/types/BetterGenshinImpact/Core/Script/Dependence/Model/SoloTask.d.ts +93 -21
  14. package/types/BetterGenshinImpact/GameTask/AutoBoss/AutoBossConfig.d.ts +62 -3
  15. package/types/BetterGenshinImpact/GameTask/AutoBoss/AutoBossParam.d.ts +6 -4
  16. package/types/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainParam.d.ts +11 -9
  17. package/types/BetterGenshinImpact/GameTask/AutoDomain/AutoDomainTask.d.ts +61 -0
  18. package/types/BetterGenshinImpact/GameTask/AutoFight/AutoFightConfig.d.ts +28 -2
  19. package/types/BetterGenshinImpact/GameTask/AutoFight/AutoFightParam.d.ts +13 -6
  20. package/types/BetterGenshinImpact/GameTask/AutoFight/Config/CombatAvatar.d.ts +153 -5
  21. package/types/BetterGenshinImpact/GameTask/AutoFight/Model/Avatar.d.ts +137 -7
  22. package/types/BetterGenshinImpact/GameTask/AutoFight/Model/CombatScenes.d.ts +13 -13
  23. package/types/BetterGenshinImpact/GameTask/AutoFight/Script/CombatCommand.d.ts +3 -3
  24. package/types/BetterGenshinImpact/GameTask/AutoFight/Script/CombatScript.d.ts +3 -2
  25. package/types/BetterGenshinImpact/GameTask/AutoFight/Script/Method.d.ts +63 -3
  26. package/types/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropFightConfig.d.ts +4 -3
  27. package/types/BetterGenshinImpact/GameTask/AutoLeyLineOutcrop/AutoLeyLineOutcropParam.d.ts +1 -0
  28. package/types/BetterGenshinImpact/GameTask/AutoPathing/PathingScriptNames.d.ts +50 -0
  29. package/types/BetterGenshinImpact/GameTask/AutoSkip/AutoSkipConfig.d.ts +2 -0
  30. package/types/BetterGenshinImpact/GameTask/AutoStygianOnslaught/AutoStygianOnslaughtConfig.d.ts +5 -3
  31. package/types/BetterGenshinImpact/GameTask/AutoStygianOnslaught/AutoStygianOnslaughtParam.d.ts +6 -4
  32. package/types/BetterGenshinImpact/GameTask/Common/Job/CraftMaterialTask.d.ts +19 -2
  33. package/types/BetterGenshinImpact/GameTask/Common/Map/MapScriptNames.d.ts +9 -0
  34. package/types/BetterGenshinImpact/GameTask/Model/Area/GameCaptureRegion.d.ts +6 -7
  35. package/types/BetterGenshinImpact/GameTask/Model/Area/ImageRegion.d.ts +18 -15
  36. package/types/BetterGenshinImpact/Helpers/User32Helper.d.ts +7 -0
  37. package/types/System/Windows/Forms/Keys.d.ts +195 -0
@@ -3,23 +3,84 @@ import type {
3
3
  HostType,
4
4
  ReferenceTypeTrait
5
5
  } from "../../../../../Microsoft/ClearScript/HostType";
6
- import "../../../../../Microsoft/ClearScript/ScriptObject";
6
+ import "../../../../GameTask/Common/Job/CountInventoryItemParam";
7
+ import "../../../../GameTask/Model/GameUI/GridScreenName";
7
8
 
8
9
  /**
9
- * 独立任务注册名
10
+ * 任务名 → SoloTask.Config(唯一真源;配置一律 inline,无额外 type 名)
11
+ * @see Dispatcher.RunTask switch / BuildFromSoloTaskConfig
12
+ * @since 0.43.1
13
+ */
14
+ export type SoloTaskConfigMap = {
15
+ /** 自动七圣召唤 */
16
+ AutoGeniusInvokation: {
17
+ /** 七圣策略文本;空则回退 UI 设置 */
18
+ strategy?: string;
19
+ };
20
+ /** 自动伐木 */
21
+ AutoWood: void;
22
+ /** 自动战斗 */
23
+ AutoFight: void;
24
+ /** 自动秘境 */
25
+ AutoDomain: void;
26
+ /** 自动首领 */
27
+ AutoBoss: void;
28
+ /** 自动钓鱼 */
29
+ AutoFishing: {
30
+ wholeProcessTimeoutSeconds?: number;
31
+ throwRodTimeOutTimeoutSeconds?: number;
32
+ /**
33
+ * 钓鱼时间策略
34
+ * - 0 全天
35
+ * - 1 白天
36
+ * - 2 夜晚
37
+ * - 3 不调
38
+ */
39
+ fishingTimePolicy?: 0 | 1 | 2 | 3 | number;
40
+ /** 关键节拍是否保存截图(调试用);默认 false */
41
+ saveScreenshotOnKeyTick?: boolean;
42
+ };
43
+ /** 自动烹饪 */
44
+ AutoCook: void;
45
+ /** 自动吃药 */
46
+ AutoEat: {
47
+ foodName?: string | null;
48
+ /**
49
+ * 料理类型
50
+ * - 0 恢复类料理
51
+ * - 1 攻击类料理
52
+ * - 2 冒险类料理
53
+ * - 3 防御类料理
54
+ * - 4 药剂
55
+ * - 5 其他
56
+ */
57
+ foodEffectType?: 0 | 1 | 2 | 3 | 4 | 5 | number;
58
+ };
59
+ /** 统计背包物品 */
60
+ CountInventoryItem: {
61
+ /** gridScreenName 必填 */
62
+ gridScreenName:
63
+ | BetterGenshinImpact.GameTask.Common.Job.CountInventoryItemParam["gridScreenName"]
64
+ | number
65
+ | BetterGenshinImpact.GameTask.Model.GameUI.GridScreenName;
66
+ /** itemName 与 itemNames 互斥 */
67
+ itemName?: string | null;
68
+ itemNames?: readonly string[] | string[];
69
+ };
70
+ };
71
+
72
+ /**
73
+ * 独立任务注册名 = map key;`(string & {})` 保留未知扩展
10
74
  * @since 0.46.0
11
75
  */
12
- export type SoloTaskName =
13
- | "AutoGeniusInvokation" // 自动七圣召唤
14
- | "AutoWood" // 自动伐木
15
- | "AutoFight" // 自动战斗
16
- | "AutoDomain" // 自动秘境
17
- | "AutoBoss" // 自动首领
18
- | "AutoFishing" // 自动钓鱼
19
- | "AutoCook" // 自动烹饪
20
- | "AutoEat" // 自动食用
21
- | "CountInventoryItem" // 统计背包物品
22
- | (string & {});
76
+ export type SoloTaskName = keyof SoloTaskConfigMap | (string & {});
77
+
78
+ export type SoloTaskConfigForName<TName extends SoloTaskName> =
79
+ TName extends keyof SoloTaskConfigMap
80
+ ? SoloTaskConfigMap[TName] extends void
81
+ ? undefined
82
+ : SoloTaskConfigMap[TName]
83
+ : Record<string, unknown>;
23
84
 
24
85
  /**
25
86
  * 独立任务
@@ -34,32 +95,43 @@ export interface SoloTask extends ClrHostValue {
34
95
  */
35
96
  name: SoloTaskName;
36
97
  /**
37
- * 独立任务配置
98
+ * 独立任务配置(CLR 存 `object?`,JS 侧 plain object)
38
99
  * @since 0.43.1
39
100
  */
40
- config: unknown;
101
+ config:
102
+ | Exclude<SoloTaskConfigMap[keyof SoloTaskConfigMap], void>
103
+ | Record<string, unknown>
104
+ | null
105
+ | undefined;
41
106
  }
42
107
 
43
108
  declare global {
44
109
  namespace BetterGenshinImpact.Core.Script.Dependence.Model {
45
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;
46
115
  }
47
116
  }
48
117
 
49
118
  export interface SoloTaskHostType extends HostType<SoloTask, ReferenceTypeTrait> {
50
119
  /**
51
- * 构造实例
52
- * @param name 独立任务名称
120
+ * 仅名称
53
121
  * @since 0.43.1
54
122
  */
55
123
  new (name: SoloTaskName): SoloTask;
124
+
56
125
  /**
57
- * 构造实例
58
- * @param name 独立任务名称
59
- * @param config 独立任务配置对象
126
+ * 名称 + 配置(按任务名收窄)
60
127
  * @since 0.43.1
61
128
  */
62
- new (name: SoloTaskName, config: Microsoft.ClearScript.ScriptObject): SoloTask;
129
+ new <TName extends SoloTaskName>(
130
+ name: TName,
131
+ config: SoloTaskConfigForName<TName> extends undefined
132
+ ? Record<string, unknown> | undefined
133
+ : SoloTaskConfigForName<TName>
134
+ ): SoloTask;
63
135
  }
64
136
 
65
137
  export {};
@@ -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: string;
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: string;
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: string;
40
+ bossName: BossName;
39
41
  /**
40
42
  * 界面中选择的战斗策略名称;无自定义策略路径时会同步更新实际策略路径
41
43
  * @since 0.62.0
42
44
  */
43
- strategyName: string;
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: string | null): VoidResult;
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: string;
62
+ domainName: DomainName;
61
63
  /**
62
- * 周日秘境奖励选项
64
+ * 周日 / 限时全开秘境奖励选项序号;空字符串表示不指定
63
65
  * @since 0.52.0
64
66
  */
65
- sundaySelectedValue: string;
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: string;
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<string>;
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: string | null): string;
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<string>): VoidResult;
142
- setResinPriorityList(...priorities: string[]): VoidResult;
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
 
@@ -17,6 +17,28 @@ export type OnlyPickEliteDropsMode =
17
17
  | "DisableAutoPickupForNonElite" // 非精英关闭自动拾取
18
18
  | (string & {});
19
19
 
20
+ /**
21
+ * 战斗策略名称;`根据队伍自动选择` 表示按当前队伍匹配策略目录,其余为 `User/AutoFight` 下策略文件名(不含扩展名)
22
+ * @since 0.52.0
23
+ */
24
+ export type CombatStrategyName = "根据队伍自动选择" | (string & {});
25
+
26
+ /**
27
+ * 战斗策略文件种类标识
28
+ * 与上游 `AutoFightParam.ResolveStrategyPath` 返回的第二项对齐:优先命中 `.json`,否则回退 `.txt`;自动选队目录亦标为 `txt`
29
+ * @since 0.52.0
30
+ */
31
+ export type StrategyFileKind =
32
+ | "json" // JSON 战斗策略
33
+ | "txt" // 文本 / 简易策略(含「根据队伍自动选择」目录)
34
+ | (string & {});
35
+
36
+ /**
37
+ * 队伍内角色槽位序号(字符串),从 1 开始;空字符串表示不指定
38
+ * @since 0.52.0
39
+ */
40
+ export type PartySlotIndex = "1" | "2" | "3" | "4" | "" | (string & {});
41
+
20
42
  /**
21
43
  * 自动战斗配置
22
44
  * @since 0.52.0
@@ -89,7 +111,7 @@ export interface AutoFightConfig
89
111
  * 盾奶位角色队伍序号,从 1 开始,空字符串表示不指定
90
112
  * @since 0.52.0
91
113
  */
92
- guardianAvatar: string;
114
+ guardianAvatar: PartySlotIndex;
93
115
  /**
94
116
  * 是否跳过盾奶位自身的战斗策略脚本
95
117
  * @since 0.52.0
@@ -134,7 +156,7 @@ export interface AutoFightConfig
134
156
  * 战斗策略名称,`根据队伍自动选择` 表示按当前队伍匹配策略
135
157
  * @since 0.52.0
136
158
  */
137
- strategyName: string;
159
+ strategyName: CombatStrategyName;
138
160
  /**
139
161
  * 是否启用游泳脱困检测
140
162
  * @since 0.52.0
@@ -248,6 +270,10 @@ declare global {
248
270
  declare global {
249
271
  namespace BetterGenshinImpact.GameTask.AutoFight {
250
272
  type AutoFightConfig = import("./AutoFightConfig").AutoFightConfig;
273
+ type CombatStrategyName = import("./AutoFightConfig").CombatStrategyName;
274
+ type OnlyPickEliteDropsMode = import("./AutoFightConfig").OnlyPickEliteDropsMode;
275
+ type PartySlotIndex = import("./AutoFightConfig").PartySlotIndex;
276
+ type StrategyFileKind = import("./AutoFightConfig").StrategyFileKind;
251
277
  }
252
278
  }
253
279
 
@@ -8,7 +8,12 @@ import type { VoidResult } from "../../../Microsoft/ClearScript/VoidResult";
8
8
  import "../../../System/ValueTuple";
9
9
  import "../Model/BaseTaskParam";
10
10
  import "./AutoFightConfig";
11
- import type { OnlyPickEliteDropsMode } from "./AutoFightConfig";
11
+ import type {
12
+ CombatStrategyName,
13
+ OnlyPickEliteDropsMode,
14
+ PartySlotIndex,
15
+ StrategyFileKind
16
+ } from "./AutoFightConfig";
12
17
  import "./AutoFightTask";
13
18
 
14
19
  /**
@@ -101,7 +106,7 @@ export interface AutoFightParam extends Omit<
101
106
  * 盾奶位角色队伍序号,从 1 开始,空字符串表示不指定
102
107
  * @since 0.52.0
103
108
  */
104
- guardianAvatar: string;
109
+ guardianAvatar: PartySlotIndex;
105
110
  /**
106
111
  * 是否跳过盾奶位自身的战斗策略脚本
107
112
  * @since 0.52.0
@@ -149,7 +154,7 @@ export interface AutoFightParam extends Omit<
149
154
  * @since 0.52.0
150
155
  */
151
156
  setCombatStrategyPath(): VoidResult;
152
- setCombatStrategyPath(strategyName: string | null): VoidResult;
157
+ setCombatStrategyPath(strategyName: CombatStrategyName | null): VoidResult;
153
158
  /**
154
159
  * 从当前全局自动战斗配置填充默认参数
155
160
  * @returns ClearScript 宿主空结果
@@ -243,7 +248,7 @@ export interface AutoFightParamHostType extends HostType<AutoFightParam, Referen
243
248
  * @since 0.52.0
244
249
  */
245
250
  new (): AutoFightParam;
246
- new (strategyName: string | null): AutoFightParam;
251
+ new (strategyName: CombatStrategyName | null): AutoFightParam;
247
252
  /**
248
253
  * 是否启用游泳脱困检测
249
254
  * @since 0.52.0
@@ -252,10 +257,12 @@ export interface AutoFightParamHostType extends HostType<AutoFightParam, Referen
252
257
  /**
253
258
  * 解析策略文件路径,优先检测 `.json`,未命中则回退 `.txt`
254
259
  * @param strategyName 策略名称(不含扩展名)
255
- * @returns 完整路径与类型标识组成的元组,类型为 `json` 或 `txt`
260
+ * @returns 完整路径与策略文件种类组成的元组
256
261
  * @since 0.52.0
257
262
  */
258
- resolveStrategyPath(strategyName: string): System.ValueTuple<string, string>;
263
+ resolveStrategyPath(
264
+ strategyName: CombatStrategyName
265
+ ): System.ValueTuple<string, StrategyFileKind>;
259
266
  readonly FightFinishDetectConfig: AutoFightParam_FightFinishDetectConfigHostType;
260
267
  }
261
268