Files
bettergi-scripts-list/repo/js/AutoFriendshipFight/settings.json
火山 8e4b02d627 改进 AutoFriendshipFight 的稳定性与错误处理 (#3161)
* 改进 AutoFriendshipFight 的稳定性与错误处理

改进 AutoFriendshipFight 的稳定性与错误处理:

- 新增 swimConsecutiveLimit 设置项,并通过 swim_stats.json 记录每日/连续触发“游泳”事件的次数。
- 重构战斗流程: runBattlePathAndFight 、 executeBattleTasks 、 waitForBattleResult 现在返回明确的状态(success/failure/out_of_area/cancelled),并更好地处理取消/超时等情况。
- 改进 OCR 与资源管理:复用并释放经验/摩拉模板 Mat(exp/mora),安全释放截图/OCR 对象,减少循环中的资源泄露风险。
- 增加 AutoPath 封装与安全的文件/路径工具( fileExistsSafe 、 normalizePathForCompare ),避免路径执行/ runFile 出错时出现未处理异常。
- 增加通用工具:安全读取地图坐标、取消检测辅助函数、每日游泳统计的加载/保存/重置,以及战斗点缓存等。
- 其它修复:超时参数校验、正确声明 runTimes 、改进切队逻辑,以及更健壮的日志与通知输出等。
这些改动旨在防止后台残留导致的资源占用问题,更好地检测与处理游泳相关失败,并让战斗/OCR 循环更确定、更可恢复。

* Change fight timeout default from 120 to 30 seconds

* Update fight timeout default value to 120 seconds

* 更改版本号
2026-04-26 21:00:34 +08:00

70 lines
1.8 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[
{
"name": "pickupMode",
"type": "checkbox",
"label": "是否启用自动拾取实时任务",
"default": true
},
{
"name": "enemyType",
"type": "select",
"label": "选择敌人类型",
"options": [
"盗宝团",
"愚人众",
"鳄鱼",
"蕈兽",
"雷萤术士"
],
"default": "盗宝团"
},
{
"name": "qiuQiuRen",
"type": "checkbox",
"label": "是否清理丘丘人\n【默认否仅对盗宝团有效选是会清理丘丘人之后再开始任务】"
},
{
"name": "disableAsyncFight",
"type": "checkbox",
"label": "禁用容易导致问题的异步战斗,改为正常的战斗结束逻辑,勾选后需要在配置组中正常配置战斗结束检测"
},
{
"name": "use1000Stars",
"type": "checkbox",
"label": "使用进出千星替代退出重登"
},
{
"name": "loopTillNoExpOrMora",
"type": "checkbox",
"label": "连续两次循环全程没有检测到获取经验值或摩拉图标时提前终止"
},
{
"name": "partyName",
"type": "input-text",
"label": "(选填)需要切换的队伍名称"
},
{
"name": "runTimes",
"type": "input-text",
"label": "(选填)运行次数\n【默认10次】"
},
{
"name": "ocrTimeout",
"type": "input-text",
"label": "OCR超时时间\n【选填默认为10秒如果经常提前判定未识别到任务请适当调大】",
"default": 10
},
{
"name": "fightTimeout",
"type": "input-text",
"label": "战斗超时时间\n【选填默认为120秒】",
"default": 120
},
{
"name": "swimConsecutiveLimit",
"type": "input-text",
"label": "游泳连续触发阈值\n【选填默认5当日连续触发达到阈值后会提示“战斗策略或配队严重不合理”并终止】",
"default": 5
}
]