mirror of
https://github.com/babalae/bettergi-scripts-list.git
synced 2026-03-16 03:33:25 +08:00
js: 七圣召唤七日历练: 细节修正 (#2428)
This commit is contained in:
@@ -452,7 +452,7 @@ const detectCardPlayer = async () => {
|
||||
};
|
||||
|
||||
//获取挑战对象名称
|
||||
async function captureAndStoreTexts() {
|
||||
async function getRemainingChallengeGuests() {
|
||||
// 清空数组
|
||||
textArray = [];
|
||||
// 四个固定位置坐标
|
||||
@@ -635,12 +635,13 @@ async function searchCharAndPlayCards() {
|
||||
charName = textArray[charIndex].text;
|
||||
log.info(`找到文本: ${resText} (匹配到牌手: ${charName})`);
|
||||
skipNum = 0;
|
||||
break;
|
||||
} else {
|
||||
log.debug("resText={0}无任何匹配牌手", resText);
|
||||
log.debug("resText={0} 无任何匹配牌手", resText);
|
||||
}
|
||||
}
|
||||
if (charName === "") {
|
||||
log.warn(`在牌桌旁未找到可对战牌手 (剩余: ${textArray.join(", ")})`);
|
||||
log.warn(`在牌桌旁未找到可对战牌手 (剩余: ${textArray.map(item => item.text).join(", ")})`);
|
||||
skipNum++;
|
||||
return false;
|
||||
}
|
||||
@@ -1015,7 +1016,7 @@ async function main() {
|
||||
const nowTime = new Date();
|
||||
log.info(`前往猫尾酒馆`);
|
||||
await gotoTavern();
|
||||
await captureAndStoreTexts();
|
||||
await getRemainingChallengeGuests();
|
||||
allStrategy = scanCardStrategy();
|
||||
try {
|
||||
strategyRunRecord = JSON.parse(file.readTextSync(strategyRunRecordFile));
|
||||
@@ -1056,7 +1057,7 @@ async function main() {
|
||||
await searchCharAndPlayCards();
|
||||
}
|
||||
await genshin.returnMainUi();
|
||||
await captureAndStoreTexts();
|
||||
await getRemainingChallengeGuests();
|
||||
notification.send(`打牌结束、剩余挑战人数:${textArray.length}`);
|
||||
// 更新最后完成时间
|
||||
if (textArray.length === 0) {
|
||||
@@ -1074,7 +1075,7 @@ async function main() {
|
||||
log.error("需要在JS脚本配置中设置两个牌组且名称不能相同");
|
||||
return;
|
||||
}
|
||||
if ((await isTaskRefreshed("assets/weekly.txt"), refresh)) {
|
||||
if (await isTaskRefreshed("assets/weekly.txt", refresh)) {
|
||||
await genshin.returnMainUi();
|
||||
if(settings.teamName)await genshin.switchParty(settings.teamName);
|
||||
await main();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"manifest_version": 1,
|
||||
"name": "打牌一条龙",
|
||||
"version": "2.15",
|
||||
"version": "2.16",
|
||||
"description": "完成每周的七圣召唤七日历练(来客挑战)。详见README.md",
|
||||
"tags": [
|
||||
"七圣召唤"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
},
|
||||
"玛乔丽": {
|
||||
"雷神柯莱刻晴": {
|
||||
"win": 1,
|
||||
"win": 2,
|
||||
"fail": 0
|
||||
}
|
||||
},
|
||||
@@ -61,7 +61,7 @@
|
||||
},
|
||||
"薇娜": {
|
||||
"雷神柯莱刻晴": {
|
||||
"win": 1,
|
||||
"win": 2,
|
||||
"fail": 0
|
||||
}
|
||||
},
|
||||
@@ -77,7 +77,7 @@
|
||||
},
|
||||
"帕班": {
|
||||
"雷神柯莱刻晴": {
|
||||
"win": 1,
|
||||
"win": 2,
|
||||
"fail": 0
|
||||
}
|
||||
},
|
||||
@@ -125,7 +125,7 @@
|
||||
},
|
||||
"欧仁妮": {
|
||||
"雷神柯莱刻晴": {
|
||||
"win": 1,
|
||||
"win": 2,
|
||||
"fail": 0
|
||||
}
|
||||
},
|
||||
@@ -143,6 +143,18 @@
|
||||
"1.莫娜砂糖琴": {
|
||||
"win": 0,
|
||||
"fail": 1
|
||||
},
|
||||
"2.刻晴雷神甘雨": {
|
||||
"win": 0,
|
||||
"fail": 1
|
||||
},
|
||||
"3.雷神阿贝多丘丘王": {
|
||||
"win": 0,
|
||||
"fail": 1
|
||||
},
|
||||
"4.重云雷神申鹤": {
|
||||
"win": 1,
|
||||
"fail": 0
|
||||
}
|
||||
},
|
||||
"艾琳": {
|
||||
@@ -150,5 +162,11 @@
|
||||
"win": 1,
|
||||
"fail": 0
|
||||
}
|
||||
},
|
||||
"提纳里": {
|
||||
"雷神柯莱刻晴": {
|
||||
"win": 1,
|
||||
"fail": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user