From fd1b637373c1b0268aa985a385389c8e665336b2 Mon Sep 17 00:00:00 2001 From: Zebartin <16185081+Zebartin@users.noreply.github.com> Date: Fri, 3 May 2024 22:55:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=92=A8=E8=AF=A2=E6=9C=80=E5=90=8E?= =?UTF-8?q?=E4=B8=80=E4=BA=BA=E6=97=B6=E4=B8=8D=E5=BA=94=E5=88=92=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "NIKKE/NIKKE\346\227\245\345\270\270.js" | 11 ++++++++--- "NIKKE/NIKKE\350\256\276\347\275\256.js" | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git "a/NIKKE/NIKKE\346\227\245\345\270\270.js" "b/NIKKE/NIKKE\346\227\245\345\270\270.js" index 5f13965..16c9e99 100644 --- "a/NIKKE/NIKKE\346\227\245\345\270\270.js" +++ "b/NIKKE/NIKKE\346\227\245\345\270\270.js" @@ -949,6 +949,7 @@ function 特殊竞技场() { ); if (confirm != null) { clickRect(confirm, 1, 0); + sleep(1000); return null; } let clickReward = res.find(e => @@ -1134,7 +1135,7 @@ function interceptBattle(battleBtn, checkDamage) { return damageNumber; } -function 拦截战() { +function 拦截战() { const nameDict = { 火车: /(火车|古[铁鉄]|夺走|小心)/, 钻头: /(掘墓|钻头|阻止|冲击)/, @@ -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; @@ -1339,6 +1340,10 @@ function 咨询() { adviseCnt = adviseLimit; log(`咨询次数限制:${adviseLimit}`); } + if (adviseCnt == 0) { + 返回首页(); + return; + } let adviseTarget = null; let cases, attrs; while (adviseTarget == null) { @@ -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 diff --git "a/NIKKE/NIKKE\350\256\276\347\275\256.js" "b/NIKKE/NIKKE\350\256\276\347\275\256.js" index 6d709c9..286e073 100644 --- "a/NIKKE/NIKKE\350\256\276\347\275\256.js" +++ "b/NIKKE/NIKKE\350\256\276\347\275\256.js" @@ -614,7 +614,7 @@ ui.save.on("click", function () { let todoTask = []; for (let task of [ "基地收菜", "好友", "竞技场", "商店", - "爬塔", "拦截战", "咨询", "模拟室", "每日任务" + "爬塔", "咨询", "拦截战", "模拟室", "每日任务" ]) if (ui.findView(task).isChecked()) todoTask.push(task);