修正cc初始化时的一些小问题
This commit is contained in:
@@ -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.
|
-- TODO you still need to switch20G() at the right time.
|
||||||
-- since it's not cc-specific I'm not dealing with it for now
|
-- since it's not cc-specific I'm not dealing with it for now
|
||||||
--[[
|
--[[
|
||||||
next: number of nexts
|
arg={
|
||||||
hold: holdable?
|
next: number of nexts
|
||||||
speedLV: level
|
hold: holdable
|
||||||
node: search nodes
|
speedLV: level
|
||||||
randomizer: random generator
|
node: search nodes
|
||||||
_20G: 20G?
|
randomizer: random generator
|
||||||
|
_20G: 20G?
|
||||||
|
}
|
||||||
]]
|
]]
|
||||||
function BOT.template(arg)
|
function BOT.template(arg)
|
||||||
if arg.type=='CC'then
|
if arg.type=='CC'then
|
||||||
if not arg.randomizer then arg.randomizer='bag' end
|
|
||||||
return{
|
return{
|
||||||
type='CC',
|
type='CC',
|
||||||
next=arg.next,
|
next=arg.next,
|
||||||
hold=arg.hold,
|
hold=arg.hold,
|
||||||
delay=AISpeed[arg.speedLV],
|
delay=AISpeed[arg.speedLV],
|
||||||
node=arg.node,
|
node=arg.node,
|
||||||
bag=arg.randomizer=='bag',
|
bag=(arg.randomizer or'bag')=='bag',
|
||||||
_20G=arg._20G,
|
_20G=arg._20G,
|
||||||
}
|
}
|
||||||
elseif arg.type=='9S'then
|
elseif arg.type=='9S'then
|
||||||
@@ -78,14 +79,14 @@ function BOT.new(P,data)
|
|||||||
bot.nexts={}
|
bot.nexts={}
|
||||||
bot.delay=data.delay
|
bot.delay=data.delay
|
||||||
bot.delay0=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 cc=LOADLIB"CCloader"
|
||||||
local opt,wei=cc.getDefaultConfig()
|
local opt,wei=cc.getDefaultConfig()
|
||||||
wei:fastWeights()
|
wei:fastWeights()
|
||||||
opt:setHold(data.hold)
|
opt:setHold(data.hold)
|
||||||
opt:set20G(data._20G)
|
opt:set20G(data._20G)
|
||||||
opt:setBag(data.bag=='bag')
|
opt:setBag(data.bag)
|
||||||
opt:setNode(data.node)
|
opt:setNode(data.node)
|
||||||
bot.ccBot=cc.launchAsync(opt,wei)
|
bot.ccBot=cc.launchAsync(opt,wei)
|
||||||
local cc_lua=require"parts.bot.bot_cc"
|
local cc_lua=require"parts.bot.bot_cc"
|
||||||
|
|||||||
Reference in New Issue
Block a user