From dec490208d4fdfcaf1f021fd69ce7c1b664d81ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E4=BA=91?= Date: Sat, 14 Jun 2025 22:19:53 +0800 Subject: [PATCH] =?UTF-8?q?=20add(=E5=A5=BD=E6=84=9Fjs)=EF=BC=9A=E9=9B=B7?= =?UTF-8?q?=E8=90=A4=E6=9C=AF=E5=A3=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/AutoPath/雷萤术士-准备.json | 33 +++++++++++++++++++ .../assets/AutoPath/雷萤术士-战斗点.json | 33 +++++++++++++++++++ .../assets/AutoPath/雷萤术士-触发点.json | 33 +++++++++++++++++++ repo/js/AutoFriendshipFight/main.js | 11 +++++++ repo/js/AutoFriendshipFight/settings.json | 3 +- 5 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 repo/js/AutoFriendshipFight/assets/AutoPath/雷萤术士-准备.json create mode 100644 repo/js/AutoFriendshipFight/assets/AutoPath/雷萤术士-战斗点.json create mode 100644 repo/js/AutoFriendshipFight/assets/AutoPath/雷萤术士-触发点.json diff --git a/repo/js/AutoFriendshipFight/assets/AutoPath/雷萤术士-准备.json b/repo/js/AutoFriendshipFight/assets/AutoPath/雷萤术士-准备.json new file mode 100644 index 00000000..c47de0e3 --- /dev/null +++ b/repo/js/AutoFriendshipFight/assets/AutoPath/雷萤术士-准备.json @@ -0,0 +1,33 @@ +{ + "info": { + "name": "雷萤术士-准备", + "type": "collect", + "author": "秋云", + "version": "1.0", + "description": "", + "map_name": "Teyvat", + "bgi_version": "0.45.0", + "tags": [], + "last_modified_time": 1749868010891 + }, + "positions": [ + { + "id": 1, + "x": 878.9990234375, + "y": 632.51123046875, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "teleport" + }, + { + "id": 2, + "x": 883.4580078125, + "y": 616.2119140625, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "path" + } + ] +} \ No newline at end of file diff --git a/repo/js/AutoFriendshipFight/assets/AutoPath/雷萤术士-战斗点.json b/repo/js/AutoFriendshipFight/assets/AutoPath/雷萤术士-战斗点.json new file mode 100644 index 00000000..160ab296 --- /dev/null +++ b/repo/js/AutoFriendshipFight/assets/AutoPath/雷萤术士-战斗点.json @@ -0,0 +1,33 @@ +{ + "info": { + "name": "雷萤术士-战斗点", + "type": "collect", + "author": "秋云", + "version": "1.0", + "description": "", + "map_name": "Teyvat", + "bgi_version": "0.45.0", + "tags": [], + "last_modified_time": 1749867939723 + }, + "positions": [ + { + "id": 1, + "x": 878.9990234375, + "y": 632.51123046875, + "type": "path", + "move_mode": "walk", + "action": "", + "action_params": "" + }, + { + "id": 2, + "action": "", + "move_mode": "walk", + "type": "path", + "x": 883.91015625, + "y": 656.63720703125, + "action_params": "" + } + ] +} \ No newline at end of file diff --git a/repo/js/AutoFriendshipFight/assets/AutoPath/雷萤术士-触发点.json b/repo/js/AutoFriendshipFight/assets/AutoPath/雷萤术士-触发点.json new file mode 100644 index 00000000..deb834d3 --- /dev/null +++ b/repo/js/AutoFriendshipFight/assets/AutoPath/雷萤术士-触发点.json @@ -0,0 +1,33 @@ +{ + "info": { + "name": "雷萤术士-触发点", + "type": "collect", + "author": "秋云", + "version": "1.0", + "description": "", + "map_name": "Teyvat", + "bgi_version": "0.45.0", + "tags": [], + "last_modified_time": 1749867969700 + }, + "positions": [ + { + "id": 1, + "x": 878.9990234375, + "y": 632.51123046875, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "path" + }, + { + "id": 2, + "x": 881.9287109375, + "y": 616.85400390625, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "path" + } + ] +} \ No newline at end of file diff --git a/repo/js/AutoFriendshipFight/main.js b/repo/js/AutoFriendshipFight/main.js index ee6dfa0a..981637ca 100644 --- a/repo/js/AutoFriendshipFight/main.js +++ b/repo/js/AutoFriendshipFight/main.js @@ -34,6 +34,10 @@ const DEFAULT_FIGHT_TIMEOUT_SECONDS = 120; log.info(`导航到蕈兽触发点...`); await AutoPath('蕈兽-准备'); } + if (enemyType === "雷萤术士") { + log.info(`导航到雷萤术士触发点...`); + await AutoPath('雷萤术士-准备'); + } // 验证超时设置 const ocrTimeout = validateTimeoutSetting(settings.ocrTimeout, DEFAULT_OCR_TIMEOUT_SECONDS, "OCR"); const fightTimeout = validateTimeoutSetting(settings.fightTimeout, DEFAULT_FIGHT_TIMEOUT_SECONDS, "战斗"); @@ -370,6 +374,9 @@ function getOcrKeywords(enemyType) { else if (enemyType === "蕈兽") { return ["实验家", "变成", "实验品", "击败", "所有", "魔物"]; } + else if (enemyType === "雷萤术士") { + return ["雷萤", "术士","圆滚滚", "不可食用", "威撼", "攀岩", "消灭", "准备", "打倒", "所有", "魔物","盗宝团","击败","成员","盗亦无道"]; + } else { return ["突发", "任务", "打倒", "消灭", "敌人", "所有"]; // 兜底关键词 @@ -388,6 +395,8 @@ function getTargetCoordinates(enemyType) { return { x: 3578.08, y: -500.75 }; } else if (enemyType === "蕈兽") { return { x: 3794.55, y: -350.60 }; + } else if (enemyType === "雷萤术士") { + return {x: 883.91, y:656.63}; } } @@ -402,6 +411,8 @@ function getTriggerPoint(enemyType) { return { x: 3614.63, y: -521.60 }; // 鳄鱼触发点坐标 } else if (enemyType === "蕈兽") { return { x: 3749.38, y: -391.91 }; // 蕈兽触发点坐标 + } else if (enemyType === "雷萤术士") { + return {x:881.92, y: 616.85}; // 雷萤术士触发点坐标 } } diff --git a/repo/js/AutoFriendshipFight/settings.json b/repo/js/AutoFriendshipFight/settings.json index 8375e03e..7c6cea8c 100644 --- a/repo/js/AutoFriendshipFight/settings.json +++ b/repo/js/AutoFriendshipFight/settings.json @@ -7,7 +7,8 @@ "盗宝团", "愚人众", "鳄鱼", - "蕈兽" + "蕈兽", + "雷萤术士" ], "default": "盗宝团" },