优化spin模式并加到大地图,微调相关区域布局
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
---@param RND RandomGenerator
|
||||
local skip
|
||||
---@param RND love.RandomGenerator
|
||||
local function randomizer(RND)
|
||||
local last=RND:random(2)==1 and 1 or 4
|
||||
local function get_next()
|
||||
@@ -26,15 +27,21 @@ local function randomizer(RND)
|
||||
end
|
||||
end
|
||||
local lines={
|
||||
{1,2,3,4,0,0,5,6,7,8},
|
||||
{7,6,5,0,0,0,4,3,2,1},
|
||||
{1,2,3,4,0,0,0,5,6,7},
|
||||
{7,6,5,0,0,0,0,4,3,2}
|
||||
{1,1,1,1,0,0,1,1,1,1},
|
||||
{1,1,1,0,0,0,1,1,1,1},
|
||||
{1,1,1,1,0,0,0,1,1,1},
|
||||
{1,1,1,0,0,0,0,1,1,1}
|
||||
}
|
||||
local function get_lines(n,f)
|
||||
local function get_lines(n,P)
|
||||
local ret={}
|
||||
for _=1,n do
|
||||
table.insert(ret,lines[f()])
|
||||
local L=TABLE.shift(lines[P.randomizer_spinren()])
|
||||
for i=1,#L do
|
||||
if L[i]==1 then
|
||||
L[i]=P.modeData.colorSet[P.holeRND:random(4)]
|
||||
end
|
||||
end
|
||||
table.insert(ret,L)
|
||||
end
|
||||
return ret
|
||||
end
|
||||
@@ -42,25 +49,33 @@ end
|
||||
return {
|
||||
load=function()
|
||||
PLY.newPlayer(1)
|
||||
local our=PLY_ALIVE[1]
|
||||
our.randomizer_spinren=randomizer(our.holeRND)
|
||||
our:pushLineList(get_lines(20,our.randomizer_spinren))
|
||||
local P=PLY_ALIVE[1]
|
||||
P.modeData.colorSet={}
|
||||
for i=1,4 do
|
||||
P.modeData.colorSet[i]=P.holeRND:random(25)
|
||||
end
|
||||
P.randomizer_spinren=randomizer(P.holeRND)
|
||||
P:pushLineList(get_lines(20,P))
|
||||
P.fieldBeneath=0
|
||||
end,
|
||||
env={
|
||||
lock=1e99,
|
||||
drop=1e99,
|
||||
minsdarr=4,
|
||||
infHold=true,
|
||||
highCam=false,
|
||||
bgm='lounge',
|
||||
eventSet='sprintEff_40',
|
||||
hook_drop=function(P)
|
||||
if P.lastPiece.row==0 then
|
||||
P:win('finish')
|
||||
end
|
||||
local up=MATH.clamp(20-P.stat.row+P.lastPiece.row,0,P.lastPiece.row)
|
||||
P:pushLineList(get_lines(up,P.randomizer_spinren))
|
||||
P:pushLineList(get_lines(up,P))
|
||||
end
|
||||
},
|
||||
score=function(P) return {P.stat.atk/P.stat.row,P.stat.time} end,
|
||||
scoreDisp=function(D) return string.format("%.3f",D[1]).." Efficiency "..STRING.time(D[2]) end,
|
||||
scoreDisp=function(D) return ("%.2f"):format(D[1]).." Efficiency "..STRING.time(D[2]) end,
|
||||
comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
|
||||
getRank=function(P)
|
||||
if P.stat.row<10 then return end
|
||||
@@ -73,4 +88,4 @@ return {
|
||||
E>=3 and 1 or
|
||||
0
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user