Skip to content

Commit

Permalink
Merge pull request icegreentee#439 from segfault-bilibili/rollup-7.2.2
Browse files Browse the repository at this point in the history
【7.2.2】开荒支持杜鹃花型地图
  • Loading branch information
segfault-bilibili committed Jun 2, 2023
2 parents 84884b3 + 47cc1c9 commit 10f1df4
Show file tree
Hide file tree
Showing 68 changed files with 110 additions and 61 deletions.
46 changes: 46 additions & 0 deletions floatUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -8529,8 +8529,11 @@ function algo_init() {
"sectionOnMapJP",
"sectionOnMapChap7JP",
"intermission",
"sectionOnMapBranchJP",
"shinnyNew",
"shinnyNewChap7",
"shinnyNewBranch",
"branchStart",
];

var loadAllImages = syncer.syn(function () {
Expand Down Expand Up @@ -10614,6 +10617,23 @@ function algo_init() {
x: 1919, y: 1079, pos: "bottom"
}
},
sectionOnMapBranchJP: {
//搜索整个地图
topLeft: {
x: 0, y: 128, pos: "top"
},
bottomRight: {
x: 1919, y: 1079, pos: "bottom"
}
},
branchStart: {
topLeft: {
x: 960, y: 540, pos: "top"
},
bottomRight: {
x: 1919, y: 1079, pos: "bottom"
}
}
};
function getButtonArea(type) {
let knownArea = knownButtonCoords[type];
Expand All @@ -10630,6 +10650,10 @@ function algo_init() {
let template = knownImgs[type];
let img = getButtonImg(screenshot, type);
let point = images.findImage(img, template, {threshold: 0.9});
if (point != null) {
let area = getButtonArea(type);
["x", "y"].forEach((axis) => point[axis] += area.topLeft[axis]);
}
log(type, point);
return point;
}
Expand Down Expand Up @@ -10679,6 +10703,10 @@ function algo_init() {
topLeft: {x: 0, y: 0, pos: "top"},
bottomRight: {x: 210, y: 150, pos: "top"}
},
sectionOnMapBranchJP: {
topLeft: {x: 0, y: 0, pos: "top"},
bottomRight: {x: 270, y: 210, pos: "top"}
},
}
const btnOffset = {
sectionOnMapJP: getConvertedAreaNoCutout({
Expand All @@ -10693,11 +10721,16 @@ function algo_init() {
topLeft: {x: 0, y: 0, pos: "top"},
bottomRight: {x: 116, y: 22, pos: "top"}
}),
sectionOnMapBranchJP: getConvertedAreaNoCutout({
topLeft: {x: 0, y: 0, pos: "top"},
bottomRight: {x: 209, y: 42, pos: "top"}
}),
}
const shinnyNewMap = {
sectionOnMapJP: "shinnyNew",
intermission: "shinnyNew",
sectionOnMapChap7JP: "shinnyNewChap7",
sectionOnMapBranchJP: "shinnyNewBranch",
}

let points = [];
Expand Down Expand Up @@ -10749,8 +10782,14 @@ function algo_init() {
}
if (point != null) {
log("found area", area);
point = {x: point.x, y: point.y, isBranch: false}; // convert to JS object
["x", "y"].forEach((axis) => point[axis] += area.topLeft[axis]);
point.x += parseInt(template.getWidth() / 2);
if (area.imgName === "sectionOnMapBranchJP") {
//杜鹃花型点NEW无反应,需要点NEW往下一点点的位置
point.y += parseInt(template.getHeight() * 2);
point.isBranch = true;
}
return true;
}
}) != null) break;
Expand Down Expand Up @@ -13095,6 +13134,13 @@ function algo_init() {
}
} else if ((newSectionOnMapPoint = findNewSectionOnMap(screenshot))) {
click(newSectionOnMapPoint);
if (newSectionOnMapPoint.isBranch) {
sleep(3000);
toast("杜鹃花型活动 暂不会点击特殊关卡(比如FREE)");
let branchStartPoint = findButton(compatCaptureScreen(), "branchStart");
if (branchStartPoint != null) click(branchStartPoint);
else log("branchStartPoint == null");
}
newSectionOnMapPoint = null;
}
sleep(1000);
Expand Down
Binary file added images/branchStart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/sectionOnMapBranchJP.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/shinnyNewBranch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"build"
],
"packageName": "top.momoe.auto",
"versionName": "7.2.1",
"versionName": "7.2.2",
"versionInfo": "",
"versionCode": 1,
"icon":"./images/icon.png",
Expand Down
2 changes: 1 addition & 1 deletion update/fileJson/13.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/14.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/15.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/16.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/17.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/18.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/19.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/20.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/21.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/22.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/23.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/24.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/25.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/26.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/27.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/28.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/29.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/30.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/31.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/32.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/33.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/34.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/35.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/36.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/37.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/38.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/39.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/40.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/41.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/42.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/43.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/44.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/45.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/46.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/47.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/48.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/49.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/50.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/51.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/52.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/53.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/54.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/55.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/56.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/57.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/58.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/59.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/60.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/61.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/62.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/63.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/64.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/65.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/66.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/67.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/68.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/69.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/fileJson/70.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions update/fileJson/71.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions update/fileJson/72.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions update/fileJson/73.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/updateList.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion update/updateList.json.sig.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
JGuj7UL3Qeh69jC7Xz5b1ch02yphj2Bk+xJAN8Bz+NHnqlU8IE7T1T681nXMeVzJVZm7yw0EqJ05HMFYVm1nxyn++3PJVqtlJ4tVCrK8bCog0RGF1VPNqAGI5tYuABL7rno43gjnV0pEn5CA+44EunaKqMeZeRwdhqJUq2NIS0enw9DqK5TTBuLuX+26wWeuQR4tqAwkFFGBIGd5A4tiXGiV1nFoiIat7LwiXE8+VGcsexp8gE0KgHk8wjCvYWBovIGJnV56zf3TXd2ZYE09WkohchFSkMqJwbnKahXk5qLJAhJ3izodY757NpDjKeV/1b4Se3Pp/ExnOYxe85PHjg==
fRTAhVaweVRhmtRNYVF999+vy4PHVScML3NTDtvhpsGi0V3+3J/yHMqxfAsIu8tQoMajLEZk5IuR1J6YVeGUiL7p0Of7fU8vhA/qWRV3IFkbz42DEhILrO/upN9FpTm3n6ZGtd5b2+2J3gnd+r/SsxyDBx8VDJZR85KbBRfD7ioAPZBxQvs+3yGdR9anV3Daddxco/QpHLHUSy1eAzWSi3cyog9OhWjYofdut5BmkvyU4K/EZ9xcEPXP0RdgAATSvp+y7aPHq8GLuIYOrneGnCvG9syggVEcxUU9FEUr80l2LAWSqD6eZT/ni0FIoP4DCImcZ5qmbbCkOhS/DC/7vw==

0 comments on commit 10f1df4

Please sign in to comment.