Skip to content

Commit

Permalink
Merge pull request #6 from AgainstEntropy/develop
Browse files Browse the repository at this point in the history
v0.6.4
  • Loading branch information
AgainstEntropy authored May 2, 2022
2 parents 174f6a3 + 4a4360c commit b1f4d38
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 23 deletions.
41 changes: 23 additions & 18 deletions PRTS-apk_files/PRTS.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

//变量初始化
var debug = true;
var ver = "0.6.3";
var ver = "0.6.4";
var err = 1;
var sys_lang = "cn";
var thread_play_isAlive = 0;
Expand Down Expand Up @@ -466,21 +466,24 @@ function watchImg(img, img_name, config) {
}

// 检查关卡
function check_function(img, func_name) {
var p = images.findImage(captureScreen(), img);
sleep(100);
if (p) {
window_header.title.setText(`正常${func_name}`);
sleep(1000);
ui.run(() => {
set_window_status(0); // 隐藏菜单
})
} else {
window_header.title.setText(`无法${func_name}`);
sleep(1000);
thread_stop();
sleep(200);
function check(imgs) {
var p;
for (var i = 0; i < imgs.length; i++) {
p = images.findImage(captureScreen(), imgs[i]);
sleep(100);
if (p) {
window_header.title.setText(`检测到开始按钮`);
sleep(1000);
ui.run(() => {
set_window_status(0); // 隐藏菜单
})
return imgs[i];
}
}
window_header.title.setText(`无法检测关卡`);
sleep(1000);
thread_stop();
sleep(200);
}

//代理线程
Expand All @@ -490,6 +493,7 @@ function play(num) {

// 读取图片
var img_start_blue = images.read("res/img/开始行动蓝.jpg");
var img_start_3rd = images.read("res/img/开始行动(三周年).jpg");
var img_start_red = images.read("res/img/开始行动红.jpg");
var img_takeover = images.read("res/img/接管作战.jpg");
var img_cost = images.read("res/img/cost.jpg");
Expand All @@ -501,10 +505,10 @@ function play(num) {
var b = device.getBrightness();
device.setBrightnessMode(0); // 亮度设为手动模式

check_function(img_start_blue, "识别关卡");
var img_start = check([img_start_blue, img_start_3rd]);

for (var i = 1; i <= num; i++) {
p_red = clickImg1_until_findImg2(img_start_blue, img_start_red, "开始行动", "红色开始行动",
p_red = clickImg1_until_findImg2(img_start, img_start_red, "开始行动", "红色开始行动",
config = {
verbose: true
});
Expand Down Expand Up @@ -533,14 +537,15 @@ function play(num) {
// watchImg1_until_clickImg2(img_cost, img_over, "费用", "行动结束");

// 等待蓝色开始按钮出现
wait_until_findImg(img_start_blue, "蓝色开始行动",
wait_until_findImg(img_start, "开始行动",
config = {
final_click: false
});
if (err > 5) { break; }
}
// 回收所有图片
img_start_blue.recycle();
img_start_3rd.recycle();
img_start_red.recycle();
img_takeover.recycle();
img_cost.recycle();
Expand Down
4 changes: 2 additions & 2 deletions PRTS-apk_files/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"stableMode": false
},
"main": "PRTS.js",
"name": "PRTS v0.6.2",
"name": "PRTS v0.6.4",
"optimization": {
"removeAccessibilityService": false,
"removeOpenCv": false,
Expand All @@ -33,5 +33,5 @@
},
"scripts": {},
"versionCode": 1,
"versionName": "0.6.2"
"versionName": "0.6.4"
}
Binary file modified PRTS-apk_files/res/img/开始行动红.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 PRTS-apk_files/res/img/新开始行动红.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# PRTS

![GitHub-license](https://img.shields.io/github/license/AgainstEntropy/PRTS)
![Github-status](https://img.shields.io/badge/release-v0.6.3-blue)
![Github-status](https://img.shields.io/badge/release-v0.6.4-blue)

## 当前发布版本功能

Expand All @@ -17,12 +17,14 @@

## 较上版本更改内容

:bug: 修复由于作战结束页面UI迭代而导致的自动代理失败
🐛 修复由于周年庆活动开始按钮UI改变导致的无法代理

## 下版本预更新内容
## 后续版本预更新内容

⬜ ✨ 增加一些自定义选项,如:是否自动变暗等......具体功能待定......

⬜ 🐛 增加多种分辨率图库,修复由于分辨率导致的无法代理

## 使用说明

### 【权限说明】
Expand Down
Binary file added other files/三周年庆活动.jpg
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 other files/新版红色开始.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b1f4d38

Please sign in to comment.