整理代码,清除问题

This commit is contained in:
MrZ626
2020-10-19 22:40:14 +08:00
parent 4cdf3f52b5
commit df1cb2832d
40 changed files with 158 additions and 202 deletions

View File

@@ -1,7 +1,6 @@
local int,max,min=math.floor,math.max,math.min
local int,min=math.floor,math.min
local sectionName={"M7","M8","M9","M","MK","MV","MO","MM","GM"}
local function score(P)
local F=false
--If Less then MM
if P.modeData.point<70 then
local R=#P.clearedRow

View File

@@ -1,4 +1,3 @@
local int=math.floor
return{
color=color.magenta,
env={

View File

@@ -1,4 +1,4 @@
local int,min=math.floor,math.min
local min=math.min
return{
color=color.lYellow,
env={

View File

@@ -1,11 +1,4 @@
local format=string.format
local function getField()
local F={}
return F
end
local function newField(P)
end
return{
color=color.lGrey,
env={

View File

@@ -3,7 +3,7 @@ local function check_c4w(P)
if #P.clearedRow==0 then
P:lose()
else
for i=1,#P.clearedRow do
for _=1,#P.clearedRow do
P.field[#P.field+1]=freeRow.get(13)
P.visTime[#P.visTime+1]=freeRow.get(20)
for i=4,7 do P.field[#P.field][i]=0 end

View File

@@ -1,7 +1,7 @@
local min=math.min
local function check_c4w(P)
if #P.clearedRow>0 then
for i=1,#P.clearedRow do
for _=1,#P.clearedRow do
P.field[#P.field+1]=freeRow.get(13)
P.visTime[#P.visTime+1]=freeRow.get(20)
for i=4,7 do P.field[#P.field][i]=0 end

View File

@@ -1,4 +1,3 @@
local gc=love.graphics
local int=math.floor
return{
color=color.white,

View File

@@ -1,5 +1,5 @@
local function check_rise(P)
for i=1,math.min(8,100-P.stat.dig)-P.garbageBeneath do
for _=1,math.min(8,100-P.stat.dig)-P.garbageBeneath do
P:garbageRise(13,1,P:RND(10))
end
if P.stat.dig==100 then

View File

@@ -1,5 +1,5 @@
local function check_rise(P)
for i=1,math.min(8,40-P.stat.dig)-P.garbageBeneath do
for _=1,math.min(8,40-P.stat.dig)-P.garbageBeneath do
P:garbageRise(13,1,P:RND(10))
end
if P.stat.dig==40 then

View File

@@ -1,5 +1,5 @@
local function check_rise(P)
for i=1,math.min(8,400-P.stat.dig)-P.garbageBeneath do
for _=1,math.min(8,400-P.stat.dig)-P.garbageBeneath do
P:garbageRise(13,1,P:RND(10))
end
if P.stat.dig==400 then

View File

@@ -1,10 +1,10 @@
local min,rem=math.min,table.remove
local min=math.min
return{
color=color.red,
env={
drop=20,lock=60,
sequence=function(P)
for i=1,3 do P:getNext(7)end
for _=1,3 do P:getNext(7)end
end,
freshMethod=function(P)
if not P.next[1] then
@@ -34,7 +34,7 @@ return{
end
if d<40 or P.stat.row>2*42 then
A=#res+1
for i=1,4 do
for _=1,4 do
res[A]=1
res[A+1]=2
res[A+2]=6

View File

@@ -9,7 +9,7 @@ local function check_rise(P)
P:showTextF(text.great,0,-120,80,"fly",.8)
end
end
for i=1,8-L do
for _=1,8-L do
P:garbageRise(13,1,P:RND(10))
end
else
@@ -17,7 +17,7 @@ local function check_rise(P)
P:showTextF(text.awesome,0,-120,80,"beat",.6)
SFX.play("clear")
BG.send(26)
for i=1,8 do
for _=1,8 do
P:garbageRise(13,1,P:RND(10))
end
else

View File

@@ -1,4 +1,3 @@
local gc=love.graphics
return{
color=color.magenta,
env={

View File

@@ -1,4 +1,3 @@
local gc=love.graphics
return{
color=color.red,
env={

View File

@@ -1,4 +1,3 @@
local gc=love.graphics
return{
color=color.green,
env={

View File

@@ -1,5 +1,4 @@
local int=math.floor
local ins=table.insert
local pc_drop={50,45,40,35,30,26,22,18,15,12}
local pc_lock={55,50,45,40,36,32,30}
local pc_fall={18,16,14,12,10,9,8,7,6}

View File

@@ -1,5 +1,5 @@
local gc=love.graphics
local int,rnd=math.floor,math.random
local rnd=math.random
local powerUp={[0]="000%UP","025%UP","050%UP","075%UP","100%UP",}
local function selectTarget(P)
if SETTING.swap then

View File

@@ -1,5 +1,5 @@
local gc=love.graphics
local int,rnd=math.floor,math.random
local rnd=math.random
local powerUp={[0]="000%UP","025%UP","050%UP","075%UP","100%UP",}
local function selectTarget(P)
if SETTING.swap then

View File

@@ -1,5 +1,5 @@
local gc=love.graphics
local int,rnd=math.floor,math.random
local rnd=math.random
local powerUp={[0]="000%UP","025%UP","050%UP","075%UP","100%UP",}
local function selectTarget(P)
if SETTING.swap then

View File

@@ -1,5 +1,5 @@
local gc=love.graphics
local int,rnd=math.floor,math.random
local rnd=math.random
local powerUp={[0]="000%UP","025%UP","050%UP","075%UP","100%UP",}
local function selectTarget(P)
if SETTING.swap then

View File

@@ -1,5 +1,5 @@
local gc=love.graphics
local int,rnd=math.floor,math.random
local rnd=math.random
local powerUp={[0]="000%UP","025%UP","050%UP","075%UP","100%UP",}
local function selectTarget(P)
if SETTING.swap then

View File

@@ -1,5 +1,5 @@
local gc=love.graphics
local int,rnd=math.floor,math.random
local rnd=math.random
local powerUp={[0]="000%UP","025%UP","050%UP","075%UP","100%UP",}
local function selectTarget(P)
if SETTING.swap then