diff --git a/repo/js/WeeklyThousandStarRealm/README.md b/repo/js/WeeklyThousandStarRealm/README.md index 1954ad723..6aaad4580 100644 --- a/repo/js/WeeklyThousandStarRealm/README.md +++ b/repo/js/WeeklyThousandStarRealm/README.md @@ -44,7 +44,7 @@ | **room** | 奇域关卡关键词或 GUID(仅支持单个,空则使用默认地图) | `37135473336` | | **achievementMode** | 成就模式(请确保地图有成就) | `是` | | **starMode** | 收藏模式(请确保地图未失效,并确保地图已被收藏) | `否` | -| **starRoomName** | 使用的地图名称(不是房间ID,是地图名字。包含即可,但不要与其他地图重名) | `碰碰墙` | +| **starRoomName** | 使用的地图名称(不是房间ID,是地图名字。包含即可,但不要与其他地图重复) | `碰碰墙` | | **thisAttempts** | 指定通关次数(`0` = 无限,直到达到每周上限) | `0` | | **weekMaxExp** | 每周可获取的经验值上限 | `4000` | | **singleExp** | 每次通关可获得的经验值(不可为零) | `270` | diff --git a/repo/js/WeeklyThousandStarRealm/assets/close_manage.png b/repo/js/WeeklyThousandStarRealm/assets/close_manage.png deleted file mode 100644 index 7b83d3226..000000000 Binary files a/repo/js/WeeklyThousandStarRealm/assets/close_manage.png and /dev/null differ diff --git a/repo/js/WeeklyThousandStarRealm/assets/close_star_manage.png b/repo/js/WeeklyThousandStarRealm/assets/close_star_manage.png deleted file mode 100644 index 1a8ba7641..000000000 Binary files a/repo/js/WeeklyThousandStarRealm/assets/close_star_manage.png and /dev/null differ diff --git a/repo/js/WeeklyThousandStarRealm/assets/fold_triangle.png b/repo/js/WeeklyThousandStarRealm/assets/fold_triangle.png new file mode 100644 index 000000000..3151bc57f Binary files /dev/null and b/repo/js/WeeklyThousandStarRealm/assets/fold_triangle.png differ diff --git a/repo/js/WeeklyThousandStarRealm/main.js b/repo/js/WeeklyThousandStarRealm/main.js index e92d2eb9d..e16a95391 100644 --- a/repo/js/WeeklyThousandStarRealm/main.js +++ b/repo/js/WeeklyThousandStarRealm/main.js @@ -1,11 +1,15 @@ import { - getImgMat, findText, findTextAndClick, findImgAndClick, - waitUntilTextAppear + waitUntilTextAppear, + waitUntilImgDisappear } from "../../../packages/utils/tool"; +import fold_triangle from "assets/fold_triangle.png"; +import check_box from "assets/check_box.png"; +import exit_room from "assets/exit_room.png"; + const duration = 1000; // 默认点击等待延时 const storePath = "data/store.json" @@ -116,6 +120,24 @@ async function findAndClickWhiteSpaceNext() { } } +// 折叠展开的置顶栏 +async function checkAndFold() { + const top_text = await findText("置顶", 1400, 650, 400, 100); + if (top_text) { + await waitUntilImgDisappear( + fold_triangle, + async () => { + await findImgAndClick(fold_triangle, 1400, 650, 400, 100, 200); + await sleep(duration); + }, + 1400, + 650, + 400, + 100 + ); + } +} + // 查找要删除的存档 async function findSaveInList(keyword) { const maxScroll = 15; @@ -169,7 +191,6 @@ async function deleteSource() { const sy = saveRegion.y - 30; await sleep(300); - const check_box = getImgMat("assets/check_box.png"); await findImgAndClick(check_box, 0, sy, 1480, saveRegion.height + 70, 2000); // 删除 await sleep(duration); @@ -188,7 +209,6 @@ async function enterSourcePage() { const inRoom = await findText("房间", 1500, 0, 420, 500, 5, 100); if (inRoom) { keyPress("VK_P"); - const exit_room = getImgMat("assets/exit_room.png"); await waitUntilTextAppear( "确认", async () => { @@ -215,7 +235,6 @@ async function enterStarSourcePage() { const inRoom = await findText("房间", 1500, 0, 420, 500, 5, 100); if (inRoom) { keyPress("VK_P"); - const exit_room = getImgMat("assets/exit_room.png"); await waitUntilTextAppear( "确认", async () => { @@ -260,6 +279,7 @@ async function createMap() { // 从收藏创建关卡 async function createStarMap() { + await checkAndFold(); await findTextAndClick("搜索", 0, 0, 1920, 120); inputText(starRoomName); await sleep(500); diff --git a/repo/js/WeeklyThousandStarRealm/manifest.json b/repo/js/WeeklyThousandStarRealm/manifest.json index 9f7886466..1859860f7 100644 --- a/repo/js/WeeklyThousandStarRealm/manifest.json +++ b/repo/js/WeeklyThousandStarRealm/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "千星奇域每周成就经验刷取", - "version": "3.1", + "version": "3.2", "bgi_version": "0.57.0", "description": "无需自己找图,可用于利用成就高经验值刷取经验,默认配置每周刷满需要22分钟,秒刷图仅需9分钟", "authors": [