Commit Graph

57 Commits

Author SHA1 Message Date
辉鸭蛋
741da4e0c7 #869 2024-12-29 20:22:00 +08:00
辉鸭蛋
7e04d77f88 kazuha e hold when fight end 2024-12-29 00:28:53 +08:00
辉鸭蛋
a89af32560 pathing: fix bug, init mining 2024-11-22 00:23:21 +08:00
辉鸭蛋
adcd08421a fix: incorrect host judgment methods #777 2024-11-09 17:49:42 +08:00
辉鸭蛋
5f40e28332 修复后台自动剧情启用的情况下,自动领取探索奖励失效的问题 2024-10-27 22:18:32 +08:00
辉鸭蛋
44190a522b team identification support online
修复错误信息,改进联机状态处理

更新了 `BetterGenshinImpact.csproj` 文件中的程序集版本号,从 `0.35.2` 更新为 `0.35.4`。

修正了 `ScriptProject.cs` 文件中抛出 `FileNotFoundException` 异常时的错误信息,将 "manifest.json文件存在" 改为 "manifest.json文件不存在"。

在 `AutoFightAssets.cs` 文件中:
- 为 `AvatarSideIconRectList` 和 `AvatarIndexRectList` 添加了注释,解释其在非联机状态下的用途。
- 添加了多个新的属性和注释,用于处理联机状态下的角色头像和对应的白色块位置。
- 初始化了 `OnePRa` 和 `PRa` 两个识别对象,用于识别联机状态下的1P和P图标。

在 `Avatar.cs` 文件中:
- 修改了角色切换逻辑,使用 `CombatScenes.ExpectedTeamAvatarNum` 替代硬编码的数字。
- 在 `TrySwitch` 方法中添加了 `needLog` 参数,并在切换成功时记录日志。
- 移除了部分注释代码,并在日志中保存了角色切换和索引区域的截图。
- 添加了 `System.Diagnostics` 的引用。

在 `CombatScenes.cs` 文件中:
- 将 `Avatars` 初始化为空数组。
- 添加了 `ExpectedTeamAvatarNum` 属性,默认值为4。
- 在 `InitializeTeam` 方法中添加了联机状态的判断和处理逻辑。
- 修改了队伍识别逻辑,使用动态数组替代固定长度的数组。
- 修改了 `CheckTeamInitialized` 方法,使用 `ExpectedTeamAvatarNum` 替代硬编码的数字。
- 修改了 `BuildAvatars` 方法,添加了对联机状态下角色编号位置信息的处理。
- 修改了 `SelectAvatar` 方法,使用 `GetValueOrDefault` 替代 `TryGetValue`。

在 `ScriptControlViewModel.cs` 文件中,设置 `WindowStartupLocation` 为 `WindowStartupLocation.CenterOwner`。

添加了 `1p.png` 和 `p.png` 两个新图像文件,用于识别联机状态下的1P和P图标。
2024-10-27 17:15:55 +08:00
辉鸭蛋
1dbb9e3bf1 auto pathing: optimize avatar switch 2024-10-26 14:46:38 +08:00
辉鸭蛋
7c96adb591 improve low hp detection and resurrection logic
改进低血量检测和复活逻辑

在 `BetterGenshinImpact.csproj` 文件中,将 `<AssemblyVersion>` 从 `0.35.1` 更新为 `0.35.2`。

在 `AutoDomainTask.cs` 文件中:
- 添加了 `using BetterGenshinImpact.GameTask.Common.BgiVision;` 引用。
- 将 `IsLowHealth` 方法替换为 `Bv.CurrentAvatarIsLowHp(CaptureToRectArea())` 方法。
- 在 `catch` 语句中添加了异常日志记录 `Logger.LogDebug(e, "红血自动吃药检测时发生异常")`。
- 删除了 `IsLowHealth` 方法的实现。

在 `Avatar.cs` 文件中:
- 修改了 `using` 引用,添加了 `BetterGenshinImpact.Core.Recognition`。
- 在 `ThrowWhenDefeated` 方法中,将 `region.Find(AutoFightContext.Instance.FightAssets.ConfirmRa)` 替换为 `Bv.IsInRevivePrompt(region)` 方法,并添加了复活逻辑。

在 `PathExecutor.cs` 文件中:
- 在 `foreach` 循环中添加了 `await RecoverWhenLowHp();` 方法调用。
- 添加了 `RecoverWhenLowHp` 方法,用于检测并处理低血量恢复。

在 `TpTask.cs` 文件中:
- 添加了 `ReviveStatueOfTheSevenPointX` 和 `ReviveStatueOfTheSevenPointY` 静态变量,用于复活点的坐标。

在 `BvStatus.cs` 文件中:
- 添加了多个 `using` 引用。
- 在 `Bv` 类中添加了 `IsInRevivePrompt` 和 `CurrentAvatarIsLowHp` 方法,用于检测复苏提示和当前角色是否低血量。
2024-10-25 23:49:07 +08:00
辉鸭蛋
d23ba65d51 fix #732 2024-10-20 20:38:38 +08:00
辉鸭蛋
11ec9bc45d refactor: CancellationTokenSource -> CancellationToken 2024-10-19 01:50:21 +08:00
ema
335b053b32 change: moved image assets to new folder 2024-09-30 10:12:13 +08:00
qhy040404
c490d29aa1 code cleanup 2024-08-14 18:01:02 +08:00
辉鸭蛋
abac18bc7e reduce the recognition rate requirements for Qin and costume characters 2024-08-02 22:38:47 +08:00
辉鸭蛋
059e21775f unified capture image method 2024-07-21 20:38:06 +08:00
辉鸭蛋
347e42bab9 update dependency library version 2024-07-01 00:51:28 +08:00
辉鸭蛋
d77bb68066 auto domain: switch roles in advance #463 2024-06-23 15:58:48 +08:00
辉鸭蛋
36cde37fea switch to combobox config 2024-05-31 22:26:44 +08:00
辉鸭蛋
03a336967e add classify yolov8 2024-05-28 19:11:43 +08:00
ema
9378a134bd remove: package H.InputSimulator #154 2024-05-12 05:16:27 +08:00
辉鸭蛋
7953a76b3d refactor: auto domain 2024-05-03 22:22:42 +08:00
辉鸭蛋
c2d3e132e8 refactor: RectArea -> Region compilation passed 2024-05-02 14:45:07 +08:00
辉鸭蛋
27ff3e649b quick click genshin online yes or no button #170 2024-04-20 12:24:15 +08:00
辉鸭蛋
19c441b8c6 finish one click fight macro 2024-04-16 01:02:42 +08:00
辉鸭蛋
cbca6cfcfe don't interrupt when recognition fails 2024-04-13 19:03:33 +08:00
辉鸭蛋
aa0fedf808 new avatar rec in auto fight 2024-04-13 18:46:18 +08:00
辉鸭蛋
bdc99e9e06 all assets to singleton 2024-04-04 14:38:04 +08:00
huiyadanli
85f87b02aa auto tcg: default character card config #217 2024-01-21 21:39:11 +08:00
huiyadanli
288c2856ca fix: auto get daily rewards not work #225 2024-01-17 23:31:33 +08:00
huiyadanli
ee2f9f9368 fix: avatar switch bug #213 2024-01-17 00:48:23 +08:00
huiyadanli
61e72330c6 auto fight: continuous operations will no longer be cancelled 2024-01-15 22:52:07 +08:00
huiyadanli
d888a5f119 fix some script bug 2024-01-14 22:21:36 +08:00
huiyadanli
4b5b8f9b88 more combat script 2024-01-14 21:30:54 +08:00
huiyadanli
9a0fa23451 add alias support 2024-01-14 00:08:59 +08:00
huiyadanli
374de87833 fix: OCR cannot accurately recognize "纳西妲" 2024-01-13 23:13:12 +08:00
huiyadanli
0d9cf01800 fix auto fight bug when all triggers close #203 2024-01-11 21:56:32 +08:00
huiyadanli
c0171f7874 the log level for writing files is different (debug) 2024-01-09 23:30:28 +08:00
huiyadanli
87df7297e1 support Neuvillette charge and more command 2024-01-07 16:46:16 +08:00
huiyadanli
92a084cde8 support Nahida long e 2024-01-07 15:56:06 +08:00
huiyadanli
819587d2bd mandatory assignment of team avatars 2024-01-07 14:56:58 +08:00
huiyadanli
7a50f8b994 fix wanderer recognition 2024-01-07 13:12:15 +08:00
huiyadanli
66cd73dbf3 universal combat strategy 2024-01-06 22:59:23 +08:00
huiyadanli
b5a4806c64 add resin recognition and defeated recognition 2024-01-06 16:20:08 +08:00
huiyadanli
2ea4139a9f fix avatar avtive status detection 2024-01-06 14:58:51 +08:00
huiyadanli
4b41c2fb86 adjustable parameters 2024-01-04 23:36:25 +08:00
huiyadanli
433475d6c0 circulate domain 2024-01-02 23:40:13 +08:00
huiyadanli
279f7eb3b5 add enter domain 2024-01-01 22:22:46 +08:00
huiyadanli
be08871440 go to domain tree 2024-01-01 15:06:16 +08:00
huiyadanli
922118a3a1 optimize "播放中" ocr result 2023-12-31 19:40:19 +08:00
huiyadanli
3f76d8dbc9 optimization task termination and team identification 2023-12-31 19:06:31 +08:00
huiyadanli
1c4c884096 finsh auto combat 2023-12-31 17:39:42 +08:00