mirror of
https://github.com/babalae/bettergi-scripts-list.git
synced 2026-03-21 04:19:51 +08:00
js: 七圣召唤七日历练: OCR形近字替换,更新分享码 (#2362)
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
const defaultReplacementMap = {
|
||||
监: "盐",
|
||||
卵: "卯",
|
||||
};
|
||||
|
||||
// 存储挑战玩家信息
|
||||
let textArray = [];
|
||||
let skipNum = 0;
|
||||
@@ -480,9 +485,13 @@ async function captureAndStoreTexts() {
|
||||
if (!result.isEmpty() && result.text) {
|
||||
// 存储识别结果和对应位置
|
||||
if (res2.isExist()) {
|
||||
log.info(`识别到文本: ${result.text} 位置: (${pos.x}, ${pos.y})`);
|
||||
let correctedText = result.text.trim();
|
||||
for (let [wrongChar, correctChar] of Object.entries(defaultReplacementMap)) {
|
||||
correctedText = correctedText.replace(new RegExp(wrongChar, "g"), correctChar);
|
||||
}
|
||||
log.info(`识别到文本: ${correctedText} 位置: (${pos.x}, ${pos.y})`);
|
||||
textArray.push({
|
||||
text: result.text.trim(),
|
||||
text: correctedText.trim(),
|
||||
x: pos.x + width / 2, // 点击中心位置
|
||||
y: pos.y + height / 2,
|
||||
});
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"manifest_version": 1,
|
||||
"name": "打牌一条龙",
|
||||
"version": "2.13",
|
||||
"version": "2.14",
|
||||
"description": "完成每周的七圣召唤七日历练(来客挑战)。详见README.md",
|
||||
"tags": [
|
||||
"七圣召唤"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// shareCode=AnGSuXAMAoGh83oQCCGR9HsQCDGh9bQQDEEx9rUQDFFB97YQDGFR+LcQDHFh+bgQDIEB
|
||||
// shareCode=AnGRuTQMAoGh83oQCCGR9HsQCDGh9bQQDEEx9rUQDFFB97YQDGFR+LcQDHFh+bgQDIEB
|
||||
|
||||
角色定义:
|
||||
角色1=迪希雅|火{技能3消耗=1火骰子+2任意,技能2消耗=3火骰子,技能1消耗=4火骰子}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
},
|
||||
"蒂玛乌斯": {
|
||||
"雷神柯莱刻晴": {
|
||||
"win": 1,
|
||||
"win": 2,
|
||||
"fail": 0
|
||||
}
|
||||
},
|
||||
@@ -49,13 +49,13 @@
|
||||
},
|
||||
"瓦格纳": {
|
||||
"雷神柯莱刻晴": {
|
||||
"win": 1,
|
||||
"win": 3,
|
||||
"fail": 0
|
||||
}
|
||||
},
|
||||
"托马": {
|
||||
"雷神柯莱刻晴": {
|
||||
"win": 1,
|
||||
"win": 2,
|
||||
"fail": 0
|
||||
}
|
||||
},
|
||||
@@ -88,5 +88,17 @@
|
||||
"win": 1,
|
||||
"fail": 0
|
||||
}
|
||||
},
|
||||
"卯师傅": {
|
||||
"雷神柯莱刻晴": {
|
||||
"win": 1,
|
||||
"fail": 0
|
||||
}
|
||||
},
|
||||
"欧仁妮": {
|
||||
"雷神柯莱刻晴": {
|
||||
"win": 1,
|
||||
"fail": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user