整 理 代 码

(应该没有改到字符串里面的东西吧…)起码不直接影响运行
This commit is contained in:
MrZ_26
2022-10-01 11:32:11 +08:00
parent 6e00ff96ec
commit 06f4bb4e1a
236 changed files with 2087 additions and 2114 deletions

124
main.lua
View File

@@ -16,15 +16,15 @@
--Var leak check --Var leak check
-- setmetatable(_G,{__newindex=function(self,k,v)print('>>'..k..string.rep(" ",26-#k),debug.traceback():match("\n.-\n\t(.-): "))rawset(self,k,v)end}) -- setmetatable(_G,{__newindex=function(self,k,v) print('>>'..k..string.rep(" ",26-#k),debug.traceback():match("\n.-\n\t(.-): "))rawset(self,k,v) end})
--System Global Vars Declaration --System Global Vars Declaration
local fs=love.filesystem local fs=love.filesystem
VERSION=require"version" VERSION=require"version"
TIME=love.timer.getTime TIME=love.timer.getTime
SYSTEM=love.system.getOS()if SYSTEM=='OS X'then SYSTEM='macOS'end SYSTEM=love.system.getOS() if SYSTEM=='OS X' then SYSTEM='macOS' end
FNNS=SYSTEM:find'\79\83'--What does FNSF stand for? IDK so don't ask me lol FNNS=SYSTEM:find'\79\83'--What does FNSF stand for? IDK so don't ask me lol
MOBILE=SYSTEM=='Android'or SYSTEM=='iOS' MOBILE=SYSTEM=='Android' or SYSTEM=='iOS'
--Global Vars & Settings --Global Vars & Settings
SFXPACKS={'chiptune'} SFXPACKS={'chiptune'}
@@ -60,7 +60,7 @@ BGM.setMaxSources(5)
VOC.setDiversion(.62) VOC.setDiversion(.62)
WIDGET.setOnChange(function() WIDGET.setOnChange(function()
if SCN.cur~='custom_field'then if SCN.cur~='custom_field' then
local colorList=THEME.getThemeColor() local colorList=THEME.getThemeColor()
if not colorList then return end if not colorList then return end
local rnd=math.random local rnd=math.random
@@ -88,11 +88,11 @@ string.split=STRING.split
FILE.clear('') FILE.clear('')
--Create directories --Create directories
for _,v in next,{'conf','record','replay','cache','lib'}do for _,v in next,{'conf','record','replay','cache','lib'} do
local info=fs.getInfo(v) local info=fs.getInfo(v)
if not info then if not info then
fs.createDirectory(v) fs.createDirectory(v)
elseif info.type~='directory'then elseif info.type~='directory' then
fs.remove(v) fs.remove(v)
fs.createDirectory(v) fs.createDirectory(v)
end end
@@ -104,8 +104,8 @@ require'parts.gameFuncs'
--Load shader files from SOURCE ONLY --Load shader files from SOURCE ONLY
SHADER={} SHADER={}
for _,v in next,fs.getDirectoryItems('parts/shaders')do for _,v in next,fs.getDirectoryItems('parts/shaders') do
if FILE.isSafe('parts/shaders/'..v)then if FILE.isSafe('parts/shaders/'..v) then
local name=v:sub(1,-6) local name=v:sub(1,-6)
SHADER[name]=love.graphics.newShader('parts/shaders/'..name..'.glsl') SHADER[name]=love.graphics.newShader('parts/shaders/'..name..'.glsl')
end end
@@ -155,14 +155,14 @@ do--Z.setCursor
_=DSCP[R][0] _=DSCP[R][0]
GC.draw(TEXTURE.miniBlock[R],x,y,time%math.pi*4,8,8,2*_[2]+1,2*(#BLOCKS[R][0]-_[1])-1) GC.draw(TEXTURE.miniBlock[R],x,y,time%math.pi*4,8,8,2*_[2]+1,2*(#BLOCKS[R][0]-_[1])-1)
GC.setColor(1,1,1) GC.setColor(1,1,1)
GC.draw(love.mouse.isDown(1)and holdImg or normImg,x,y,nil,nil,nil,8,8) GC.draw(love.mouse.isDown(1) and holdImg or normImg,x,y,nil,nil,nil,8,8)
end end
end) end)
end end
Z.setOnFnKeys({ Z.setOnFnKeys({
function()MES.new('check',PROFILE.switch()and"profile start!"or"profile report copied!")end, function() MES.new('check',PROFILE.switch() and "profile start!" or "profile report copied!") end,
function()MES.new('info',("System:%s[%s]\nluaVer:%s\njitVer:%s\njitVerNum:%s"):format(SYSTEM,jit.arch,_VERSION,jit.version,jit.version_num))end, function() MES.new('info',("System:%s[%s]\nluaVer:%s\njitVer:%s\njitVerNum:%s"):format(SYSTEM,jit.arch,_VERSION,jit.version,jit.version_num)) end,
function()MES.new('error',"挂了")end, function() MES.new('error',"挂了") end,
function() function()
if GAME.playing and not GAME.net then if GAME.playing and not GAME.net then
for _=1,8 do for _=1,8 do
@@ -174,9 +174,9 @@ Z.setOnFnKeys({
end end
end end
end, end,
function()print(BG.locked)end, function() print(BG.locked) end,
function()for k,v in next,_G do print(k,v)end end, function() for k,v in next,_G do print(k,v) end end,
function()if love['_openConsole']then love['_openConsole']()end end, function() if love['_openConsole'] then love['_openConsole']() end end,
}) })
Z.setOnGlobalKey('f11',function() Z.setOnGlobalKey('f11',function()
SETTING.fullscreen=not SETTING.fullscreen SETTING.fullscreen=not SETTING.fullscreen
@@ -218,7 +218,7 @@ do--Z.setOnFocus
TASK.new(task_autoSoundOn) TASK.new(task_autoSoundOn)
end end
else else
if SCN.cur=='game'and SETTING.autoPause then if SCN.cur=='game' and SETTING.autoPause then
pauseGame() pauseGame()
end end
if SETTING.autoMute and SCN.cur~='music' then if SETTING.autoMute and SCN.cur~='music' then
@@ -232,13 +232,13 @@ Z.setOnQuit(destroyPlayers)
--Load settings and statistics --Load settings and statistics
if if
not( not (
pcall(TABLE.cover, loadFile('conf/user', '-json -canSkip')or loadFile('conf/user', '-luaon -canSkip')or{},USER) and pcall(TABLE.cover, loadFile('conf/user', '-json -canSkip') or loadFile('conf/user', '-luaon -canSkip') or{},USER) and
pcall(TABLE.cover, loadFile('conf/unlock', '-json -canSkip')or loadFile('conf/unlock', '-luaon -canSkip')or{},RANKS) and pcall(TABLE.cover, loadFile('conf/unlock', '-json -canSkip') or loadFile('conf/unlock', '-luaon -canSkip') or{},RANKS) and
pcall(TABLE.update,loadFile('conf/settings', '-json -canSkip')or loadFile('conf/settings', '-luaon -canSkip')or{},SETTING) and pcall(TABLE.update,loadFile('conf/settings', '-json -canSkip') or loadFile('conf/settings', '-luaon -canSkip') or{},SETTING) and
pcall(TABLE.coverR,loadFile('conf/data', '-json -canSkip')or loadFile('conf/data', '-luaon -canSkip')or{},STAT) and pcall(TABLE.coverR,loadFile('conf/data', '-json -canSkip') or loadFile('conf/data', '-luaon -canSkip') or{},STAT) and
pcall(TABLE.cover, loadFile('conf/key', '-json -canSkip')or loadFile('conf/key', '-luaon -canSkip')or{},KEY_MAP) and pcall(TABLE.cover, loadFile('conf/key', '-json -canSkip') or loadFile('conf/key', '-luaon -canSkip') or{},KEY_MAP) and
pcall(TABLE.cover, loadFile('conf/virtualkey','-json -canSkip')or loadFile('conf/virtualkey','-luaon -canSkip')or{},VK_ORG) pcall(TABLE.cover, loadFile('conf/virtualkey','-json -canSkip') or loadFile('conf/virtualkey','-luaon -canSkip') or{},VK_ORG)
) )
then then
MES.new('error',"An error occured during loading, and some data was lost.") MES.new('error',"An error occured during loading, and some data was lost.")
@@ -351,8 +351,8 @@ SKIN.load{
--Initialize sound libs --Initialize sound libs
SFX.init((function()--[Warning] Not loading files here, just get the list of sound needed SFX.init((function()--[Warning] Not loading files here, just get the list of sound needed
local L={} local L={}
for _,v in next,fs.getDirectoryItems('media/effect/chiptune/')do for _,v in next,fs.getDirectoryItems('media/effect/chiptune/') do
if FILE.isSafe('media/effect/chiptune/'..v,"Dangerous file : %SAVE%/media/effect/chiptune/"..v)then if FILE.isSafe('media/effect/chiptune/'..v,"Dangerous file : %SAVE%/media/effect/chiptune/"..v) then
table.insert(L,v:sub(1,-5)) table.insert(L,v:sub(1,-5))
end end
end end
@@ -360,8 +360,8 @@ SFX.init((function()--[Warning] Not loading files here, just get the list of sou
end)()) end)())
BGM.init((function() BGM.init((function()
local L={} local L={}
for _,v in next,fs.getDirectoryItems('media/music')do for _,v in next,fs.getDirectoryItems('media/music') do
if FILE.isSafe('media/music/'..v,"Dangerous file : %SAVE%/media/music/"..v)then if FILE.isSafe('media/music/'..v,"Dangerous file : %SAVE%/media/music/"..v) then
L[v:sub(1,-5)]='media/music/'..v L[v:sub(1,-5)]='media/music/'..v
end end
end end
@@ -398,9 +398,9 @@ LANG.init('zh',
block=BLOCK_NAMES block=BLOCK_NAMES
}, },
(function() (function()
local tipMeta={__call=function(L)return L[math.random(#L)]end} local tipMeta={__call=function(L) return L[math.random(#L)] end}
return function(L) return function(L)
if type(rawget(L,'getTip'))=='table'then setmetatable(L.getTip,tipMeta)end if type(rawget(L,'getTip'))=='table' then setmetatable(L.getTip,tipMeta) end
setmetatable(L,{__index=function(self,k) setmetatable(L,{__index=function(self,k)
local mes="No Text ("..SETTING.locale.."): "..k local mes="No Text ("..SETTING.locale.."): "..k
LOG(mes) LOG(mes)
@@ -415,16 +415,16 @@ LANG.init('zh',
table.insert(_LOADTIMELIST_,("Initialize Parts: %.3fs"):format(TIME()-_LOADTIME_)) table.insert(_LOADTIMELIST_,("Initialize Parts: %.3fs"):format(TIME()-_LOADTIME_))
--Load background files from SOURCE ONLY --Load background files from SOURCE ONLY
for _,v in next,fs.getDirectoryItems('parts/backgrounds')do for _,v in next,fs.getDirectoryItems('parts/backgrounds') do
if FILE.isSafe('parts/backgrounds/'..v)and v:sub(-3)=='lua'then if FILE.isSafe('parts/backgrounds/'..v) and v:sub(-3)=='lua' then
local name=v:sub(1,-5) local name=v:sub(1,-5)
BG.add(name,require('parts.backgrounds.'..name)) BG.add(name,require('parts.backgrounds.'..name))
end end
end end
BG.remList('none')BG.remList('gray')BG.remList('custom') BG.remList('none')BG.remList('gray')BG.remList('custom')
--Load scene files from SOURCE ONLY --Load scene files from SOURCE ONLY
for _,v in next,fs.getDirectoryItems('parts/scenes')do for _,v in next,fs.getDirectoryItems('parts/scenes') do
if FILE.isSafe('parts/scenes/'..v)then if FILE.isSafe('parts/scenes/'..v) then
local sceneName=v:sub(1,-5) local sceneName=v:sub(1,-5)
SCN.add(sceneName,require('parts.scenes.'..sceneName)) SCN.add(sceneName,require('parts.scenes.'..sceneName))
LANG.addScene(sceneName) LANG.addScene(sceneName)
@@ -433,13 +433,13 @@ end
--Load mode files --Load mode files
for i=1,#MODES do for i=1,#MODES do
local m=MODES[i]--Mode template local m=MODES[i]--Mode template
if FILE.isSafe('parts/modes/'..m.name)then if FILE.isSafe('parts/modes/'..m.name) then
TABLE.complete(require('parts.modes.'..m.name),MODES[i]) TABLE.complete(require('parts.modes.'..m.name),MODES[i])
MODES[m.name],MODES[i]=MODES[i] MODES[m.name],MODES[i]=MODES[i]
end end
end end
for _,v in next,fs.getDirectoryItems('parts/modes')do for _,v in next,fs.getDirectoryItems('parts/modes') do
if FILE.isSafe('parts/modes/'..v)and not MODES[v:sub(1,-5)]then if FILE.isSafe('parts/modes/'..v) and not MODES[v:sub(1,-5)] then
local M={name=v:sub(1,-5)} local M={name=v:sub(1,-5)}
local modeData=require('parts.modes.'..M.name) local modeData=require('parts.modes.'..M.name)
if modeData.env then if modeData.env then
@@ -455,10 +455,10 @@ table.insert(_LOADTIMELIST_,("Load Files: %.3fs"):format(TIME()-_LOADTIME_))
do do
local needSave local needSave
if not fs.getInfo('conf/data')then if not fs.getInfo('conf/data') then
needSave=true needSave=true
end end
if type(STAT.version)~='number'then if type(STAT.version)~='number' then
STAT.version=0 STAT.version=0
needSave=true needSave=true
end end
@@ -471,10 +471,10 @@ do
end end
if STAT.version==1506 then if STAT.version==1506 then
local temp1,temp2 local temp1,temp2
if fs.getInfo('record/master_l.rec')then if fs.getInfo('record/master_l.rec') then
temp1=fs.read('record/master_l.rec') temp1=fs.read('record/master_l.rec')
end end
if fs.getInfo('record/master_u.rec')then if fs.getInfo('record/master_u.rec') then
temp2=fs.read('record/master_u.rec') temp2=fs.read('record/master_u.rec')
end end
if temp1 then if temp1 then
@@ -534,16 +534,16 @@ do
end end
if STAT.version~=VERSION.code then if STAT.version~=VERSION.code then
for k,v in next,MODE_UPDATE_MAP do for k,v in next,MODE_UPDATE_MAP do
if RANKS[k]then if RANKS[k] then
RANKS[v]=RANKS[k] RANKS[v]=RANKS[k]
RANKS[k]=nil RANKS[k]=nil
end end
k='record/'..k k='record/'..k
if fs.getInfo(k..'.dat')then if fs.getInfo(k..'.dat') then
fs.write('record/'..v..'.rec',fs.read(k..'.dat')) fs.write('record/'..v..'.rec',fs.read(k..'.dat'))
fs.remove(k..'.dat') fs.remove(k..'.dat')
end end
if fs.getInfo(k..'.rec')then if fs.getInfo(k..'.rec') then
fs.write('record/'..v..'.rec',fs.read(k..'.rec')) fs.write('record/'..v..'.rec',fs.read(k..'.rec'))
fs.remove(k..'.rec') fs.remove(k..'.rec')
end end
@@ -554,12 +554,12 @@ do
SETTING.appLock,SETTING.dataSaving,SETTING.swap,SETTING.autoLogin=nil SETTING.appLock,SETTING.dataSaving,SETTING.swap,SETTING.autoLogin=nil
if not SETTING.VKSkin then SETTING.VKSkin=1 end if not SETTING.VKSkin then SETTING.VKSkin=1 end
for _,v in next,SETTING.skin do if v<1 or v>17 then v=17 end end for _,v in next,SETTING.skin do if v<1 or v>17 then v=17 end end
if not RSlist[SETTING.RS]then SETTING.RS='TRS'end if not RSlist[SETTING.RS] then SETTING.RS='TRS' end
if SETTING.ghostType=='greyCell'then SETTING.ghostType='grayCell'end if SETTING.ghostType=='greyCell' then SETTING.ghostType='grayCell' end
if type(SETTING.skinSet)=='number'then SETTING.skinSet='crystal_scf'end if type(SETTING.skinSet)=='number' then SETTING.skinSet='crystal_scf' end
if not TABLE.find({8,10,13,17,22,29,37,47,62,80,100},SETTING.frameMul)then SETTING.frameMul=100 end if not TABLE.find({8,10,13,17,22,29,37,47,62,80,100},SETTING.frameMul) then SETTING.frameMul=100 end
if SETTING.cv then SETTING.vocPack,SETTING.cv=SETTING.cv end if SETTING.cv then SETTING.vocPack,SETTING.cv=SETTING.cv end
if type(SETTING.bg)~='string'then SETTING.bg='on'end if type(SETTING.bg)~='string' then SETTING.bg='on' end
if SETTING.skin[18]==10 then SETTING.skin[18]=4 end if SETTING.skin[18]==10 then SETTING.skin[18]=4 end
if SETTING.reTime>3 or SETTING.reTime<.5 then SETTING.reTime=2 end if SETTING.reTime>3 or SETTING.reTime<.5 then SETTING.reTime=2 end
if SETTING.locale=='zh_full' then SETTING.locale='zh' end if SETTING.locale=='zh_full' then SETTING.locale='zh' end
@@ -571,26 +571,26 @@ do
if RANKS.master_u then RANKS.master_h,RANKS.master_u=RANKS.master_u needSave=true end if RANKS.master_u then RANKS.master_h,RANKS.master_u=RANKS.master_u needSave=true end
for _,v in next,VK_ORG do v.color=nil end for _,v in next,VK_ORG do v.color=nil end
for name,rank in next,RANKS do for name,rank in next,RANKS do
if type(name)=='number'or type(rank)~='number'then if type(name)=='number' or type(rank)~='number' then
RANKS[name]=nil RANKS[name]=nil
needSave=true needSave=true
else else
local M=MODES[name] local M=MODES[name]
if M and M.unlock and rank>0 then if M and M.unlock and rank>0 then
for _,unlockName in next,M.unlock do for _,unlockName in next,M.unlock do
if not RANKS[unlockName]then if not RANKS[unlockName] then
RANKS[unlockName]=0 RANKS[unlockName]=0
needSave=true needSave=true
end end
end end
end end
if not(M and M.x)then if not (M and M.x) then
RANKS[name]=nil RANKS[name]=nil
needSave=true needSave=true
end end
end end
end end
if not MODES[STAT.lastPlay]then if not MODES[STAT.lastPlay] then
STAT.lastPlay='sprint_10l' STAT.lastPlay='sprint_10l'
needSave=true needSave=true
end end
@@ -615,14 +615,14 @@ end
applySettings() applySettings()
--Load replays --Load replays
for _,fileName in next,fs.getDirectoryItems('replay')do for _,fileName in next,fs.getDirectoryItems('replay') do
if fileName:sub(12,12):match("[a-zA-Z]")then if fileName:sub(12,12):match("[a-zA-Z]") then
local date,mode,version,player,seed,setting,mod local date,mode,version,player,seed,setting,mod
local fileData=fs.read('replay/'..fileName) local fileData=fs.read('replay/'..fileName)
date, fileData=STRING.readLine(fileData)date=date:gsub("[a-zA-Z]","") date, fileData=STRING.readLine(fileData)date=date:gsub("[a-zA-Z]","")
mode, fileData=STRING.readLine(fileData)mode=MODE_UPDATE_MAP[mode]or mode mode, fileData=STRING.readLine(fileData)mode=MODE_UPDATE_MAP[mode] or mode
version,fileData=STRING.readLine(fileData) version,fileData=STRING.readLine(fileData)
player, fileData=STRING.readLine(fileData)if player=="Local Player"then player="Stacker"end player, fileData=STRING.readLine(fileData) if player=="Local Player" then player="Stacker" end
local success local success
success,fileData=pcall(love.data.decompress,'string','zlib',fileData) success,fileData=pcall(love.data.decompress,'string','zlib',fileData)
if not success then goto BREAK_cannotParse end if not success then goto BREAK_cannotParse end
@@ -658,16 +658,16 @@ for _,fileName in next,fs.getDirectoryItems('replay')do
local rep=DATA.parseReplay('replay/'..fileName) local rep=DATA.parseReplay('replay/'..fileName)
table.insert(REPLAY,rep) table.insert(REPLAY,rep)
end end
table.sort(REPLAY,function(a,b)return a.fileName>b.fileName end) table.sort(REPLAY,function(a,b) return a.fileName>b.fileName end)
table.insert(_LOADTIMELIST_,("Initialize Data: %.3fs"):format(TIME()-_LOADTIME_)) table.insert(_LOADTIMELIST_,("Initialize Data: %.3fs"):format(TIME()-_LOADTIME_))
for i=1,#_LOADTIMELIST_ do LOG(_LOADTIMELIST_[i])end for i=1,#_LOADTIMELIST_ do LOG(_LOADTIMELIST_[i]) end
--Launch testing task if launch param received --Launch testing task if launch param received
if TABLE.find(arg,'--test')then if TABLE.find(arg,'--test') then
TASK.new(function() TASK.new(function()
while not LOADED do coroutine.yield()end while not LOADED do coroutine.yield() end
LOG("\27[92m\27[1mAutomatic Test Started\27[0m") LOG("\27[92m\27[1mAutomatic Test Started\27[0m")
BGM.setVol(0)SFX.setVol(0) BGM.setVol(0)SFX.setVol(0)
@@ -675,7 +675,7 @@ if TABLE.find(arg,'--test')then
TEST.yieldUntilNextScene() TEST.yieldUntilNextScene()
for k,mode in next,MODES do for k,mode in next,MODES do
if k~='netBattle'then if k~='netBattle' then
LOG("Scanning mode: "..mode.name) LOG("Scanning mode: "..mode.name)
loadGame(mode.name,true) loadGame(mode.name,true)
TEST.yieldUntilNextScene() TEST.yieldUntilNextScene()
@@ -690,7 +690,7 @@ if TABLE.find(arg,'--test')then
TASK.new(function() TASK.new(function()
while true do while true do
coroutine.yield() coroutine.yield()
if Z.getErr(1)then break end if Z.getErr(1) then break end
end end
LOG("\27[91m\27[1mAutomatic Test Failed :(\27[0m\nThe error message is:\n"..table.concat(Z.getErr(1).mes,"\n").."\27[91m\nAborting\27[0m") LOG("\27[91m\27[1mAutomatic Test Failed :(\27[0m\nThe error message is:\n"..table.concat(Z.getErr(1).mes,"\n").."\27[91m\nAborting\27[0m")
TEST.yieldN(60) TEST.yieldN(60)

View File

@@ -175,7 +175,7 @@ do
if P.gameEnv.ospin then if P.gameEnv.ospin then
local x,y=P.curX,P.curY local x,y=P.curX,P.curY
local C=P.cur local C=P.cur
if y==P.ghoY and((P:solid(x-1,y)or P:solid(x-1,y+1)))and(P:solid(x+2,y)or P:solid(x+2,y+1))then if y==P.ghoY and ((P:solid(x-1,y) or P:solid(x-1,y+1))) and (P:solid(x+2,y) or P:solid(x+2,y+1)) then
if P.sound then if P.sound then
SFX.play('rotatekick',nil,P:getCenterX()*.15) SFX.play('rotatekick',nil,P:getCenterX()*.15)
end end
@@ -186,15 +186,15 @@ do
return end return end
for i=1,#OspinList do for i=1,#OspinList do
local L=OspinList[i] local L=OspinList[i]
if C.spinSeq==L[1]then if C.spinSeq==L[1] then
local id,dir=L[2],L[3] local id,dir=L[2],L[3]
local bk=BLOCKS[id][dir] local bk=BLOCKS[id][dir]
x,y=P.curX+L[4],P.curY+L[5] x,y=P.curX+L[4],P.curY+L[5]
if if
not P:ifoverlap(bk,x,y)and( not P:ifoverlap(bk,x,y) and (
L[6]>0 or(P:ifoverlap(bk,x-1,y)and P:ifoverlap(bk,x+1,y)) L[6]>0 or (P:ifoverlap(bk,x-1,y) and P:ifoverlap(bk,x+1,y))
)and( ) and (
L[6]==2 or(P:ifoverlap(bk,x,y-1)and P:ifoverlap(bk,x,y+1)) L[6]==2 or (P:ifoverlap(bk,x,y-1) and P:ifoverlap(bk,x,y+1))
) )
then then
C.id=id C.id=id
@@ -329,13 +329,13 @@ do
[31]={'+0+0','+0-1','+1+0'}, [31]={'+0+0','+0-1','+1+0'},
},--W },--W
function(P,d) function(P,d)
if P.type=='human'then if P.type=='human' then
SFX.play('rotate',nil,P:getCenterX()*.15) SFX.play('rotate',nil,P:getCenterX()*.15)
end end
local kickData=XspinList[d] local kickData=XspinList[d]
for test=1,#kickData do for test=1,#kickData do
local x,y=P.curX+kickData[test][1],P.curY+kickData[test][2] local x,y=P.curX+kickData[test][1],P.curY+kickData[test][2]
if not P:ifoverlap(P.cur.bk,x,y)then if not P:ifoverlap(P.cur.bk,x,y) then
P.curX,P.curY=x,y P.curX,P.curY=x,y
P.spinLast=1 P.spinLast=1
P:freshBlock('move') P:freshBlock('move')
@@ -488,8 +488,8 @@ do
}--I }--I
} }
} }
for i=2,5 do SRS.kickTable[i]=SRS.kickTable[1]end for i=2,5 do SRS.kickTable[i]=SRS.kickTable[1] end
for i=8,29 do SRS.kickTable[i]=SRS.kickTable[1]end for i=8,29 do SRS.kickTable[i]=SRS.kickTable[1] end
end end
local SRS_plus local SRS_plus
@@ -541,8 +541,8 @@ do
}--I }--I
} }
} }
for i=2,5 do SRS_plus.kickTable[i]=SRS_plus.kickTable[1]end for i=2,5 do SRS_plus.kickTable[i]=SRS_plus.kickTable[1] end
for i=8,29 do SRS_plus.kickTable[i]=SRS_plus.kickTable[1]end for i=8,29 do SRS_plus.kickTable[i]=SRS_plus.kickTable[1] end
end end
local SRS_X local SRS_X
@@ -579,8 +579,8 @@ do
false,--I false,--I
} }
} }
for i=2,5 do SRS_X.kickTable[i]=SRS_X.kickTable[1]end for i=2,5 do SRS_X.kickTable[i]=SRS_X.kickTable[1] end
for i=7,29 do SRS_X.kickTable[i]=TRS.kickTable[i]end for i=7,29 do SRS_X.kickTable[i]=TRS.kickTable[i] end
SRS_X.kickTable[10]=SRS_X.kickTable[1]--P SRS_X.kickTable[10]=SRS_X.kickTable[1]--P
SRS_X.kickTable[11]=SRS_X.kickTable[1]--Q SRS_X.kickTable[11]=SRS_X.kickTable[1]--Q
end end
@@ -628,8 +628,8 @@ do
if i==6 or i==18 then if i==6 or i==18 then
a,b=b,a a,b=b,a
end end
list[i][01]=a;list[i][10]=b;list[i][03]=b;list[i][30]=a list[i][01]=a; list[i][10]=b; list[i][03]=b; list[i][30]=a
list[i][12]=a;list[i][21]=b;list[i][32]=b;list[i][23]=a list[i][12]=a; list[i][21]=b; list[i][32]=b; list[i][23]=a
end end
BiRS={ BiRS={
centerTex=GC.DO{10,10, centerTex=GC.DO{10,10,
@@ -653,9 +653,9 @@ do
end end
local dx,dy=0,0 do local dx,dy=0,0 do
local pressing=P.keyPressing local pressing=P.keyPressing
if pressing[1]and P:ifoverlap(C.bk,P.curX-1,P.curY)then dx=dx-1 end if pressing[1] and P:ifoverlap(C.bk,P.curX-1,P.curY) then dx=dx-1 end
if pressing[2]and P:ifoverlap(C.bk,P.curX+1,P.curY)then dx=dx+1 end if pressing[2] and P:ifoverlap(C.bk,P.curX+1,P.curY) then dx=dx+1 end
if pressing[7]and P:ifoverlap(C.bk,P.curX,P.curY-1)then dy= -1 end if pressing[7] and P:ifoverlap(C.bk,P.curX,P.curY-1) then dy= -1 end
end end
while true do while true do
for test=1,#kickList do for test=1,#kickList do
@@ -666,7 +666,7 @@ do
(P.freshTime>0 or fdy<=0) (P.freshTime>0 or fdy<=0)
then then
local x,y=ix+fdx,iy+fdy local x,y=ix+fdx,iy+fdy
if not P:ifoverlap(icb,x,y)then if not P:ifoverlap(icb,x,y) then
if P.gameEnv.moveFX and P.gameEnv.block then if P.gameEnv.moveFX and P.gameEnv.block then
P:createMoveFX() P:createMoveFX()
end end
@@ -685,7 +685,7 @@ do
local sfx local sfx
if ifpre then if ifpre then
sfx='prerotate' sfx='prerotate'
elseif P:ifoverlap(icb,x,y+1)and P:ifoverlap(icb,x-1,y)and P:ifoverlap(icb,x+1,y)then elseif P:ifoverlap(icb,x,y+1) and P:ifoverlap(icb,x-1,y) and P:ifoverlap(icb,x+1,y) then
sfx='rotatekick' sfx='rotatekick'
P:_rotateField(d) P:_rotateField(d)
else else
@@ -1009,15 +1009,15 @@ local RSlist={
} }
for _,rs in next,RSlist do for _,rs in next,RSlist do
if not rs.centerDisp then rs.centerDisp=TABLE.new(true,29)end if not rs.centerDisp then rs.centerDisp=TABLE.new(true,29) end
if not rs.centerPos then rs.centerPos=defaultCenterPos end if not rs.centerPos then rs.centerPos=defaultCenterPos end
if not rs.centerTex then rs.centerTex=defaultCenterTex end if not rs.centerTex then rs.centerTex=defaultCenterTex end
--Make all string vec to the same table vec --Make all string vec to the same table vec
for _,set in next,rs.kickTable do for _,set in next,rs.kickTable do
if type(set)=='table'then if type(set)=='table' then
for _,list in next,set do for _,list in next,set do
if type(list[1])=='string'then if type(list[1])=='string' then
_strToVec(list) _strToVec(list)
end end
end end

View File

@@ -43,8 +43,8 @@ function back.draw()
local M=mino[i] local M=mino[i]
local b=M.block local b=M.block
for y=1,#b do for y=1,#b do
for x=1,#b[1]do for x=1,#b[1] do
if b[y][x]then if b[y][x] then
gc_draw(M.texture,M.x+(x-1)*30*M.k,M.y-y*30*M.k,nil,M.k) gc_draw(M.texture,M.x+(x-1)*30*M.k,M.y-y*30*M.k,nil,M.k)
end end
end end

View File

@@ -61,7 +61,7 @@ function back.draw()
gc_setLineWidth(6) gc_setLineWidth(6)
gc_setColor(.8,.9,1,.3) gc_setColor(.8,.9,1,.3)
for i=1,#SVG_TITLE_FAN do gc_polygon('line',SVG_TITLE_FAN[i])end for i=1,#SVG_TITLE_FAN do gc_polygon('line',SVG_TITLE_FAN[i]) end
gc_setLineWidth(2) gc_setLineWidth(2)
gc_setColor(1,.5,.7,.3) gc_setColor(1,.5,.7,.3)

View File

@@ -37,7 +37,7 @@ function back.update(dt)
local x,y,color=F.x,F.y,F.color local x,y,color=F.x,F.y,F.color
if F.big then if F.big then
SFX.play('fall',.5) SFX.play('fall',.5)
for _=1,rnd(62,126)do for _=1,rnd(62,126) do
ins(particle,{ ins(particle,{
x=x,y=y, x=x,y=y,
color=color, color=color,
@@ -48,7 +48,7 @@ function back.update(dt)
end end
else else
SFX.play('clear_1',.4) SFX.play('clear_1',.4)
for _=1,rnd(16,26)do for _=1,rnd(16,26) do
ins(particle,{ ins(particle,{
x=x,y=y, x=x,y=y,
color=color, color=color,

View File

@@ -9,7 +9,7 @@ local ceil=math.ceil
local back={} local back={}
local t local t
local matrixT={}for i=1,50 do matrixT[i]={}for j=1,50 do matrixT[i][j]=love.math.noise(i,j)+2 end end local matrixT={} for i=1,50 do matrixT[i]={} for j=1,50 do matrixT[i][j]=love.math.noise(i,j)+2 end end
function back.init() function back.init()
t=math.random()*2600 t=math.random()*2600
end end
@@ -21,7 +21,7 @@ function back.draw()
local k=SCR.k local k=SCR.k
gc_scale(k) gc_scale(k)
local Y=ceil(SCR.h/80/k) local Y=ceil(SCR.h/80/k)
for x=1,ceil(SCR.w/80/k)do for x=1,ceil(SCR.w/80/k) do
for y=1,Y do for y=1,Y do
gc_setColor(1,1,1,sin(x+matrixT[x][y]*t)*.04+.04) gc_setColor(1,1,1,sin(x+matrixT[x][y]*t)*.04+.04)
gc_rectangle('fill',80*x,80*y,-80,-80) gc_rectangle('fill',80*x,80*y,-80,-80)

View File

@@ -32,7 +32,7 @@ function back.update(dt)
end end
function back.draw() function back.draw()
gc.clear(.08,.08,.084) gc.clear(.08,.08,.084)
if not stars[1]then return end if not stars[1] then return end
gc.translate(-10,-10) gc.translate(-10,-10)
gc.setColor(1,1,1,.6) gc.setColor(1,1,1,.6)
for i=1,1260,5 do for i=1,1260,5 do

View File

@@ -38,8 +38,8 @@ local FCL={
local LclearScore={[0]=0,-200,-150,-100,200} local LclearScore={[0]=0,-200,-150,-100,200}
local HclearScore={[0]=0,100,140,200,500} local HclearScore={[0]=0,100,140,200,500}
local function _ifoverlapAI(f,bk,x,y) local function _ifoverlapAI(f,bk,x,y)
for i=1,#bk do for j=1,#bk[1]do for i=1,#bk do for j=1,#bk[1] do
if f[y+i-1]and bk[i][j]and f[y+i-1][x+j-1]>0 then if f[y+i-1] and bk[i][j] and f[y+i-1][x+j-1]>0 then
return true return true
end end
end end end end
@@ -157,28 +157,28 @@ function bot_9s.thread(bot)
if ifhold==0 then if ifhold==0 then
bn=P.cur and P.cur.id bn=P.cur and P.cur.id
else else
bn=P.holdQueue[1]and P.holdQueue[1].id or P.nextQueue[1]and P.nextQueue[1].id bn=P.holdQueue[1] and P.holdQueue[1].id or P.nextQueue[1] and P.nextQueue[1].id
end end
if bn then if bn then
for dir=0,dirCount[bn]do--Each dir for dir=0,dirCount[bn] do--Each dir
local cb=BLOCKS[bn][dir] local cb=BLOCKS[bn][dir]
for cx=1,11-#cb[1]do--Each pos for cx=1,11-#cb[1] do--Each pos
local cy=#Tfield+1 local cy=#Tfield+1
--Move to bottom --Move to bottom
while cy>1 and not _ifoverlapAI(Tfield,cb,cx,cy-1)do while cy>1 and not _ifoverlapAI(Tfield,cb,cx,cy-1) do
cy=cy-1 cy=cy-1
end end
--Simulate lock --Simulate lock
for i=1,#cb do for i=1,#cb do
local y=cy+i-1 local y=cy+i-1
if not Tfield[y]then if not Tfield[y] then
Tfield[y]=getRow(0) Tfield[y]=getRow(0)
end end
local L=Tfield[y] local L=Tfield[y]
for j=1,#cb[1]do for j=1,#cb[1] do
if cb[i][j]then if cb[i][j] then
L[cx+j-1]=1 L[cx+j-1]=1
end end
end end

View File

@@ -21,7 +21,7 @@ function bot_cc:checkDest(b2b,atk,exblock,yomi)
local CB=self.P.cur.bk local CB=self.P.cur.bk
for k=1,#dest,2 do for k=1,#dest,2 do
local r=CB[dest[k+1]-self.P.curY+2] local r=CB[dest[k+1]-self.P.curY+2]
if not r or not r[dest[k]-self.P.curX+2]then if not r or not r[dest[k]-self.P.curX+2] then
print('wrong place') print('wrong place')
self:lockWrongPlace() self:lockWrongPlace()
self.P.destFX=nil self.P.destFX=nil
@@ -76,7 +76,7 @@ function bot_cc:thread()
if hold then--Hold if hold then--Hold
keys[1]=8 keys[1]=8
end end
while move[1]do while move[1] do
local m=rem(move,1) local m=rem(move,1)
if m<4 then if m<4 then
ins(keys,m+1) ins(keys,m+1)
@@ -105,7 +105,7 @@ function bot_cc:updateField()
end end end end
while i<=400 do F[i],i=false,i+1 end while i<=400 do F[i],i=false,i+1 end
local y = P:getNextSpawn()-1 local y = P:getNextSpawn()-1
if not pcall(self.ccBot.reset,self.ccBot,F,P.b2b,P.combo,P.stat.pc,P.stat.row,y)then if not pcall(self.ccBot.reset,self.ccBot,F,P.b2b,P.combo,P.stat.pc,P.stat.row,y) then
print("CC is dead ("..P.id..")","error") print("CC is dead ("..P.id..")","error")
for y=#F0,1,-1 do for y=#F0,1,-1 do
local s="" local s=""

View File

@@ -14,9 +14,9 @@ function baseBot.update(bot)
local keys=bot.keys local keys=bot.keys
if P.control and P.cur then if P.control and P.cur then
bot.delay=bot.delay-1 bot.delay=bot.delay-1
if not keys[1]then if not keys[1] then
if bot.runningThread then if bot.runningThread then
if not pcall(bot.runningThread)then if not pcall(bot.runningThread) then
bot.runningThread=false bot.runningThread=false
end end
else else
@@ -61,17 +61,17 @@ local AISpeed={60,50,42,34,27,21,16,12,9,6}
} }
]] ]]
function BOT.template(arg) function BOT.template(arg)
if arg.type=='CC'then if arg.type=='CC' then
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 or'bag')=='bag', bag=(arg.randomizer or 'bag')=='bag',
_20G=arg._20G, _20G=arg._20G,
} }
elseif arg.type=='9S'then elseif arg.type=='9S' then
return{ return{
type='9S', type='9S',
delay=math.floor(AISpeed[arg.speedLV]), delay=math.floor(AISpeed[arg.speedLV]),
@@ -82,7 +82,7 @@ end
function BOT.new(P,data) function BOT.new(P,data)
local bot={P=P,data=data} local bot={P=P,data=data}
if data.type=="CC"then if data.type=="CC" then
P:setRS('TRS') P:setRS('TRS')
bot.keys={} bot.keys={}
bot.bufferedNexts={} bot.bufferedNexts={}
@@ -107,8 +107,8 @@ function BOT.new(P,data)
local cc_lua=require"parts.bot.bot_cc" local cc_lua=require"parts.bot.bot_cc"
setmetatable(bot,{__index=function(self,k) setmetatable(bot,{__index=function(self,k)
return return
self.ccBot[k]and function(_,...)self.ccBot[k](self.ccBot,...)end or self.ccBot[k] and function(_,...)self.ccBot[k](self.ccBot,...) end or
cc_lua[k]and function(_,...)cc_lua[k](self,...)end or cc_lua[k] and function(_,...)cc_lua[k](self,...) end or
assert(baseBot[k],"No CC action called "..k) assert(baseBot[k],"No CC action called "..k)
end}) end})
@@ -127,7 +127,7 @@ function BOT.new(P,data)
end end
bot.runningThread=coroutine.wrap(cc_lua.thread) bot.runningThread=coroutine.wrap(cc_lua.thread)
bot.runningThread(bot) bot.runningThread(bot)
else--if data.type=="9S"then--9s or else else--if data.type=="9S" then--9s or else
TABLE.cover(baseBot,bot) TABLE.cover(baseBot,bot)
TABLE.cover(require"parts.bot.bot_9s",bot) TABLE.cover(require"parts.bot.bot_9s",bot)
P:setRS('TRS') P:setRS('TRS')

View File

@@ -18,7 +18,7 @@ function DATA.copySequence()
local count=1 local count=1
for i=1,#BAG+1 do for i=1,#BAG+1 do
if BAG[i+1]~=BAG[i]or count==64 then if BAG[i+1]~=BAG[i] or count==64 then
str=str..char(96+BAG[i]) str=str..char(96+BAG[i])
if count>1 then if count>1 then
str=str..char(32+count) str=str..char(32+count)
@@ -67,7 +67,7 @@ local fieldMeta={__index=function(self,h)
return self[h] return self[h]
end} end}
function DATA.newBoard(f)--Generate a new board function DATA.newBoard(f)--Generate a new board
return setmetatable(f and TABLE.shift(f)or{},fieldMeta) return setmetatable(f and TABLE.shift(f) or{},fieldMeta)
end end
function DATA.copyBoard(page)--Copy the [page] board function DATA.copyBoard(page)--Copy the [page] board
local F=FIELD[page or 1] local F=FIELD[page or 1]
@@ -95,7 +95,7 @@ function DATA.pasteBoard(str,page)--Paste [str] data to [page] board
if not page then if not page then
page=1 page=1
end end
if not FIELD[page]then if not FIELD[page] then
FIELD[page]=DATA.newBoard() FIELD[page]=DATA.newBoard()
end end
local F=FIELD[page] local F=FIELD[page]
@@ -158,7 +158,7 @@ function DATA.copyMission()
local count=1 local count=1
for i=1,#MISSION+1 do for i=1,#MISSION+1 do
if MISSION[i+1]~=MISSION[i]or count==13 then if MISSION[i+1]~=MISSION[i] or count==13 then
_=33+MISSION[i] _=33+MISSION[i]
str=str..char(_) str=str..char(_)
if count>1 then if count>1 then
@@ -186,7 +186,7 @@ function DATA.pasteMission(str)
end end
else else
if b>=34 and b<=114 then if b>=34 and b<=114 then
if ENUM_MISSION[reg]then if ENUM_MISSION[reg] then
ins(MISSION,reg) ins(MISSION,reg)
reg=b-33 reg=b-33
else else
@@ -211,8 +211,8 @@ function DATA.copyQuestArgs()
local ENV=CUSTOMENV local ENV=CUSTOMENV
local str="".. local str=""..
ENV.holdCount.. ENV.holdCount..
(ENV.ospin and"O"or"Z").. (ENV.ospin and "O" or "Z")..
(ENV.missionKill and"M"or"Z").. (ENV.missionKill and "M" or "Z")..
ENV.sequence ENV.sequence
return str return str
end end
@@ -252,8 +252,8 @@ function DATA.dumpRecording(list,ptr)
local out="" local out=""
local buffer,buffer2="" local buffer,buffer2=""
if not ptr then ptr=1 end if not ptr then ptr=1 end
local prevFrm=list[ptr-2]or 0 local prevFrm=list[ptr-2] or 0
while list[ptr]do while list[ptr] do
--Flush buffer --Flush buffer
if #buffer>10 then if #buffer>10 then
out=out..buffer out=out..buffer
@@ -298,7 +298,7 @@ function DATA.pumpRecording(str,L)
local len=#str local len=#str
local p=1 local p=1
local curFrm=L[#L-1]or 0 local curFrm=L[#L-1] or 0
local code local code
while p<=len do while p<=len do
--Read delta time --Read delta time
@@ -338,7 +338,7 @@ do--function DATA.saveReplay()
function DATA.saveReplay() function DATA.saveReplay()
--Filtering modes that cannot be saved --Filtering modes that cannot be saved
for _,v in next,noRecList do for _,v in next,noRecList do
if GAME.curModeName:find(v)then if GAME.curModeName:find(v) then
MES.new('error',"Cannot save recording of this mode now!") MES.new('error',"Cannot save recording of this mode now!")
return return
end end
@@ -346,7 +346,7 @@ do--function DATA.saveReplay()
--Write file --Write file
local fileName=os.date("replay/%Y_%m_%d_%H%M%S.rep") local fileName=os.date("replay/%Y_%m_%d_%H%M%S.rep")
if not love.filesystem.getInfo(fileName)then if not love.filesystem.getInfo(fileName) then
love.filesystem.write(fileName, love.filesystem.write(fileName,
love.data.compress('string','zlib', love.data.compress('string','zlib',
JSON.encode{ JSON.encode{
@@ -378,7 +378,7 @@ end
function DATA.parseReplayData(fileName,fileData,ifFull) function DATA.parseReplayData(fileName,fileData,ifFull)
local success,metaData,rep local success,metaData,rep
if not(fileData and #fileData>0)then goto BREAK_cannotParse end if not (fileData and #fileData>0) then goto BREAK_cannotParse end
--Decompress file --Decompress file
success,fileData=pcall(love.data.decompress,'string','zlib',fileData) success,fileData=pcall(love.data.decompress,'string','zlib',fileData)
@@ -390,8 +390,8 @@ function DATA.parseReplayData(fileName,fileData,ifFull)
if not metaData then goto BREAK_cannotParse end if not metaData then goto BREAK_cannotParse end
--Convert ancient replays --Convert ancient replays
metaData.mode=MODE_UPDATE_MAP[metaData.mode]or metaData.mode metaData.mode=MODE_UPDATE_MAP[metaData.mode] or metaData.mode
if not MODES[metaData.mode]then goto BREAK_cannotParse end if not MODES[metaData.mode] then goto BREAK_cannotParse end
--Create replay object --Create replay object
rep={ rep={

View File

@@ -3,7 +3,7 @@ return{
if P.garbageBeneath==0 then if P.garbageBeneath==0 then
local D=P.modeData local D=P.modeData
D.finished=D.finished+1 D.finished=D.finished+1
if FIELD[D.finished+1]then if FIELD[D.finished+1] then
P.waiting=26 P.waiting=26
for i=#P.field,1,-1 do for i=#P.field,1,-1 do
P.field[i],P.visTime[i]=nil P.field[i],P.visTime[i]=nil

View File

@@ -13,7 +13,7 @@ return{
end end
end end
for i=1,#PLY_ALIVE do for i=1,#PLY_ALIVE do
if PLY_ALIVE[i].sid==(minMaxID==1e99 and minID or minMaxID)then if PLY_ALIVE[i].sid==(minMaxID==1e99 and minID or minMaxID) then
PLY_ALIVE[i].control=true PLY_ALIVE[i].control=true
return return
end end

View File

@@ -13,7 +13,7 @@ return{
end end
end end
for i=1,#PLY_ALIVE do for i=1,#PLY_ALIVE do
if PLY_ALIVE[i].sid==(minMaxID==1e99 and minID or minMaxID)then if PLY_ALIVE[i].sid==(minMaxID==1e99 and minID or minMaxID) then
PLY_ALIVE[i].control=true PLY_ALIVE[i].control=true
return return
end end

View File

@@ -16,8 +16,8 @@ return{
D.counter=D.counter+1 D.counter=D.counter+1
local t= local t=
D.wave<=60 and 240-2*D.wave or D.wave<=60 and 240-2*D.wave or
D.wave<=120 and 120-(D.wave-60)or D.wave<=120 and 120-(D.wave-60) or
D.wave<=180 and math.floor(60-(D.wave-120)*.5)or D.wave<=180 and math.floor(60-(D.wave-120)*.5) or
30 30
if D.counter>=t then if D.counter>=t then
D.counter=0 D.counter=0

View File

@@ -10,7 +10,7 @@ return{
if P.control then if P.control then
local D=P.modeData local D=P.modeData
D.timer=D.timer+1 D.timer=D.timer+1
if D.timer>=math.max(90,180-D.wave)then if D.timer>=math.max(90,180-D.wave) then
P:garbageRise(21,1,P:getHolePos()) P:garbageRise(21,1,P:getHolePos())
P.stat.recv=P.stat.recv+1 P.stat.recv=P.stat.recv+1
D.timer=0 D.timer=0

View File

@@ -10,7 +10,7 @@ return{
if P.control then if P.control then
local D=P.modeData local D=P.modeData
D.timer=D.timer+1 D.timer=D.timer+1
if D.timer>=math.max(30,80-.3*D.wave)then if D.timer>=math.max(30,80-.3*D.wave) then
P:garbageRise(20+D.wave%5,1,P:getHolePos()) P:garbageRise(20+D.wave%5,1,P:getHolePos())
P.stat.recv=P.stat.recv+1 P.stat.recv=P.stat.recv+1
D.timer=0 D.timer=0

View File

@@ -14,11 +14,11 @@ return{
hook_drop=function(P) hook_drop=function(P)
local flag local flag
local l=P.lastPiece local l=P.lastPiece
if P.combo>1 then flag=true;P:showText("2x",0,-220,40,'flicker',.3)end if P.combo>1 then flag=true;P:showText("2x",0,-220,40,'flicker',.3) end
if l.spin then flag=true;P:showText("spin",0,-180,40,'flicker',.3)end if l.spin then flag=true;P:showText("spin",0,-180,40,'flicker',.3) end
if l.row>1 then flag=true;P:showText("1+",0,-140,40,'flicker',.3)end if l.row>1 then flag=true;P:showText("1+",0,-140,40,'flicker',.3) end
if l.hpc then flag=true;P:showText("HPC",0,-100,40,'flicker',.3)end if l.hpc then flag=true;P:showText("HPC",0,-100,40,'flicker',.3) end
if l.pc then P:showText("PC",0,-90,100,'beat',.5)end if l.pc then P:showText("PC",0,-90,100,'beat',.5) end
if flag then if flag then
P:lose() P:lose()
else else

View File

@@ -32,7 +32,7 @@ return{
if s~=3 then E.fall=E.fall-1 end if s~=3 then E.fall=E.fall-1 end
D.target=D.target+100 D.target=D.target+100
elseif s<10 then elseif s<10 then
if s==5 then BGM.play('distortion')end if s==5 then BGM.play('distortion') end
P:stageComplete(s) P:stageComplete(s)
if s==4 or s==7 then E.das=E.das-1 end if s==4 or s==7 then E.das=E.das-1 end
if s%3==0 then E.lock=E.lock-1 if s%3==0 then E.lock=E.lock-1

View File

@@ -204,7 +204,7 @@ return{
P.gameEnv.drop=getGrav(spd_lvl) P.gameEnv.drop=getGrav(spd_lvl)
if(P.gameEnv.drop==0) then if (P.gameEnv.drop==0) then
P:set20G(true) P:set20G(true)
end end

View File

@@ -23,7 +23,7 @@ return{
if c==0 and D.pt%100==99 then if c==0 and D.pt%100==99 then
if D.pt<1000 then if D.pt<1000 then
hidetimer=0-inv_wait[(P.modeData.pt/100-(P.modeData.pt%100)/100)+1] hidetimer=0-inv_wait[(P.modeData.pt/100-(P.modeData.pt%100)/100)+1]
if c>0 then hidetimer=hidetimer-inv_fall[(P.modeData.pt/100-(P.modeData.pt%100)/100)+1]end if c>0 then hidetimer=hidetimer-inv_fall[(P.modeData.pt/100-(P.modeData.pt%100)/100)+1] end
end end
return return
end end
@@ -35,7 +35,7 @@ return{
held=false held=false
if D.pt<1000 then if D.pt<1000 then
hidetimer=0-inv_wait[(P.modeData.pt/100-(P.modeData.pt%100)/100)+1] hidetimer=0-inv_wait[(P.modeData.pt/100-(P.modeData.pt%100)/100)+1]
if c>0 then hidetimer=hidetimer-inv_fall[(P.modeData.pt/100-(P.modeData.pt%100)/100)+1]end if c>0 then hidetimer=hidetimer-inv_fall[(P.modeData.pt/100-(P.modeData.pt%100)/100)+1] end
end end
if D.pt%100==99 then if D.pt%100==99 then
@@ -78,7 +78,7 @@ return{
held=true held=true
end end
hidetimer=hidetimer+1 hidetimer=hidetimer+1
if hidetimer>inv_hide[(P.modeData.pt/100-(P.modeData.pt%100)/100)+1]then if hidetimer>inv_hide[(P.modeData.pt/100-(P.modeData.pt%100)/100)+1] then
P.gameEnv.block=false P.gameEnv.block=false
else else
P.gameEnv.block=true P.gameEnv.block=true

View File

@@ -36,7 +36,7 @@ return
SFX.play('reach') SFX.play('reach')
elseif T==26 then--Stage 3: dig to bottom elseif T==26 then--Stage 3: dig to bottom
P:stageComplete(3) P:stageComplete(3)
if not P.holdQueue[1]then--1 up if ban hold if not P.holdQueue[1] then--1 up if ban hold
P.life=P.life+1 P.life=P.life+1
end end
P.waiting=45 P.waiting=45
@@ -44,7 +44,7 @@ return
ENV.skin[3],ENV.skin[4]=ENV.skin[4],ENV.skin[3] ENV.skin[3],ENV.skin[4]=ENV.skin[4],ENV.skin[3]
for i=1,10 do for i=1,10 do
if P.field[i]then if P.field[i] then
for j=1,10 do for j=1,10 do
if P.field[i][j]>0 then if P.field[i][j]>0 then
P.field[i][j]=17 P.field[i][j]=17
@@ -137,7 +137,7 @@ return
elseif T==259 then--Stage 9: ending elseif T==259 then--Stage 9: ending
P:stageComplete(9) P:stageComplete(9)
P.life=P.life+1 P.life=P.life+1
for i=1,7 do ENV.skin[i]=P.holeRND:random(16)end for i=1,7 do ENV.skin[i]=P.holeRND:random(16) end
P:setInvisible(40) P:setInvisible(40)
ENV.lock=15 ENV.lock=15

View File

@@ -11,7 +11,7 @@ local function task_PC(P)
P:pushNextList(L,symmetry) P:pushNextList(L,symmetry)
P.control=false P.control=false
if P.frameRun>180 then for _=1,26 do coroutine.yield()end end if P.frameRun>180 then for _=1,26 do coroutine.yield() end end
P.control=true P.control=true
local base=PCbase[difficulty] local base=PCbase[difficulty]
@@ -31,9 +31,9 @@ local function _check(P)
if P.stat.pc%4==0 and P.stat.pc>0 and P.stat.pc<=40 then if P.stat.pc%4==0 and P.stat.pc>0 and P.stat.pc<=40 then
local s=P.stat.pc/4 local s=P.stat.pc/4
P.gameEnv.drop=pc_drop[s]or 10 P.gameEnv.drop=pc_drop[s] or 10
P.gameEnv.lock=pc_lock[s]or 25 P.gameEnv.lock=pc_lock[s] or 25
P.gameEnv.fall=pc_fall[s]or 4 P.gameEnv.fall=pc_fall[s] or 4
if s==10 then if s==10 then
P:_showText(text.maxspeed,0,-140,100,'appear',.6) P:_showText(text.maxspeed,0,-140,100,'appear',.6)
end end

View File

@@ -8,13 +8,13 @@ local PCtype={
1,2,3, 1,2,3,
} }
local function task_PC(P) local function task_PC(P)
local difficulty=PCtype[P.stat.pc+1]or 3 local difficulty=PCtype[P.stat.pc+1] or 3
local L=PClist[difficulty][P.holeRND:random(#PClist[difficulty])] local L=PClist[difficulty][P.holeRND:random(#PClist[difficulty])]
local symmetry=P.holeRND:random()>.5 local symmetry=P.holeRND:random()>.5
P:pushNextList(L,symmetry) P:pushNextList(L,symmetry)
P.control=false P.control=false
if P.frameRun>180 then for _=1,26 do coroutine.yield()end end if P.frameRun>180 then for _=1,26 do coroutine.yield() end end
P.control=true P.control=true
local base=PCbase[difficulty] local base=PCbase[difficulty]

View File

@@ -46,7 +46,7 @@ local function generateGuide(num)
end end
return{ return{
fkey1=function(P)P.modeData.showGuide=not P.modeData.showGuide end, fkey1=function(P) P.modeData.showGuide=not P.modeData.showGuide end,
mesDisp=function(P) mesDisp=function(P)
mText(TEXTOBJ.grade,63,190) mText(TEXTOBJ.grade,63,190)
mText(TEXTOBJ.line,63,310) mText(TEXTOBJ.line,63,310)

View File

@@ -9,16 +9,16 @@ return{
task=function(P) task=function(P)
coroutine.yield() coroutine.yield()
while true do while true do
for _=1,P.holeRND:random(40,200)do coroutine.yield()end for _=1,P.holeRND:random(40,200) do coroutine.yield() end
local r=P.holeRND:random(7) local r=P.holeRND:random(7)
if r==1 then if r==1 then
if P.cur and not P:ifoverlap(P.cur.bk,P.curX-1,P.curY)then if P.cur and not P:ifoverlap(P.cur.bk,P.curX-1,P.curY) then
P:createMoveFX('left') P:createMoveFX('left')
P.curX=P.curX-1 P.curX=P.curX-1
P:freshBlock('move') P:freshBlock('move')
end end
elseif r==2 then elseif r==2 then
if P.cur and not P:ifoverlap(P.cur.bk,P.curX-1,P.curY)then if P.cur and not P:ifoverlap(P.cur.bk,P.curX-1,P.curY) then
P:createMoveFX('left') P:createMoveFX('left')
P.curX=P.curX-1 P.curX=P.curX-1
P:freshBlock('move') P:freshBlock('move')

View File

@@ -19,7 +19,7 @@ return{
for y=1,#F do for y=1,#F do
local l=F[y] local l=F[y]
for x=1,5 do for x=1,5 do
if l[x]>0 and l[11-x]>0 and oppo[l[x]]~=l[11-x]then if l[x]>0 and l[11-x]>0 and oppo[l[x]]~=l[11-x] then
P:lose() P:lose()
return return
end end

View File

@@ -10,7 +10,7 @@ return{
if P.control then if P.control then
local D=P.modeData local D=P.modeData
D.timer=D.timer+1 D.timer=D.timer+1
if D.timer>=math.max(60,150-2*D.wave)and P.atkBufferSum<4 then if D.timer>=math.max(60,150-2*D.wave) and P.atkBufferSum<4 then
if D.wave==100 then if D.wave==100 then
P:win('finish') P:win('finish')
else else

View File

@@ -10,7 +10,7 @@ return{
if P.control then if P.control then
local D=P.modeData local D=P.modeData
D.timer=D.timer+1 D.timer=D.timer+1
if D.timer>=math.max(60,180-2*D.wave)and P.atkBufferSum<15 then if D.timer>=math.max(60,180-2*D.wave) and P.atkBufferSum<15 then
if D.wave==90 then if D.wave==90 then
P:win('finish') P:win('finish')
else else

View File

@@ -10,7 +10,7 @@ return{
if P.control then if P.control then
local D=P.modeData local D=P.modeData
D.timer=D.timer+1 D.timer=D.timer+1
if D.timer>=math.max(60,150-D.wave)and P.atkBufferSum<20 then if D.timer>=math.max(60,150-D.wave) and P.atkBufferSum<20 then
if D.wave==110 then if D.wave==110 then
P:win('finish') P:win('finish')
else else

View File

@@ -10,15 +10,15 @@ return{
if P.control then if P.control then
local D=P.modeData local D=P.modeData
D.timer=D.timer+1 D.timer=D.timer+1
if D.timer>=math.max(90,180-2*D.wave)and P.atkBufferSum<8 then if D.timer>=math.max(90,180-2*D.wave) and P.atkBufferSum<8 then
if D.wave==80 then if D.wave==80 then
P:win('finish') P:win('finish')
else else
local d=D.wave+1 local d=D.wave+1
table.insert(P.atkBuffer, table.insert(P.atkBuffer,
d%4==0 and{line=generateLine(P.holeRND:random(10)),amount=1,countdown=60,cd0=60,time=0,sent=false,lv=1}or d%4==0 and{line=generateLine(P.holeRND:random(10)),amount=1,countdown=60,cd0=60,time=0,sent=false,lv=1} or
d%4==1 and{line=generateLine(P.holeRND:random(10)),amount=2,countdown=70,cd0=70,time=0,sent=false,lv=1}or d%4==1 and{line=generateLine(P.holeRND:random(10)),amount=2,countdown=70,cd0=70,time=0,sent=false,lv=1} or
d%4==2 and{line=generateLine(P.holeRND:random(10)),amount=3,countdown=80,cd0=80,time=0,sent=false,lv=2}or d%4==2 and{line=generateLine(P.holeRND:random(10)),amount=3,countdown=80,cd0=80,time=0,sent=false,lv=2} or
d%4==3 and{line=generateLine(P.holeRND:random(10)),amount=4,countdown=90,cd0=90,time=0,sent=false,lv=3} d%4==3 and{line=generateLine(P.holeRND:random(10)),amount=4,countdown=90,cd0=90,time=0,sent=false,lv=3}
) )
P.atkBufferSum=P.atkBufferSum+d%4+1 P.atkBufferSum=P.atkBufferSum+d%4+1

View File

@@ -10,7 +10,7 @@ return{
if P.control then if P.control then
local D=P.modeData local D=P.modeData
D.timer=D.timer+1 D.timer=D.timer+1
if D.timer>=math.max(300,600-10*D.wave)and P.atkBufferSum<20 then if D.timer>=math.max(300,600-10*D.wave) and P.atkBufferSum<20 then
if D.wave==35 then if D.wave==35 then
P:win('finish') P:win('finish')
else else

View File

@@ -15,7 +15,7 @@ return{
local C=P.lastPiece local C=P.lastPiece
if C.row>0 then if C.row>0 then
if C.row==4 then if C.row==4 then
if TABLE.find(P.modeData.history,C.curX)then if TABLE.find(P.modeData.history,C.curX) then
P:showText("STACK",0,-140,40,'flicker',.3) P:showText("STACK",0,-140,40,'flicker',.3)
P:lose() P:lose()
else else

View File

@@ -4,7 +4,7 @@ return{
GC.mStr(P.modeData.tsd,63,250) GC.mStr(P.modeData.tsd,63,250)
mText(TEXTOBJ.tsd,63,315) mText(TEXTOBJ.tsd,63,315)
local L=P.modeData.history local L=P.modeData.history
if L[1]and L[1]==L[2]and L[1]==L[3]then if L[1] and L[1]==L[2] and L[1]==L[3] then
PLY.draw.applyField(P) PLY.draw.applyField(P)
GC.setColor(1,.3,.3,.2) GC.setColor(1,.3,.3,.2)
GC.rectangle('fill',30*L[1]-30,0,30,600) GC.rectangle('fill',30*L[1]-30,0,30,600)
@@ -16,7 +16,7 @@ return{
if C.row>0 then if C.row>0 then
if C.id==5 and C.row==2 and C.spin then if C.id==5 and C.row==2 and C.spin then
local L=P.modeData.history local L=P.modeData.history
if L[1]==C.centX and L[1]==L[2]and L[1]==L[3]then if L[1]==C.centX and L[1]==L[2] and L[1]==L[3] then
P:showText("STACK",0,-140,40,'flicker',.3) P:showText("STACK",0,-140,40,'flicker',.3)
P:lose() P:lose()
else else

View File

@@ -15,7 +15,7 @@ return{
local C=P.lastPiece local C=P.lastPiece
if C.row>0 then if C.row>0 then
if C.id==5 and C.row==2 and C.spin then if C.id==5 and C.row==2 and C.spin then
if TABLE.find(P.modeData.history,C.centX)then if TABLE.find(P.modeData.history,C.centX) then
P:showText("STACK",0,-140,40,'flicker',.3) P:showText("STACK",0,-140,40,'flicker',.3)
P:lose() P:lose()
else else

View File

@@ -22,7 +22,7 @@ return{
P.modeData.section=1 P.modeData.section=1
while true do while true do
coroutine.yield() coroutine.yield()
while P.stat.frame>=warnTime[P.modeData.section]do while P.stat.frame>=warnTime[P.modeData.section] do
if P.modeData.section<9 then if P.modeData.section<9 then
P.modeData.section=P.modeData.section+1 P.modeData.section=P.modeData.section+1
playReadySFX(3,.7+P.modeData.section*.03) playReadySFX(3,.7+P.modeData.section*.03)

View File

@@ -52,20 +52,20 @@ do--function tryDelete()
end end
end end
do--function loadFile(name,args), function saveFile(data,name,args) do--function loadFile(name,args), function saveFile(data,name,args)
local t=setmetatable({},{__index=function()return"'$1' loading failed: $2"end}) local t=setmetatable({},{__index=function() return"'$1' loading failed: $2" end})
function loadFile(name,args) function loadFile(name,args)
local text=text or t local text=text or t
if not args then args=''end if not args then args='' end
local res,mes=pcall(FILE.load,name,args) local res,mes=pcall(FILE.load,name,args)
if res then if res then
return mes return mes
else else
if mes:find'open error'then if mes:find'open error' then
MES.new('error',text.loadError_open:repD(name,"")) MES.new('error',text.loadError_open:repD(name,""))
elseif mes:find'unknown mode'then elseif mes:find'unknown mode' then
MES.new('error',text.loadError_errorMode:repD(name,args)) MES.new('error',text.loadError_errorMode:repD(name,args))
elseif mes:find'no file'then elseif mes:find'no file' then
if not args:sArg'-canSkip'then if not args:sArg'-canSkip' then
MES.new('error',text.loadError_noFile:repD(name,"")) MES.new('error',text.loadError_noFile:repD(name,""))
end end
elseif mes then elseif mes then
@@ -82,12 +82,12 @@ do--function loadFile(name,args), function saveFile(data,name,args)
return true return true
else else
MES.new('error', MES.new('error',
mes:find'duplicate'and mes:find'duplicate' and
text.saveError_duplicate:repD(name)or text.saveError_duplicate:repD(name) or
mes:find'encode error'and mes:find'encode error' and
text.saveError_encode:repD(name)or text.saveError_encode:repD(name) or
mes and mes and
text.saveError_other:repD(name,mes)or text.saveError_other:repD(name,mes) or
text.saveError_unknown:repD(name) text.saveError_unknown:repD(name)
) )
end end
@@ -115,7 +115,7 @@ do--function applySettings()
text=LANG.get(SETTING.locale) text=LANG.get(SETTING.locale)
WIDGET.setLang(text.WidgetText) WIDGET.setLang(text.WidgetText)
for k,v in next,TEXTOBJ do for k,v in next,TEXTOBJ do
if rawget(text,k)then if rawget(text,k) then
v:set(text[k]) v:set(text[k])
end end
end end
@@ -144,23 +144,23 @@ do--function applySettings()
--Apply saturs --Apply saturs
local m local m
m=saturateValues[SETTING.blockSatur]or saturateValues.normal m=saturateValues[SETTING.blockSatur] or saturateValues.normal
SHADER.blockSatur:send('b',m[1]) SHADER.blockSatur:send('b',m[1])
SHADER.blockSatur:send('k',m[2]) SHADER.blockSatur:send('k',m[2])
m=saturateValues[SETTING.fieldSatur]or saturateValues.normal m=saturateValues[SETTING.fieldSatur] or saturateValues.normal
SHADER.fieldSatur:send('b',m[1]) SHADER.fieldSatur:send('b',m[1])
SHADER.fieldSatur:send('k',m[2]) SHADER.fieldSatur:send('k',m[2])
--Apply BG --Apply BG
if SETTING.bg=='on'then if SETTING.bg=='on' then
BG.unlock() BG.unlock()
BG.set() BG.set()
elseif SETTING.bg=='off'then elseif SETTING.bg=='off' then
BG.unlock() BG.unlock()
BG.set('fixColor',SETTING.bgAlpha,SETTING.bgAlpha,SETTING.bgAlpha) BG.set('fixColor',SETTING.bgAlpha,SETTING.bgAlpha,SETTING.bgAlpha)
BG.lock() BG.lock()
elseif SETTING.bg=='custom'then elseif SETTING.bg=='custom' then
if love.filesystem.getInfo('conf/customBG')then if love.filesystem.getInfo('conf/customBG') then
local res,image=pcall(GC.newImage,love.filesystem.newFile('conf/customBG')) local res,image=pcall(GC.newImage,love.filesystem.newFile('conf/customBG'))
if res then if res then
BG.unlock() BG.unlock()
@@ -265,7 +265,7 @@ function royaleLevelup()
for _,P in next,PLY_ALIVE do for _,P in next,PLY_ALIVE do
P.gameEnv.drop=spd P.gameEnv.drop=spd
end end
if GAME.curMode.name:find("_u")then if GAME.curMode.name:find("_u") then
for i=1,#PLY_ALIVE do for i=1,#PLY_ALIVE do
local P=PLY_ALIVE[i] local P=PLY_ALIVE[i]
P.gameEnv.drop=int(P.gameEnv.drop*.4) P.gameEnv.drop=int(P.gameEnv.drop*.4)
@@ -347,7 +347,7 @@ function setField(P,page)
local F=FIELD[page] local F=FIELD[page]
local height=0 local height=0
for y=#F,1,-1 do for y=#F,1,-1 do
if notEmptyLine(F[y])then if notEmptyLine(F[y]) then
height=y height=y
break break
end end
@@ -374,7 +374,7 @@ function freshDate(args)
STAT.date=date STAT.date=date
STAT.todayTime=0 STAT.todayTime=0
getItem('zTicket',1) getItem('zTicket',1)
if not args:find'q'then if not args:find'q' then
MES.new('info',text.newDay) MES.new('info',text.newDay)
end end
saveStats() saveStats()
@@ -383,7 +383,7 @@ function freshDate(args)
end end
function legalGameTime()--Check if today's playtime is legal function legalGameTime()--Check if today's playtime is legal
if if
SETTING.locale:find'zh'and SETTING.locale:find'zh' and
RANKS.sprint_10l<4 and RANKS.sprint_10l<4 and
(not RANKS.sprint_40l or RANKS.sprint_40l<3) (not RANKS.sprint_40l or RANKS.sprint_40l<3)
then then
@@ -411,12 +411,12 @@ end
function mergeStat(stat,delta)--Merge delta stat. to global stat. function mergeStat(stat,delta)--Merge delta stat. to global stat.
for k,v in next,delta do for k,v in next,delta do
if type(v)=='table'then if type(v)=='table' then
if type(stat[k])=='table'then if type(stat[k])=='table' then
mergeStat(stat[k],v) mergeStat(stat[k],v)
end end
else else
if stat[k]then if stat[k] then
stat[k]=stat[k]+v stat[k]=stat[k]+v
end end
end end
@@ -439,7 +439,7 @@ function destroyPlayers()--Destroy all player objects, restore freerows and free
if P.canvas then if P.canvas then
P.canvas:release() P.canvas:release()
end end
while P.field[1]do while P.field[1] do
rem(P.field) rem(P.field)
rem(P.visTime) rem(P.visTime)
end end
@@ -453,7 +453,7 @@ function pauseGame()
for i=1,#PLAYERS do for i=1,#PLAYERS do
local l=PLAYERS[i].keyPressing local l=PLAYERS[i].keyPressing
for j=1,#l do for j=1,#l do
if l[j]then if l[j] then
PLAYERS[i]:releaseKey(j) PLAYERS[i]:releaseKey(j)
end end
end end
@@ -462,7 +462,7 @@ function pauseGame()
for i=1,20 do for i=1,20 do
VK.release(i) VK.release(i)
end end
if not(GAME.result or GAME.replaying)then if not (GAME.result or GAME.replaying) then
GAME.pauseCount=GAME.pauseCount+1 GAME.pauseCount=GAME.pauseCount+1
end end
SCN.swapTo('pause','none') SCN.swapTo('pause','none')
@@ -472,12 +472,12 @@ function applyCustomGame()--Apply CUSTOMENV, BAG, MISSION
for k,v in next,CUSTOMENV do for k,v in next,CUSTOMENV do
GAME.modeEnv[k]=v GAME.modeEnv[k]=v
end end
if BAG[1]then if BAG[1] then
GAME.modeEnv.seqData=BAG GAME.modeEnv.seqData=BAG
else else
GAME.modeEnv.seqData=nil GAME.modeEnv.seqData=nil
end end
if MISSION[1]then if MISSION[1] then
GAME.modeEnv.mission=MISSION GAME.modeEnv.mission=MISSION
else else
GAME.modeEnv.mission=nil GAME.modeEnv.mission=nil
@@ -485,8 +485,8 @@ function applyCustomGame()--Apply CUSTOMENV, BAG, MISSION
end end
function loadGame(mode,ifQuickPlay,ifNet)--Load a mode and go to game scene function loadGame(mode,ifQuickPlay,ifNet)--Load a mode and go to game scene
freshDate() freshDate()
if legalGameTime()then if legalGameTime() then
if not MODES[mode]and FILE.isSafe('parts/modes/'..mode) then if not MODES[mode] and FILE.isSafe('parts/modes/'..mode) then
MODES[mode]=require('parts.modes.'..mode) MODES[mode]=require('parts.modes.'..mode)
MODES[mode].name=mode MODES[mode].name=mode
end end
@@ -503,9 +503,9 @@ function loadGame(mode,ifQuickPlay,ifNet)--Load a mode and go to game scene
if ifNet then if ifNet then
SCN.go('net_game','swipeD') SCN.go('net_game','swipeD')
else else
local modeText=text.modes[mode]or{"["..MODES[mode].name.."]",""} local modeText=text.modes[mode] or{"["..MODES[mode].name.."]",""}
TEXTOBJ.modeName:set(modeText[1].." "..modeText[2]) TEXTOBJ.modeName:set(modeText[1].." "..modeText[2])
SCN.go('game',ifQuickPlay and'swipeD'or'fade_togame') SCN.go('game',ifQuickPlay and 'swipeD' or 'fade_togame')
playSFX('enter') playSFX('enter')
end end
end end
@@ -531,10 +531,10 @@ function gameOver()--Save record
if R>0 then if R>0 then
GAME.rank=R GAME.rank=R
end end
if not GAME.replaying and M.score and scoreValid()then if not GAME.replaying and M.score and scoreValid() then
if RANKS[M.name]then--Old rank exist if RANKS[M.name] then--Old rank exist
local needSave local needSave
if R>RANKS[M.name]then if R>RANKS[M.name] then
RANKS[M.name]=R RANKS[M.name]=R
needSave=true needSave=true
end end
@@ -543,7 +543,7 @@ function gameOver()--Save record
for i=1,#M.unlock do for i=1,#M.unlock do
local m=M.unlock[i] local m=M.unlock[i]
local n=MODES[m].name local n=MODES[m].name
if not RANKS[n]then if not RANKS[n] then
if MODES[m].x then if MODES[m].x then
RANKS[n]=0 RANKS[n]=0
end end
@@ -560,7 +560,7 @@ function gameOver()--Save record
local L=M.records local L=M.records
local p=#L--Rank-1 local p=#L--Rank-1
if p>0 then if p>0 then
while M.comp(D,L[p])do--If higher rank while M.comp(D,L[p]) do--If higher rank
p=p-1 p=p-1
if p==0 then break end if p==0 then break end
end end
@@ -568,7 +568,7 @@ function gameOver()--Save record
if p<10 then if p<10 then
if p==0 then if p==0 then
P:_showText(text.newRecord,0,-100,100,'beat',.5) P:_showText(text.newRecord,0,-100,100,'beat',.5)
if SETTING.autoSave and DATA.saveReplay()then if SETTING.autoSave and DATA.saveReplay() then
GAME.saved=true GAME.saved=true
playSFX('connected') playSFX('connected')
MES.new('check',text.saveDone) MES.new('check',text.saveDone)
@@ -576,7 +576,7 @@ function gameOver()--Save record
end end
D.date=os.date("%Y/%m/%d %H:%M") D.date=os.date("%Y/%m/%d %H:%M")
ins(L,p+1,D) ins(L,p+1,D)
if L[11]then L[11]=nil end if L[11] then L[11]=nil end
saveFile(L,('record/%s.rec'):format(M.name),'-luaon') saveFile(L,('record/%s.rec'):format(M.name),'-luaon')
end end
end end
@@ -584,7 +584,7 @@ function gameOver()--Save record
end end
end end
function trySave() function trySave()
if not GAME.statSaved and PLAYERS[1]and PLAYERS[1].type=='human'and(PLAYERS[1].frameRun>300 or GAME.result)then if not GAME.statSaved and PLAYERS[1] and PLAYERS[1].type=='human' and (PLAYERS[1].frameRun>300 or GAME.result) then
GAME.statSaved=true GAME.statSaved=true
STAT.game=STAT.game+1 STAT.game=STAT.game+1
mergeStat(STAT,PLAYERS[1].stat) mergeStat(STAT,PLAYERS[1].stat)
@@ -605,35 +605,35 @@ do--function freshPlayerPosition(sudden)
--6~17 --6~17
(function() (function()
local L={{340,75,1}} local L={{340,75,1}}
for i=1,4 do ins(L,{15,-160+180*i,.25})end for i=1,4 do ins(L,{15,-160+180*i,.25}) end
for i=1,4 do ins(L,{180,-160+180*i,.25})end for i=1,4 do ins(L,{180,-160+180*i,.25}) end
for i=1,4 do ins(L,{950,-160+180*i,.25})end for i=1,4 do ins(L,{950,-160+180*i,.25}) end
for i=1,4 do ins(L,{1120,-160+180*i,.25})end for i=1,4 do ins(L,{1120,-160+180*i,.25}) end
return L return L
end)(), end)(),
--18~31 --18~31
(function() (function()
local L={{340,75,1}} local L={{340,75,1}}
for i=1,5 do ins(L,{10, -100+135*i,.18})end for i=1,5 do ins(L,{10, -100+135*i,.18}) end
for i=1,5 do ins(L,{120, -100+135*i,.18})end for i=1,5 do ins(L,{120, -100+135*i,.18}) end
for i=1,5 do ins(L,{230, -100+135*i,.18})end for i=1,5 do ins(L,{230, -100+135*i,.18}) end
for i=1,5 do ins(L,{940, -100+135*i,.18})end for i=1,5 do ins(L,{940, -100+135*i,.18}) end
for i=1,5 do ins(L,{1050,-100+135*i,.18})end for i=1,5 do ins(L,{1050,-100+135*i,.18}) end
for i=1,5 do ins(L,{1160,-100+135*i,.18})end for i=1,5 do ins(L,{1160,-100+135*i,.18}) end
return L return L
end)(), end)(),
--32~49 --32~49
(function() (function()
local L={{340,75,1}} local L={{340,75,1}}
for i=1,4 do for j=1,6 do ins(L,{78*i-54,115*j-98,.09})end end for i=1,4 do for j=1,6 do ins(L,{78*i-54,115*j-98,.09}) end end
for i=9,12 do for j=1,6 do ins(L,{78*i+267,115*j-98,.09})end end for i=9,12 do for j=1,6 do ins(L,{78*i+267,115*j-98,.09}) end end
return L return L
end)(), end)(),
--50~99 --50~99
(function() (function()
local L={{340,75,1}} local L={{340,75,1}}
for i=1,7 do for j=1,7 do ins(L,{46*i-36,97*j-72,.068})end end for i=1,7 do for j=1,7 do ins(L,{46*i-36,97*j-72,.068}) end end
for i=15,21 do for j=1,7 do ins(L,{46*i+264,97*j-72,.068})end end for i=15,21 do for j=1,7 do ins(L,{46*i+264,97*j-72,.068}) end end
return L return L
end)(), end)(),
} }
@@ -653,8 +653,8 @@ do--function freshPlayerPosition(sudden)
elseif #L<=99 then posList=posLists[5] elseif #L<=99 then posList=posLists[5]
else error("TOO MANY PLAYERS!") else error("TOO MANY PLAYERS!")
end end
local method=sudden and'setPosition'or'movePosition' local method=sudden and 'setPosition' or 'movePosition'
for i=1,#L do L[i][method](L[i],unpack(posList[i]))end for i=1,#L do L[i][method](L[i],unpack(posList[i])) end
end end
end end
do--function dumpBasicConfig() do--function dumpBasicConfig()
@@ -716,7 +716,7 @@ do--function resetGameData(args)
local function _copyGameSetting() local function _copyGameSetting()
local S={} local S={}
for _,key in next,gameSetting do for _,key in next,gameSetting do
if type(SETTING[key])=='table'then if type(SETTING[key])=='table' then
S[key]=TABLE.shift(SETTING[key]) S[key]=TABLE.shift(SETTING[key])
else else
S[key]=SETTING[key] S[key]=SETTING[key]
@@ -725,19 +725,19 @@ do--function resetGameData(args)
return S return S
end end
function resetGameData(args,seed) function resetGameData(args,seed)
if not args then args=""end if not args then args="" end
trySave() trySave()
GAME.result=false GAME.result=false
GAME.rank=0 GAME.rank=0
GAME.warnLVL0=0 GAME.warnLVL0=0
GAME.warnLVL=0 GAME.warnLVL=0
if args:find'r'then if args:find'r' then
GAME.frameStart=0 GAME.frameStart=0
GAME.recording=false GAME.recording=false
GAME.replaying=true GAME.replaying=true
else else
GAME.frameStart=args:find'n'and 0 or 180-SETTING.reTime*60 GAME.frameStart=args:find'n' and 0 or 180-SETTING.reTime*60
GAME.seed=seed or math.random(1046101471,2662622626) GAME.seed=seed or math.random(1046101471,2662622626)
GAME.pauseTime=0 GAME.pauseTime=0
GAME.pauseCount=0 GAME.pauseCount=0
@@ -761,12 +761,12 @@ do--function resetGameData(args)
VK.restore() VK.restore()
local bg=GAME.modeEnv.bg local bg=GAME.modeEnv.bg
BG.set(type(bg)=='string'and bg or type(bg)=='table'and bg[math.random(#bg)]) BG.set(type(bg)=='string' and bg or type(bg)=='table' and bg[math.random(#bg)])
local bgm=GAME.modeEnv.bgm local bgm=GAME.modeEnv.bgm
BGM.play(type(bgm)=='string'and bgm or type(bgm)=='table'and bgm[math.random(#bgm)]) BGM.play(type(bgm)=='string' and bgm or type(bgm)=='table' and bgm[math.random(#bgm)])
TEXT.clear() TEXT.clear()
if GAME.modeEnv.eventSet=='royale'then if GAME.modeEnv.eventSet=='royale' then
for i=1,#PLAYERS do for i=1,#PLAYERS do
PLAYERS[i]:changeAtk(randomTarget(PLAYERS[i])) PLAYERS[i]:changeAtk(randomTarget(PLAYERS[i]))
end end
@@ -825,23 +825,6 @@ end
--Game draw --Game draw
do--function drawSelfProfile() do--function drawSelfProfile()
local lvColor={COLOR.J,COLOR.A,COLOR.C,COLOR.N,COLOR.S,COLOR.V,COLOR.P,COLOR.M,COLOR.W,COLOR.R,COLOR.O,COLOR.Y}
local lvIcon=setmetatable({},{__index=function(self,lv)
local c=lvColor[int((lv-1)/26)+1]or COLOR.Z
local img=GC.DO{25,25,
{"clear",0,0,0,0},
{"setLW",2},
{"setCL",c[1],c[2],c[3],.6},
{"fRect",2,2,21,21,2},
{"setCL",c},
{"dRect",2,2,21,21,2},
{"setCL",COLOR.Z},
{"mText",(lv-1)%26+1,13,-1},
}
rawset(self,lv,img)
return img
end})
local name local name
local textObj,scaleK,width,offY local textObj,scaleK,width,offY
function drawSelfProfile() function drawSelfProfile()
@@ -857,7 +840,7 @@ do--function drawSelfProfile()
gc_draw(selfAvatar,-72,8,nil,.5) gc_draw(selfAvatar,-72,8,nil,.5)
--Draw username --Draw username
if name~=USERS.getUsername(USER.uid)then if name~=USERS.getUsername(USER.uid) then
name=USERS.getUsername(USER.uid) name=USERS.getUsername(USER.uid)
textObj=GC.newText(getFont(30),name) textObj=GC.newText(getFont(30),name)
width=textObj:getWidth() width=textObj:getWidth()
@@ -892,13 +875,13 @@ end
--Widget function shortcuts --Widget function shortcuts
function backScene()SCN.back()end function backScene() SCN.back() end
do--function goScene(name,style) do--function goScene(name,style)
local cache={} local cache={}
function goScene(name,style) function goScene(name,style)
local hash=style and name..style or name local hash=style and name..style or name
if not cache[hash]then if not cache[hash] then
cache[hash]=function()SCN.go(name,style)end cache[hash]=function() SCN.go(name,style) end
end end
return cache[hash] return cache[hash]
end end
@@ -907,8 +890,8 @@ do--function swapScene(name,style)
local cache={} local cache={}
function swapScene(name,style) function swapScene(name,style)
local hash=style and name..style or name local hash=style and name..style or name
if not cache[hash]then if not cache[hash] then
cache[hash]=function()SCN.swapTo(name,style)end cache[hash]=function() SCN.swapTo(name,style) end
end end
return cache[hash] return cache[hash]
end end
@@ -916,8 +899,8 @@ end
do--function pressKey(k) do--function pressKey(k)
local cache={} local cache={}
function pressKey(k) function pressKey(k)
if not cache[k]then if not cache[k] then
cache[k]=function()love.keypressed(k)end cache[k]=function() love.keypressed(k) end
end end
return cache[k] return cache[k]
end end
@@ -931,13 +914,13 @@ do--CUS/SETXXX(k)
'VKSwitch','VKIcon','VKTrack','VKDodge', 'VKSwitch','VKIcon','VKTrack','VKDodge',
'simpMode', 'simpMode',
} }
function CUSval(k)return function()return CUSTOMENV[k]end end function CUSval(k) return function() return CUSTOMENV[k] end end
function ROOMval(k)return function()return ROOMENV[k]end end function ROOMval(k) return function() return ROOMENV[k] end end
function SETval(k)return function()return SETTING[k]end end function SETval(k) return function() return SETTING[k] end end
function CUSrev(k)return function()CUSTOMENV[k]=not CUSTOMENV[k]end end function CUSrev(k) return function() CUSTOMENV[k]=not CUSTOMENV[k] end end
function ROOMrev(k)return function()ROOMENV[k]=not ROOMENV[k]end end function ROOMrev(k) return function() ROOMENV[k]=not ROOMENV[k] end end
function SETrev(k)return function()if TABLE.find(warnList,k)then trySettingWarn()end SETTING[k]=not SETTING[k]end end function SETrev(k) return function() if TABLE.find(warnList,k) then trySettingWarn() end SETTING[k]=not SETTING[k] end end
function CUSsto(k)return function(i)CUSTOMENV[k]=i end end function CUSsto(k) return function(i) CUSTOMENV[k]=i end end
function ROOMsto(k)return function(i)ROOMENV[k]=i end end function ROOMsto(k) return function(i) ROOMENV[k]=i end end
function SETsto(k)return function(i)if TABLE.find(warnList,k)then trySettingWarn()end SETTING[k]=i end end function SETsto(k) return function(i) if TABLE.find(warnList,k) then trySettingWarn() end SETTING[k]=i end end
end end

View File

@@ -6,13 +6,13 @@ BLOCK_NAMES={
'J5','L5','R','Y','N','H','I5', 'J5','L5','R','Y','N','H','I5',
'I3','C','I2','O1' 'I3','C','I2','O1'
} }
BLOCK_CHARS={}for i=1,#BLOCK_NAMES do BLOCK_CHARS[i]=CHAR.mino[BLOCK_NAMES[i]]end BLOCK_CHARS={} for i=1,#BLOCK_NAMES do BLOCK_CHARS[i]=CHAR.mino[BLOCK_NAMES[i]] end
BLOCK_COLORS={ BLOCK_COLORS={
COLOR.R,COLOR.F,COLOR.O,COLOR.Y,COLOR.L,COLOR.J,COLOR.G,COLOR.A, COLOR.R,COLOR.F,COLOR.O,COLOR.Y,COLOR.L,COLOR.J,COLOR.G,COLOR.A,
COLOR.C,COLOR.N,COLOR.S,COLOR.B,COLOR.V,COLOR.P,COLOR.M,COLOR.W, COLOR.C,COLOR.N,COLOR.S,COLOR.B,COLOR.V,COLOR.P,COLOR.M,COLOR.W,
COLOR.dH,COLOR.D,COLOR.lY,COLOR.H,COLOR.lH,COLOR.dV,COLOR.dR,COLOR.dG, COLOR.dH,COLOR.D,COLOR.lY,COLOR.H,COLOR.lH,COLOR.dV,COLOR.dR,COLOR.dG,
} }
RANK_CHARS={'B','A','S','U','X'}for i=1,#RANK_CHARS do RANK_CHARS[i]=CHAR.icon['rank'..RANK_CHARS[i]]end RANK_CHARS={'B','A','S','U','X'} for i=1,#RANK_CHARS do RANK_CHARS[i]=CHAR.icon['rank'..RANK_CHARS[i]] end
RANK_COLORS={ RANK_COLORS={
{.8,.86,.9}, {.8,.86,.9},
{.6,.9,.7}, {.6,.9,.7},
@@ -131,8 +131,8 @@ do--SVG_TITLE_FILL, SVG_TITLE_LINE
SVG_TITLE_LINE=TABLE.shift(SVG_TITLE_FILL) SVG_TITLE_LINE=TABLE.shift(SVG_TITLE_FILL)
SVG_TITLE_LINE[8],SVG_TITLE_LINE[9]={},{} SVG_TITLE_LINE[8],SVG_TITLE_LINE[9]={},{}
for j=1,16 do SVG_TITLE_LINE[8][j]=SVG_TITLE_FILL[8][j]end for j=1,16 do SVG_TITLE_LINE[8][j]=SVG_TITLE_FILL[8][j] end
for j=19,#SVG_TITLE_FILL[8]-2 do SVG_TITLE_LINE[9][j-18]=SVG_TITLE_FILL[8][j]end for j=19,#SVG_TITLE_FILL[8]-2 do SVG_TITLE_LINE[9][j-18]=SVG_TITLE_FILL[8][j] end
end end
do--SVG_TITLE_FAN do--SVG_TITLE_FAN
SVG_TITLE_FAN={} SVG_TITLE_FAN={}
@@ -166,7 +166,7 @@ do--MISSIONENUM
for k,v in next,L do ENUM_MISSION[k]=v end for k,v in next,L do ENUM_MISSION[k]=v end
end end
do--TEXTOBJ do--TEXTOBJ
local function T(s,t)return love.graphics.newText(getFont(s),t)end local function T(s,t) return love.graphics.newText(getFont(s),t) end
TEXTOBJ={ TEXTOBJ={
modeName=T(30), modeName=T(30),
@@ -347,93 +347,93 @@ do--Mod data
{no=0,id="NX",name="next", {no=0,id="NX",name="next",
key="q",x=80,y=230,color='lO', key="q",x=80,y=230,color='lO',
list={0,1,2,3,4,5,6}, list={0,1,2,3,4,5,6},
func=function(P,O)P.gameEnv.nextCount=O end, func=function(P,O) P.gameEnv.nextCount=O end,
unranked=true, unranked=true,
}, },
{no=1,id="HL",name="hold", {no=1,id="HL",name="hold",
key="w",x=200,y=230,color='lO', key="w",x=200,y=230,color='lO',
list={0,1,2,3,4,5,6}, list={0,1,2,3,4,5,6},
func=function(P,O)P.gameEnv.holdCount=O end, func=function(P,O) P.gameEnv.holdCount=O end,
unranked=true, unranked=true,
}, },
{no=2,id="FL",name="hideNext", {no=2,id="FL",name="hideNext",
key="e",x=320,y=230,color='lA', key="e",x=320,y=230,color='lA',
list={1,2,3,4,5}, list={1,2,3,4,5},
func=function(P,O)P.gameEnv.nextStartPos=O+1 end, func=function(P,O) P.gameEnv.nextStartPos=O+1 end,
unranked=true, unranked=true,
}, },
{no=3,id="IH",name="infHold", {no=3,id="IH",name="infHold",
key="r",x=440,y=230,color='lA', key="r",x=440,y=230,color='lA',
func=function(P)P.gameEnv.infHold=true end, func=function(P) P.gameEnv.infHold=true end,
unranked=true, unranked=true,
}, },
{no=4,id="HB",name="hideBlock", {no=4,id="HB",name="hideBlock",
key="y",x=680,y=230,color='lV', key="y",x=680,y=230,color='lV',
func=function(P)P.gameEnv.block=false end, func=function(P) P.gameEnv.block=false end,
unranked=true, unranked=true,
}, },
{no=5,id="HG",name="hideGhost", {no=5,id="HG",name="hideGhost",
key="u",x=800,y=230,color='lV', key="u",x=800,y=230,color='lV',
func=function(P)P.gameEnv.ghost=false end, func=function(P) P.gameEnv.ghost=false end,
unranked=true, unranked=true,
}, },
{no=6,id="HD",name="hidden", {no=6,id="HD",name="hidden",
key="i",x=920,y=230,color='lP', key="i",x=920,y=230,color='lP',
list={'easy','slow','medium','fast','none'}, list={'easy','slow','medium','fast','none'},
func=function(P,O)P.gameEnv.visible=O end, func=function(P,O) P.gameEnv.visible=O end,
unranked=true, unranked=true,
}, },
{no=7,id="HB",name="hideBoard", {no=7,id="HB",name="hideBoard",
key="o",x=1040,y=230,color='lP', key="o",x=1040,y=230,color='lP',
list={'down','up','all'}, list={'down','up','all'},
func=function(P,O)P.gameEnv.hideBoard=O end, func=function(P,O) P.gameEnv.hideBoard=O end,
unranked=true, unranked=true,
}, },
{no=8,id="FB",name="flipBoard", {no=8,id="FB",name="flipBoard",
key="p",x=1160,y=230,color='lJ', key="p",x=1160,y=230,color='lJ',
list={'U-D','L-R','180'}, list={'U-D','L-R','180'},
func=function(P,O)P.gameEnv.flipBoard=O end, func=function(P,O) P.gameEnv.flipBoard=O end,
unranked=true, unranked=true,
}, },
{no=9,id="DT",name="dropDelay", {no=9,id="DT",name="dropDelay",
key="a",x=140,y=350,color='lR', key="a",x=140,y=350,color='lR',
list={0,.125,.25,.5,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99}, list={0,.125,.25,.5,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99},
func=function(P,O)P.gameEnv.drop=O end, func=function(P,O) P.gameEnv.drop=O end,
unranked=true, unranked=true,
}, },
{no=10,id="LT",name="lockDelay", {no=10,id="LT",name="lockDelay",
key="s",x=260,y=350,color='lR', key="s",x=260,y=350,color='lR',
list={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99}, list={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99},
func=function(P,O)P.gameEnv.lock=O end, func=function(P,O) P.gameEnv.lock=O end,
unranked=true, unranked=true,
}, },
{no=11,id="ST",name="waitDelay", {no=11,id="ST",name="waitDelay",
key="d",x=380,y=350,color='lR', key="d",x=380,y=350,color='lR',
list={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, list={0,1,2,3,4,5,6,7,8,10,15,20,30,60},
func=function(P,O)P.gameEnv.wait=O end, func=function(P,O) P.gameEnv.wait=O end,
unranked=true, unranked=true,
}, },
{no=12,id="CT",name="fallDelay", {no=12,id="CT",name="fallDelay",
key="f",x=500,y=350,color='lR', key="f",x=500,y=350,color='lR',
list={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, list={0,1,2,3,4,5,6,7,8,10,15,20,30,60},
func=function(P,O)P.gameEnv.fall=O end, func=function(P,O) P.gameEnv.fall=O end,
unranked=true, unranked=true,
}, },
{no=13,id="LF",name="life", {no=13,id="LF",name="life",
key="j",x=860,y=350,color='lY', key="j",x=860,y=350,color='lY',
list={0,1,2,3,5,10,15,26,42,87,500}, list={0,1,2,3,5,10,15,26,42,87,500},
func=function(P,O)P.gameEnv.life=O end, func=function(P,O) P.gameEnv.life=O end,
unranked=true, unranked=true,
}, },
{no=14,id="FB",name="forceB2B", {no=14,id="FB",name="forceB2B",
key="k",x=980,y=350,color='lY', key="k",x=980,y=350,color='lY',
func=function(P)P.gameEnv.b2bKill=true end, func=function(P) P.gameEnv.b2bKill=true end,
unranked=true, unranked=true,
}, },
{no=15,id="PF",name="forceFinesse", {no=15,id="PF",name="forceFinesse",
key="l",x=1100,y=350,color='lY', key="l",x=1100,y=350,color='lY',
func=function(P)P.gameEnv.fineKill=true end, func=function(P) P.gameEnv.fineKill=true end,
unranked=true, unranked=true,
}, },
@@ -467,19 +467,19 @@ do--Mod data
{no=19,id="CS",name="customSeq", {no=19,id="CS",name="customSeq",
key="b",x=680,y=470,color='lB', key="b",x=680,y=470,color='lB',
list={'bag','bagES','his','hisPool','c2','rnd','mess','reverb'}, list={'bag','bagES','his','hisPool','c2','rnd','mess','reverb'},
func=function(P,O)P.gameEnv.sequence=O end, func=function(P,O) P.gameEnv.sequence=O end,
unranked=true, unranked=true,
}, },
{no=20,id="PS",name="pushSpeed", {no=20,id="PS",name="pushSpeed",
key="n",x=800,y=470,color='lB', key="n",x=800,y=470,color='lB',
list={.5,1,2,3,5,15,1e99}, list={.5,1,2,3,5,15,1e99},
func=function(P,O)P.gameEnv.pushSpeed=O end, func=function(P,O) P.gameEnv.pushSpeed=O end,
unranked=true, unranked=true,
}, },
{no=21,id="BN",name="boneBlock", {no=21,id="BN",name="boneBlock",
key="m",x=920,y=470,color='lB', key="m",x=920,y=470,color='lB',
list={'on','off'}, list={'on','off'},
func=function(P,O)P.gameEnv.bone=O=='on'end, func=function(P,O) P.gameEnv.bone=O=='on' end,
unranked=true, unranked=true,
}, },
} }
@@ -719,8 +719,8 @@ do--Userdata tables
piece=0,row=0,dig=0, piece=0,row=0,dig=0,
atk=0,digatk=0, atk=0,digatk=0,
send=0,recv=0,pend=0,off=0, send=0,recv=0,pend=0,off=0,
clear=(function()local L={}for i=1,29 do L[i]={0,0,0,0,0,0}end return L end)(), clear=(function() local L={} for i=1,29 do L[i]={0,0,0,0,0,0} end return L end)(),
spin=(function()local L={}for i=1,29 do L[i]={0,0,0,0,0,0,0}end return L end)(), spin=(function() local L={} for i=1,29 do L[i]={0,0,0,0,0,0,0} end return L end)(),
pc=0,hpc=0,b2b=0,b3b=0,score=0, pc=0,hpc=0,b2b=0,b3b=0,score=0,
lastPlay='sprint_10l',--Last played mode ID lastPlay='sprint_10l',--Last played mode ID
item=setmetatable({},{__index=function(self,k) item=setmetatable({},{__index=function(self,k)

View File

@@ -125,13 +125,13 @@ return{
"support afdian aidadian", "support afdian aidadian",
"org", "org",
FNNS and "The contents in this entry were hidden due to platform restrictions. Feel free to discuss these contents on our Discord server." or "To donate to Techmino via Aifadian, use the globe icon on the bottom right to open the URL. Aifadian charges a 6% transaction fee off your purchase.", FNNS and "The contents in this entry were hidden due to platform restrictions. Feel free to discuss these contents on our Discord server." or "To donate to Techmino via Aifadian, use the globe icon on the bottom right to open the URL. Aifadian charges a 6% transaction fee off your purchase.",
FNNS and"https://youtu.be/dQw4w9WgXcQ"or"https://afdian.net/@MrZ_26", FNNS and "https://youtu.be/dQw4w9WgXcQ" or "https://afdian.net/@MrZ_26",
}, },
{"Support 3", {"Support 3",
"support p\97\116\114\101\111\110", "support p\97\116\114\101\111\110",
"org", "org",
FNNS and "The contents in this entry were hidden due to platform restrictions. Feel free to discuss these contents on our Discord server." or "To donate to Techmino via P\97\116\114\101\111\110, click on the globe icon on the bottom right to open the URL. Notice that P\97\116\114\101\111\110 may charge you a service fee for transactions over a certain amount.", FNNS and "The contents in this entry were hidden due to platform restrictions. Feel free to discuss these contents on our Discord server." or "To donate to Techmino via P\97\116\114\101\111\110, click on the globe icon on the bottom right to open the URL. Notice that P\97\116\114\101\111\110 may charge you a service fee for transactions over a certain amount.",
FNNS and"https://youtu.be/dQw4w9WgXcQ"or"https://www.p\97\116\114\101\111\110.com/techmino", FNNS and "https://youtu.be/dQw4w9WgXcQ" or "https://www.p\97\116\114\101\111\110.com/techmino",
}, },
--Games --Games
@@ -891,7 +891,7 @@ return{
{"Rolling", {"Rolling",
"rolling", "rolling",
"term", "term",
"Another method of fast-tapping in high-gravity (around 1G) modes (with slow DAS/ARR setting).\nWhen you perform rolling, you fix the position of one hand and the controller, and then tap the back of the controller with fingers on your other hand repeatedly. This method allows even faster speeds than hypertapping (see “Hypertapping” for more)and requires much less effort.\nThis method was first discovered by Cheez-fish, and he has once achieved a tapping speed of more than 20 Hz.", "Another method of fast-tapping in high-gravity (around 1G) modes (with slow DAS/ARR setting).\nWhen you perform rolling, you fix the position of one hand and the controller, and then tap the back of the controller with fingers on your other hand repeatedly. This method allows even faster speeds than hypertapping (see “Hypertapping” for more) and requires much less effort.\nThis method was first discovered by Cheez-fish, and he has once achieved a tapping speed of more than 20 Hz.",
}, },
{"Passthrough", {"Passthrough",
"pingthrough", "pingthrough",

View File

@@ -89,13 +89,13 @@ return{
"support afdian サポート 寄付 支援", "support afdian サポート 寄付 支援",
"org", "org",
FNNS and "この機能はプラットフォームのポリシー制限が原因で使えません。うちらのDiscordサーバーでこの機能に関して話してください。ちなみに、ここにあるURLはリックくんです。" or "AifadianでTechminoに寄付する場合、 右下の地球儀のアイコンからURLを開いてください。注意としてAifadianは支払いの際に6%の手数料が取られます。", FNNS and "この機能はプラットフォームのポリシー制限が原因で使えません。うちらのDiscordサーバーでこの機能に関して話してください。ちなみに、ここにあるURLはリックくんです。" or "AifadianでTechminoに寄付する場合、 右下の地球儀のアイコンからURLを開いてください。注意としてAifadianは支払いの際に6%の手数料が取られます。",
FNNS and"https://youtu.be/dQw4w9WgXcQ"or"https://afdian.net/@MrZ_26", FNNS and "https://youtu.be/dQw4w9WgXcQ" or "https://afdian.net/@MrZ_26",
}, },
{"サポート3", {"サポート3",
"support サポート 寄付 支援 p\97\116\114\101\111\110", "support サポート 寄付 支援 p\97\116\114\101\111\110",
"org", "org",
FNNS and "この機能はプラットフォームのポリシー制限が原因で使えません。うちらのDiscordサーバーでこの機能に関して話してください。ちなみに、ここにあるURLはリックくんです。" or "P\97\116\114\101\111\110でTechminoに寄付する場合、 右下の地球儀のアイコンからURLを開いてください。注意としてP\97\116\114\101\111\110は支払いの際に7.9%の手数料、さらに3ドル以上の支払いの際に0.30米ドル分の手数料が取られます。", FNNS and "この機能はプラットフォームのポリシー制限が原因で使えません。うちらのDiscordサーバーでこの機能に関して話してください。ちなみに、ここにあるURLはリックくんです。" or "P\97\116\114\101\111\110でTechminoに寄付する場合、 右下の地球儀のアイコンからURLを開いてください。注意としてP\97\116\114\101\111\110は支払いの際に7.9%の手数料、さらに3ドル以上の支払いの際に0.30米ドル分の手数料が取られます。",
FNNS and"https://youtu.be/dQw4w9WgXcQ"or"https://www.p\97\116\114\101\111\110.com/techmino", FNNS and "https://youtu.be/dQw4w9WgXcQ" or "https://www.p\97\116\114\101\111\110.com/techmino",
}, },
--Games --Games
@@ -828,7 +828,7 @@ return{
{"Rolling", {"Rolling",
"rolling", "rolling",
"term", "term",
"Another method of fast-tapping in high-gravity (around 1G) modes (with slow DAS/ARR setting).\nWhen you perform rolling, you fix the position of one hand and the controller, and then tap the back of the controller with fingers on your other hand repeatedly. This method allows even faster moving speeds than hypertapping (see \"Hypertapping\" for more)and requires much less effort.\nThis method was first discovered by Cheez-fish and he has once achieved a tapping speed of more than 20 Hz.", "Another method of fast-tapping in high-gravity (around 1G) modes (with slow DAS/ARR setting).\nWhen you perform rolling, you fix the position of one hand and the controller, and then tap the back of the controller with fingers on your other hand repeatedly. This method allows even faster moving speeds than hypertapping (see \"Hypertapping\" for more) and requires much less effort.\nThis method was first discovered by Cheez-fish and he has once achieved a tapping speed of more than 20 Hz.",
}, },
{"Passthrough", {"Passthrough",
"pingthrough", "pingthrough",

View File

@@ -117,13 +117,13 @@ return{
"support aifadian afdian zanzhu daqian", "support aifadian afdian zanzhu daqian",
"org", "org",
"Afdian", "Afdian",
FNNS and"https://b23.tv/BV1uT4y1P7CX"or"https://afdian.net/@MrZ_26", FNNS and "https://b23.tv/BV1uT4y1P7CX" or "https://afdian.net/@MrZ_26",
}, },
{"赞助3", {"赞助3",
"support zanzhu daqian", "support zanzhu daqian",
"org", "org",
"P\97\116\114\101\111\110", "P\97\116\114\101\111\110",
FNNS and"https://b23.tv/BV1uT4y1P7CX"or"https://www.p\97\116\114\101\111\110.com/techmino", FNNS and "https://b23.tv/BV1uT4y1P7CX" or "https://www.p\97\116\114\101\111\110.com/techmino",
}, },
--游戏(题库) --游戏(题库)

View File

@@ -205,8 +205,8 @@ return{
"Make sure to get the game only from official sources,", "Make sure to get the game only from official sources,",
"as we cant make sure youre safe if you got it elsewhere.", "as we cant make sure youre safe if you got it elsewhere.",
"The author is not responsible for any modifications.", "The author is not responsible for any modifications.",
FNNS and"/"or"While the game is free, donations are appreciated.", FNNS and "/" or "While the game is free, donations are appreciated.",
FNNS and"/"or"Check Zictionary for more", FNNS and "/" or "Check Zictionary for more",
}, },
staff={ staff={
"ORIGINALLY BY MrZ", "ORIGINALLY BY MrZ",
@@ -919,7 +919,7 @@ return{
"Headphones recommended for a better experience.", "Headphones recommended for a better experience.",
"Hello world!", "Hello world!",
"I3 and L3 are the only two unique triminoes.", "I3 and L3 are the only two unique triminoes.",
"if a==true", " if a==true",
"Increase your frame rate for a better experience.", "Increase your frame rate for a better experience.",
"Initial [insert action] system can save you.", "Initial [insert action] system can save you.",
"Is B2B2B2B possible?", "Is B2B2B2B possible?",
@@ -967,7 +967,7 @@ return{
"What about 23 PCs in 100 lines?", "What about 23 PCs in 100 lines?",
"What about 26 TSDs?", "What about 26 TSDs?",
"What is this cheap UI & music smh", "What is this cheap UI & music smh",
"while(false)", " while (false)",
"You are a Grand Master!", "You are a Grand Master!",
"You are welcome to help us to make BGMs and SFXs!", "You are welcome to help us to make BGMs and SFXs!",
"You can connect a keyboard to your phone or tablet (not functional on iOS though).", "You can connect a keyboard to your phone or tablet (not functional on iOS though).",

View File

@@ -205,8 +205,8 @@ return{
"Por favor descarga el juego únicamente desde los sitios oficiales,", "Por favor descarga el juego únicamente desde los sitios oficiales,",
"ya que no podemos asegurar que sea seguro si proviene de otro lado.", "ya que no podemos asegurar que sea seguro si proviene de otro lado.",
"El autor no se responabiliza por daños ocasionados debido a modificaciones del juego.", "El autor no se responabiliza por daños ocasionados debido a modificaciones del juego.",
FNNS and"/"or"El juego es gratuito, pero se aprecian donaciones.", FNNS and "/" or "El juego es gratuito, pero se aprecian donaciones.",
FNNS and"/"or"Ve el Zictionary (en inglés) para más info.", FNNS and "/" or "Ve el Zictionary (en inglés) para más info.",
}, },
staff={ staff={
"ORIGINAL DE MrZ", "ORIGINAL DE MrZ",

View File

@@ -172,8 +172,8 @@ return{
"Ce jeu est gratuit et est uniquement disponible via discord.gg/f9pUvkh", "Ce jeu est gratuit et est uniquement disponible via discord.gg/f9pUvkh",
"Ne téléchargez pas ce jeu depuis une autre source au risque d'avoir des virus,", "Ne téléchargez pas ce jeu depuis une autre source au risque d'avoir des virus,",
"et vous n'avez besoin que des permissions de vibration et de communication réseau pour les versions mobiles !", "et vous n'avez besoin que des permissions de vibration et de communication réseau pour les versions mobiles !",
FNNS and"/"or"Le créateur n'est pas responsable pour n'importe quel type de perte de données suite à une modification du jeu.", FNNS and "/" or "Le créateur n'est pas responsable pour n'importe quel type de perte de données suite à une modification du jeu.",
-- FNNS and"/"or"Check Zictionary for more", -- FNNS and "/" or "Check Zictionary for more",
}, },
staff={ staff={
"À L'ORIGINE PAR MrZ", "À L'ORIGINE PAR MrZ",

View File

@@ -206,8 +206,8 @@ return{
"Pastikan untuk mendapat permainan ini hanya dari sumber resmi,", "Pastikan untuk mendapat permainan ini hanya dari sumber resmi,",
"karena kita tidak bisa meyakinkan Anda aman jika Anda mendapat permainan ini dari sumber lain.", "karena kita tidak bisa meyakinkan Anda aman jika Anda mendapat permainan ini dari sumber lain.",
"Penciptanya tidak bertanggung jawab untuk modifikasi.", "Penciptanya tidak bertanggung jawab untuk modifikasi.",
FNNS and"/"or"Permainan ini gratis, tetapi sumbangan sangat dihargai.", FNNS and "/" or "Permainan ini gratis, tetapi sumbangan sangat dihargai.",
-- FNNS and"/"or"Check Zictionary for more", -- FNNS and "/" or "Check Zictionary for more",
}, },
staff={ staff={
"ASLI OLEH MrZ", "ASLI OLEH MrZ",
@@ -911,7 +911,7 @@ return{
"Headphone direkomendasikan untuk pengalaman yang lebih baik.", "Headphone direkomendasikan untuk pengalaman yang lebih baik.",
"Hello world!", "Hello world!",
"Hanya ada 2 jenis trimino, yaitu I3 dan L3.", "Hanya ada 2 jenis trimino, yaitu I3 dan L3.",
"if a==true", " if a==true",
"Tingkatkan frekuensi gambar Anda untuk pengalaman yang lebih baik.", "Tingkatkan frekuensi gambar Anda untuk pengalaman yang lebih baik.",
"Sistem [tindakan] awal dapat menyelamatkan Anda.", "Sistem [tindakan] awal dapat menyelamatkan Anda.",
"Apakah B2B2B2B mungkin?", "Apakah B2B2B2B mungkin?",
@@ -955,7 +955,7 @@ return{
"Bagaimana dengan 20 PCs?", "Bagaimana dengan 20 PCs?",
"Bagaimana dengan 23 PCs dalam 100 baris?", "Bagaimana dengan 23 PCs dalam 100 baris?",
"Bagaimana dengan 26 TSDs?", "Bagaimana dengan 26 TSDs?",
"while(false)", " while (false)",
"Anda adalah seorang jago!", "Anda adalah seorang jago!",
"Anda dipersilakan untuk membantu kami membuat musik dan efek suara!", "Anda dipersilakan untuk membantu kami membuat musik dan efek suara!",
"Anda dapat menghubungkan keyboard ke ponsel atau tablet Anda (tetapi tidak berfungsi di iOS).", "Anda dapat menghubungkan keyboard ke ponsel atau tablet Anda (tetapi tidak berfungsi di iOS).",

View File

@@ -207,8 +207,8 @@ return{
"ゲームは、必ず公式から入手してください", "ゲームは、必ず公式から入手してください",
"他から入手した場合は、安全性を保証しません", "他から入手した場合は、安全性を保証しません",
"同時に作者は、責任を負いません", "同時に作者は、責任を負いません",
FNNS and"/"or"ゲーム自体は無料ですが、寄付できるならありがたいです。", FNNS and "/" or "ゲーム自体は無料ですが、寄付できるならありがたいです。",
FNNS and"/"or"詳しくはZictionaryをご覧ください", FNNS and "/" or "詳しくはZictionaryをご覧ください",
}, },
staff={ staff={
"作者「MrZ」", "作者「MrZ」",
@@ -952,7 +952,7 @@ getTip={refuseCopy=true,
"Techminoは\"Technique\"\"Tetromino\"を掛け合わせ造語です!", "Techminoは\"Technique\"\"Tetromino\"を掛け合わせ造語です!",
"Techminoプレイヤーの未来はあなた達のものです!", "Techminoプレイヤーの未来はあなた達のものです!",
"TetroDictionary is now available in English.", "TetroDictionary is now available in English.",
"while(false)", " while (false)",
"ZS JL T O I", "ZS JL T O I",
"ゲーム内にはモード選択マップからじゃ入れない隠しモードがいくつかあります!", "ゲーム内にはモード選択マップからじゃ入れない隠しモードがいくつかあります!",
"このゲームでは全てのSpinに火力補正があります!", "このゲームでは全てのSpinに火力補正があります!",

View File

@@ -194,8 +194,8 @@ return{
"certifique-se de pegar o jogo de fontes oficiais;", "certifique-se de pegar o jogo de fontes oficiais;",
"binários obtidos em outros lugares pode conter malware.", "binários obtidos em outros lugares pode conter malware.",
"O autor não é responsável por qualquer binários modificados", "O autor não é responsável por qualquer binários modificados",
FNNS and"/"or"O jogo é gratis, mas doações são apreciadas.", FNNS and "/" or "O jogo é gratis, mas doações são apreciadas.",
-- FNNS and"/"or"Check Zictionary for more", -- FNNS and "/" or "Check Zictionary for more",
}, },
staff={ staff={
"ORIGINALMENTE POR MrZ", "ORIGINALMENTE POR MrZ",
@@ -890,7 +890,7 @@ return{
"Tem alguma sugestão? Posta elas em nosso Discord!", "Tem alguma sugestão? Posta elas em nosso Discord!",
"Fones recomendados para uma melhor experiência.", "Fones recomendados para uma melhor experiência.",
"Olá mundo!", "Olá mundo!",
"if a==true", " if a==true",
"Aumente sua frame rate para uma experiência melhor.", "Aumente sua frame rate para uma experiência melhor.",
"O sistema de [ação] inicial pode salvar sua vida.", "O sistema de [ação] inicial pode salvar sua vida.",
"Será B2B2B2B possível?", "Será B2B2B2B possível?",
@@ -925,7 +925,7 @@ return{
"Que tal 20 PCs?", "Que tal 20 PCs?",
"Que tal 23 PCs em 100 linhas?", "Que tal 23 PCs em 100 linhas?",
"Que tal 26 TSDs?", "Que tal 26 TSDs?",
"while(false)", " while (false)",
"Você e um Grand Master!", "Você e um Grand Master!",
"Pode conectar um teclado ao seu celular!", "Pode conectar um teclado ao seu celular!",
"Você pode fazer spins com 28 de 29 minoes!", "Você pode fazer spins com 28 de 29 minoes!",

View File

@@ -542,7 +542,7 @@ return{
getTip=function() getTip=function()
local L="!@#$%^&*()-=_+[]{}\\|;:\'\",<.>/?" local L="!@#$%^&*()-=_+[]{}\\|;:\'\",<.>/?"
local s="" local s=""
for _=1,math.random(16,26)do for _=1,math.random(16,26) do
local p=math.random(#L) local p=math.random(#L)
s=s..L:sub(p,p) s=s..L:sub(p,p)
end end

View File

@@ -206,8 +206,8 @@ return{
"仅通过官网 *暂无域名,见词典* 免费下载/更新", "仅通过官网 *暂无域名,见词典* 免费下载/更新",
"其他渠道获得游戏皆有被修改/加广告/植入病毒的风险,程序只申请了振动&联网权限!", "其他渠道获得游戏皆有被修改/加广告/植入病毒的风险,程序只申请了振动&联网权限!",
"若由于被修改的本游戏产生的各种损失作者不负责(怎么负责啊我又没法管)", "若由于被修改的本游戏产生的各种损失作者不负责(怎么负责啊我又没法管)",
FNNS and"/"or"请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~", FNNS and "/" or "请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~",
FNNS and"/"or"更多信息见小z词典", FNNS and "/" or "更多信息见小z词典",
}, },
staff={ staff={
"原作者 MrZ", "原作者 MrZ",
@@ -1011,7 +1011,7 @@ return{
"git commit", "git commit",
"git push -f", "git push -f",
"hello world", "hello world",
"if a==true", " if a==true",
"l-=-1", "l-=-1",
"shutdown -h now", "shutdown -h now",
"sudo rm -rf /*", "sudo rm -rf /*",
@@ -1021,7 +1021,7 @@ return{
"Techmino.exe 已停止工作", "Techmino.exe 已停止工作",
"TechminOS coming s∞n", "TechminOS coming s∞n",
"viod main[]", "viod main[]",
"while(false)", " while (false)",
-- 其他乱七八糟梗 -- 其他乱七八糟梗
"啊哈哈哈哈哈T块来咯", "啊哈哈哈哈哈T块来咯",

View File

@@ -62,10 +62,10 @@ return{
page="Page=", page="Page=",
cc_fixed="if (AI==CC and Sequence==Fixed) then Error(); end", cc_fixed=" if (AI==CC and Sequence==Fixed) then Error(); end",
cc_swap="if (AI==CC and Hold.Mode==Swap) then Error(); end", cc_swap=" if (AI==CC and Hold.Mode==Swap) then Error(); end",
ai_prebag="if (AI==true and Ctm.Seq~=Tetromino) then Error(); end", ai_prebag=" if (AI==true and Ctm.Seq~=Tetromino) then Error(); end",
ai_mission="if (AI==true and Ctm.Mission~=true) then Error(); end", ai_mission=" if (AI==true and Ctm.Mission~=true) then Error(); end",
switchSpawnSFX="SpawnSFX=false", switchSpawnSFX="SpawnSFX=false",
needRestart="NeedRestart=true", needRestart="NeedRestart=true",
@@ -96,7 +96,7 @@ return{
noScore="NoScore=true", noScore="NoScore=true",
modeLocked="Locked=true", modeLocked="Locked=true",
unlockHint="if (PreviousMode<=B) then Unlock();", unlockHint=" if (PreviousMode<=B) then Unlock();",
highScore="HighScore", highScore="HighScore",
newRecord="NewRecord=true", newRecord="NewRecord=true",
@@ -206,8 +206,8 @@ return{
"仅通过官网 *暂无域名,见词典* 免费下载/更新", "仅通过官网 *暂无域名,见词典* 免费下载/更新",
"其他渠道获得游戏皆有被修改/加广告/植入病毒的风险,程序只申请了振动&联网权限!", "其他渠道获得游戏皆有被修改/加广告/植入病毒的风险,程序只申请了振动&联网权限!",
"若由于被修改的本游戏产生的各种损失作者不负责(怎么负责啊我又没法管)", "若由于被修改的本游戏产生的各种损失作者不负责(怎么负责啊我又没法管)",
FNNS and"/"or"请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~", FNNS and "/" or "请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~",
FNNS and"/"or"更多信息见小z词典*/", FNNS and "/" or "更多信息见小z词典*/",
}, },
staff={ staff={
"原作者 MrZ", "原作者 MrZ",

View File

@@ -206,8 +206,8 @@ return{
"僅透過內測QQ群/discord伺服器進行免費下載/更新", "僅透過內測QQ群/discord伺服器進行免費下載/更新",
"從其他渠道獲得遊戲皆有被修改/加入廣告/植入病毒的風險,程序只申請了振動&網路權限!", "從其他渠道獲得遊戲皆有被修改/加入廣告/植入病毒的風險,程序只申請了振動&網路權限!",
"若由於被修改的本遊戲產生的各種損失作者概不負責(我怎麼負責啊跟我有什麼關係)", "若由於被修改的本遊戲產生的各種損失作者概不負責(我怎麼負責啊跟我有什麼關係)",
FNNS and"/"or"請從正規途徑獲得最新版,遊戲現為免費,不過有打賞當然感謝啦~", FNNS and "/" or "請從正規途徑獲得最新版,遊戲現為免費,不過有打賞當然感謝啦~",
FNNS and"/"or"更多資訊見小z詞典" FNNS and "/" or "更多資訊見小z詞典"
}, },
staff={ staff={
"原作者 MrZ", "原作者 MrZ",

View File

@@ -7,9 +7,9 @@ return{
eventSet='attacker_h', eventSet='attacker_h',
bg='rainbow2',bgm='shining terminal', bg='rainbow2',bgm='shining terminal',
}, },
score=function(P)return{P.modeData.wave,P.stat.time}end, score=function(P) return{P.modeData.wave,P.stat.time} end,
scoreDisp=function(D)return D[1].." Waves "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Waves "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local W=P.modeData.wave local W=P.modeData.wave
return return

View File

@@ -6,9 +6,9 @@ return{
eventSet='attacker_u', eventSet='attacker_u',
bg='rainbow2',bgm='shining terminal', bg='rainbow2',bgm='shining terminal',
}, },
score=function(P)return{P.modeData.wave,P.stat.time}end, score=function(P) return{P.modeData.wave,P.stat.time} end,
scoreDisp=function(D)return D[1].." Waves "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Waves "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local W=P.modeData.wave local W=P.modeData.wave
return return

View File

@@ -13,9 +13,9 @@ return{
end, end,
bg='tunnel',bgm='echo', bg='tunnel',bgm='echo',
}, },
score=function(P)return{math.min(math.floor(P.stat.atk),100),P.stat.time}end, score=function(P) return{math.min(math.floor(P.stat.atk),100),P.stat.time} end,
scoreDisp=function(D)return D[1].." Attack "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Attack "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local L=P.stat.atk local L=P.stat.atk
if L>=100 then if L>=100 then

View File

@@ -13,9 +13,9 @@ return{
end, end,
bg='blockhole',bgm='echo', bg='blockhole',bgm='echo',
}, },
score=function(P)return{math.min(math.floor(P.stat.atk),100),P.stat.time}end, score=function(P) return{math.min(math.floor(P.stat.atk),100),P.stat.time} end,
scoreDisp=function(D)return D[1].." Attack "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Attack "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local L=P.stat.atk local L=P.stat.atk
if L>=100 then if L>=100 then

View File

@@ -12,9 +12,9 @@ return{
end, end,
bg='tunnel',bgm='echo', bg='tunnel',bgm='echo',
}, },
score=function(P)return{math.min(math.floor(P.stat.atk),100),P.stat.time}end, score=function(P) return{math.min(math.floor(P.stat.atk),100),P.stat.time} end,
scoreDisp=function(D)return D[1].." Attack "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Attack "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local L=P.stat.atk local L=P.stat.atk
if L>=100 then if L>=100 then

View File

@@ -13,9 +13,9 @@ return{
end, end,
bg='blockhole',bgm='echo', bg='blockhole',bgm='echo',
}, },
score=function(P)return{math.min(math.floor(P.stat.atk),100),P.stat.time}end, score=function(P) return{math.min(math.floor(P.stat.atk),100),P.stat.time} end,
scoreDisp=function(D)return D[1].." Attack "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Attack "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local L=P.stat.atk local L=P.stat.atk
if L>=100 then if L>=100 then

View File

@@ -7,9 +7,9 @@ return{
eventSet='big_h', eventSet='big_h',
bg='cubes',bgm='push', bg='cubes',bgm='push',
}, },
score=function(P)return{math.min(P.stat.row,200),P.stat.time}end, score=function(P) return{math.min(P.stat.row,200),P.stat.time} end,
scoreDisp=function(D)return D[1].." Lines "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Lines "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local L=P.stat.row local L=P.stat.row
if L>=200 then if L>=200 then

View File

@@ -7,9 +7,9 @@ return{
eventSet='big_n', eventSet='big_n',
bg='bg2',bgm='push', bg='bg2',bgm='push',
}, },
score=function(P)return{math.min(P.stat.row,200),P.stat.time}end, score=function(P) return{math.min(P.stat.row,200),P.stat.time} end,
scoreDisp=function(D)return D[1].." Lines "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Lines "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local L=P.stat.row local L=P.stat.row
if L>=200 then if L>=200 then

View File

@@ -7,9 +7,9 @@ return{
eventSet='checkLine_200', eventSet='checkLine_200',
bg='glow',bgm='sugar fairy', bg='glow',bgm='sugar fairy',
}, },
score=function(P)return{math.min(P.stat.row,200),P.stat.time}end, score=function(P) return{math.min(P.stat.row,200),P.stat.time} end,
scoreDisp=function(D)return D[1].." Lines "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Lines "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local L=P.stat.row local L=P.stat.row
if L>=200 then if L>=200 then

View File

@@ -10,9 +10,9 @@ return{
eventSet='checkLine_200', eventSet='checkLine_200',
bg='rgb',bgm='sugar fairy', bg='rgb',bgm='sugar fairy',
}, },
score=function(P)return{math.min(P.stat.row,200),P.stat.time}end, score=function(P) return{math.min(P.stat.row,200),P.stat.time} end,
scoreDisp=function(D)return D[1].." Lines "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Lines "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local L=P.stat.row local L=P.stat.row
if L>=200 then if L>=200 then

View File

@@ -11,9 +11,9 @@ return{
eventSet='checkLine_200', eventSet='checkLine_200',
bg='rgb',bgm='sugar fairy', bg='rgb',bgm='sugar fairy',
}, },
score=function(P)return{math.min(P.stat.row,200),P.stat.time}end, score=function(P) return{math.min(P.stat.row,200),P.stat.time} end,
scoreDisp=function(D)return D[1].." Lines "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Lines "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local L=P.stat.row local L=P.stat.row
if L>=200 then if L>=200 then

View File

@@ -7,9 +7,9 @@ return{
eventSet='checkLine_200', eventSet='checkLine_200',
bg='glow',bgm='sugar fairy', bg='glow',bgm='sugar fairy',
}, },
score=function(P)return{math.min(P.stat.row,200),P.stat.time}end, score=function(P) return{math.min(P.stat.row,200),P.stat.time} end,
scoreDisp=function(D)return D[1].." Lines "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Lines "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local L=P.stat.row local L=P.stat.row
if L>=200 then if L>=200 then

View File

@@ -10,9 +10,9 @@ return{
eventSet='checkLine_100', eventSet='checkLine_100',
bg='rgb',bgm='far', bg='rgb',bgm='far',
}, },
score=function(P)return{math.min(P.stat.row,100),P.stat.time}end, score=function(P) return{math.min(P.stat.row,100),P.stat.time} end,
scoreDisp=function(D)return D[1].." Lines "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Lines "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local L=P.stat.row local L=P.stat.row
return return

View File

@@ -59,9 +59,9 @@ return{
MES.new('warn',text.switchSpawnSFX) MES.new('warn',text.switchSpawnSFX)
end end
end, end,
score=function(P)return{min(P.stat.row,40),P.stat.time}end, score=function(P) return{min(P.stat.row,40),P.stat.time} end,
scoreDisp=function(D)return D[1].." Lines "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Lines "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local L=P.stat.row local L=P.stat.row
return return

View File

@@ -6,9 +6,9 @@ return{
eventSet='c4wBase', eventSet='c4wBase',
bg='rgb',bgm='oxygen', bg='rgb',bgm='oxygen',
}, },
score=function(P)return{math.min(P.modeData.maxCombo,100),P.stat.time}end, score=function(P) return{math.min(P.modeData.maxCombo,100),P.stat.time} end,
scoreDisp=function(D)return D[1].." Combo "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Combo "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local L=P.modeData.maxCombo local L=P.modeData.maxCombo
if L==100 then if L==100 then

View File

@@ -6,9 +6,9 @@ return{
eventSet='c4wBase', eventSet='c4wBase',
bg='rgb',bgm='oxygen', bg='rgb',bgm='oxygen',
}, },
score=function(P)return{math.min(P.modeData.maxCombo,100),P.stat.time}end, score=function(P) return{math.min(P.modeData.maxCombo,100),P.stat.time} end,
scoreDisp=function(D)return D[1].." Combo "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Combo "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local L=P.stat.row local L=P.stat.row
if L==100 then if L==100 then

View File

@@ -7,9 +7,9 @@ return{
bg='rgb',bgm='1980s', bg='rgb',bgm='1980s',
}, },
slowMark=true, slowMark=true,
score=function(P)return{P.stat.score,P.stat.row}end, score=function(P) return{P.stat.score,P.stat.row} end,
scoreDisp=function(D)return D[1].." "..D[2].." Lines"end, scoreDisp=function(D) return D[1].." "..D[2].." Lines" end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[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) getRank=function(P)
local L=P.stat.row local L=P.stat.row
return return

View File

@@ -7,9 +7,9 @@ return{
bg='rgb',bgm='1980s', bg='rgb',bgm='1980s',
}, },
slowMark=true, slowMark=true,
score=function(P)return{P.stat.score,P.stat.row}end, score=function(P) return{P.stat.score,P.stat.row} end,
scoreDisp=function(D)return D[1].." "..D[2].." Lines"end, scoreDisp=function(D) return D[1].." "..D[2].." Lines" end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[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) getRank=function(P)
local L=P.stat.row local L=P.stat.row
return return

View File

@@ -7,9 +7,9 @@ return{
bg='rgb',bgm='1980s', bg='rgb',bgm='1980s',
}, },
slowMark=true, slowMark=true,
score=function(P)return{P.stat.score,P.stat.row}end, score=function(P) return{P.stat.score,P.stat.row} end,
scoreDisp=function(D)return D[1].." "..D[2].." Lines"end, scoreDisp=function(D) return D[1].." "..D[2].." Lines" end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[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) getRank=function(P)
local L=P.stat.row local L=P.stat.row
return return

View File

@@ -7,9 +7,9 @@ return{
bg='rgb',bgm='1980s', bg='rgb',bgm='1980s',
}, },
slowMark=true, slowMark=true,
score=function(P)return{P.stat.score,P.stat.row}end, score=function(P) return{P.stat.score,P.stat.row} end,
scoreDisp=function(D)return D[1].." "..D[2].." Lines"end, scoreDisp=function(D) return D[1].." "..D[2].." Lines" end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[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) getRank=function(P)
local L=P.stat.row local L=P.stat.row
return return

View File

@@ -12,9 +12,9 @@ return{
PLY.newPlayer(1) PLY.newPlayer(1)
local AItype=GAME.modeEnv.opponent:sub(1,2) local AItype=GAME.modeEnv.opponent:sub(1,2)
local AIlevel=tonumber(GAME.modeEnv.opponent:sub(-1)) local AIlevel=tonumber(GAME.modeEnv.opponent:sub(-1))
if AItype=='9S'then if AItype=='9S' then
PLY.newAIPlayer(2,BOT.template{type='9S',speedLV=2*AIlevel,hold=true}) PLY.newAIPlayer(2,BOT.template{type='9S',speedLV=2*AIlevel,hold=true})
elseif AItype=='CC'then 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}) PLY.newAIPlayer(2,BOT.template{type='CC',speedLV=2*AIlevel-1,next=math.floor(AIlevel*.5+1),hold=true,node=20000+5000*AIlevel})
end end

View File

@@ -3,14 +3,14 @@ local ply_applyField=PLY.draw.applyField
return{ return{
env={ env={
fkey1=function(P)P.modeData.showMark=1-P.modeData.showMark end, fkey1=function(P) P.modeData.showMark=1-P.modeData.showMark end,
hook_drop=function(P) hook_drop=function(P)
local D=P.modeData local D=P.modeData
local F=FIELD[D.finished+1] local F=FIELD[D.finished+1]
for y=1,#F do for y=1,#F do
local L=P.field[y] local L=P.field[y]
for x=1,10 do for x=1,10 do
local a,b=F[y][x],L and L[x]or 0 local a,b=F[y][x],L and L[x] or 0
if a~=0 then if a~=0 then
if a==-1 then if b>0 then return end if a==-1 then if b>0 then return end
elseif a<12 then if a~=b then return end elseif a<12 then if a~=b then return end
@@ -20,7 +20,7 @@ return{
end end
end end
D.finished=D.finished+1 D.finished=D.finished+1
if FIELD[D.finished+1]then if FIELD[D.finished+1] then
P.waiting=26 P.waiting=26
for _=#P.field,1,-1 do for _=#P.field,1,-1 do
P.field[_],P.visTime[_]=nil P.field[_],P.visTime[_]=nil
@@ -54,9 +54,9 @@ return{
local AItype=GAME.modeEnv.opponent:sub(1,2) local AItype=GAME.modeEnv.opponent:sub(1,2)
local AIlevel=tonumber(GAME.modeEnv.opponent:sub(-1)) local AIlevel=tonumber(GAME.modeEnv.opponent:sub(-1))
PLY.newPlayer(1) PLY.newPlayer(1)
if AItype=='9S'then if AItype=='9S' then
PLY.newAIPlayer(2,BOT.template{type='9S',speedLV=2*AIlevel,hold=true}) PLY.newAIPlayer(2,BOT.template{type='9S',speedLV=2*AIlevel,hold=true})
elseif AItype=='CC'then 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}) PLY.newAIPlayer(2,BOT.template{type='CC',speedLV=2*AIlevel-1,next=math.floor(AIlevel*.5+1),hold=true,node=20000+5000*AIlevel})
end end
end, end,

View File

@@ -6,9 +6,9 @@ return{
eventSet='defender_l', eventSet='defender_l',
bg='rainbow2',bgm='storm', bg='rainbow2',bgm='storm',
}, },
score=function(P)return{P.modeData.wave,P.stat.time}end, score=function(P) return{P.modeData.wave,P.stat.time} end,
scoreDisp=function(D)return D[1].." Waves "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Waves "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local W=P.modeData.wave local W=P.modeData.wave
return return

View File

@@ -6,9 +6,9 @@ return{
eventSet='defender_n', eventSet='defender_n',
bg='rainbow2',bgm='storm', bg='rainbow2',bgm='storm',
}, },
score=function(P)return{P.modeData.wave,P.stat.time}end, score=function(P) return{P.modeData.wave,P.stat.time} end,
scoreDisp=function(D)return D[1].." Waves "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Waves "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local W=P.modeData.wave local W=P.modeData.wave
return return

View File

@@ -4,9 +4,9 @@ return{
eventSet='dig_100l', eventSet='dig_100l',
bg='bg2',bgm='way', bg='bg2',bgm='way',
}, },
score=function(P)return{P.stat.time,P.stat.piece}end, score=function(P) return{P.stat.time,P.stat.piece} end,
scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, scoreDisp=function(D) return STRING.time(D[1]).." "..D[2].." Pieces" end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[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) getRank=function(P)
if P.stat.dig<100 then return end if P.stat.dig<100 then return end
local T=P.stat.time local T=P.stat.time

View File

@@ -4,9 +4,9 @@ return{
eventSet='dig_10l', eventSet='dig_10l',
bg='bg1',bgm='way', bg='bg1',bgm='way',
}, },
score=function(P)return{P.stat.time,P.stat.piece}end, score=function(P) return{P.stat.time,P.stat.piece} end,
scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, scoreDisp=function(D) return STRING.time(D[1]).." "..D[2].." Pieces" end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[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) getRank=function(P)
if P.stat.dig<10 then return end if P.stat.dig<10 then return end
local T=P.stat.time local T=P.stat.time

View File

@@ -4,9 +4,9 @@ return{
eventSet='dig_400l', eventSet='dig_400l',
bg='bg2',bgm='way', bg='bg2',bgm='way',
}, },
score=function(P)return{P.stat.time,P.stat.piece}end, score=function(P) return{P.stat.time,P.stat.piece} end,
scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, scoreDisp=function(D) return STRING.time(D[1]).." "..D[2].." Pieces" end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[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) getRank=function(P)
if P.stat.dig<400 then return end if P.stat.dig<400 then return end
local T=P.stat.time local T=P.stat.time

View File

@@ -4,9 +4,9 @@ return{
eventSet='dig_40l', eventSet='dig_40l',
bg='bg1',bgm='way', bg='bg1',bgm='way',
}, },
score=function(P)return{P.stat.time,P.stat.piece}end, score=function(P) return{P.stat.time,P.stat.piece} end,
scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, scoreDisp=function(D) return STRING.time(D[1]).." "..D[2].." Pieces" end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[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) getRank=function(P)
if P.stat.dig<40 then return end if P.stat.dig<40 then return end
local T=P.stat.time local T=P.stat.time

View File

@@ -4,9 +4,9 @@ return{
eventSet='dig_100l', eventSet='dig_100l',
bg='bg2',bgm='way', bg='bg2',bgm='way',
}, },
score=function(P)return{P.stat.piece,P.stat.time}end, score=function(P) return{P.stat.piece,P.stat.time} end,
scoreDisp=function(D)return D[1].." Pieces "..STRING.time(D[2]) end, scoreDisp=function(D) return D[1].." Pieces "..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, comp=function(a,b) return a[1]<b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
if P.stat.dig<100 then return end if P.stat.dig<100 then return end
local P=P.stat.piece local P=P.stat.piece

View File

@@ -4,9 +4,9 @@ return{
eventSet='dig_10l', eventSet='dig_10l',
bg='bg1',bgm='way', bg='bg1',bgm='way',
}, },
score=function(P)return{P.stat.piece,P.stat.time}end, score=function(P) return{P.stat.piece,P.stat.time} end,
scoreDisp=function(D)return D[1].." Pieces "..STRING.time(D[2]) end, scoreDisp=function(D) return D[1].." Pieces "..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, comp=function(a,b) return a[1]<b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
if P.stat.dig<10 then return end if P.stat.dig<10 then return end
local P=P.stat.piece local P=P.stat.piece

View File

@@ -4,9 +4,9 @@ return{
eventSet='dig_400l', eventSet='dig_400l',
bg='bg2',bgm='way', bg='bg2',bgm='way',
}, },
score=function(P)return{P.stat.piece,P.stat.time}end, score=function(P) return{P.stat.piece,P.stat.time} end,
scoreDisp=function(D)return D[1].." Pieces "..STRING.time(D[2]) end, scoreDisp=function(D) return D[1].." Pieces "..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, comp=function(a,b) return a[1]<b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
if P.stat.dig<400 then return end if P.stat.dig<400 then return end
local P=P.stat.piece local P=P.stat.piece

View File

@@ -4,9 +4,9 @@ return{
eventSet='dig_40l', eventSet='dig_40l',
bg='bg1',bgm='way', bg='bg1',bgm='way',
}, },
score=function(P)return{P.stat.piece,P.stat.time}end, score=function(P) return{P.stat.piece,P.stat.time} end,
scoreDisp=function(D)return D[1].." Pieces "..STRING.time(D[2]) end, scoreDisp=function(D) return D[1].." Pieces "..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, comp=function(a,b) return a[1]<b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
if P.stat.dig<40 then return end if P.stat.dig<40 then return end
local P=P.stat.piece local P=P.stat.piece

View File

@@ -6,9 +6,9 @@ return{
eventSet='dig_h', eventSet='dig_h',
bg='bg2',bgm='shift', bg='bg2',bgm='shift',
}, },
score=function(P)return{P.modeData.wave,P.stat.row}end, score=function(P) return{P.modeData.wave,P.stat.row} end,
scoreDisp=function(D)return D[1].." Waves "..D[2].." Lines"end, scoreDisp=function(D) return D[1].." Waves "..D[2].." Lines" end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[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) getRank=function(P)
local W=P.modeData.wave local W=P.modeData.wave
return return

View File

@@ -30,9 +30,9 @@ return{
P.stat.dig_quad = 0 P.stat.dig_quad = 0
end, end,
}, },
score=function(P)return{P.stat.dig_quad,P.stat.piece}end, score=function(P) return{P.stat.dig_quad,P.stat.piece} end,
scoreDisp=function(D)return D[1].." Techrash "..D[2].." Pieces"end, scoreDisp=function(D) return D[1].." Techrash "..D[2].." Pieces" end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[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) getRank=function(P)
local dig = P.stat.dig_quad local dig = P.stat.dig_quad
local piece = P.stat.piece local piece = P.stat.piece

View File

@@ -5,9 +5,9 @@ return{
eventSet='dig_u', eventSet='dig_u',
bg='bg2',bgm='shift', bg='bg2',bgm='shift',
}, },
score=function(P)return{P.modeData.wave,P.stat.row}end, score=function(P) return{P.modeData.wave,P.stat.row} end,
scoreDisp=function(D)return D[1].." Waves "..D[2].." Lines"end, scoreDisp=function(D) return D[1].." Waves "..D[2].." Lines" end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[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) getRank=function(P)
local W=P.modeData.wave local W=P.modeData.wave
return return

View File

@@ -3,10 +3,10 @@ return{
env={ env={
drop=20,lock=60, drop=20,lock=60,
sequence=function(P) sequence=function(P)
for _=1,3 do P:getNext(7)end for _=1,3 do P:getNext(7) end
while true do while true do
coroutine.yield() coroutine.yield()
if not P.nextQueue[1]then if not P.nextQueue[1] then
local height=TABLE.new(0,10) local height=TABLE.new(0,10)
local max=#P.field local max=#P.field
if max>0 then if max>0 then
@@ -44,7 +44,7 @@ return{
if tempDeltaHei<-2 and deltaHei>2 then if tempDeltaHei<-2 and deltaHei>2 then
break break
elseif x==11 then elseif x==11 then
for _=1,3 do ins(wei,7)end for _=1,3 do ins(wei,7) end
else else
tempDeltaHei=deltaHei tempDeltaHei=deltaHei
end end
@@ -62,10 +62,10 @@ return{
end end
end end
if flatCount<3 then if flatCount<3 then
for _=1,3 do ins(wei,6)end for _=1,3 do ins(wei,6) end
end end
if stairCount<3 then if stairCount<3 then
for _=1,4 do ins(wei,5)end for _=1,4 do ins(wei,5) end
end end
end end
P:getNext(wei[P.seqRND:random(#wei)]) P:getNext(wei[P.seqRND:random(#wei)])
@@ -78,9 +78,9 @@ return{
eventSet='checkLine_100', eventSet='checkLine_100',
bg='blockfall',bgm='reason', bg='blockfall',bgm='reason',
}, },
score=function(P)return{math.min(P.stat.row,100),P.stat.time}end, score=function(P) return{math.min(P.stat.row,100),P.stat.time} end,
scoreDisp=function(D)return D[1].." Lines "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Lines "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local L=P.stat.row local L=P.stat.row
if L>=100 then if L>=100 then

View File

@@ -9,9 +9,9 @@ return{
eventSet='checkLine_100', eventSet='checkLine_100',
bg='blockfall',bgm='reason', bg='blockfall',bgm='reason',
}, },
score=function(P)return{math.min(P.stat.row,100),P.stat.time}end, score=function(P) return{math.min(P.stat.row,100),P.stat.time} end,
scoreDisp=function(D)return D[1].." Lines "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Lines "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local L=P.stat.row local L=P.stat.row
if L>=100 then if L>=100 then

View File

@@ -15,12 +15,12 @@ local function check_rise(P)
if L==0 then if L==0 then
P:_showText(text.awesome,0,-120,80,'beat',.6) P:_showText(text.awesome,0,-120,80,'beat',.6)
SFX.play('pc') SFX.play('pc')
if BG.cur=='wing'then BG.send(26)end if BG.cur=='wing' then BG.send(26) end
for _=1,8 do for _=1,8 do
P:garbageRise(13,1,generateLine(P.holeRND:random(10))) P:garbageRise(13,1,generateLine(P.holeRND:random(10)))
end end
else else
if BG.cur=='wing'then BG.send(#P.clearedRow)end if BG.cur=='wing' then BG.send(#P.clearedRow) end
end end
end end
end end

View File

@@ -7,9 +7,9 @@ return{
bg='cubes',bgm='push', bg='cubes',bgm='push',
}, },
slowMark=true, slowMark=true,
score=function(P)return{math.min(P.stat.row,200),P.stat.time}end, score=function(P) return{math.min(P.stat.row,200),P.stat.time} end,
scoreDisp=function(D)return D[1].." Lines "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Lines "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local L=P.stat.row local L=P.stat.row
if L>=200 then if L>=200 then

View File

@@ -7,9 +7,9 @@ return{
bg='bg2',bgm='push', bg='bg2',bgm='push',
}, },
slowMark=true, slowMark=true,
score=function(P)return{P.stat.score,P.stat.row,P.stat.time}end, score=function(P) return{P.stat.score,P.stat.row,P.stat.time} end,
scoreDisp=function(D)return D[1].."P "..D[2].."L "..STRING.time(D[3])end, scoreDisp=function(D) return D[1].."P "..D[2].."L "..STRING.time(D[3]) end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[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) getRank=function(P)
return P.stat.row>=26 and 0 return P.stat.row>=26 and 0
end, end,

View File

@@ -7,9 +7,9 @@ return{
bg='bg2',bgm='push', bg='bg2',bgm='push',
}, },
slowMark=true, slowMark=true,
score=function(P)return{math.min(P.stat.row,200),P.stat.time}end, score=function(P) return{math.min(P.stat.row,200),P.stat.time} end,
scoreDisp=function(D)return D[1].." Lines "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Lines "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local L=P.stat.row local L=P.stat.row
if L>=200 then if L>=200 then

View File

@@ -6,9 +6,9 @@ return{
bg='blockspace',bgm='hope', bg='blockspace',bgm='hope',
}, },
slowMark=true, slowMark=true,
score=function(P)return{P.modeData.rankPoint,P.stat.score}end, score=function(P) return{P.modeData.rankPoint,P.stat.score} end,
scoreDisp=function(D)return sectionName[math.floor(D[1]/10)+1].." "..D[2]end, scoreDisp=function(D) return sectionName[math.floor(D[1]/10)+1].." "..D[2] end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]>b[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) getRank=function(P)
P=P.modeData.rankPoint P=P.modeData.rankPoint
return return

View File

@@ -5,9 +5,9 @@ return{
bg='lightning',bgm='rectification', bg='lightning',bgm='rectification',
}, },
slowMark=true, slowMark=true,
score=function(P)return{P.modeData.pt,P.stat.time}end, score=function(P) return{P.modeData.pt,P.stat.time} end,
scoreDisp=function(D)return D[1].."P "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].."P "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local S=P.modeData.pt local S=P.modeData.pt
return return

View File

@@ -15,8 +15,8 @@ return{
}, },
slowMark=true, slowMark=true,
score=function(P) return {P.modeData.gradePts,P.stat.time} end, score=function(P) return {P.modeData.gradePts,P.stat.time} end,
scoreDisp=function(D) return(gradeList[D[1]]or D[1]).." "..STRING.time(D[2])end, scoreDisp=function(D) return(gradeList[D[1]] or D[1]).." "..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, comp=function(a,b) return a[1]>b[1] or (a[1]==b[1] and a[2]<b[2]) end,
getRank=function(P) getRank=function(P)
local G=P.modeData.gradePts local G=P.modeData.gradePts
return return

View File

@@ -6,10 +6,10 @@ return{
bg='bg2',bgm='secret7th', bg='bg2',bgm='secret7th',
}, },
slowMark=true, slowMark=true,
score=function(P)return{P.modeData.pt,P.stat.time}end, score=function(P) return{P.modeData.pt,P.stat.time} end,
scoreDisp=function(D)return D[1].."P "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].."P "..STRING.time(D[2]) end,
comp=function(a,b) comp=function(a,b)
return a[1]>b[1]or(a[1]==b[1]and a[2]<b[2]) return a[1]>b[1] or (a[1]==b[1] and a[2]<b[2])
end, end,
getRank=function(P) getRank=function(P)
local S=P.modeData.pt local S=P.modeData.pt

View File

@@ -6,10 +6,10 @@ return{
bg='glow',bgm='sugar fairy', bg='glow',bgm='sugar fairy',
}, },
slowMark=true, slowMark=true,
score=function(P)return{P.modeData.pt,P.stat.time}end, score=function(P) return{P.modeData.pt,P.stat.time} end,
scoreDisp=function(D)return D[1].."P "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].."P "..STRING.time(D[2]) end,
comp=function(a,b) comp=function(a,b)
return a[1]>b[1]or(a[1]==b[1]and a[2]<b[2]) return a[1]>b[1] or (a[1]==b[1] and a[2]<b[2])
end, end,
getRank=function(P) getRank=function(P)
local S=P.modeData.pt local S=P.modeData.pt

View File

@@ -5,9 +5,9 @@ return{
bg='bg2',bgm='super7th', bg='bg2',bgm='super7th',
}, },
slowMark=true, slowMark=true,
score=function(P)return{math.min(P.stat.row,200),P.stat.time}end, score=function(P) return{math.min(P.stat.row,200),P.stat.time} end,
scoreDisp=function(D)return D[1].." Lines "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].." Lines "..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, comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P) getRank=function(P)
local L=P.stat.row local L=P.stat.row
return return

View File

@@ -6,10 +6,10 @@ return{
bg='bg1',bgm='secret8th', bg='bg1',bgm='secret8th',
}, },
slowMark=true, slowMark=true,
score=function(P)return{P.modeData.pt,P.stat.time}end, score=function(P) return{P.modeData.pt,P.stat.time} end,
scoreDisp=function(D)return D[1].."P "..STRING.time(D[2])end, scoreDisp=function(D) return D[1].."P "..STRING.time(D[2]) end,
comp=function(a,b) comp=function(a,b)
return a[1]>b[1]or(a[1]==b[1]and a[2]<b[2]) return a[1]>b[1] or (a[1]==b[1] and a[2]<b[2])
end, end,
getRank=function(P) getRank=function(P)
local S=P.modeData.pt local S=P.modeData.pt

Some files were not shown because too many files have changed in this diff Show More