From de1a1cbe9a03b093ceb1f8a0996acfbf63112d96 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 26 Aug 2021 15:19:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3cc=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E6=97=B6=E7=9A=84=E4=B8=80=E4=BA=9B=E5=B0=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/bot/init.lua | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/parts/bot/init.lua b/parts/bot/init.lua index d4637da2..f502df18 100644 --- a/parts/bot/init.lua +++ b/parts/bot/init.lua @@ -42,23 +42,24 @@ local AISpeed={60,50,40,30,20,14,10,6,4,3} -- TODO you still need to switch20G() at the right time. -- since it's not cc-specific I'm not dealing with it for now --[[ - next: number of nexts - hold: holdable? - speedLV: level - node: search nodes - randomizer: random generator - _20G: 20G? + arg={ + next: number of nexts + hold: holdable + speedLV: level + node: search nodes + randomizer: random generator + _20G: 20G? + } ]] function BOT.template(arg) if arg.type=='CC'then - if not arg.randomizer then arg.randomizer='bag' end return{ type='CC', next=arg.next, hold=arg.hold, delay=AISpeed[arg.speedLV], node=arg.node, - bag=arg.randomizer=='bag', + bag=(arg.randomizer or'bag')=='bag', _20G=arg._20G, } elseif arg.type=='9S'then @@ -78,14 +79,14 @@ function BOT.new(P,data) bot.nexts={} bot.delay=data.delay bot.delay0=data.delay - if P.gameEnv.holdCount and P.gameEnv.holdCount>1 then P:setHold(1)end + if P.gameEnv.holdCount>1 then P:setHold(1)end local cc=LOADLIB"CCloader" local opt,wei=cc.getDefaultConfig() wei:fastWeights() opt:setHold(data.hold) opt:set20G(data._20G) - opt:setBag(data.bag=='bag') + opt:setBag(data.bag) opt:setNode(data.node) bot.ccBot=cc.launchAsync(opt,wei) local cc_lua=require"parts.bot.bot_cc"