Files
Techmino/parts/modes/custom_clear.lua
MrZ626 d932a0a990 修正解除自定义场地绘制高度限制后出现的其他衍生问题
“自定义场地页面”使用元表实现自动补充尺寸(编辑之后需要手动清空多余空行,目前仅一处)
2021-10-06 22:27:02 +08:00

27 lines
827 B
Lua

return{
color=COLOR.white,
env={},
load=function()
applyCustomGame()
--Switch clear sprint mode on
if #FIELD[1]>0 then
GAME.modeEnv.dropPiece=require'parts.eventsets.checkClearBoard'.dropPiece
else
GAME.modeEnv.dropPiece=NULL
end
PLY.newPlayer(1)
local AItype=GAME.modeEnv.opponent:sub(1,2)
local AIlevel=tonumber(GAME.modeEnv.opponent:sub(-1))
if AItype=='9S'then
PLY.newAIPlayer(2,BOT.template{type='9S',speedLV=2*AIlevel,hold=true})
elseif AItype=='CC'then
PLY.newAIPlayer(2,BOT.template{type='CC',speedLV=2*AIlevel-1,next=math.floor(AIlevel*.5+1),hold=true,node=20000+5000*AIlevel})
end
for _,P in next,PLY_ALIVE do
setField(P,1)
end
end,
}