Skip to content

Commit

Permalink
fix: 咨询最后一人时不应划动
Browse files Browse the repository at this point in the history
  • Loading branch information
Zebartin committed May 3, 2024
1 parent 46d771d commit fd1b637
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions NIKKE/NIKKE日常.js
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,7 @@ function 特殊竞技场() {
);
if (confirm != null) {
clickRect(confirm, 1, 0);
sleep(1000);
return null;
}
let clickReward = res.find(e =>
Expand Down Expand Up @@ -1134,7 +1135,7 @@ function interceptBattle(battleBtn, checkDamage) {
return damageNumber;
}

function 拦截战() {
function 拦截战() {
const nameDict = {
火车: /(火车|古[铁鉄]|夺走|小心)/,
钻头: /(掘墓|钻头|阻止|冲击)/,
Expand Down Expand Up @@ -1257,7 +1258,7 @@ function 拦截战() {
sleep(1000);
continue;
}
indexSelected = teams.findIndex(t=>t.selected);
indexSelected = teams.findIndex(t => t.selected);
log(`当前队伍:${indexSelected + 1}`);
if (indexSelected == teamIndex)
break;
Expand Down Expand Up @@ -1339,6 +1340,10 @@ function 咨询() {
adviseCnt = adviseLimit;
log(`咨询次数限制:${adviseLimit}`);
}
if (adviseCnt == 0) {
返回首页();
return;
}
let adviseTarget = null;
let cases, attrs;
while (adviseTarget == null) {
Expand Down Expand Up @@ -1387,7 +1392,7 @@ function 咨询() {
if (res == 'ok') {
cnt++;
}
if (res != 'retry') {
if (res != 'retry' && cnt < adviseCnt) {
swipeRandom(new android.graphics.Rect(
random(width * 0.15, width * 0.35), height * 0.2,
random(width * 0.65, width * 0.85), height * 0.5
Expand Down
2 changes: 1 addition & 1 deletion NIKKE/NIKKE设置.js
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ ui.save.on("click", function () {
let todoTask = [];
for (let task of [
"基地收菜", "好友", "竞技场", "商店",
"爬塔", "拦截战", "咨询", "模拟室", "每日任务"
"爬塔", "咨询", "拦截战", "模拟室", "每日任务"
])
if (ui.findView(task).isChecked())
todoTask.push(task);
Expand Down

0 comments on commit fd1b637

Please sign in to comment.