辉鸭蛋
|
a98934fc9a
|
fix bug
|
2024-11-02 22:56:35 +08:00 |
|
辉鸭蛋
|
2b8f38b758
|
finsh pathing config
|
2024-11-02 21:03:58 +08:00 |
|
辉鸭蛋
|
2545581807
|
new pathing config
|
2024-11-02 19:49:38 +08:00 |
|
辉鸭蛋
|
a1cdf15c7e
|
fix bug
|
2024-11-01 19:19:47 +08:00 |
|
辉鸭蛋
|
b0d4068eb2
|
pathing opt
|
2024-10-31 23:10:11 +08:00 |
|
辉鸭蛋
|
fe12b59b5c
|
Pathing has been stuck 3 times. Try the route again or abandon it!
将 `_retryTimes` 字段改为常量 `RetryTimes`,并将其值设为 2。添加了新的字段 `_inTrap`,用于记录陷入困境的次数。在 `Pathing` 方法中,将 `for` 循环中的 `_retryTimes` 替换为 `RetryTimes`。在路径执行过程中,增加了对陷入困境的检测逻辑。如果在 8 个位置内的移动距离小于 3,则认为可能陷入困境,并增加 `_inTrap` 计数器。如果 `_inTrap` 超过 2 次,则抛出 `RetryException` 异常,提示路线出现 3 次卡死,重试或放弃此路线。检测到疑似卡死时,记录警告日志,并调用 `TrapEscaper` 的方法尝试脱困。
|
2024-10-27 22:24:14 +08:00 |
|
辉鸭蛋
|
98d2664c28
|
auto pathing: use group config & fix bug
|
2024-10-27 00:51:10 +08:00 |
|
辉鸭蛋
|
94418cbe56
|
auto pathing: add retry
|
2024-10-26 23:37:55 +08:00 |
|
辉鸭蛋
|
72c2e38f94
|
add pathing settings for script group
|
2024-10-26 21:11:59 +08:00 |
|
辉鸭蛋
|
1dbb9e3bf1
|
auto pathing: optimize avatar switch
|
2024-10-26 14:46:38 +08:00 |
|
辉鸭蛋
|
e4e7b37fd2
|
the whole team is defeated
在 `PathExecutor.cs` 中,`RecoverWhenLowHp` 方法进行了修改:
- 使用 `using` 语句来捕获区域。
- 如果当前角色血量过低,调用新的 `TpStatueOfTheSeven` 方法进行传送和恢复。
- 增加了一个新的分支,如果检测到复苏提示,点击复苏并等待主界面加载完成,然后再调用 `TpStatueOfTheSeven` 方法。
- 新增了 `TpStatueOfTheSeven` 方法,用于处理传送到七天神像并恢复血量的逻辑。
在 `BvStatus.cs` 中:
- 增加了 `System.Threading.Tasks` 和 `System.Threading` 的引用。
- 在 `Bv` 类中新增了 `WaitForMainUi` 方法,用于等待主界面加载完成。
- 在 `Bv` 类中新增了 `ClickIfInReviveModal` 方法,用于检测并点击复苏提示。
|
2024-10-26 00:21:51 +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 |
|
辉鸭蛋
|
14a1d3be74
|
auto pathing: add settings ui
|
2024-10-25 01:17:00 +08:00 |
|
辉鸭蛋
|
94aae80046
|
auto pathing: optimize switch avatar
删除 `BetterGenshinImpact.csproj` 中的无用文件夹包含项。
将 `PathingConfig.cs` 中部分属性类型从 `int` 改为 `string`,并调整默认值。
在 `ScriptRepoUpdater.cs` 中用 `MessageBox` 替换 `ContentDialog`。
简化 `ElementalSkillHandler.cs` 和 `NormalAttackHandler.cs` 中的代码。
删除 `NahidaCollectHandler.cs` 中的切换角色代码。
在 `PathingTask.cs` 中添加 `HasAction` 方法。
在 `PathExecutor.cs` 中添加 `_actionAvatarIndexMap` 字典和多个新方法。
新增 `ReturnMainUiTask.cs` 任务类。
|
2024-10-24 23:05:52 +08:00 |
|
辉鸭蛋
|
b3f6002846
|
add pathing config
|
2024-10-22 01:21:11 +08:00 |
|
辉鸭蛋
|
3cbbbff093
|
add UpDownGrabLeaf action
|
2024-10-20 11:20:25 +08:00 |
|
辉鸭蛋
|
11ec9bc45d
|
refactor: CancellationTokenSource -> CancellationToken
|
2024-10-19 01:50:21 +08:00 |
|
辉鸭蛋
|
07e682d488
|
auto pathing: code clean & opt
|
2024-10-18 20:59:58 +08:00 |
|
jbcaaa
|
e1149bc254
|
分离行走逻辑和避障逻辑
|
2024-10-18 14:45:23 +08:00 |
|
jbcaaa
|
6a53efce1e
|
增加注释,辅助理解
|
2024-10-18 10:51:19 +08:00 |
|
jbcaaa
|
a67adc0070
|
修复许多问题,增加小脱困
|
2024-10-18 08:24:58 +08:00 |
|
jbcaaa
|
03f6b6331f
|
设置为非攀爬时进入攀爬,自动脱离
|
2024-10-18 07:41:43 +08:00 |
|
jbcaaa
|
ee720f8dfd
|
try again
|
2024-10-18 07:06:06 +08:00 |
|
jbcaaa
|
b152486327
|
统一脱困跳跃方法
|
2024-10-18 06:57:57 +08:00 |
|
jbcaaa
|
70f1f69067
|
回退一个数值更改
|
2024-10-18 06:44:27 +08:00 |
|
jbcaaa
|
f56465ebf3
|
fixed the problem causes autopathing cannot run correctly.
|
2024-10-18 06:41:24 +08:00 |
|
jbcaaa
|
3b8b1ef9db
|
Update PathExecutor.cs
|
2024-10-18 00:48:57 +08:00 |
|
jbcaaa
|
a4bb2eeca2
|
changed some value
|
2024-10-18 00:23:26 +08:00 |
|
jbcaaa
|
f222431784
|
[testing] madly modified move actions in autopathing
|
2024-10-17 21:15:58 +08:00 |
|
jbcaaa
|
561f1b8b72
|
Support using both key-mouse-record and auto-pathing in js scripts
|
2024-10-17 16:04:27 +08:00 |
|
辉鸭蛋
|
4859c4dc4a
|
add log & pathing opt
|
2024-10-16 01:31:44 +08:00 |
|
辉鸭蛋
|
c4a7823c83
|
fix js pathingScript
|
2024-10-13 22:58:42 +08:00 |
|
辉鸭蛋
|
50aac5cea0
|
auto pathing opt
|
2024-10-13 22:12:07 +08:00 |
|
辉鸭蛋
|
228d50bb5d
|
Revert "feat: 优化autopath MoveTo逻辑"
This reverts commit 504f853893.
|
2024-10-13 21:09:41 +08:00 |
|
gqzcl
|
504f853893
|
feat: 优化autopath MoveTo逻辑
|
2024-10-05 14:04:20 +08:00 |
|
辉鸭蛋
|
c15cb33c2c
|
rename variables and properties, refactor code, add new configuration options
重命名变量和属性,重构代码,添加新配置选项
主要更改:
* 将 `AutoFightConfig` 和 `AutoFightParam` 类中的字段和属性重命名,以提高名称的清晰度和一致性。
* 移除不必要的 `using` 语句,并调整顺序。
* 重构 `AutoFightTask` 和 `AutoFightHandler` 类中的条件判断和方法逻辑。
* 调整 `CameraRotateTask` 类中的参数值。
* 在 `PathExecutor` 类中添加 `_rotateTask` 字段,并修改相关方法调用。
* 在 `TaskSettingsPage.xaml` 中添加新的配置选项。
* 在 `HotKeyPageViewModel` 类中添加 `using` 语句,并修改热键回调逻辑。
* 修改 `TaskSettingsPageViewModel` 类中 `AutoFightParam` 的初始化。
|
2024-09-30 13:42:11 +08:00 |
|
辉鸭蛋
|
d9e5f2f1dd
|
add rotate task
在 `BgiYoloV8Predictor.cs` 文件中,添加了 `System.Diagnostics`、`System.Drawing.Imaging` 和 `System.IO` 的引用,并在 YOLOv8 识别结果返回前,添加了调试输出,使用 `JsonSerializer` 序列化识别结果并输出到调试窗口。
在 `AutoFightTask.cs` 文件中,添加了 `System.Collections.Generic` 和 `BetterGenshinImpact.GameTask.AutoPathing` 的引用,修改了 `combatScenes.BeforeTask` 方法的调用,使用新的取消令牌 `cts2`。在战斗操作的 `Task.Run` 中添加了 `try-catch` 块,以捕获并忽略异常。修改了战斗结束检测线程,使用 `async` 和 `await` 关键字,并在检测战斗结束时添加了 `try-catch` 块。修改了 `CheckFightFinish` 方法,改为异步方法 `CheckFightFinish`,并在检测战斗结束时添加了旋转视角的逻辑。
在 `PathExecutor.cs` 文件中,添加了关于 DPI 和分辨率影响转动速度的注释。
在 `TaskSettingsPageViewModel.cs` 文件中,在获取战斗策略后,创建了 `AutoFightParam` 对象,并设置了 `EndDetect` 和 `AutoPickAfterFight` 参数。修改了 `RunSoloTaskAsync` 方法的调用,传入了新的 `AutoFightParam` 对象。
在 `CameraRotateTask.cs` 文件中,添加了新的 `CameraRotateTask` 类,用于处理相机视角的旋转,实现了 `RotateToApproach` 方法,用于将视角旋转到接近目标角度,实现了 `WaitUntilRotatedTo` 异步方法,用于等待视角旋转到目标角度。
|
2024-09-30 00:10:08 +08:00 |
|
何杰泽
|
997059dd4b
|
添加fight action。战斗结束策略比较low。
|
2024-09-21 15:56:37 +08:00 |
|
辉鸭蛋
|
70b1ed88bb
|
auto pathing: add nahida_collect action
新增 Action 处理机制及相关类和方法
删除了 `PickHandler` 类及其相关的 `Obsolete` 特性。
在 `ActionEnum` 类中新增了两个静态只读字段:`NahidaCollect` 和 `PickAround`。
在 `PathExecutor` 类中引入了 `BetterGenshinImpact.GameTask.AutoPathing.Handler` 命名空间。
在 `PathExecutor` 类的 `MoveTo` 方法中,添加了一个调用 `AfterMoveToTarget` 方法的步骤,用于在到达点位后执行特定的动作。
在 `PathExecutor` 类中,修改了疑似卡死时的延迟时间,从 500 毫秒增加到 1500 毫秒。
在 `PathExecutor` 类中新增了 `AfterMoveToTarget` 方法,用于根据 `waypoint.Action` 执行相应的处理逻辑。
新增了 `ActionFactory` 类,用于根据 `handlerType` 获取相应的 `IActionHandler` 实例。
新增了 `IActionHandler` 接口,定义了 `RunAsync` 方法。
新增了 `NahidaCollectHandler` 类,实现了 `IActionHandler` 接口,用于执行纳西妲的收集操作。
新增了 `PickAroundHandler` 类,实现了 `IActionHandler` 接口,暂时未实现具体的拾取操作逻辑。
|
2024-09-19 00:36:14 +08:00 |
|
辉鸭蛋
|
5f9ca6b399
|
auto pathing: add force tp for tp point
|
2024-09-17 15:06:32 +08:00 |
|
辉鸭蛋
|
4cc4aa27f0
|
fix path recorder
|
2024-09-16 21:31:40 +08:00 |
|
辉鸭蛋
|
3e69e6c3ac
|
fix map pos not reset during feature match #619
|
2024-09-16 21:15:59 +08:00 |
|
辉鸭蛋
|
a06f0fcdb2
|
auto pathing: fix not releasing the mouse and keyboard when stopping tasks
更新日志和黑名单
移除 `PathExecutor.cs` 中的无用引用,重构 `Pathing` 方法,添加 `InitializePathing` 和 `ConvertWaypoints` 方法,提取传送点处理逻辑到 `HandleTeleportWaypoint` 方法。修改 `TpTask.cs` 中的日志格式为浮点数格式。将 `TaskRunner.cs` 中的 `FireAndForgetAsync` 方法重命名为 `RunThreadAsync`,并在 `ScriptService.cs` 中相应替换调用。为 `DpiHelper.cs` 中的 `ScaleY` 属性添加注释。更新 `pick_black_lists.json`,添加新的黑名单项 `"摆放巧像"`。在 `MapPathingViewModel.cs` 中添加 `_mapViewer` 字段,并在 `OnOpenMapViewer` 方法中使用。
|
2024-09-09 21:57:48 +08:00 |
|
辉鸭蛋
|
220d6a4f9b
|
fix multi thread ui bug & rotate with dpi
优化 DPI 处理和异步任务执行
在 `PathExecutor.cs` 中,添加了对 `BetterGenshinImpact.Helpers` 的引用,并引入了 `DpiHelper` 来调整 `_dpi` 变量。
在 `PathExecutor` 类中,添加了 `_dpi` 变量,并在 `Pathing` 方法中初始化 `_dpi` 为 `DpiHelper.ScaleY`。
修改了 `RotateTo` 方法的 `controlRatio` 参数类型,从 `int` 改为 `double`,并在调用 `Simulation.SendInput.Mouse.MoveMouseBy` 时乘以 `_dpi` 进行 DPI 缩放。
在 `TaskRunner.cs` 中,添加了 `FireAndForgetAsync` 方法,用于异步执行任务。
在 `ScriptService.cs` 中,添加了对 `BetterGenshinImpact.Helpers` 的引用。
修改了 `ScriptService` 类中调用 `TaskRunner` 的方式,从 `RunAsync` 改为 `FireAndForgetAsync`。
在 `ScriptControlViewModel.cs` 中,简化了调用 `_scriptService.RunMulti` 的方式,去掉了多余的 `Task.Run` 包装。
|
2024-09-09 00:44:24 +08:00 |
|
辉鸭蛋
|
4276957837
|
tp opt & F11 can cancel script task
优化日志记录和任务取消逻辑
在 `PathExecutor.cs` 中添加了 `using System.Diagnostics;` 语句。
注释掉了 `PathExecutor` 类中的部分日志信息。
将 `MoveTo` 和 `MoveCloseTo` 方法中的日志记录改为使用 `Debug.WriteLine`。
修改了 `MoveTo` 和 `MoveCloseTo` 方法中的循环条件,改为 `while (!cts.IsCancellationRequested)`。
将 `MoveTo` 方法中的超时时间从 30 秒改为 60 秒。
在 `TpTask.cs` 中增加了对配置项的最小值检查。
在 `MapAssets.cs` 中添加了新的地图坐标 `{ "纳塔", [8973.5, -1879.1] }`。
在 `HomePageViewModel.cs` 中添加了 `using BetterGenshinImpact.Core.Script;` 语句。
在 `HomePageViewModel` 类的 `Stop` 方法中,添加了取消独立任务的逻辑。
|
2024-09-08 19:44:34 +08:00 |
|
辉鸭蛋
|
a0691f1c19
|
auto pathing: add mapper viewer
|
2024-09-08 19:08:46 +08:00 |
|
辉鸭蛋
|
ca6994a720
|
auto pathing : first version
|
2024-09-08 15:16:02 +08:00 |
|
辉鸭蛋
|
cb09a369c2
|
auto pathing: fix jump and fly
|
2024-09-08 12:33:58 +08:00 |
|
辉鸭蛋
|
1fd5320df2
|
auto pathing: update
- 移除了不必要的 `using` 语句,添加了新的 `using` 语句。
- 将 `Waypoints` 属性重命名为 `Positions`。
- 更新了 `BuildFromFilePath` 方法中的 `JsonOptions` 引用。
- 将 `Waypoint` 类移到单独的文件中,并添加了相关属性和注释。
- 添加了 `SaveToFile` 方法,用于将 `PathingTask` 对象保存到文件。
- 更新了 `PathExecutor` 中的 `TaskControl` 引用,简化了代码。
- 更新了 `PathRecorder` 的属性和方法,使用私有字段 `_pathingTask`。
- 更新了 `MapPathingPage.xaml` 的命令绑定。
- 更新了 `HotKeyPageViewModel` 和 `MapPathingViewModel` 的逻辑。
- 添加了新的 `PathingTaskConfig` 类,用于配置路径任务。
|
2024-09-08 02:23:45 +08:00 |
|
辉鸭蛋
|
5818bcd7ed
|
refactor the path task-related code, using the new enum class
在 `PathingTask.cs`、`PathExecutor.cs` 和 `PathRecorder.cs` 中,删除了 `WaypointType`、`MoveType`、`ActionType` 和 `PathingTaskType` 枚举,并将其替换为 `Enum` 命名空间中的类。更新了 `PathingTaskInfo` 类的属性默认值和新增属性。在 `PathExecutor.cs` 中,使用 `.Code` 属性进行比较,并优化了 `prevPositions` 列表的索引。在 `HotKeyPageViewModel.cs` 中,重命名了变量并更新了回调函数。在 `ActionEnum.cs`、`MoveStatusType.cs`、`PathingTaskType.cs` 和 `WaypointType.cs` 中,定义了新的枚举类及其静态实例和相关方法。
|
2024-09-07 14:53:25 +08:00 |
|