pc训练代码整理,开局就能看到关卡并且没有提前硬降不会死的bug了
This commit is contained in:
@@ -1,35 +1,33 @@
|
||||
local pc_drop={50,45,40,35,30,26,22,18,15,12}
|
||||
local pc_lock={55,50,46,42,39,36,33,31,29,27}
|
||||
local pc_lock={55,50,46,42,40,38,36,34,32,30}
|
||||
local pc_fall={18,16,14,12,10,9,8,7,6,5}
|
||||
local PCbase=require"parts.modes.PCbase"
|
||||
local PClist=require"parts.modes.PClist"
|
||||
|
||||
local function task_PC(P)
|
||||
if P.frameRun>180 then
|
||||
P.control=false
|
||||
for _=1,26 do YIELD()end
|
||||
P.control=true
|
||||
end
|
||||
local base=PCbase[P.modeData.type]
|
||||
P:pushLineList(base[P.holeRND:random(#base)],P.modeData.symmetry)
|
||||
local difficulty=P.stat.pc<10 and 4 or 5
|
||||
local L=PClist[difficulty][P.holeRND:random(#PClist[difficulty])]
|
||||
local symmetry=P.holeRND:random()>.5
|
||||
P:pushNextList(L,symmetry)
|
||||
|
||||
P.control=false
|
||||
if P.frameRun>180 then for _=1,26 do YIELD()end end
|
||||
P.control=true
|
||||
|
||||
local base=PCbase[difficulty]
|
||||
P:pushLineList(base[P.holeRND:random(#base)],symmetry)
|
||||
end
|
||||
local function _check(P)
|
||||
local f=P.field
|
||||
if #f>0 then
|
||||
if #f+P.stat.row%4>4 then
|
||||
if #P.field>0 then
|
||||
if #P.field+P.stat.row%4>4 then
|
||||
P:lose()
|
||||
end
|
||||
else
|
||||
local type=P.stat.pc<10 and 4 or 5
|
||||
local L=PClist[type][P.holeRND:random(#PClist[type])]
|
||||
local symmetry=P.holeRND:random()>.5
|
||||
P.modeData.type=type
|
||||
P.modeData.symmetry=symmetry
|
||||
P:pushNextList(L,symmetry)
|
||||
P:newTask(task_PC)
|
||||
if P.frameRun<180 then P.fieldBeneath=0 end
|
||||
|
||||
local s=P.stat.pc*.25
|
||||
if math.floor(s)==s and s>0 then
|
||||
if P.stat.pc%4==0 and P.stat.pc>0 then
|
||||
local s=P.stat.pc/4
|
||||
P.gameEnv.drop=pc_drop[s]or 10
|
||||
P.gameEnv.lock=pc_lock[s]or 25
|
||||
P.gameEnv.fall=pc_fall[s]or 4
|
||||
|
||||
@@ -8,26 +8,26 @@ local PCtype={
|
||||
1,2,3,
|
||||
}
|
||||
local function task_PC(P)
|
||||
local difficulty=PCtype[P.stat.pc+1]or 3
|
||||
local L=PClist[difficulty][P.holeRND:random(#PClist[difficulty])]
|
||||
local symmetry=P.holeRND:random()>.5
|
||||
P:pushNextList(L,symmetry)
|
||||
|
||||
P.control=false
|
||||
for _=1,26 do YIELD()end
|
||||
if P.frameRun>180 then for _=1,26 do YIELD()end end
|
||||
P.control=true
|
||||
local base=PCbase[P.modeData.type]
|
||||
P:pushLineList(base[P.holeRND:random(#base)],P.modeData.symmetry)
|
||||
|
||||
local base=PCbase[difficulty]
|
||||
P:pushLineList(base[P.holeRND:random(#base)],symmetry)
|
||||
end
|
||||
local function _check(P)
|
||||
local r=P.field
|
||||
if #r>0 then
|
||||
if #r+P.stat.row%4>4 then
|
||||
if #P.field>0 then
|
||||
if #P.field+P.stat.row%4>4 then
|
||||
P:lose()
|
||||
end
|
||||
else
|
||||
local type=PCtype[P.stat.pc+1]or 3
|
||||
local L=PClist[type][P.holeRND:random(#PClist[type])]
|
||||
local symmetry=P.holeRND:random()>.5
|
||||
P.modeData.type=type
|
||||
P.modeData.symmetry=symmetry
|
||||
P:pushNextList(L,symmetry)
|
||||
P:newTask(task_PC)
|
||||
if P.frameRun<180 then P.fieldBeneath=0 end
|
||||
end
|
||||
end
|
||||
return{
|
||||
|
||||
Reference in New Issue
Block a user