diff --git a/.github/workflows/getVersion.lua b/.github/workflows/getVersion.lua index 98f39387..f986a764 100644 --- a/.github/workflows/getVersion.lua +++ b/.github/workflows/getVersion.lua @@ -1,25 +1,25 @@ if arg[1]=="-code"then - print(require"version".apkCode) + print(require"version".apkCode) elseif arg[1]=="-name"then - print((require"version".string:gsub("@DEV",""))) + print((require"version".string:gsub("@DEV",""))) elseif arg[1]=="-release"then - print((require"version".string:gsub("V",""))) + print((require"version".string:gsub("V",""))) elseif arg[1]=="-updateTitle"then - local note=require"parts.updateLog" - local p1=note:find("\n%d")+1 - local p2=note:find("\n",p1)-1 - note=note:sub(p1,p2) - print(note) + local note=require"parts.updateLog" + local p1=note:find("\n%d")+1 + local p2=note:find("\n",p1)-1 + note=note:sub(p1,p2) + print(note) elseif arg[1]=="-updateNote"then - local note=require"parts.updateLog" - local p1=note:find("\n",note:find("\n%d")+1)+1 - local p2=note:find("\n%d",p1+1) - note=note:sub(p1,p2-2) - note=note - :gsub("\t\t\t\t","_") - :gsub("\t\t","") - :gsub("\n([^_])","\n\n%1") - :gsub("\n_","\n") - :gsub("\n\n","\n",1) - print(note) + local note=require"parts.updateLog" + local p1=note:find("\n",note:find("\n%d")+1)+1 + local p2=note:find("\n%d",p1+1) + note=note:sub(p1,p2-2) + note=note + :gsub("\t\t\t\t","_") + :gsub("\t\t","") + :gsub("\n([^_])","\n\n%1") + :gsub("\n_","\n") + :gsub("\n\n","\n",1) + print(note) end \ No newline at end of file diff --git a/LICENSE b/LICENSE index ef50777f..aca67e37 100644 --- a/LICENSE +++ b/LICENSE @@ -6,149 +6,149 @@ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - This version of the GNU Lesser General Public License incorporates + This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. - 0. Additional Definitions. + 0. Additional Definitions. - As used herein, "this License" refers to version 3 of the GNU Lesser + As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. - "The Library" refers to a covered work governed by this License, + "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. - An "Application" is any work that makes use of an interface provided + An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. - A "Combined Work" is a work produced by combining or linking an + A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". - The "Minimal Corresponding Source" for a Combined Work means the + The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. - The "Corresponding Application Code" for a Combined Work means the + The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. - 1. Exception to Section 3 of the GNU GPL. + 1. Exception to Section 3 of the GNU GPL. - You may convey a covered work under sections 3 and 4 of this License + You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. - 2. Conveying Modified Versions. + 2. Conveying Modified Versions. - If you modify a copy of the Library, and, in your modifications, a + If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. - 3. Object Code Incorporating Material from Library Header Files. + 3. Object Code Incorporating Material from Library Header Files. - The object code form of an Application may incorporate material from + The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. - b) Accompany the object code with a copy of the GNU GPL and this license - document. + b) Accompany the object code with a copy of the GNU GPL and this license + document. - 4. Combined Works. + 4. Combined Works. - You may convey a Combined Work under terms of your choice that, + You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. - d) Do one of the following: + d) Do one of the following: - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) - 5. Combined Libraries. + 5. Combined Libraries. - You may place library facilities that are a work based on the + You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. - 6. Revised Versions of the GNU Lesser General Public License. + 6. Revised Versions of the GNU Lesser General Public License. - The Free Software Foundation may publish revised and/or new versions + The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - Each version is given a distinguishing version number. If the + Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and @@ -158,7 +158,7 @@ received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. - If the Library as you received it specifies that a proxy can decide + If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the diff --git a/Zframework/background.lua b/Zframework/background.lua index f3f5674e..b9ff8816 100644 --- a/Zframework/background.lua +++ b/Zframework/background.lua @@ -1,50 +1,50 @@ local gc_clear=love.graphics.clear local BGs={ - none={draw=function()gc_clear(.08,.08,.084)end} + none={draw=function()gc_clear(.08,.08,.084)end} } local BGlist={'none'} local BG={ - cur='none', - default='none', - init=false, - resize=false, - update=NULL, - draw=BGs.none.draw, - event=false, - discard=NULL, + cur='none', + default='none', + init=false, + resize=false, + update=NULL, + draw=BGs.none.draw, + event=false, + discard=NULL, } function BG.add(name,bg) - BGs[name]=bg - BGlist[#BGlist+1]=name + BGs[name]=bg + BGlist[#BGlist+1]=name end function BG.getList() - return BGlist + return BGlist end function BG.send(...) - if BG.event then - BG.event(...) - end + if BG.event then + BG.event(...) + end end function BG.setDefault(bg) - BG.default=bg + BG.default=bg end function BG.set(background) - if not background then background=BG.default end - if not BGs[background]or not SETTING.bg then return end - if background~=BG.cur then - BG.discard() - BG.cur=background - background=BGs[background] + if not background then background=BG.default end + if not BGs[background]or not SETTING.bg then return end + if background~=BG.cur then + BG.discard() + BG.cur=background + background=BGs[background] - BG.init= background.init or NULL - BG.resize= background.resize or NULL - BG.update= background.update or NULL - BG.draw= background.draw or NULL - BG.event= background.event or NULL - BG.discard= background.discard or NULL - BG.init() - end - return true + BG.init= background.init or NULL + BG.resize= background.resize or NULL + BG.update= background.update or NULL + BG.draw= background.draw or NULL + BG.event= background.event or NULL + BG.discard=background.discard or NULL + BG.init() + end + return true end return BG \ No newline at end of file diff --git a/Zframework/bgm.lua b/Zframework/bgm.lua index 3cf5eb29..7599aa78 100644 --- a/Zframework/bgm.lua +++ b/Zframework/bgm.lua @@ -1,109 +1,109 @@ local BGM={ - default=false, - getList=function()error("Cannot getList before initialize!")end, - getCount=function()return 0 end, - play=NULL, - freshVolume=NULL, - stop=NULL, - --nowPlay=[str:playing ID] - --playing=[src:playing SRC] + default=false, + getList=function()error("Cannot getList before initialize!")end, + getCount=function()return 0 end, + play=NULL, + freshVolume=NULL, + stop=NULL, + --nowPlay=[str:playing ID] + --playing=[src:playing SRC] } function BGM.setDefault(bgm) - BGM.default=bgm + BGM.default=bgm end function BGM.init(list) - BGM.init=nil - local Sources={} + BGM.init=nil + local Sources={} - local simpList={} - for _,v in next,list do - table.insert(simpList,v.name) - Sources[v.name]=v.path - end - table.sort(simpList) - function BGM.getList()return simpList end - local count=#simpList - function BGM.getCount()return count end + local simpList={} + for _,v in next,list do + table.insert(simpList,v.name) + Sources[v.name]=v.path + end + table.sort(simpList) + function BGM.getList()return simpList end + local count=#simpList + function BGM.getCount()return count end - local function _load(name) - if type(Sources[name])=='string'then - if love.filesystem.getInfo(Sources[name])then - Sources[name]=love.audio.newSource(Sources[name],'stream') - Sources[name]:setLooping(true) - Sources[name]:setVolume(0) - return true - else - MES.new('warn',"No BGM file: "..Sources[name],5) - end - elseif Sources[name]then - return true - elseif name then - MES.new('warn',"No BGM: "..name,5) - end - end - function BGM.loadAll()for name in next,Sources do _load(name)end end - local function task_fadeOut(src) - while true do - coroutine.yield() - local v=src:getVolume()-.025*SETTING.bgm - src:setVolume(v>0 and v or 0) - if v<=0 then - src:stop() - return true - end - end - end - local function task_fadeIn(src) - while true do - coroutine.yield() - local v=SETTING.bgm - v=math.min(v,src:getVolume()+.025*v) - src:setVolume(v) - if v>=SETTING.bgm then - return true - end - end - end - local function check_curFadeOut(task,code,src) - return task.code==code and task.args[1]==src - end - function BGM.play(name) - if not name then name=BGM.default end - if not _load(name)then return end - if SETTING.bgm==0 then - BGM.nowPlay=name - BGM.playing=Sources[name] - return true - end - if name and Sources[name]then - if BGM.nowPlay~=name then - if BGM.nowPlay then TASK.new(task_fadeOut,BGM.playing)end - TASK.removeTask_iterate(check_curFadeOut,task_fadeOut,Sources[name]) - TASK.removeTask_code(task_fadeIn) + local function _load(name) + if type(Sources[name])=='string'then + if love.filesystem.getInfo(Sources[name])then + Sources[name]=love.audio.newSource(Sources[name],'stream') + Sources[name]:setLooping(true) + Sources[name]:setVolume(0) + return true + else + MES.new('warn',"No BGM file: "..Sources[name],5) + end + elseif Sources[name]then + return true + elseif name then + MES.new('warn',"No BGM: "..name,5) + end + end + function BGM.loadAll()for name in next,Sources do _load(name)end end + local function task_fadeOut(src) + while true do + coroutine.yield() + local v=src:getVolume()-.025*SETTING.bgm + src:setVolume(v>0 and v or 0) + if v<=0 then + src:stop() + return true + end + end + end + local function task_fadeIn(src) + while true do + coroutine.yield() + local v=SETTING.bgm + v=math.min(v,src:getVolume()+.025*v) + src:setVolume(v) + if v>=SETTING.bgm then + return true + end + end + end + local function check_curFadeOut(task,code,src) + return task.code==code and task.args[1]==src + end + function BGM.play(name) + if not name then name=BGM.default end + if not _load(name)then return end + if SETTING.bgm==0 then + BGM.nowPlay=name + BGM.playing=Sources[name] + return true + end + if name and Sources[name]then + if BGM.nowPlay~=name then + if BGM.nowPlay then TASK.new(task_fadeOut,BGM.playing)end + TASK.removeTask_iterate(check_curFadeOut,task_fadeOut,Sources[name]) + TASK.removeTask_code(task_fadeIn) - TASK.new(task_fadeIn,Sources[name]) - BGM.nowPlay=name - BGM.playing=Sources[name] - BGM.playing:play() - end - return true - end - end - function BGM.freshVolume() - if BGM.playing then - local v=SETTING.bgm - if v>0 then - BGM.playing:setVolume(v) - BGM.playing:play() - elseif BGM.nowPlay then - BGM.playing:pause() - end - end - end - function BGM.stop() - TASK.removeTask_code(task_fadeIn) - if BGM.nowPlay then TASK.new(task_fadeOut,BGM.playing)end - BGM.nowPlay,BGM.playing=nil - end + TASK.new(task_fadeIn,Sources[name]) + BGM.nowPlay=name + BGM.playing=Sources[name] + BGM.playing:play() + end + return true + end + end + function BGM.freshVolume() + if BGM.playing then + local v=SETTING.bgm + if v>0 then + BGM.playing:setVolume(v) + BGM.playing:play() + elseif BGM.nowPlay then + BGM.playing:pause() + end + end + end + function BGM.stop() + TASK.removeTask_code(task_fadeIn) + if BGM.nowPlay then TASK.new(task_fadeOut,BGM.playing)end + BGM.nowPlay,BGM.playing=nil + end end return BGM \ No newline at end of file diff --git a/Zframework/color.lua b/Zframework/color.lua index c236ea7e..ed790a27 100644 --- a/Zframework/color.lua +++ b/Zframework/color.lua @@ -1,126 +1,126 @@ local COLOR={ - red= {.92, .12, .12}, - fire= {.92, 0.4, .12}, - orange= {.92, 0.6, .12}, - yellow= {.92, .92, .12}, - lime= {0.7, .92, .12}, - jade= {0.5, .92, .12}, - green= {.12, .92, .12}, - aqua= {.12, .92, 0.6}, - cyan= {.12, .92, .92}, - navy= {.12, 0.7, .92}, - sea= {.12, 0.4, .92}, - blue= {0.2, 0.2, .92}, - violet= {0.4, .12, .92}, - purple= {0.7, .12, .92}, - magenta= {.92, .12, .92}, - wine= {.92, .12, 0.5}, + red= {.92, .12, .12}, + fire= {.92, 0.4, .12}, + orange= {.92, 0.6, .12}, + yellow= {.92, .92, .12}, + lime= {0.7, .92, .12}, + jade= {0.5, .92, .12}, + green= {.12, .92, .12}, + aqua= {.12, .92, 0.6}, + cyan= {.12, .92, .92}, + navy= {.12, 0.7, .92}, + sea= {.12, 0.4, .92}, + blue= {0.2, 0.2, .92}, + violet= {0.4, .12, .92}, + purple= {0.7, .12, .92}, + magenta= {.92, .12, .92}, + wine= {.92, .12, 0.5}, - lRed= {.95, 0.5, 0.5}, - lFire= {.95, 0.7, 0.5}, - lOrange= {.95, 0.8, 0.3}, - lYellow= {.95, .95, 0.5}, - lLime= {0.8, .95, 0.4}, - lJade= {0.6, .95, 0.4}, - lGreen= {0.5, .95, 0.5}, - lAqua= {0.4, .95, 0.7}, - lCyan= {0.5, .95, .95}, - lNavy= {0.4, .85, .95}, - lSea= {0.5, 0.7, .95}, - lBlue= {0.7, 0.7, .95}, - lViolet= {0.7, 0.4, .95}, - lPurple= {0.8, 0.4, .95}, - lMagenta= {.95, 0.5, .95}, - lWine= {.95, 0.4, 0.7}, + lRed= {.95, 0.5, 0.5}, + lFire= {.95, 0.7, 0.5}, + lOrange= {.95, 0.8, 0.3}, + lYellow= {.95, .95, 0.5}, + lLime= {0.8, .95, 0.4}, + lJade= {0.6, .95, 0.4}, + lGreen= {0.5, .95, 0.5}, + lAqua= {0.4, .95, 0.7}, + lCyan= {0.5, .95, .95}, + lNavy= {0.4, .85, .95}, + lSea= {0.5, 0.7, .95}, + lBlue= {0.7, 0.7, .95}, + lViolet= {0.7, 0.4, .95}, + lPurple= {0.8, 0.4, .95}, + lMagenta={.95, 0.5, .95}, + lWine= {.95, 0.4, 0.7}, - dRed= {0.6, .08, .08}, - dFire= {0.6, 0.3, .08}, - dOrange= {0.6, 0.4, .08}, - dYellow= {0.6, 0.6, .08}, - dLime= {0.5, 0.6, .08}, - dJade= {0.3, 0.6, .08}, - dGreen= {.08, 0.6, .08}, - dAqua= {.08, 0.6, 0.4}, - dCyan= {.08, 0.6, 0.6}, - dNavy= {.08, 0.4, 0.6}, - dSea= {.08, 0.2, 0.6}, - dBlue= {0.1, 0.1, 0.6}, - dViolet= {0.2, .08, 0.6}, - dPurple= {0.4, .08, 0.6}, - dMagenta= {0.6, .08, 0.6}, - dWine= {0.6, .08, 0.3}, + dRed= {0.6, .08, .08}, + dFire= {0.6, 0.3, .08}, + dOrange= {0.6, 0.4, .08}, + dYellow= {0.6, 0.6, .08}, + dLime= {0.5, 0.6, .08}, + dJade= {0.3, 0.6, .08}, + dGreen= {.08, 0.6, .08}, + dAqua= {.08, 0.6, 0.4}, + dCyan= {.08, 0.6, 0.6}, + dNavy= {.08, 0.4, 0.6}, + dSea= {.08, 0.2, 0.6}, + dBlue= {0.1, 0.1, 0.6}, + dViolet= {0.2, .08, 0.6}, + dPurple= {0.4, .08, 0.6}, + dMagenta={0.6, .08, 0.6}, + dWine= {0.6, .08, 0.3}, - black= {.05, .05, .05}, - dGray= {0.3, 0.3, 0.3}, - gray= {0.6, 0.6, 0.6}, - lGray= {0.8, 0.8, 0.8}, - white= {.97, .97, .97}, + black= {.05, .05, .05}, + dGray= {0.3, 0.3, 0.3}, + gray= {0.6, 0.6, 0.6}, + lGray= {0.8, 0.8, 0.8}, + white= {.97, .97, .97}, } for k,v in next,{ - R='red',F='fire',O='orange',Y='yellow',L='lime',J='jade',G='green',A='aqua',C='cyan',N='navy',S='sea',B='blue',V='violet',P='purple',M='magenta',W='wine', - lR='lRed',lF='lFire',lO='lOrange',lY='lYellow',lL='lLime',lJ='lJade',lG='lGreen',lA='lAqua',lC='lCyan',lN='lNavy',lS='lSea',lB='lBlue',lV='lViolet',lP='lPurple',lM='lMagenta',lW='lWine', - dR='dRed',dF='dFire',dO='dOrange',dY='dYellow',dL='dLime',dJ='dJade',dG='dGreen',dA='dAqua',dC='dCyan',dN='dNavy',dS='dSea',dB='dBlue',dV='dViolet',dP='dPurple',dM='dMagenta',dW='dWine', - D='black',dH='dGray',H='gray',lH='lGray',Z='white', - --Remain letter: EIKQTUX + R='red', F='fire', O='orange', Y='yellow', L='lime', J='jade', G='green', A='aqua', C='cyan', N='navy', S='sea', B='blue', V='violet', P='purple', M='magenta', W='wine', + lR='lRed',lF='lFire',lO='lOrange',lY='lYellow',lL='lLime',lJ='lJade',lG='lGreen',lA='lAqua',lC='lCyan',lN='lNavy',lS='lSea',lB='lBlue',lV='lViolet',lP='lPurple',lM='lMagenta',lW='lWine', + dR='dRed',dF='dFire',dO='dOrange',dY='dYellow',dL='dLime',dJ='dJade',dG='dGreen',dA='dAqua',dC='dCyan',dN='dNavy',dS='dSea',dB='dBlue',dV='dViolet',dP='dPurple',dM='dMagenta',dW='dWine', + D='black',dH='dGray',H='gray',lH='lGray',Z='white', + --Remain letter: EIKQTUX }do - COLOR[k]=COLOR[v] + COLOR[k]=COLOR[v] end setmetatable(COLOR,{__index=function(_,k) - error("No color: "..tostring(k)) + error("No color: "..tostring(k)) end}) do--Random generators - local rnd=math.random - local list_norm={'red','fire','orange','yellow','lime','jade','green','aqua','cyan','navy','sea','blue','violet','purple','magenta','wine'} - local len_list_norm=#list_norm - function COLOR.random_norm() - return COLOR[list_norm[rnd(len_list_norm)]] - end + local rnd=math.random + local list_norm={'red','fire','orange','yellow','lime','jade','green','aqua','cyan','navy','sea','blue','violet','purple','magenta','wine'} + local len_list_norm=#list_norm + function COLOR.random_norm() + return COLOR[list_norm[rnd(len_list_norm)]] + end - local list_bright={'lRed','lFire','lOrange','lYellow','lLime','lJade','lGreen','lAqua','lCyan','lNavy','lSea','lBlue','lViolet','lPurple','lMagenta','lWine'} - local len_list_bright=#list_bright - function COLOR.random_bright() - return COLOR[list_bright[rnd(len_list_bright)]] - end + local list_bright={'lRed','lFire','lOrange','lYellow','lLime','lJade','lGreen','lAqua','lCyan','lNavy','lSea','lBlue','lViolet','lPurple','lMagenta','lWine'} + local len_list_bright=#list_bright + function COLOR.random_bright() + return COLOR[list_bright[rnd(len_list_bright)]] + end - local list_dark={'dRed','dFire','dOrange','dYellow','dLime','dJade','dGreen','dAqua','dCyan','dNavy','dSea','dBlue','dViolet','dPurple','dMagenta','dWine'} - local len_list_dark=#list_dark - function COLOR.random_dark() - return COLOR[list_dark[rnd(len_list_dark)]] - end + local list_dark={'dRed','dFire','dOrange','dYellow','dLime','dJade','dGreen','dAqua','dCyan','dNavy','dSea','dBlue','dViolet','dPurple','dMagenta','dWine'} + local len_list_dark=#list_dark + function COLOR.random_dark() + return COLOR[list_dark[rnd(len_list_dark)]] + end end do--Rainbow generators - local sin=math.sin - function COLOR.rainbow(phase,a) - return - sin(phase)*.4+.6, - sin(phase+2.0944)*.4+.6, - sin(phase-2.0944)*.4+.6, - a - end - function COLOR.rainbow_light(phase,a) - return - sin(phase)*.2+.7, - sin(phase+2.0944)*.2+.7, - sin(phase-2.0944)*.2+.7, - a - end - function COLOR.rainbow_dark(phase,a) - return - sin(phase)*.2+.4, - sin(phase+2.0944)*.2+.4, - sin(phase-2.0944)*.2+.4, - a - end - function COLOR.rainbow_gray(phase,a) - return - sin(phase)*.16+.5, - sin(phase+2.0944)*.16+.5, - sin(phase-2.0944)*.16+.5, - a - end + local sin=math.sin + function COLOR.rainbow(phase,a) + return + sin(phase)*.4+.6, + sin(phase+2.0944)*.4+.6, + sin(phase-2.0944)*.4+.6, + a + end + function COLOR.rainbow_light(phase,a) + return + sin(phase)*.2+.7, + sin(phase+2.0944)*.2+.7, + sin(phase-2.0944)*.2+.7, + a + end + function COLOR.rainbow_dark(phase,a) + return + sin(phase)*.2+.4, + sin(phase+2.0944)*.2+.4, + sin(phase-2.0944)*.2+.4, + a + end + function COLOR.rainbow_gray(phase,a) + return + sin(phase)*.16+.5, + sin(phase+2.0944)*.16+.5, + sin(phase-2.0944)*.16+.5, + a + end end return COLOR \ No newline at end of file diff --git a/Zframework/file.lua b/Zframework/file.lua index e6ea1177..07baa300 100644 --- a/Zframework/file.lua +++ b/Zframework/file.lua @@ -1,90 +1,90 @@ local fs=love.filesystem local FILE={} function FILE.load(name) - if fs.getInfo(name)then - local F=fs.newFile(name) - if F:open'r'then - local s=F:read() - F:close() - if s:sub(1,6)=="return"then - s=loadstring(s) - if s then - setfenv(s,{}) - return s() - end - elseif s:sub(1,1)=="["or s:sub(1,1)=="{"then - local res=JSON.decode(s) - if res then - return res - end - else - return s - end - end - MES.new('error',name.." "..text.loadError) - end + if fs.getInfo(name)then + local F=fs.newFile(name) + if F:open'r'then + local s=F:read() + F:close() + if s:sub(1,6)=="return"then + s=loadstring(s) + if s then + setfenv(s,{}) + return s() + end + elseif s:sub(1,1)=="["or s:sub(1,1)=="{"then + local res=JSON.decode(s) + if res then + return res + end + else + return s + end + end + MES.new('error',name.." "..text.loadError) + end end function FILE.save(data,name,mode) - if not mode then mode=""end - if type(data)=='table'then - if mode:find'l'then - data=TABLE.dump(data) - if not data then - MES.new('error',name.." "..text.saveError.."dump error") - return - end - else - data=JSON.encode(data) - if not data then - MES.new('error',name.." "..text.saveError.."json error") - return - end - end - else - data=tostring(data) - end + if not mode then mode=""end + if type(data)=='table'then + if mode:find'l'then + data=TABLE.dump(data) + if not data then + MES.new('error',name.." "..text.saveError.."dump error") + return + end + else + data=JSON.encode(data) + if not data then + MES.new('error',name.." "..text.saveError.."json error") + return + end + end + else + data=tostring(data) + end - if mode:find'd'and fs.getInfo(name)then - MES.new('error',text.saveError_duplicate) - return - end - local F=fs.newFile(name) - F:open'w' - local success,mes=F:write(data) - F:flush()F:close() - if success then - return true - else - MES.new('error',text.saveError..(mes or"unknown error")) - MES.traceback() - end + if mode:find'd'and fs.getInfo(name)then + MES.new('error',text.saveError_duplicate) + return + end + local F=fs.newFile(name) + F:open'w' + local success,mes=F:write(data) + F:flush()F:close() + if success then + return true + else + MES.new('error',text.saveError..(mes or"unknown error")) + MES.traceback() + end end function FILE.clear(path) - if fs.getRealDirectory(path)~=SAVEDIR or fs.getInfo(path).type~='directory'then return end - for _,name in next,fs.getDirectoryItems(path)do - name=path..'/'..name - if fs.getRealDirectory(name)==SAVEDIR then - local t=fs.getInfo(name).type - if t=='file'then - fs.remove(name) - end - end - end + if fs.getRealDirectory(path)~=SAVEDIR or fs.getInfo(path).type~='directory'then return end + for _,name in next,fs.getDirectoryItems(path)do + name=path..'/'..name + if fs.getRealDirectory(name)==SAVEDIR then + local t=fs.getInfo(name).type + if t=='file'then + fs.remove(name) + end + end + end end function FILE.clear_s(path) - if path~=''and(fs.getRealDirectory(path)~=SAVEDIR or fs.getInfo(path).type~='directory')then return end - for _,name in next,fs.getDirectoryItems(path)do - name=path..'/'..name - if fs.getRealDirectory(name)==SAVEDIR then - local t=fs.getInfo(name).type - if t=='file'then - fs.remove(name) - elseif t=='directory'then - FILE.clear_s(name) - fs.remove(name) - end - end - end - fs.remove(path) + if path~=''and(fs.getRealDirectory(path)~=SAVEDIR or fs.getInfo(path).type~='directory')then return end + for _,name in next,fs.getDirectoryItems(path)do + name=path..'/'..name + if fs.getRealDirectory(name)==SAVEDIR then + local t=fs.getInfo(name).type + if t=='file'then + fs.remove(name) + elseif t=='directory'then + FILE.clear_s(name) + fs.remove(name) + end + end + end + fs.remove(path) end return FILE \ No newline at end of file diff --git a/Zframework/gcExtend.lua b/Zframework/gcExtend.lua index 37cd1e14..f638ba17 100644 --- a/Zframework/gcExtend.lua +++ b/Zframework/gcExtend.lua @@ -8,152 +8,152 @@ function GC.X(obj,x,y,a,k)draw(obj,x,y,a,k,nil,obj:getWidth()*.5,0)end function GC.Y(obj,x,y,a,k)draw(obj,x,y,a,k,nil,0,obj:getHeight()*.5)end function GC.draw(obj,x,y,a,k)draw(obj,x,y,a,k,nil,obj:getWidth()*.5,obj:getHeight()*.5)end function GC.outDraw(obj,div,x,y,a,k) - local w,h=obj:getWidth()*.5,obj:getHeight()*.5 - draw(obj,x-div,y-div,a,k,nil,w,h) - draw(obj,x-div,y+div,a,k,nil,w,h) - draw(obj,x+div,y-div,a,k,nil,w,h) - draw(obj,x+div,y+div,a,k,nil,w,h) + local w,h=obj:getWidth()*.5,obj:getHeight()*.5 + draw(obj,x-div,y-div,a,k,nil,w,h) + draw(obj,x-div,y+div,a,k,nil,w,h) + draw(obj,x+div,y-div,a,k,nil,w,h) + draw(obj,x+div,y+div,a,k,nil,w,h) end function GC.shadedPrint(str,x,y,mode,d,clr1,clr2) - local w=1280 - if mode=='center'then - x=x-w*.5 - elseif mode=='right'then - x=x-w - end - if not d then d=1 end - setColor(clr1 or COLOR.D) - printf(str,x-d,y-d,w,mode) - printf(str,x-d,y+d,w,mode) - printf(str,x+d,y-d,w,mode) - printf(str,x+d,y+d,w,mode) - setColor(clr2 or COLOR.Z) - printf(str,x,y,w,mode) + local w=1280 + if mode=='center'then + x=x-w*.5 + elseif mode=='right'then + x=x-w + end + if not d then d=1 end + setColor(clr1 or COLOR.D) + printf(str,x-d,y-d,w,mode) + printf(str,x-d,y+d,w,mode) + printf(str,x+d,y-d,w,mode) + printf(str,x+d,y+d,w,mode) + setColor(clr2 or COLOR.Z) + printf(str,x,y,w,mode) end function GC.regularPolygon(mode,x,y,R,segments,r,phase) - local X,Y={},{} - local ang=phase or 0 - local angStep=6.283185307179586/segments - for i=1,segments do - X[i]=x+R*math.cos(ang) - Y[i]=y+R*math.sin(ang) - ang=ang+angStep - end - X[segments+1]=x+R*math.cos(ang) - Y[segments+1]=y+R*math.sin(ang) - local halfAng=6.283185307179586/segments/2 - local erasedLen=r*math.tan(halfAng) - if mode=='line'then - erasedLen=erasedLen+1--Fix 1px cover - for i=1,segments do - --Line - local x1,y1,x2,y2=X[i],Y[i],X[i+1],Y[i+1] - local dir=math.atan2(y2-y1,x2-x1) - gc.line(x1+erasedLen*math.cos(dir),y1+erasedLen*math.sin(dir),x2-erasedLen*math.cos(dir),y2-erasedLen*math.sin(dir)) + local X,Y={},{} + local ang=phase or 0 + local angStep=6.283185307179586/segments + for i=1,segments do + X[i]=x+R*math.cos(ang) + Y[i]=y+R*math.sin(ang) + ang=ang+angStep + end + X[segments+1]=x+R*math.cos(ang) + Y[segments+1]=y+R*math.sin(ang) + local halfAng=6.283185307179586/segments/2 + local erasedLen=r*math.tan(halfAng) + if mode=='line'then + erasedLen=erasedLen+1--Fix 1px cover + for i=1,segments do + --Line + local x1,y1,x2,y2=X[i],Y[i],X[i+1],Y[i+1] + local dir=math.atan2(y2-y1,x2-x1) + gc.line(x1+erasedLen*math.cos(dir),y1+erasedLen*math.sin(dir),x2-erasedLen*math.cos(dir),y2-erasedLen*math.sin(dir)) - --Arc - ang=ang+angStep - local R2=R-r/math.cos(halfAng) - local arcCX,arcCY=x+R2*math.cos(ang),y+R2*math.sin(ang) - gc.arc('line','open',arcCX,arcCY,r,ang-halfAng,ang+halfAng) - end - elseif mode=='fill'then - local L={} - for i=1,segments do - --Line - local x1,y1,x2,y2=X[i],Y[i],X[i+1],Y[i+1] - local dir=math.atan2(y2-y1,x2-x1) - table.insert(L,x1+erasedLen*math.cos(dir)) - table.insert(L,y1+erasedLen*math.sin(dir)) - table.insert(L,x2-erasedLen*math.cos(dir)) - table.insert(L,y2-erasedLen*math.sin(dir)) + --Arc + ang=ang+angStep + local R2=R-r/math.cos(halfAng) + local arcCX,arcCY=x+R2*math.cos(ang),y+R2*math.sin(ang) + gc.arc('line','open',arcCX,arcCY,r,ang-halfAng,ang+halfAng) + end + elseif mode=='fill'then + local L={} + for i=1,segments do + --Line + local x1,y1,x2,y2=X[i],Y[i],X[i+1],Y[i+1] + local dir=math.atan2(y2-y1,x2-x1) + table.insert(L,x1+erasedLen*math.cos(dir)) + table.insert(L,y1+erasedLen*math.sin(dir)) + table.insert(L,x2-erasedLen*math.cos(dir)) + table.insert(L,y2-erasedLen*math.sin(dir)) - --Arc - ang=ang+angStep - local R2=R-r/math.cos(halfAng) - local arcCX,arcCY=x+R2*math.cos(ang),y+R2*math.sin(ang) - gc.arc('fill','open',arcCX,arcCY,r,ang-halfAng,ang+halfAng) - end - gc.polygon('fill',L) - else - error("Draw mode should be 'line' or 'fill'") - end + --Arc + ang=ang+angStep + local R2=R-r/math.cos(halfAng) + local arcCX,arcCY=x+R2*math.cos(ang),y+R2*math.sin(ang) + gc.arc('fill','open',arcCX,arcCY,r,ang-halfAng,ang+halfAng) + end + gc.polygon('fill',L) + else + error("Draw mode should be 'line' or 'fill'") + end end do--function GC.DO(L) - local cmds={ - origin="origin", - move="translate", - scale="scale", - rotate="rotate", - shear="shear", - clear="clear", + local cmds={ + origin="origin", + move="translate", + scale="scale", + rotate="rotate", + shear="shear", + clear="clear", - setCL="setColor", - setCM="setColorMask", - setLW="setLineWidth", - setLS="setLineStyle", - setLJ="setLineJoin", + setCL="setColor", + setCM="setColorMask", + setLW="setLineWidth", + setLS="setLineStyle", + setLJ="setLineJoin", - print="print", - setFT=function(...)setFont(...)end, - mText=GC.str, - mDraw=GC.draw, - mOutDraw=GC.outDraw, + print="print", + setFT=function(...)setFont(...)end, + mText=GC.str, + mDraw=GC.draw, + mOutDraw=GC.outDraw, - draw="draw", - line="line", - fRect=function(...)gc.rectangle('fill',...)end, - dRect=function(...)gc.rectangle('line',...)end, - fCirc=function(...)gc.circle('fill',...)end, - dCirc=function(...)gc.circle('line',...)end, - fElps=function(...)gc.ellipse('fill',...)end, - dElps=function(...)gc.ellipse('line',...)end, - fPoly=function(...)gc.polygon('fill',...)end, - dPoly=function(...)gc.polygon('line',...)end, + draw="draw", + line="line", + fRect=function(...)gc.rectangle('fill',...)end, + dRect=function(...)gc.rectangle('line',...)end, + fCirc=function(...)gc.circle('fill',...)end, + dCirc=function(...)gc.circle('line',...)end, + fElps=function(...)gc.ellipse('fill',...)end, + dElps=function(...)gc.ellipse('line',...)end, + fPoly=function(...)gc.polygon('fill',...)end, + dPoly=function(...)gc.polygon('line',...)end, - dPie=function(...)gc.arc('line',...)end, - dArc=function(...)gc.arc('line','open',...)end, - dBow=function(...)gc.arc('line','closed',...)end, - fPie=function(...)gc.arc('fill',...)end, - fArc=function(...)gc.arc('fill','open',...)end, - fBow=function(...)gc.arc('fill','closed',...)end, + dPie=function(...)gc.arc('line',...)end, + dArc=function(...)gc.arc('line','open',...)end, + dBow=function(...)gc.arc('line','closed',...)end, + fPie=function(...)gc.arc('fill',...)end, + fArc=function(...)gc.arc('fill','open',...)end, + fBow=function(...)gc.arc('fill','closed',...)end, - fRPol=function(...)GC.regularPolygon('fill',...)end, - dRPol=function(...)GC.regularPolygon('line',...)end, - } - local sizeLimit=gc.getSystemLimits().texturesize - function GC.DO(L) - gc.push() - ::REPEAT_tryAgain:: - local success,canvas=pcall(gc.newCanvas,math.min(L[1],sizeLimit),math.min(L[2],sizeLimit)) - if not success then - sizeLimit=math.floor(sizeLimit*.8) - goto REPEAT_tryAgain - end - gc.setCanvas(canvas) - gc.origin() - gc.clear(1,1,1,0) - gc.setColor(1,1,1) - gc.setLineWidth(1) - for i=3,#L do - local cmd=L[i][1] - if type(cmd)=='boolean'and cmd then - table.remove(L[i],1) - cmd=L[i][1] - end - if type(cmd)=='string'then - local func=cmds[cmd] - if type(func)=='string'then func=gc[func]end - if func then - func(unpack(L[i],2)) - else - error("No gc command: "..cmd) - end - end - end - gc.setCanvas() - gc.pop() - return canvas - end + fRPol=function(...)GC.regularPolygon('fill',...)end, + dRPol=function(...)GC.regularPolygon('line',...)end, + } + local sizeLimit=gc.getSystemLimits().texturesize + function GC.DO(L) + gc.push() + ::REPEAT_tryAgain:: + local success,canvas=pcall(gc.newCanvas,math.min(L[1],sizeLimit),math.min(L[2],sizeLimit)) + if not success then + sizeLimit=math.floor(sizeLimit*.8) + goto REPEAT_tryAgain + end + gc.setCanvas(canvas) + gc.origin() + gc.clear(1,1,1,0) + gc.setColor(1,1,1) + gc.setLineWidth(1) + for i=3,#L do + local cmd=L[i][1] + if type(cmd)=='boolean'and cmd then + table.remove(L[i],1) + cmd=L[i][1] + end + if type(cmd)=='string'then + local func=cmds[cmd] + if type(func)=='string'then func=gc[func]end + if func then + func(unpack(L[i],2)) + else + error("No gc command: "..cmd) + end + end + end + gc.setCanvas() + gc.pop() + return canvas + end end return GC \ No newline at end of file diff --git a/Zframework/image.lua b/Zframework/image.lua index e00fbb6a..aae24d93 100644 --- a/Zframework/image.lua +++ b/Zframework/image.lua @@ -1,26 +1,26 @@ local IMG={} function IMG.init(list) - IMG.init=nil + IMG.init=nil - local null=love.graphics.newCanvas(1,1) - setmetatable(IMG,{__index=function(self,name) - if type(list[name])=='table'then - self[name]={} - for i=1,#list[name]do - self[name][i]=love.graphics.newImage(list[name][i]) - end - elseif type(list[name])=='string'then - self[name]=love.graphics.newImage(list[name]) - else - MES.new('warn',"No IMG: "..name,5) - self[name]=null - end - return self[name] - end}) + local null=love.graphics.newCanvas(1,1) + setmetatable(IMG,{__index=function(self,name) + if type(list[name])=='table'then + self[name]={} + for i=1,#list[name]do + self[name][i]=love.graphics.newImage(list[name][i]) + end + elseif type(list[name])=='string'then + self[name]=love.graphics.newImage(list[name]) + else + MES.new('warn',"No IMG: "..name,5) + self[name]=null + end + return self[name] + end}) - function IMG.loadAll() - for k in next,list do local _=IMG[k]end - IMG.loadAll=nil - end + function IMG.loadAll() + for k in next,list do local _=IMG[k]end + IMG.loadAll=nil + end end return IMG \ No newline at end of file diff --git a/Zframework/init.lua b/Zframework/init.lua index 7a153ba5..1d784425 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -4,61 +4,61 @@ LOADED=false ERRDATA={} --Pure lua modules (basic) -COLOR= require'Zframework.color' -TABLE= require'Zframework.tableExtend' -STRING= require'Zframework.stringExtend' +COLOR= require'Zframework.color' +TABLE= require'Zframework.tableExtend' +STRING= require'Zframework.stringExtend' PROFILE=require'Zframework.profile' -JSON= require'Zframework.json' +JSON= require'Zframework.json' do--Add pcall & MES for JSON lib - local encode,decode=JSON.encode,JSON.decode - JSON.encode=function(val) - local a,b=pcall(encode,val) - if a then - return b - elseif MES then - MES.traceback() - end - end - JSON.decode=function(str) - local a,b=pcall(decode,str) - if a then - return b - elseif MES then - MES.traceback() - end - end + local encode,decode=JSON.encode,JSON.decode + JSON.encode=function(val) + local a,b=pcall(encode,val) + if a then + return b + elseif MES then + MES.traceback() + end + end + JSON.decode=function(str) + local a,b=pcall(decode,str) + if a then + return b + elseif MES then + MES.traceback() + end + end end --Pure lua modules (complex) LOADLIB=require'Zframework.loadLib' -TASK= require'Zframework.task' -WS= require'Zframework.websocket' -LANG= require'Zframework.languages' -THEME= require'Zframework.theme' +TASK= require'Zframework.task' +WS= require'Zframework.websocket' +LANG= require'Zframework.languages' +THEME= require'Zframework.theme' --Love-based modules (basic) -FILE= require'Zframework.file' +FILE= require'Zframework.file' WHEELMOV=require'Zframework.wheelScroll' -SCR= require'Zframework.screen' -SCN= require'Zframework.scene' -LIGHT= require'Zframework.light' +SCR= require'Zframework.screen' +SCN= require'Zframework.scene' +LIGHT= require'Zframework.light' --Love-based modules (complex) GC=require'Zframework.gcExtend' - mStr=GC.str - mText=GC.simpX - mDraw=GC.draw + mStr=GC.str + mText=GC.simpX + mDraw=GC.draw require'Zframework.setFont' -TEXT= require'Zframework.text' -SYSFX= require'Zframework.sysFX' -MES= require'Zframework.message' -BG= require'Zframework.background' -WIDGET= require'Zframework.widget' -VIB= require'Zframework.vibrate' -SFX= require'Zframework.sfx' -IMG= require'Zframework.image' -BGM= require'Zframework.bgm' -VOC= require'Zframework.voice' +TEXT= require'Zframework.text' +SYSFX= require'Zframework.sysFX' +MES= require'Zframework.message' +BG= require'Zframework.background' +WIDGET= require'Zframework.widget' +VIB= require'Zframework.vibrate' +SFX= require'Zframework.sfx' +IMG= require'Zframework.image' +BGM= require'Zframework.bgm' +VOC= require'Zframework.voice' local ms,kb=love.mouse,love.keyboard @@ -85,280 +85,280 @@ joysticks={} local devMode local batteryImg=GC.DO{31,20, - {'fRect',1,0,26,2}, - {'fRect',1,18,26,2}, - {'fRect',0,1,2,18}, - {'fRect',26,1,2,18}, - {'fRect',29,3,2,14}, + {'fRect',1,0,26,2}, + {'fRect',1,18,26,2}, + {'fRect',0,1,2,18}, + {'fRect',26,1,2,18}, + {'fRect',29,3,2,14}, } local infoCanvas=gc.newCanvas(108,27) local function updatePowerInfo() - local state,pow=love.system.getPowerInfo() - gc.setCanvas(infoCanvas) - gc_push('transform') - gc.origin() - gc_clear(0,0,0,.25) - if state~='unknown'then - gc_setLineWidth(4) - local charging=state=='charging' - if state=='nobattery'then - gc_setColor(1,1,1) - gc_setLineWidth(2) - gc_line(74,SCR.safeX+5,100,22) - elseif pow then - if charging then gc_setColor(0,1,0) - elseif pow>50 then gc_setColor(1,1,1) - elseif pow>26 then gc_setColor(1,1,0) - elseif pow==26 then gc_setColor(.5,0,1) - else gc_setColor(1,0,0) - end - gc.rectangle('fill',76,6,pow*.22,14) - if pow<100 then - setFont(15) - gc.setColor(COLOR.D) - gc_print(pow,77,1) - gc_print(pow,77,3) - gc_print(pow,79,1) - gc_print(pow,79,3) - gc_setColor(COLOR.Z) - gc_print(pow,78,2) - end - end - gc_draw(batteryImg,73,3) - end - setFont(25) - gc_print(os.date("%H:%M"),3,-5) - gc_pop() - gc.setCanvas() + local state,pow=love.system.getPowerInfo() + gc.setCanvas(infoCanvas) + gc_push('transform') + gc.origin() + gc_clear(0,0,0,.25) + if state~='unknown'then + gc_setLineWidth(4) + local charging=state=='charging' + if state=='nobattery'then + gc_setColor(1,1,1) + gc_setLineWidth(2) + gc_line(74,SCR.safeX+5,100,22) + elseif pow then + if charging then gc_setColor(0,1,0) + elseif pow>50 then gc_setColor(1,1,1) + elseif pow>26 then gc_setColor(1,1,0) + elseif pow==26 then gc_setColor(.5,0,1) + else gc_setColor(1,0,0) + end + gc.rectangle('fill',76,6,pow*.22,14) + if pow<100 then + setFont(15) + gc.setColor(COLOR.D) + gc_print(pow,77,1) + gc_print(pow,77,3) + gc_print(pow,79,1) + gc_print(pow,79,3) + gc_setColor(COLOR.Z) + gc_print(pow,78,2) + end + end + gc_draw(batteryImg,73,3) + end + setFont(25) + gc_print(os.date("%H:%M"),3,-5) + gc_pop() + gc.setCanvas() end ------------------------------------------------------------- local lastX,lastY=0,0--Last click pos function love.mousepressed(x,y,k,touch) - if touch then return end - mouseShow=true - mx,my=ITP(xOy,x,y) - if devMode==1 then - print(("(%d,%d)<-%d,%d ~~(%d,%d)<-%d,%d"):format( - mx,my, - mx-lastX,my-lastY, - int(mx/10)*10,int(my/10)*10, - int((mx-lastX)/10)*10,int((my-lastY)/10)*10 - )) - end - if SCN.swapping then return end - if SCN.mouseDown then SCN.mouseDown(mx,my,k)end - WIDGET.press(mx,my,k) - lastX,lastY=mx,my - if SETTING.clickFX then SYSFX.newTap(3,mx,my)end + if touch then return end + mouseShow=true + mx,my=ITP(xOy,x,y) + if devMode==1 then + print(("(%d,%d)<-%d,%d ~~(%d,%d)<-%d,%d"):format( + mx,my, + mx-lastX,my-lastY, + int(mx/10)*10,int(my/10)*10, + int((mx-lastX)/10)*10,int((my-lastY)/10)*10 + )) + end + if SCN.swapping then return end + if SCN.mouseDown then SCN.mouseDown(mx,my,k)end + WIDGET.press(mx,my,k) + lastX,lastY=mx,my + if SETTING.clickFX then SYSFX.newTap(3,mx,my)end end function love.mousemoved(x,y,dx,dy,touch) - if touch then return end - mouseShow=true - mx,my=ITP(xOy,x,y) - if SCN.swapping then return end - dx,dy=dx/SCR.k,dy/SCR.k - if SCN.mouseMove then SCN.mouseMove(mx,my,dx,dy)end - if ms.isDown(1)then - WIDGET.drag(mx,my,dx/SCR.k,dy/SCR.k) - else - WIDGET.cursorMove(mx,my) - end + if touch then return end + mouseShow=true + mx,my=ITP(xOy,x,y) + if SCN.swapping then return end + dx,dy=dx/SCR.k,dy/SCR.k + if SCN.mouseMove then SCN.mouseMove(mx,my,dx,dy)end + if ms.isDown(1)then + WIDGET.drag(mx,my,dx/SCR.k,dy/SCR.k) + else + WIDGET.cursorMove(mx,my) + end end function love.mousereleased(x,y,k,touch) - if touch or SCN.swapping then return end - mx,my=ITP(xOy,x,y) - if SCN.mouseUp then SCN.mouseUp(mx,my,k)end - if WIDGET.sel then - WIDGET.release(mx,my) - else - if lastX and SCN.mouseClick and(mx-lastX)^2+(my-lastY)^2<62 then - SCN.mouseClick(mx,my,k) - end - end + if touch or SCN.swapping then return end + mx,my=ITP(xOy,x,y) + if SCN.mouseUp then SCN.mouseUp(mx,my,k)end + if WIDGET.sel then + WIDGET.release(mx,my) + else + if lastX and SCN.mouseClick and(mx-lastX)^2+(my-lastY)^2<62 then + SCN.mouseClick(mx,my,k) + end + end end function love.wheelmoved(x,y) - if SCN.swapping then return end - if SCN.wheelMoved then - SCN.wheelMoved(x,y) - else - WIDGET.unFocus() - WIDGET.drag(0,0,0,100*y) - end + if SCN.swapping then return end + if SCN.wheelMoved then + SCN.wheelMoved(x,y) + else + WIDGET.unFocus() + WIDGET.drag(0,0,0,100*y) + end end function love.touchpressed(id,x,y) - mouseShow=false - if SCN.swapping then return end - if not touching then - touching=id - WIDGET.unFocus(true) - love.touchmoved(id,x,y,0,0) - end - x,y=ITP(xOy,x,y) - lastX,lastY=x,y - if SCN.touchDown then SCN.touchDown(x,y)end - if kb.hasTextInput()then kb.setTextInput(false)end + mouseShow=false + if SCN.swapping then return end + if not touching then + touching=id + WIDGET.unFocus(true) + love.touchmoved(id,x,y,0,0) + end + x,y=ITP(xOy,x,y) + lastX,lastY=x,y + if SCN.touchDown then SCN.touchDown(x,y)end + if kb.hasTextInput()then kb.setTextInput(false)end end function love.touchmoved(_,x,y,dx,dy) - if SCN.swapping then return end - x,y=ITP(xOy,x,y) - if SCN.touchMove then SCN.touchMove(x,y,dx/SCR.k,dy/SCR.k)end - WIDGET.drag(x,y,dx/SCR.k,dy/SCR.k) - if touching then - WIDGET.cursorMove(x,y) - if not WIDGET.sel then touching=false end - end + if SCN.swapping then return end + x,y=ITP(xOy,x,y) + if SCN.touchMove then SCN.touchMove(x,y,dx/SCR.k,dy/SCR.k)end + WIDGET.drag(x,y,dx/SCR.k,dy/SCR.k) + if touching then + WIDGET.cursorMove(x,y) + if not WIDGET.sel then touching=false end + end end function love.touchreleased(id,x,y) - if SCN.swapping then return end - x,y=ITP(xOy,x,y) - if id==touching then - WIDGET.press(x,y,1) - WIDGET.release(x,y) - WIDGET.cursorMove(x,y) - WIDGET.unFocus() - touching=false - end - if SCN.touchUp then SCN.touchUp(x,y)end - if(x-lastX)^2+(y-lastY)^2<62 then - if SCN.touchClick then SCN.touchClick(x,y)end - if SETTING.clickFX then SYSFX.newTap(3,x,y)end - end + if SCN.swapping then return end + x,y=ITP(xOy,x,y) + if id==touching then + WIDGET.press(x,y,1) + WIDGET.release(x,y) + WIDGET.cursorMove(x,y) + WIDGET.unFocus() + touching=false + end + if SCN.touchUp then SCN.touchUp(x,y)end + if(x-lastX)^2+(y-lastY)^2<62 then + if SCN.touchClick then SCN.touchClick(x,y)end + if SETTING.clickFX then SYSFX.newTap(3,x,y)end + end end local function noDevkeyPressed(key) - if key=="f1"then - MES.new('check',PROFILE.switch()and"profile start!"or"profile report copied!") - elseif key=="f2"then - MES.new('info',("System:%s[%s]\nluaVer:%s\njitVer:%s\njitVerNum:%s"):format(SYSTEM,jit.arch,_VERSION,jit.version,jit.version_num)) - elseif key=="f3"then - MES.new('error',"挂了") - elseif key=="f4"then - for _=1,8 do - local P=PLY_ALIVE[rnd(#PLY_ALIVE)] - if P and P~=PLAYERS[1]then - P.lastRecv=PLAYERS[1] - P:lose() - end - end - elseif key=="f5"then - print(WIDGET.getSelected()or"no widget selected") - elseif key=="f6"then - for k,v in next,_G do print(k,v)end - elseif key=="f7"and love._openConsole then - love._openConsole() - elseif key=="f8"then - devMode=nil MES.new('info',"DEBUG OFF",.2) - elseif key=="f9"then - devMode=1 MES.new('info',"DEBUG 1") - elseif key=="f10"then - devMode=2 MES.new('info',"DEBUG 2") - elseif key=="f11"then - devMode=3 MES.new('info',"DEBUG 3") - elseif key=="f12"then - devMode=4 MES.new('info',"DEBUG 4") - elseif devMode==2 then - local W=WIDGET.sel - if W then - if key=="left"then W.x=W.x-10 - elseif key=="right"then W.x=W.x+10 - elseif key=="up"then W.y=W.y-10 - elseif key=="down"then W.y=W.y+10 - elseif key==","then W.w=W.w-10 - elseif key=="."then W.w=W.w+10 - elseif key=="/"then W.h=W.h-10 - elseif key=="'"then W.h=W.h+10 - elseif key=="["then W.font=W.font-5 - elseif key=="]"then W.font=W.font+5 - else return true - end - else - return true - end - else - return true - end + if key=="f1"then + MES.new('check',PROFILE.switch()and"profile start!"or"profile report copied!") + elseif key=="f2"then + MES.new('info',("System:%s[%s]\nluaVer:%s\njitVer:%s\njitVerNum:%s"):format(SYSTEM,jit.arch,_VERSION,jit.version,jit.version_num)) + elseif key=="f3"then + MES.new('error',"挂了") + elseif key=="f4"then + for _=1,8 do + local P=PLY_ALIVE[rnd(#PLY_ALIVE)] + if P and P~=PLAYERS[1]then + P.lastRecv=PLAYERS[1] + P:lose() + end + end + elseif key=="f5"then + print(WIDGET.getSelected()or"no widget selected") + elseif key=="f6"then + for k,v in next,_G do print(k,v)end + elseif key=="f7"and love._openConsole then + love._openConsole() + elseif key=="f8"then + devMode=nil MES.new('info',"DEBUG OFF",.2) + elseif key=="f9"then + devMode=1 MES.new('info',"DEBUG 1") + elseif key=="f10"then + devMode=2 MES.new('info',"DEBUG 2") + elseif key=="f11"then + devMode=3 MES.new('info',"DEBUG 3") + elseif key=="f12"then + devMode=4 MES.new('info',"DEBUG 4") + elseif devMode==2 then + local W=WIDGET.sel + if W then + if key=="left"then W.x=W.x-10 + elseif key=="right"then W.x=W.x+10 + elseif key=="up"then W.y=W.y-10 + elseif key=="down"then W.y=W.y+10 + elseif key==","then W.w=W.w-10 + elseif key=="."then W.w=W.w+10 + elseif key=="/"then W.h=W.h-10 + elseif key=="'"then W.h=W.h+10 + elseif key=="["then W.font=W.font-5 + elseif key=="]"then W.font=W.font+5 + else return true + end + else + return true + end + else + return true + end end function love.keypressed(key,_,isRep) - mouseShow=false - if devMode and not noDevkeyPressed(key)then - return - elseif key=="f8"then - devMode=1 - MES.new('info',"DEBUG ON",.2) - elseif key=="f11"then - switchFullscreen() - saveSettings() - elseif not SCN.swapping then - if SCN.keyDown then - if EDITING==""then - SCN.keyDown(key,isRep) - end - elseif key=="escape"and not isRep then - SCN.back() - else - WIDGET.keyPressed(key,isRep) - end - end + mouseShow=false + if devMode and not noDevkeyPressed(key)then + return + elseif key=="f8"then + devMode=1 + MES.new('info',"DEBUG ON",.2) + elseif key=="f11"then + switchFullscreen() + saveSettings() + elseif not SCN.swapping then + if SCN.keyDown then + if EDITING==""then + SCN.keyDown(key,isRep) + end + elseif key=="escape"and not isRep then + SCN.back() + else + WIDGET.keyPressed(key,isRep) + end + end end function love.keyreleased(i) - if SCN.swapping then return end - if SCN.keyUp then SCN.keyUp(i)end + if SCN.swapping then return end + if SCN.keyUp then SCN.keyUp(i)end end function love.textedited(texts) - EDITING=texts + EDITING=texts end function love.textinput(texts) - WIDGET.textinput(texts) + WIDGET.textinput(texts) end function love.joystickadded(JS) - ins(joysticks,JS) - MES.new('info',"Joystick added") + ins(joysticks,JS) + MES.new('info',"Joystick added") end function love.joystickremoved(JS) - local i=TABLE.find(joysticks,JS) - if i then - rem(joysticks,i) - MES.new('info',"Joystick removed") - end + local i=TABLE.find(joysticks,JS) + if i then + rem(joysticks,i) + MES.new('info',"Joystick removed") + end end local keyMirror={ - dpup='up', - dpdown='down', - dpleft='left', - dpright='right', - start='return', - back='escape', + dpup='up', + dpdown='down', + dpleft='left', + dpright='right', + start='return', + back='escape', } function love.gamepadpressed(_,i) - mouseShow=false - if SCN.swapping then return end - if SCN.gamepadDown then SCN.gamepadDown(i) - elseif SCN.keyDown then SCN.keyDown(keyMirror[i]or i) - elseif i=="back"then SCN.back() - else WIDGET.gamepadPressed(keyMirror[i]or i) - end + mouseShow=false + if SCN.swapping then return end + if SCN.gamepadDown then SCN.gamepadDown(i) + elseif SCN.keyDown then SCN.keyDown(keyMirror[i]or i) + elseif i=="back"then SCN.back() + else WIDGET.gamepadPressed(keyMirror[i]or i) + end end function love.gamepadreleased(_,i) - if SCN.swapping then return end - if SCN.gamepadUp then SCN.gamepadUp(i)end + if SCN.swapping then return end + if SCN.gamepadUp then SCN.gamepadUp(i)end end --[[ function love.joystickpressed(JS,k) - mouseShow=false - if SCN.swapping then return end - if SCN.gamepadDown then SCN.gamepadDown(i) - elseif SCN.keyDown then SCN.keyDown(keyMirror[i]or i) - elseif i=="back"then SCN.back() - else WIDGET.gamepadPressed(i) - end + mouseShow=false + if SCN.swapping then return end + if SCN.gamepadDown then SCN.gamepadDown(i) + elseif SCN.keyDown then SCN.keyDown(keyMirror[i]or i) + elseif i=="back"then SCN.back() + else WIDGET.gamepadPressed(i) + end end function love.joystickreleased(JS,k) - if SCN.swapping then return end - if SCN.gamepadUp then SCN.gamepadUp(i) - end + if SCN.swapping then return end + if SCN.gamepadUp then SCN.gamepadUp(i) + end end function love.joystickaxis(JS,axis,val) @@ -370,366 +370,366 @@ function love.sendData(data)end function love.receiveData(id,data)end ]] function love.filedropped(file) - if SCN.fileDropped then SCN.fileDropped(file)end + if SCN.fileDropped then SCN.fileDropped(file)end end function love.directorydropped(dir) - if SCN.directoryDropped then SCN.directoryDropped(dir)end + if SCN.directoryDropped then SCN.directoryDropped(dir)end end local lastGCtime=0 function love.lowmemory() - if TIME()-lastGCtime>6.26 then - collectgarbage() - lastGCtime=TIME() - MES.new('check',"[auto GC] low MEM 设备内存过低") - end + if TIME()-lastGCtime>6.26 then + collectgarbage() + lastGCtime=TIME() + MES.new('check',"[auto GC] low MEM 设备内存过低") + end end function love.resize(w,h) - SCR.resize(w,h) - if BG.resize then BG.resize(w,h)end - if SCN.resize then SCN.resize(w,h)end - WIDGET.resize(w,h) + SCR.resize(w,h) + if BG.resize then BG.resize(w,h)end + if SCN.resize then SCN.resize(w,h)end + WIDGET.resize(w,h) - SHADER.warning:send('w',w*SCR.dpi) + SHADER.warning:send('w',w*SCR.dpi) end function love.focus(f) - if f then - love.timer.step() - elseif SCN.cur=='game'and SETTING.autoPause then - pauseGame() - end + if f then + love.timer.step() + elseif SCN.cur=='game'and SETTING.autoPause then + pauseGame() + end end local yield=coroutine.yield local function secondLoopThread() - local mainLoop=love.run() - repeat yield()until mainLoop() + local mainLoop=love.run() + repeat yield()until mainLoop() end function love.errorhandler(msg) - if not msg then msg="Unknown error" end + if not msg then msg="Unknown error" end - --Generate error message - local err={"Error:"..msg} - local c=2 - for l in debug.traceback("",2):gmatch("(.-)\n")do - if c>2 then - if not l:find("boot")then - err[c]=l:gsub("^\t*","") - c=c+1 - end - else - err[2]="Traceback" - c=3 - end - end - print(table.concat(err,"\n",1,c-2)) + --Generate error message + local err={"Error:"..msg} + local c=2 + for l in debug.traceback("",2):gmatch("(.-)\n")do + if c>2 then + if not l:find("boot")then + err[c]=l:gsub("^\t*","") + c=c+1 + end + else + err[2]="Traceback" + c=3 + end + end + print(table.concat(err,"\n",1,c-2)) - --Reset something - love.audio.stop() - gc.reset() + --Reset something + love.audio.stop() + gc.reset() - if LOADED and #ERRDATA<3 then - BG.set('none') - local scn=SCN and SCN.cur or"NULL" - ins(ERRDATA,{mes=err,scene=scn}) + if LOADED and #ERRDATA<3 then + BG.set('none') + local scn=SCN and SCN.cur or"NULL" + ins(ERRDATA,{mes=err,scene=scn}) - --Write messages to log file - love.filesystem.append('conf/error.log', - os.date("%Y/%m/%d %A %H:%M:%S\n").. - #ERRDATA.." crash(es) "..SYSTEM.."-"..VERSION.string.." scene: "..scn.."\n".. - table.concat(err,"\n",1,c-2).."\n\n" - ) + --Write messages to log file + love.filesystem.append('conf/error.log', + os.date("%Y/%m/%d %A %H:%M:%S\n").. + #ERRDATA.." crash(es) "..SYSTEM.."-"..VERSION.string.." scene: "..scn.."\n".. + table.concat(err,"\n",1,c-2).."\n\n" + ) - --Get screencapture - gc.captureScreenshot(function(_)ERRDATA[#ERRDATA].shot=gc.newImage(_)end) - gc.present() + --Get screencapture + gc.captureScreenshot(function(_)ERRDATA[#ERRDATA].shot=gc.newImage(_)end) + gc.present() - --Create a new mainLoop thread to keep game alive - local status,resume=coroutine.status,coroutine.resume - local loopThread=coroutine.create(secondLoopThread) - local res,threadErr - repeat - res,threadErr=resume(loopThread) - until status(loopThread)=='dead' - if not res then - love.errorhandler(threadErr) - return - end - else - ms.setVisible(true) + --Create a new mainLoop thread to keep game alive + local status,resume=coroutine.status,coroutine.resume + local loopThread=coroutine.create(secondLoopThread) + local res,threadErr + repeat + res,threadErr=resume(loopThread) + until status(loopThread)=='dead' + if not res then + love.errorhandler(threadErr) + return + end + else + ms.setVisible(true) - local errorMsg - errorMsg=LOADED and - "Too many errors or fatal error occured.\nPlease restart the game."or - "An error has occurred during loading.\nError info has been created, and you can send it to the author." - while true do - love.event.pump() - for E,a,b in love.event.poll()do - if E=='quit'or a=='escape'then - destroyPlayers() - return true - elseif E=='resize'then - SCR.resize(a,b) - end - end - gc_clear(.3,.5,.9) - gc_push('transform') - gc_replaceTransform(SCR.xOy) - setFont(100)gc_print(":(",100,0,0,1.2) - setFont(40)gc.printf(errorMsg,100,160,SCR.w0-100) - setFont(20) - gc_print(SYSTEM.."-"..VERSION.string.." scene:"..(SCN and SCN.cur or"NULL"),100,660) - gc.printf(err[1],100,360,1260-100) - gc_print("TRACEBACK",100,450) - for i=4,#err-2 do - gc_print(err[i],100,400+20*i) - end - gc_pop() - gc_present() - love.timer.sleep(.26) - end - end + local errorMsg + errorMsg=LOADED and + "Too many errors or fatal error occured.\nPlease restart the game."or + "An error has occurred during loading.\nError info has been created, and you can send it to the author." + while true do + love.event.pump() + for E,a,b in love.event.poll()do + if E=='quit'or a=='escape'then + destroyPlayers() + return true + elseif E=='resize'then + SCR.resize(a,b) + end + end + gc_clear(.3,.5,.9) + gc_push('transform') + gc_replaceTransform(SCR.xOy) + setFont(100)gc_print(":(",100,0,0,1.2) + setFont(40)gc.printf(errorMsg,100,160,SCR.w0-100) + setFont(20) + gc_print(SYSTEM.."-"..VERSION.string.." scene:"..(SCN and SCN.cur or"NULL"),100,660) + gc.printf(err[1],100,360,1260-100) + gc_print("TRACEBACK",100,450) + for i=4,#err-2 do + gc_print(err[i],100,400+20*i) + end + gc_pop() + gc_present() + love.timer.sleep(.26) + end + end end love.threaderror=nil love.draw,love.update=nil--remove default draw/update local devColor={ - COLOR.Z, - COLOR.lM, - COLOR.lG, - COLOR.lB, + COLOR.Z, + COLOR.lM, + COLOR.lG, + COLOR.lB, } local WS=WS local WSnames={'app','user','play','stream','chat','manage'} local wsBottomImage do - local L={78,18, - {'clear',1,1,1,0}, - {'setCL',1,1,1,.3}, - {'fRect',60,0,18,18}, - } - for i=0,59 do - ins(L,{'setCL',1,1,1,i*.005}) - ins(L,{'fRect',i,0,1,18}) - end - wsBottomImage=GC.DO(L) + local L={78,18, + {'clear',1,1,1,0}, + {'setCL',1,1,1,.3}, + {'fRect',60,0,18,18}, + } + for i=0,59 do + ins(L,{'setCL',1,1,1,i*.005}) + ins(L,{'fRect',i,0,1,18}) + end + wsBottomImage=GC.DO(L) end local ws_deadImg=GC.DO{20,20, - {'setFT',20}, - {'setCL',1,.3,.3}, - {'print',"X",3,-4}, + {'setFT',20}, + {'setCL',1,.3,.3}, + {'print',"X",3,-4}, } local ws_connectingImg=GC.DO{20,20, - {'setLW',3}, - {'dArc',11.5,10,6.26,1,5.28}, + {'setLW',3}, + {'dArc',11.5,10,6.26,1,5.28}, } local ws_runningImg=GC.DO{20,20, - {'setFT',20}, - {'setCL',.5,1,0}, - {'print',"R",3,-4}, + {'setFT',20}, + {'setCL',.5,1,0}, + {'print',"R",3,-4}, } local cursorImg=GC.DO{16,16, - {'fCirc',8,8,4}, - {'setCL',1,1,1,.7}, - {'fCirc',8,8,6}, + {'fCirc',8,8,4}, + {'setCL',1,1,1,.7}, + {'fCirc',8,8,6}, } local cursor_holdImg=GC.DO{16,16, - {'setLW',2}, - {'dCirc',8,8,7}, - {'fCirc',8,8,3}, + {'setLW',2}, + {'dCirc',8,8,7}, + {'fCirc',8,8,3}, } function love.run() - local love=love + local love=love - local BG=BG - local TEXT_update,TEXT_draw=TEXT.update,TEXT.draw - local MES_update,MES_draw=MES.update,MES.draw - local WS_update=WS.update - local TASK_update=TASK.update - local SYSFX_update,SYSFX_draw=SYSFX.update,SYSFX.draw - local WIDGET_update,WIDGET_draw=WIDGET.update,WIDGET.draw + local BG=BG + local TEXT_update,TEXT_draw=TEXT.update,TEXT.draw + local MES_update,MES_draw=MES.update,MES.draw + local WS_update=WS.update + local TASK_update=TASK.update + local SYSFX_update,SYSFX_draw=SYSFX.update,SYSFX.draw + local WIDGET_update,WIDGET_draw=WIDGET.update,WIDGET.draw - local STEP,WAIT=love.timer.step,love.timer.sleep - local FPS,MINI=love.timer.getFPS,love.window.isMinimized - local PUMP,POLL=love.event.pump,love.event.poll + local STEP,WAIT=love.timer.step,love.timer.sleep + local FPS,MINI=love.timer.getFPS,love.window.isMinimized + local PUMP,POLL=love.event.pump,love.event.poll - local TIME,SETTING,VERSION=TIME,SETTING,VERSION + local TIME,SETTING,VERSION=TIME,SETTING,VERSION - local frameTimeList={} - local lastFrame=TIME() - local lastFreshPow=lastFrame - local FCT=0--Framedraw counter, from 0~99 + local frameTimeList={} + local lastFrame=TIME() + local lastFreshPow=lastFrame + local FCT=0--Framedraw counter, from 0~99 - love.resize(gc.getWidth(),gc.getHeight()) + love.resize(gc.getWidth(),gc.getHeight()) - --Scene Launch - while #SCN.stack>0 do SCN.pop()end - SCN.push('quit','slowFade') - SCN.init(#ERRDATA==0 and'load'or'error') + --Scene Launch + while #SCN.stack>0 do SCN.pop()end + SCN.push('quit','slowFade') + SCN.init(#ERRDATA==0 and'load'or'error') - return function() - local _ + return function() + local _ - local time=TIME() - local dt=time-lastFrame - lastFrame=time + local time=TIME() + local dt=time-lastFrame + lastFrame=time - --EVENT - PUMP() - for N,a,b,c,d,e in POLL()do - if love[N]then - love[N](a,b,c,d,e) - elseif N=='quit'then - destroyPlayers() - return a or true - end - end + --EVENT + PUMP() + for N,a,b,c,d,e in POLL()do + if love[N]then + love[N](a,b,c,d,e) + elseif N=='quit'then + destroyPlayers() + return a or true + end + end - --UPDATE - STEP() - VOC.update() - BG.update(dt) - TEXT_update() - MES_update(dt) - WS_update(dt) - TASK_update() - SYSFX_update(dt) - if SCN.update then SCN.update(dt)end - if SCN.swapping then SCN.swapUpdate()end - WIDGET_update() + --UPDATE + STEP() + VOC.update() + BG.update(dt) + TEXT_update() + MES_update(dt) + WS_update(dt) + TASK_update() + SYSFX_update(dt) + if SCN.update then SCN.update(dt)end + if SCN.swapping then SCN.swapUpdate()end + WIDGET_update() - --DRAW - if not MINI()then - FCT=FCT+SETTING.frameMul - if FCT>=100 then - FCT=FCT-100 + --DRAW + if not MINI()then + FCT=FCT+SETTING.frameMul + if FCT>=100 then + FCT=FCT-100 - local safeX=SCR.safeX - gc_replaceTransform(SCR.origin) - gc_setColor(1,1,1) - BG.draw() - gc_replaceTransform(SCR.xOy) - if SCN.draw then SCN.draw()end - WIDGET_draw() - SYSFX_draw() - TEXT_draw() + local safeX=SCR.safeX + gc_replaceTransform(SCR.origin) + gc_setColor(1,1,1) + BG.draw() + gc_replaceTransform(SCR.xOy) + if SCN.draw then SCN.draw()end + WIDGET_draw() + SYSFX_draw() + TEXT_draw() - --Draw cursor - if mouseShow then - local R=int((time+1)/2)%7+1 - _=minoColor[SETTING.skin[R]] - gc_setColor(_[1],_[2],_[3],min(abs(1-time%2),.3)) - _=DSCP[R][0] - gc_draw(TEXTURE.miniBlock[R],mx,my,time%3.14159265359*4,16,16,_[2]+.5,#BLOCKS[R][0]-_[1]-.5) - gc_setColor(1,1,1) - gc_draw(ms.isDown(1)and cursor_holdImg or cursorImg,mx,my,nil,nil,nil,8,8) - end - gc_replaceTransform(SCR.xOy_ul) - MES_draw() - gc_replaceTransform(SCR.origin) - --Draw power info. - if SETTING.powerInfo then - gc_setColor(1,1,1) - gc_draw(infoCanvas,safeX,0,0,SCR.k) - end + --Draw cursor + if mouseShow then + local R=int((time+1)/2)%7+1 + _=minoColor[SETTING.skin[R]] + gc_setColor(_[1],_[2],_[3],min(abs(1-time%2),.3)) + _=DSCP[R][0] + gc_draw(TEXTURE.miniBlock[R],mx,my,time%3.14159265359*4,16,16,_[2]+.5,#BLOCKS[R][0]-_[1]-.5) + gc_setColor(1,1,1) + gc_draw(ms.isDown(1)and cursor_holdImg or cursorImg,mx,my,nil,nil,nil,8,8) + end + gc_replaceTransform(SCR.xOy_ul) + MES_draw() + gc_replaceTransform(SCR.origin) + --Draw power info. + if SETTING.powerInfo then + gc_setColor(1,1,1) + gc_draw(infoCanvas,safeX,0,0,SCR.k) + end - --Draw scene swapping animation - if SCN.swapping then - gc_setColor(1,1,1) - _=SCN.stat - _.draw(_.time) - end - gc_replaceTransform(SCR.xOy_d) - --Draw Version string - gc_setColor(.8,.8,.8,.4) - setFont(20) - mStr(VERSION.string,0,-30) - gc_replaceTransform(SCR.xOy_dl) - --Draw FPS - setFont(15) - gc_setColor(1,1,1) - gc_print(FPS(),safeX+5,-20) + --Draw scene swapping animation + if SCN.swapping then + gc_setColor(1,1,1) + _=SCN.stat + _.draw(_.time) + end + gc_replaceTransform(SCR.xOy_d) + --Draw Version string + gc_setColor(.8,.8,.8,.4) + setFont(20) + mStr(VERSION.string,0,-30) + gc_replaceTransform(SCR.xOy_dl) + --Draw FPS + setFont(15) + gc_setColor(1,1,1) + gc_print(FPS(),safeX+5,-20) - --Debug info. - if devMode then - --Left-down infos - gc_setColor(devColor[devMode]) - gc_print("MEM "..gcinfo(),safeX+5,-40) - gc_print("Lines "..FREEROW.getCount(),safeX+5,-60) - gc_print("Tasks "..TASK.getCount(),safeX+5,-80) - gc_print("Voices "..VOC.getQueueCount(),safeX+5,-100) - gc_print(tostring(GAME.playing),safeX+5,-120) + --Debug info. + if devMode then + --Left-down infos + gc_setColor(devColor[devMode]) + gc_print("MEM "..gcinfo(),safeX+5,-40) + gc_print("Lines "..FREEROW.getCount(),safeX+5,-60) + gc_print("Tasks "..TASK.getCount(),safeX+5,-80) + gc_print("Voices "..VOC.getQueueCount(),safeX+5,-100) + gc_print(tostring(GAME.playing),safeX+5,-120) - --Update & draw frame time - ins(frameTimeList,1,dt)rem(frameTimeList,126) - gc_setColor(1,1,1,.3) - for i=1,#frameTimeList do - gc.rectangle('fill',150+2*i,-20,2,-frameTimeList[i]*4000) - end + --Update & draw frame time + ins(frameTimeList,1,dt)rem(frameTimeList,126) + gc_setColor(1,1,1,.3) + for i=1,#frameTimeList do + gc.rectangle('fill',150+2*i,-20,2,-frameTimeList[i]*4000) + end - --Cursor pos disp - gc_replaceTransform(SCR.origin) - local x,y=SCR.xOy:transformPoint(mx,my) - gc_setLineWidth(1) - gc_line(x,0,x,SCR.h) - gc_line(0,y,SCR.w,y) - local t=int(mx+.5)..","..int(my+.5) - gc.setColor(COLOR.D) - gc_print(t,x+1,y) - gc_print(t,x+1,y-1) - gc_print(t,x+2,y-1) - gc_setColor(COLOR.Z) - gc_print(t,x+2,y) + --Cursor pos disp + gc_replaceTransform(SCR.origin) + local x,y=SCR.xOy:transformPoint(mx,my) + gc_setLineWidth(1) + gc_line(x,0,x,SCR.h) + gc_line(0,y,SCR.w,y) + local t=int(mx+.5)..","..int(my+.5) + gc.setColor(COLOR.D) + gc_print(t,x+1,y) + gc_print(t,x+1,y-1) + gc_print(t,x+2,y-1) + gc_setColor(COLOR.Z) + gc_print(t,x+2,y) - gc_replaceTransform(SCR.xOy_dr) - --Websocket status - for i=1,6 do - local status=WS.status(WSnames[i]) - gc_setColor(1,1,1) - gc.draw(wsBottomImage,-79,20*i-139) - if status=='dead'then - gc_draw(ws_deadImg,-20,20*i-140) - elseif status=='connecting'then - gc_setColor(1,1,1,.5+.3*sin(time*6.26)) - gc_draw(ws_connectingImg,-20,20*i-140) - elseif status=='running'then - gc_draw(ws_runningImg,-20,20*i-140) - end - local t1,t2,t3=WS.getTimers(WSnames[i]) - gc_setColor(.9,.9,.9,t1)gc.rectangle('fill',-60,20*i-122,-16,-16) - gc_setColor(.3,1,.3,t2)gc.rectangle('fill',-42,20*i-122,-16,-16) - gc_setColor(1,.2,.2,t3)gc.rectangle('fill',-24,20*i-122,-16,-16) - end - end - gc_present() + gc_replaceTransform(SCR.xOy_dr) + --Websocket status + for i=1,6 do + local status=WS.status(WSnames[i]) + gc_setColor(1,1,1) + gc.draw(wsBottomImage,-79,20*i-139) + if status=='dead'then + gc_draw(ws_deadImg,-20,20*i-140) + elseif status=='connecting'then + gc_setColor(1,1,1,.5+.3*sin(time*6.26)) + gc_draw(ws_connectingImg,-20,20*i-140) + elseif status=='running'then + gc_draw(ws_runningImg,-20,20*i-140) + end + local t1,t2,t3=WS.getTimers(WSnames[i]) + gc_setColor(.9,.9,.9,t1)gc.rectangle('fill',-60,20*i-122,-16,-16) + gc_setColor(.3,1,.3,t2)gc.rectangle('fill',-42,20*i-122,-16,-16) + gc_setColor(1,.2,.2,t3)gc.rectangle('fill',-24,20*i-122,-16,-16) + end + end + gc_present() - --SPEED UPUPUP! - if SETTING.cleanCanvas then gc_discard()end - end - end + --SPEED UPUPUP! + if SETTING.cleanCanvas then gc_discard()end + end + end - --Fresh power info. - if time-lastFreshPow>2.6 then - if SETTING.powerInfo and LOADED then - updatePowerInfo() - lastFreshPow=time - end - if gc.getWidth()~=SCR.w or gc.getHeight()~=SCR.h then - love.resize(gc.getWidth(),gc.getHeight()) - end - end + --Fresh power info. + if time-lastFreshPow>2.6 then + if SETTING.powerInfo and LOADED then + updatePowerInfo() + lastFreshPow=time + end + if gc.getWidth()~=SCR.w or gc.getHeight()~=SCR.h then + love.resize(gc.getWidth(),gc.getHeight()) + end + end - --Slow devmode - if devMode then - if devMode==3 then - WAIT(.1) - elseif devMode==4 then - WAIT(.5) - end - end + --Slow devmode + if devMode then + if devMode==3 then + WAIT(.1) + elseif devMode==4 then + WAIT(.5) + end + end - --Keep 60fps - _=TIME()-lastFrame - if _<.0162 then WAIT(.0162-_)end - while TIME()-lastFrame<1/60 do end - end + --Keep 60fps + _=TIME()-lastFrame + if _<.0162 then WAIT(.0162-_)end + while TIME()-lastFrame<1/60 do end + end end \ No newline at end of file diff --git a/Zframework/json.lua b/Zframework/json.lua index 7970a87b..30ada473 100644 --- a/Zframework/json.lua +++ b/Zframework/json.lua @@ -32,86 +32,86 @@ local json = {} local _encode local escape_char_map = { - ["\\"] = "\\", - ["\""] = "\"", - ["\b"] = "b", - ["\f"] = "f", - ["\n"] = "n", - ["\r"] = "r", - ["\t"] = "t" + ["\\"] = "\\", + ["\""] = "\"", + ["\b"] = "b", + ["\f"] = "f", + ["\n"] = "n", + ["\r"] = "r", + ["\t"] = "t" } local escape_char_map_inv = {["/"] = "/"} for k, v in pairs(escape_char_map) do escape_char_map_inv[v] = k end local function escape_char(c) - return "\\" .. (escape_char_map[c] or string.format("u%04x", c:byte())) + return "\\" .. (escape_char_map[c] or string.format("u%04x", c:byte())) end local function encode_nil() return "null" end local function encode_table(val, stack) - local res = {} - stack = stack or {} + local res = {} + stack = stack or {} - -- Circular reference? - if stack[val] then error("circular reference") end + -- Circular reference? + if stack[val] then error("circular reference") end - stack[val] = true + stack[val] = true - if rawget(val, 1) ~= nil or next(val) == nil then - -- Treat as array -- check keys are valid and it is not sparse - local n = 0 - for k in pairs(val) do - if type(k) ~= 'number' then - error("invalid table: mixed or invalid key types") - end - n = n + 1 - end - if n ~= #val then error("invalid table: sparse array") end - -- Encode - for _, v in ipairs(val) do ins(res, _encode(v, stack)) end - stack[val] = nil - return "[" .. table.concat(res, ",") .. "]" + if rawget(val, 1) ~= nil or next(val) == nil then + -- Treat as array -- check keys are valid and it is not sparse + local n = 0 + for k in pairs(val) do + if type(k) ~= 'number' then + error("invalid table: mixed or invalid key types") + end + n = n + 1 + end + if n ~= #val then error("invalid table: sparse array") end + -- Encode + for _, v in ipairs(val) do ins(res, _encode(v, stack)) end + stack[val] = nil + return "[" .. table.concat(res, ",") .. "]" - else - -- Treat as an object - for k, v in pairs(val) do - if type(k) ~= 'string' then - error("invalid table: mixed or invalid key types") - end - ins(res, _encode(k, stack) .. ":" .. _encode(v, stack)) - end - stack[val] = nil - return "{" .. table.concat(res, ",") .. "}" - end + else + -- Treat as an object + for k, v in pairs(val) do + if type(k) ~= 'string' then + error("invalid table: mixed or invalid key types") + end + ins(res, _encode(k, stack) .. ":" .. _encode(v, stack)) + end + stack[val] = nil + return "{" .. table.concat(res, ",") .. "}" + end end local function encode_string(val) - return '"' .. val:gsub('[%z\1-\31\\"]', escape_char) .. '"' + return '"' .. val:gsub('[%z\1-\31\\"]', escape_char) .. '"' end local function encode_number(val) - -- Check for NaN, -inf and inf - if val ~= val or val <= -math.huge or val >= math.huge then - error("unexpected number value '" .. tostring(val) .. "'") - end - return string.format("%.14g", val) + -- Check for NaN, -inf and inf + if val ~= val or val <= -math.huge or val >= math.huge then + error("unexpected number value '" .. tostring(val) .. "'") + end + return string.format("%.14g", val) end local type_func_map = { - ['nil'] = encode_nil, - ['table'] = encode_table, - ['string'] = encode_string, - ['number'] = encode_number, - ['boolean'] = tostring + ['nil'] = encode_nil, + ['table'] = encode_table, + ['string'] = encode_string, + ['number'] = encode_number, + ['boolean'] = tostring } _encode = function(val, stack) - local t = type(val) - local f = type_func_map[t] - if f then return f(val, stack) end - error("unexpected type '" .. t .. "'") + local t = type(val) + local f = type_func_map[t] + if f then return f(val, stack) end + error("unexpected type '" .. t .. "'") end json.encode=_encode @@ -123,9 +123,9 @@ json.encode=_encode local parse local function create_set(...) - local res = {} - for i = 1, select("#", ...) do res[select(i, ...)] = true end - return res + local res = {} + for i = 1, select("#", ...) do res[select(i, ...)] = true end + return res end local space_chars = create_set(" ", "\t", "\r", "\n") @@ -136,205 +136,205 @@ local literals = create_set("true", "false", "null") local literal_map = {["true"] = true, ["false"] = false, ["null"] = nil} local function next_char(str, idx, set, negate) - for i = idx, #str do if set[str:sub(i, i)] ~= negate then return i end end - return #str + 1 + for i = idx, #str do if set[str:sub(i, i)] ~= negate then return i end end + return #str + 1 end local function decode_error(str, idx, msg) - local line_count = 1 - local col_count = 1 - for i = 1, idx - 1 do - col_count = col_count + 1 - if str:sub(i, i) == "\n" then - line_count = line_count + 1 - col_count = 1 - end - end - error(string.format("%s at line %d col %d", msg, line_count, col_count)) + local line_count = 1 + local col_count = 1 + for i = 1, idx - 1 do + col_count = col_count + 1 + if str:sub(i, i) == "\n" then + line_count = line_count + 1 + col_count = 1 + end + end + error(string.format("%s at line %d col %d", msg, line_count, col_count)) end local function codepoint_to_utf8(n) - -- http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=iws-appendixa - local f = bit.rshift - if n <= 0x7f then - return char(n) - elseif n <= 0x7ff then - return char(f(n, 6) + 192, n % 64 + 128) - elseif n <= 0xffff then - return char(f(n, 12) + 224, f(n % 4096, 6) + 128, n % 64 + 128) - elseif n <= 0x10ffff then - return char(f(n, 18) + 240, f(n % 262144, 12) + 128, f(n % 4096, 6) + 128, n % 64 + 128) - end - error(string.format("invalid unicode codepoint '%x'", n)) + -- http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=iws-appendixa + local f = bit.rshift + if n <= 0x7f then + return char(n) + elseif n <= 0x7ff then + return char(f(n, 6) + 192, n % 64 + 128) + elseif n <= 0xffff then + return char(f(n, 12) + 224, f(n % 4096, 6) + 128, n % 64 + 128) + elseif n <= 0x10ffff then + return char(f(n, 18) + 240, f(n % 262144, 12) + 128, f(n % 4096, 6) + 128, n % 64 + 128) + end + error(string.format("invalid unicode codepoint '%x'", n)) end local function parse_unicode_escape(s) - local n1 = tonumber(s:sub(1, 4), 16) - local n2 = tonumber(s:sub(7, 10), 16) - -- Surrogate pair? - if n2 then - return - codepoint_to_utf8((n1 - 0xd800) * 0x400 + (n2 - 0xdc00) + 0x10000) - else - return codepoint_to_utf8(n1) - end + local n1 = tonumber(s:sub(1, 4), 16) + local n2 = tonumber(s:sub(7, 10), 16) + -- Surrogate pair? + if n2 then + return + codepoint_to_utf8((n1 - 0xd800) * 0x400 + (n2 - 0xdc00) + 0x10000) + else + return codepoint_to_utf8(n1) + end end local function parse_string(str, i) - local res = "" - local j = i + 1 - local k = j + local res = "" + local j = i + 1 + local k = j - while j <= #str do - local x = str:byte(j) + while j <= #str do + local x = str:byte(j) - if x < 32 then - decode_error(str, j, "control character in string") + if x < 32 then + decode_error(str, j, "control character in string") - elseif x == 92 then -- `\`: Escape - res = res .. str:sub(k, j - 1) - j = j + 1 - local c = str:sub(j, j) - if c == "u" then - local hex = str:match("^[dD][89aAbB]%x%x\\u%x%x%x%x", j + 1) or - str:match("^%x%x%x%x", j + 1) or - decode_error(str, j - 1, - "invalid unicode escape in string") - res = res .. parse_unicode_escape(hex) - j = j + #hex - else - if not escape_chars[c] then - decode_error(str, j - 1, - "invalid escape char '" .. c .. "' in string") - end - res = res .. escape_char_map_inv[c] - end - k = j + 1 + elseif x == 92 then -- `\`: Escape + res = res .. str:sub(k, j - 1) + j = j + 1 + local c = str:sub(j, j) + if c == "u" then + local hex = str:match("^[dD][89aAbB]%x%x\\u%x%x%x%x", j + 1) or + str:match("^%x%x%x%x", j + 1) or + decode_error(str, j - 1, + "invalid unicode escape in string") + res = res .. parse_unicode_escape(hex) + j = j + #hex + else + if not escape_chars[c] then + decode_error(str, j - 1, + "invalid escape char '" .. c .. "' in string") + end + res = res .. escape_char_map_inv[c] + end + k = j + 1 - elseif x == 34 then -- `"`: End of string - res = res .. str:sub(k, j - 1) - return res, j + 1 - end + elseif x == 34 then -- `"`: End of string + res = res .. str:sub(k, j - 1) + return res, j + 1 + end - j = j + 1 - end + j = j + 1 + end - decode_error(str, i, "expected closing quote for string") + decode_error(str, i, "expected closing quote for string") end local function parse_number(str, i) - local x = next_char(str, i, delim_chars) - local s = str:sub(i, x - 1) - local n = tonumber(s) - if not n then decode_error(str, i, "invalid number '" .. s .. "'") end - return n, x + local x = next_char(str, i, delim_chars) + local s = str:sub(i, x - 1) + local n = tonumber(s) + if not n then decode_error(str, i, "invalid number '" .. s .. "'") end + return n, x end local function parse_literal(str, i) - local x = next_char(str, i, delim_chars) - local word = str:sub(i, x - 1) - if not literals[word] then - decode_error(str, i, "invalid literal '" .. word .. "'") - end - return literal_map[word], x + local x = next_char(str, i, delim_chars) + local word = str:sub(i, x - 1) + if not literals[word] then + decode_error(str, i, "invalid literal '" .. word .. "'") + end + return literal_map[word], x end local function parse_array(str, i) - local res = {} - local n = 1 - i = i + 1 - while 1 do - local x - i = next_char(str, i, space_chars, true) - -- Empty / end of array? - if str:sub(i, i) == "]" then - i = i + 1 - break - end - -- Read token - x, i = parse(str, i) - res[n] = x - n = n + 1 - -- Next token - i = next_char(str, i, space_chars, true) - local chr = str:sub(i, i) - i = i + 1 - if chr == "]" then break end - if chr ~= "," then decode_error(str, i, "expected ']' or ','") end - end - return res, i + local res = {} + local n = 1 + i = i + 1 + while 1 do + local x + i = next_char(str, i, space_chars, true) + -- Empty / end of array? + if str:sub(i, i) == "]" then + i = i + 1 + break + end + -- Read token + x, i = parse(str, i) + res[n] = x + n = n + 1 + -- Next token + i = next_char(str, i, space_chars, true) + local chr = str:sub(i, i) + i = i + 1 + if chr == "]" then break end + if chr ~= "," then decode_error(str, i, "expected ']' or ','") end + end + return res, i end local function parse_object(str, i) - local res = {} - i = i + 1 - while 1 do - local key, val - i = next_char(str, i, space_chars, true) - -- Empty / end of object? - if str:sub(i, i) == "}" then - i = i + 1 - break - end - -- Read key - if str:sub(i, i) ~= '"' then - decode_error(str, i, "expected string for key") - end - key, i = parse(str, i) - -- Read ':' delimiter - i = next_char(str, i, space_chars, true) - if str:sub(i, i) ~= ":" then - decode_error(str, i, "expected ':' after key") - end - i = next_char(str, i + 1, space_chars, true) - -- Read value - val, i = parse(str, i) - -- Set - res[key] = val - -- Next token - i = next_char(str, i, space_chars, true) - local chr = str:sub(i, i) - i = i + 1 - if chr == "}" then break end - if chr ~= "," then decode_error(str, i, "expected '}' or ','") end - end - return res, i + local res = {} + i = i + 1 + while 1 do + local key, val + i = next_char(str, i, space_chars, true) + -- Empty / end of object? + if str:sub(i, i) == "}" then + i = i + 1 + break + end + -- Read key + if str:sub(i, i) ~= '"' then + decode_error(str, i, "expected string for key") + end + key, i = parse(str, i) + -- Read ':' delimiter + i = next_char(str, i, space_chars, true) + if str:sub(i, i) ~= ":" then + decode_error(str, i, "expected ':' after key") + end + i = next_char(str, i + 1, space_chars, true) + -- Read value + val, i = parse(str, i) + -- Set + res[key] = val + -- Next token + i = next_char(str, i, space_chars, true) + local chr = str:sub(i, i) + i = i + 1 + if chr == "}" then break end + if chr ~= "," then decode_error(str, i, "expected '}' or ','") end + end + return res, i end local char_func_map = { - ['"'] = parse_string, - ["0"] = parse_number, - ["1"] = parse_number, - ["2"] = parse_number, - ["3"] = parse_number, - ["4"] = parse_number, - ["5"] = parse_number, - ["6"] = parse_number, - ["7"] = parse_number, - ["8"] = parse_number, - ["9"] = parse_number, - ["-"] = parse_number, - ["t"] = parse_literal, - ["f"] = parse_literal, - ["n"] = parse_literal, - ["["] = parse_array, - ["{"] = parse_object + ['"'] = parse_string, + ["0"] = parse_number, + ["1"] = parse_number, + ["2"] = parse_number, + ["3"] = parse_number, + ["4"] = parse_number, + ["5"] = parse_number, + ["6"] = parse_number, + ["7"] = parse_number, + ["8"] = parse_number, + ["9"] = parse_number, + ["-"] = parse_number, + ["t"] = parse_literal, + ["f"] = parse_literal, + ["n"] = parse_literal, + ["["] = parse_array, + ["{"] = parse_object } function parse(str, idx) - local chr = str:sub(idx, idx) - local f = char_func_map[chr] - if f then return f(str, idx) end - decode_error(str, idx, "unexpected character '" .. chr .. "'") + local chr = str:sub(idx, idx) + local f = char_func_map[chr] + if f then return f(str, idx) end + decode_error(str, idx, "unexpected character '" .. chr .. "'") end function json.decode(str) - if type(str) ~= 'string' then - error("expected argument of type string, got " .. type(str)) - end - local res, idx = parse(str, next_char(str, 1, space_chars, true)) - idx = next_char(str, idx, space_chars, true) - if idx <= #str then decode_error(str, idx, "trailing garbage") end - return res + if type(str) ~= 'string' then + error("expected argument of type string, got " .. type(str)) + end + local res, idx = parse(str, next_char(str, 1, space_chars, true)) + idx = next_char(str, idx, space_chars, true) + if idx <= #str then decode_error(str, idx, "trailing garbage") end + return res end return json \ No newline at end of file diff --git a/Zframework/languages.lua b/Zframework/languages.lua index 411d3692..58eb9a8e 100644 --- a/Zframework/languages.lua +++ b/Zframework/languages.lua @@ -1,56 +1,56 @@ local LANG={} function LANG.init(langList,publicText)--Attention, calling this will destory all initializing methods, create a LANG.set()! - local function _langFallback(T0,T) - for k,v in next,T0 do - if type(v)=='table'and not v.refuseCopy then--refuseCopy: just copy pointer, not contents - if not T[k]then T[k]={}end - if type(T[k])=='table'then _langFallback(v,T[k])end - elseif not T[k]then - T[k]=v - end - end - end - local tipMeta={__call=function(L)return L[math.random(#L)]end} + local function _langFallback(T0,T) + for k,v in next,T0 do + if type(v)=='table'and not v.refuseCopy then--refuseCopy: just copy pointer, not contents + if not T[k]then T[k]={}end + if type(T[k])=='table'then _langFallback(v,T[k])end + elseif not T[k]then + T[k]=v + end + end + end + local tipMeta={__call=function(L)return L[math.random(#L)]end} - for i=1,#langList do - local L=langList[i] + for i=1,#langList do + local L=langList[i] - --Set public text - for key,list in next,publicText do - L[key]=list - end + --Set public text + for key,list in next,publicText do + L[key]=list + end - --Fallback to other language, default zh - if i>1 then - _langFallback(langList[L.fallback or 1],L) - end + --Fallback to other language, default zh + if i>1 then + _langFallback(langList[L.fallback or 1],L) + end - --Metatable:__call for table:getTip - if type(rawget(L,'getTip'))=='table'then - setmetatable(L.getTip,tipMeta) - end - end + --Metatable:__call for table:getTip + if type(rawget(L,'getTip'))=='table'then + setmetatable(L.getTip,tipMeta) + end + end - LANG.init,LANG.setLangList,LANG.setPublicText=nil + LANG.init,LANG.setLangList,LANG.setPublicText=nil - function LANG.set(l) - if text~=langList[l]then - text=langList[l] - WIDGET.setLang(text.WidgetText) - for k,v in next,drawableText do - if text[k]then - v:set(text[k]) - end - end - end - end + function LANG.set(l) + if text~=langList[l]then + text=langList[l] + WIDGET.setLang(text.WidgetText) + for k,v in next,drawableText do + if text[k]then + v:set(text[k]) + end + end + end + end - function LANG.addScene(name) - for i=1,#langList do - if langList[i].WidgetText and not langList[i].WidgetText[name]then - langList[i].WidgetText[name]={back=langList[i].back} - end - end - end + function LANG.addScene(name) + for i=1,#langList do + if langList[i].WidgetText and not langList[i].WidgetText[name]then + langList[i].WidgetText[name]={back=langList[i].back} + end + end + end end return LANG \ No newline at end of file diff --git a/Zframework/light/init.lua b/Zframework/light/init.lua index 3fd05ed1..4d6d4eae 100644 --- a/Zframework/light/init.lua +++ b/Zframework/light/init.lua @@ -10,77 +10,77 @@ local shadowMapShader=gc.newShader('Zframework/light/shadowMap.glsl')--Shader fo local lightRenderShader=gc.newShader('Zframework/light/lightRender.glsl')--Shader for rendering blurred lights and shadows. local Lights={}--Lightsource objects local function move(L,x,y) - L.x,L.y=x,y + L.x,L.y=x,y end local function setPow(L,pow) - L.size=pow + L.size=pow end local function drawLight(L) - local s=L.size + local s=L.size - --Initialization - gc_setCanvas(L.blackCanvas)clear() - gc_setCanvas(L.shadowCanvas)clear() - gc_setCanvas(L.renderCanvas)clear() - lightRenderShader:send('xresolution',s) - shadowMapShader:send('yresolution',s) + --Initialization + gc_setCanvas(L.blackCanvas)clear() + gc_setCanvas(L.shadowCanvas)clear() + gc_setCanvas(L.renderCanvas)clear() + lightRenderShader:send('xresolution',s) + shadowMapShader:send('yresolution',s) - --Get up-left of light - local X=L.x-s*.5 - local Y=L.y-s*.5 + --Get up-left of light + local X=L.x-s*.5 + local Y=L.y-s*.5 - --Render solid - gc_translate(-X,-Y) - L.blackCanvas:renderTo(L.blackFn) - gc_translate(X,Y) + --Render solid + gc_translate(-X,-Y) + L.blackCanvas:renderTo(L.blackFn) + gc_translate(X,Y) - --Render shade canvas by solid - gc_setShader(shadowMapShader) - gc_setCanvas(L.shadowCanvas) - gc_draw(L.blackCanvas) + --Render shade canvas by solid + gc_setShader(shadowMapShader) + gc_setCanvas(L.shadowCanvas) + gc_draw(L.blackCanvas) - --Render light canvas by shade - gc_setShader(lightRenderShader) - gc_setCanvas(L.renderCanvas) - gc_draw(L.shadowCanvas,0,0,0,1,s) + --Render light canvas by shade + gc_setShader(lightRenderShader) + gc_setCanvas(L.renderCanvas) + gc_draw(L.shadowCanvas,0,0,0,1,s) - --Ready to final render - gc_setShader()gc_setCanvas()gc.setBlendMode('add') + --Ready to final render + gc_setShader()gc_setCanvas()gc.setBlendMode('add') - --Render to screen - gc_draw(L.renderCanvas,X,Y+s,0,1,-1) + --Render to screen + gc_draw(L.renderCanvas,X,Y+s,0,1,-1) - --Reset - gc.setBlendMode('alpha') + --Reset + gc.setBlendMode('alpha') end local LIGHT={} function LIGHT.draw() - gc_setColor(1,1,1) - for i=1,#Lights do - drawLight(Lights[i]) - end + gc_setColor(1,1,1) + for i=1,#Lights do + drawLight(Lights[i]) + end end function LIGHT.clear() - for i=1,#Lights do - Lights[i].blackCanvas:release() - Lights[i].shadowCanvas:release() - Lights[i].renderCanvas:release() - Lights[i]=nil - end + for i=1,#Lights do + Lights[i].blackCanvas:release() + Lights[i].shadowCanvas:release() + Lights[i].renderCanvas:release() + Lights[i]=nil + end end function LIGHT.add(x,y,radius,solidFunc) - local id=#Lights+1 - Lights[id]={ - id=id, - x=x,y=y,size=radius, - blackCanvas=gc.newCanvas(radius,radius),--Solid canvas - shadowCanvas=gc.newCanvas(radius,1),--1D vis-depth canvas - renderCanvas=gc.newCanvas(radius,radius),--Light canvas - blackFn=solidFunc,--Solid draw function + local id=#Lights+1 + Lights[id]={ + id=id, + x=x,y=y,size=radius, + blackCanvas=gc.newCanvas(radius,radius),--Solid canvas + shadowCanvas=gc.newCanvas(radius,1),--1D vis-depth canvas + renderCanvas=gc.newCanvas(radius,radius),--Light canvas + blackFn=solidFunc,--Solid draw function - move=move, - setPow=setPow, - } + move=move, + setPow=setPow, + } end return LIGHT \ No newline at end of file diff --git a/Zframework/light/lightRender.glsl b/Zframework/light/lightRender.glsl index d4fd3214..9c27886f 100644 --- a/Zframework/light/lightRender.glsl +++ b/Zframework/light/lightRender.glsl @@ -2,28 +2,28 @@ extern float xresolution; // Sample from 1D vis-depth map float samp(vec2 coord,float r,Image u_texture){ - return step(r,Texel(u_texture,coord).r); + return step(r,Texel(u_texture,coord).r); } vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 screen_coords){ - // Cartesian to polar, y of 1D sample is always 0 - vec2 norm=tex_coords.st*2.-1.; - vec2 tc=vec2((atan(norm.y,norm.x)+PI)/(2.*PI),0.); - float r=length(norm); + // Cartesian to polar, y of 1D sample is always 0 + vec2 norm=tex_coords.st*2.-1.; + vec2 tc=vec2((atan(norm.y,norm.x)+PI)/(2.*PI),0.); + float r=length(norm); - // Enlarge blur parameter by distance, light scattering simulation - float blur=(1./xresolution)*smoothstep(0.3,1.,r); + // Enlarge blur parameter by distance, light scattering simulation + float blur=(1./xresolution)*smoothstep(0.3,1.,r); - // Simple Gaussian blur - float sum=// Brightness(0~1) - samp(vec2(tc.x-3.*blur,tc.y),r,tex)*0.1 - +samp(vec2(tc.x-2.*blur,tc.y),r,tex)*0.13 - +samp(vec2(tc.x-1.*blur,tc.y),r,tex)*0.17 + // Simple Gaussian blur + float sum=// Brightness(0~1) + samp(vec2(tc.x-3.*blur,tc.y),r,tex)*0.1 + +samp(vec2(tc.x-2.*blur,tc.y),r,tex)*0.13 + +samp(vec2(tc.x-1.*blur,tc.y),r,tex)*0.17 - +samp(tc,r,tex)*0.2// The center tex coord, which gives us hard shadows. - +samp(vec2(tc.x+1.*blur,tc.y),r,tex)*0.17 - +samp(vec2(tc.x+2.*blur,tc.y),r,tex)*0.13 - +samp(vec2(tc.x+3.*blur,tc.y),r,tex)*0.1; + +samp(tc,r,tex)*0.2// The center tex coord, which gives us hard shadows. + +samp(vec2(tc.x+1.*blur,tc.y),r,tex)*0.17 + +samp(vec2(tc.x+2.*blur,tc.y),r,tex)*0.13 + +samp(vec2(tc.x+3.*blur,tc.y),r,tex)*0.1; - // Multiply the distance to get a soft fading - return vec4(vec3(1.),sum*smoothstep(1.,0.,r)); + // Multiply the distance to get a soft fading + return vec4(vec3(1.),sum*smoothstep(1.,0.,r)); } \ No newline at end of file diff --git a/Zframework/light/shadowMap.glsl b/Zframework/light/shadowMap.glsl index 44060f5d..aefe8776 100644 --- a/Zframework/light/shadowMap.glsl +++ b/Zframework/light/shadowMap.glsl @@ -1,20 +1,20 @@ #define PI 3.14 extern float yresolution; vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 screen_coords){ - // Iterate through the occluder map's y-axis. - for(float y=0.;y0.1 - )return vec4(vec3(y/yresolution),1.);// Collision check, alpha>0.1 means transparent - } - return vec4(1.);// Return max distance 1 + //sample from solid + if( + Texel(tex,( + vec2(-r*sin(theta),-r*cos(theta))*0.5+0.5// Coord of solid sampling + )).a>0.1 + )return vec4(vec3(y/yresolution),1.);// Collision check, alpha>0.1 means transparent + } + return vec4(1.);// Return max distance 1 } \ No newline at end of file diff --git a/Zframework/loadLib.lua b/Zframework/loadLib.lua index 331ca9fe..a1d471ee 100644 --- a/Zframework/loadLib.lua +++ b/Zframework/loadLib.lua @@ -1,23 +1,23 @@ package.cpath=package.cpath..';'..SAVEDIR..'/lib/lib?.so;'..'?.dylib' return function(libName) - if SYSTEM=='Android'then - local platform=(function() - local p=io.popen('uname -m') - local arch=p:read('*a'):lower() - p:close() - return - arch=='aarch64'or arch=='arm64'and'arm64-v8a'or - 'armeabi-v7a' - end)() - love.filesystem.write( - 'lib/libCCloader.so', - love.filesystem.read('data','libAndroid/'..platform..'/libCCloader.so') - ) - end - local r1,r2,r3=pcall(require,libName) - if r1 and r2 then - return r2 - else - MES.new('error',"Cannot load "..libName..": "..(r2 or r3)) - end + if SYSTEM=='Android'then + local platform=(function() + local p=io.popen('uname -m') + local arch=p:read('*a'):lower() + p:close() + return + arch=='aarch64'or arch=='arm64'and'arm64-v8a'or + 'armeabi-v7a' + end)() + love.filesystem.write( + 'lib/libCCloader.so', + love.filesystem.read('data','libAndroid/'..platform..'/libCCloader.so') + ) + end + local r1,r2,r3=pcall(require,libName) + if r1 and r2 then + return r2 + else + MES.new('error',"Cannot load "..libName..": "..(r2 or r3)) + end end \ No newline at end of file diff --git a/Zframework/message.lua b/Zframework/message.lua index 8fb638dc..60118515 100644 --- a/Zframework/message.lua +++ b/Zframework/message.lua @@ -7,137 +7,137 @@ local max=math.max local mesList={} local mesIcon={ - check=GC.DO{40,40, - {'setLW',10}, - {'setCL',0,0,0}, - {'line',4,19,15,30,36,9}, - {'setLW',6}, - {'setCL',.7,1,.6}, - {'line',5,20,15,30,35,10}, - }, - info=GC.DO{40,40, - {'setCL',.2,.25,.85}, - {'fCirc',20,20,15}, - {'setCL',1,1,1}, - {'setLW',2}, - {'dCirc',20,20,15}, - {'fRect',18,11,4,4}, - {'fRect',18,17,4,12}, - }, - broadcast=GC.DO{40,40, - {'setCL',1,1,1}, - {'fRect',2,4,36,26,3}, - {'fPoly',2,27,2,37,14,25}, - {'setCL',.5,.5,.5}, - {'fRect',6,11,4,4},{'fRect',14,11,19,4}, - {'fRect',6,19,4,4},{'fRect',14,19,19,4}, - }, - warn=GC.DO{40,40, - {'setCL',.95,.83,.4}, - {'fPoly',20.5,1,0,38,40,38}, - {'setCL',0,0,0}, - {'dPoly',20.5,1,0,38,40,38}, - {'fRect',17,10,7,18}, - {'fRect',17,29,7,7}, - {'setCL',1,1,1}, - {'fRect',18,11,5,16}, - {'fRect',18,30,5,5}, - }, - error=GC.DO{40,40, - {'setCL',.95,.3,.3}, - {'fCirc',20,20,19}, - {'setCL',0,0,0}, - {'dCirc',20,20,19}, - {'setLW',6}, - {'line',10.2,10.2,29.8,29.8}, - {'line',10.2,29.8,29.8,10.2}, - {'setLW',4}, - {'setCL',1,1,1}, - {'line',11,11,29,29}, - {'line',11,29,29,11}, - }, + check=GC.DO{40,40, + {'setLW',10}, + {'setCL',0,0,0}, + {'line',4,19,15,30,36,9}, + {'setLW',6}, + {'setCL',.7,1,.6}, + {'line',5,20,15,30,35,10}, + }, + info=GC.DO{40,40, + {'setCL',.2,.25,.85}, + {'fCirc',20,20,15}, + {'setCL',1,1,1}, + {'setLW',2}, + {'dCirc',20,20,15}, + {'fRect',18,11,4,4}, + {'fRect',18,17,4,12}, + }, + broadcast=GC.DO{40,40, + {'setCL',1,1,1}, + {'fRect',2,4,36,26,3}, + {'fPoly',2,27,2,37,14,25}, + {'setCL',.5,.5,.5}, + {'fRect',6,11,4,4},{'fRect',14,11,19,4}, + {'fRect',6,19,4,4},{'fRect',14,19,19,4}, + }, + warn=GC.DO{40,40, + {'setCL',.95,.83,.4}, + {'fPoly',20.5,1,0,38,40,38}, + {'setCL',0,0,0}, + {'dPoly',20.5,1,0,38,40,38}, + {'fRect',17,10,7,18}, + {'fRect',17,29,7,7}, + {'setCL',1,1,1}, + {'fRect',18,11,5,16}, + {'fRect',18,30,5,5}, + }, + error=GC.DO{40,40, + {'setCL',.95,.3,.3}, + {'fCirc',20,20,19}, + {'setCL',0,0,0}, + {'dCirc',20,20,19}, + {'setLW',6}, + {'line',10.2,10.2,29.8,29.8}, + {'line',10.2,29.8,29.8,10.2}, + {'setLW',4}, + {'setCL',1,1,1}, + {'line',11,11,29,29}, + {'line',11,29,29,11}, + }, } local MES={} function MES.new(icon,str,time) - local backColor={.5,.5,.5,.7} - if type(icon)=='string'then - if icon=='check'then - backColor={.3,.6,.3,.7} - elseif icon=='broadcast'then - backColor={.3,.3,.6,.8} - elseif icon=='warn'then - backColor={.4,.4,.2,.9} - elseif icon=='error'then - backColor={.4,.2,.2,.9} - end - icon=mesIcon[icon] - end - local t=gc.newText(getFont(30),str) - local w=math.max(t:getWidth()+(icon and 45 or 5),200)+20 - local h=math.max(t:getHeight(),46)+3 - local L={w,h, - {'clear',backColor}, - {'setCL',.7,.7,.7}, - {'setLW',2}, - {'dRect',1,1,w-2,h-2}, - {'setCL',1,1,1}, - } - if icon then - ins(L,{'draw',icon,4,4,nil,40/icon:getWidth(),40/icon:getHeight()}) - end - ins(L,{'draw',t,icon and 50 or 10,2}) + local backColor={.5,.5,.5,.7} + if type(icon)=='string'then + if icon=='check'then + backColor={.3,.6,.3,.7} + elseif icon=='broadcast'then + backColor={.3,.3,.6,.8} + elseif icon=='warn'then + backColor={.4,.4,.2,.9} + elseif icon=='error'then + backColor={.4,.2,.2,.9} + end + icon=mesIcon[icon] + end + local t=gc.newText(getFont(30),str) + local w=math.max(t:getWidth()+(icon and 45 or 5),200)+20 + local h=math.max(t:getHeight(),46)+3 + local L={w,h, + {'clear',backColor}, + {'setCL',.7,.7,.7}, + {'setLW',2}, + {'dRect',1,1,w-2,h-2}, + {'setCL',1,1,1}, + } + if icon then + ins(L,{'draw',icon,4,4,nil,40/icon:getWidth(),40/icon:getHeight()}) + end + ins(L,{'draw',t,icon and 50 or 10,2}) - ins(mesList,{ - startTime=.5, - endTime=.5, - time=time or 3, - canvas=GC.DO(L), - width=w,height=h, - scale=h>400 and 1/math.min(h/400,2.6)or 1 - }) + ins(mesList,{ + startTime=.5, + endTime=.5, + time=time or 3, + canvas=GC.DO(L), + width=w,height=h, + scale=h>400 and 1/math.min(h/400,2.6)or 1 + }) end function MES.update(dt) - for i=#mesList,1,-1 do - local m=mesList[i] - if m.startTime>0 then - m.startTime=max(m.startTime-dt,0) - elseif m.time>0 then - m.time=max(m.time-dt,0) - elseif m.endTime>0 then - m.endTime=m.endTime-dt - else - rem(mesList,i) - end - end + for i=#mesList,1,-1 do + local m=mesList[i] + if m.startTime>0 then + m.startTime=max(m.startTime-dt,0) + elseif m.time>0 then + m.time=max(m.time-dt,0) + elseif m.endTime>0 then + m.endTime=m.endTime-dt + else + rem(mesList,i) + end + end end function MES.draw() - gc_push('transform') - if #mesList>0 then - gc_translate(SCR.safeX,30) - for i=1,#mesList do - local m=mesList[i] - gc_setColor(1,1,1,2*(m.endTime-m.startTime)) - gc_draw(m.canvas,40-80*(m.endTime+m.startTime),0,nil,m.scale) - gc_translate(0,m.height*m.scale+4) - end - end - gc_pop() + gc_push('transform') + if #mesList>0 then + gc_translate(SCR.safeX,30) + for i=1,#mesList do + local m=mesList[i] + gc_setColor(1,1,1,2*(m.endTime-m.startTime)) + gc_draw(m.canvas,40-80*(m.endTime+m.startTime),0,nil,m.scale) + gc_translate(0,m.height*m.scale+4) + end + end + gc_pop() end function MES.traceback() - local mes= - debug.traceback('',1) - :gsub(': in function',', in') - :gsub(':',' ') - :gsub('\t','') - MES.new('error',mes:sub( - mes:find("\n",2)+1, - mes:find("\n%[C%], in 'xpcall'") - ),5) + local mes= + debug.traceback('',1) + :gsub(': in function',', in') + :gsub(':',' ') + :gsub('\t','') + MES.new('error',mes:sub( + mes:find("\n",2)+1, + mes:find("\n%[C%], in 'xpcall'") + ),5) end return MES \ No newline at end of file diff --git a/Zframework/profile.lua b/Zframework/profile.lua index c07a0a06..5ab54864 100644 --- a/Zframework/profile.lua +++ b/Zframework/profile.lua @@ -2,156 +2,156 @@ local clock=os.clock local profile={} -local _labeled={} -- function labels -local _defined={} -- function definitions -local _tcalled={} -- time of last call +local _labeled={} -- function labels +local _defined={} -- function definitions +local _tcalled={} -- time of last call local _telapsed={}-- total execution time -local _ncalls={} -- number of calls +local _ncalls={} -- number of calls local _internal={}-- list of internal profiler functions local getInfo=debug.getinfo function profile.hooker(event,line,info) - info=info or getInfo(2,'fnS') - local f=info.func - if _internal[f]then return end-- ignore the profiler itself - if info.name then _labeled[f]=info.name end-- get the function name if available - -- find the line definition - if not _defined[f]then - _defined[f]=info.short_src..":"..info.linedefined - _ncalls[f]=0 - _telapsed[f]=0 - end - if _tcalled[f]then - local dt=clock()-_tcalled[f] - _telapsed[f]=_telapsed[f]+dt - _tcalled[f]=nil - end - if event=='tail call'then - local prev=getInfo(3,'fnS') - profile.hooker('return',line,prev) - profile.hooker('call',line,info) - elseif event=='call'then - _tcalled[f]=clock() - else - _ncalls[f]=_ncalls[f]+1 - end + info=info or getInfo(2,'fnS') + local f=info.func + if _internal[f]then return end-- ignore the profiler itself + if info.name then _labeled[f]=info.name end-- get the function name if available + -- find the line definition + if not _defined[f]then + _defined[f]=info.short_src..":"..info.linedefined + _ncalls[f]=0 + _telapsed[f]=0 + end + if _tcalled[f]then + local dt=clock()-_tcalled[f] + _telapsed[f]=_telapsed[f]+dt + _tcalled[f]=nil + end + if event=='tail call'then + local prev=getInfo(3,'fnS') + profile.hooker('return',line,prev) + profile.hooker('call',line,info) + elseif event=='call'then + _tcalled[f]=clock() + else + _ncalls[f]=_ncalls[f]+1 + end end --- Starts collecting data. function profile.start() - if jit then - jit.off() - jit.flush() - end - debug.sethook(profile.hooker,'cr') + if jit then + jit.off() + jit.flush() + end + debug.sethook(profile.hooker,'cr') end --- Stops collecting data. function profile.stop() - debug.sethook() - for f in next,_tcalled do - local dt=clock()-_tcalled[f] - _telapsed[f]=_telapsed[f]+dt - _tcalled[f]=nil - end - -- merge closures - local lookup={} - for f,d in next,_defined do - local id=(_labeled[f]or"?")..d - local f2=lookup[id] - if f2 then - _ncalls[f2]=_ncalls[f2]+(_ncalls[f]or 0) - _telapsed[f2]=_telapsed[f2]+(_telapsed[f]or 0) - _defined[f],_labeled[f]=nil,nil - _ncalls[f],_telapsed[f]=nil,nil - else - lookup[id]=f - end - end - collectgarbage() + debug.sethook() + for f in next,_tcalled do + local dt=clock()-_tcalled[f] + _telapsed[f]=_telapsed[f]+dt + _tcalled[f]=nil + end + -- merge closures + local lookup={} + for f,d in next,_defined do + local id=(_labeled[f]or"?")..d + local f2=lookup[id] + if f2 then + _ncalls[f2]=_ncalls[f2]+(_ncalls[f]or 0) + _telapsed[f2]=_telapsed[f2]+(_telapsed[f]or 0) + _defined[f],_labeled[f]=nil,nil + _ncalls[f],_telapsed[f]=nil,nil + else + lookup[id]=f + end + end + collectgarbage() end --- Resets all collected data. function profile.reset() - for f in next,_ncalls do - _ncalls[f]=0 - _telapsed[f]=0 - _tcalled[f]=nil - end - collectgarbage() + for f in next,_ncalls do + _ncalls[f]=0 + _telapsed[f]=0 + _tcalled[f]=nil + end + collectgarbage() end local function _comp(a,b) - local dt=_telapsed[b]-_telapsed[a] - return dt==0 and _ncalls[b]<_ncalls[a]or dt<0 + local dt=_telapsed[b]-_telapsed[a] + return dt==0 and _ncalls[b]<_ncalls[a]or dt<0 end --- Iterates all functions that have been called since the profile was started. function profile.query(limit) - local t={} - for f,n in next,_ncalls do - if n>0 then - t[#t+1]=f - end - end - table.sort(t,_comp) + local t={} + for f,n in next,_ncalls do + if n>0 then + t[#t+1]=f + end + end + table.sort(t,_comp) - if limit then while #t>limit do table.remove(t)end end + if limit then while #t>limit do table.remove(t)end end - for i,f in ipairs(t)do - local dt=0 - if _tcalled[f]then - dt=clock()-_tcalled[f] - end - t[i]={i,_labeled[f]or"?",math.floor((_telapsed[f]+dt)*1e6)/1e6,_ncalls[f],_defined[f]} - end - return t + for i,f in ipairs(t)do + local dt=0 + if _tcalled[f]then + dt=clock()-_tcalled[f] + end + t[i]={i,_labeled[f]or"?",math.floor((_telapsed[f]+dt)*1e6)/1e6,_ncalls[f],_defined[f]} + end + return t end local cols={3,20,8,6,32} function profile.report(n) - local out={} - local report=profile.query(n) - for i,row in ipairs(report)do - for j=1,5 do - local s=tostring(row[j]) - local l1,l2=#s,cols[j] - if l1l2 then - s=s:sub(l1-l2+1,l1) - end - row[j]=s - end - out[i]=table.concat(row," | ") - end + local out={} + local report=profile.query(n) + for i,row in ipairs(report)do + for j=1,5 do + local s=tostring(row[j]) + local l1,l2=#s,cols[j] + if l1l2 then + s=s:sub(l1-l2+1,l1) + end + row[j]=s + end + out[i]=table.concat(row," | ") + end - local row=" +-----+----------------------+----------+--------+----------------------------------+ \n" - local col=" | # | Function | Time | Calls | Code | \n" - local sz=row..col..row - if #out>0 then - sz=sz.." | "..table.concat(out," | \n | ").." | \n" - end - return "\n"..sz..row + local row=" +-----+----------------------+----------+--------+----------------------------------+ \n" + local col=" | # | Function | Time | Calls | Code | \n" + local sz=row..col..row + if #out>0 then + sz=sz.." | "..table.concat(out," | \n | ").." | \n" + end + return "\n"..sz..row end local switch=false function profile.switch() - switch=not switch - if not switch then - profile.stop() - love.system.setClipboardText(PROFILE.report()) - PROFILE.reset() - return false - else - PROFILE.start() - return true - end + switch=not switch + if not switch then + profile.stop() + love.system.setClipboardText(PROFILE.report()) + PROFILE.reset() + return false + else + PROFILE.start() + return true + end end -- store all internal profiler functions for _,v in next,profile do - _internal[v]=type(v)=='function' + _internal[v]=type(v)=='function' end return profile diff --git a/Zframework/scene.lua b/Zframework/scene.lua index d35a6555..ee0786a9 100644 --- a/Zframework/scene.lua +++ b/Zframework/scene.lua @@ -4,173 +4,173 @@ local abs=math.abs local scenes={} local SCN={ - cur='NULL',--Current scene name - swapping=false,--If Swapping - stat={ - tar=false, --Swapping target - style=false,--Swapping style - changeTime=false, --Loading point - time=false, --Full swap time - draw=false, --Swap draw func - }, - stack={},--Scene stack + cur='NULL', --Current scene name + swapping=false, --If Swapping + stat={ + tar=false, --Swapping target + style=false, --Swapping style + changeTime=false,--Loading point + time=false, --Full swap time + draw=false, --Swap draw func + }, + stack={},--Scene stack - scenes=scenes, + scenes=scenes, - --Events - update=false, - draw=false, - mouseClick=false, - touchClick=false, - mouseDown=false, - mouseMove=false, - mouseUp=false, - wheelMoved=false, - touchDown=false, - touchUp=false, - touchMove=false, - keyDown=false, - keyUp=false, - gamepadDown=false, - gamepadUp=false, - fileDropped=false, - directoryDropped=false, - resize=false, - socketRead=false, + --Events + update=false, + draw=false, + mouseClick=false, + touchClick=false, + mouseDown=false, + mouseMove=false, + mouseUp=false, + wheelMoved=false, + touchDown=false, + touchUp=false, + touchMove=false, + keyDown=false, + keyUp=false, + gamepadDown=false, + gamepadUp=false, + fileDropped=false, + directoryDropped=false, + resize=false, + socketRead=false, }--Scene datas, returned function SCN.add(name,scene) - scenes[name]=scene - if scene.widgetList then - setmetatable(scene.widgetList,WIDGET.indexMeta) - end + scenes[name]=scene + if scene.widgetList then + setmetatable(scene.widgetList,WIDGET.indexMeta) + end end function SCN.swapUpdate() - local S=SCN.stat - S.time=S.time-1 - if S.time==S.changeTime then - --Scene swapped this moment - SCN.init(S.tar,SCN.cur) - end - if S.time==0 then - SCN.swapping=false - end + local S=SCN.stat + S.time=S.time-1 + if S.time==S.changeTime then + --Scene swapped this moment + SCN.init(S.tar,SCN.cur) + end + if S.time==0 then + SCN.swapping=false + end end function SCN.init(s,org) - love.keyboard.setTextInput(false) + love.keyboard.setTextInput(false) - local S=scenes[s] - SCN.cur=s + local S=scenes[s] + SCN.cur=s - WIDGET.setScrollHeight(S.widgetScrollHeight) - WIDGET.setWidgetList(S.widgetList) - SCN.sceneInit=S.sceneInit - SCN.sceneBack=S.sceneBack - SCN.mouseDown=S.mouseDown - SCN.mouseMove=S.mouseMove - SCN.mouseUp=S.mouseUp - SCN.mouseClick=S.mouseClick - SCN.wheelMoved=S.wheelMoved - SCN.touchDown=S.touchDown - SCN.touchUp=S.touchUp - SCN.touchMove=S.touchMove - SCN.touchClick=S.touchClick - SCN.keyDown=S.keyDown - SCN.keyUp=S.keyUp - SCN.gamepadDown=S.gamepadDown - SCN.gamepadUp=S.gamepadUp - SCN.fileDropped=S.fileDropped - SCN.directoryDropped=S.directoryDropped - SCN.resize=S.resize - SCN.socketRead=S.socketRead - SCN.update=S.update - SCN.draw=S.draw - if S.sceneInit then S.sceneInit(org)end + WIDGET.setScrollHeight(S.widgetScrollHeight) + WIDGET.setWidgetList(S.widgetList) + SCN.sceneInit=S.sceneInit + SCN.sceneBack=S.sceneBack + SCN.mouseDown=S.mouseDown + SCN.mouseMove=S.mouseMove + SCN.mouseUp=S.mouseUp + SCN.mouseClick=S.mouseClick + SCN.wheelMoved=S.wheelMoved + SCN.touchDown=S.touchDown + SCN.touchUp=S.touchUp + SCN.touchMove=S.touchMove + SCN.touchClick=S.touchClick + SCN.keyDown=S.keyDown + SCN.keyUp=S.keyUp + SCN.gamepadDown=S.gamepadDown + SCN.gamepadUp=S.gamepadUp + SCN.fileDropped=S.fileDropped + SCN.directoryDropped=S.directoryDropped + SCN.resize=S.resize + SCN.socketRead=S.socketRead + SCN.update=S.update + SCN.draw=S.draw + if S.sceneInit then S.sceneInit(org)end end function SCN.push(tar,style) - if not SCN.swapping then - local m=#SCN.stack - SCN.stack[m+1]=tar or SCN.cur - SCN.stack[m+2]=style or'fade' - end + if not SCN.swapping then + local m=#SCN.stack + SCN.stack[m+1]=tar or SCN.cur + SCN.stack[m+2]=style or'fade' + end end function SCN.pop() - local s=SCN.stack - s[#s],s[#s-1]=nil + local s=SCN.stack + s[#s],s[#s-1]=nil end local swap={ - none={duration=1,changeTime=0,draw=function()end}, - flash={duration=8,changeTime=1,draw=function()gc.clear(1,1,1)end}, - fade={duration=30,changeTime=15,draw=function(t) - t=t>15 and 2-t/15 or t/15 - gc.setColor(0,0,0,t) - gc.rectangle('fill',0,0,SCR.w,SCR.h) - end}, - fade_togame={duration=120,changeTime=20,draw=function(t) - t=t>20 and(120-t)/100 or t/20 - gc.setColor(0,0,0,t) - gc.rectangle('fill',0,0,SCR.w,SCR.h) - end}, - slowFade={duration=180,changeTime=90,draw=function(t) - t=t>90 and 2-t/90 or t/90 - gc.setColor(0,0,0,t) - gc.rectangle('fill',0,0,SCR.w,SCR.h) - end}, - swipeL={duration=30,changeTime=15,draw=function(t) - t=t/30 - gc.setColor(.1,.1,.1,1-abs(t-.5)) - t=t*t*(3-2*t)*2-1 - gc.rectangle('fill',t*SCR.w,0,SCR.w,SCR.h) - end}, - swipeR={duration=30,changeTime=15,draw=function(t) - t=t/30 - gc.setColor(.1,.1,.1,1-abs(t-.5)) - t=t*t*(2*t-3)*2+1 - gc.rectangle('fill',t*SCR.w,0,SCR.w,SCR.h) - end}, - swipeD={duration=30,changeTime=15,draw=function(t) - t=t/30 - gc.setColor(.1,.1,.1,1-abs(t-.5)) - t=t*t*(2*t-3)*2+1 - gc.rectangle('fill',0,t*SCR.h,SCR.w,SCR.h) - end}, + none={duration=1,changeTime=0,draw=function()end}, + flash={duration=8,changeTime=1,draw=function()gc.clear(1,1,1)end}, + fade={duration=30,changeTime=15,draw=function(t) + t=t>15 and 2-t/15 or t/15 + gc.setColor(0,0,0,t) + gc.rectangle('fill',0,0,SCR.w,SCR.h) + end}, + fade_togame={duration=120,changeTime=20,draw=function(t) + t=t>20 and(120-t)/100 or t/20 + gc.setColor(0,0,0,t) + gc.rectangle('fill',0,0,SCR.w,SCR.h) + end}, + slowFade={duration=180,changeTime=90,draw=function(t) + t=t>90 and 2-t/90 or t/90 + gc.setColor(0,0,0,t) + gc.rectangle('fill',0,0,SCR.w,SCR.h) + end}, + swipeL={duration=30,changeTime=15,draw=function(t) + t=t/30 + gc.setColor(.1,.1,.1,1-abs(t-.5)) + t=t*t*(3-2*t)*2-1 + gc.rectangle('fill',t*SCR.w,0,SCR.w,SCR.h) + end}, + swipeR={duration=30,changeTime=15,draw=function(t) + t=t/30 + gc.setColor(.1,.1,.1,1-abs(t-.5)) + t=t*t*(2*t-3)*2+1 + gc.rectangle('fill',t*SCR.w,0,SCR.w,SCR.h) + end}, + swipeD={duration=30,changeTime=15,draw=function(t) + t=t/30 + gc.setColor(.1,.1,.1,1-abs(t-.5)) + t=t*t*(2*t-3)*2+1 + gc.rectangle('fill',0,t*SCR.h,SCR.w,SCR.h) + end}, }--Scene swapping animations function SCN.swapTo(tar,style)--Parallel scene swapping, cannot back - if scenes[tar]then - if not SCN.swapping and tar~=SCN.cur then - if not style then style='fade'end - SCN.swapping=true - local S=SCN.stat - S.tar,S.style=tar,style - S.time=swap[style].duration - S.changeTime=swap[style].changeTime - S.draw=swap[style].draw - end - else - MES.new('warn',"No Scene: "..tar) - end + if scenes[tar]then + if not SCN.swapping and tar~=SCN.cur then + if not style then style='fade'end + SCN.swapping=true + local S=SCN.stat + S.tar,S.style=tar,style + S.time=swap[style].duration + S.changeTime=swap[style].changeTime + S.draw=swap[style].draw + end + else + MES.new('warn',"No Scene: "..tar) + end end function SCN.go(tar,style)--Normal scene swapping, can back - if scenes[tar]then - SCN.push() - SCN.swapTo(tar,style) - else - MES.new('warn',"No Scene: "..tar) - end + if scenes[tar]then + SCN.push() + SCN.swapTo(tar,style) + else + MES.new('warn',"No Scene: "..tar) + end end function SCN.back() - if SCN.swapping then return end + if SCN.swapping then return end - --Leave scene - if SCN.sceneBack then SCN.sceneBack()end + --Leave scene + if SCN.sceneBack then SCN.sceneBack()end - --Poll&Back to previous Scene - local m=#SCN.stack - if m>0 then - SCN.swapTo(SCN.stack[m-1],SCN.stack[m]) - SCN.stack[m],SCN.stack[m-1]=nil - end + --Poll&Back to previous Scene + local m=#SCN.stack + if m>0 then + SCN.swapTo(SCN.stack[m-1],SCN.stack[m]) + SCN.stack[m],SCN.stack[m-1]=nil + end end return SCN \ No newline at end of file diff --git a/Zframework/screen.lua b/Zframework/screen.lua index 08863769..e9acf426 100644 --- a/Zframework/screen.lua +++ b/Zframework/screen.lua @@ -1,73 +1,73 @@ local SCR={ - w0=1280,h0=720, --Default Screen Size - x=0,y=0, --Up-left Coord on screen - cx=0,cy=0, --Center Coord on screen (Center X/Y) - ex=0,ey=0, --Down-right Coord on screen (End X/Y) - w=0,h=0, --Fullscreen w/h for graphic functions - W=0,H=0, --Fullscreen w/h for shader - safeX=0,safeY=0,--Safe area - safeW=0,safeH=0,--Safe area - rad=0, --Radius - k=1, --Scale size - dpi=1, --DPI from gc.getDPIScale() + w0=1280,h0=720, --Default Screen Size + x=0,y=0, --Up-left Coord on screen + cx=0,cy=0, --Center Coord on screen (Center X/Y) + ex=0,ey=0, --Down-right Coord on screen (End X/Y) + w=0,h=0, --Fullscreen w/h for graphic functions + W=0,H=0, --Fullscreen w/h for shader + safeX=0,safeY=0,--Safe area + safeW=0,safeH=0,--Safe area + rad=0, --Radius + k=1, --Scale size + dpi=1, --DPI from gc.getDPIScale() - --Screen transformation objects - origin=love.math.newTransform(), - xOy=love.math.newTransform(), - xOy_m=love.math.newTransform(), - xOy_ul=love.math.newTransform(), - xOy_u=love.math.newTransform(), - xOy_ur=love.math.newTransform(), - xOy_l=love.math.newTransform(), - xOy_r=love.math.newTransform(), - xOy_dl=love.math.newTransform(), - xOy_d=love.math.newTransform(), - xOy_dr=love.math.newTransform(), + --Screen transformation objects + origin=love.math.newTransform(), + xOy=love.math.newTransform(), + xOy_m=love.math.newTransform(), + xOy_ul=love.math.newTransform(), + xOy_u=love.math.newTransform(), + xOy_ur=love.math.newTransform(), + xOy_l=love.math.newTransform(), + xOy_r=love.math.newTransform(), + xOy_dl=love.math.newTransform(), + xOy_d=love.math.newTransform(), + xOy_dr=love.math.newTransform(), } function SCR.setSize(w,h) - SCR.w0,SCR.h0=w,h + SCR.w0,SCR.h0=w,h end function SCR.resize(w,h) - SCR.w,SCR.h,SCR.dpi=w,h,love.graphics.getDPIScale() - SCR.W,SCR.H=SCR.w*SCR.dpi,SCR.h*SCR.dpi - SCR.r=h/w - SCR.rad=(w^2+h^2)^.5 + SCR.w,SCR.h,SCR.dpi=w,h,love.graphics.getDPIScale() + SCR.W,SCR.H=SCR.w*SCR.dpi,SCR.h*SCR.dpi + SCR.r=h/w + SCR.rad=(w^2+h^2)^.5 - SCR.x,SCR.y=0,0 - if SCR.r>=SCR.h0/SCR.w0 then - SCR.k=w/SCR.w0 - SCR.y=(h-SCR.h0*SCR.k)/2 - else - SCR.k=h/SCR.h0 - SCR.x=(w-SCR.w0*SCR.k)/2 - end - SCR.cx,SCR.cy=SCR.w/2,SCR.h/2 - SCR.ex,SCR.ey=SCR.w-SCR.x,SCR.h-SCR.y - SCR.safeX,SCR.safeY,SCR.safeW,SCR.safeH=love.window.getSafeArea() + SCR.x,SCR.y=0,0 + if SCR.r>=SCR.h0/SCR.w0 then + SCR.k=w/SCR.w0 + SCR.y=(h-SCR.h0*SCR.k)/2 + else + SCR.k=h/SCR.h0 + SCR.x=(w-SCR.w0*SCR.k)/2 + end + SCR.cx,SCR.cy=SCR.w/2,SCR.h/2 + SCR.ex,SCR.ey=SCR.w-SCR.x,SCR.h-SCR.y + SCR.safeX,SCR.safeY,SCR.safeW,SCR.safeH=love.window.getSafeArea() - SCR.origin:setTransformation(0,0) - SCR.xOy:setTransformation(SCR.x,SCR.y,0,SCR.k) - SCR.xOy_m:setTransformation(w/2,h/2,0,SCR.k) - SCR.xOy_ul:setTransformation(0,0,0,SCR.k) - SCR.xOy_u:setTransformation(w/2,0,0,SCR.k) - SCR.xOy_ur:setTransformation(w,0,0,SCR.k) - SCR.xOy_l:setTransformation(0,h/2,0,SCR.k) - SCR.xOy_r:setTransformation(w,h/2,0,SCR.k) - SCR.xOy_dl:setTransformation(0,h,0,SCR.k) - SCR.xOy_d:setTransformation(w/2,h,0,SCR.k) - SCR.xOy_dr:setTransformation(w,h,0,SCR.k) + SCR.origin:setTransformation(0,0) + SCR.xOy:setTransformation(SCR.x,SCR.y,0,SCR.k) + SCR.xOy_m:setTransformation(w/2,h/2,0,SCR.k) + SCR.xOy_ul:setTransformation(0,0,0,SCR.k) + SCR.xOy_u:setTransformation(w/2,0,0,SCR.k) + SCR.xOy_ur:setTransformation(w,0,0,SCR.k) + SCR.xOy_l:setTransformation(0,h/2,0,SCR.k) + SCR.xOy_r:setTransformation(w,h/2,0,SCR.k) + SCR.xOy_dl:setTransformation(0,h,0,SCR.k) + SCR.xOy_d:setTransformation(w/2,h,0,SCR.k) + SCR.xOy_dr:setTransformation(w,h,0,SCR.k) end function SCR.info() - return{ - ("w0,h0 : %d, %d"):format(SCR.w0,SCR.h0), - ("x,y : %d, %d"):format(SCR.x,SCR.y), - ("cx,cy : %d, %d"):format(SCR.cx,SCR.cy), - ("ex,ey : %d, %d"):format(SCR.ex,SCR.ey), - ("w,h : %d, %d"):format(SCR.w,SCR.h), - ("W,H : %d, %d"):format(SCR.W,SCR.H), - ("safeX,safeY : %d, %d"):format(SCR.safeX,SCR.safeY), - ("safeW,safeH : %d, %d"):format(SCR.safeW,SCR.safeH), - ("k,dpi,rad : %.2f, %d, %.2f"):format(SCR.k,SCR.dpi,SCR.rad), - } + return{ + ("w0,h0 : %d, %d"):format(SCR.w0,SCR.h0), + ("x,y : %d, %d"):format(SCR.x,SCR.y), + ("cx,cy : %d, %d"):format(SCR.cx,SCR.cy), + ("ex,ey : %d, %d"):format(SCR.ex,SCR.ey), + ("w,h : %d, %d"):format(SCR.w,SCR.h), + ("W,H : %d, %d"):format(SCR.W,SCR.H), + ("safeX,safeY : %d, %d"):format(SCR.safeX,SCR.safeY), + ("safeW,safeH : %d, %d"):format(SCR.safeW,SCR.safeH), + ("k,dpi,rad : %.2f, %d, %.2f"):format(SCR.k,SCR.dpi,SCR.rad), + } end return SCR \ No newline at end of file diff --git a/Zframework/setFont.lua b/Zframework/setFont.lua index 2c0c6af3..af7fa688 100644 --- a/Zframework/setFont.lua +++ b/Zframework/setFont.lua @@ -3,36 +3,36 @@ local newFont=gc.setNewFont local setNewFont=gc.setFont local fontCache,currentFontSize={} if love.filesystem.getInfo('font.ttf')then - local fontData=love.filesystem.newFile('font.ttf') - function setFont(s) - if s~=currentFontSize then - if not fontCache[s]then - fontCache[s]=newFont(fontData,s) - end - setNewFont(fontCache[s]) - currentFontSize=s - end - end - function getFont(s) - if not fontCache[s]then - fontCache[s]=newFont(fontData,s) - end - return fontCache[s] - end + local fontData=love.filesystem.newFile('font.ttf') + function setFont(s) + if s~=currentFontSize then + if not fontCache[s]then + fontCache[s]=newFont(fontData,s) + end + setNewFont(fontCache[s]) + currentFontSize=s + end + end + function getFont(s) + if not fontCache[s]then + fontCache[s]=newFont(fontData,s) + end + return fontCache[s] + end else - function setFont(s) - if s~=currentFontSize then - if not fontCache[s]then - fontCache[s]=newFont(s) - end - setNewFont(fontCache[s]) - currentFontSize=s - end - end - function getFont(s) - if not fontCache[s]then - fontCache[s]=newFont(s) - end - return fontCache[s] - end + function setFont(s) + if s~=currentFontSize then + if not fontCache[s]then + fontCache[s]=newFont(s) + end + setNewFont(fontCache[s]) + currentFontSize=s + end + end + function getFont(s) + if not fontCache[s]then + fontCache[s]=newFont(s) + end + return fontCache[s] + end end \ No newline at end of file diff --git a/Zframework/sfx.lua b/Zframework/sfx.lua index 84c36f99..4384f40a 100644 --- a/Zframework/sfx.lua +++ b/Zframework/sfx.lua @@ -1,87 +1,87 @@ local SFX={ - getCount=function()return 0 end, - loadAll=function()error("Cannot load before init!")end, - fieldPlay=NULL, - play=NULL, - fplay=NULL, - reset=NULL, + getCount=function()return 0 end, + loadAll=function()error("Cannot load before init!")end, + fieldPlay=NULL, + play=NULL, + fplay=NULL, + reset=NULL, } function SFX.init(list) - SFX.init=nil - local rem=table.remove - local Sources={} + SFX.init=nil + local rem=table.remove + local Sources={} - local count=#list function SFX.getCount()return count end - function SFX.loadAll() - for i=1,count do - local N='media/SFX/'..list[i]..'.ogg' - if love.filesystem.getInfo(N)then - Sources[list[i]]={love.audio.newSource(N,'static')} - else - MES.new('warn',"No SFX file: "..N,.1) - end - end + local count=#list function SFX.getCount()return count end + function SFX.loadAll() + for i=1,count do + local N='media/SFX/'..list[i]..'.ogg' + if love.filesystem.getInfo(N)then + Sources[list[i]]={love.audio.newSource(N,'static')} + else + MES.new('warn',"No SFX file: "..N,.1) + end + end - function SFX.play(s,vol,pos) - if SETTING.sfx==0 or vol==0 then return end - local S=Sources[s]--Source list - if not S then return end - local n=1 - while S[n]:isPlaying()do - n=n+1 - if not S[n]then - S[n]=S[1]:clone() - S[n]:seek(0) - break - end - end - S=S[n]--AU_SRC - if S:getChannelCount()==1 then - if pos then - pos=pos*SETTING.stereo - S:setPosition(pos,1-pos^2,0) - else - S:setPosition(0,0,0) - end - end - S:setVolume(((vol or 1)*SETTING.sfx)^1.626) - S:play() - end - function SFX.fplay(s,vol,pos) - local S=Sources[s]--Source list - if not S then return end - local n=1 - while S[n]:isPlaying()do - n=n+1 - if not S[n]then - S[n]=S[1]:clone() - S[n]:seek(0) - break - end - end - S=S[n]--AU_SRC - if S:getChannelCount()==1 then - if pos then - pos=pos*SETTING.stereo - S:setPosition(pos,1-pos^2,0) - else - S:setPosition(0,0,0) - end - end - S:setVolume(vol^1.626) - S:play() - end - function SFX.reset() - for _,L in next,Sources do - if type(L)=='table'then - for i=#L,1,-1 do - if not L[i]:isPlaying()then - rem(L,i) - end - end - end - end - end - end + function SFX.play(s,vol,pos) + if SETTING.sfx==0 or vol==0 then return end + local S=Sources[s]--Source list + if not S then return end + local n=1 + while S[n]:isPlaying()do + n=n+1 + if not S[n]then + S[n]=S[1]:clone() + S[n]:seek(0) + break + end + end + S=S[n]--AU_SRC + if S:getChannelCount()==1 then + if pos then + pos=pos*SETTING.stereo + S:setPosition(pos,1-pos^2,0) + else + S:setPosition(0,0,0) + end + end + S:setVolume(((vol or 1)*SETTING.sfx)^1.626) + S:play() + end + function SFX.fplay(s,vol,pos) + local S=Sources[s]--Source list + if not S then return end + local n=1 + while S[n]:isPlaying()do + n=n+1 + if not S[n]then + S[n]=S[1]:clone() + S[n]:seek(0) + break + end + end + S=S[n]--AU_SRC + if S:getChannelCount()==1 then + if pos then + pos=pos*SETTING.stereo + S:setPosition(pos,1-pos^2,0) + else + S:setPosition(0,0,0) + end + end + S:setVolume(vol^1.626) + S:play() + end + function SFX.reset() + for _,L in next,Sources do + if type(L)=='table'then + for i=#L,1,-1 do + if not L[i]:isPlaying()then + rem(L,i) + end + end + end + end + end + end end return SFX \ No newline at end of file diff --git a/Zframework/stringExtend.lua b/Zframework/stringExtend.lua index 89f15cfb..5bbaf814 100644 --- a/Zframework/stringExtend.lua +++ b/Zframework/stringExtend.lua @@ -5,144 +5,144 @@ local find,sub,upper=string.find,string.sub,string.upper local char,byte=string.char,string.byte do--function STRING.shiftChar(c) - local shiftMap={ - ['1']='!',['2']='@',['3']='#',['4']='$',['5']='%', - ['6']='^',['7']='&',['8']='*',['9']='(',['0']=')', - ['`']='~',['-']='_',['=']='+', - ['[']='{',[']']='}',['\\']='|', - [';']=':',['\'']='"', - [',']='<',['.']='>',['/']='?', - } - function STRING.shiftChar(c) - return shiftMap[c]or upper(c) - end + local shiftMap={ + ['1']='!',['2']='@',['3']='#',['4']='$',['5']='%', + ['6']='^',['7']='&',['8']='*',['9']='(',['0']=')', + ['`']='~',['-']='_',['=']='+', + ['[']='{',[']']='}',['\\']='|', + [';']=':',['\'']='"', + [',']='<',['.']='>',['/']='?', + } + function STRING.shiftChar(c) + return shiftMap[c]or upper(c) + end end function STRING.trim(s) - if not s:find("%S")then return""end - s=s:sub((s:find("%S"))):reverse() - return s:sub((s:find("%S"))):reverse() + if not s:find("%S")then return""end + s=s:sub((s:find("%S"))):reverse() + return s:sub((s:find("%S"))):reverse() end function STRING.split(s,sep,regex) - local L={} - local p1,p2=1--start,target - if regex then - while p1<=#s do - p2=find(s,sep,p1)or #s+1 - L[#L+1]=sub(s,p1,p2-1) - p1=p2+#sep - end - else - while p1<=#s do - p2=find(s,sep,p1,true)or #s+1 - L[#L+1]=sub(s,p1,p2-1) - p1=p2+#sep - end - end - return L + local L={} + local p1,p2=1--start,target + if regex then + while p1<=#s do + p2=find(s,sep,p1)or #s+1 + L[#L+1]=sub(s,p1,p2-1) + p1=p2+#sep + end + else + while p1<=#s do + p2=find(s,sep,p1,true)or #s+1 + L[#L+1]=sub(s,p1,p2-1) + p1=p2+#sep + end + end + return L end function STRING.simpEmailCheck(e) - e=STRING.split(e,"@") - if #e~=2 then return false end - if e[1]:sub(-1)=="."or e[2]:sub(-1)=="."then return false end - local e1,e2=STRING.split(e[1],"."),STRING.split(e[2],".") - if #e1*#e2==0 then return false end - for _,v in next,e1 do if #v==0 then return false end end - for _,v in next,e2 do if #v==0 then return false end end - return true + e=STRING.split(e,"@") + if #e~=2 then return false end + if e[1]:sub(-1)=="."or e[2]:sub(-1)=="."then return false end + local e1,e2=STRING.split(e[1],"."),STRING.split(e[2],".") + if #e1*#e2==0 then return false end + for _,v in next,e1 do if #v==0 then return false end end + for _,v in next,e2 do if #v==0 then return false end end + return true end function STRING.time(s) - if s<60 then - return format("%.3f\"",s) - elseif s<3600 then - return format("%d'%05.2f\"",int(s/60),s%60) - else - local h=int(s/3600) - return format("%d:%.2d'%05.2f\"",h,int(s/60%60),s%60) - end + if s<60 then + return format("%.3f\"",s) + elseif s<3600 then + return format("%d'%05.2f\"",int(s/60),s%60) + else + local h=int(s/3600) + return format("%d:%.2d'%05.2f\"",h,int(s/60%60),s%60) + end end do--function STRING.urlEncode(s) - local rshift=bit.rshift - local b16={[0]='0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'} - function STRING.urlEncode(s) - local out="" - for i=1,#s do - if s:sub(i,i):match("[a-zA-Z0-9]")then - out=out..s:sub(i,i) - else - local b=s:byte(i) - out=out.."%"..b16[rshift(b,4)]..b16[b%16] - end - end - return out - end + local rshift=bit.rshift + local b16={[0]='0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'} + function STRING.urlEncode(s) + local out="" + for i=1,#s do + if s:sub(i,i):match("[a-zA-Z0-9]")then + out=out..s:sub(i,i) + else + local b=s:byte(i) + out=out.."%"..b16[rshift(b,4)]..b16[b%16] + end + end + return out + end end function STRING.vcsEncrypt(text,key) - local keyLen=#key - local result="" - local buffer="" - for i=0,#text-1 do - buffer=buffer..char((byte(text,i+1)-32+byte(key,i%keyLen+1))%95+32) - if #buffer==26 then - result=result..buffer - buffer="" - end - end - return result..buffer + local keyLen=#key + local result="" + local buffer="" + for i=0,#text-1 do + buffer=buffer..char((byte(text,i+1)-32+byte(key,i%keyLen+1))%95+32) + if #buffer==26 then + result=result..buffer + buffer="" + end + end + return result..buffer end function STRING.vcsDecrypt(text,key) - local keyLen=#key - local result="" - local buffer="" - for i=0,#text-1 do - buffer=buffer..char((byte(text,i+1)-32-byte(key,i%keyLen+1))%95+32) - if #buffer==26 then - result=result..buffer - buffer="" - end - end - return result..buffer + local keyLen=#key + local result="" + local buffer="" + for i=0,#text-1 do + buffer=buffer..char((byte(text,i+1)-32-byte(key,i%keyLen+1))%95+32) + if #buffer==26 then + result=result..buffer + buffer="" + end + end + return result..buffer end function STRING.readLine(str) - local p=str:find("\n") - if p then - return str:sub(1,p-1),str:sub(p+1) - else - return str,"" - end + local p=str:find("\n") + if p then + return str:sub(1,p-1),str:sub(p+1) + else + return str,"" + end end function STRING.packBin(s) - return data.encode('string','base64',data.compress('string','zlib',s)) + return data.encode('string','base64',data.compress('string','zlib',s)) end function STRING.unpackBin(str) - local res - res,str=pcall(data.decode,'string','base64',str) - if not res then return end - res,str=pcall(data.decompress,'string','zlib',str) - if res then return str end + local res + res,str=pcall(data.decode,'string','base64',str) + if not res then return end + res,str=pcall(data.decompress,'string','zlib',str) + if res then return str end end function STRING.packText(s) - return data.encode('string','base64',data.compress('string','gzip',s)) + return data.encode('string','base64',data.compress('string','gzip',s)) end function STRING.unpackText(str) - local res - res,str=pcall(data.decode,'string','base64',str) - if not res then return end - res,str=pcall(data.decompress,'string','gzip',str) - if res then return str end + local res + res,str=pcall(data.decode,'string','base64',str) + if not res then return end + res,str=pcall(data.decompress,'string','gzip',str) + if res then return str end end function STRING.packTable(t) - return STRING.packText(JSON.encode(t)) + return STRING.packText(JSON.encode(t)) end function STRING.unpackTable(t) - return JSON.decode(STRING.unpackText(t)) + return JSON.decode(STRING.unpackText(t)) end return STRING \ No newline at end of file diff --git a/Zframework/sysFX.lua b/Zframework/sysFX.lua index b547ef98..48336264 100644 --- a/Zframework/sysFX.lua +++ b/Zframework/sysFX.lua @@ -10,23 +10,23 @@ local ins,rem=table.insert,table.remove local fx={} local function _normUpdate(S,dt) - S.t=S.t+dt*S.rate - return S.t>1 + S.t=S.t+dt*S.rate + return S.t>1 end local FXupdate={} function FXupdate.badge(S,dt) - S.t=S.t+dt - if S.t<.2 then - S.x,S.y=S.x1-14,S.y1-14 - elseif S.t<.8 then - local t=((S.t-.2)*1.6667) - t=(3-2*t)*t*t - S.x,S.y=S.x1*(1-t)+S.x2*t-14,S.y1*(1-t)+S.y2*t-14 - else - S.x,S.y=S.x2-14,S.y2-14 - end - return S.t>=1 + S.t=S.t+dt + if S.t<.2 then + S.x,S.y=S.x1-14,S.y1-14 + elseif S.t<.8 then + local t=((S.t-.2)*1.6667) + t=(3-2*t)*t*t + S.x,S.y=S.x1*(1-t)+S.x2*t-14,S.y1*(1-t)+S.y2*t-14 + else + S.x,S.y=S.x2-14,S.y2-14 + end + return S.t>=1 end FXupdate.attack=_normUpdate FXupdate.tap=_normUpdate @@ -34,172 +34,172 @@ FXupdate.ripple=_normUpdate FXupdate.rectRipple=_normUpdate FXupdate.shade=_normUpdate function FXupdate.cell(S,dt) - if S.vx then - S.x=S.x+S.vx*S.rate - S.y=S.y+S.vy*S.rate - if S.ax then - S.vx=S.vx+S.ax*S.rate - S.vy=S.vy+S.ay*S.rate - end - end - S.t=S.t+dt*S.rate - return S.t>1 + if S.vx then + S.x=S.x+S.vx*S.rate + S.y=S.y+S.vy*S.rate + if S.ax then + S.vx=S.vx+S.ax*S.rate + S.vy=S.vy+S.ay*S.rate + end + end + S.t=S.t+dt*S.rate + return S.t>1 end FXupdate.line=_normUpdate local FXdraw={} function FXdraw.badge(S) - gc_setColor(1,1,1,S.t<.2 and S.t*.6 or S.t<.8 and 1 or(1-S.t)*.6) - gc_draw(IMG.badgeIcon,S.x,S.y) + gc_setColor(1,1,1,S.t<.2 and S.t*.6 or S.t<.8 and 1 or(1-S.t)*.6) + gc_draw(IMG.badgeIcon,S.x,S.y) end function FXdraw.attack(S) - gc_setColor(S.r*2,S.g*2,S.b*2,S.a*min(4-S.t*4,1)) + gc_setColor(S.r*2,S.g*2,S.b*2,S.a*min(4-S.t*4,1)) - gc_setLineWidth(S.wid) - local t1,t2=max(5*S.t-4,0),min(S.t*4,1) - gc_line( - S.x1*(1-t1)+S.x2*t1, - S.y1*(1-t1)+S.y2*t1, - S.x1*(1-t2)+S.x2*t2, - S.y1*(1-t2)+S.y2*t2 - ) + gc_setLineWidth(S.wid) + local t1,t2=max(5*S.t-4,0),min(S.t*4,1) + gc_line( + S.x1*(1-t1)+S.x2*t1, + S.y1*(1-t1)+S.y2*t1, + S.x1*(1-t2)+S.x2*t2, + S.y1*(1-t2)+S.y2*t2 + ) - gc_setLineWidth(S.wid*.6) - t1,t2=max(4*S.t-3,0),min(S.t*5,1) - gc_line( - S.x1*(1-t1)+S.x2*t1, - S.y1*(1-t1)+S.y2*t1, - S.x1*(1-t2)+S.x2*t2, - S.y1*(1-t2)+S.y2*t2 - ) + gc_setLineWidth(S.wid*.6) + t1,t2=max(4*S.t-3,0),min(S.t*5,1) + gc_line( + S.x1*(1-t1)+S.x2*t1, + S.y1*(1-t1)+S.y2*t1, + S.x1*(1-t2)+S.x2*t2, + S.y1*(1-t2)+S.y2*t2 + ) end function FXdraw.tap(S) - local t=S.t - gc_setColor(1,1,1,(1-t)*.4) - gc_circle('fill',S.x,S.y,30*(1-t)^.5) + local t=S.t + gc_setColor(1,1,1,(1-t)*.4) + gc_circle('fill',S.x,S.y,30*(1-t)^.5) end function FXdraw.ripple(S) - local t=S.t - gc_setLineWidth(2) - gc_setColor(1,1,1,1-t) - gc_circle('line',S.x,S.y,t*(2-t)*S.r) + local t=S.t + gc_setLineWidth(2) + gc_setColor(1,1,1,1-t) + gc_circle('line',S.x,S.y,t*(2-t)*S.r) end function FXdraw.rectRipple(S) - gc_setLineWidth(6) - gc_setColor(1,1,1,1-S.t) - local r=(10*S.t)^1.2 - gc_rectangle('line',S.x-r,S.y-r,S.w+2*r,S.h+2*r) + gc_setLineWidth(6) + gc_setColor(1,1,1,1-S.t) + local r=(10*S.t)^1.2 + gc_rectangle('line',S.x-r,S.y-r,S.w+2*r,S.h+2*r) end function FXdraw.shade(S) - gc_setColor(S.r,S.g,S.b,1-S.t) - gc_rectangle('fill',S.x,S.y,S.w,S.h,2) + gc_setColor(S.r,S.g,S.b,1-S.t) + gc_rectangle('fill',S.x,S.y,S.w,S.h,2) end function FXdraw.cell(S) - gc_setColor(1,1,1,1-S.t) - gc_draw(S.image,S.x,S.y,nil,S.size,nil,S.cx,S.cy) + gc_setColor(1,1,1,1-S.t) + gc_draw(S.image,S.x,S.y,nil,S.size,nil,S.cx,S.cy) end function FXdraw.line(S) - gc_setColor(1,1,1,S.a*(1-S.t)) - gc_line(S.x1,S.y1,S.x2,S.y2) + gc_setColor(1,1,1,S.a*(1-S.t)) + gc_line(S.x1,S.y1,S.x2,S.y2) end local SYSFX={} function SYSFX.update(dt) - for i=#fx,1,-1 do - if fx[i]:update(dt)then - rem(fx,i) - end - end + for i=#fx,1,-1 do + if fx[i]:update(dt)then + rem(fx,i) + end + end end function SYSFX.draw() - for i=1,#fx do - fx[i]:draw() - end + for i=1,#fx do + fx[i]:draw() + end end function SYSFX.newBadge(x1,y1,x2,y2) - ins(fx,{ - update=FXupdate.badge, - draw=FXdraw.badge, - t=0, - x=x1,y=y1, - x1=x1,y1=y1, - x2=x2,y2=y2, - }) + ins(fx,{ + update=FXupdate.badge, + draw=FXdraw.badge, + t=0, + x=x1,y=y1, + x1=x1,y1=y1, + x2=x2,y2=y2, + }) end function SYSFX.newAttack(rate,x1,y1,x2,y2,wid,r,g,b,a) - ins(fx,{ - update=FXupdate.attack, - draw=FXdraw.attack, - t=0, - rate=rate, - x1=x1,y1=y1,--Start pos - x2=x2,y2=y2,--End pos - wid=wid,--Line width - r=r,g=g,b=b,a=a, - }) + ins(fx,{ + update=FXupdate.attack, + draw=FXdraw.attack, + t=0, + rate=rate, + x1=x1,y1=y1,--Start pos + x2=x2,y2=y2,--End pos + wid=wid,--Line width + r=r,g=g,b=b,a=a, + }) end function SYSFX.newTap(rate,x,y) - local T= - { - update=FXupdate.tap, - draw=FXdraw.tap, - t=0, - rate=rate, - x=x,y=y, - } - ins(fx,T) + local T= + { + update=FXupdate.tap, + draw=FXdraw.tap, + t=0, + rate=rate, + x=x,y=y, + } + ins(fx,T) end function SYSFX.newRipple(rate,x,y,r) - ins(fx,{ - update=FXupdate.ripple, - draw=FXdraw.ripple, - t=0, - rate=rate, - x=x,y=y,r=r, - }) + ins(fx,{ + update=FXupdate.ripple, + draw=FXdraw.ripple, + t=0, + rate=rate, + x=x,y=y,r=r, + }) end function SYSFX.newRectRipple(rate,x,y,w,h) - ins(fx,{ - update=FXupdate.rectRipple, - draw=FXdraw.rectRipple, - t=0, - rate=rate, - x=x,y=y,w=w,h=h, - }) + ins(fx,{ + update=FXupdate.rectRipple, + draw=FXdraw.rectRipple, + t=0, + rate=rate, + x=x,y=y,w=w,h=h, + }) end function SYSFX.newShade(rate,x,y,w,h,r,g,b) - ins(fx,{ - update=FXupdate.shade, - draw=FXdraw.shade, - t=0, - rate=rate, - x=x,y=y,w=w,h=h, - r=r or 1,g=g or 1,b=b or 1, - }) + ins(fx,{ + update=FXupdate.shade, + draw=FXdraw.shade, + t=0, + rate=rate, + x=x,y=y,w=w,h=h, + r=r or 1,g=g or 1,b=b or 1, + }) end function SYSFX.newCell(rate,image,size,x,y,vx,vy,ax,ay) - ins(fx,{ - update=FXupdate.cell, - draw=FXdraw.cell, - t=0, - rate=rate*(.9+rnd()*.2), - image=image,size=size, - cx=image:getWidth()*.5,cy=image:getHeight()*.5, - x=x,y=y, - vx=vx,vy=vy, - ax=ax,ay=ay, - }) + ins(fx,{ + update=FXupdate.cell, + draw=FXdraw.cell, + t=0, + rate=rate*(.9+rnd()*.2), + image=image,size=size, + cx=image:getWidth()*.5,cy=image:getHeight()*.5, + x=x,y=y, + vx=vx,vy=vy, + ax=ax,ay=ay, + }) end function SYSFX.newLine(rate,x1,y1,x2,y2,r,g,b,a) - ins(fx,{ - update=FXupdate.line, - draw=FXdraw.line, - t=0, - rate=rate, - x1=x1 or 0,y1=y1 or 0, - x2=x2 or x1 or 1280,y2=y2 or y1 or 720, - r=r or 1,g=g or 1,b=b or 1,a=a or 1, - }) + ins(fx,{ + update=FXupdate.line, + draw=FXdraw.line, + t=0, + rate=rate, + x1=x1 or 0,y1=y1 or 0, + x2=x2 or x1 or 1280,y2=y2 or y1 or 720, + r=r or 1,g=g or 1,b=b or 1,a=a or 1, + }) end return SYSFX \ No newline at end of file diff --git a/Zframework/tableExtend.lua b/Zframework/tableExtend.lua index ace23560..3763c718 100644 --- a/Zframework/tableExtend.lua +++ b/Zframework/tableExtend.lua @@ -4,195 +4,195 @@ local TABLE={} --Get a new filled table function TABLE.new(val,count) - local L={} - for i=1,count do - L[i]=val - end - return L + local L={} + for i=1,count do + L[i]=val + end + return L end --Get a copy of [1~#] elements function TABLE.shift(org,depth) - if not depth then depth=1e99 end - local L={} - for i=1,#org do - if type(org[i])=='table'and depth>0 then - L[i]=TABLE.shift(org[i],depth-1) - else - L[i]=org[i] - end - end - return L + if not depth then depth=1e99 end + local L={} + for i=1,#org do + if type(org[i])=='table'and depth>0 then + L[i]=TABLE.shift(org[i],depth-1) + else + L[i]=org[i] + end + end + return L end --Get a full copy of a table, depth = how many layers will be recreate, default to inf function TABLE.copy(org,depth) - if not depth then depth=1e99 end - local L={} - for k,v in next,org do - if type(v)=='table'and depth>0 then - L[k]=TABLE.copy(v,depth-1) - else - L[k]=v - end - end - return L + if not depth then depth=1e99 end + local L={} + for k,v in next,org do + if type(v)=='table'and depth>0 then + L[k]=TABLE.copy(v,depth-1) + else + L[k]=v + end + end + return L end --For all things in new, push to old function TABLE.cover(new,old) - for k,v in next,new do - old[k]=v - end + for k,v in next,new do + old[k]=v + end end --For all things in new if same type in old, push to old function TABLE.update(new,old) - for k,v in next,new do - if type(v)==type(old[k])then - if type(v)=='table'then - TABLE.update(v,old[k]) - else - old[k]=v - end - end - end + for k,v in next,new do + if type(v)==type(old[k])then + if type(v)=='table'then + TABLE.update(v,old[k]) + else + old[k]=v + end + end + end end --For all things in new if no val in old, push to old function TABLE.complete(new,old) - for k,v in next,new do - if type(v)=='table'then - if old[k]==nil then old[k]={}end - TABLE.complete(v,old[k]) - elseif old[k]==nil then - old[k]=v - end - end + for k,v in next,new do + if type(v)=='table'then + if old[k]==nil then old[k]={}end + TABLE.complete(v,old[k]) + elseif old[k]==nil then + old[k]=v + end + end end --Remove positive integer index of table function TABLE.cut(G) - for i=1,#G do - G[i]=nil - end + for i=1,#G do + G[i]=nil + end end --Clear table function TABLE.clear(G) - for k in next,G do - G[k]=nil - end + for k in next,G do + G[k]=nil + end end --Find value in [1~#] function TABLE.find(t,val) - for i=1,#t do if t[i]==val then return i end end + for i=1,#t do if t[i]==val then return i end end end --Find value in whole table function TABLE.search(t,val) - for k,v in next,t do if v==val then return k end end + for k,v in next,t do if v==val then return k end end end --Re-index string value of a table function TABLE.reIndex(org) - for k,v in next,org do - if type(v)=='string'then - org[k]=org[v] - end - end + for k,v in next,org do + if type(v)=='string'then + org[k]=org[v] + end + end end --Dump a simple lua table do--function TABLE.dump(L,t) - local tabs={ - [0]="", - "\t", - "\t\t", - "\t\t\t", - "\t\t\t\t", - "\t\t\t\t\t", - } - local function dump(L,t) - local s - if t then - s="{\n" - else - s="return{\n" - t=1 - if type(L)~='table'then - return - end - end - local count=1 - for k,v in next,L do - local T=type(k) - if T=='number'then - if k==count then - k="" - count=count+1 - else - k="["..k.."]=" - end - elseif T=='string'then - if find(k,"[^0-9a-zA-Z_]")then - k="[\""..k.."\"]=" - else - k=k.."=" - end - elseif T=='boolean'then k="["..k.."]=" - else error("Error key type!") - end - T=type(v) - if T=='number'then v=tostring(v) - elseif T=='string'then v="\""..v.."\"" - elseif T=='table'then v=dump(v,t+1) - elseif T=='boolean'then v=tostring(v) - else error("Error data type!") - end - s=s..tabs[t]..k..v..",\n" - end - return s..tabs[t-1].."}" - end - TABLE.dump=dump + local tabs={ + [0]="", + "\t", + "\t\t", + "\t\t\t", + "\t\t\t\t", + "\t\t\t\t\t", + } + local function dump(L,t) + local s + if t then + s="{\n" + else + s="return{\n" + t=1 + if type(L)~='table'then + return + end + end + local count=1 + for k,v in next,L do + local T=type(k) + if T=='number'then + if k==count then + k="" + count=count+1 + else + k="["..k.."]=" + end + elseif T=='string'then + if find(k,"[^0-9a-zA-Z_]")then + k="[\""..k.."\"]=" + else + k=k.."=" + end + elseif T=='boolean'then k="["..k.."]=" + else error("Error key type!") + end + T=type(v) + if T=='number'then v=tostring(v) + elseif T=='string'then v="\""..v.."\"" + elseif T=='table'then v=dump(v,t+1) + elseif T=='boolean'then v=tostring(v) + else error("Error data type!") + end + s=s..tabs[t]..k..v..",\n" + end + return s..tabs[t-1].."}" + end + TABLE.dump=dump end --Dump a simple lua table (no whitespaces) do--function TABLE.dumpDeflate(L,t) - local function dump(L) - local s="return{" - if type(L)~='table'then return end - local count=1 - for k,v in next,L do - local T=type(k) - if T=='number'then - if k==count then - k="" - count=count+1 - else - k="["..k.."]=" - end - elseif T=='string'then - if find(k,"[^0-9a-zA-Z_]")then - k="[\""..k.."\"]=" - else - k=k.."=" - end - elseif T=='boolean'then k="["..k.."]=" - else error("Error key type!") - end - T=type(v) - if T=='number'then v=tostring(v) - elseif T=='string'then v="\""..v.."\"" - elseif T=='table'then v=dump(v) - elseif T=='boolean'then v=tostring(v) - else error("Error data type!") - end - end - return s.."}" - end - TABLE.dumpDeflate=dump + local function dump(L) + local s="return{" + if type(L)~='table'then return end + local count=1 + for k,v in next,L do + local T=type(k) + if T=='number'then + if k==count then + k="" + count=count+1 + else + k="["..k.."]=" + end + elseif T=='string'then + if find(k,"[^0-9a-zA-Z_]")then + k="[\""..k.."\"]=" + else + k=k.."=" + end + elseif T=='boolean'then k="["..k.."]=" + else error("Error key type!") + end + T=type(v) + if T=='number'then v=tostring(v) + elseif T=='string'then v="\""..v.."\"" + elseif T=='table'then v=dump(v) + elseif T=='boolean'then v=tostring(v) + else error("Error data type!") + end + end + return s.."}" + end + TABLE.dumpDeflate=dump end return TABLE \ No newline at end of file diff --git a/Zframework/task.lua b/Zframework/task.lua index a53b32a3..b431bc80 100644 --- a/Zframework/task.lua +++ b/Zframework/task.lua @@ -4,48 +4,48 @@ local tasks={} local TASK={} function TASK.getCount() - return #tasks + return #tasks end function TASK.update() - for i=#tasks,1,-1 do - local T=tasks[i] - if status(T.thread)=='dead'then - rem(tasks,i) - else - assert(resume(T.thread)) - end - end + for i=#tasks,1,-1 do + local T=tasks[i] + if status(T.thread)=='dead'then + rem(tasks,i) + else + assert(resume(T.thread)) + end + end end function TASK.new(code,...) - local thread=coroutine.create(code) - resume(thread,...) - if status(thread)~='dead'then - tasks[#tasks+1]={ - thread=thread, - code=code, - args={...}, - } - end + local thread=coroutine.create(code) + resume(thread,...) + if status(thread)~='dead'then + tasks[#tasks+1]={ + thread=thread, + code=code, + args={...}, + } + end end function TASK.removeTask_code(code) - for i=#tasks,1,-1 do - if tasks[i].code==code then - rem(tasks,i) - end - end + for i=#tasks,1,-1 do + if tasks[i].code==code then + rem(tasks,i) + end + end end function TASK.removeTask_iterate(func,...) - for i=#tasks,1,-1 do - if func(tasks[i],...)then - rem(tasks,i) - end - end + for i=#tasks,1,-1 do + if func(tasks[i],...)then + rem(tasks,i) + end + end end function TASK.clear() - local i=#tasks - while i>0 do - tasks[i]=nil - i=i-1 - end + local i=#tasks + while i>0 do + tasks[i]=nil + i=i-1 + end end return TASK \ No newline at end of file diff --git a/Zframework/text.lua b/Zframework/text.lua index a5e43728..6e716636 100644 --- a/Zframework/text.lua +++ b/Zframework/text.lua @@ -10,120 +10,120 @@ local texts={} local textFX={} function textFX.appear(t) - mStr(t.text,t.x,t.y-t.font*.7) + mStr(t.text,t.x,t.y-t.font*.7) end function textFX.sudden(t) - gc_setColor(1,1,1,1-t.c) - mStr(t.text,t.x,t.y-t.font*.7) + gc_setColor(1,1,1,1-t.c) + mStr(t.text,t.x,t.y-t.font*.7) end function textFX.fly(t) - mStr(t.text,t.x+(t.c-.5)^3*300,t.y-t.font*.7) + mStr(t.text,t.x+(t.c-.5)^3*300,t.y-t.font*.7) end function textFX.stretch(t) - gc_push('transform') - gc_translate(t.x,t.y) - if t.c<.3 then gc_scale((.3-t.c)*1.6+1,1)end - mStr(t.text,0,-t.font*.7) - gc_pop() + gc_push('transform') + gc_translate(t.x,t.y) + if t.c<.3 then gc_scale((.3-t.c)*1.6+1,1)end + mStr(t.text,0,-t.font*.7) + gc_pop() end function textFX.drive(t) - gc_push('transform') - gc_translate(t.x,t.y) - if t.c<.3 then gc_shear((.3-t.c)*2,0)end - mStr(t.text,0,-t.font*.7) - gc_pop() + gc_push('transform') + gc_translate(t.x,t.y) + if t.c<.3 then gc_shear((.3-t.c)*2,0)end + mStr(t.text,0,-t.font*.7) + gc_pop() end function textFX.spin(t) - gc_push('transform') - gc_translate(t.x,t.y) - if t.c<.3 then - gc_rotate((.3-t.c)^2*4) - elseif t.c>.8 then - gc_rotate((t.c-.8)^2*-4) - end - mStr(t.text,0,-t.font*.7) - gc_pop() + gc_push('transform') + gc_translate(t.x,t.y) + if t.c<.3 then + gc_rotate((.3-t.c)^2*4) + elseif t.c>.8 then + gc_rotate((t.c-.8)^2*-4) + end + mStr(t.text,0,-t.font*.7) + gc_pop() end function textFX.flicker(t) - local _,_,_,T=gc_getColor() - gc_setColor(1,1,1,T*(rnd()+.5)) - mStr(t.text,t.x,t.y-t.font*.7) + local _,_,_,T=gc_getColor() + gc_setColor(1,1,1,T*(rnd()+.5)) + mStr(t.text,t.x,t.y-t.font*.7) end function textFX.zoomout(t) - gc_push('transform') - local k=t.c^.5*.1+1 - gc_translate(t.x,t.y) - gc_scale(k,k) - mStr(t.text,0,-t.font*.7) - gc_pop() + gc_push('transform') + local k=t.c^.5*.1+1 + gc_translate(t.x,t.y) + gc_scale(k,k) + mStr(t.text,0,-t.font*.7) + gc_pop() end function textFX.beat(t) - gc_push('transform') - gc_translate(t.x,t.y) - if t.c<.3 then - local k=1.3-t.c^2/.3 - gc_scale(k,k) - end - mStr(t.text,0,-t.font*.7) - gc_pop() + gc_push('transform') + gc_translate(t.x,t.y) + if t.c<.3 then + local k=1.3-t.c^2/.3 + gc_scale(k,k) + end + mStr(t.text,0,-t.font*.7) + gc_pop() end function textFX.score(t) - local _,_,_,T=gc_getColor() - gc_setColor(1,1,1,T*.5) - mStr(t.text,t.x,t.y-t.font*.7-t.c^.2*50) + local _,_,_,T=gc_getColor() + gc_setColor(1,1,1,T*.5) + mStr(t.text,t.x,t.y-t.font*.7-t.c^.2*50) end local TEXT={} function TEXT.clear() - texts={} + texts={} end function TEXT.show(text,x,y,font,style,spd,stop) - ins(texts,{ - c=0, --Timer - text=text, --String - x=x or 0, --X - y=y or 0, --Y - font=int(font/5)*5 or 40, --Font - spd=(spd or 1)/60, --Timing speed(1=last 1 sec) - stop=stop, --Stop time(sustained text) - draw=textFX[style or'appear']or error("unavailable type:"..style), --Draw method - }) + ins(texts,{ + c=0, --Timer + text=text, --String + x=x or 0, --X + y=y or 0, --Y + font=int(font/5)*5 or 40,--Font + spd=(spd or 1)/60, --Timing speed(1=last 1 sec) + stop=stop, --Stop time(sustained text) + draw=assert(textFX[style or'appear'],"no text type:"..style),--Draw method + }) end function TEXT.getText(text,x,y,font,style,spd,stop)--Another version of TEXT.show(), but only return text object, need manual management - return{ - c=0, - text=text, - x=x or 0, - y=y or 0, - font=int(font/5)*5 or 40, - spd=(spd or 1)/60, - stop=stop, - draw=textFX[style or'appear']or error("unavailable type:"..style), - } + return{ + c=0, + text=text, + x=x or 0, + y=y or 0, + font=int(font/5)*5 or 40, + spd=(spd or 1)/60, + stop=stop, + draw=textFX[style or'appear']or error("unavailable type:"..style), + } end function TEXT.update(list) - if not list then list=texts end - for i=#list,1,-1 do - local t=list[i] - t.c=t.c+t.spd - if t.stop then - if t.c>t.stop then - t.c=t.stop - end - end - if t.c>1 then - rem(list,i) - end - end + if not list then list=texts end + for i=#list,1,-1 do + local t=list[i] + t.c=t.c+t.spd + if t.stop then + if t.c>t.stop then + t.c=t.stop + end + end + if t.c>1 then + rem(list,i) + end + end end function TEXT.draw(list) - if not list then list=texts end - for i=1,#list do - local t=list[i] - local p=t.c - gc_setColor(1,1,1,p<.2 and p*5 or p<.8 and 1 or 5-p*5) - setFont(t.font) - t:draw() - end + if not list then list=texts end + for i=1,#list do + local t=list[i] + local p=t.c + gc_setColor(1,1,1,p<.2 and p*5 or p<.8 and 1 or 5-p*5) + setFont(t.font) + t:draw() + end end return TEXT \ No newline at end of file diff --git a/Zframework/theme.lua b/Zframework/theme.lua index dac807de..ac847cf3 100644 --- a/Zframework/theme.lua +++ b/Zframework/theme.lua @@ -1,97 +1,97 @@ local THEME={ - cur=false,--Current theme + cur=false,--Current theme } local themeColor={ - xmas={COLOR.R,COLOR.Z,COLOR.G}, - sprfes={COLOR.R,COLOR.O,COLOR.Y}, + xmas={COLOR.R,COLOR.Z,COLOR.G}, + sprfes={COLOR.R,COLOR.O,COLOR.Y}, } function THEME.calculate(Y,M,D) - if not Y then Y,M,D=os.date('%Y'),os.date('%m'),os.date('%d')end - --Festival calculate within one statement - return - --Christmas - M=='12'and math.abs(D-25)<4 and - 'xmas'or + if not Y then Y,M,D=os.date('%Y'),os.date('%m'),os.date('%d')end + --Festival calculate within one statement + return + --Christmas + M=='12'and math.abs(D-25)<4 and + 'xmas'or - --Birthday - M=='06'and D=='06'and - 'birth'or + --Birthday + M=='06'and D=='06'and + 'birth'or - --Spring festival - M<'03'and math.abs((({ - --Festival days. Jan 26=26, Feb 1=32, etc. - 24,43,32,22,40,29,49,38,26,45, - 34,23,41,31,50,39,28,47,36,25, - 43,32,22,41,29,48,37,26,44,34, - 23,42,31,50,39,28,46,35,24,43, - 32,22,41,30,48,37,26,45,33,23, - 42,32,50,39,28,46,35,24,43,33, - 21,40, - })[Y-2000]or -26)-((M-1)*31+D))<6 and - 'sprfes'or + --Spring festival + M<'03'and math.abs((({ + --Festival days. Jan 26=26, Feb 1=32, etc. + 24,43,32,22,40,29,49,38,26,45, + 34,23,41,31,50,39,28,47,36,25, + 43,32,22,41,29,48,37,26,44,34, + 23,42,31,50,39,28,46,35,24,43, + 32,22,41,30,48,37,26,45,33,23, + 42,32,50,39,28,46,35,24,43,33, + 21,40, + })[Y-2000]or -26)-((M-1)*31+D))<6 and + 'sprfes'or - --April fool's day - M=='04'and D=='01'and - 'fool'or + --April fool's day + M=='04'and D=='01'and + 'fool'or - --Z day - D=='26'and( - (M=='01'or M=='02'or M=='03')and'zday1'or - (M=='04'or M=='05'or M=='06')and'zday2'or - (M=='07'or M=='08'or M=='09')and'zday3'or - (M=='10'or M=='11'or M=='12')and'zday4' - )or + --Z day + D=='26'and( + (M=='01'or M=='02'or M=='03')and'zday1'or + (M=='04'or M=='05'or M=='06')and'zday2'or + (M=='07'or M=='08'or M=='09')and'zday3'or + (M=='10'or M=='11'or M=='12')and'zday4' + )or - 'classic' + 'classic' end function THEME.set(theme) - if theme=='classic'then - BG.setDefault('space') - BGM.setDefault('nil') - elseif theme=='xmas'then - BG.setDefault('snow') - BGM.setDefault('xmas') - MES.new('info',"==Merry Christmas==") - elseif theme=='birth'then - BG.setDefault('firework') - BGM.setDefault('magicblock') - elseif theme=='sprfes'then - BG.setDefault('firework') - BGM.setDefault('spring festival') - MES.new('info',"★☆新年快乐☆★") - elseif theme=='zday1'then - BG.setDefault('lanterns') - BGM.setDefault('overzero') - elseif theme=='zday2'then - BG.setDefault('lanterns') - BGM.setDefault('vacuum') - elseif theme=='zday3'then - BG.setDefault('lanterns') - BGM.setDefault('empty') - elseif theme=='zday4'then - BG.setDefault('lanterns') - BGM.setDefault('space') - elseif theme=='fool'then - BG.setDefault('blockrain') - BGM.setDefault('how feeling') - else - return - end - THEME.cur=theme - BG.set() - BGM.play() - return true + if theme=='classic'then + BG.setDefault('space') + BGM.setDefault('nil') + elseif theme=='xmas'then + BG.setDefault('snow') + BGM.setDefault('xmas') + MES.new('info',"==Merry Christmas==") + elseif theme=='birth'then + BG.setDefault('firework') + BGM.setDefault('magicblock') + elseif theme=='sprfes'then + BG.setDefault('firework') + BGM.setDefault('spring festival') + MES.new('info',"★☆新年快乐☆★") + elseif theme=='zday1'then + BG.setDefault('lanterns') + BGM.setDefault('overzero') + elseif theme=='zday2'then + BG.setDefault('lanterns') + BGM.setDefault('vacuum') + elseif theme=='zday3'then + BG.setDefault('lanterns') + BGM.setDefault('empty') + elseif theme=='zday4'then + BG.setDefault('lanterns') + BGM.setDefault('space') + elseif theme=='fool'then + BG.setDefault('blockrain') + BGM.setDefault('how feeling') + else + return + end + THEME.cur=theme + BG.set() + BGM.play() + return true end function THEME.getThemeColor(theme) - if not theme then theme=THEME.cur end - return themeColor[theme] + if not theme then theme=THEME.cur end + return themeColor[theme] end function THEME.fresh() - THEME.set(THEME.calculate(os.date('%Y'),os.date('%m'),os.date('%d'))) + THEME.set(THEME.calculate(os.date('%Y'),os.date('%m'),os.date('%d'))) end return THEME \ No newline at end of file diff --git a/Zframework/vibrate.lua b/Zframework/vibrate.lua index 893aaf1f..20967972 100644 --- a/Zframework/vibrate.lua +++ b/Zframework/vibrate.lua @@ -1,8 +1,8 @@ local level={0,0,.01,.016,.023,.03,.04,.05,.06,.07,.08,.09,.12,.15} local vib=love.system.vibrate return function(t) - local L=SETTING.vib - if L>0 then - vib(level[L+t]) - end + local L=SETTING.vib + if L>0 then + vib(level[L+t]) + end end \ No newline at end of file diff --git a/Zframework/voice.lua b/Zframework/voice.lua index cbcbbf62..019d4a56 100644 --- a/Zframework/voice.lua +++ b/Zframework/voice.lua @@ -1,118 +1,118 @@ local VOC={ - getCount=function()return 0 end, - getQueueCount=function()return 0 end, - loadAll=function()error("Cannot load before init!")end, - getFreeChannel=NULL, - play=NULL, - update=NULL, + getCount=function()return 0 end, + getQueueCount=function()return 0 end, + loadAll=function()error("Cannot load before init!")end, + getFreeChannel=NULL, + play=NULL, + update=NULL, } function VOC.init(list) - VOC.init=nil - local rnd=math.random - local rem=table.remove - local voiceQueue={free=0} - local bank={}--{vocName1={SRC1s},vocName2={SRC2s},...} - local Source={} + VOC.init=nil + local rnd=math.random + local rem=table.remove + local voiceQueue={free=0} + local bank={}--{vocName1={SRC1s},vocName2={SRC2s},...} + local Source={} - local count=#list function VOC.getCount()return count end - local function _loadVoiceFile(N,vocName) - local fileName='media/VOICE/'..SETTING.cv..'/'..vocName..'.ogg' - if love.filesystem.getInfo(fileName)then - bank[vocName]={love.audio.newSource(fileName,'stream')} - table.insert(Source[N],vocName) - return true - end - end - local function _getVoice(str) - local L=bank[str] - local n=1 - while L[n]:isPlaying()do - n=n+1 - if not L[n]then - L[n]=L[1]:clone() - L[n]:seek(0) - break - end - end - return L[n] - --Load voice with string - end - function VOC.loadAll() - for i=1,count do - Source[list[i]]={} + local count=#list function VOC.getCount()return count end + local function _loadVoiceFile(N,vocName) + local fileName='media/VOICE/'..SETTING.cv..'/'..vocName..'.ogg' + if love.filesystem.getInfo(fileName)then + bank[vocName]={love.audio.newSource(fileName,'stream')} + table.insert(Source[N],vocName) + return true + end + end + local function _getVoice(str) + local L=bank[str] + local n=1 + while L[n]:isPlaying()do + n=n+1 + if not L[n]then + L[n]=L[1]:clone() + L[n]:seek(0) + break + end + end + return L[n] + --Load voice with string + end + function VOC.loadAll() + for i=1,count do + Source[list[i]]={} - local n=0 - repeat n=n+1 until not _loadVoiceFile(list[i],list[i]..'_'..n) + local n=0 + repeat n=n+1 until not _loadVoiceFile(list[i],list[i]..'_'..n) - if n==1 then - if not _loadVoiceFile(list[i],list[i])then - MES.new('warn',"No VOICE file: "..list[i],.1) - end - end - if not Source[list[i]][1]then Source[list[i]]=nil end - end + if n==1 then + if not _loadVoiceFile(list[i],list[i])then + MES.new('warn',"No VOICE file: "..list[i],.1) + end + end + if not Source[list[i]][1]then Source[list[i]]=nil end + end - function VOC.getQueueCount() - return #voiceQueue - end - function VOC.getFreeChannel() - local l=#voiceQueue - for i=1,l do - if #voiceQueue[i]==0 then return i end - end - voiceQueue[l+1]={s=0} - return l+1 - end + function VOC.getQueueCount() + return #voiceQueue + end + function VOC.getFreeChannel() + local l=#voiceQueue + for i=1,l do + if #voiceQueue[i]==0 then return i end + end + voiceQueue[l+1]={s=0} + return l+1 + end - function VOC.play(s,chn) - if SETTING.voc>0 then - local _=Source[s] - if not _ then return end - if chn then - local L=voiceQueue[chn] - L[#L+1]=_[rnd(#_)] - L.s=1 - --Add to queue[chn] - else - voiceQueue[VOC.getFreeChannel()]={s=1,_[rnd(#_)]} - --Create new channel & play - end - end - end - function VOC.update() - for i=#voiceQueue,1,-1 do - local Q=voiceQueue[i] - if Q.s==0 then--Free channel, auto delete when >3 - if i>3 then - rem(voiceQueue,i) - end - elseif Q.s==1 then--Waiting load source - Q[1]=_getVoice(Q[1]) - Q[1]:setVolume(SETTING.voc) - Q[1]:play() - Q.s=Q[2]and 2 or 4 - elseif Q.s==2 then--Playing 1,ready 2 - if Q[1]:getDuration()-Q[1]:tell()<.08 then - Q[2]=_getVoice(Q[2]) - Q[2]:setVolume(SETTING.voc) - Q[2]:play() - Q.s=3 - end - elseif Q.s==3 then--Playing 12 same time - if not Q[1]:isPlaying()then - for j=1,#Q do - Q[j]=Q[j+1] - end - Q.s=Q[2]and 2 or 4 - end - elseif Q.s==4 then--Playing last - if not Q[1].isPlaying(Q[1])then - Q[1]=nil - Q.s=0 - end - end - end - end - end + function VOC.play(s,chn) + if SETTING.voc>0 then + local _=Source[s] + if not _ then return end + if chn then + local L=voiceQueue[chn] + L[#L+1]=_[rnd(#_)] + L.s=1 + --Add to queue[chn] + else + voiceQueue[VOC.getFreeChannel()]={s=1,_[rnd(#_)]} + --Create new channel & play + end + end + end + function VOC.update() + for i=#voiceQueue,1,-1 do + local Q=voiceQueue[i] + if Q.s==0 then--Free channel, auto delete when >3 + if i>3 then + rem(voiceQueue,i) + end + elseif Q.s==1 then--Waiting load source + Q[1]=_getVoice(Q[1]) + Q[1]:setVolume(SETTING.voc) + Q[1]:play() + Q.s=Q[2]and 2 or 4 + elseif Q.s==2 then--Playing 1,ready 2 + if Q[1]:getDuration()-Q[1]:tell()<.08 then + Q[2]=_getVoice(Q[2]) + Q[2]:setVolume(SETTING.voc) + Q[2]:play() + Q.s=3 + end + elseif Q.s==3 then--Playing 12 same time + if not Q[1]:isPlaying()then + for j=1,#Q do + Q[j]=Q[j+1] + end + Q.s=Q[2]and 2 or 4 + end + elseif Q.s==4 then--Playing last + if not Q[1].isPlaying(Q[1])then + Q[1]=nil + Q.s=0 + end + end + end + end + end end return VOC \ No newline at end of file diff --git a/Zframework/websocket.lua b/Zframework/websocket.lua index 33e4dc9f..aa891e05 100644 --- a/Zframework/websocket.lua +++ b/Zframework/websocket.lua @@ -1,7 +1,7 @@ local host= - -- '127.0.0.1' - -- '192.168.114.102' - 'game.techmino.org' + -- '127.0.0.1' + -- '192.168.114.102' + 'game.techmino.org' local port='10026' local path='/tech/socket/v1' @@ -18,174 +18,174 @@ local TRD_isRunning=TRD.isRunning local WS={} local wsList=setmetatable({},{ - __index=function(l,k) - local ws={ - real=false, - status='dead', - lastPongTime=timer(), - sendTimer=0, - alertTimer=0, - pongTimer=0, - } - l[k]=ws - return ws - end + __index=function(l,k) + local ws={ + real=false, + status='dead', + lastPongTime=timer(), + sendTimer=0, + alertTimer=0, + pongTimer=0, + } + l[k]=ws + return ws + end }) function WS.switchHost(_1,_2,_3) - for k in next,wsList do - WS.close(k) - end - host=_1 - port=_2 or port - path=_3 or path + for k in next,wsList do + WS.close(k) + end + host=_1 + port=_2 or port + path=_3 or path end function WS.connect(name,subPath,body,timeout) - if wsList[name]and wsList[name].thread then - wsList[name].thread:release() - end - local ws={ - real=true, - thread=love.thread.newThread('Zframework/websocket_thread.lua'), - triggerCHN=love.thread.newChannel(), - sendCHN=love.thread.newChannel(), - readCHN=love.thread.newChannel(), - lastPingTime=0, - lastPongTime=timer(), - pingInterval=6, - status='connecting',--'connecting', 'running', 'dead' - sendTimer=0, - alertTimer=0, - pongTimer=0, - } - wsList[name]=ws - ws.thread:start(ws.triggerCHN,ws.sendCHN,ws.readCHN) - CHN_push(ws.sendCHN,host) - CHN_push(ws.sendCHN,port) - CHN_push(ws.sendCHN,path..subPath) - CHN_push(ws.sendCHN,body or"") - CHN_push(ws.sendCHN,timeout or 2.6) + if wsList[name]and wsList[name].thread then + wsList[name].thread:release() + end + local ws={ + real=true, + thread=love.thread.newThread('Zframework/websocket_thread.lua'), + triggerCHN=love.thread.newChannel(), + sendCHN=love.thread.newChannel(), + readCHN=love.thread.newChannel(), + lastPingTime=0, + lastPongTime=timer(), + pingInterval=6, + status='connecting',--'connecting', 'running', 'dead' + sendTimer=0, + alertTimer=0, + pongTimer=0, + } + wsList[name]=ws + ws.thread:start(ws.triggerCHN,ws.sendCHN,ws.readCHN) + CHN_push(ws.sendCHN,host) + CHN_push(ws.sendCHN,port) + CHN_push(ws.sendCHN,path..subPath) + CHN_push(ws.sendCHN,body or"") + CHN_push(ws.sendCHN,timeout or 2.6) end function WS.status(name) - local ws=wsList[name] - return ws.status or'dead' + local ws=wsList[name] + return ws.status or'dead' end function WS.getTimers(name) - local ws=wsList[name] - return ws.pongTimer,ws.sendTimer,ws.alertTimer + local ws=wsList[name] + return ws.pongTimer,ws.sendTimer,ws.alertTimer end function WS.setPingInterval(name,time) - local ws=wsList[name] - ws.pingInterval=math.max(time or 2.6,2.6) + local ws=wsList[name] + ws.pingInterval=math.max(time or 2.6,2.6) end function WS.alert(name) - local ws=wsList[name] - ws.alertTimer=2.6 + local ws=wsList[name] + ws.alertTimer=2.6 end local OPcode={ - continue=0, - text=1, - binary=2, - close=8, - ping=9, - pong=10, + continue=0, + text=1, + binary=2, + close=8, + ping=9, + pong=10, } local OPname={ - [0]='continue', - [1]='text', - [2]='binary', - [8]='close', - [9]='ping', - [10]='pong', + [0]='continue', + [1]='text', + [2]='binary', + [8]='close', + [9]='ping', + [10]='pong', } function WS.send(name,message,op) - if type(message)=='string'then - local ws=wsList[name] - if ws.real and ws.status=='running'then - CHN_push(ws.sendCHN,op and OPcode[op]or 2)--2=binary - CHN_push(ws.sendCHN,message) - ws.lastPingTime=timer() - ws.sendTimer=1 - end - else - MES.new('error',"Attempt to send non-string value!") - MES.traceback() - end + if type(message)=='string'then + local ws=wsList[name] + if ws.real and ws.status=='running'then + CHN_push(ws.sendCHN,op and OPcode[op]or 2)--2=binary + CHN_push(ws.sendCHN,message) + ws.lastPingTime=timer() + ws.sendTimer=1 + end + else + MES.new('error',"Attempt to send non-string value!") + MES.traceback() + end end function WS.read(name) - local ws=wsList[name] - if ws.real and ws.status~='connecting'and CHN_getCount(ws.readCHN)>=2 then - local op,message=CHN_pop(ws.readCHN),CHN_pop(ws.readCHN) - if op==8 then--8=close - ws.status='dead' - elseif op==9 then--9=ping - WS.send(name,message or"",'pong') - end - ws.lastPongTime=timer() - ws.pongTimer=1 - return message,OPname[op]or op - end + local ws=wsList[name] + if ws.real and ws.status~='connecting'and CHN_getCount(ws.readCHN)>=2 then + local op,message=CHN_pop(ws.readCHN),CHN_pop(ws.readCHN) + if op==8 then--8=close + ws.status='dead' + elseif op==9 then--9=ping + WS.send(name,message or"",'pong') + end + ws.lastPongTime=timer() + ws.pongTimer=1 + return message,OPname[op]or op + end end function WS.close(name) - local ws=wsList[name] - if ws.real then - CHN_push(ws.sendCHN,8)--close - CHN_push(ws.sendCHN,"") - ws.status='dead' - end + local ws=wsList[name] + if ws.real then + CHN_push(ws.sendCHN,8)--close + CHN_push(ws.sendCHN,"") + ws.status='dead' + end end function WS.update(dt) - local time=timer() - for name,ws in next,wsList do - if ws.real and ws.status~='dead'then - if TRD_isRunning(ws.thread)then - if CHN_getCount(ws.triggerCHN)==0 then - CHN_push(ws.triggerCHN,0) - end - if ws.status=='connecting'then - local mes=CHN_pop(ws.readCHN) - if mes then - if mes=='success'then - ws.status='running' - ws.lastPingTime=time - ws.lastPongTime=time - ws.pongTimer=1 - else - ws.status='dead' - MES.new('warn',text.wsFailed..": "..(mes=="timeout"and text.netTimeout or mes)) - end - end - elseif ws.status=='running'then - if time-ws.lastPingTime>ws.pingInterval then - WS.send(name,"",'pong') - end - if time-ws.lastPongTime>6+2*ws.pingInterval then - WS.close(name) - end - end - if ws.sendTimer>0 then ws.sendTimer=ws.sendTimer-dt end - if ws.pongTimer>0 then ws.pongTimer=ws.pongTimer-dt end - if ws.alertTimer>0 then ws.alertTimer=ws.alertTimer-dt end - else - ws.status='dead' - local err=ws.thread:getError() - if err then - err=err:sub((err:find(":",(err:find(":")or 0)+1)or 0)+1,(err:find("\n")or 0)-1) - MES.new('warn',text.wsClose..err) - WS.alert(name) - end - end - end - end + local time=timer() + for name,ws in next,wsList do + if ws.real and ws.status~='dead'then + if TRD_isRunning(ws.thread)then + if CHN_getCount(ws.triggerCHN)==0 then + CHN_push(ws.triggerCHN,0) + end + if ws.status=='connecting'then + local mes=CHN_pop(ws.readCHN) + if mes then + if mes=='success'then + ws.status='running' + ws.lastPingTime=time + ws.lastPongTime=time + ws.pongTimer=1 + else + ws.status='dead' + MES.new('warn',text.wsFailed..": "..(mes=="timeout"and text.netTimeout or mes)) + end + end + elseif ws.status=='running'then + if time-ws.lastPingTime>ws.pingInterval then + WS.send(name,"",'pong') + end + if time-ws.lastPongTime>6+2*ws.pingInterval then + WS.close(name) + end + end + if ws.sendTimer>0 then ws.sendTimer=ws.sendTimer-dt end + if ws.pongTimer>0 then ws.pongTimer=ws.pongTimer-dt end + if ws.alertTimer>0 then ws.alertTimer=ws.alertTimer-dt end + else + ws.status='dead' + local err=ws.thread:getError() + if err then + err=err:sub((err:find(":",(err:find(":")or 0)+1)or 0)+1,(err:find("\n")or 0)-1) + MES.new('warn',text.wsClose..err) + WS.alert(name) + end + end + end + end end return WS \ No newline at end of file diff --git a/Zframework/websocket_thread.lua b/Zframework/websocket_thread.lua index 523c5fc4..ee2c0358 100644 --- a/Zframework/websocket_thread.lua +++ b/Zframework/websocket_thread.lua @@ -7,57 +7,57 @@ local SOCK=require'socket'.tcp() local JSON=require'Zframework.json' do--Connect - local host=CHN_demand(sendCHN) - local port=CHN_demand(sendCHN) - local path=CHN_demand(sendCHN) - local body=CHN_demand(sendCHN) - local timeout=CHN_demand(sendCHN) + local host=CHN_demand(sendCHN) + local port=CHN_demand(sendCHN) + local path=CHN_demand(sendCHN) + local body=CHN_demand(sendCHN) + local timeout=CHN_demand(sendCHN) - SOCK:settimeout(timeout) - local res,err=SOCK:connect(host,port) - assert(res,err) + SOCK:settimeout(timeout) + local res,err=SOCK:connect(host,port) + assert(res,err) - --WebSocket handshake - if not body then body=''end - SOCK:send( - 'GET '..path..' HTTP/1.1\r\n'.. - 'Host: '..host..':'..port..'\r\n'.. - 'Connection: Upgrade\r\n'.. - 'Upgrade: websocket\r\n'.. - 'Content-Type: application/json\r\n'.. - 'Content-Length: '..#body..'\r\n'.. - 'Sec-WebSocket-Version: 13\r\n'.. - 'Sec-WebSocket-Key: osT3F7mvlojIvf3/8uIsJQ==\r\n\r\n'..--secKey - body - ) + --WebSocket handshake + if not body then body=''end + SOCK:send( + 'GET '..path..' HTTP/1.1\r\n'.. + 'Host: '..host..':'..port..'\r\n'.. + 'Connection: Upgrade\r\n'.. + 'Upgrade: websocket\r\n'.. + 'Content-Type: application/json\r\n'.. + 'Content-Length: '..#body..'\r\n'.. + 'Sec-WebSocket-Version: 13\r\n'.. + 'Sec-WebSocket-Key: osT3F7mvlojIvf3/8uIsJQ==\r\n\r\n'..--secKey + body + ) - --First line of HTTP - res,err=SOCK:receive('*l') - assert(res,err) - local code,ctLen - code=res:find(' ') - code=res:sub(code+1,code+3) + --First line of HTTP + res,err=SOCK:receive('*l') + assert(res,err) + local code,ctLen + code=res:find(' ') + code=res:sub(code+1,code+3) - --Get body length from headers and remove headers - repeat - res,err=SOCK:receive('*l') - assert(res,err) - if not ctLen and res:find('length')then - ctLen=tonumber(res:match('%d+')) - end - until res=='' + --Get body length from headers and remove headers + repeat + res,err=SOCK:receive('*l') + assert(res,err) + if not ctLen and res:find('length')then + ctLen=tonumber(res:match('%d+')) + end + until res=='' - --Result - if ctLen then - if code=='101'then - CHN_push(readCHN,'success') - else - res,err=SOCK:receive(ctLen) - res=JSON.decode(assert(res,err)) - error((code or"XXX")..":"..(res and res.reason or"Server Error")) - end - end - SOCK:settimeout(0) + --Result + if ctLen then + if code=='101'then + CHN_push(readCHN,'success') + else + res,err=SOCK:receive(ctLen) + res=JSON.decode(assert(res,err)) + error((code or"XXX")..":"..(res and res.reason or"Server Error")) + end + end + SOCK:settimeout(0) end local YIELD=coroutine.yield @@ -68,121 +68,121 @@ local shl,shr=bit.lshift,bit.rshift local mask_key={1,14,5,14} local mask_str=char(unpack(mask_key)) local function _send(op,message) - --Message type - SOCK:send(char(bor(op,0x80))) + --Message type + SOCK:send(char(bor(op,0x80))) - if message then - --Length - local length=#message - if length>65535 then - SOCK:send(char(bor(127,0x80),0,0,0,0,band(shr(length,24),0xff),band(shr(length,16),0xff),band(shr(length,8),0xff),band(length,0xff))) - elseif length>125 then - SOCK:send(char(bor(126,0x80),band(shr(length,8),0xff),band(length,0xff))) - else - SOCK:send(char(bor(length,0x80))) - end - local msgbyte={byte(message,1,length)} - for i=1,length do - msgbyte[i]=bxor(msgbyte[i],mask_key[(i-1)%4+1]) - end - return SOCK:send(mask_str..char(unpack(msgbyte))) - else - SOCK:send('\128'..mask_str) - return 0 - end + if message then + --Length + local length=#message + if length>65535 then + SOCK:send(char(bor(127,0x80),0,0,0,0,band(shr(length,24),0xff),band(shr(length,16),0xff),band(shr(length,8),0xff),band(length,0xff))) + elseif length>125 then + SOCK:send(char(bor(126,0x80),band(shr(length,8),0xff),band(length,0xff))) + else + SOCK:send(char(bor(length,0x80))) + end + local msgbyte={byte(message,1,length)} + for i=1,length do + msgbyte[i]=bxor(msgbyte[i],mask_key[(i-1)%4+1]) + end + return SOCK:send(mask_str..char(unpack(msgbyte))) + else + SOCK:send('\128'..mask_str) + return 0 + end end local sendThread=coroutine.wrap(function() - while true do - while CHN_getCount(sendCHN)>=2 do - _send(CHN_pop(sendCHN),CHN_pop(sendCHN)) - end - YIELD() - end + while true do + while CHN_getCount(sendCHN)>=2 do + _send(CHN_pop(sendCHN),CHN_pop(sendCHN)) + end + YIELD() + end end) local function _receive(sock,len) - local buffer="" - while true do - local r,e,p=sock:receive(len) - if r then - buffer=buffer..r - len=len-#r - elseif p then - buffer=buffer..p - len=len-#p - elseif e then - return nil,e - end - if len==0 then - return buffer - end - YIELD() - end + local buffer="" + while true do + local r,e,p=sock:receive(len) + if r then + buffer=buffer..r + len=len-#r + elseif p then + buffer=buffer..p + len=len-#p + elseif e then + return nil,e + end + if len==0 then + return buffer + end + YIELD() + end end local readThread=coroutine.wrap(function() - local res,err - local op,fin - local lBuffer=""--Long multi-pack buffer - while true do - --Byte 0-1 - res,err=_receive(SOCK,2) - assert(res,err) + local res,err + local op,fin + local lBuffer=""--Long multi-pack buffer + while true do + --Byte 0-1 + res,err=_receive(SOCK,2) + assert(res,err) - op=band(byte(res,1),0x0f) - fin=band(byte(res,1),0x80)==0x80 + op=band(byte(res,1),0x0f) + fin=band(byte(res,1),0x80)==0x80 - --Calculating data length - local length=band(byte(res,2),0x7f) - if length==126 then - res,err=_receive(SOCK,2) - assert(res,err) - length=shl(byte(res,1),8)+byte(res,2) - elseif length==127 then - local lenData - lenData,err=_receive(SOCK,8) - assert(res,err) - local _,_,_,_,_5,_6,_7,_8=byte(lenData,1,8) - length=shl(_5,24)+shl(_6,16)+shl(_7,8)+_8 - end - res,err=_receive(SOCK,length) - assert(res,err) + --Calculating data length + local length=band(byte(res,2),0x7f) + if length==126 then + res,err=_receive(SOCK,2) + assert(res,err) + length=shl(byte(res,1),8)+byte(res,2) + elseif length==127 then + local lenData + lenData,err=_receive(SOCK,8) + assert(res,err) + local _,_,_,_,_5,_6,_7,_8=byte(lenData,1,8) + length=shl(_5,24)+shl(_6,16)+shl(_7,8)+_8 + end + res,err=_receive(SOCK,length) + assert(res,err) - --React - if op==8 then--8=close - CHN_push(readCHN,8)--close - if type(res)=='string'then - CHN_push(readCHN,res:sub(3))--Warning: 2 bytes close code at start so :sub(3) - else - CHN_push(readCHN,"WS closed") - end - return - elseif op==0 then--0=continue - lBuffer=lBuffer..res - if fin then - CHN_push(readCHN,lBuffer) - lBuffer="" - end - else - CHN_push(readCHN,op) - if fin then - CHN_push(readCHN,res) - lBuffer="" - else - lBuffer=res - end - end - YIELD() - end + --React + if op==8 then--8=close + CHN_push(readCHN,8)--close + if type(res)=='string'then + CHN_push(readCHN,res:sub(3))--Warning: 2 bytes close code at start so :sub(3) + else + CHN_push(readCHN,"WS closed") + end + return + elseif op==0 then--0=continue + lBuffer=lBuffer..res + if fin then + CHN_push(readCHN,lBuffer) + lBuffer="" + end + else + CHN_push(readCHN,op) + if fin then + CHN_push(readCHN,res) + lBuffer="" + else + lBuffer=res + end + end + YIELD() + end end) local success,err while true do--Running - CHN_demand(triggerCHN) - success,err=pcall(sendThread) - if not success or err then break end - success,err=pcall(readThread) - if not success or err then break end + CHN_demand(triggerCHN) + success,err=pcall(sendThread) + if not success or err then break end + success,err=pcall(readThread) + if not success or err then break end end SOCK:close() diff --git a/Zframework/wheelScroll.lua b/Zframework/wheelScroll.lua index bdcff9bf..0f9fd931 100644 --- a/Zframework/wheelScroll.lua +++ b/Zframework/wheelScroll.lua @@ -2,18 +2,18 @@ local love=love local max,min=math.max,math.min local float=0 return function(y,key1,key2) - if y>0 then - float=max(float,0)+y^1.2 - elseif y<0 then - if float>0 then float=0 end - float=min(float,0)-(-y)^1.2 - end - while float>=1 do - love.keypressed(key1 or"up") - float=float-1 - end - while float<=-1 do - love.keypressed(key2 or"down") - float=float+1 - end + if y>0 then + float=max(float,0)+y^1.2 + elseif y<0 then + if float>0 then float=0 end + float=min(float,0)-(-y)^1.2 + end + while float>=1 do + love.keypressed(key1 or"up") + float=float-1 + end + while float<=-1 do + love.keypressed(key2 or"down") + float=float+1 + end end \ No newline at end of file diff --git a/Zframework/widget.lua b/Zframework/widget.lua index aa85c5b0..d500cb3e 100644 --- a/Zframework/widget.lua +++ b/Zframework/widget.lua @@ -22,1215 +22,1215 @@ local xOy=SCR.xOy local downArrowIcon=GC.DO{40,25,{'fPoly',0,0,20,25,40,0}} local upArrowIcon=GC.DO{40,25,{'fPoly',0,25,20,0,40,25}} local clearIcon=GC.DO{40,40, - {'fRect',16,5,8,3}, - {'fRect',8,8,24,3}, - {'fRect',11,14,18,21}, + {'fRect',16,5,8,3}, + {'fRect',8,8,24,3}, + {'fRect',11,14,18,21}, } local sureIcon=GC.DO{40,40, - {'setFT',35}, - {'mText',"?",20,-6}, + {'setFT',35}, + {'mText',"?",20,-6}, } local smallerThen=GC.DO{20,20, - {'setLW',5}, - {'line',18,2,1,10,18,18}, + {'setLW',5}, + {'line',18,2,1,10,18,18}, } local largerThen=GC.DO{20,20, - {'setLW',5}, - {'line',2,2,19,10,2,18}, + {'setLW',5}, + {'line',2,2,19,10,2,18}, } local STW,STH--stencil-wid/hei local function _rectangleStencil() - gc.rectangle('fill',1,1,STW-2,STH-2) + gc.rectangle('fill',1,1,STW-2,STH-2) end local WIDGET={} local widgetMetatable={ - __tostring=function(self) - return self:getInfo() - end, + __tostring=function(self) + return self:getInfo() + end, } local text={ - type='text', - mustHaveText=true, - alpha=0, + type='text', + mustHaveText=true, + alpha=0, } function text:reset()end function text:update() - if self.hideF and self.hideF()then - if self.alpha>0 then - self.alpha=self.alpha-.125 - end - elseif self.alpha<1 then - self.alpha=self.alpha+.125 - end + if self.hideF and self.hideF()then + if self.alpha>0 then + self.alpha=self.alpha-.125 + end + elseif self.alpha<1 then + self.alpha=self.alpha+.125 + end end function text:draw() - if self.alpha>0 then - local c=self.color - gc_setColor(c[1],c[2],c[3],self.alpha) - if self.align=='M'then - mDraw_X(self.obj,self.x,self.y) - elseif self.align=='L'then - gc_draw(self.obj,self.x,self.y) - elseif self.align=='R'then - gc_draw(self.obj,self.x-self.obj:getWidth(),self.y) - end - end + if self.alpha>0 then + local c=self.color + gc_setColor(c[1],c[2],c[3],self.alpha) + if self.align=='M'then + mDraw_X(self.obj,self.x,self.y) + elseif self.align=='L'then + gc_draw(self.obj,self.x,self.y) + elseif self.align=='R'then + gc_draw(self.obj,self.x-self.obj:getWidth(),self.y) + end + end end function WIDGET.newText(D)--name,x,y[,fText][,color][,font=30][,align='M'][,hideF][,hide] - local _={ - name= D.name or"_", - x= D.x, - y= D.y, + local _={ + name= D.name or"_", + x= D.x, + y= D.y, - fText= D.fText, - color= D.color and(COLOR[D.color]or D.color)or COLOR.Z, - font= D.font or 30, - align= D.align or'M', - hideF= D.hideF, - } - for k,v in next,text do _[k]=v end - if not _.hideF then _.alpha=1 end - setmetatable(_,widgetMetatable) - return _ + fText=D.fText, + color=D.color and(COLOR[D.color]or D.color)or COLOR.Z, + font= D.font or 30, + align=D.align or'M', + hideF=D.hideF, + } + for k,v in next,text do _[k]=v end + if not _.hideF then _.alpha=1 end + setmetatable(_,widgetMetatable) + return _ end local image={ - type='image', + type='image', } function image:reset() - if type(self.img)=='string'then - self.img=IMG[self.img] - end + if type(self.img)=='string'then + self.img=IMG[self.img] + end end function image:draw() - gc_setColor(1,1,1,self.alpha) - gc_draw(self.img,self.x,self.y,self.ang,self.k) + gc_setColor(1,1,1,self.alpha) + gc_draw(self.img,self.x,self.y,self.ang,self.k) end function WIDGET.newImage(D)--name[,img(name)],x,y[,ang][,k][,hideF][,hide] - local _={ - name= D.name or"_", - img= D.img or D.name or"_", - alpha= D.alpha, - x= D.x, - y= D.y, - ang= D.ang, - k= D.k, - hideF= D.hideF, - hide= D.hide, - } - for k,v in next,image do _[k]=v end - setmetatable(_,widgetMetatable) - return _ + local _={ + name= D.name or"_", + img= D.img or D.name or"_", + alpha=D.alpha, + x= D.x, + y= D.y, + ang= D.ang, + k= D.k, + hideF=D.hideF, + hide= D.hide, + } + for k,v in next,image do _[k]=v end + setmetatable(_,widgetMetatable) + return _ end local button={ - type='button', - mustHaveText=true, - ATV=0,--Activating time(0~8) + type='button', + mustHaveText=true, + ATV=0,--Activating time(0~8) } function button:reset() - self.ATV=0 + self.ATV=0 end function button:setObject(obj) - if type(obj)=='string'or type(obj)=='number'then - self.obj=gc.newText(getFont(self.font),obj) - elseif obj then - self.obj=obj - end + if type(obj)=='string'or type(obj)=='number'then + self.obj=gc.newText(getFont(self.font),obj) + elseif obj then + self.obj=obj + end end function button:isAbove(x,y) - local ATV=self.ATV - return - x>self.x-ATV and - y>self.y-ATV and - xself.x-ATV and + y>self.y-ATV and + x0 then self.ATV=ATV-.5 end - end + local ATV=self.ATV + if WIDGET.sel==self then + if ATV<8 then self.ATV=ATV+1 end + else + if ATV>0 then self.ATV=ATV-.5 end + end end function button:draw() - local x,y,w,h=self.x,self.y,self.w,self.h - local ATV=self.ATV - local c=self.color - local r,g,b=c[1],c[2],c[3] + local x,y,w,h=self.x,self.y,self.w,self.h + local ATV=self.ATV + local c=self.color + local r,g,b=c[1],c[2],c[3] - --Button - gc_setColor(.15+r*.7,.15+g*.7,.15+b*.7,.9) - gc_rectangle('fill',x-ATV,y-ATV,w+2*ATV,h+2*ATV,3) - if ATV>0 then - gc_setLineWidth(2) - gc_setColor(.97,.97,.97,ATV*.125) - gc_rectangle('line',x-ATV+2,y-ATV+2,w+2*ATV-4,h+2*ATV-4,3) - end + --Button + gc_setColor(.15+r*.7,.15+g*.7,.15+b*.7,.9) + gc_rectangle('fill',x-ATV,y-ATV,w+2*ATV,h+2*ATV,3) + if ATV>0 then + gc_setLineWidth(2) + gc_setColor(.97,.97,.97,ATV*.125) + gc_rectangle('line',x-ATV+2,y-ATV+2,w+2*ATV-4,h+2*ATV-4,3) + end - --Object - local obj=self.obj - local y0=y+h*.5-ATV*.5 - gc_setColor(1,1,1,.2+ATV*.05) - if self.align=='M'then - local x0=x+w*.5 - mDraw(obj,x0-1,y0-1) - mDraw(obj,x0-1,y0+1) - mDraw(obj,x0+1,y0-1) - mDraw(obj,x0+1,y0+1) - gc_setColor(r*.55,g*.55,b*.55) - mDraw(obj,x0,y0) - elseif self.align=='L'then - local edge=self.edge - mDraw_Y(obj,x+edge-1,y0-1) - mDraw_Y(obj,x+edge-1,y0+1) - mDraw_Y(obj,x+edge+1,y0-1) - mDraw_Y(obj,x+edge+1,y0+1) - gc_setColor(r*.55,g*.55,b*.55) - mDraw_Y(obj,x+edge,y0) - elseif self.align=='R'then - local x0=x+w-self.edge-obj:getWidth() - mDraw_Y(obj,x0-1,y0-1) - mDraw_Y(obj,x0-1,y0+1) - mDraw_Y(obj,x0+1,y0-1) - mDraw_Y(obj,x0+1,y0+1) - gc_setColor(r*.55,g*.55,b*.55) - mDraw_Y(obj,x0,y0) - end + --Object + local obj=self.obj + local y0=y+h*.5-ATV*.5 + gc_setColor(1,1,1,.2+ATV*.05) + if self.align=='M'then + local x0=x+w*.5 + mDraw(obj,x0-1,y0-1) + mDraw(obj,x0-1,y0+1) + mDraw(obj,x0+1,y0-1) + mDraw(obj,x0+1,y0+1) + gc_setColor(r*.55,g*.55,b*.55) + mDraw(obj,x0,y0) + elseif self.align=='L'then + local edge=self.edge + mDraw_Y(obj,x+edge-1,y0-1) + mDraw_Y(obj,x+edge-1,y0+1) + mDraw_Y(obj,x+edge+1,y0-1) + mDraw_Y(obj,x+edge+1,y0+1) + gc_setColor(r*.55,g*.55,b*.55) + mDraw_Y(obj,x+edge,y0) + elseif self.align=='R'then + local x0=x+w-self.edge-obj:getWidth() + mDraw_Y(obj,x0-1,y0-1) + mDraw_Y(obj,x0-1,y0+1) + mDraw_Y(obj,x0+1,y0-1) + mDraw_Y(obj,x0+1,y0+1) + gc_setColor(r*.55,g*.55,b*.55) + mDraw_Y(obj,x0,y0) + end end function button:getInfo() - return("x=%d,y=%d,w=%d,h=%d,font=%d"):format(self.x+self.w*.5,self.y+self.h*.5,self.w,self.h,self.font) + return("x=%d,y=%d,w=%d,h=%d,font=%d"):format(self.x+self.w*.5,self.y+self.h*.5,self.w,self.h,self.font) end function button:press(_,_,k) - self.code(k) - local ATV=self.ATV - SYSFX.newRectRipple( - 6, - self.x-ATV, - self.y-ATV-WIDGET.scrollPos, - self.w+2*ATV, - self.h+2*ATV - ) - if self.sound then SFX.play('button')end + self.code(k) + local ATV=self.ATV + SYSFX.newRectRipple( + 6, + self.x-ATV, + self.y-ATV-WIDGET.scrollPos, + self.w+2*ATV, + self.h+2*ATV + ) + if self.sound then SFX.play('button')end end function WIDGET.newButton(D)--name,x,y,w[,h][,fText][,color][,font=30][,sound=true][,align='M'][,edge=0],code[,hideF][,hide] - if not D.h then D.h=D.w end - local _={ - name= D.name or"_", + if not D.h then D.h=D.w end + local _={ + name= D.name or"_", - x= D.x-D.w*.5, - y= D.y-D.h*.5, - w= D.w, - h= D.h, + x= D.x-D.w*.5, + y= D.y-D.h*.5, + w= D.w, + h= D.h, - resCtr={ - D.x,D.y, - D.x-D.w*.35,D.y-D.h*.35, - D.x-D.w*.35,D.y+D.h*.35, - D.x+D.w*.35,D.y-D.h*.35, - D.x+D.w*.35,D.y+D.h*.35, - }, + resCtr={ + D.x,D.y, + D.x-D.w*.35,D.y-D.h*.35, + D.x-D.w*.35,D.y+D.h*.35, + D.x+D.w*.35,D.y-D.h*.35, + D.x+D.w*.35,D.y+D.h*.35, + }, - fText= D.fText, - color= D.color and(COLOR[D.color]or D.color)or COLOR.Z, - font= D.font or 30, - align= D.align or'M', - edge= D.edge or 0, - sound= D.sound~=false, - code= D.code, - hideF= D.hideF, - hide= D.hide, - } - for k,v in next,button do _[k]=v end - setmetatable(_,widgetMetatable) - return _ + fText=D.fText, + color=D.color and(COLOR[D.color]or D.color)or COLOR.Z, + font= D.font or 30, + align=D.align or'M', + edge= D.edge or 0, + sound=D.sound~=false, + code= D.code, + hideF=D.hideF, + hide= D.hide, + } + for k,v in next,button do _[k]=v end + setmetatable(_,widgetMetatable) + return _ end local key={ - type='key', - mustHaveText=true, - ATV=0,--Activating time(0~4) + type='key', + mustHaveText=true, + ATV=0,--Activating time(0~4) } function key:reset() - self.ATV=0 + self.ATV=0 end function key:setObject(obj) - if type(obj)=='string'or type(obj)=='number'then - self.obj=gc.newText(getFont(self.font),obj) - elseif obj then - self.obj=obj - end + if type(obj)=='string'or type(obj)=='number'then + self.obj=gc.newText(getFont(self.font),obj) + elseif obj then + self.obj=obj + end end function key:isAbove(x,y) - return - x>self.x and - y>self.y and - xself.x and + y>self.y and + x0 then self.ATV=ATV-.5 end - end + local ATV=self.ATV + if WIDGET.sel==self then + if ATV<4 then self.ATV=ATV+1 end + else + if ATV>0 then self.ATV=ATV-.5 end + end end function key:draw() - local x,y,w,h=self.x,self.y,self.w,self.h - local ATV=self.ATV - local c=self.color - local align=self.align - local r,g,b=c[1],c[2],c[3] + local x,y,w,h=self.x,self.y,self.w,self.h + local ATV=self.ATV + local c=self.color + local align=self.align + local r,g,b=c[1],c[2],c[3] - --Frame - if not self.noFrame then - gc_setColor(.2+r*.8,.2+g*.8,.2+b*.8,.7) - gc_setLineWidth(2) - gc_rectangle('line',x,y,w,h,3) - end + --Frame + if not self.noFrame then + gc_setColor(.2+r*.8,.2+g*.8,.2+b*.8,.7) + gc_setLineWidth(2) + gc_rectangle('line',x,y,w,h,3) + end - --Fill - if self.fShade then - gc_setColor(r,g,b,ATV*.25) - if align=='M'then - mDraw(self.fShade,x+w*.5,y+h*.5) - elseif align=='L'then - mDraw_Y(self.fShade,x+self.edge,y+h*.5) - elseif align=='R'then - mDraw_Y(self.fShade,x+w-self.edge-self.fShade:getWidth(),y+h*.5) - end - else - gc_setColor(1,1,1,ATV*.05) - gc_rectangle('fill',x,y,w,h,3) - end + --Fill + if self.fShade then + gc_setColor(r,g,b,ATV*.25) + if align=='M'then + mDraw(self.fShade,x+w*.5,y+h*.5) + elseif align=='L'then + mDraw_Y(self.fShade,x+self.edge,y+h*.5) + elseif align=='R'then + mDraw_Y(self.fShade,x+w-self.edge-self.fShade:getWidth(),y+h*.5) + end + else + gc_setColor(1,1,1,ATV*.05) + gc_rectangle('fill',x,y,w,h,3) + end - --Object - gc_setColor(r,g,b) - if align=='M'then - mDraw(self.obj,x+w*.5,y+h*.5) - elseif align=='L'then - mDraw_Y(self.obj,x+self.edge,y+h*.5) - elseif align=='R'then - mDraw_Y(self.obj,x+w-self.edge-self.obj:getWidth(),y+h*.5) - end + --Object + gc_setColor(r,g,b) + if align=='M'then + mDraw(self.obj,x+w*.5,y+h*.5) + elseif align=='L'then + mDraw_Y(self.obj,x+self.edge,y+h*.5) + elseif align=='R'then + mDraw_Y(self.obj,x+w-self.edge-self.obj:getWidth(),y+h*.5) + end end function key:getInfo() - return("x=%d,y=%d,w=%d,h=%d,font=%d"):format(self.x+self.w*.5,self.y+self.h*.5,self.w,self.h,self.font) + return("x=%d,y=%d,w=%d,h=%d,font=%d"):format(self.x+self.w*.5,self.y+self.h*.5,self.w,self.h,self.font) end function key:press(_,_,k) - self.code(k) - if self.sound then SFX.play('key')end + self.code(k) + if self.sound then SFX.play('key')end end function WIDGET.newKey(D)--name,x,y,w[,h][,fText][,fShade][,noFrame][,color][,font=30][,sound=true][,align='M'][,edge=0],code[,hideF][,hide] - if not D.h then D.h=D.w end - local _={ - name= D.name or"_", + if not D.h then D.h=D.w end + local _={ + name= D.name or"_", - x= D.x-D.w*.5, - y= D.y-D.h*.5, - w= D.w, - h= D.h, + x= D.x-D.w*.5, + y= D.y-D.h*.5, + w= D.w, + h= D.h, - resCtr={ - D.x,D.y, - D.x-D.w*.35,D.y-D.h*.35, - D.x-D.w*.35,D.y+D.h*.35, - D.x+D.w*.35,D.y-D.h*.35, - D.x+D.w*.35,D.y+D.h*.35, - }, + resCtr={ + D.x,D.y, + D.x-D.w*.35,D.y-D.h*.35, + D.x-D.w*.35,D.y+D.h*.35, + D.x+D.w*.35,D.y-D.h*.35, + D.x+D.w*.35,D.y+D.h*.35, + }, - fText= D.fText, - fShade= D.fShade, - noFrame=D.noFrame, - color= D.color and(COLOR[D.color]or D.color)or COLOR.Z, - font= D.font or 30, - sound= D.sound~=false, - align= D.align or'M', - edge= D.edge or 0, - code= D.code, - hideF= D.hideF, - hide= D.hide, - } - for k,v in next,key do _[k]=v end - setmetatable(_,widgetMetatable) - return _ + fText= D.fText, + fShade= D.fShade, + noFrame=D.noFrame, + color= D.color and(COLOR[D.color]or D.color)or COLOR.Z, + font= D.font or 30, + sound= D.sound~=false, + align= D.align or'M', + edge= D.edge or 0, + code= D.code, + hideF= D.hideF, + hide= D.hide, + } + for k,v in next,key do _[k]=v end + setmetatable(_,widgetMetatable) + return _ end local switch={ - type='switch', - mustHaveText=true, - ATV=0,--Activating time(0~8) - CHK=0,--Check alpha(0~6) + type='switch', + mustHaveText=true, + ATV=0,--Activating time(0~8) + CHK=0,--Check alpha(0~6) } function switch:reset() - self.ATV=0 - self.CHK=0 + self.ATV=0 + self.CHK=0 end function switch:isAbove(x,y) - return x>self.x and xself.y-25 and yself.x and xself.y-25 and y0 then self.ATV=atv-.5 end - end - local chk=self.CHK - if self:disp()then if chk<6 then self.CHK=chk+1 end - else if chk>0 then self.CHK=chk-1 end - end + local atv=self.ATV + if WIDGET.sel==self then if atv<8 then self.ATV=atv+1 end + else if atv>0 then self.ATV=atv-.5 end + end + local chk=self.CHK + if self:disp()then if chk<6 then self.CHK=chk+1 end + else if chk>0 then self.CHK=chk-1 end + end end function switch:draw() - local x,y=self.x,self.y-25 - local ATV=self.ATV + local x,y=self.x,self.y-25 + local ATV=self.ATV - --Frame - gc_setLineWidth(2) - gc_setColor(1,1,1,.6+ATV*.1) - gc_rectangle('line',x,y,50,50,3) + --Frame + gc_setLineWidth(2) + gc_setColor(1,1,1,.6+ATV*.1) + gc_rectangle('line',x,y,50,50,3) - --Checked - if ATV>0 then - gc_setColor(1,1,1,ATV*.06) - gc_rectangle('fill',x,y,50,50,3) - end - if self.CHK>0 then - gc_setColor(.9,1,.9,self.CHK/6) - gc_setLineWidth(5) - gc_line(x+5,y+25,x+18,y+38,x+45,y+11) - end + --Checked + if ATV>0 then + gc_setColor(1,1,1,ATV*.06) + gc_rectangle('fill',x,y,50,50,3) + end + if self.CHK>0 then + gc_setColor(.9,1,.9,self.CHK/6) + gc_setLineWidth(5) + gc_line(x+5,y+25,x+18,y+38,x+45,y+11) + end - --Drawable - gc_setColor(self.color) - mDraw_Y(self.obj,x-12-ATV-self.obj:getWidth(),y+25) + --Drawable + gc_setColor(self.color) + mDraw_Y(self.obj,x-12-ATV-self.obj:getWidth(),y+25) end function switch:getInfo() - return("x=%d,y=%d,font=%d"):format(self.x,self.y,self.font) + return("x=%d,y=%d,font=%d"):format(self.x,self.y,self.font) end function switch:press() - self.code() - if self.sound then SFX.play('move')end + self.code() + if self.sound then SFX.play('move')end end function WIDGET.newSwitch(D)--name,x,y[,fText][,color][,font=30][,sound=true][,disp],code[,hideF][,hide] - local _={ - name= D.name or"_", + local _={ + name= D.name or"_", - x= D.x, - y= D.y, + x= D.x, + y= D.y, - resCtr={ - D.x+25,D.y, - }, + resCtr={ + D.x+25,D.y, + }, - fText= D.fText, - color= D.color and(COLOR[D.color]or D.color)or COLOR.Z, - font= D.font or 30, - sound= D.sound~=false, - disp= D.disp, - code= D.code, - hideF= D.hideF, - hide= D.hide, - } - for k,v in next,switch do _[k]=v end - setmetatable(_,widgetMetatable) - return _ + fText=D.fText, + color=D.color and(COLOR[D.color]or D.color)or COLOR.Z, + font= D.font or 30, + sound=D.sound~=false, + disp= D.disp, + code= D.code, + hideF=D.hideF, + hide= D.hide, + } + for k,v in next,switch do _[k]=v end + setmetatable(_,widgetMetatable) + return _ end local slider={ - type='slider', - ATV=0,--Activating time(0~8) - TAT=0,--Text activating time(0~180) - pos=0,--Position shown - lastTime=0,--Last value changing time + type='slider', + ATV=0,--Activating time(0~8) + TAT=0,--Text activating time(0~180) + pos=0,--Position shown + lastTime=0,--Last value changing time } local sliderShowFunc={ - int=function(S) - return S.disp() - end, - float=function(S) - return int(S.disp()*100)*.01 - end, - percent=function(S) - return int(S.disp()*100).."%" - end, + int=function(S) + return S.disp() + end, + float=function(S) + return int(S.disp()*100)*.01 + end, + percent=function(S) + return int(S.disp()*100).."%" + end, } function slider:reset() - self.ATV=0 - self.TAT=180 - self.pos=0 + self.ATV=0 + self.TAT=180 + self.pos=0 end function slider:isAbove(x,y) - return x>self.x-10 and xself.y-25 and yself.x-10 and xself.y-25 and y0 then - self.TAT=self.TAT-1 - end - if WIDGET.sel==self then - if atv<6 then - atv=atv+1 - self.ATV=atv - end - self.TAT=180 - else - if atv>0 then - atv=atv-.5 - self.ATV=atv - end - end - if not self.hide then - self.pos=self.pos*.7+self.disp()*.3 - end + local atv=self.ATV + if self.TAT>0 then + self.TAT=self.TAT-1 + end + if WIDGET.sel==self then + if atv<6 then + atv=atv+1 + self.ATV=atv + end + self.TAT=180 + else + if atv>0 then + atv=atv-.5 + self.ATV=atv + end + end + if not self.hide then + self.pos=self.pos*.7+self.disp()*.3 + end end function slider:draw() - local x,y=self.x,self.y - local ATV=self.ATV - local x2=x+self.w + local x,y=self.x,self.y + local ATV=self.ATV + local x2=x+self.w - gc_setColor(1,1,1,.5+ATV*.06) + gc_setColor(1,1,1,.5+ATV*.06) - --Units - if not self.smooth then - gc_setLineWidth(2) - for p=0,self.unit do - local X=x+(x2-x)*p/self.unit - gc_line(X,y+7,X,y-7) - end - end + --Units + if not self.smooth then + gc_setLineWidth(2) + for p=0,self.unit do + local X=x+(x2-x)*p/self.unit + gc_line(X,y+7,X,y-7) + end + end - --Axis - gc_setLineWidth(4) - gc_line(x,y,x2,y) + --Axis + gc_setLineWidth(4) + gc_line(x,y,x2,y) - --Block - local cx=x+(x2-x)*self.pos/self.unit - local bx,by,bw,bh=cx-10-ATV*.5,y-16-ATV,20+ATV,32+2*ATV - gc_setColor(.8,.8,.8) - gc_rectangle('fill',bx,by,bw,bh,3) + --Block + local cx=x+(x2-x)*self.pos/self.unit + local bx,by,bw,bh=cx-10-ATV*.5,y-16-ATV,20+ATV,32+2*ATV + gc_setColor(.8,.8,.8) + gc_rectangle('fill',bx,by,bw,bh,3) - --Glow - if ATV>0 then - gc_setLineWidth(2) - gc_setColor(.97,.97,.97,ATV*.16) - gc_rectangle('line',bx+1,by+1,bw-2,bh-2,3) - end + --Glow + if ATV>0 then + gc_setLineWidth(2) + gc_setColor(.97,.97,.97,ATV*.16) + gc_rectangle('line',bx+1,by+1,bw-2,bh-2,3) + end - --Float text - if self.TAT>0 and self.show then - setFont(25) - gc_setColor(.97,.97,.97,self.TAT/180) - mStr(self:show(),cx,by-30) - end + --Float text + if self.TAT>0 and self.show then + setFont(25) + gc_setColor(.97,.97,.97,self.TAT/180) + mStr(self:show(),cx,by-30) + end - --Drawable - if self.obj then - gc_setColor(self.color) - mDraw_Y(self.obj,x-12-ATV-self.obj:getWidth(),y) - end + --Drawable + if self.obj then + gc_setColor(self.color) + mDraw_Y(self.obj,x-12-ATV-self.obj:getWidth(),y) + end end function slider:getInfo() - return("x=%d,y=%d,w=%d"):format(self.x,self.y,self.w) + return("x=%d,y=%d,w=%d"):format(self.x,self.y,self.w) end function slider:press(x) - self:drag(x) + self:drag(x) end function slider:drag(x) - if not x then return end - x=x-self.x - local p=self.disp() - local P=x<0 and 0 or x>self.w and self.unit or x/self.w*self.unit - if not self.smooth then - P=int(P+.5) - end - if p~=P then - self.code(P) - end - if self.change and TIME()-self.lastTime>.5 then - self.lastTime=TIME() - self.change() - end + if not x then return end + x=x-self.x + local p=self.disp() + local P=x<0 and 0 or x>self.w and self.unit or x/self.w*self.unit + if not self.smooth then + P=int(P+.5) + end + if p~=P then + self.code(P) + end + if self.change and TIME()-self.lastTime>.5 then + self.lastTime=TIME() + self.change() + end end function slider:release(x) - self:drag(x) - self.lastTime=0 + self:drag(x) + self.lastTime=0 end function slider:scroll(n) - local p=self.disp() - local u=self.smooth and .01 or 1 - local P=n==-1 and max(p-u,0)or min(p+u,self.unit) - if p==P or not P then return end - self.code(P) - if self.change and TIME()-self.lastTime>.18 then - self.lastTime=TIME() - self.change() - end + local p=self.disp() + local u=self.smooth and .01 or 1 + local P=n==-1 and max(p-u,0)or min(p+u,self.unit) + if p==P or not P then return end + self.code(P) + if self.change and TIME()-self.lastTime>.18 then + self.lastTime=TIME() + self.change() + end end function slider:arrowKey(k) - self:scroll((k=="left"or k=="up")and -1 or 1) + self:scroll((k=="left"or k=="up")and -1 or 1) end function WIDGET.newSlider(D)--name,x,y,w[,fText][,color][,unit][,smooth][,font=30][,change],disp,code,hide - local _={ - name= D.name or"_", + local _={ + name= D.name or"_", - x= D.x, - y= D.y, - w= D.w, + x= D.x, + y= D.y, + w= D.w, - resCtr={ - D.x,D.y, - D.x+D.w*.25,D.y, - D.x+D.w*.5,D.y, - D.x+D.w*.75,D.y, - D.x+D.w,D.y, - }, + resCtr={ + D.x,D.y, + D.x+D.w*.25,D.y, + D.x+D.w*.5,D.y, + D.x+D.w*.75,D.y, + D.x+D.w,D.y, + }, - fText= D.fText, - color= D.color and(COLOR[D.color]or D.color)or COLOR.Z, - unit= D.unit or 1, - smooth= false, - font= D.font or 30, - change= D.change, - disp= D.disp, - code= D.code, - hideF= D.hideF, - hide= D.hide, - show= false, - } - if D.smooth~=nil then - _.smooth=D.smooth - else - _.smooth=_.unit<=1 - end - if D.show then - if type(D.show)=='function'then - _.show=D.show - else - _.show=sliderShowFunc[D.show] - end - elseif D.show~=false then - if _.unit<=1 then - _.show=sliderShowFunc.percent - else - _.show=sliderShowFunc.int - end - end - for k,v in next,slider do _[k]=v end - setmetatable(_,widgetMetatable) - return _ + fText= D.fText, + color= D.color and(COLOR[D.color]or D.color)or COLOR.Z, + unit= D.unit or 1, + smooth=false, + font= D.font or 30, + change=D.change, + disp= D.disp, + code= D.code, + hideF= D.hideF, + hide= D.hide, + show= false, + } + if D.smooth~=nil then + _.smooth=D.smooth + else + _.smooth=_.unit<=1 + end + if D.show then + if type(D.show)=='function'then + _.show=D.show + else + _.show=sliderShowFunc[D.show] + end + elseif D.show~=false then + if _.unit<=1 then + _.show=sliderShowFunc.percent + else + _.show=sliderShowFunc.int + end + end + for k,v in next,slider do _[k]=v end + setmetatable(_,widgetMetatable) + return _ end local selector={ - type='selector', - mustHaveText=true, - ATV=8,--Activating time(0~4) - select=0,--Selected item ID - selText=false,--Selected item name + type='selector', + mustHaveText=true, + ATV=8,--Activating time(0~4) + select=0,--Selected item ID + selText=false,--Selected item name } function selector:reset() - self.ATV=0 - local V,L=self.disp(),self.list - local i=TABLE.find(L,V) - if i then - self.select=i - self.selText=self.list[i] - else - self.hide=true - MES.new('error',"Selector "..self.name.." dead, disp= "..tostring(V)) - end + self.ATV=0 + local V,L=self.disp(),self.list + local i=TABLE.find(L,V) + if i then + self.select=i + self.selText=self.list[i] + else + self.hide=true + MES.new('error',"Selector "..self.name.." dead, disp= "..tostring(V)) + end end function selector:isAbove(x,y) - return - x>self.x and - xself.y and - yself.x and + xself.y and + y0 then - self.ATV=atv-.5 - end - end + local atv=self.ATV + if WIDGET.sel==self then + if atv<8 then + self.ATV=atv+1 + end + else + if atv>0 then + self.ATV=atv-.5 + end + end end function selector:draw() - local x,y=self.x,self.y - local w=self.w - local ATV=self.ATV + local x,y=self.x,self.y + local w=self.w + local ATV=self.ATV - --Frame - gc_setColor(1,1,1,.6+ATV*.1) - gc_setLineWidth(2) - gc_rectangle('line',x,y,w,60,3) + --Frame + gc_setColor(1,1,1,.6+ATV*.1) + gc_setLineWidth(2) + gc_rectangle('line',x,y,w,60,3) - --Arrow - gc_setColor(1,1,1,.2+ATV*.1) - local t=(TIME()%.5)^.5 - if self.select>1 then - gc_draw(smallerThen,x+6,y+33) - if ATV>0 then - gc_setColor(1,1,1,ATV*.4*(.5-t)) - gc_draw(smallerThen,x+6-t*40,y+33) - gc_setColor(1,1,1,.2+ATV*.1) - end - end - if self.select<#self.list then - gc_draw(largerThen,x+w-26,y+33) - if ATV>0 then - gc_setColor(1,1,1,ATV*.4*(.5-t)) - gc_draw(largerThen,x+w-26+t*40,y+33) - end - end + --Arrow + gc_setColor(1,1,1,.2+ATV*.1) + local t=(TIME()%.5)^.5 + if self.select>1 then + gc_draw(smallerThen,x+6,y+33) + if ATV>0 then + gc_setColor(1,1,1,ATV*.4*(.5-t)) + gc_draw(smallerThen,x+6-t*40,y+33) + gc_setColor(1,1,1,.2+ATV*.1) + end + end + if self.select<#self.list then + gc_draw(largerThen,x+w-26,y+33) + if ATV>0 then + gc_setColor(1,1,1,ATV*.4*(.5-t)) + gc_draw(largerThen,x+w-26+t*40,y+33) + end + end - --Drawable - gc_setColor(self.color) - GC.simpX(self.obj,x+w*.5,y+17-21) - gc_setColor(1,1,1) - setFont(30) - mStr(self.selText,x+w*.5,y+43-21) + --Drawable + gc_setColor(self.color) + GC.simpX(self.obj,x+w*.5,y+17-21) + gc_setColor(1,1,1) + setFont(30) + mStr(self.selText,x+w*.5,y+43-21) end function selector:getInfo() - return("x=%d,y=%d,w=%d"):format(self.x+self.w*.5,self.y+30,self.w) + return("x=%d,y=%d,w=%d"):format(self.x+self.w*.5,self.y+30,self.w) end function selector:press(x) - if x then - local s=self.select - if x1 then - s=s-1 - SYSFX.newShade(3,self.x,self.y-WIDGET.scrollPos,self.w*.5,60) - end - else - if s<#self.list then - s=s+1 - SYSFX.newShade(3,self.x+self.w*.5,self.y-WIDGET.scrollPos,self.w*.5,60) - end - end - if self.select~=s then - self.code(self.list[s]) - self.select=s - self.selText=self.list[s] - if self.sound then SFX.play('prerotate')end - end - end + if x then + local s=self.select + if x1 then + s=s-1 + SYSFX.newShade(3,self.x,self.y-WIDGET.scrollPos,self.w*.5,60) + end + else + if s<#self.list then + s=s+1 + SYSFX.newShade(3,self.x+self.w*.5,self.y-WIDGET.scrollPos,self.w*.5,60) + end + end + if self.select~=s then + self.code(self.list[s]) + self.select=s + self.selText=self.list[s] + if self.sound then SFX.play('prerotate')end + end + end end function selector:scroll(n) - local s=self.select - if n==-1 then - if s==1 then return end - s=s-1 - SYSFX.newShade(3,self.x,self.y-WIDGET.scrollPos,self.w*.5,60) - else - if s==#self.list then return end - s=s+1 - SYSFX.newShade(3,self.x+self.w*.5,self.y-WIDGET.scrollPos,self.w*.5,60) - end - self.code(self.list[s]) - self.select=s - self.selText=self.list[s] - if self.sound then SFX.play('prerotate')end + local s=self.select + if n==-1 then + if s==1 then return end + s=s-1 + SYSFX.newShade(3,self.x,self.y-WIDGET.scrollPos,self.w*.5,60) + else + if s==#self.list then return end + s=s+1 + SYSFX.newShade(3,self.x+self.w*.5,self.y-WIDGET.scrollPos,self.w*.5,60) + end + self.code(self.list[s]) + self.select=s + self.selText=self.list[s] + if self.sound then SFX.play('prerotate')end end function selector:arrowKey(k) - self:scroll((k=="left"or k=="up")and -1 or 1) + self:scroll((k=="left"or k=="up")and -1 or 1) end function WIDGET.newSelector(D)--name,x,y,w[,fText][,color][,sound=true],list,disp,code,hide - local _={ - name= D.name or"_", + local _={ + name= D.name or"_", - x= D.x-D.w*.5, - y= D.y-30, - w= D.w, + x= D.x-D.w*.5, + y= D.y-30, + w= D.w, - resCtr={ - D.x,D.y, - D.x+D.w*.25,D.y, - D.x+D.w*.5,D.y, - D.x+D.w*.75,D.y, - D.x+D.w,D.y, - }, + resCtr={ + D.x,D.y, + D.x+D.w*.25,D.y, + D.x+D.w*.5,D.y, + D.x+D.w*.75,D.y, + D.x+D.w,D.y, + }, - fText= D.fText, - color= D.color and(COLOR[D.color]or D.color)or COLOR.Z, - sound= D.sound~=false, - font= 30, - list= D.list, - disp= D.disp, - code= D.code, - hideF= D.hideF, - hide= D.hide, - } - for k,v in next,selector do _[k]=v end - setmetatable(_,widgetMetatable) - return _ + fText=D.fText, + color=D.color and(COLOR[D.color]or D.color)or COLOR.Z, + sound=D.sound~=false, + font= 30, + list= D.list, + disp= D.disp, + code= D.code, + hideF=D.hideF, + hide= D.hide, + } + for k,v in next,selector do _[k]=v end + setmetatable(_,widgetMetatable) + return _ end local inputBox={ - type='inputBox', - keepFocus=true, - ATV=0,--Activating time(0~4) - value="",--Text contained + type='inputBox', + keepFocus=true, + ATV=0,--Activating time(0~4) + value="",--Text contained } function inputBox:reset() - self.ATV=0 + self.ATV=0 end function inputBox:hasText() - return #self.value>0 + return #self.value>0 end function inputBox:getText() - return self.value + return self.value end function inputBox:setText(str) - if type(str)=='string'then - self.value=str - end + if type(str)=='string'then + self.value=str + end end function inputBox:addText(str) - if type(str)=='string'then - self.value=self.value..str - else - MES.new('error',"inputBox "..self.name.." dead, addText("..type(str)..")") - end + if type(str)=='string'then + self.value=self.value..str + else + MES.new('error',"inputBox "..self.name.." dead, addText("..type(str)..")") + end end function inputBox:clear() - self.value="" + self.value="" end function inputBox:isAbove(x,y) - return - x>self.x and - y>self.y and - xself.x and + y>self.y and + x0 then self.ATV=ATV-.25 end - end + local ATV=self.ATV + if WIDGET.sel==self then + if ATV<3 then self.ATV=ATV+1 end + else + if ATV>0 then self.ATV=ATV-.25 end + end end function inputBox:draw() - local x,y,w,h=self.x,self.y,self.w,self.h - local ATV=self.ATV + local x,y,w,h=self.x,self.y,self.w,self.h + local ATV=self.ATV - gc_setColor(1,1,1,ATV*.08) - gc_rectangle('fill',x,y,w,h,3) + gc_setColor(1,1,1,ATV*.08) + gc_rectangle('fill',x,y,w,h,3) - gc_setColor(1,1,1) - gc_setLineWidth(3) - gc_rectangle('line',x,y,w,h,3) + gc_setColor(1,1,1) + gc_setLineWidth(3) + gc_rectangle('line',x,y,w,h,3) - --Drawable - setFont(self.font) - if self.obj then - mDraw_Y(self.obj,x-12-self.obj:getWidth(),y+h*.5) - end - if self.secret then - for i=1,#self.value do - gc_print("*",x-5+self.font*.5*i,y+h*.5-self.font*.7) - end - else - gc_printf(self.value,x+10,y,self.w) - setFont(self.font-10) - if WIDGET.sel==self then - gc_print(EDITING,x+10,y+12-self.font*1.4) - end - end + --Drawable + setFont(self.font) + if self.obj then + mDraw_Y(self.obj,x-12-self.obj:getWidth(),y+h*.5) + end + if self.secret then + for i=1,#self.value do + gc_print("*",x-5+self.font*.5*i,y+h*.5-self.font*.7) + end + else + gc_printf(self.value,x+10,y,self.w) + setFont(self.font-10) + if WIDGET.sel==self then + gc_print(EDITING,x+10,y+12-self.font*1.4) + end + end end function inputBox:getInfo() - return("x=%d,y=%d,w=%d,h=%d"):format(self.x+self.w*.5,self.y+self.h*.5,self.w,self.h) + return("x=%d,y=%d,w=%d,h=%d"):format(self.x+self.w*.5,self.y+self.h*.5,self.w,self.h) end function inputBox:press() - if MOBILE then - local _,y1=xOy:transformPoint(0,self.y+self.h) - kb.setTextInput(true,0,y1,1,1) - end + if MOBILE then + local _,y1=xOy:transformPoint(0,self.y+self.h) + kb.setTextInput(true,0,y1,1,1) + end end function inputBox:keypress(k) - local t=self.value - if #t>0 and EDITING==""then - if k=="backspace"then - local p=#t - while t:byte(p)>=128 and t:byte(p)<192 do - p=p-1 - end - t=sub(t,1,p-1) - SFX.play('lock') - elseif k=="delete"then - t="" - SFX.play('hold') - end - self.value=t - end + local t=self.value + if #t>0 and EDITING==""then + if k=="backspace"then + local p=#t + while t:byte(p)>=128 and t:byte(p)<192 do + p=p-1 + end + t=sub(t,1,p-1) + SFX.play('lock') + elseif k=="delete"then + t="" + SFX.play('hold') + end + self.value=t + end end function WIDGET.newInputBox(D)--name,x,y,w[,h][,font=30][,secret][,regex],hide - local _={ - name= D.name or"_", + local _={ + name= D.name or"_", - x= D.x, - y= D.y, - w= D.w, - h= D.h, + x= D.x, + y= D.y, + w= D.w, + h= D.h, - resCtr={ - D.x+D.w*.2,D.y, - D.x+D.w*.5,D.y, - D.x+D.w*.8,D.y, - }, + resCtr={ + D.x+D.w*.2,D.y, + D.x+D.w*.5,D.y, + D.x+D.w*.8,D.y, + }, - font= D.font or int(D.h/7-1)*5, - secret= D.secret==true, - regex= D.regex, - hideF= D.hideF, - hide= D.hide, - } - for k,v in next,inputBox do _[k]=v end - setmetatable(_,widgetMetatable) - return _ + font= D.font or int(D.h/7-1)*5, + secret=D.secret==true, + regex= D.regex, + hideF= D.hideF, + hide= D.hide, + } + for k,v in next,inputBox do _[k]=v end + setmetatable(_,widgetMetatable) + return _ end local textBox={ - type='textBox', - scrollPos=0,--Scroll-down-distance - sure=0,--Sure-timer for clear history + type='textBox', + scrollPos=0,--Scroll-down-distance + sure=0,--Sure-timer for clear history } function textBox:reset() - --haha nothing here, techmino is so fun! + --haha nothing here, techmino is so fun! end function textBox:setTexts(t) - self.texts=t - self.scrollPos=0 + self.texts=t + self.scrollPos=0 end function textBox:clear() - self.texts={} - self.scrollPos=0 - SFX.play('fall') + self.texts={} + self.scrollPos=0 + SFX.play('fall') end function textBox:isAbove(x,y) - return - x>self.x and - y>self.y and - xself.x and + y>self.y and + x0 then - self.sure=self.sure-1 - end + if self.sure>0 then + self.sure=self.sure-1 + end end function textBox:push(t) - ins(self.texts,t) - if self.scrollPos==(#self.texts-1-self.capacity)*self.lineH then--minus 1 for the new message - self.scrollPos=min(self.scrollPos+self.lineH,(#self.texts-self.capacity)*self.lineH) - end + ins(self.texts,t) + if self.scrollPos==(#self.texts-1-self.capacity)*self.lineH then--minus 1 for the new message + self.scrollPos=min(self.scrollPos+self.lineH,(#self.texts-self.capacity)*self.lineH) + end end function textBox:press(x,y) - if not(x and y)then return end - self:drag(0,0,0,0) - if not self.fix and x>self.x+self.w-40 and y0 then - self:clear() - self.sure=0 - else - self.sure=60 - end - end + if not(x and y)then return end + self:drag(0,0,0,0) + if not self.fix and x>self.x+self.w-40 and y0 then + self:clear() + self.sure=0 + else + self.sure=60 + end + end end function textBox:drag(_,_,_,dy) - self.scrollPos=max(0,min(self.scrollPos-dy,(#self.texts-self.capacity)*self.lineH)) + self.scrollPos=max(0,min(self.scrollPos-dy,(#self.texts-self.capacity)*self.lineH)) end function textBox:scroll(dir) - if type(dir)=='string'then - if dir=="up"then - dir=-1 - elseif dir=="down"then - dir=1 - else - return - end - end - self:drag(nil,nil,nil,-dir*self.lineH) + if type(dir)=='string'then + if dir=="up"then + dir=-1 + elseif dir=="down"then + dir=1 + else + return + end + end + self:drag(nil,nil,nil,-dir*self.lineH) end function textBox:arrowKey(k) - if k=="up"then - self:scroll(-1) - elseif k=="down"then - self:scroll(-1) - end + if k=="up"then + self:scroll(-1) + elseif k=="down"then + self:scroll(-1) + end end function textBox:draw() - local x,y,w,h=self.x,self.y,self.w,self.h - local texts=self.texts - local scrollPos=self.scrollPos - local cap=self.capacity - local lineH=self.lineH + local x,y,w,h=self.x,self.y,self.w,self.h + local texts=self.texts + local scrollPos=self.scrollPos + local cap=self.capacity + local lineH=self.lineH - --Background - gc_setColor(0,0,0,.4) - gc_rectangle('fill',x,y,w,h,3) + --Background + gc_setColor(0,0,0,.4) + gc_rectangle('fill',x,y,w,h,3) - --Frame - gc_setLineWidth(2) - gc_setColor(WIDGET.sel==self and COLOR.lN or COLOR.Z) - gc_rectangle('line',x,y,w,h,3) + --Frame + gc_setLineWidth(2) + gc_setColor(WIDGET.sel==self and COLOR.lN or COLOR.Z) + gc_rectangle('line',x,y,w,h,3) - --Texts - setFont(self.font) - gc_push('transform') - gc_translate(x,y) + --Texts + setFont(self.font) + gc_push('transform') + gc_translate(x,y) - --Slider - gc_setColor(1,1,1) - if #texts>cap then - local len=h*h/(#texts*lineH) - gc_rectangle('fill',-15,(h-len)*scrollPos/((#texts-cap)*lineH),12,len,3) - end + --Slider + gc_setColor(1,1,1) + if #texts>cap then + local len=h*h/(#texts*lineH) + gc_rectangle('fill',-15,(h-len)*scrollPos/((#texts-cap)*lineH),12,len,3) + end - --Clear button - if not self.fix then - gc_rectangle('line',w-40,0,40,40,3) - gc_draw(self.sure==0 and clearIcon or sureIcon,w-40,0) - end + --Clear button + if not self.fix then + gc_rectangle('line',w-40,0,40,40,3) + gc_draw(self.sure==0 and clearIcon or sureIcon,w-40,0) + end - gc_setStencilTest('equal',1) - STW,STH=w,h - gc_stencil(_rectangleStencil) - gc_translate(0,-(scrollPos%lineH)) - local pos=int(scrollPos/lineH) - for i=pos+1,min(pos+cap+1,#texts)do - gc_printf(texts[i],10,4,w-16) - gc_translate(0,lineH) - end - gc_setStencilTest() - gc_pop() + gc_setStencilTest('equal',1) + STW,STH=w,h + gc_stencil(_rectangleStencil) + gc_translate(0,-(scrollPos%lineH)) + local pos=int(scrollPos/lineH) + for i=pos+1,min(pos+cap+1,#texts)do + gc_printf(texts[i],10,4,w-16) + gc_translate(0,lineH) + end + gc_setStencilTest() + gc_pop() end function textBox:getInfo() - return("x=%d,y=%d,w=%d,h=%d"):format(self.x+self.w*.5,self.y+self.h*.5,self.w,self.h) + return("x=%d,y=%d,w=%d,h=%d"):format(self.x+self.w*.5,self.y+self.h*.5,self.w,self.h) end function WIDGET.newTextBox(D)--name,x,y,w,h[,font=30][,lineH][,fix],hide - local _={ - name= D.name or"_", + local _={ + name= D.name or"_", - resCtr={ - D.x+D.w*.5,D.y+D.h*.5, - D.x+D.w*.5,D.y, - D.x-D.w*.5,D.y, - D.x,D.y+D.h*.5, - D.x,D.y-D.h*.5, - D.x,D.y, - D.x+D.w,D.y, - D.x,D.y+D.h, - D.x+D.w,D.y+D.h, - }, + resCtr={ + D.x+D.w*.5,D.y+D.h*.5, + D.x+D.w*.5,D.y, + D.x-D.w*.5,D.y, + D.x,D.y+D.h*.5, + D.x,D.y-D.h*.5, + D.x,D.y, + D.x+D.w,D.y, + D.x,D.y+D.h, + D.x+D.w,D.y+D.h, + }, - x= D.x, - y= D.y, - w= D.w, - h= D.h, + x= D.x, + y= D.y, + w= D.w, + h= D.h, - font= D.font or 30, - fix= D.fix, - texts= {}, - hideF= D.hideF, - hide= D.hide, - } - _.lineH=D.lineH or _.font*7/5 - _.capacity=ceil((D.h-10)/_.lineH) + font= D.font or 30, + fix= D.fix, + texts={}, + hideF=D.hideF, + hide= D.hide, + } + _.lineH=D.lineH or _.font*7/5 + _.capacity=ceil((D.h-10)/_.lineH) - for k,v in next,textBox do _[k]=v end - setmetatable(_,widgetMetatable) - return _ + for k,v in next,textBox do _[k]=v end + setmetatable(_,widgetMetatable) + return _ end local listBox={ - type='listBox', - keepFocus=true, - scrollPos=0,--Scroll-down-distance - selected=0,--Hidden wheel move value + type='listBox', + keepFocus=true, + scrollPos=0,--Scroll-down-distance + selected=0,--Hidden wheel move value } function listBox:reset() - --haha nothing here too, techmino is really fun! + --haha nothing here too, techmino is really fun! end function listBox:clear() - self.list={} - self.scrollPos=0 + self.list={} + self.scrollPos=0 end function listBox:setList(t) - self.list=t - self.selected=1 - self.scrollPos=0 + self.list=t + self.selected=1 + self.scrollPos=0 end function listBox:getList() - return self.list + return self.list end function listBox:getLen() - return #self.list + return #self.list end function listBox:getSel() - return self.list[self.selected] + return self.list[self.selected] end function listBox:isAbove(x,y) - return - x>self.x and - y>self.y and - xself.x and + y>self.y and + x0 then - rem(self.list) - listBox:drag(0,0,0,0) - end + if #self.list>0 then + rem(self.list) + listBox:drag(0,0,0,0) + end end function listBox:remove() - if self.selected then - rem(self.list,self.selected) - if not self.list[self.selected]then - self:arrowKey('up') - end - self:drag(0,0,0,0) - end + if self.selected then + rem(self.list,self.selected) + if not self.list[self.selected]then + self:arrowKey('up') + end + self:drag(0,0,0,0) + end end function listBox:press(x,y) - if not(x and y)then return end - x,y=x-self.x,y-self.y - if not(x and y and x>0 and y>0 and x<=self.w and y<=self.h)then return end - self:drag(0,0,0,0) - y=int((y+self.scrollPos)/self.lineH)+1 - if self.list[y]then - if self.selected~=y then - self.selected=y - SFX.play('click',.4) - end - end + if not(x and y)then return end + x,y=x-self.x,y-self.y + if not(x and y and x>0 and y>0 and x<=self.w and y<=self.h)then return end + self:drag(0,0,0,0) + y=int((y+self.scrollPos)/self.lineH)+1 + if self.list[y]then + if self.selected~=y then + self.selected=y + SFX.play('click',.4) + end + end end function listBox:drag(_,_,_,dy) - self.scrollPos=max(0,min(self.scrollPos-dy,(#self.list-self.capacity)*self.lineH)) + self.scrollPos=max(0,min(self.scrollPos-dy,(#self.list-self.capacity)*self.lineH)) end function listBox:scroll(n) - self:drag(nil,nil,nil,-n*self.lineH) + self:drag(nil,nil,nil,-n*self.lineH) end function listBox:arrowKey(dir) - if dir=="up"then - self.selected=max(self.selected-1,1) - if self.selectedint(self.scrollPos/self.lineH)+self.capacity-1 then - self:drag(nil,nil,nil,-self.lineH) - end - end + if dir=="up"then + self.selected=max(self.selected-1,1) + if self.selectedint(self.scrollPos/self.lineH)+self.capacity-1 then + self:drag(nil,nil,nil,-self.lineH) + end + end end function listBox:draw() - local x,y,w,h=self.x,self.y,self.w,self.h - local list=self.list - local scrollPos=self.scrollPos - local cap=self.capacity - local lineH=self.lineH + local x,y,w,h=self.x,self.y,self.w,self.h + local list=self.list + local scrollPos=self.scrollPos + local cap=self.capacity + local lineH=self.lineH - gc_push('transform') - gc_translate(x,y) + gc_push('transform') + gc_translate(x,y) - --Frame - gc_setColor(WIDGET.sel==self and COLOR.lN or COLOR.Z) - gc_setLineWidth(2) - gc_rectangle('line',0,0,w,h,3) + --Frame + gc_setColor(WIDGET.sel==self and COLOR.lN or COLOR.Z) + gc_setLineWidth(2) + gc_rectangle('line',0,0,w,h,3) - --Slider - if #list>cap then - gc_setColor(1,1,1) - local len=h*h/(#list*lineH) - gc_rectangle('fill',-15,(h-len)*scrollPos/((#list-cap)*lineH),12,len,3) - end + --Slider + if #list>cap then + gc_setColor(1,1,1) + local len=h*h/(#list*lineH) + gc_rectangle('fill',-15,(h-len)*scrollPos/((#list-cap)*lineH),12,len,3) + end - --List - gc_setStencilTest('equal',1) - STW,STH=w,h - gc_stencil(_rectangleStencil) - local pos=int(scrollPos/lineH) - gc_translate(0,-(scrollPos%lineH)) - for i=pos+1,min(pos+cap+1,#list)do - self.drawF(list[i],i,i==self.selected) - gc_translate(0,lineH) - end - gc_setStencilTest() - gc_pop() + --List + gc_setStencilTest('equal',1) + STW,STH=w,h + gc_stencil(_rectangleStencil) + local pos=int(scrollPos/lineH) + gc_translate(0,-(scrollPos%lineH)) + for i=pos+1,min(pos+cap+1,#list)do + self.drawF(list[i],i,i==self.selected) + gc_translate(0,lineH) + end + gc_setStencilTest() + gc_pop() end function listBox:getInfo() - return("x=%d,y=%d,w=%d,h=%d"):format(self.x+self.w*.5,self.y+self.h*.5,self.w,self.h) + return("x=%d,y=%d,w=%d,h=%d"):format(self.x+self.w*.5,self.y+self.h*.5,self.w,self.h) end function WIDGET.newListBox(D)--name,x,y,w,h,lineH[,hideF][,hide][,drawF] - local _={ - name= D.name or"_", + local _={ + name= D.name or"_", - resCtr={ - D.x+D.w*.5,D.y+D.h*.5, - D.x+D.w*.5,D.y, - D.x-D.w*.5,D.y, - D.x,D.y+D.h*.5, - D.x,D.y-D.h*.5, - D.x,D.y, - D.x+D.w,D.y, - D.x,D.y+D.h, - D.x+D.w,D.y+D.h, - }, + resCtr={ + D.x+D.w*.5,D.y+D.h*.5, + D.x+D.w*.5,D.y, + D.x-D.w*.5,D.y, + D.x,D.y+D.h*.5, + D.x,D.y-D.h*.5, + D.x,D.y, + D.x+D.w,D.y, + D.x,D.y+D.h, + D.x+D.w,D.y+D.h, + }, - x= D.x, - y= D.y, - w= D.w, - h= D.h, + x= D.x, + y= D.y, + w= D.w, + h= D.h, - list= {}, - lineH= D.lineH, - capacity=ceil(D.h/D.lineH), - drawF= D.drawF, - hideF= D.hideF, - hide= D.hide, - } + list= {}, + lineH= D.lineH, + capacity=ceil(D.h/D.lineH), + drawF= D.drawF, + hideF= D.hideF, + hide= D.hide, + } - for k,v in next,listBox do _[k]=v end - setmetatable(_,widgetMetatable) - return _ + for k,v in next,listBox do _[k]=v end + setmetatable(_,widgetMetatable) + return _ end WIDGET.active={}--Table contains all active widgets @@ -1238,271 +1238,271 @@ WIDGET.scrollHeight=0--Max drag height, not actual container height! WIDGET.scrollPos=0--Current scroll position WIDGET.sel=false--Selected widget WIDGET.indexMeta={ - __index=function(L,k) - for i=1,#L do - if L[i].name==k then - return L[i] - end - end - end + __index=function(L,k) + for i=1,#L do + if L[i].name==k then + return L[i] + end + end + end } function WIDGET.setWidgetList(list) - WIDGET.unFocus(true) - WIDGET.active=list or NONE - WIDGET.cursorMove(SCR.xOy:inverseTransformPoint(love.mouse.getPosition())) + WIDGET.unFocus(true) + WIDGET.active=list or NONE + WIDGET.cursorMove(SCR.xOy:inverseTransformPoint(love.mouse.getPosition())) - --Reset all widgets - if list then - for i=1,#list do - list[i]:reset() - end - if SCN.cur~='custom_field'then - local colorList=THEME.getThemeColor() - if not colorList then return end - local rnd=math.random - for _,W in next,list do - if W.color and not W.fText then - W.color=colorList[rnd(#colorList)] - end - end - end - end + --Reset all widgets + if list then + for i=1,#list do + list[i]:reset() + end + if SCN.cur~='custom_field'then + local colorList=THEME.getThemeColor() + if not colorList then return end + local rnd=math.random + for _,W in next,list do + if W.color and not W.fText then + W.color=colorList[rnd(#colorList)] + end + end + end + end end function WIDGET.setScrollHeight(height) - WIDGET.scrollHeight=height and height or 0 - WIDGET.scrollPos=0 + WIDGET.scrollHeight=height and height or 0 + WIDGET.scrollPos=0 end function WIDGET.setLang(widgetText) - for S,L in next,SCN.scenes do - if L.widgetList then - for _,W in next,L.widgetList do - local t=W.fText or widgetText[S][W.name] - if not t and W.mustHaveText then - t=W.name or"##" - W.color=COLOR.dV - end - if type(t)=='string'and W.font then - t=gc.newText(getFont(W.font),t) - end - W.obj=t - end - end - end + for S,L in next,SCN.scenes do + if L.widgetList then + for _,W in next,L.widgetList do + local t=W.fText or widgetText[S][W.name] + if not t and W.mustHaveText then + t=W.name or"##" + W.color=COLOR.dV + end + if type(t)=='string'and W.font then + t=gc.newText(getFont(W.font),t) + end + W.obj=t + end + end + end end function WIDGET.getSelected() - return WIDGET.sel + return WIDGET.sel end function WIDGET.isFocus(W) - if W then - return W and WIDGET.sel==W - else - return WIDGET.sel~=false - end + if W then + return W and WIDGET.sel==W + else + return WIDGET.sel~=false + end end function WIDGET.focus(W) - if WIDGET.sel==W then return end - if WIDGET.sel and WIDGET.sel.type=='inputBox'then - kb.setTextInput(false) - EDITING="" - end - WIDGET.sel=W - if W and W.type=='inputBox'then - local _,y1=xOy:transformPoint(0,W.y+W.h) - kb.setTextInput(true,0,y1,1,1) - end + if WIDGET.sel==W then return end + if WIDGET.sel and WIDGET.sel.type=='inputBox'then + kb.setTextInput(false) + EDITING="" + end + WIDGET.sel=W + if W and W.type=='inputBox'then + local _,y1=xOy:transformPoint(0,W.y+W.h) + kb.setTextInput(true,0,y1,1,1) + end end function WIDGET.unFocus(force) - local W=WIDGET.sel - if W and(force or not W.keepFocus)then - if W.type=='inputBox'then - kb.setTextInput(false) - EDITING="" - end - WIDGET.sel=false - end + local W=WIDGET.sel + if W and(force or not W.keepFocus)then + if W.type=='inputBox'then + kb.setTextInput(false) + EDITING="" + end + WIDGET.sel=false + end end function WIDGET.cursorMove(x,y) - for _,W in next,WIDGET.active do - if not W.hide and W.resCtr and W:isAbove(x,y+WIDGET.scrollPos)then - WIDGET.focus(W) - return - end - end - if WIDGET.sel and not WIDGET.sel.keepFocus then - WIDGET.unFocus() - end + for _,W in next,WIDGET.active do + if not W.hide and W.resCtr and W:isAbove(x,y+WIDGET.scrollPos)then + WIDGET.focus(W) + return + end + end + if WIDGET.sel and not WIDGET.sel.keepFocus then + WIDGET.unFocus() + end end function WIDGET.press(x,y,k) - local W=WIDGET.sel - if W then - W:press(x,y and y+WIDGET.scrollPos,k) - if W.hide then WIDGET.unFocus()end - end + local W=WIDGET.sel + if W then + W:press(x,y and y+WIDGET.scrollPos,k) + if W.hide then WIDGET.unFocus()end + end end function WIDGET.drag(x,y,dx,dy) - if WIDGET.sel then - local W=WIDGET.sel - if W.drag then - W:drag(x,y+WIDGET.scrollPos,dx,dy) - elseif not W:isAbove(x,y+WIDGET.scrollPos)then - WIDGET.unFocus(true) - end - else - WIDGET.scrollPos=max(min(WIDGET.scrollPos-dy,WIDGET.scrollHeight),0) - end + if WIDGET.sel then + local W=WIDGET.sel + if W.drag then + W:drag(x,y+WIDGET.scrollPos,dx,dy) + elseif not W:isAbove(x,y+WIDGET.scrollPos)then + WIDGET.unFocus(true) + end + else + WIDGET.scrollPos=max(min(WIDGET.scrollPos-dy,WIDGET.scrollHeight),0) + end end function WIDGET.release(x,y) - local W=WIDGET.sel - if W and W.release then - W:release(x,y+WIDGET.scrollPos) - end + local W=WIDGET.sel + if W and W.release then + W:release(x,y+WIDGET.scrollPos) + end end function WIDGET.keyPressed(k,isRep) - local W=WIDGET.sel - if k=="space"or k=="return"then - if not isRep then - WIDGET.press() - end - elseif k=="up"or k=="down"or k=="left"or k=="right"then - if kb.isDown("lshift","lalt","lctrl")then - --Control some widgets with arrowkeys when hold shift/ctrl/alt - if W and W.arrowKey then W:arrowKey(k)end - else - if not W then - for _,w in next,WIDGET.active do - if not w.hide and w.isAbove then - WIDGET.focus(w) - return - end - end - elseif W.getCenter then - local WX,WY=W:getCenter() - local dir=(k=="right"or k=="down")and 1 or -1 - local tar - local minDist=1e99 - local swap_xy=k=="up"or k=="down" - if swap_xy then WX,WY=WY,WX end -- note that we do not swap them back later - for _,W1 in ipairs(WIDGET.active)do - if W~=W1 and W1.resCtr and not W1.hide then - local L=W1.resCtr - for j=1,#L,2 do - local x,y=L[j],L[j+1] - if swap_xy then x,y=y,x end -- note that we do not swap them back later - local dist=(x-WX)*dir - if dist>10 then - dist=dist+abs(y-WY)*6.26 - if dist10 then + dist=dist+abs(y-WY)*6.26 + if dist0 and p-1)or p.18 then - W.lastTime=TIME() - W.change() - end - end - end - elseif i=="dpup"or i=="dpdown"or i=="dpleft"or i=="dpright"then - WIDGET.keyPressed(keyMirror[i]) - end + if i=="start"then + WIDGET.press() + elseif i=="a"or i=="b"then + local W=WIDGET.sel + if W then + if W.type=='button'or W.type=='key'then + WIDGET.press() + elseif W.type=='slider'then + local p=W.disp() + local P=i=="left"and(p>0 and p-1)or p.18 then + W.lastTime=TIME() + W.change() + end + end + end + elseif i=="dpup"or i=="dpdown"or i=="dpleft"or i=="dpright"then + WIDGET.keyPressed(keyMirror[i]) + end end function WIDGET.update() - for _,W in next,WIDGET.active do - if W.hideF then - W.hide=W.hideF() - if W.hide and W==WIDGET.sel then - WIDGET.unFocus(true) - end - end - if W.update then W:update()end - end + for _,W in next,WIDGET.active do + if W.hideF then + W.hide=W.hideF() + if W.hide and W==WIDGET.sel then + WIDGET.unFocus(true) + end + end + if W.update then W:update()end + end end local widgetCanvas local widgetCover do - local L={1,360,{'fRect',0,30,1,300}} - for i=0,30 do - ins(L,{'setCL',1,1,1,i/30}) - ins(L,{'fRect',0,i,1,2}) - ins(L,{'fRect',0,360-i,1,2}) - end - widgetCover=GC.DO(L) + local L={1,360,{'fRect',0,30,1,300}} + for i=0,30 do + ins(L,{'setCL',1,1,1,i/30}) + ins(L,{'fRect',0,i,1,2}) + ins(L,{'fRect',0,360-i,1,2}) + end + widgetCover=GC.DO(L) end local scr_w,scr_h function WIDGET.resize(w,h) - scr_w,scr_h=w,h - widgetCanvas=gc.newCanvas(w,h) + scr_w,scr_h=w,h + widgetCanvas=gc.newCanvas(w,h) end function WIDGET.draw() - gc_setCanvas({stencil=true},widgetCanvas) - gc_translate(0,-WIDGET.scrollPos) - for _,W in next,WIDGET.active do - if not W.hide then W:draw()end - end - gc_origin() - gc_setColor(1,1,1) - if WIDGET.scrollHeight>0 then - if WIDGET.scrollPos>0 then - gc_draw(upArrowIcon,scr_w*.5,10,0,SCR.k,nil,upArrowIcon:getWidth()*.5,0) - end - if WIDGET.scrollPos0 then + if WIDGET.scrollPos>0 then + gc_draw(upArrowIcon,scr_w*.5,10,0,SCR.k,nil,upArrowIcon:getWidth()*.5,0) + end + if WIDGET.scrollPos - BuildMachineOSBuild - 19B88 - CFBundleDevelopmentRegion - English - CFBundleExecutable - love - CFBundleIconFile - iconfile - CFBundleIdentifier - org.love2d.MrZ.Techmino - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - Techmino - CFBundlePackageType - APPL - CFBundleShortVersionString - @versionName - CFBundleSignature - LoVe - CFBundleSupportedPlatforms - - MacOSX - - DTCompiler - com.apple.compilers.llvm.clang.1_0 - DTPlatformBuild - 11C504 - DTPlatformVersion - GM - DTSDKBuild - 19B90 - DTSDKName - macosx10.15 - DTXcode - 1130 - DTXcodeBuild - 11C504 - LSApplicationCategoryType - public.app-category.games - LSMinimumSystemVersion - 10.7 - NSHighResolutionCapable - - NSHumanReadableCopyright - ©2020-@thisYear 26F Studio, GNU LGPLv3.0 - NSPrincipalClass - NSApplication - NSSupportsAutomaticGraphicsSwitching - + BuildMachineOSBuild + 19B88 + CFBundleDevelopmentRegion + English + CFBundleExecutable + love + CFBundleIconFile + iconfile + CFBundleIdentifier + org.love2d.MrZ.Techmino + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Techmino + CFBundlePackageType + APPL + CFBundleShortVersionString + @versionName + CFBundleSignature + LoVe + CFBundleSupportedPlatforms + + MacOSX + + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 11C504 + DTPlatformVersion + GM + DTSDKBuild + 19B90 + DTSDKName + macosx10.15 + DTXcode + 1130 + DTXcodeBuild + 11C504 + LSApplicationCategoryType + public.app-category.games + LSMinimumSystemVersion + 10.7 + NSHighResolutionCapable + + NSHumanReadableCopyright + ©2020-@thisYear 26F Studio, GNU LGPLv3.0 + NSPrincipalClass + NSApplication + NSSupportsAutomaticGraphicsSwitching + \ No newline at end of file diff --git a/conf.lua b/conf.lua index 35422c04..ca1b1826 100644 --- a/conf.lua +++ b/conf.lua @@ -1,35 +1,35 @@ function love.conf(t) - t.identity='Techmino'--Saving folder - t.version="11.1" - t.gammacorrect=false - t.appendidentity=true--Search files in source then in save directory - t.accelerometerjoystick=false--Accelerometer=joystick on ios/android - if t.audio then - t.audio.mic=false - t.audio.mixwithsystem=true - end + t.identity='Techmino'--Saving folder + t.version="11.1" + t.gammacorrect=false + t.appendidentity=true--Search files in source then in save directory + t.accelerometerjoystick=false--Accelerometer=joystick on ios/android + if t.audio then + t.audio.mic=false + t.audio.mixwithsystem=true + end - local W=t.window - W.title="Techmino "..require"version".string - W.icon="media/image/icon.png" - W.width,W.height=1280,720 - W.minwidth,W.minheight=640,360 - W.borderless=false - W.resizable=true - W.fullscreen=false - W.vsync=0--Unlimited FPS - W.msaa=0--Multi-sampled antialiasing - W.depth=0--Bits/samp of depth buffer - W.stencil=1--Bits/samp of stencil buffer - W.display=1--Monitor ID - W.highdpi=true--High-dpi mode for the window on a Retina display - W.x,W.y=nil + local W=t.window + W.title="Techmino "..require"version".string + W.icon="media/image/icon.png" + W.width,W.height=1280,720 + W.minwidth,W.minheight=640,360 + W.borderless=false + W.resizable=true + W.fullscreen=false + W.vsync=0--Unlimited FPS + W.msaa=0--Multi-sampled antialiasing + W.depth=0--Bits/samp of depth buffer + W.stencil=1--Bits/samp of stencil buffer + W.display=1--Monitor ID + W.highdpi=true--High-dpi mode for the window on a Retina display + W.x,W.y=nil - local M=t.modules - M.window,M.system,M.event,M.thread=true,true,true,true - M.timer,M.math,M.data=true,true,true - M.video,M.audio,M.sound=true,true,true - M.graphics,M.font,M.image=true,true,true - M.mouse,M.touch,M.keyboard,M.joystick=true,true,true,true - M.physics=false + local M=t.modules + M.window,M.system,M.event,M.thread=true,true,true,true + M.timer,M.math,M.data=true,true,true + M.video,M.audio,M.sound=true,true,true + M.graphics,M.font,M.image=true,true,true + M.mouse,M.touch,M.keyboard,M.joystick=true,true,true,true + M.physics=false end diff --git a/document/mode.txt b/document/mode.txt index e0f52a1e..011173dd 100644 --- a/document/mode.txt +++ b/document/mode.txt @@ -1,158 +1,158 @@ 模式文件应当是一个合(语)法的lua程序文件,其必须返回一个table,里面的内容包括: - color: - 必选 - 模式的颜色,用于点击地图图标后显示的提示文本 - env: - 必选 - 模式环境变量,决定了关卡的各项属性 - *属性名* *默认值* *说明* - drop 60 下落延迟(帧,支持自然数和2的整数次幂) - lock 60 锁定延迟(帧) - wait 0 出块延迟(帧) - fall 0 消行延迟(帧) - bone false 是否开启骨块模式 - fieldH 20 场地高度 - heightLimit 1e99 允许的最大场地高度 - nextCount 6 显示next个数 - nextStartPos 1 next从第几个开始显示 - holdCount 1 hold个数 - infHold false 是否能无限hold - phyHold false 是否开启物理hold - ospin true 是否能O-spin - deepDrop false 是否开启深降 - RS 'TRS' 旋转系统名 + color: + 必选 + 模式的颜色,用于点击地图图标后显示的提示文本 + env: + 必选 + 模式环境变量,决定了关卡的各项属性 + *属性名* *默认值* *说明* + drop 60 下落延迟(帧,支持自然数和2的整数次幂) + lock 60 锁定延迟(帧) + wait 0 出块延迟(帧) + fall 0 消行延迟(帧) + bone false 是否开启骨块模式 + fieldH 20 场地高度 + heightLimit 1e99 允许的最大场地高度 + nextCount 6 显示next个数 + nextStartPos 1 next从第几个开始显示 + holdCount 1 hold个数 + infHold false 是否能无限hold + phyHold false 是否开启物理hold + ospin true 是否能O-spin + deepDrop false 是否开启深降 + RS 'TRS' 旋转系统名 - das 10 DAS - arr 2 ARR - sddas 2 软降DAS - sdarr 2 软降ARR - mindas 0 允许的最小DAS - minarr 0 允许的最小ARR - minsdarr 0 允许的最小软降ARR - ihs true 提前Hold - irs true 提前旋转 - ims true 提前移动 + das 10 DAS + arr 2 ARR + sddas 2 软降DAS + sdarr 2 软降ARR + mindas 0 允许的最小DAS + minarr 0 允许的最小ARR + minsdarr 0 允许的最小软降ARR + ihs true 提前Hold + irs true 提前旋转 + ims true 提前移动 - skinSet [设置] 方块贴图,只能填写内置皮肤的名字 - skin [设置] 方块颜色,包含25个整数(1~16)的table - face [设置] 方块朝向,包含25个整数(0~3)的table + skinSet [设置] 方块贴图,只能填写内置皮肤的名字 + skin [设置] 方块颜色,包含25个整数(1~16)的table + face [设置] 方块朝向,包含25个整数(0~3)的table - block true 是否显示方块 - ghost 0.3 影子透明度(0~1) - center 1 旋转中心透明度(0~1) - smooth false 是否平滑下落 - grid 0.16 网格透明度(0~1) - bagLine true 是否显示包分界线(如果存在) - lockFX 2 锁定特效等级(0~5整数) - dropFX 2 瞬间下落特效等级(0~5整数) - moveFX 2 移动特效等级(0~5整数) - clearFX 2 消除特效等级(0~5整数) - splashFX 2 溅射特效等级(0~5整数) - shakeFX 2 晃动特效等级(0~5整数) - atkFX 2 攻击特效等级(0~5整数) + block true 是否显示方块 + ghost 0.3 影子透明度(0~1) + center 1 旋转中心透明度(0~1) + smooth false 是否平滑下落 + grid 0.16 网格透明度(0~1) + bagLine true 是否显示包分界线(如果存在) + lockFX 2 锁定特效等级(0~5整数) + dropFX 2 瞬间下落特效等级(0~5整数) + moveFX 2 移动特效等级(0~5整数) + clearFX 2 消除特效等级(0~5整数) + splashFX 2 溅射特效等级(0~5整数) + shakeFX 2 晃动特效等级(0~5整数) + atkFX 2 攻击特效等级(0~5整数) - text true 是否显示消行文本 - score true 是否显示落块分数 - highCam false 是否开启超屏视野 - nextPos false 是否开启生成预览 - showSpike false 是否开启spike计数器 + text true 是否显示消行文本 + score true 是否显示落块分数 + highCam false 是否开启超屏视野 + nextPos false 是否开启生成预览 + showSpike false 是否开启spike计数器 - hideBoard false 场地隐藏模式("down"|"up"|"all") - flipBoard false 场地翻转模式("U-D"|"L-R"|"180") + hideBoard false 场地隐藏模式("down"|"up"|"all") + flipBoard false 场地翻转模式("U-D"|"L-R"|"180") - sequence 'bag' 序列模式,是放一块后对next序列的刷新函数,可以使用默认的几个函数用字符串表示。也可以自己写一个,注意:使用协程技术 - seqData {1,2,3,4,5,6,7}序列模式使用的"包"数据(本质是生成序列用的数据,会作为参数传进上面那个叫sequence的序列生成函数,不一定是包) - mission false 包含任务的table,说明暂时略 + sequence bag' 序列模式,是放一块后对next序列的刷新函数,可以使用默认的几个函数用字符串表示。也可以自己写一个,注意:使用协程技术 + seqData {1,2,3,4,5,6,7}序列模式使用的"包"数据(本质是生成序列用的数据,会作为参数传进上面那个叫sequence的序列生成函数,不一定是包) + mission false 包含任务的table,说明暂时略 - life 0 生命数(复活次数) - garbageSpeed 1 垃圾行释放速度 - pushSpeed 3 垃圾行上涨速度 - noTele false 是否禁止10个高级按键 - visible 'show' 方块可见性,填写固定的几个字符串 - freshLimit 1e99 锁延刷新次数限制 - easyFresh true 是否使用简单锁延刷新规则 - bufferLimit 1e99 攻击缓冲行数上限 + life 0 生命数(复活次数) + garbageSpeed 1 垃圾行释放速度 + pushSpeed 3 垃圾行上涨速度 + noTele false 是否禁止10个高级按键 + visible 'show' 方块可见性,填写固定的几个字符串 + freshLimit 1e99 锁延刷新次数限制 + easyFresh true 是否使用简单锁延刷新规则 + bufferLimit 1e99 攻击缓冲行数上限 - fkey1 false 按下功能键1后执行的函数 - fkey2 false 按下功能键2后执行的函数 - keyCancel {} 包含禁止使用的按键的id,例如{1,2}就是禁止左移和右移 - fine [设置] 是否开启非极简提示音 - fineKill false 是否开启非极简即死 - b2bKill false 是否开启断b2b即死 - missionKill false 是否开启强制任务 - dropPiece NULL 放一块后要执行的函数,输入玩家对象 - task NULL 每帧会*继续执行*的函数,输入玩家对象,注意:使用协程技术 - noInitSZO false 是否禁止SZO块开局,如果禁止,开局序列会自动跳过最多连续五个SZO + fkey1 false 按下功能键1后执行的函数 + fkey2 false 按下功能键2后执行的函数 + keyCancel {} 包含禁止使用的按键的id,例如{1,2}就是禁止左移和右移 + fine [设置] 是否开启非极简提示音 + fineKill false 是否开启非极简即死 + b2bKill false 是否开启断b2b即死 + missionKill false 是否开启强制任务 + dropPiece NULL 放一块后要执行的函数,输入玩家对象 + task NULL 每帧会*继续执行*的函数,输入玩家对象,注意:使用协程技术 + noInitSZO false 是否禁止SZO块开局,如果禁止,开局序列会自动跳过最多连续五个SZO - bg 'none' 背景,只能填写内置背景的名字 - bgm 'race' 背景音乐名(或者列表随机,例如{'race','push'}),只能用内置音乐库的音乐名 - allowMod true 是否允许mod - load: - 必选 - 模式初始化函数,一般创建一个玩家即可 - 无输入 - 无输出 - mesDisp: - 必选 - 模式显示信息,是一个绘图函数,坐标系原点是玩家对象最左上角 - 输入玩家对象 - 无输出 + bg 'none' 背景,只能填写内置背景的名字 + bgm 'race' 背景音乐名(或者列表随机,例如{'race','push'}),只能用内置音乐库的音乐名 + allowMod true 是否允许mod + load: + 必选 + 模式初始化函数,一般创建一个玩家即可 + 无输入 + 无输出 + mesDisp: + 必选 + 模式显示信息,是一个绘图函数,坐标系原点是玩家对象最左上角 + 输入玩家对象 + 无输出 - score: - 可选(不填就没有分数保存和计算) - 一局打完后要存储的数据 - 输入玩家对象 - 输出游戏结束瞬间返回一个包含直接决定该模式成绩的数据table(会被强制加上date标签) + score: + 可选(不填就没有分数保存和计算) + 一局打完后要存储的数据 + 输入玩家对象 + 输出游戏结束瞬间返回一个包含直接决定该模式成绩的数据table(会被强制加上date标签) - scoreDisp: - 可选(模式不出现在地图上的时候不用写) - 是把score()存起来的table转换为字符串显示出来的函数 - 输入一个成绩table - 输出一个字符串 + scoreDisp: + 可选(模式不出现在地图上的时候不用写) + 是把score()存起来的table转换为字符串显示出来的函数 + 输入一个成绩table + 输出一个字符串 - comp: - 可选(没有score函数的时候不用写) - 是成绩table之间对比并排序的规则 - 输入两个成绩table - 输出[第一个是不是排在第二个前面]的布尔值(可以类比"小于"运算) + comp: + 可选(没有score函数的时候不用写) + 是成绩table之间对比并排序的规则 + 输入两个成绩table + 输出[第一个是不是排在第二个前面]的布尔值(可以类比"小于"运算) - getRank: - 可选,模式评级函数 - 是用于评价玩家表现的函数 - 输入玩家对象 - 输出0~5,0表示除了记录到排行榜外什么都不做;1/2/3/4/5表示D/C/B/A/S级,能解锁连接的模式,还会让模式图标在地图上显示不同的颜色 + getRank: + 可选,模式评级函数 + 是用于评价玩家表现的函数 + 输入玩家对象 + 输出0~5,0表示除了记录到排行榜外什么都不做;1/2/3/4/5表示D/C/B/A/S级,能解锁连接的模式,还会让模式图标在地图上显示不同的颜色 以下是40行的模式文件内容: //sprint_40l.lua return{--返回一个table,你也可以在之前定义一些常量或者函数什么的 - color=COLOR.green,--颜色 - env={--模式环境变量 - drop=60,lock=60, - dropPiece=function(P)if P.stat.row>=40 then P win('finish')end end, - bg='bg2',bgm='race', - }, - load=function()--模式加载函数,这里只生成了一个玩家,常用的单人模式可以不写,默认使用这个函数 - PLY.newPlayer(1)--1是玩家编号,默认用户控制1号玩家 - end, - mesDisp=function(P)--40行模式需要显示的信息 - setFont(55) - local r=40-P.stat.row - if r<0 then r=0 end - mStr(r,63,265)--把计算出来的剩余行数r显示出来 - PLY.draw.drawTargetLine(P,r)--使用自带的境界高度线绘制函数 - end, - score=function(P)return{P.stat.time,P.stat.piece}end,--游戏结束时需要保存的本局关键信息 - scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end,--把score返回的数据显示出来的方法 - comp=function(a,b)return a[1]=40 then P:win('finish')end end, + bg='bg2',bgm='race', + }, + load=function()--模式加载函数,这里只生成了一个玩家,常用的单人模式可以不写,默认使用这个函数 + PLY.newPlayer(1)--1是玩家编号,默认用户控制1号玩家 + end, + mesDisp=function(P)--40行模式需要显示的信息 + setFont(55) + local r=40-P.stat.row + if r<0 then r=0 end + mStr(r,63,265)--把计算出来的剩余行数r显示出来 + PLY.draw.drawTargetLine(P,r)--使用自带的境界高度线绘制函数 + end, + score=function(P)return{P.stat.time,P.stat.piece}end,--游戏结束时需要保存的本局关键信息 + scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end,--把score返回的数据显示出来的方法 + comp=function(a,b)return a[1]17 then v=17 end end - if - SETTING.RS=='ZRS'or SETTING.RS=='BRS'or - SETTING.RS=='ASCplus'or SETTING.RS=='C2sym' - then SETTING.RS='TRS'end - if SETTING.ghostType=='greyCell'then SETTING.ghostType='grayCell'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 fs.getInfo('conf/data')then + FIRSTLAUNCH=true + needSave=true + end + if type(STAT.version)~='number'then + STAT.version=0 + needSave=true + end + if STAT.version<1500 then + FILE.clear_s('') + end + if STAT.version<1505 then + fs.remove('record/bigbang.rec') + fs.remove('conf/replay') + end + if STAT.version==1506 then + local temp1,temp2 + if fs.getInfo('record/master_l.rec')then temp1=fs.read('record/master_l.rec')end + if fs.getInfo('record/master_u.rec')then temp2=fs.read('record/master_u.rec')end + if temp1 then fs.write('record/master_u.rec',temp1)end + if temp2 then fs.write('record/master_l.rec',temp2)end + RANKS.master_l,RANKS.master_u=RANKS.master_u,RANKS.master_l + if RANKS.tsd_u then RANKS.tsd_u=0 end + needSave=true + end + if STAT.version==1601 then + RANKS.round_e=nil + RANKS.round_n=nil + RANKS.round_h=nil + RANKS.round_l=nil + RANKS.round_u=nil + fs.remove('record/round_e.rec') + fs.remove('record/round_n.rec') + fs.remove('record/round_h.rec') + fs.remove('record/round_l.rec') + fs.remove('record/round_u.rec') + end + if RANKS.stack_20l then + RANKS.stack_20l=nil + RANKS.stack_40l=nil + RANKS.stack_100l=nil + fs.remove('record/stack_20l.rec') + fs.remove('record/stack_40l.rec') + fs.remove('record/stack_100l.rec') + end + if STAT.version~=VERSION.code then + STAT.version=VERSION.code + needSave=true + love.event.quit('restart') + end + SETTING.appLock=nil + SETTING.dataSaving=nil + 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 + if + SETTING.RS=='ZRS'or SETTING.RS=='BRS'or + SETTING.RS=='ASCplus'or SETTING.RS=='C2sym' + then SETTING.RS='TRS'end + if SETTING.ghostType=='greyCell'then SETTING.ghostType='grayCell'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 - for _,v in next,VK_org do v.color=nil end - if RANKS.infinite then RANKS.infinite=0 end - if RANKS.infinite_dig then RANKS.infinite_dig=0 end - if not RANKS.sprint_10l then RANKS.sprint_10l=0 end - if RANKS.master_l then RANKS.master_n,RANKS.master_l=RANKS.master_l needSave=true end - if RANKS.master_u then RANKS.master_h,RANKS.master_u=RANKS.master_u needSave=true end - for k in next,RANKS do - if type(k)=='number'then - RANKS[k]=nil - needSave=true - end - end - for k,v in next,oldModeNameTable do - if RANKS[k]then - RANKS[v]=RANKS[k] - RANKS[k]=nil - end - k='record/'..k - if fs.getInfo(k..'.dat')then - fs.write('record/'..v..'.rec',fs.read(k..'.dat')) - fs.remove(k..'.dat') - end - if fs.getInfo(k..'.rec')then - fs.write('record/'..v..'.rec',fs.read(k..'.rec')) - fs.remove(k..'.rec') - end - end + for _,v in next,VK_org do v.color=nil end + if RANKS.infinite then RANKS.infinite=0 end + if RANKS.infinite_dig then RANKS.infinite_dig=0 end + if not RANKS.sprint_10l then RANKS.sprint_10l=0 end + if RANKS.master_l then RANKS.master_n,RANKS.master_l=RANKS.master_l needSave=true end + if RANKS.master_u then RANKS.master_h,RANKS.master_u=RANKS.master_u needSave=true end + for k in next,RANKS do + if type(k)=='number'then + RANKS[k]=nil + needSave=true + end + end + for k,v in next,oldModeNameTable do + if RANKS[k]then + RANKS[v]=RANKS[k] + RANKS[k]=nil + end + k='record/'..k + if fs.getInfo(k..'.dat')then + fs.write('record/'..v..'.rec',fs.read(k..'.dat')) + fs.remove(k..'.dat') + end + if fs.getInfo(k..'.rec')then + fs.write('record/'..v..'.rec',fs.read(k..'.rec')) + fs.remove(k..'.rec') + end + end - if needSave then - saveStats() - saveProgress() - saveSettings() - end + if needSave then + saveStats() + saveProgress() + saveSettings() + end end --First start for phones if FIRSTLAUNCH and MOBILE then - SETTING.VKSwitch=true - SETTING.swap=false - SETTING.powerInfo=true - SETTING.cleanCanvas=true + SETTING.VKSwitch=true + SETTING.swap=false + SETTING.powerInfo=true + SETTING.cleanCanvas=true end --Apply system setting @@ -373,46 +373,46 @@ applySettings() --Load replays for _,fileName in next,fs.getDirectoryItems('replay')do - if fileName:sub(12,12):match("[a-zA-Z]")then - local date,mode,version,player,seed,setting,mod - local fileData=fs.read('replay/'..fileName) - date, fileData=STRING.readLine(fileData)date=date:gsub("[a-zA-Z]","") - mode, fileData=STRING.readLine(fileData)mode=oldModeNameTable[mode]or mode - version,fileData=STRING.readLine(fileData) - player, fileData=STRING.readLine(fileData)if player=="Local Player"then player="Stacker"end - local success - success,fileData=pcall(love.data.decompress,'string','zlib',fileData) - if not success then goto BREAK_cannotParse end - seed, fileData=STRING.readLine(fileData) - setting,fileData=STRING.readLine(fileData)setting=JSON.decode(setting) - mod, fileData=STRING.readLine(fileData)mod=JSON.decode(mod) - if - not setting or - not mod or - not mode or - #mode==0 - then goto BREAK_cannotParse end + if fileName:sub(12,12):match("[a-zA-Z]")then + local date,mode,version,player,seed,setting,mod + local fileData=fs.read('replay/'..fileName) + date, fileData=STRING.readLine(fileData)date=date:gsub("[a-zA-Z]","") + mode, fileData=STRING.readLine(fileData)mode=oldModeNameTable[mode]or mode + version,fileData=STRING.readLine(fileData) + player, fileData=STRING.readLine(fileData)if player=="Local Player"then player="Stacker"end + local success + success,fileData=pcall(love.data.decompress,'string','zlib',fileData) + if not success then goto BREAK_cannotParse end + seed, fileData=STRING.readLine(fileData) + setting,fileData=STRING.readLine(fileData)setting=JSON.decode(setting) + mod, fileData=STRING.readLine(fileData)mod=JSON.decode(mod) + if + not setting or + not mod or + not mode or + #mode==0 + then goto BREAK_cannotParse end - fs.remove('replay/'..fileName) - local newName=fileName:sub(1,10)..fileName:sub(15) - fs.write('replay/'..newName, - love.data.compress('string','zlib', - JSON.encode{ - date=date, - mode=mode, - version=version, - player=player, - seed=seed, - setting=setting, - mod=mod, - }.."\n".. - fileData - ) - ) - fileName=newName - end - ::BREAK_cannotParse:: - local rep=DATA.parseReplay('replay/'..fileName) - table.insert(REPLAY,rep) + fs.remove('replay/'..fileName) + local newName=fileName:sub(1,10)..fileName:sub(15) + fs.write('replay/'..newName, + love.data.compress('string','zlib', + JSON.encode{ + date=date, + mode=mode, + version=version, + player=player, + seed=seed, + setting=setting, + mod=mod, + }.."\n".. + fileData + ) + ) + fileName=newName + end + ::BREAK_cannotParse:: + local rep=DATA.parseReplay('replay/'..fileName) + table.insert(REPLAY,rep) end table.sort(REPLAY,function(a,b)return a.fileName>b.fileName end) \ No newline at end of file diff --git a/parts/RSlist.lua b/parts/RSlist.lua index 841467d9..2f964561 100644 --- a/parts/RSlist.lua +++ b/parts/RSlist.lua @@ -1,956 +1,956 @@ local defaultCenterTex=GC.DO{1,1}--No texture local defaultCenterPos={--For SRS-like RSs - --Tetromino - {[0]={0,1},{1,0},{1,1},{1,1}},--Z - {[0]={0,1},{1,0},{1,1},{1,1}},--S - {[0]={0,1},{1,0},{1,1},{1,1}},--L - {[0]={0,1},{1,0},{1,1},{1,1}},--J - {[0]={0,1},{1,0},{1,1},{1,1}},--T - {[0]={.5,.5},{.5,.5},{.5,.5},{.5,.5}},--O - {[0]={-.5,1.5},{1.5,-.5},{.5,1.5},{1.5,.5}},--I + --Tetromino + {[0]={0,1},{1,0},{1,1},{1,1}},--Z + {[0]={0,1},{1,0},{1,1},{1,1}},--S + {[0]={0,1},{1,0},{1,1},{1,1}},--L + {[0]={0,1},{1,0},{1,1},{1,1}},--J + {[0]={0,1},{1,0},{1,1},{1,1}},--T + {[0]={.5,.5},{.5,.5},{.5,.5},{.5,.5}},--O + {[0]={-.5,1.5},{1.5,-.5},{.5,1.5},{1.5,.5}},--I - --Pentomino - {[0]={1,1},{1,1},{1,1},{1,1}},--Z5 - {[0]={1,1},{1,1},{1,1},{1,1}},--S5 - {[0]={0,1},{1,0},{1,1},{1,1}},--P - {[0]={0,1},{1,0},{1,1},{1,1}},--Q - {[0]={1,1},{1,1},{1,1},{1,1}},--F - {[0]={1,1},{1,1},{1,1},{1,1}},--E - {[0]={1,1},{1,1},{1,1},{1,1}},--T5 - {[0]={0,1},{1,0},{1,1},{1,1}},--U - {[0]={.5,1.5},{.5,.5},{1.5,.5},{1.5,1.5}},--V - {[0]={1,1},{1,1},{1,1},{1,1}},--W - {[0]={1,1},{1,1},{1,1},{1,1}},--X - {[0]={.5,1.5},{1.5,.5},{.5,1.5},{1.5,.5}},--J5 - {[0]={.5,1.5},{1.5,.5},{.5,1.5},{1.5,.5}},--L5 - {[0]={.5,1.5},{1.5,.5},{.5,1.5},{1.5,.5}},--R - {[0]={.5,1.5},{1.5,.5},{.5,1.5},{1.5,.5}},--Y - {[0]={.5,1.5},{1.5,.5},{.5,1.5},{1.5,.5}},--N - {[0]={.5,1.5},{1.5,.5},{.5,1.5},{1.5,.5}},--H - {[0]={0,2},{2,0},{0,2},{2,0}},--I5 + --Pentomino + {[0]={1,1},{1,1},{1,1},{1,1}},--Z5 + {[0]={1,1},{1,1},{1,1},{1,1}},--S5 + {[0]={0,1},{1,0},{1,1},{1,1}},--P + {[0]={0,1},{1,0},{1,1},{1,1}},--Q + {[0]={1,1},{1,1},{1,1},{1,1}},--F + {[0]={1,1},{1,1},{1,1},{1,1}},--E + {[0]={1,1},{1,1},{1,1},{1,1}},--T5 + {[0]={0,1},{1,0},{1,1},{1,1}},--U + {[0]={.5,1.5},{.5,.5},{1.5,.5},{1.5,1.5}},--V + {[0]={1,1},{1,1},{1,1},{1,1}},--W + {[0]={1,1},{1,1},{1,1},{1,1}},--X + {[0]={.5,1.5},{1.5,.5},{.5,1.5},{1.5,.5}},--J5 + {[0]={.5,1.5},{1.5,.5},{.5,1.5},{1.5,.5}},--L5 + {[0]={.5,1.5},{1.5,.5},{.5,1.5},{1.5,.5}},--R + {[0]={.5,1.5},{1.5,.5},{.5,1.5},{1.5,.5}},--Y + {[0]={.5,1.5},{1.5,.5},{.5,1.5},{1.5,.5}},--N + {[0]={.5,1.5},{1.5,.5},{.5,1.5},{1.5,.5}},--H + {[0]={0,2},{2,0},{0,2},{2,0}},--I5 - --Trimino - {[0]={0,1},{1,0},{0,1},{1,0}},--I3 - {[0]={.5,.5},{.5,.5},{.5,.5},{.5,.5}},--C + --Trimino + {[0]={0,1},{1,0},{0,1},{1,0}},--I3 + {[0]={.5,.5},{.5,.5},{.5,.5},{.5,.5}},--C - --Domino - {[0]={-.5,.5},{.5,-.5},{.5,.5},{.5,.5}},--I2 + --Domino + {[0]={-.5,.5},{.5,-.5},{.5,.5},{.5,.5}},--I2 - --Dot - {[0]={0,0},{0,0},{0,0},{0,0}},--O1 + --Dot + {[0]={0,0},{0,0},{0,0},{0,0}},--O1 } local noKickSet,noKickSet_180 do - local Zero={{0,0}} - noKickSet={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero} - noKickSet_180={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero,[02]=Zero,[20]=Zero,[13]=Zero,[31]=Zero} + local Zero={{0,0}} + noKickSet={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero} + noKickSet_180={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero,[02]=Zero,[20]=Zero,[13]=Zero,[31]=Zero} end local function _strToVec(list) - for i,vecStr in next,list do - list[i]={tonumber(vecStr:sub(1,2)),tonumber(vecStr:sub(3,4))} - end - return list + for i,vecStr in next,list do + list[i]={tonumber(vecStr:sub(1,2)),tonumber(vecStr:sub(3,4))} + end + return list end --Use this if the block is centrosymmetry, *PTR!!! local function _centroSymSet(L) - L[23]=L[01]L[32]=L[10] - L[21]=L[03]L[12]=L[30] - L[20]=L[02]L[31]=L[13] + L[23]=L[01]L[32]=L[10] + L[21]=L[03]L[12]=L[30] + L[20]=L[02]L[31]=L[13] end --Use this to copy a symmetry set local function _flipList(O) - if not O then return end - local L={} - for i,s in next,O do - L[i]=string.char(88-s:byte())..s:sub(2) - end - return L + if not O then return end + local L={} + for i,s in next,O do + L[i]=string.char(88-s:byte())..s:sub(2) + end + return L end local function _reflect(a) - return{ - [03]=_flipList(a[01]), - [01]=_flipList(a[03]), - [30]=_flipList(a[10]), - [32]=_flipList(a[12]), - [23]=_flipList(a[21]), - [21]=_flipList(a[23]), - [10]=_flipList(a[30]), - [12]=_flipList(a[32]), - [02]=_flipList(a[02]), - [20]=_flipList(a[20]), - [31]=_flipList(a[13]), - [13]=_flipList(a[31]), - } + return{ + [03]=_flipList(a[01]), + [01]=_flipList(a[03]), + [30]=_flipList(a[10]), + [32]=_flipList(a[12]), + [23]=_flipList(a[21]), + [21]=_flipList(a[23]), + [10]=_flipList(a[30]), + [12]=_flipList(a[32]), + [02]=_flipList(a[02]), + [20]=_flipList(a[20]), + [31]=_flipList(a[13]), + [13]=_flipList(a[31]), + } end local TRS do - local OspinList={ - {111,5,2, 0,-1,0},{111,5,2,-1,-1,0},{111,5,0,-1, 0,0},--T - {333,5,2,-1,-1,0},{333,5,2, 0,-1,0},{333,5,0, 0, 0,0},--T - {313,1,2,-1, 0,0},{313,1,2, 0,-1,0},{313,1,2, 0, 0,0},--Z - {131,2,2, 0, 0,0},{131,2,2,-1,-1,0},{131,2,2,-1, 0,0},--S - {131,1,2,-1, 0,0},{131,1,2, 0,-1,0},{131,1,2, 0, 0,0},--Z(misOrder) - {313,2,2, 0, 0,0},{313,2,2,-1,-1,0},{313,2,2,-1, 0,0},--S(misOrder) - {331,3,2, 0,-1,0},--J(farDown) - {113,4,2,-1,-1,0},--L(farDown) - {113,3,2,-1,-1,0},{113,3,0, 0, 0,0},--J - {331,4,2, 0,-1,0},{331,4,0,-1, 0,0},--L - {222,7,2,-1, 0,2},{222,7,2,-2, 0,2},{222,7,2, 0, 0,2},--I - {222,7,0,-1, 1,1},{222,7,0,-2, 1,1},{222,7,0, 0, 1,1},--I(high) - {121,6,0, 1,-1,2},{112,6,0, 2,-1,2},{122,6,0, 1,-2,2},--O - {323,6,0,-1,-1,2},{332,6,0,-2,-1,2},{322,6,0,-1,-2,2},--O - }--{keys, ID, dir, dx, dy, freeLevel (0=immovable, 1=U/D-immovable, 2=free)} - local XspinList={ - {{ 1,-1},{ 1, 0},{ 1, 1},{ 1,-2},{ 1, 2}}, - {{ 0,-1},{ 0,-2},{ 0, 1},{ 0,-2},{ 0, 2}}, - {{-1,-1},{-1, 0},{-1, 1},{-1,-2},{-1, 2}}, - } - TRS={ - centerTex=GC.DO{10,10, - {'setCL',1,1,1,.4}, - {'fRect',1,1,8,8}, - {'setCL',1,1,1,.6}, - {'fRect',2,2,6,6}, - {'setCL',1,1,1,.8}, - {'fRect',3,3,4,4}, - {'setCL',1,1,1}, - {'fRect',4,4,2,2}, - }, - centerDisp=TABLE.new(true,29), - kickTable={ - { - [01]={'+0+0','-1+0','-1+1','+0-2','-1+2','+0+1'}, - [10]={'+0+0','+1+0','+1-1','+0+2','+1-2','+1-2'}, - [03]={'+0+0','+1+0','+1+1','+0-2','+1-1','+1-2'}, - [30]={'+0+0','-1+0','-1-1','+0+2','-1+2','+0-1'}, - [12]={'+0+0','+1+0','+1-1','+0+2','+1+2'}, - [21]={'+0+0','-1+0','-1+1','+0-2','-1-2'}, - [32]={'+0+0','-1+0','-1-1','+0+2','-1+2'}, - [23]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, - [02]={'+0+0','+1+0','-1+0','+0-1','+0+1'}, - [20]={'+0+0','-1+0','+1+0','+0+1','+0-1'}, - [13]={'+0+0','+0-1','+0+1','+0-2'}, - [31]={'+0+0','+0+1','+0-1','+0+2'}, - },--Z - false,--S - { - [01]={'+0+0','-1+0','-1+1','+1+0','+0-2','+1+1'}, - [10]={'+0+0','+1+0','+1-1','-1+0','+0+2','+1+2'}, - [03]={'+0+0','+1+0','+1+1','+0-2','+1-2','+1-1','+0+1'}, - [30]={'+0+0','-1+0','-1-1','+0+2','-1+2','+0-1','-1+1'}, - [12]={'+0+0','+1+0','+1-1','+1+1','-1+0','+0-1','+0+2','+1+2'}, - [21]={'+0+0','-1+0','-1+1','-1-1','+1+0','+0+1','+0-2','-1-2'}, - [32]={'+0+0','-1+0','-1-1','+1+0','+0+2','-1+2','-1+1'}, - [23]={'+0+0','+1+0','+1-1','-1+0','+1+1','+0-2','+1-2'}, - [02]={'+0+0','-1+0','+1+0','+0-1','+0+1'}, - [20]={'+0+0','+1+0','-1+0','+0+1','+0-1'}, - [13]={'+0+0','+0-1','+0+1','+1+0'}, - [31]={'+0+0','+0+1','+0-1','-1+0'}, - },--J - false,--L - { - [01]={'+0+0','-1+0','-1+1','+0-2','-1-2','+0+1'}, - [10]={'+0+0','+1+0','+1-1','+0+2','+1+2','+0-1'}, - [03]={'+0+0','+1+0','+1+1','+0-2','+1-2','+0+1'}, - [30]={'+0+0','-1+0','-1-1','+0+2','-1+2','+0-1'}, - [12]={'+0+0','+1+0','+1-1','+0-1','-1-1','+0+2','+1+2','+1+1'}, - [21]={'+0+0','-1+0','+0-2','-1-2','-1-1','+1+1'}, - [32]={'+0+0','-1+0','-1-1','+0-1','+1-1','+0+2','-1+2','-1+1'}, - [23]={'+0+0','+1+0','+0-2','+1-2','+1-1','-1+1'}, - [02]={'+0+0','-1+0','+1+0','+0+1'}, - [20]={'+0+0','+1+0','-1+0','+0-1'}, - [13]={'+0+0','+0-1','+0+1','+1+0','+0-2','+0+2'}, - [31]={'+0+0','+0-1','+0+1','-1+0','+0-2','+0+2'}, - },--T - function(P,d) - if P.gameEnv.easyFresh then - P:freshBlock('fresh') - end - if P.gameEnv.ospin then - local x,y=P.curX,P.curY - 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 SFX.play('rotatekick',nil,P:getCenterX()*.15)end - P.spinSeq=P.spinSeq%100*10+d - if P.spinSeq<100 then return end - for i=1,#OspinList do - local L=OspinList[i] - if P.spinSeq==L[1]then - local id,dir=L[2],L[3] - local bk=BLOCKS[id][dir] - x,y=P.curX+L[4],P.curY+L[5] - if - not P:ifoverlap(bk,x,y)and( - L[6]>0 or(P:ifoverlap(bk,x-1,y)and P:ifoverlap(bk,x+1,y)) - )and( - L[6]==2 or(P:ifoverlap(bk,x,y-1)and P:ifoverlap(bk,x,y+1)) - ) - then - local C=P.cur - C.id=id - C.bk=bk - P.curX,P.curY=x,y - P.cur.dir=dir - P.spinLast=2 - P.stat.rotate=P.stat.rotate+1 - P:freshBlock('move') - P.spinSeq=0 - return - end - end - end - else - if P.sound then SFX.play('rotate',nil,P:getCenterX()*.15)end - P.spinSeq=0 - end - else - if P.sound then SFX.play('rotate',nil,P:getCenterX()*.15)end - end - end,--O - { - [01]={'+0+0','+0+1','+1+0','-2+0','-2-1','+1+2'}, - [10]={'+0+0','+2+0','-1+0','-1-2','+2+1','+0+1'}, - [03]={'+0+0','+0+1','-1+0','+2+0','+2-1','-1+2'}, - [30]={'+0+0','-2+0','+1+0','+1-2','-2+1','+0+1'}, - [12]={'+0+0','-1+0','+2+0','+2-1','+0-1','-1+2'}, - [21]={'+0+0','-2+0','+1+0','+1-2','-2+1','+0+1'}, - [32]={'+0+0','+1+0','-2+0','-2-1','+0-1','+1+2'}, - [23]={'+0+0','+2+0','-1+0','-1-2','+2+1','+0+1'}, - [02]={'+0+0','-1+0','+1+0','+0-1','+0+1'}, - [20]={'+0+0','+1+0','-1+0','+0+1','+0-1'}, - [13]={'+0+0','+0-1','-1+0','+1+0','+0+1'}, - [31]={'+0+0','+0-1','+1+0','-1+0','+0+1'}, - },--I - { - [01]={'+0+0','+0+1','+1+1','-1+0','+0-3','+0+2','+0-2','+0+3','-1+2'}, - [10]={'+0+0','+0-1','-1-1','+1+0','+0-3','+0+2','+0-2','+0+3','+1-2'}, - [03]={'+0+0','+1+0','+0-3','+0+1','+0+2','+0+3','+1+2'}, - [30]={'+0+0','-1+0','+0+1','+0-2','+0-3','+0+3','-1-2'}, - },--Z5 - false,--S5 - { - [01]={'+0+0','-1+0','-1+1','+0-2','-1-2','-1-1','+0+1'}, - [10]={'+0+0','+1+0','+1-1','+0+2','+1+2','+0-1','+1+1'}, - [03]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, - [30]={'+0+0','-1+0','-1-1','+0+2','-1+2'}, - [12]={'+0+0','+1+0','+1-1','+0+2','+1+2','+1+1'}, - [21]={'+0+0','-1+0','-1-1','-1+1','+0-2','-1-2','-1-1'}, - [32]={'+0+0','-1+0','-1-1','-1+1','+0-1','+0+2','-1+2'}, - [23]={'+0+0','+1+0','+1+1','-1+0','+0-2','+1-2'}, - [02]={'+0+0','-1+0','+0-1','+0+1'}, - [20]={'+0+0','+1+0','+0+1','+0-1'}, - [13]={'+0+0','+1+0','+0+1','-1+0'}, - [31]={'+0+0','-1+0','+0-1','+1+0'}, - },--P - false,--Q - { - [01]={'+0+0','-1+0','+1+0','-1+1','+0-2','+0-3'}, - [10]={'+0+0','+1+0','+1-1','-1+0','+0+2','+0+3'}, - [03]={'+0+0','+1+0','+1-1','+0+1','+0-2','+0-3'}, - [30]={'+0+0','-1+1','+1+0','+0-1','+0+2','+0+3'}, - [12]={'+0+0','+1+0','+0-1','-1+0','+0+2'}, - [21]={'+0+0','-1+0','+0+1','+1+0','+0-2'}, - [32]={'+0+0','-1+0','+0+1','-1+1','+1+0','+0+2','-2+0'}, - [23]={'+0+0','+1+0','+1-1','+0-1','-1+0','+0-2','+2+0'}, - [02]={'+0+0','+1+0','-1+0','-1-1'}, - [20]={'+0+0','-1+0','+1+0','+1+1'}, - [13]={'+0+0','+0-1','-1+1','+0+1'}, - [31]={'+0+0','+0-1','+1-1','+0+1'}, - },--F - false,--E - { - [01]={'+0+0','+0-1','-1-1','+1+0','+1+1','+0-3','-1+0','+0+2','-1+2'}, - [10]={'+0+0','+1+0','+0-1','-1-1','+0-2','-1+1','+0-3','+1-2','+0+1'}, - [03]={'+0+0','+0-1','+1-1','-1+0','-1+1','+0-3','+1+0','+0+2','+1+2'}, - [30]={'+0+0','-1+0','+0-1','+1-1','+0-2','+1+1','+0-3','-1-2','+0+1'}, - [12]={'+0+0','+1+0','-1+0','+0-2','+0-3','+0+1','-1+1'}, - [21]={'+0+0','+1-1','-1+0','+1+0','+0-1','+0+2','+0+3'}, - [32]={'+0+0','-1+0','+1+0','+0-2','+0-3','+0+1','+1+1'}, - [23]={'+0+0','-1-1','+1+0','-1+0','+0-1','+0+2','+0+3'}, - [02]={'+0+0','+0-1','+0+1','+0+2'}, - [20]={'+0+0','+0-1','+0+1','+0-2'}, - [13]={'+0+0','+1+0','-1+1','-2+0'}, - [31]={'+0+0','-1+0','+1+1','+2+0'}, - },--T5 - { - [01]={'+0+0','-1+0','-1+1','+0-2','-1-2'}, - [10]={'+0+0','+1+0','+1-1','+0+2','+1+2'}, - [03]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, - [30]={'+0+0','-1+0','-1-1','+0-2','-1+2'}, - [12]={'+0+0','+1+0','+1-1','+1+1'}, - [21]={'+0+0','-1-1','-1+1','-1-1'}, - [32]={'+0+0','-1+0','-1-1','-1+1'}, - [23]={'+0+0','+1-1','+1+1','+1-1'}, - [02]={'+0+0','+0+1'}, - [20]={'+0+0','+0-1'}, - [13]={'+0+0','+0-1','+0+1','+1+0'}, - [31]={'+0+0','+0-1','+0+1','-1+0'}, - },--U - { - [01]={'+0+0','+0+1','-1+0','+0-2','-1-2'}, - [10]={'+0+0','+0+1','+1+0','+0-2','+1-2'}, - [03]={'+0+0','+0-1','+0+1','+0+2'}, - [30]={'+0+0','+0-1','+0+1','+0-2'}, - [12]={'+0+0','+0-1','+0+1'}, - [21]={'+0+0','+0-1','+0-2'}, - [32]={'+0+0','+1+0','-1+0'}, - [23]={'+0+0','-1+0','+1+0'}, - [02]={'+0+0','-1+1','+1-1'}, - [20]={'+0+0','+1-1','-1+1'}, - [13]={'+0+0','+1+1','-1-1'}, - [31]={'+0+0','-1-1','+1+1'}, - },--V - { - [01]={'+0+0','+0-1','-1+0','+1+0','+1-1','+0+2'}, - [10]={'+0+0','+0-1','-1-1','+0+1','+0-2','+1-2','+0+2'}, - [03]={'+0+0','+1+0','+1+1','+0-1','+0-2','+0-3','+1-1','+0+1','+0+2','+0+3'}, - [30]={'+0+0','-1+0','-1+1','+0-1','+0-2','+0-3','-1-1','+0+1','+0+2','+0+3'}, - [12]={'+0+0','+1+0','+0-1','-2+0','+1+1','-1+0','+0+1','-1-1'}, - [21]={'+0+0','-1+0','+0-1','+2+0','-1+1','+1+0','+0+1','+1-1'}, - [32]={'+0+0','+0-1','+1+0','+0+1','-1+0','-1-1','+0+2'}, - [23]={'+0+0','+0-1','+1-1','+0+1','+0-2','-1-2','+0+2'}, - [02]={'+0+0','+0-1','-1+0'}, - [20]={'+0+0','+0+1','+1+0'}, - [13]={'+0+0','+0+1','-1+0'}, - [31]={'+0+0','+0-1','+1+0'}, - },--W - function(P,d) - if P.type=='human'then SFX.play('rotate',nil,P:getCenterX()*.15)end - local kickData=XspinList[d] - for test=1,#kickData do - local x,y=P.curX+kickData[test][1],P.curY+kickData[test][2] - if not P:ifoverlap(P.cur.bk,x,y)then - P.curX,P.curY=x,y - P.spinLast=1 - P:freshBlock('move') - P.stat.rotate=P.stat.rotate+1 - return - end - end - P:freshBlock('fresh') - end,--X - { - [01]={'+0+0','-1+0','-1+1','+0-3','-1+1','-1+2','+0+1'}, - [10]={'+0+0','-1+0','+1-1','+0+3','+1-1','+1-2','+0+1'}, - [03]={'+0+0','+0-1','+1-1','-1+0','+1+1','+0-2','+1-2','+0-3','+1-3','-1+1'}, - [30]={'+0+0','+0+1','-1+1','+1+0','-1-1','+0+2','-1+2','+0+3','-1+3','+1-1'}, - [12]={'+0+0','+1+0','+1-1','+0-1','+1-2','+0-2','+1+1','-1+0','+0+2','+1+2'}, - [21]={'+0+0','-1+0','-1+1','+0+1','-1+2','+0+2','-1-1','+1+0','+0-2','-1-2'}, - [32]={'+0+0','-1+0','-1+1','-1-1','+1+0','+0+2','-1+2','+0-2'}, - [23]={'+0+0','+1+0','+1-1','+1+1','-1+0','+0-2','+1-2','+0+2'}, - [02]={'+0+0','+0-1','+1-1','-1+0','+2-1'}, - [20]={'+0+0','+0+1','-1+1','+1+0','-2+1'}, - [13]={'+0+0','-1+0','-1-1','+0+1','-1-2'}, - [31]={'+0+0','+1+0','+1+1','+0-1','+1+2'}, - },--J5 - false,--L5 - { - [01]={'+0+0','-1+0','-1+0','-1+1','+1+0','-1+2','-1-1','+0-3','+0+1'}, - [10]={'+0+0','-1+0','+1+0','+1-1','+1+0','+1-2','+1+1','+0+3','+0+1'}, - [03]={'+0+0','+0-1','+0+1','+1+0','+1-1','-1+0','+1+1','+0-2','+1-2','+0-3','+1-3','-1+1'}, - [30]={'+0+0','+0-1','+0+1','-1+0','-1+1','+1+0','-1-1','+0+2','-1+2','+0+3','-1+3','+1-1'}, - [12]={'+0+0','+1+0','+1-1','+0-1','+1-2','+0-2','+1+1','-1+0','+0+2','+1+2'}, - [21]={'+0+0','-1+0','-1+1','+0+1','-1+2','+0+2','-1-1','+1+0','+0-2','-1-2'}, - [32]={'+0+0','+0-1','-1+0','-1+1','-1-1','+1+0','+0+2','-1+2','+0-2'}, - [23]={'+0+0','+0+1','+1+0','+1-1','+1+1','-1+0','+0-2','+1-2','+0+2'}, - [02]={'+0+0','+0-1','+1-1','-1+0','+2-1','+0+1'}, - [20]={'+0+0','+0+1','-1+1','+1+0','-2+1','+0-1'}, - [13]={'+0+0','-1+0','-1-1','+0+1','-1-2'}, - [31]={'+0+0','+1+0','+1+1','+0-1','+1+2'}, - },--R - false,--Y - { - [01]={'+0+0','-1+0','-1+1','+0+1','+1+0','-1+2','-2+0','+0-2'}, - [10]={'+0+0','+1+0','-1+0','+0-1','+1-1','+1-2','+2+0','+0+2'}, - [03]={'+0+0','-1+0','+1-1','+0-2','+0-3','+1+0','+1-2','+1-3','+0+1','-1+1'}, - [30]={'+0+0','-1+0','+1-1','+1-2','+1+0','+0-2','+1-3','-1+2','+0+3','-1+3'}, - [12]={'+0+0','-1+0','+1-1','-1-1','+1-2','+1+0','+0-2','+1-3','-1+2','+0+3','-1+3'}, - [21]={'+0+0','-1+0','+1-1','+1+1','+0-2','+0-3','+1+0','+1-2','+1-3','+0+1','-1+1'}, - [32]={'+0+0','-1+0','+0-1','-1-2','+1-1','+1+0','+1+1','+0+2','+0+3'}, - [23]={'+0+0','+0-2','+0-3','+1+2','+1+0','+0+1','-1+1','+0-1','+0+2'}, - [02]={'+0+0','-1+0','+0+2','+0-1'}, - [20]={'+0+0','+1+0','+0-2','+0+1'}, - [13]={'+0+0','-1+0','-1-1','+0+1','+1+2'}, - [31]={'+0+0','+1+0','+1+1','+0-1','-1-2'}, - },--N - false,--H - { - [01]={'+0+0','+1-1','+1+0','+1+1','+0+1','-1+1','-1+0','-1-1','+0-1','+0-2','-2-1','-2-2','+2+0','+2-1','+2-2','+1+2','+2+2','-1+2','-2+2'}, - [10]={'+0+0','-1+0','-1-1','+0-1','+1-1','-2-2','-2-1','-2+0','-1-2','+0-2','+1-2','+2-2','-1+1','-2+1','-2+2','+1+0','+2+0','+2-1','+0+1','+1-1','+2-2'}, - [03]={'+0+0','-1-1','-1+0','-1+1','-0+1','+1+1','+1+0','+1-1','-0-1','-0-2','+2-1','+2-2','-2+0','-2-1','-2-2','-1+2','-2+2','+1+2','+2+2'}, - [30]={'+0+0','+1+0','+1-1','-0-1','-1-1','+2-2','+2-1','+2+0','+1-2','-0-2','-1-2','-2-2','+1+1','+2+1','+2+2','-1+0','-2+0','-2-1','+0+1','-1-1','-2-2'}, - },--I5 - { - [01]={'+0+0','-1+0','-1-1','+1+1','-1+1'}, - [10]={'+0+0','-1+0','+1+0','-1-1','+1+1'}, - [03]={'+0+0','+1+0','+1-1','-1+1','+1+1'}, - [30]={'+0+0','+1+0','-1+0','+1-1','-1+1'}, - },--I3 - { - [01]={'+0+0','-1+0','+1+0'}, - [10]={'+0+0','+1+0','-1+0'}, - [03]={'+0+0','+0+1','+0-1'}, - [30]={'+0+0','+0-1','+0+1'}, - [12]={'+0+0','+0+1','+0-1'}, - [21]={'+0+0','+0-1','+0+1'}, - [32]={'+0+0','-1+0','+1+0'}, - [23]={'+0+0','+1+0','-1+0'}, - [02]={'+0+0','+0-1','+1-1','-1-1'}, - [20]={'+0+0','+0+1','-1+1','+1+1'}, - [13]={'+0+0','+0-1','-1-1','+1-1'}, - [31]={'+0+0','+0+1','+1+1','-1+1'}, - },--C - { - [01]={'+0+0','-1+0','+0+1'}, - [10]={'+0+0','+1+0','+0+1'}, - [03]={'+0+0','+1+0','+0+1'}, - [30]={'+0+0','-1+0','+0+1'}, - [12]={'+0+0','+1+0','+0+2'}, - [21]={'+0+0','+0-1','-1+0'}, - [32]={'+0+0','-1+0','+0+2'}, - [23]={'+0+0','+0-1','-1+0'}, - [02]={'+0+0','+0-1','+0+1'}, - [20]={'+0+0','+0+1','+0-1'}, - [13]={'+0+0','-1+0','+1+0'}, - [31]={'+0+0','+1+0','-1+0'}, - },--I2 - nil,--O1 - } - } - TRS.centerDisp[6]=false - TRS.centerDisp[18]=false - TRS.kickTable[2]= _reflect(TRS.kickTable[1])--SZ - TRS.kickTable[4]= _reflect(TRS.kickTable[3])--LJ - TRS.kickTable[9]= _reflect(TRS.kickTable[8])--S5Z5 - TRS.kickTable[11]=_reflect(TRS.kickTable[10])--PQ - TRS.kickTable[13]=_reflect(TRS.kickTable[12])--FE - TRS.kickTable[20]=_reflect(TRS.kickTable[19])--L5J5 - TRS.kickTable[22]=_reflect(TRS.kickTable[21])--RY - TRS.kickTable[24]=_reflect(TRS.kickTable[23])--NH - _centroSymSet(TRS.kickTable[8])_centroSymSet(TRS.kickTable[9])--S5Z5 - _centroSymSet(TRS.kickTable[25])_centroSymSet(TRS.kickTable[26])--I5I3 + local OspinList={ + {111,5,2, 0,-1,0},{111,5,2,-1,-1,0},{111,5,0,-1, 0,0},--T + {333,5,2,-1,-1,0},{333,5,2, 0,-1,0},{333,5,0, 0, 0,0},--T + {313,1,2,-1, 0,0},{313,1,2, 0,-1,0},{313,1,2, 0, 0,0},--Z + {131,2,2, 0, 0,0},{131,2,2,-1,-1,0},{131,2,2,-1, 0,0},--S + {131,1,2,-1, 0,0},{131,1,2, 0,-1,0},{131,1,2, 0, 0,0},--Z(misOrder) + {313,2,2, 0, 0,0},{313,2,2,-1,-1,0},{313,2,2,-1, 0,0},--S(misOrder) + {331,3,2, 0,-1,0},--J(farDown) + {113,4,2,-1,-1,0},--L(farDown) + {113,3,2,-1,-1,0},{113,3,0, 0, 0,0},--J + {331,4,2, 0,-1,0},{331,4,0,-1, 0,0},--L + {222,7,2,-1, 0,2},{222,7,2,-2, 0,2},{222,7,2, 0, 0,2},--I + {222,7,0,-1, 1,1},{222,7,0,-2, 1,1},{222,7,0, 0, 1,1},--I(high) + {121,6,0, 1,-1,2},{112,6,0, 2,-1,2},{122,6,0, 1,-2,2},--O + {323,6,0,-1,-1,2},{332,6,0,-2,-1,2},{322,6,0,-1,-2,2},--O + }--{keys, ID, dir, dx, dy, freeLevel (0=immovable, 1=U/D-immovable, 2=free)} + local XspinList={ + {{ 1,-1},{ 1, 0},{ 1, 1},{ 1,-2},{ 1, 2}}, + {{ 0,-1},{ 0,-2},{ 0, 1},{ 0,-2},{ 0, 2}}, + {{-1,-1},{-1, 0},{-1, 1},{-1,-2},{-1, 2}}, + } + TRS={ + centerTex=GC.DO{10,10, + {'setCL',1,1,1,.4}, + {'fRect',1,1,8,8}, + {'setCL',1,1,1,.6}, + {'fRect',2,2,6,6}, + {'setCL',1,1,1,.8}, + {'fRect',3,3,4,4}, + {'setCL',1,1,1}, + {'fRect',4,4,2,2}, + }, + centerDisp=TABLE.new(true,29), + kickTable={ + { + [01]={'+0+0','-1+0','-1+1','+0-2','-1+2','+0+1'}, + [10]={'+0+0','+1+0','+1-1','+0+2','+1-2','+1-2'}, + [03]={'+0+0','+1+0','+1+1','+0-2','+1-1','+1-2'}, + [30]={'+0+0','-1+0','-1-1','+0+2','-1+2','+0-1'}, + [12]={'+0+0','+1+0','+1-1','+0+2','+1+2'}, + [21]={'+0+0','-1+0','-1+1','+0-2','-1-2'}, + [32]={'+0+0','-1+0','-1-1','+0+2','-1+2'}, + [23]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, + [02]={'+0+0','+1+0','-1+0','+0-1','+0+1'}, + [20]={'+0+0','-1+0','+1+0','+0+1','+0-1'}, + [13]={'+0+0','+0-1','+0+1','+0-2'}, + [31]={'+0+0','+0+1','+0-1','+0+2'}, + },--Z + false,--S + { + [01]={'+0+0','-1+0','-1+1','+1+0','+0-2','+1+1'}, + [10]={'+0+0','+1+0','+1-1','-1+0','+0+2','+1+2'}, + [03]={'+0+0','+1+0','+1+1','+0-2','+1-2','+1-1','+0+1'}, + [30]={'+0+0','-1+0','-1-1','+0+2','-1+2','+0-1','-1+1'}, + [12]={'+0+0','+1+0','+1-1','+1+1','-1+0','+0-1','+0+2','+1+2'}, + [21]={'+0+0','-1+0','-1+1','-1-1','+1+0','+0+1','+0-2','-1-2'}, + [32]={'+0+0','-1+0','-1-1','+1+0','+0+2','-1+2','-1+1'}, + [23]={'+0+0','+1+0','+1-1','-1+0','+1+1','+0-2','+1-2'}, + [02]={'+0+0','-1+0','+1+0','+0-1','+0+1'}, + [20]={'+0+0','+1+0','-1+0','+0+1','+0-1'}, + [13]={'+0+0','+0-1','+0+1','+1+0'}, + [31]={'+0+0','+0+1','+0-1','-1+0'}, + },--J + false,--L + { + [01]={'+0+0','-1+0','-1+1','+0-2','-1-2','+0+1'}, + [10]={'+0+0','+1+0','+1-1','+0+2','+1+2','+0-1'}, + [03]={'+0+0','+1+0','+1+1','+0-2','+1-2','+0+1'}, + [30]={'+0+0','-1+0','-1-1','+0+2','-1+2','+0-1'}, + [12]={'+0+0','+1+0','+1-1','+0-1','-1-1','+0+2','+1+2','+1+1'}, + [21]={'+0+0','-1+0','+0-2','-1-2','-1-1','+1+1'}, + [32]={'+0+0','-1+0','-1-1','+0-1','+1-1','+0+2','-1+2','-1+1'}, + [23]={'+0+0','+1+0','+0-2','+1-2','+1-1','-1+1'}, + [02]={'+0+0','-1+0','+1+0','+0+1'}, + [20]={'+0+0','+1+0','-1+0','+0-1'}, + [13]={'+0+0','+0-1','+0+1','+1+0','+0-2','+0+2'}, + [31]={'+0+0','+0-1','+0+1','-1+0','+0-2','+0+2'}, + },--T + function(P,d) + if P.gameEnv.easyFresh then + P:freshBlock('fresh') + end + if P.gameEnv.ospin then + local x,y=P.curX,P.curY + 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 SFX.play('rotatekick',nil,P:getCenterX()*.15)end + P.spinSeq=P.spinSeq%100*10+d + if P.spinSeq<100 then return end + for i=1,#OspinList do + local L=OspinList[i] + if P.spinSeq==L[1]then + local id,dir=L[2],L[3] + local bk=BLOCKS[id][dir] + x,y=P.curX+L[4],P.curY+L[5] + if + not P:ifoverlap(bk,x,y)and( + L[6]>0 or(P:ifoverlap(bk,x-1,y)and P:ifoverlap(bk,x+1,y)) + )and( + L[6]==2 or(P:ifoverlap(bk,x,y-1)and P:ifoverlap(bk,x,y+1)) + ) + then + local C=P.cur + C.id=id + C.bk=bk + P.curX,P.curY=x,y + P.cur.dir=dir + P.spinLast=2 + P.stat.rotate=P.stat.rotate+1 + P:freshBlock('move') + P.spinSeq=0 + return + end + end + end + else + if P.sound then SFX.play('rotate',nil,P:getCenterX()*.15)end + P.spinSeq=0 + end + else + if P.sound then SFX.play('rotate',nil,P:getCenterX()*.15)end + end + end,--O + { + [01]={'+0+0','+0+1','+1+0','-2+0','-2-1','+1+2'}, + [10]={'+0+0','+2+0','-1+0','-1-2','+2+1','+0+1'}, + [03]={'+0+0','+0+1','-1+0','+2+0','+2-1','-1+2'}, + [30]={'+0+0','-2+0','+1+0','+1-2','-2+1','+0+1'}, + [12]={'+0+0','-1+0','+2+0','+2-1','+0-1','-1+2'}, + [21]={'+0+0','-2+0','+1+0','+1-2','-2+1','+0+1'}, + [32]={'+0+0','+1+0','-2+0','-2-1','+0-1','+1+2'}, + [23]={'+0+0','+2+0','-1+0','-1-2','+2+1','+0+1'}, + [02]={'+0+0','-1+0','+1+0','+0-1','+0+1'}, + [20]={'+0+0','+1+0','-1+0','+0+1','+0-1'}, + [13]={'+0+0','+0-1','-1+0','+1+0','+0+1'}, + [31]={'+0+0','+0-1','+1+0','-1+0','+0+1'}, + },--I + { + [01]={'+0+0','+0+1','+1+1','-1+0','+0-3','+0+2','+0-2','+0+3','-1+2'}, + [10]={'+0+0','+0-1','-1-1','+1+0','+0-3','+0+2','+0-2','+0+3','+1-2'}, + [03]={'+0+0','+1+0','+0-3','+0+1','+0+2','+0+3','+1+2'}, + [30]={'+0+0','-1+0','+0+1','+0-2','+0-3','+0+3','-1-2'}, + },--Z5 + false,--S5 + { + [01]={'+0+0','-1+0','-1+1','+0-2','-1-2','-1-1','+0+1'}, + [10]={'+0+0','+1+0','+1-1','+0+2','+1+2','+0-1','+1+1'}, + [03]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, + [30]={'+0+0','-1+0','-1-1','+0+2','-1+2'}, + [12]={'+0+0','+1+0','+1-1','+0+2','+1+2','+1+1'}, + [21]={'+0+0','-1+0','-1-1','-1+1','+0-2','-1-2','-1-1'}, + [32]={'+0+0','-1+0','-1-1','-1+1','+0-1','+0+2','-1+2'}, + [23]={'+0+0','+1+0','+1+1','-1+0','+0-2','+1-2'}, + [02]={'+0+0','-1+0','+0-1','+0+1'}, + [20]={'+0+0','+1+0','+0+1','+0-1'}, + [13]={'+0+0','+1+0','+0+1','-1+0'}, + [31]={'+0+0','-1+0','+0-1','+1+0'}, + },--P + false,--Q + { + [01]={'+0+0','-1+0','+1+0','-1+1','+0-2','+0-3'}, + [10]={'+0+0','+1+0','+1-1','-1+0','+0+2','+0+3'}, + [03]={'+0+0','+1+0','+1-1','+0+1','+0-2','+0-3'}, + [30]={'+0+0','-1+1','+1+0','+0-1','+0+2','+0+3'}, + [12]={'+0+0','+1+0','+0-1','-1+0','+0+2'}, + [21]={'+0+0','-1+0','+0+1','+1+0','+0-2'}, + [32]={'+0+0','-1+0','+0+1','-1+1','+1+0','+0+2','-2+0'}, + [23]={'+0+0','+1+0','+1-1','+0-1','-1+0','+0-2','+2+0'}, + [02]={'+0+0','+1+0','-1+0','-1-1'}, + [20]={'+0+0','-1+0','+1+0','+1+1'}, + [13]={'+0+0','+0-1','-1+1','+0+1'}, + [31]={'+0+0','+0-1','+1-1','+0+1'}, + },--F + false,--E + { + [01]={'+0+0','+0-1','-1-1','+1+0','+1+1','+0-3','-1+0','+0+2','-1+2'}, + [10]={'+0+0','+1+0','+0-1','-1-1','+0-2','-1+1','+0-3','+1-2','+0+1'}, + [03]={'+0+0','+0-1','+1-1','-1+0','-1+1','+0-3','+1+0','+0+2','+1+2'}, + [30]={'+0+0','-1+0','+0-1','+1-1','+0-2','+1+1','+0-3','-1-2','+0+1'}, + [12]={'+0+0','+1+0','-1+0','+0-2','+0-3','+0+1','-1+1'}, + [21]={'+0+0','+1-1','-1+0','+1+0','+0-1','+0+2','+0+3'}, + [32]={'+0+0','-1+0','+1+0','+0-2','+0-3','+0+1','+1+1'}, + [23]={'+0+0','-1-1','+1+0','-1+0','+0-1','+0+2','+0+3'}, + [02]={'+0+0','+0-1','+0+1','+0+2'}, + [20]={'+0+0','+0-1','+0+1','+0-2'}, + [13]={'+0+0','+1+0','-1+1','-2+0'}, + [31]={'+0+0','-1+0','+1+1','+2+0'}, + },--T5 + { + [01]={'+0+0','-1+0','-1+1','+0-2','-1-2'}, + [10]={'+0+0','+1+0','+1-1','+0+2','+1+2'}, + [03]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, + [30]={'+0+0','-1+0','-1-1','+0-2','-1+2'}, + [12]={'+0+0','+1+0','+1-1','+1+1'}, + [21]={'+0+0','-1-1','-1+1','-1-1'}, + [32]={'+0+0','-1+0','-1-1','-1+1'}, + [23]={'+0+0','+1-1','+1+1','+1-1'}, + [02]={'+0+0','+0+1'}, + [20]={'+0+0','+0-1'}, + [13]={'+0+0','+0-1','+0+1','+1+0'}, + [31]={'+0+0','+0-1','+0+1','-1+0'}, + },--U + { + [01]={'+0+0','+0+1','-1+0','+0-2','-1-2'}, + [10]={'+0+0','+0+1','+1+0','+0-2','+1-2'}, + [03]={'+0+0','+0-1','+0+1','+0+2'}, + [30]={'+0+0','+0-1','+0+1','+0-2'}, + [12]={'+0+0','+0-1','+0+1'}, + [21]={'+0+0','+0-1','+0-2'}, + [32]={'+0+0','+1+0','-1+0'}, + [23]={'+0+0','-1+0','+1+0'}, + [02]={'+0+0','-1+1','+1-1'}, + [20]={'+0+0','+1-1','-1+1'}, + [13]={'+0+0','+1+1','-1-1'}, + [31]={'+0+0','-1-1','+1+1'}, + },--V + { + [01]={'+0+0','+0-1','-1+0','+1+0','+1-1','+0+2'}, + [10]={'+0+0','+0-1','-1-1','+0+1','+0-2','+1-2','+0+2'}, + [03]={'+0+0','+1+0','+1+1','+0-1','+0-2','+0-3','+1-1','+0+1','+0+2','+0+3'}, + [30]={'+0+0','-1+0','-1+1','+0-1','+0-2','+0-3','-1-1','+0+1','+0+2','+0+3'}, + [12]={'+0+0','+1+0','+0-1','-2+0','+1+1','-1+0','+0+1','-1-1'}, + [21]={'+0+0','-1+0','+0-1','+2+0','-1+1','+1+0','+0+1','+1-1'}, + [32]={'+0+0','+0-1','+1+0','+0+1','-1+0','-1-1','+0+2'}, + [23]={'+0+0','+0-1','+1-1','+0+1','+0-2','-1-2','+0+2'}, + [02]={'+0+0','+0-1','-1+0'}, + [20]={'+0+0','+0+1','+1+0'}, + [13]={'+0+0','+0+1','-1+0'}, + [31]={'+0+0','+0-1','+1+0'}, + },--W + function(P,d) + if P.type=='human'then SFX.play('rotate',nil,P:getCenterX()*.15)end + local kickData=XspinList[d] + for test=1,#kickData do + local x,y=P.curX+kickData[test][1],P.curY+kickData[test][2] + if not P:ifoverlap(P.cur.bk,x,y)then + P.curX,P.curY=x,y + P.spinLast=1 + P:freshBlock('move') + P.stat.rotate=P.stat.rotate+1 + return + end + end + P:freshBlock('fresh') + end,--X + { + [01]={'+0+0','-1+0','-1+1','+0-3','-1+1','-1+2','+0+1'}, + [10]={'+0+0','-1+0','+1-1','+0+3','+1-1','+1-2','+0+1'}, + [03]={'+0+0','+0-1','+1-1','-1+0','+1+1','+0-2','+1-2','+0-3','+1-3','-1+1'}, + [30]={'+0+0','+0+1','-1+1','+1+0','-1-1','+0+2','-1+2','+0+3','-1+3','+1-1'}, + [12]={'+0+0','+1+0','+1-1','+0-1','+1-2','+0-2','+1+1','-1+0','+0+2','+1+2'}, + [21]={'+0+0','-1+0','-1+1','+0+1','-1+2','+0+2','-1-1','+1+0','+0-2','-1-2'}, + [32]={'+0+0','-1+0','-1+1','-1-1','+1+0','+0+2','-1+2','+0-2'}, + [23]={'+0+0','+1+0','+1-1','+1+1','-1+0','+0-2','+1-2','+0+2'}, + [02]={'+0+0','+0-1','+1-1','-1+0','+2-1'}, + [20]={'+0+0','+0+1','-1+1','+1+0','-2+1'}, + [13]={'+0+0','-1+0','-1-1','+0+1','-1-2'}, + [31]={'+0+0','+1+0','+1+1','+0-1','+1+2'}, + },--J5 + false,--L5 + { + [01]={'+0+0','-1+0','-1+0','-1+1','+1+0','-1+2','-1-1','+0-3','+0+1'}, + [10]={'+0+0','-1+0','+1+0','+1-1','+1+0','+1-2','+1+1','+0+3','+0+1'}, + [03]={'+0+0','+0-1','+0+1','+1+0','+1-1','-1+0','+1+1','+0-2','+1-2','+0-3','+1-3','-1+1'}, + [30]={'+0+0','+0-1','+0+1','-1+0','-1+1','+1+0','-1-1','+0+2','-1+2','+0+3','-1+3','+1-1'}, + [12]={'+0+0','+1+0','+1-1','+0-1','+1-2','+0-2','+1+1','-1+0','+0+2','+1+2'}, + [21]={'+0+0','-1+0','-1+1','+0+1','-1+2','+0+2','-1-1','+1+0','+0-2','-1-2'}, + [32]={'+0+0','+0-1','-1+0','-1+1','-1-1','+1+0','+0+2','-1+2','+0-2'}, + [23]={'+0+0','+0+1','+1+0','+1-1','+1+1','-1+0','+0-2','+1-2','+0+2'}, + [02]={'+0+0','+0-1','+1-1','-1+0','+2-1','+0+1'}, + [20]={'+0+0','+0+1','-1+1','+1+0','-2+1','+0-1'}, + [13]={'+0+0','-1+0','-1-1','+0+1','-1-2'}, + [31]={'+0+0','+1+0','+1+1','+0-1','+1+2'}, + },--R + false,--Y + { + [01]={'+0+0','-1+0','-1+1','+0+1','+1+0','-1+2','-2+0','+0-2'}, + [10]={'+0+0','+1+0','-1+0','+0-1','+1-1','+1-2','+2+0','+0+2'}, + [03]={'+0+0','-1+0','+1-1','+0-2','+0-3','+1+0','+1-2','+1-3','+0+1','-1+1'}, + [30]={'+0+0','-1+0','+1-1','+1-2','+1+0','+0-2','+1-3','-1+2','+0+3','-1+3'}, + [12]={'+0+0','-1+0','+1-1','-1-1','+1-2','+1+0','+0-2','+1-3','-1+2','+0+3','-1+3'}, + [21]={'+0+0','-1+0','+1-1','+1+1','+0-2','+0-3','+1+0','+1-2','+1-3','+0+1','-1+1'}, + [32]={'+0+0','-1+0','+0-1','-1-2','+1-1','+1+0','+1+1','+0+2','+0+3'}, + [23]={'+0+0','+0-2','+0-3','+1+2','+1+0','+0+1','-1+1','+0-1','+0+2'}, + [02]={'+0+0','-1+0','+0+2','+0-1'}, + [20]={'+0+0','+1+0','+0-2','+0+1'}, + [13]={'+0+0','-1+0','-1-1','+0+1','+1+2'}, + [31]={'+0+0','+1+0','+1+1','+0-1','-1-2'}, + },--N + false,--H + { + [01]={'+0+0','+1-1','+1+0','+1+1','+0+1','-1+1','-1+0','-1-1','+0-1','+0-2','-2-1','-2-2','+2+0','+2-1','+2-2','+1+2','+2+2','-1+2','-2+2'}, + [10]={'+0+0','-1+0','-1-1','+0-1','+1-1','-2-2','-2-1','-2+0','-1-2','+0-2','+1-2','+2-2','-1+1','-2+1','-2+2','+1+0','+2+0','+2-1','+0+1','+1-1','+2-2'}, + [03]={'+0+0','-1-1','-1+0','-1+1','-0+1','+1+1','+1+0','+1-1','-0-1','-0-2','+2-1','+2-2','-2+0','-2-1','-2-2','-1+2','-2+2','+1+2','+2+2'}, + [30]={'+0+0','+1+0','+1-1','-0-1','-1-1','+2-2','+2-1','+2+0','+1-2','-0-2','-1-2','-2-2','+1+1','+2+1','+2+2','-1+0','-2+0','-2-1','+0+1','-1-1','-2-2'}, + },--I5 + { + [01]={'+0+0','-1+0','-1-1','+1+1','-1+1'}, + [10]={'+0+0','-1+0','+1+0','-1-1','+1+1'}, + [03]={'+0+0','+1+0','+1-1','-1+1','+1+1'}, + [30]={'+0+0','+1+0','-1+0','+1-1','-1+1'}, + },--I3 + { + [01]={'+0+0','-1+0','+1+0'}, + [10]={'+0+0','+1+0','-1+0'}, + [03]={'+0+0','+0+1','+0-1'}, + [30]={'+0+0','+0-1','+0+1'}, + [12]={'+0+0','+0+1','+0-1'}, + [21]={'+0+0','+0-1','+0+1'}, + [32]={'+0+0','-1+0','+1+0'}, + [23]={'+0+0','+1+0','-1+0'}, + [02]={'+0+0','+0-1','+1-1','-1-1'}, + [20]={'+0+0','+0+1','-1+1','+1+1'}, + [13]={'+0+0','+0-1','-1-1','+1-1'}, + [31]={'+0+0','+0+1','+1+1','-1+1'}, + },--C + { + [01]={'+0+0','-1+0','+0+1'}, + [10]={'+0+0','+1+0','+0+1'}, + [03]={'+0+0','+1+0','+0+1'}, + [30]={'+0+0','-1+0','+0+1'}, + [12]={'+0+0','+1+0','+0+2'}, + [21]={'+0+0','+0-1','-1+0'}, + [32]={'+0+0','-1+0','+0+2'}, + [23]={'+0+0','+0-1','-1+0'}, + [02]={'+0+0','+0-1','+0+1'}, + [20]={'+0+0','+0+1','+0-1'}, + [13]={'+0+0','-1+0','+1+0'}, + [31]={'+0+0','+1+0','-1+0'}, + },--I2 + nil,--O1 + } + } + TRS.centerDisp[6]=false + TRS.centerDisp[18]=false + TRS.kickTable[2]= _reflect(TRS.kickTable[1])--SZ + TRS.kickTable[4]= _reflect(TRS.kickTable[3])--LJ + TRS.kickTable[9]= _reflect(TRS.kickTable[8])--S5Z5 + TRS.kickTable[11]=_reflect(TRS.kickTable[10])--PQ + TRS.kickTable[13]=_reflect(TRS.kickTable[12])--FE + TRS.kickTable[20]=_reflect(TRS.kickTable[19])--L5J5 + TRS.kickTable[22]=_reflect(TRS.kickTable[21])--RY + TRS.kickTable[24]=_reflect(TRS.kickTable[23])--NH + _centroSymSet(TRS.kickTable[8])_centroSymSet(TRS.kickTable[9])--S5Z5 + _centroSymSet(TRS.kickTable[25])_centroSymSet(TRS.kickTable[26])--I5I3 end local SRS do - SRS={ - centerTex=GC.DO{10,10, - {'setCL',1,1,1,.3}, - {'fCirc',5,5,4}, - {'setCL',1,1,1,.6}, - {'fCirc',5,5,3}, - {'setCL',1,1,1}, - {'fCirc',5,5,2}, - }, - kickTable={ - { - [01]={'+0+0','-1+0','-1+1','+0-2','-1-2'}, - [10]={'+0+0','+1+0','+1-1','+0+2','+1+2'}, - [03]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, - [30]={'+0+0','-1+0','-1-1','+0+2','-1+2'}, - [12]={'+0+0','+1+0','+1-1','+0+2','+1+2'}, - [21]={'+0+0','-1+0','-1+1','+0-2','-1-2'}, - [32]={'+0+0','-1+0','-1-1','+0+2','-1+2'}, - [23]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, - [02]={'+0+0'},[20]={'+0+0'},[13]={'+0+0'},[31]={'+0+0'}, - },--Z - false,--S - false,--J - false,--L - false,--T - noKickSet,--O - { - [01]={'+0+0','-2+0','+1+0','-2-1','+1+2'}, - [10]={'+0+0','+2+0','-1+0','+2+1','-1-2'}, - [12]={'+0+0','-1+0','+2+0','-1+2','+2-1'}, - [21]={'+0+0','+1+0','-2+0','+1-2','-2+1'}, - [23]={'+0+0','+2+0','-1+0','+2+1','-1-2'}, - [32]={'+0+0','-2+0','+1+0','-2-1','+1+2'}, - [30]={'+0+0','+1+0','-2+0','+1-2','-2+1'}, - [03]={'+0+0','-1+0','+2+0','-1+2','+2-1'}, - [02]={'+0+0'},[20]={'+0+0'},[13]={'+0+0'},[31]={'+0+0'}, - }--I - } - } - for i=2,5 do SRS.kickTable[i]=SRS.kickTable[1]end - for i=8,29 do SRS.kickTable[i]=SRS.kickTable[1]end + SRS={ + centerTex=GC.DO{10,10, + {'setCL',1,1,1,.3}, + {'fCirc',5,5,4}, + {'setCL',1,1,1,.6}, + {'fCirc',5,5,3}, + {'setCL',1,1,1}, + {'fCirc',5,5,2}, + }, + kickTable={ + { + [01]={'+0+0','-1+0','-1+1','+0-2','-1-2'}, + [10]={'+0+0','+1+0','+1-1','+0+2','+1+2'}, + [03]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, + [30]={'+0+0','-1+0','-1-1','+0+2','-1+2'}, + [12]={'+0+0','+1+0','+1-1','+0+2','+1+2'}, + [21]={'+0+0','-1+0','-1+1','+0-2','-1-2'}, + [32]={'+0+0','-1+0','-1-1','+0+2','-1+2'}, + [23]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, + [02]={'+0+0'},[20]={'+0+0'},[13]={'+0+0'},[31]={'+0+0'}, + },--Z + false,--S + false,--J + false,--L + false,--T + noKickSet,--O + { + [01]={'+0+0','-2+0','+1+0','-2-1','+1+2'}, + [10]={'+0+0','+2+0','-1+0','+2+1','-1-2'}, + [12]={'+0+0','-1+0','+2+0','-1+2','+2-1'}, + [21]={'+0+0','+1+0','-2+0','+1-2','-2+1'}, + [23]={'+0+0','+2+0','-1+0','+2+1','-1-2'}, + [32]={'+0+0','-2+0','+1+0','-2-1','+1+2'}, + [30]={'+0+0','+1+0','-2+0','+1-2','-2+1'}, + [03]={'+0+0','-1+0','+2+0','-1+2','+2-1'}, + [02]={'+0+0'},[20]={'+0+0'},[13]={'+0+0'},[31]={'+0+0'}, + }--I + } + } + for i=2,5 do SRS.kickTable[i]=SRS.kickTable[1]end + for i=8,29 do SRS.kickTable[i]=SRS.kickTable[1]end end local SRS_plus do - SRS_plus={ - centerTex=GC.DO{10,10, - {'setCL',1,1,1,.4}, - {'fCirc',5,5,5}, - {'setCL',1,1,1,.6}, - {'fCirc',5,5,4}, - {'setCL',1,1,1,.9}, - {'fCirc',5,5,3}, - {'setCL',1,1,1}, - {'fCirc',5,5,2}, - }, - kickTable={ - { - [01]={'+0+0','-1+0','-1+1','+0-2','-1-2'}, - [10]={'+0+0','+1+0','+1-1','+0+2','+1+2'}, - [03]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, - [30]={'+0+0','-1+0','-1-1','+0+2','-1+2'}, - [12]={'+0+0','+1+0','+1-1','+0+2','+1+2'}, - [21]={'+0+0','-1+0','-1+1','+0-2','-1-2'}, - [32]={'+0+0','-1+0','-1-1','+0+2','-1+2'}, - [23]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, - [02]={'+0+0','-1+0','+1+0','+0-1','+0+1'}, - [20]={'+0+0','+1+0','-1+0','+0-1','+0+1'}, - [13]={'+0+0','+0-1','-1+0','+1+0','+0+1'}, - [31]={'+0+0','+0-1','-1+0','+1+0','+0+1'}, - },--Z - false,--S - false,--J - false,--L - false,--T - noKickSet,--O - { - [01]={'+0+0','-2+0','+1+0','-2-1','+1+2'}, - [10]={'+0+0','+2+0','-1+0','+2+1','-1-2'}, - [12]={'+0+0','-1+0','+2+0','-1+2','+2-1'}, - [21]={'+0+0','+1+0','-2+0','+1-2','-2+1'}, - [23]={'+0+0','+2+0','-1+0','+2+1','-1-2'}, - [32]={'+0+0','-2+0','+1+0','-2-1','+1+2'}, - [30]={'+0+0','+1+0','-2+0','+1-2','-2+1'}, - [03]={'+0+0','-1+0','+2+0','-1+2','+2-1'}, - [02]={'+0+0','-1+0','+1+0','+0-1','+0+1'}, - [20]={'+0+0','+1+0','-1+0','+0+1','+0-1'}, - [13]={'+0+0','+0-1','-1+0','+1+0','+0+1'}, - [31]={'+0+0','+0-1','+1+0','-1+0','+0+1'}, - }--I - } - } - 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 + SRS_plus={ + centerTex=GC.DO{10,10, + {'setCL',1,1,1,.4}, + {'fCirc',5,5,5}, + {'setCL',1,1,1,.6}, + {'fCirc',5,5,4}, + {'setCL',1,1,1,.9}, + {'fCirc',5,5,3}, + {'setCL',1,1,1}, + {'fCirc',5,5,2}, + }, + kickTable={ + { + [01]={'+0+0','-1+0','-1+1','+0-2','-1-2'}, + [10]={'+0+0','+1+0','+1-1','+0+2','+1+2'}, + [03]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, + [30]={'+0+0','-1+0','-1-1','+0+2','-1+2'}, + [12]={'+0+0','+1+0','+1-1','+0+2','+1+2'}, + [21]={'+0+0','-1+0','-1+1','+0-2','-1-2'}, + [32]={'+0+0','-1+0','-1-1','+0+2','-1+2'}, + [23]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, + [02]={'+0+0','-1+0','+1+0','+0-1','+0+1'}, + [20]={'+0+0','+1+0','-1+0','+0-1','+0+1'}, + [13]={'+0+0','+0-1','-1+0','+1+0','+0+1'}, + [31]={'+0+0','+0-1','-1+0','+1+0','+0+1'}, + },--Z + false,--S + false,--J + false,--L + false,--T + noKickSet,--O + { + [01]={'+0+0','-2+0','+1+0','-2-1','+1+2'}, + [10]={'+0+0','+2+0','-1+0','+2+1','-1-2'}, + [12]={'+0+0','-1+0','+2+0','-1+2','+2-1'}, + [21]={'+0+0','+1+0','-2+0','+1-2','-2+1'}, + [23]={'+0+0','+2+0','-1+0','+2+1','-1-2'}, + [32]={'+0+0','-2+0','+1+0','-2-1','+1+2'}, + [30]={'+0+0','+1+0','-2+0','+1-2','-2+1'}, + [03]={'+0+0','-1+0','+2+0','-1+2','+2-1'}, + [02]={'+0+0','-1+0','+1+0','+0-1','+0+1'}, + [20]={'+0+0','+1+0','-1+0','+0+1','+0-1'}, + [13]={'+0+0','+0-1','-1+0','+1+0','+0+1'}, + [31]={'+0+0','+0-1','+1+0','-1+0','+0+1'}, + }--I + } + } + 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 end local SRS_X do - SRS_X={ - centerTex=GC.DO{10,10, - {'setLW',2}, - {'setCL',1,1,1,.4}, - {'dCirc',5,5,4}, - {'setLW',1}, - {'setCL',1,1,1}, - {'dCirc',5,5,3}, - }, - kickTable={ - { - [01]={'+0+0','-1+0','-1+1','+0-2','-1-2'}, - [10]={'+0+0','+1+0','+1-1','+0+2','+1+2'}, - [03]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, - [30]={'+0+0','-1+0','-1-1','+0+2','-1+2'}, - [12]={'+0+0','+1+0','+1-1','+0+2','+1+2'}, - [21]={'+0+0','-1+0','-1+1','+0-2','-1-2'}, - [32]={'+0+0','-1+0','-1-1','+0+2','-1+2'}, - [23]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, - [02]={'+0+0','-1+0','+1+0','+0-1','+0+1'}, - [20]={'+0+0','+1+0','-1+0','+0-1','+0+1'}, - [13]={'+0+0','+0-1','-1+0','+1+0','+0+1'}, - [31]={'+0+0','+0-1','-1+0','+1+0','+0+1'}, - },--Z - false,--S - false,--J - false,--L - false,--T - noKickSet,--O - false,--I - } - } - 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 - SRS_X.kickTable[10]=SRS_X.kickTable[1]--P - SRS_X.kickTable[11]=SRS_X.kickTable[1]--Q + SRS_X={ + centerTex=GC.DO{10,10, + {'setLW',2}, + {'setCL',1,1,1,.4}, + {'dCirc',5,5,4}, + {'setLW',1}, + {'setCL',1,1,1}, + {'dCirc',5,5,3}, + }, + kickTable={ + { + [01]={'+0+0','-1+0','-1+1','+0-2','-1-2'}, + [10]={'+0+0','+1+0','+1-1','+0+2','+1+2'}, + [03]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, + [30]={'+0+0','-1+0','-1-1','+0+2','-1+2'}, + [12]={'+0+0','+1+0','+1-1','+0+2','+1+2'}, + [21]={'+0+0','-1+0','-1+1','+0-2','-1-2'}, + [32]={'+0+0','-1+0','-1-1','+0+2','-1+2'}, + [23]={'+0+0','+1+0','+1+1','+0-2','+1-2'}, + [02]={'+0+0','-1+0','+1+0','+0-1','+0+1'}, + [20]={'+0+0','+1+0','-1+0','+0-1','+0+1'}, + [13]={'+0+0','+0-1','-1+0','+1+0','+0+1'}, + [31]={'+0+0','+0-1','-1+0','+1+0','+0+1'}, + },--Z + false,--S + false,--J + false,--L + false,--T + noKickSet,--O + false,--I + } + } + 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 + SRS_X.kickTable[10]=SRS_X.kickTable[1]--P + SRS_X.kickTable[11]=SRS_X.kickTable[1]--Q end local BiRS do - local R=_strToVec{'+0+0','-1+0','-1-1','+0-1','-1+1','+1-1','+1+0','+0+1','+1+1','+0+2','-1+2','+1+2','-2+0','+2+0'} - local L=_strToVec{'+0+0','+1+0','+1-1','+0-1','+1+1','-1-1','-1+0','+0+1','-1+1','+0+2','+1+2','-1+2','+2+0','-2+0'} - local F=_strToVec{'+0+0','+0-1','+0+1','+0+2'} - local list={ - {[02]=L,[20]=R,[13]=R,[31]=L},--Z - {[02]=R,[20]=L,[13]=L,[31]=R},--S - {[02]=L,[20]=R,[13]=L,[31]=R},--J - {[02]=R,[20]=L,[13]=L,[31]=R},--L - {[02]=F,[20]=F,[13]=L,[31]=R},--T - {[02]=F,[20]=F,[13]=F,[31]=F},--O - {[02]=F,[20]=F,[13]=R,[31]=L},--I + local R=_strToVec{'+0+0','-1+0','-1-1','+0-1','-1+1','+1-1','+1+0','+0+1','+1+1','+0+2','-1+2','+1+2','-2+0','+2+0'} + local L=_strToVec{'+0+0','+1+0','+1-1','+0-1','+1+1','-1-1','-1+0','+0+1','-1+1','+0+2','+1+2','-1+2','+2+0','-2+0'} + local F=_strToVec{'+0+0','+0-1','+0+1','+0+2'} + local list={ + {[02]=L,[20]=R,[13]=R,[31]=L},--Z + {[02]=R,[20]=L,[13]=L,[31]=R},--S + {[02]=L,[20]=R,[13]=L,[31]=R},--J + {[02]=R,[20]=L,[13]=L,[31]=R},--L + {[02]=F,[20]=F,[13]=L,[31]=R},--T + {[02]=F,[20]=F,[13]=F,[31]=F},--O + {[02]=F,[20]=F,[13]=R,[31]=L},--I - {[02]=L,[20]=L,[13]=R,[31]=R},--Z5 - {[02]=R,[20]=R,[13]=L,[31]=L},--S5 - {[02]=L,[20]=R,[13]=L,[31]=R},--P - {[02]=R,[20]=L,[13]=R,[31]=L},--Q - {[02]=R,[20]=L,[13]=L,[31]=R},--F - {[02]=L,[20]=R,[13]=R,[31]=L},--E - {[02]=F,[20]=F,[13]=L,[31]=R},--T5 - {[02]=F,[20]=F,[13]=L,[31]=R},--U - {[02]=R,[20]=L,[13]=L,[31]=R},--V - {[02]=R,[20]=L,[13]=L,[31]=R},--W - {[02]=F,[20]=F,[13]=F,[31]=F},--X - {[02]=L,[20]=R,[13]=R,[31]=L},--J5 - {[02]=R,[20]=L,[13]=L,[31]=R},--L5 - {[02]=L,[20]=R,[13]=R,[31]=L},--R - {[02]=R,[20]=L,[13]=L,[31]=R},--Y - {[02]=L,[20]=R,[13]=R,[31]=L},--N - {[02]=R,[20]=L,[13]=L,[31]=R},--H - {[02]=F,[20]=F,[13]=F,[31]=F},--I5 + {[02]=L,[20]=L,[13]=R,[31]=R},--Z5 + {[02]=R,[20]=R,[13]=L,[31]=L},--S5 + {[02]=L,[20]=R,[13]=L,[31]=R},--P + {[02]=R,[20]=L,[13]=R,[31]=L},--Q + {[02]=R,[20]=L,[13]=L,[31]=R},--F + {[02]=L,[20]=R,[13]=R,[31]=L},--E + {[02]=F,[20]=F,[13]=L,[31]=R},--T5 + {[02]=F,[20]=F,[13]=L,[31]=R},--U + {[02]=R,[20]=L,[13]=L,[31]=R},--V + {[02]=R,[20]=L,[13]=L,[31]=R},--W + {[02]=F,[20]=F,[13]=F,[31]=F},--X + {[02]=L,[20]=R,[13]=R,[31]=L},--J5 + {[02]=R,[20]=L,[13]=L,[31]=R},--L5 + {[02]=L,[20]=R,[13]=R,[31]=L},--R + {[02]=R,[20]=L,[13]=L,[31]=R},--Y + {[02]=L,[20]=R,[13]=R,[31]=L},--N + {[02]=R,[20]=L,[13]=L,[31]=R},--H + {[02]=F,[20]=F,[13]=F,[31]=F},--I5 - {[02]=F,[20]=F,[13]=F,[31]=F},--I3 - {[02]=R,[20]=L,[13]=L,[31]=R},--C - {[02]=F,[20]=F,[13]=R,[31]=L},--I2 - {[02]=F,[20]=F,[13]=F,[31]=F},--O1 - } - for i=1,29 do - local a,b=R,L - if i==6 or i==18 then a,b=b,a end - 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 - end - BiRS={ - centerTex=GC.DO{10,10, - {'setCL',1,1,1,.6}, - {'fRect',0,3,10,4}, - {'fRect',3,0,4,10}, - {'setCL',1,1,1}, - {'fRect',1,4,8,2}, - {'fRect',4,1,2,8}, - {'fRect',3,3,4,4}, - }, - kickTable=TABLE.new(function(P,d,ifpre) - local C=P.cur - local idir=(C.dir+d)%4 - local kickList=list[C.id][C.dir*10+idir] - local icb=BLOCKS[C.id][idir] - local ix,iy do - local oldSC=C.RS.centerPos[C.id][C.dir] - local newSC=defaultCenterPos[C.id][idir] - ix,iy=P.curX+oldSC[2]-newSC[2],P.curY+oldSC[1]-newSC[1] - end - local dx,dy=0,0 do - local pressing=P.keyPressing - 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[7]and P:ifoverlap(C.bk,P.curX,P.curY-1)then dy= -1 end - end - while true do - for test=1,#kickList do - local fdx,fdy=kickList[test][1]+dx,kickList[test][2]+dy - if - dx*fdx>=0 and - fdx^2+fdy^2<=5 and - (P.freshTime>0 or fdy<=0) - then - local x,y=ix+fdx,iy+fdy - if not P:ifoverlap(icb,x,y)then - if P.gameEnv.moveFX and P.gameEnv.block then - P:createMoveFX() - end - P.curX,P.curY,C.dir=x,y,idir - C.bk=icb - P.spinLast=test==2 and 0 or 1 + {[02]=F,[20]=F,[13]=F,[31]=F},--I3 + {[02]=R,[20]=L,[13]=L,[31]=R},--C + {[02]=F,[20]=F,[13]=R,[31]=L},--I2 + {[02]=F,[20]=F,[13]=F,[31]=F},--O1 + } + for i=1,29 do + local a,b=R,L + if i==6 or i==18 then a,b=b,a end + 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 + end + BiRS={ + centerTex=GC.DO{10,10, + {'setCL',1,1,1,.6}, + {'fRect',0,3,10,4}, + {'fRect',3,0,4,10}, + {'setCL',1,1,1}, + {'fRect',1,4,8,2}, + {'fRect',4,1,2,8}, + {'fRect',3,3,4,4}, + }, + kickTable=TABLE.new(function(P,d,ifpre) + local C=P.cur + local idir=(C.dir+d)%4 + local kickList=list[C.id][C.dir*10+idir] + local icb=BLOCKS[C.id][idir] + local ix,iy do + local oldSC=C.RS.centerPos[C.id][C.dir] + local newSC=defaultCenterPos[C.id][idir] + ix,iy=P.curX+oldSC[2]-newSC[2],P.curY+oldSC[1]-newSC[1] + end + local dx,dy=0,0 do + local pressing=P.keyPressing + 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[7]and P:ifoverlap(C.bk,P.curX,P.curY-1)then dy= -1 end + end + while true do + for test=1,#kickList do + local fdx,fdy=kickList[test][1]+dx,kickList[test][2]+dy + if + dx*fdx>=0 and + fdx^2+fdy^2<=5 and + (P.freshTime>0 or fdy<=0) + then + local x,y=ix+fdx,iy+fdy + if not P:ifoverlap(icb,x,y)then + if P.gameEnv.moveFX and P.gameEnv.block then + P:createMoveFX() + end + P.curX,P.curY,C.dir=x,y,idir + C.bk=icb + P.spinLast=test==2 and 0 or 1 - local t=P.freshTime - if not ifpre then - P:freshBlock('move') - end - if fdy>0 and P.freshTime==t and P.curY~=P.imgY then - P.freshTime=P.freshTime-1 - end + local t=P.freshTime + if not ifpre then + P:freshBlock('move') + end + if fdy>0 and P.freshTime==t and P.curY~=P.imgY then + P.freshTime=P.freshTime-1 + end - local sfx - if ifpre then - sfx='prerotate' - elseif P:ifoverlap(icb,x,y+1)and P:ifoverlap(icb,x-1,y)and P:ifoverlap(icb,x+1,y)then - sfx='rotatekick' - if P.gameEnv.shakeFX then - if d==1 or d==3 then - P.fieldOff.va=P.fieldOff.va+(2-d)*6e-3 - else - P.fieldOff.va=P.fieldOff.va+P:getCenterX()*3e-3 - end - end - else - sfx='rotate' - end - if P.sound then - SFX.play(sfx,nil,P:getCenterX()*.15) - end - P.stat.rotate=P.stat.rotate+1 - return - end - end - end + local sfx + if ifpre then + sfx='prerotate' + elseif P:ifoverlap(icb,x,y+1)and P:ifoverlap(icb,x-1,y)and P:ifoverlap(icb,x+1,y)then + sfx='rotatekick' + if P.gameEnv.shakeFX then + if d==1 or d==3 then + P.fieldOff.va=P.fieldOff.va+(2-d)*6e-3 + else + P.fieldOff.va=P.fieldOff.va+P:getCenterX()*3e-3 + end + end + else + sfx='rotate' + end + if P.sound then + SFX.play(sfx,nil,P:getCenterX()*.15) + end + P.stat.rotate=P.stat.rotate+1 + return + end + end + end - --Try release left/right, then softdrop, failed to rotate otherwise - if dx~=0 then - dx=0 - elseif dy~=0 then - dy=0 - else - return - end - end - end,29) - } + --Try release left/right, then softdrop, failed to rotate otherwise + if dx~=0 then + dx=0 + elseif dy~=0 then + dy=0 + else + return + end + end + end,29) + } end local ARS_Z do - local lrOnly={'+0+0','+1+0','-1+0'} - local upOnly={'+0+0','+0+1','+0+2'} - local lrSet={ - [01]=lrOnly,[10]=lrOnly,[03]=lrOnly,[30]=lrOnly, - [12]=lrOnly,[21]=lrOnly,[32]=lrOnly,[23]=lrOnly, - [02]=lrOnly,[20]=lrOnly,[13]=lrOnly,[31]=lrOnly, - } - local upSet={ - [01]=upOnly,[10]=upOnly,[03]=upOnly,[30]=upOnly, - [12]=upOnly,[21]=upOnly,[32]=upOnly,[23]=upOnly, - [02]=upOnly,[20]=upOnly,[13]=upOnly,[31]=upOnly, - } - local centerPos=TABLE.copy(defaultCenterPos) - centerPos[1]={[0]={1,1},{1,0},{1,1},{1,0}}--Z - centerPos[2]={[0]={1,1},{1,1},{1,1},{1,1}}--S - centerPos[3]={[0]={1,1},{1,0},{1,1},{1,1}}--L - centerPos[4]={[0]={1,1},{1,0},{1,1},{1,1}}--J - centerPos[5]={[0]={1,1},{1,0},{1,1},{1,1}}--T - centerPos[7]={[0]={0,2},{2,0},{0,2},{2,0}}--I - centerPos[10]={[0]={1,1},{1,0},{1,1},{1,0}}--P - centerPos[11]={[0]={1,1},{1,1},{1,1},{1,1}}--Q - centerPos[15]={[0]={1,1},{1,0},{1,1},{1,1}}--U - centerPos[16]={[0]={1,1},{1,1},{1,1},{1,1}}--V - centerPos[19]={[0]={1.5,1.5},{1.5,0.5},{1.5,1.5},{1.5,0.5}}--J5 - centerPos[20]={[0]={1.5,1.5},{1.5,0.5},{1.5,1.5},{1.5,0.5}}--L5 - centerPos[21]={[0]={1.5,1.5},{1.5,0.5},{1.5,1.5},{1.5,0.5}}--R - centerPos[22]={[0]={1.5,1.5},{1.5,0.5},{1.5,1.5},{1.5,0.5}}--Y - centerPos[23]={[0]={1.5,1.5},{1.5,0.5},{1.5,1.5},{1.5,0.5}}--N - centerPos[24]={[0]={1.5,1.5},{1.5,0.5},{1.5,1.5},{1.5,0.5}}--H - centerPos[26]={[0]={0,1},{0,0},{0,1},{0,0}}--I3 - centerPos[28]={[0]={0,1},{0,0},{0,1},{0,0}}--I2 + local lrOnly={'+0+0','+1+0','-1+0'} + local upOnly={'+0+0','+0+1','+0+2'} + local lrSet={ + [01]=lrOnly,[10]=lrOnly,[03]=lrOnly,[30]=lrOnly, + [12]=lrOnly,[21]=lrOnly,[32]=lrOnly,[23]=lrOnly, + [02]=lrOnly,[20]=lrOnly,[13]=lrOnly,[31]=lrOnly, + } + local upSet={ + [01]=upOnly,[10]=upOnly,[03]=upOnly,[30]=upOnly, + [12]=upOnly,[21]=upOnly,[32]=upOnly,[23]=upOnly, + [02]=upOnly,[20]=upOnly,[13]=upOnly,[31]=upOnly, + } + local centerPos=TABLE.copy(defaultCenterPos) + centerPos[1]={[0]={1,1},{1,0},{1,1},{1,0}}--Z + centerPos[2]={[0]={1,1},{1,1},{1,1},{1,1}}--S + centerPos[3]={[0]={1,1},{1,0},{1,1},{1,1}}--L + centerPos[4]={[0]={1,1},{1,0},{1,1},{1,1}}--J + centerPos[5]={[0]={1,1},{1,0},{1,1},{1,1}}--T + centerPos[7]={[0]={0,2},{2,0},{0,2},{2,0}}--I + centerPos[10]={[0]={1,1},{1,0},{1,1},{1,0}}--P + centerPos[11]={[0]={1,1},{1,1},{1,1},{1,1}}--Q + centerPos[15]={[0]={1,1},{1,0},{1,1},{1,1}}--U + centerPos[16]={[0]={1,1},{1,1},{1,1},{1,1}}--V + centerPos[19]={[0]={1.5,1.5},{1.5,0.5},{1.5,1.5},{1.5,0.5}}--J5 + centerPos[20]={[0]={1.5,1.5},{1.5,0.5},{1.5,1.5},{1.5,0.5}}--L5 + centerPos[21]={[0]={1.5,1.5},{1.5,0.5},{1.5,1.5},{1.5,0.5}}--R + centerPos[22]={[0]={1.5,1.5},{1.5,0.5},{1.5,1.5},{1.5,0.5}}--Y + centerPos[23]={[0]={1.5,1.5},{1.5,0.5},{1.5,1.5},{1.5,0.5}}--N + centerPos[24]={[0]={1.5,1.5},{1.5,0.5},{1.5,1.5},{1.5,0.5}}--H + centerPos[26]={[0]={0,1},{0,0},{0,1},{0,0}}--I3 + centerPos[28]={[0]={0,1},{0,0},{0,1},{0,0}}--I2 - ARS_Z={ - centerTex=GC.DO{10,10, - {'setLW',2}, - {'setCL',1,1,1,.5}, - {'line',1,9,5,1,9,9}, - {'setCL',1,1,1,1}, - {'line',2,8,5,2,8,8}, - }, - centerPos=centerPos, - kickTable=TABLE.new(lrSet,29), - } - ARS_Z.kickTable[7]=upSet - ARS_Z.kickTable[25]=upSet + ARS_Z={ + centerTex=GC.DO{10,10, + {'setLW',2}, + {'setCL',1,1,1,.5}, + {'line',1,9,5,1,9,9}, + {'setCL',1,1,1,1}, + {'line',2,8,5,2,8,8}, + }, + centerPos=centerPos, + kickTable=TABLE.new(lrSet,29), + } + ARS_Z.kickTable[7]=upSet + ARS_Z.kickTable[25]=upSet end local ASC do - local L={'+0+0','+1+0','+0-1','+1-1','+0-2','+1-2','+2+0','+2-1','+2-2','-1+0','-1-1','+0+1','+1+1','+2+1','-1-2','-2+0','+0+2','+1+2','+2+2','-2-1','-2-2'} - local R=_flipList(L) - local F={'+0+0'} - local centerPos=TABLE.copy(defaultCenterPos) - centerPos[6]={[0]={0,0},{1,0},{1,1},{0,1}} - centerPos[7]={[0]={0,1},{2,0},{0,2},{1,0}} - ASC={ - centerTex=GC.DO{10,10, - {'setLW',2}, - {'setCL',1,1,1,.7}, - {'line',1,1,9,9}, - {'line',1,9,9,1}, - {'setLW',1}, - {'setCL',1,1,1}, - {'line',1,1,9,9}, - {'line',1,9,9,1}, - }, - centerPos=centerPos, - kickTable=TABLE.new({ - [01]=R,[10]=L,[03]=L,[30]=R, - [12]=R,[21]=L,[32]=L,[23]=R, - [02]=F,[20]=F,[13]=F,[31]=F, - },29) - } + local L={'+0+0','+1+0','+0-1','+1-1','+0-2','+1-2','+2+0','+2-1','+2-2','-1+0','-1-1','+0+1','+1+1','+2+1','-1-2','-2+0','+0+2','+1+2','+2+2','-2-1','-2-2'} + local R=_flipList(L) + local F={'+0+0'} + local centerPos=TABLE.copy(defaultCenterPos) + centerPos[6]={[0]={0,0},{1,0},{1,1},{0,1}} + centerPos[7]={[0]={0,1},{2,0},{0,2},{1,0}} + ASC={ + centerTex=GC.DO{10,10, + {'setLW',2}, + {'setCL',1,1,1,.7}, + {'line',1,1,9,9}, + {'line',1,9,9,1}, + {'setLW',1}, + {'setCL',1,1,1}, + {'line',1,1,9,9}, + {'line',1,9,9,1}, + }, + centerPos=centerPos, + kickTable=TABLE.new({ + [01]=R,[10]=L,[03]=L,[30]=R, + [12]=R,[21]=L,[32]=L,[23]=R, + [02]=F,[20]=F,[13]=F,[31]=F, + },29) + } end local ASC_plus do - local L={'+0+0','+1+0','+0-1','+1-1','+0-2','+1-2','+2+0','+2-1','+2-2','-1+0','-1-1','+0+1','+1+1','+2+1','-1-2','-2+0','+0+2','+1+2','+2+2','-2-1','-2-2'} - local R=_flipList(L) - local F={'+0+0','-1+0','+1+0','+0-1','-1-1','+1-1','+0-2','-1-2','+1-2','-2+0','+2+0','-2-1','+2-1','-2+1','+2+1','+0+2','-1+2','+1+2'} - local centerPos=TABLE.copy(defaultCenterPos) - centerPos[6]={[0]={0,0},{1,0},{1,1},{0,1}} - centerPos[7]={[0]={0,1},{2,0},{0,2},{1,0}} - ASC_plus={ - centerTex=GC.DO{10,10, - {'setLW',2}, - {'setCL',1,1,1,.7}, - {'line',1,1,9,9}, - {'line',1,9,9,1}, - {'setLW',1}, - {'setCL',1,1,1}, - {'line',1,1,9,9}, - {'line',1,9,9,1}, - {'fCirc',5,5,3}, - }, - centerPos=centerPos, - kickTable=TABLE.new({ - [01]=R,[12]=R,[23]=R,[30]=R, - [10]=L,[21]=L,[32]=L,[03]=L, - [02]=F,[20]=F,[13]=F,[31]=F, - },29) - } + local L={'+0+0','+1+0','+0-1','+1-1','+0-2','+1-2','+2+0','+2-1','+2-2','-1+0','-1-1','+0+1','+1+1','+2+1','-1-2','-2+0','+0+2','+1+2','+2+2','-2-1','-2-2'} + local R=_flipList(L) + local F={'+0+0','-1+0','+1+0','+0-1','-1-1','+1-1','+0-2','-1-2','+1-2','-2+0','+2+0','-2-1','+2-1','-2+1','+2+1','+0+2','-1+2','+1+2'} + local centerPos=TABLE.copy(defaultCenterPos) + centerPos[6]={[0]={0,0},{1,0},{1,1},{0,1}} + centerPos[7]={[0]={0,1},{2,0},{0,2},{1,0}} + ASC_plus={ + centerTex=GC.DO{10,10, + {'setLW',2}, + {'setCL',1,1,1,.7}, + {'line',1,1,9,9}, + {'line',1,9,9,1}, + {'setLW',1}, + {'setCL',1,1,1}, + {'line',1,1,9,9}, + {'line',1,9,9,1}, + {'fCirc',5,5,3}, + }, + centerPos=centerPos, + kickTable=TABLE.new({ + [01]=R,[12]=R,[23]=R,[30]=R, + [10]=L,[21]=L,[32]=L,[03]=L, + [02]=F,[20]=F,[13]=F,[31]=F, + },29) + } end local C2 do - local L={'+0+0','-1+0','+1+0','+0-1','-1-1','+1-1','-2+0','+2+0'} - C2={ - centerTex=GC.DO{10,10, - {'setLW',2}, - {'dRect',2,2,6,6}, - }, - kickTable=TABLE.new({ - [01]=L,[10]=L,[12]=L,[21]=L, - [23]=L,[32]=L,[30]=L,[03]=L, - [02]=L,[20]=L,[13]=L,[31]=L, - },29) - } + local L={'+0+0','-1+0','+1+0','+0-1','-1-1','+1-1','-2+0','+2+0'} + C2={ + centerTex=GC.DO{10,10, + {'setLW',2}, + {'dRect',2,2,6,6}, + }, + kickTable=TABLE.new({ + [01]=L,[10]=L,[12]=L,[21]=L, + [23]=L,[32]=L,[30]=L,[03]=L, + [02]=L,[20]=L,[13]=L,[31]=L, + },29) + } end local C2_sym do - local L={'+0+0','-1+0','+1+0','+0-1','-1-1','+1-1','-2+0','+2+0'} - local R={'+0+0','+1+0','-1+0','+0-1','+1-1','-1-1','+2+0','-2+0'} + local L={'+0+0','-1+0','+1+0','+0-1','-1-1','+1-1','-2+0','+2+0'} + local R={'+0+0','+1+0','-1+0','+0-1','+1-1','-1-1','+2+0','-2+0'} - local Z={ - [01]=R,[10]=L,[03]=L,[30]=R, - [12]=R,[21]=L,[32]=L,[23]=R, - [02]=R,[20]=L,[13]=L,[31]=R, - } - local S=_reflect(Z) + local Z={ + [01]=R,[10]=L,[03]=L,[30]=R, + [12]=R,[21]=L,[32]=L,[23]=R, + [02]=R,[20]=L,[13]=L,[31]=R, + } + local S=_reflect(Z) - C2_sym={ - centerTex=GC.DO{10,10, - {'setLW',2}, - {'dRect',1,1,8,8}, - {'fRect',3,3,4,4}, - }, - kickTable={ - Z,S,--Z,S - Z,S,--J,L - Z,--T - noKickSet,--O - Z,--I + C2_sym={ + centerTex=GC.DO{10,10, + {'setLW',2}, + {'dRect',1,1,8,8}, + {'fRect',3,3,4,4}, + }, + kickTable={ + Z,S,--Z,S + Z,S,--J,L + Z,--T + noKickSet,--O + Z,--I - Z,S,--Z5,S5 - Z,S,--P,Q - Z,S,--F,E - Z,Z,Z,Z,--T5,U,V,W - noKickSet,--X - Z,S,--J5,L5 - Z,S,--R,Y - Z,S,--N,H - Z,--I5 + Z,S,--Z5,S5 + Z,S,--P,Q + Z,S,--F,E + Z,Z,Z,Z,--T5,U,V,W + noKickSet,--X + Z,S,--J5,L5 + Z,S,--R,Y + Z,S,--N,H + Z,--I5 - Z,Z,--I3,C - Z,Z,--I2,O1 - } - } + Z,Z,--I3,C + Z,Z,--I2,O1 + } + } end local Classic do - local centerPos=TABLE.copy(defaultCenterPos) - centerPos[1]={[0]={1,1},{1,0},{1,1},{1,0}} - centerPos[2]={[0]={1,1},{1,0},{1,1},{1,0}} - centerPos[7]={[0]={0,2},{1,0},{0,2},{1,0}} - Classic={ - centerTex=GC.DO{10,10, - {'setLW',2}, - {'setCL',1,1,1,.5}, - {'line',8,9,1,9,1,1,8,1}, - {'setCL',1,1,1,1}, - {'line',7,8,2,8,2,2,7,2}, - }, - centerPos=centerPos, - kickTable=TABLE.new(noKickSet,29) - } + local centerPos=TABLE.copy(defaultCenterPos) + centerPos[1]={[0]={1,1},{1,0},{1,1},{1,0}} + centerPos[2]={[0]={1,1},{1,0},{1,1},{1,0}} + centerPos[7]={[0]={0,2},{1,0},{0,2},{1,0}} + Classic={ + centerTex=GC.DO{10,10, + {'setLW',2}, + {'setCL',1,1,1,.5}, + {'line',8,9,1,9,1,1,8,1}, + {'setCL',1,1,1,1}, + {'line',7,8,2,8,2,2,7,2}, + }, + centerPos=centerPos, + kickTable=TABLE.new(noKickSet,29) + } end local Classic_plus do - local centerPos=TABLE.copy(defaultCenterPos) - centerPos[1]={[0]={1,1},{1,0},{1,1},{1,0}} - centerPos[2]={[0]={1,1},{1,0},{1,1},{1,0}} - centerPos[7]={[0]={0,2},{1,0},{0,2},{1,0}} - Classic_plus={ - centerTex=GC.DO{10,10, - {'setLW',2}, - {'setCL',1,1,1,1}, - {'line',8,9,1,9,1,1,8,1}, - {'fRect',3,3,4,4}, - }, - centerPos=centerPos, - kickTable=TABLE.new(noKickSet_180,29) - } + local centerPos=TABLE.copy(defaultCenterPos) + centerPos[1]={[0]={1,1},{1,0},{1,1},{1,0}} + centerPos[2]={[0]={1,1},{1,0},{1,1},{1,0}} + centerPos[7]={[0]={0,2},{1,0},{0,2},{1,0}} + Classic_plus={ + centerTex=GC.DO{10,10, + {'setLW',2}, + {'setCL',1,1,1,1}, + {'line',8,9,1,9,1,1,8,1}, + {'fRect',3,3,4,4}, + }, + centerPos=centerPos, + kickTable=TABLE.new(noKickSet_180,29) + } end local None={ - centerTex=GC.DO{10,10, - {'setLW',2}, - {'line',2,2,6,6}, - }, - kickTable=TABLE.new(noKickSet_180,29) + centerTex=GC.DO{10,10, + {'setLW',2}, + {'line',2,2,6,6}, + }, + kickTable=TABLE.new(noKickSet_180,29) } local None_plus={ - centerTex=GC.DO{10,10, - {'setLW',2}, - {'line',1,1,7,7}, - {'fRect',2,2,4,4}, - }, - kickTable=TABLE.new(noKickSet,29) + centerTex=GC.DO{10,10, + {'setLW',2}, + {'line',1,1,7,7}, + {'fRect',2,2,4,4}, + }, + kickTable=TABLE.new(noKickSet,29) } local RSlist={ - TRS=TRS, - SRS=SRS, - SRS_plus=SRS_plus, - SRS_X=SRS_X, - BiRS=BiRS, - ARS_Z=ARS_Z, - ASC=ASC, - ASC_plus=ASC_plus, - C2=C2, - C2_sym=C2_sym, - Classic=Classic, - Classic_plus=Classic_plus, - None=None, - None_plus=None_plus, + TRS=TRS, + SRS=SRS, + SRS_plus=SRS_plus, + SRS_X=SRS_X, + BiRS=BiRS, + ARS_Z=ARS_Z, + ASC=ASC, + ASC_plus=ASC_plus, + C2=C2, + C2_sym=C2_sym, + Classic=Classic, + Classic_plus=Classic_plus, + None=None, + None_plus=None_plus, } for _,rs in next,RSlist do - if not rs.centerDisp then rs.centerDisp=TABLE.new(true,29)end - if not rs.centerPos then rs.centerPos=defaultCenterPos end - if not rs.centerTex then rs.centerTex=defaultCenterTex 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.centerTex then rs.centerTex=defaultCenterTex end - --Make all string vec to the same table vec - for _,set in next,rs.kickTable do - if type(set)=='table'then - for _,list in next,set do - if type(list[1])=='string'then - _strToVec(list) - end - end - end - end + --Make all string vec to the same table vec + for _,set in next,rs.kickTable do + if type(set)=='table'then + for _,list in next,set do + if type(list[1])=='string'then + _strToVec(list) + end + end + end + end end return RSlist \ No newline at end of file diff --git a/parts/backgrounds/aura.lua b/parts/backgrounds/aura.lua index 3ee69ac0..abf83328 100644 --- a/parts/backgrounds/aura.lua +++ b/parts/backgrounds/aura.lua @@ -5,21 +5,21 @@ local shader=SHADER.aura local t function back.init() - t=math.random()*2600 - BG.resize(SCR.w,SCR.h) + t=math.random()*2600 + BG.resize(SCR.w,SCR.h) end function back.resize(_,h) - shader:send('w',SCR.W) - shader:send('h',h*SCR.dpi) + shader:send('w',SCR.W) + shader:send('h',h*SCR.dpi) end function back.update(dt) - t=t+dt + t=t+dt end function back.draw() - gc.clear(.08,.08,.084) - shader:send('t',t) - gc.setShader(shader) - gc.rectangle('fill',0,0,SCR.w,SCR.h) - gc.setShader() + gc.clear(.08,.08,.084) + shader:send('t',t) + gc.setShader(shader) + gc.rectangle('fill',0,0,SCR.w,SCR.h) + gc.setShader() end return back \ No newline at end of file diff --git a/parts/backgrounds/bg1.lua b/parts/backgrounds/bg1.lua index a20da4c4..4635daea 100644 --- a/parts/backgrounds/bg1.lua +++ b/parts/backgrounds/bg1.lua @@ -5,20 +5,20 @@ local shader=SHADER.grad1 local t function back.init() - t=math.random()*2600 - back.resize() + t=math.random()*2600 + back.resize() end function back.resize() - shader:send('w',SCR.W) + shader:send('w',SCR.W) end function back.update(dt) - t=t+dt + t=t+dt end function back.draw() - gc.clear(.08,.08,.084) - shader:send('t',t) - gc.setShader(shader) - gc.rectangle('fill',0,0,SCR.w,SCR.h) - gc.setShader() + gc.clear(.08,.08,.084) + shader:send('t',t) + gc.setShader(shader) + gc.rectangle('fill',0,0,SCR.w,SCR.h) + gc.setShader() end return back \ No newline at end of file diff --git a/parts/backgrounds/bg2.lua b/parts/backgrounds/bg2.lua index 32905e58..dce32f7a 100644 --- a/parts/backgrounds/bg2.lua +++ b/parts/backgrounds/bg2.lua @@ -5,20 +5,20 @@ local shader=SHADER.grad2 local t function back.init() - t=math.random()*2600 - BG.resize(nil,SCR.h) + t=math.random()*2600 + BG.resize(nil,SCR.h) end function back.resize(_,h) - shader:send('h',h*SCR.dpi) + shader:send('h',h*SCR.dpi) end function back.update(dt) - t=t+dt + t=t+dt end function back.draw() - gc.clear(.08,.08,.084) - shader:send('t',t) - gc.setShader(shader) - gc.rectangle('fill',0,0,SCR.w,SCR.h) - gc.setShader() + gc.clear(.08,.08,.084) + shader:send('t',t) + gc.setShader(shader) + gc.rectangle('fill',0,0,SCR.w,SCR.h) + gc.setShader() end return back \ No newline at end of file diff --git a/parts/backgrounds/blackhole.lua b/parts/backgrounds/blackhole.lua index 39875b44..ac131b0e 100644 --- a/parts/backgrounds/blackhole.lua +++ b/parts/backgrounds/blackhole.lua @@ -12,55 +12,55 @@ local back={} local t local squares function back.init() - t=26 - squares={} + t=26 + squares={} end function back.update() - t=t-1 - if t==0 then - local S={ - ang=6.2832*rnd(), - d=SCR.rad*1.05/2, - rotate=6.2832*rnd(), - va=.05-rnd()*.1, - size=SCR.rad*(2+rnd()*3)/100, - texture=SKIN.lib[SETTING.skinSet][rnd(16)], - } - ins(squares,S) - t=rnd(6,12) - end - for i=#squares,1,-1 do - local S=squares[i] - S.d=S.d-SCR.rad/(S.d+60) - if S.d>0 then - S.ang=S.ang+.008 - S.rotate=S.rotate+S.va - else - rem(squares,i) - end - end + t=t-1 + if t==0 then + local S={ + ang=6.2832*rnd(), + d=SCR.rad*1.05/2, + rotate=6.2832*rnd(), + va=.05-rnd()*.1, + size=SCR.rad*(2+rnd()*3)/100, + texture=SKIN.lib[SETTING.skinSet][rnd(16)], + } + ins(squares,S) + t=rnd(6,12) + end + for i=#squares,1,-1 do + local S=squares[i] + S.d=S.d-SCR.rad/(S.d+60) + if S.d>0 then + S.ang=S.ang+.008 + S.rotate=S.rotate+S.va + else + rem(squares,i) + end + end end function back.draw() - gc_clear(.1,.1,.1) - gc_replaceTransform(SCR.xOy_m) + gc_clear(.1,.1,.1) + gc_replaceTransform(SCR.xOy_m) - --Squares - gc_setColor(1,1,1,.2) - for i=1,#squares do - local S=squares[i] - gc_draw(S.texture,S.d*cos(S.ang),S.d*sin(S.ang),S.rotate,S.size*.026,nil,15,15) - end + --Squares + gc_setColor(1,1,1,.2) + for i=1,#squares do + local S=squares[i] + gc_draw(S.texture,S.d*cos(S.ang),S.d*sin(S.ang),S.rotate,S.size*.026,nil,15,15) + end - --Blackhole - gc_setColor(.07,.07,.07) - gc_circle('fill',0,0,157) - gc_setLineWidth(6) - for i=0,15 do - gc_setColor(.07,.07,.07,1-i*.0666) - gc_circle('line',0,0,160+6*i) - end + --Blackhole + gc_setColor(.07,.07,.07) + gc_circle('fill',0,0,157) + gc_setLineWidth(6) + for i=0,15 do + gc_setColor(.07,.07,.07,1-i*.0666) + gc_circle('line',0,0,160+6*i) + end end function back.discard() - squares=nil + squares=nil end return back \ No newline at end of file diff --git a/parts/backgrounds/blockfall.lua b/parts/backgrounds/blockfall.lua index 1d9254dc..9b21f2c1 100644 --- a/parts/backgrounds/blockfall.lua +++ b/parts/backgrounds/blockfall.lua @@ -10,46 +10,46 @@ local back={} local t local mino function back.init() - t=0 - mino={} + t=0 + mino={} end function back.update() - t=t+1 - if t%26==0 then - local r=rnd(7) - local B=BLOCKS[r][rnd(0,3)] - local k=(1+rnd()*2)*SCR.rad/1000 - ins(mino,{ - x=(SCR.w)*rnd()-15*#B[1], - y=0, - k=k, - vy=k*2, - block=B, - texture=SKIN.lib[SETTING.skinSet][SETTING.skin[r]], - }) - end - for i=#mino,1,-1 do - local M=mino[i] - M.y=M.y+M.vy - if M.y-M.k*#M.block*30>SCR.h then rem(mino,i)end - end + t=t+1 + if t%26==0 then + local r=rnd(7) + local B=BLOCKS[r][rnd(0,3)] + local k=(1+rnd()*2)*SCR.rad/1000 + ins(mino,{ + x=(SCR.w)*rnd()-15*#B[1], + y=0, + k=k, + vy=k*2, + block=B, + texture=SKIN.lib[SETTING.skinSet][SETTING.skin[r]], + }) + end + for i=#mino,1,-1 do + local M=mino[i] + M.y=M.y+M.vy + if M.y-M.k*#M.block*30>SCR.h then rem(mino,i)end + end end function back.draw() - gc_clear(.1,.1,.1) - gc_setColor(1,1,1,.2) - for i=1,#mino do - local M=mino[i] - local b=M.block - for y=1,#b do - for x=1,#b[1]do - 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) - end - end - end - end + gc_clear(.1,.1,.1) + gc_setColor(1,1,1,.2) + for i=1,#mino do + local M=mino[i] + local b=M.block + for y=1,#b do + for x=1,#b[1]do + 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) + end + end + end + end end function back.discard() - mino=nil + mino=nil end return back \ No newline at end of file diff --git a/parts/backgrounds/blockrain.lua b/parts/backgrounds/blockrain.lua index c0318012..e46c5994 100644 --- a/parts/backgrounds/blockrain.lua +++ b/parts/backgrounds/blockrain.lua @@ -7,48 +7,48 @@ local back={} local t local mino function back.init() - t=0 - mino={} + t=0 + mino={} end function back.update() - t=t+1 - if t%10==0 then - local r=rnd(29) - ins(mino,{ - bid=r, - block=TEXTURE.miniBlock[r], - color=minoColor[SETTING.skin[r]], - x=SCR.w*rnd(), - y=SCR.h*-.05, - k=SCR.rad/100, - ang=rnd()*6.2832, - vy=.5+rnd()*.4, - vx=rnd()*.4-.2, - va=rnd()*.04-.02, - }) - end - for i=#mino,1,-1 do - local P=mino[i] - P.y=P.y+P.vy - if P.y>SCR.h+25 then - rem(mino,i) - else - P.x=P.x+P.vx - P.ang=P.ang+P.va - P.vx=P.vx-.01+rnd()*.02 - end - end + t=t+1 + if t%10==0 then + local r=rnd(29) + ins(mino,{ + bid=r, + block=TEXTURE.miniBlock[r], + color=minoColor[SETTING.skin[r]], + x=SCR.w*rnd(), + y=SCR.h*-.05, + k=SCR.rad/100, + ang=rnd()*6.2832, + vy=.5+rnd()*.4, + vx=rnd()*.4-.2, + va=rnd()*.04-.02, + }) + end + for i=#mino,1,-1 do + local P=mino[i] + P.y=P.y+P.vy + if P.y>SCR.h+25 then + rem(mino,i) + else + P.x=P.x+P.vx + P.ang=P.ang+P.va + P.vx=P.vx-.01+rnd()*.02 + end + end end function back.draw() - gc.clear(.08,.08,.084) - for i=1,#mino do - local C=mino[i] - local c=C.color - gc.setColor(c[1],c[2],c[3],.2) - gc.draw(C.block,C.x,C.y,C.ang,C.k,C.k,C.block:getWidth()/2,C.block:getHeight()/2) - end + gc.clear(.08,.08,.084) + for i=1,#mino do + local C=mino[i] + local c=C.color + gc.setColor(c[1],c[2],c[3],.2) + gc.draw(C.block,C.x,C.y,C.ang,C.k,C.k,C.block:getWidth()/2,C.block:getHeight()/2) + end end function back.discard() - mino=nil + mino=nil end return back \ No newline at end of file diff --git a/parts/backgrounds/blockspace.lua b/parts/backgrounds/blockspace.lua index e2673acb..9ca48e9e 100644 --- a/parts/backgrounds/blockspace.lua +++ b/parts/backgrounds/blockspace.lua @@ -11,47 +11,47 @@ local back={} local t local mino function back.init() - t=0 - mino={} + t=0 + mino={} end function back.update() - t=t+1 - if t%3==0 then - local r=rnd(29) - ins(mino,{ - block=TEXTURE.miniBlock[r], - color=minoColor[SETTING.skin[r]], - ang=6.2832*rnd(), - rotate=6.2832*rnd(), - vr=.05-rnd()*.1, - d=0, - v=.5+rnd(), - }) - end - local rad=SCR.rad - for i=#mino,1,-1 do - local M=mino[i] - M.d=M.d+M.v - if M.d>rad*1.05 then - rem(mino,i) - else - M.rotate=M.rotate+M.vr - M.v=M.v*(1+M.d/rad*.05) - end - end + t=t+1 + if t%3==0 then + local r=rnd(29) + ins(mino,{ + block=TEXTURE.miniBlock[r], + color=minoColor[SETTING.skin[r]], + ang=6.2832*rnd(), + rotate=6.2832*rnd(), + vr=.05-rnd()*.1, + d=0, + v=.5+rnd(), + }) + end + local rad=SCR.rad + for i=#mino,1,-1 do + local M=mino[i] + M.d=M.d+M.v + if M.d>rad*1.05 then + rem(mino,i) + else + M.rotate=M.rotate+M.vr + M.v=M.v*(1+M.d/rad*.05) + end + end end function back.draw() - gc_clear(.1,.1,.1) - gc_translate(SCR.cx,SCR.cy) - for i=1,#mino do - local M=mino[i] - local c=M.color - gc_setColor(c[1],c[2],c[3],.2) - gc_draw(M.block,M.d*cos(M.ang),M.d*sin(M.ang),M.rotate,(18*M.d/SCR.rad)^1.6,nil,M.block:getWidth()/2,M.block:getHeight()/2) - end - gc_translate(-SCR.cx,-SCR.cy) + gc_clear(.1,.1,.1) + gc_translate(SCR.cx,SCR.cy) + for i=1,#mino do + local M=mino[i] + local c=M.color + gc_setColor(c[1],c[2],c[3],.2) + gc_draw(M.block,M.d*cos(M.ang),M.d*sin(M.ang),M.rotate,(18*M.d/SCR.rad)^1.6,nil,M.block:getWidth()/2,M.block:getHeight()/2) + end + gc_translate(-SCR.cx,-SCR.cy) end function back.discard() - mino=nil + mino=nil end return back \ No newline at end of file diff --git a/parts/backgrounds/cubes.lua b/parts/backgrounds/cubes.lua index 9f345b51..02a7503d 100644 --- a/parts/backgrounds/cubes.lua +++ b/parts/backgrounds/cubes.lua @@ -11,71 +11,71 @@ local back={} local t local squares function back.init() - t=26 - squares={} + t=26 + squares={} end function back.update(dt) - t=t-1 - if t==0 then - local size=SCR.rad*(2+rnd()*3)/100 - local S={ - x=(SCR.w-size)*rnd(), - y=(SCR.h-size)*rnd(), - vx=0,vy=0, - size=size, - color=COLOR.random_dark(), - } - local speed=SCR.rad*(1+rnd()*2)/6 - if rnd()<.5 then - S.vy=26*(.5-rnd()) - S.vx=speed - if rnd()<.5 then - S.x=-S.size - else - S.x=SCR.w - S.vx=-S.vx - end - else - S.vx=26*(.5-rnd()) - S.vy=speed - if rnd()<.5 then - S.y=-S.size - else - S.y=SCR.h - S.vy=-S.vy - end - end - ins(squares,S) - t=rnd(6,16) - end - for i=#squares,1,-1 do - local S=squares[i] - if - S.vx>0 and S.x>SCR.w or - S.vx<0 and S.x+S.size<0 or - S.vy>0 and S.y>SCR.h or - S.vy<0 and S.y+S.size<0 - then - rem(squares,i) - else - S.x=S.x+S.vx*dt - S.y=S.y+S.vy*dt - end - end + t=t-1 + if t==0 then + local size=SCR.rad*(2+rnd()*3)/100 + local S={ + x=(SCR.w-size)*rnd(), + y=(SCR.h-size)*rnd(), + vx=0,vy=0, + size=size, + color=COLOR.random_dark(), + } + local speed=SCR.rad*(1+rnd()*2)/6 + if rnd()<.5 then + S.vy=26*(.5-rnd()) + S.vx=speed + if rnd()<.5 then + S.x=-S.size + else + S.x=SCR.w + S.vx=-S.vx + end + else + S.vx=26*(.5-rnd()) + S.vy=speed + if rnd()<.5 then + S.y=-S.size + else + S.y=SCR.h + S.vy=-S.vy + end + end + ins(squares,S) + t=rnd(6,16) + end + for i=#squares,1,-1 do + local S=squares[i] + if + S.vx>0 and S.x>SCR.w or + S.vx<0 and S.x+S.size<0 or + S.vy>0 and S.y>SCR.h or + S.vy<0 and S.y+S.size<0 + then + rem(squares,i) + else + S.x=S.x+S.vx*dt + S.y=S.y+S.vy*dt + end + end end function back.draw() - gc_clear(.1,.1,.1) - gc_setLineWidth(6) - for i=1,#squares do - local S=squares[i] - local c=S.color - gc_setColor(c[1],c[2],c[3],.2) - gc_rectangle('line',S.x,S.y,S.size,S.size) - gc_setColor(c[1],c[2],c[3],.3) - gc_rectangle('fill',S.x,S.y,S.size,S.size) - end + gc_clear(.1,.1,.1) + gc_setLineWidth(6) + for i=1,#squares do + local S=squares[i] + local c=S.color + gc_setColor(c[1],c[2],c[3],.2) + gc_rectangle('line',S.x,S.y,S.size,S.size) + gc_setColor(c[1],c[2],c[3],.3) + gc_rectangle('fill',S.x,S.y,S.size,S.size) + end end function back.discard() - squares=nil + squares=nil end return back \ No newline at end of file diff --git a/parts/backgrounds/fan.lua b/parts/backgrounds/fan.lua index abe386fb..72a353de 100644 --- a/parts/backgrounds/fan.lua +++ b/parts/backgrounds/fan.lua @@ -14,66 +14,66 @@ local back={} local t local fan,petal function back.init() - t=0 - fan=title_fan - petal={} + t=0 + fan=title_fan + petal={} end function back.update() - t=t+1 - if t%10==0 then - ins(petal,{ - x=SCR.w*rnd(), - y=0, - vy=2+rnd()*2, - vx=rnd()*2-.5, - rx=4+rnd()*4, - ry=4+rnd()*4, - }) - end - for i=#petal,1,-1 do - local P=petal[i] - P.y=P.y+P.vy - if P.y>SCR.h then - rem(petal,i) - else - P.x=P.x+P.vx - P.vx=P.vx+rnd()*.01 - P.rx=max(min(P.rx+rnd()-.5,10),2) - P.ry=max(min(P.ry+rnd()-.5,10),2) - end - end + t=t+1 + if t%10==0 then + ins(petal,{ + x=SCR.w*rnd(), + y=0, + vy=2+rnd()*2, + vx=rnd()*2-.5, + rx=4+rnd()*4, + ry=4+rnd()*4, + }) + end + for i=#petal,1,-1 do + local P=petal[i] + P.y=P.y+P.vy + if P.y>SCR.h then + rem(petal,i) + else + P.x=P.x+P.vx + P.vx=P.vx+rnd()*.01 + P.rx=max(min(P.rx+rnd()-.5,10),2) + P.ry=max(min(P.ry+rnd()-.5,10),2) + end + end end function back.draw() - gc_clear(.1,.1,.1) + gc_clear(.1,.1,.1) - gc_replaceTransform(SCR.xOy_m) - gc_translate(0,20*sin(t*.02)) + gc_replaceTransform(SCR.xOy_m) + gc_translate(0,20*sin(t*.02)) - gc_setLineWidth(320) - gc_setColor(.9,.6,.9,.1) - gc_arc('line','open',0,420,500,-.8*3.1416,-.2*3.1416) + gc_setLineWidth(320) + gc_setColor(.9,.6,.9,.1) + gc_arc('line','open',0,420,500,-.8*3.1416,-.2*3.1416) - gc_setLineWidth(4) - gc_setColor(1,.7,.9,.2) - gc_arc('line','open',0,420,660,-.799*3.1416,-.201*3.1416) - gc_arc('line','open',0,420,340,-.808*3.1416,-.192*3.1416) - gc_line(-281,224,-530,30.5) - gc_line(281,224,530,30.5) + gc_setLineWidth(4) + gc_setColor(1,.7,.9,.2) + gc_arc('line','open',0,420,660,-.799*3.1416,-.201*3.1416) + gc_arc('line','open',0,420,340,-.808*3.1416,-.192*3.1416) + gc_line(-281,224,-530,30.5) + gc_line(281,224,530,30.5) - gc_setLineWidth(6) - gc_setColor(.8,.9,1,.3) - for i=1,8 do gc_polygon('line',fan[i])end + gc_setLineWidth(6) + gc_setColor(.8,.9,1,.3) + for i=1,8 do gc_polygon('line',fan[i])end - gc_setLineWidth(2) - gc_setColor(1,.5,.7,.3) + gc_setLineWidth(2) + gc_setColor(1,.5,.7,.3) - gc_origin() - for i=1,#petal do - local P=petal[i] - gc_ellipse('fill',P.x,P.y,P.rx,P.ry) - end + gc_origin() + for i=1,#petal do + local P=petal[i] + gc_ellipse('fill',P.x,P.y,P.rx,P.ry) + end end function back.discard() - petal=nil + petal=nil end return back \ No newline at end of file diff --git a/parts/backgrounds/firework.lua b/parts/backgrounds/firework.lua index 7ac853a9..73ead655 100644 --- a/parts/backgrounds/firework.lua +++ b/parts/backgrounds/firework.lua @@ -11,88 +11,88 @@ local back={} local t local firework,particle function back.init() - t=26 - firework,particle={},{} + t=26 + firework,particle={},{} end function back.update(dt) - t=t-1 - if t==0 then - ins(firework,{ - x=nil,y=nil, - x0=SCR.w*(rnd()*1.2-.1), - y0=SCR.h*1.5, - x1=SCR.w*(.15+rnd()*.7), - y1=SCR.h*(.15+rnd()*.4), - t=0, - v=.5+rnd(), - color=COLOR.random_dark(), - big=rnd()<.1, - }) - t=rnd(26,62) - end - for i=#firework,1,-1 do - local F=firework[i] - local time=F.t^.5 - if time>1 then - local x,y,color=F.x,F.y,F.color - if F.big then - SFX.play('fall',.5) - for _=1,rnd(62,126)do - ins(particle,{ - x=x,y=y, - color=color, - vx=rnd()*16-8, - vy=rnd()*16-8, - t=1, - }) - end - else - SFX.play('clear_1',.4) - for _=1,rnd(16,26)do - ins(particle,{ - x=x,y=y, - color=color, - vx=rnd()*8-4, - vy=rnd()*8-4, - t=1, - }) - end - end - rem(firework,i) - else - F.t=F.t+dt*F.v - F.x=F.x0*(1-time)+F.x1*time - F.y=F.y0*(1-time)+F.y1*time - end - end - for i=#particle,1,-1 do - local P=particle[i] - if P.t<0 then - rem(particle,i) - else - P.x=P.x+P.vx - P.y=P.y+P.vy - P.vy=P.vy+.04 - P.t=P.t-dt*.6 - end - end + t=t-1 + if t==0 then + ins(firework,{ + x=nil,y=nil, + x0=SCR.w*(rnd()*1.2-.1), + y0=SCR.h*1.5, + x1=SCR.w*(.15+rnd()*.7), + y1=SCR.h*(.15+rnd()*.4), + t=0, + v=.5+rnd(), + color=COLOR.random_dark(), + big=rnd()<.1, + }) + t=rnd(26,62) + end + for i=#firework,1,-1 do + local F=firework[i] + local time=F.t^.5 + if time>1 then + local x,y,color=F.x,F.y,F.color + if F.big then + SFX.play('fall',.5) + for _=1,rnd(62,126)do + ins(particle,{ + x=x,y=y, + color=color, + vx=rnd()*16-8, + vy=rnd()*16-8, + t=1, + }) + end + else + SFX.play('clear_1',.4) + for _=1,rnd(16,26)do + ins(particle,{ + x=x,y=y, + color=color, + vx=rnd()*8-4, + vy=rnd()*8-4, + t=1, + }) + end + end + rem(firework,i) + else + F.t=F.t+dt*F.v + F.x=F.x0*(1-time)+F.x1*time + F.y=F.y0*(1-time)+F.y1*time + end + end + for i=#particle,1,-1 do + local P=particle[i] + if P.t<0 then + rem(particle,i) + else + P.x=P.x+P.vx + P.y=P.y+P.vy + P.vy=P.vy+.04 + P.t=P.t-dt*.6 + end + end end function back.draw() - gc_clear(.1,.1,.1) - for i=1,#firework do - local F=firework[i] - gc_setColor(F.color) - gc_circle('fill',F.x,F.y,F.big and 8 or 4) - end - gc_setLineWidth(3) - for i=1,#particle do - local P=particle[i] - local c=P.color - gc_setColor(c[1],c[2],c[3],P.t*.4) - gc_line(P.x,P.y,P.x-P.vx*4,P.y-P.vy*4) - end + gc_clear(.1,.1,.1) + for i=1,#firework do + local F=firework[i] + gc_setColor(F.color) + gc_circle('fill',F.x,F.y,F.big and 8 or 4) + end + gc_setLineWidth(3) + for i=1,#particle do + local P=particle[i] + local c=P.color + gc_setColor(c[1],c[2],c[3],P.t*.4) + gc_line(P.x,P.y,P.x-P.vx*4,P.y-P.vy*4) + end end function back.discard() - firework=nil + firework=nil end return back \ No newline at end of file diff --git a/parts/backgrounds/flink.lua b/parts/backgrounds/flink.lua index e5284401..3f052457 100644 --- a/parts/backgrounds/flink.lua +++ b/parts/backgrounds/flink.lua @@ -4,15 +4,15 @@ local back={} local t function back.init() - t=math.random()*2600 + t=math.random()*2600 end function back.update(dt) - t=t+dt + t=t+dt end function back.draw() - local t1=.13-t%3%1.9 - if t1<.2 then gc.clear(t1,t1,t1) - else gc.clear(0,0,0) - end + local t1=.13-t%3%1.9 + if t1<.2 then gc.clear(t1,t1,t1) + else gc.clear(0,0,0) + end end return back \ No newline at end of file diff --git a/parts/backgrounds/glow.lua b/parts/backgrounds/glow.lua index 5bd74921..2d8309c6 100644 --- a/parts/backgrounds/glow.lua +++ b/parts/backgrounds/glow.lua @@ -5,13 +5,13 @@ local back={} local t function back.init() - t=math.random()*2600 + t=math.random()*2600 end function back.update(dt) - t=t+dt + t=t+dt end function back.draw() - local t1=(sin(t*.5)+sin(t*.7)+sin(t*.9+1)+sin(t*1.5)+sin(t*2+10))*.08 - gc.clear(t1,t1,t1) + local t1=(sin(t*.5)+sin(t*.7)+sin(t*.9+1)+sin(t*1.5)+sin(t*2+10))*.08 + gc.clear(t1,t1,t1) end return back \ No newline at end of file diff --git a/parts/backgrounds/lanterns.lua b/parts/backgrounds/lanterns.lua index deb362ec..a2584b38 100644 --- a/parts/backgrounds/lanterns.lua +++ b/parts/backgrounds/lanterns.lua @@ -8,41 +8,41 @@ local back={} local lanterns local t function back.init() - lanterns={} - t=0 + lanterns={} + t=0 end function back.update(dt) - t=t-dt - local H=SCR.h - if t<=0 then - local size=SCR.rad*(2+rnd()*3)/5/2000 - local L={ - x=SCR.w*rnd(), - y=H*1.1, - vy=size*2, - size=size, - phase=rnd(), - vp=(.02+.02*rnd())*(rnd(2)*2-3), - } - ins(lanterns,L) - t=rnd(.626,1.626) - end - for i=#lanterns,1,-1 do - local L=lanterns[i] - L.y=L.y-L.vy*dt*60 - L.phase=(L.phase+L.vp*dt*60)%1 - if L.y<-.1*H then - rem(lanterns,i) - end - end + t=t-dt + local H=SCR.h + if t<=0 then + local size=SCR.rad*(2+rnd()*3)/5/2000 + local L={ + x=SCR.w*rnd(), + y=H*1.1, + vy=size*2, + size=size, + phase=rnd(), + vp=(.02+.02*rnd())*(rnd(2)*2-3), + } + ins(lanterns,L) + t=rnd(.626,1.626) + end + for i=#lanterns,1,-1 do + local L=lanterns[i] + L.y=L.y-L.vy*dt*60 + L.phase=(L.phase+L.vp*dt*60)%1 + if L.y<-.1*H then + rem(lanterns,i) + end + end end function back.draw() - gc.clear(.08,.08,.084) - gc.setColor(1,1,1,.2) - local img=IMG.lanterns - for i=1,#lanterns do - local L=lanterns[i] - mDraw(img[int(L.phase*6)+1],L.x,L.y,nil,L.size) - end + gc.clear(.08,.08,.084) + gc.setColor(1,1,1,.2) + local img=IMG.lanterns + for i=1,#lanterns do + local L=lanterns[i] + mDraw(img[int(L.phase*6)+1],L.x,L.y,nil,L.size) + end end return back \ No newline at end of file diff --git a/parts/backgrounds/league.lua b/parts/backgrounds/league.lua index 7f85cc0e..114262f5 100644 --- a/parts/backgrounds/league.lua +++ b/parts/backgrounds/league.lua @@ -3,34 +3,34 @@ local gc=love.graphics local back={} local upCover do - local L={1,64} - for i=0,63 do - table.insert(L,{'setCL',.6,1,1,i*.01}) - table.insert(L,{'fRect',0,63-i,1,1}) - end - upCover=GC.DO(L) + local L={1,64} + for i=0,63 do + table.insert(L,{'setCL',.6,1,1,i*.01}) + table.insert(L,{'fRect',0,63-i,1,1}) + end + upCover=GC.DO(L) end local downCover do - local L={1,64} - for i=0,63 do - table.insert(L,{'setCL',1,.5,.8,i*.01}) - table.insert(L,{'fRect',0,i,1,1}) - end - downCover=GC.DO(L) + local L={1,64} + for i=0,63 do + table.insert(L,{'setCL',1,.5,.8,i*.01}) + table.insert(L,{'fRect',0,i,1,1}) + end + downCover=GC.DO(L) end local W,H function back.init() - BG.resize(SCR.w,SCR.h) + BG.resize(SCR.w,SCR.h) end function back.resize(w,h) - W,H=w,h + W,H=w,h end function back.update() end function back.draw() - gc.clear(.08,.08,.084) - gc.draw(upCover,0,0,0,W,H*.3/64) - gc.draw(downCover,0,H*.7,0,W,H*.3/64) + gc.clear(.08,.08,.084) + gc.draw(upCover,0,0,0,W,H*.3/64) + gc.draw(downCover,0,H*.7,0,W,H*.3/64) end return back \ No newline at end of file diff --git a/parts/backgrounds/lightning.lua b/parts/backgrounds/lightning.lua index eb46a584..ea7b319d 100644 --- a/parts/backgrounds/lightning.lua +++ b/parts/backgrounds/lightning.lua @@ -4,15 +4,15 @@ local back={} local t function back.init() - t=math.random()*2600 + t=math.random()*2600 end function back.update(dt) - t=t+dt + t=t+dt end function back.draw() - local t1=2.5-t%20%6%2.5 - if t1<.3 then gc.clear(t1,t1,t1) - else gc.clear(0,0,0) - end + local t1=2.5-t%20%6%2.5 + if t1<.3 then gc.clear(t1,t1,t1) + else gc.clear(0,0,0) + end end return back \ No newline at end of file diff --git a/parts/backgrounds/lightning2.lua b/parts/backgrounds/lightning2.lua index bb627583..af268a27 100644 --- a/parts/backgrounds/lightning2.lua +++ b/parts/backgrounds/lightning2.lua @@ -8,19 +8,19 @@ local colorLib=minoColor local blocks=BLOCKS local scs=RSlist.TRS.centerPos function back.init() - t=rnd()*2600 + t=rnd()*2600 end function back.update(dt) - t=t+dt + t=t+dt end function back.draw() - local R=7-int(t*.5%7) - local T=1.2-t%15%6%1.8 - if T<.26 then gc.clear(T,T,T) - else gc.clear(0,0,0) - end - local _=colorLib[SETTING.skin[R]] - gc.setColor(_[1],_[2],_[3],.12) - gc.draw(TEXTURE.miniBlock[R],SCR.cx,SCR.cy,t%3.1416*6,400*SCR.k,nil,scs[R][0][2]+.5,#blocks[R][0]-scs[R][0][1]-.5) + local R=7-int(t*.5%7) + local T=1.2-t%15%6%1.8 + if T<.26 then gc.clear(T,T,T) + else gc.clear(0,0,0) + end + local _=colorLib[SETTING.skin[R]] + gc.setColor(_[1],_[2],_[3],.12) + gc.draw(TEXTURE.miniBlock[R],SCR.cx,SCR.cy,t%3.1416*6,400*SCR.k,nil,scs[R][0][2]+.5,#blocks[R][0]-scs[R][0][1]-.5) end return back \ No newline at end of file diff --git a/parts/backgrounds/matrix.lua b/parts/backgrounds/matrix.lua index a84ac72b..cb5a20b3 100644 --- a/parts/backgrounds/matrix.lua +++ b/parts/backgrounds/matrix.lua @@ -11,21 +11,21 @@ local back={} 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 function back.init() - t=math.random()*2600 + t=math.random()*2600 end function back.update(dt) - t=t+dt + t=t+dt end function back.draw() - gc_clear(.1,.1,.1) - local k=SCR.k - gc_scale(k) - local Y=ceil(SCR.h/80/k) - for x=1,ceil(SCR.w/80/k)do - for y=1,Y do - gc_setColor(1,1,1,sin(x+matrixT[x][y]*t)*.04+.04) - gc_rectangle('fill',80*x,80*y,-80,-80) - end - end + gc_clear(.1,.1,.1) + local k=SCR.k + gc_scale(k) + local Y=ceil(SCR.h/80/k) + for x=1,ceil(SCR.w/80/k)do + for y=1,Y do + gc_setColor(1,1,1,sin(x+matrixT[x][y]*t)*.04+.04) + gc_rectangle('fill',80*x,80*y,-80,-80) + end + end end return back \ No newline at end of file diff --git a/parts/backgrounds/rainbow.lua b/parts/backgrounds/rainbow.lua index 37bef15d..d41dd01e 100644 --- a/parts/backgrounds/rainbow.lua +++ b/parts/backgrounds/rainbow.lua @@ -5,21 +5,21 @@ local shader=SHADER.rgb1 local t function back.init() - t=math.random()*2600 - BG.resize(SCR.w,SCR.h) + t=math.random()*2600 + BG.resize(SCR.w,SCR.h) end function back.resize(_,h) - shader:send('w',SCR.W) - shader:send('h',h*SCR.dpi) + shader:send('w',SCR.W) + shader:send('h',h*SCR.dpi) end function back.update(dt) - t=t+dt + t=t+dt end function back.draw() - gc.clear(.08,.08,.084) - shader:send('t',t) - gc.setShader(shader) - gc.rectangle('fill',0,0,SCR.w,SCR.h) - gc.setShader() + gc.clear(.08,.08,.084) + shader:send('t',t) + gc.setShader(shader) + gc.rectangle('fill',0,0,SCR.w,SCR.h) + gc.setShader() end return back \ No newline at end of file diff --git a/parts/backgrounds/rainbow2.lua b/parts/backgrounds/rainbow2.lua index 7c3d9605..5351ca99 100644 --- a/parts/backgrounds/rainbow2.lua +++ b/parts/backgrounds/rainbow2.lua @@ -5,21 +5,21 @@ local shader=SHADER.rgb2 local t function back.init() - t=math.random()*2600 - BG.resize(SCR.w,SCR.h) + t=math.random()*2600 + BG.resize(SCR.w,SCR.h) end function back.resize(_,h) - shader:send('w',SCR.W) - shader:send('h',h*SCR.dpi) + shader:send('w',SCR.W) + shader:send('h',h*SCR.dpi) end function back.update(dt) - t=t+dt + t=t+dt end function back.draw() - gc.clear(.08,.08,.084) - shader:send('t',t) - gc.setShader(shader) - gc.rectangle('fill',0,0,SCR.w,SCR.h) - gc.setShader() + gc.clear(.08,.08,.084) + shader:send('t',t) + gc.setShader(shader) + gc.rectangle('fill',0,0,SCR.w,SCR.h) + gc.setShader() end return back \ No newline at end of file diff --git a/parts/backgrounds/rgb.lua b/parts/backgrounds/rgb.lua index ad5dd83f..3c110b4c 100644 --- a/parts/backgrounds/rgb.lua +++ b/parts/backgrounds/rgb.lua @@ -5,16 +5,16 @@ local back={} local t function back.init() - t=math.random()*2600 + t=math.random()*2600 end function back.update(dt) - t=t+dt + t=t+dt end function back.draw() - gc.clear( - sin(t*1.2)*.06+.08, - sin(t*1.5)*.06+.08, - sin(t*1.9)*.06+.08 - ) + gc.clear( + sin(t*1.2)*.06+.08, + sin(t*1.5)*.06+.08, + sin(t*1.9)*.06+.08 + ) end return back \ No newline at end of file diff --git a/parts/backgrounds/snow.lua b/parts/backgrounds/snow.lua index dbee262c..c8000236 100644 --- a/parts/backgrounds/snow.lua +++ b/parts/backgrounds/snow.lua @@ -9,43 +9,43 @@ local back={} local t local snow function back.init() - t=0 - snow={} + t=0 + snow={} end function back.update() - t=t+1 - if t%(t%626>260 and 3 or 6)==0 then - ins(snow,{ - x=SCR.w*rnd(), - y=0, - vy=1+rnd()*.6, - vx=rnd()*2-.5, - rx=2+rnd()*2, - ry=2+rnd()*2, - }) - end - for i=#snow,1,-1 do - local P=snow[i] - P.y=P.y+P.vy - if P.y>SCR.h then - rem(snow,i) - else - P.x=P.x+P.vx - P.vx=P.vx-.02+rnd()*.04 - P.rx=max(min(P.rx+rnd()-.5,4),2) - P.ry=max(min(P.ry+rnd()-.5,5),3) - end - end + t=t+1 + if t%(t%626>260 and 3 or 6)==0 then + ins(snow,{ + x=SCR.w*rnd(), + y=0, + vy=1+rnd()*.6, + vx=rnd()*2-.5, + rx=2+rnd()*2, + ry=2+rnd()*2, + }) + end + for i=#snow,1,-1 do + local P=snow[i] + P.y=P.y+P.vy + if P.y>SCR.h then + rem(snow,i) + else + P.x=P.x+P.vx + P.vx=P.vx-.02+rnd()*.04 + P.rx=max(min(P.rx+rnd()-.5,4),2) + P.ry=max(min(P.ry+rnd()-.5,5),3) + end + end end function back.draw() - gc.clear(.08,.08,.084) - gc.setColor(.7,.7,.7) - for i=1,#snow do - local P=snow[i] - ellipse('fill',P.x,P.y,P.rx,P.ry) - end + gc.clear(.08,.08,.084) + gc.setColor(.7,.7,.7) + for i=1,#snow do + local P=snow[i] + ellipse('fill',P.x,P.y,P.rx,P.ry) + end end function back.discard() - snow=nil + snow=nil end return back \ No newline at end of file diff --git a/parts/backgrounds/space.lua b/parts/backgrounds/space.lua index 1a755f16..29cfaff7 100644 --- a/parts/backgrounds/space.lua +++ b/parts/backgrounds/space.lua @@ -7,40 +7,40 @@ local back={} local stars local W,H function back.init() - stars={} - BG.resize(SCR.w,SCR.h) + stars={} + BG.resize(SCR.w,SCR.h) end function back.resize(w,h) - W,H=w+20,h+20 - local S=stars - for i=1,1260,5 do - local s=rnd(26,40)*.1 - S[i]=s*SCR.k --Size - S[i+1]=rnd(W)-10 --X - S[i+2]=rnd(H)-10 --Y - S[i+3]=(rnd()-.5)*.01*s --Vx - S[i+4]=(rnd()-.5)*.01*s --Vy - end + W,H=w+20,h+20 + local S=stars + for i=1,1260,5 do + local s=rnd(26,40)*.1 + S[i]=s*SCR.k --Size + S[i+1]=rnd(W)-10 --X + S[i+2]=rnd(H)-10 --Y + S[i+3]=(rnd()-.5)*.01*s--Vx + S[i+4]=(rnd()-.5)*.01*s--Vy + end end function back.update() - local S=stars - --Star moving - for i=1,1260,5 do - S[i+1]=(S[i+1]+S[i+3])%W - S[i+2]=(S[i+2]+S[i+4])%H - end + local S=stars + --Star moving + for i=1,1260,5 do + S[i+1]=(S[i+1]+S[i+3])%W + S[i+2]=(S[i+2]+S[i+4])%H + end end function back.draw() - gc.clear(.08,.08,.084) - if not stars[1]then return end - gc.translate(-10,-10) - gc.setColor(1,1,1,.6) - for i=1,1260,5 do - rectangle('fill',stars[i+1],stars[i+2],stars[i],stars[i]) - end - gc.translate(10,10) + gc.clear(.08,.08,.084) + if not stars[1]then return end + gc.translate(-10,-10) + gc.setColor(1,1,1,.6) + for i=1,1260,5 do + rectangle('fill',stars[i+1],stars[i+2],stars[i],stars[i]) + end + gc.translate(10,10) end function back.discard() - stars=nil + stars=nil end return back \ No newline at end of file diff --git a/parts/backgrounds/tunnel.lua b/parts/backgrounds/tunnel.lua index f3449fe5..7ced0911 100644 --- a/parts/backgrounds/tunnel.lua +++ b/parts/backgrounds/tunnel.lua @@ -8,36 +8,36 @@ local ring local t local W,H function back.init() - ring={} - t=26 - back.resize(SCR.w,SCR.h) + ring={} + t=26 + back.resize(SCR.w,SCR.h) end function back.resize(w,h) - W,H=w,h + W,H=w,h end function back.update(dt) - t=t-1 - if t==0 then - t=rnd(26,62) - ins(ring,0) - end - for i=#ring,1,-1 do - ring[i]=ring[i]+dt - if ring[i]>3.55 then - rem(ring,i) - end - end + t=t-1 + if t==0 then + t=rnd(26,62) + ins(ring,0) + end + for i=#ring,1,-1 do + ring[i]=ring[i]+dt + if ring[i]>3.55 then + rem(ring,i) + end + end end function back.draw() - gc.clear(.08,.08,.084) - gc.setColor(1,1,1,.1) - for i=1,#ring do - local r=ring[i]^2/12 - gc.setLineWidth(30-15/(r+.5)) - gc.rectangle('line',W*.5-W*r/2,H*.5-H*r/2,W*r,H*r) - end + gc.clear(.08,.08,.084) + gc.setColor(1,1,1,.1) + for i=1,#ring do + local r=ring[i]^2/12 + gc.setLineWidth(30-15/(r+.5)) + gc.rectangle('line',W*.5-W*r/2,H*.5-H*r/2,W*r,H*r) + end end function back.discard() - ring=nil + ring=nil end return back \ No newline at end of file diff --git a/parts/backgrounds/welcome.lua b/parts/backgrounds/welcome.lua index 3604077b..286fb5ec 100644 --- a/parts/backgrounds/welcome.lua +++ b/parts/backgrounds/welcome.lua @@ -6,34 +6,34 @@ local back={} local t local txt function back.init() - t=math.random()*2600 - txt=gc.newText(getFont(80),"Welcome To Techmino") + t=math.random()*2600 + txt=gc.newText(getFont(80),"Welcome To Techmino") end function back.update(dt) - t=t+dt + t=t+dt end function back.draw() - if -t%13.55<.1283 then - gc.clear(.2+.1*sin(t),.2+.1*sin(1.26*t),.2+.1*sin(1.626*t)) - else - gc.clear(.08,.08,.084) - end - gc.push('transform') - gc.translate(SCR.cx,SCR.cy+20*sin(t*.02)) - gc.scale(SCR.k) - gc.scale(1.1626,1.26) - if -t%6.26<.1355 then - gc.translate(60*sin(t*.26),100*sin(t*.626)) - end - if -t%12.6<.1626 then - gc.rotate(t+5*sin(.26*t)+5*sin(.626*t)) - end - gc.setColor(.4,.6,1,.3) - gc.draw(txt,-883*.5+4*sin(t*.7942),-110*.5+4*sin(t*.7355)) - gc.setColor(.5,.7,1,.4) - gc.draw(txt,-883*.5+2*sin(t*.77023),-110*.5+2*sin(t*.7026)) - gc.setColor(1,1,1,.5) - gc.draw(txt,-883*.5+3*sin(t*.7283),-110*.5+3*sin(t*.7626)) - gc.pop() + if -t%13.55<.1283 then + gc.clear(.2+.1*sin(t),.2+.1*sin(1.26*t),.2+.1*sin(1.626*t)) + else + gc.clear(.08,.08,.084) + end + gc.push('transform') + gc.translate(SCR.cx,SCR.cy+20*sin(t*.02)) + gc.scale(SCR.k) + gc.scale(1.1626,1.26) + if -t%6.26<.1355 then + gc.translate(60*sin(t*.26),100*sin(t*.626)) + end + if -t%12.6<.1626 then + gc.rotate(t+5*sin(.26*t)+5*sin(.626*t)) + end + gc.setColor(.4,.6,1,.3) + gc.draw(txt,-883*.5+4*sin(t*.7942),-110*.5+4*sin(t*.7355)) + gc.setColor(.5,.7,1,.4) + gc.draw(txt,-883*.5+2*sin(t*.77023),-110*.5+2*sin(t*.7026)) + gc.setColor(1,1,1,.5) + gc.draw(txt,-883*.5+3*sin(t*.7283),-110*.5+3*sin(t*.7626)) + gc.pop() end return back \ No newline at end of file diff --git a/parts/backgrounds/wing.lua b/parts/backgrounds/wing.lua index d1d37ced..bb8b90f5 100644 --- a/parts/backgrounds/wing.lua +++ b/parts/backgrounds/wing.lua @@ -3,71 +3,71 @@ local gc=love.graphics local rnd=math.random local back={} local wingColor={ - {.3,.9,.9,.2}, - {.5,1.,.5,.2}, - {.9,.9,.3,.2}, - {1.,.7,.3,.2}, - {1.,.5,.5,.2}, - {.7,.3,1.,.2}, - {.5,.5,1.,.2}, - {.3,.9,.9,.2}, + {.3,.9,.9,.2}, + {.5,1.,.5,.2}, + {.9,.9,.3,.2}, + {1.,.7,.3,.2}, + {1.,.5,.5,.2}, + {.7,.3,1.,.2}, + {.5,.5,1.,.2}, + {.3,.9,.9,.2}, } local bar,crystal local W,H function back.init() - bar=gc.newCanvas(41,1) - gc.setCanvas(bar) - gc.push('transform') - gc.origin() - for x=0,20 do - gc.setColor(1,1,1,x/5) - gc.rectangle('fill',x,0,1,1) - gc.rectangle('fill',41-x,0,1,1) - end - gc.pop() - gc.setCanvas() - back.resize() + bar=gc.newCanvas(41,1) + gc.setCanvas(bar) + gc.push('transform') + gc.origin() + for x=0,20 do + gc.setColor(1,1,1,x/5) + gc.rectangle('fill',x,0,1,1) + gc.rectangle('fill',41-x,0,1,1) + end + gc.pop() + gc.setCanvas() + back.resize() end function back.resize() - crystal={} - W,H=SCR.w,SCR.h - for i=1,16 do - crystal[i]={ - x=i<9 and W*.05*i or W*.05*(28-i), - y=H*.1, - a=0, - va=0, - f=i<9 and .012-i*.0005 or .012-(17-i)*.0005 - } - end + crystal={} + W,H=SCR.w,SCR.h + for i=1,16 do + crystal[i]={ + x=i<9 and W*.05*i or W*.05*(28-i), + y=H*.1, + a=0, + va=0, + f=i<9 and .012-i*.0005 or .012-(17-i)*.0005 + } + end end function back.update() - for i=1,16 do - local B=crystal[i] - B.a=B.a+B.va - B.va=B.va*.986-B.a*B.f - end + for i=1,16 do + local B=crystal[i] + B.a=B.a+B.va + B.va=B.va*.986-B.a*B.f + end end function back.draw() - gc.clear(.06,.06,.06) - local sk,sy=SCR.k,H*.8 - for i=1,8 do - gc.setColor(wingColor[i]) - local B=crystal[i] - gc.draw(bar,B.x,B.y,B.a,sk,sy,20,0) - B=crystal[17-i] - gc.draw(bar,B.x,B.y,B.a,sk,sy,20,0) - end + gc.clear(.06,.06,.06) + local sk,sy=SCR.k,H*.8 + for i=1,8 do + gc.setColor(wingColor[i]) + local B=crystal[i] + gc.draw(bar,B.x,B.y,B.a,sk,sy,20,0) + B=crystal[17-i] + gc.draw(bar,B.x,B.y,B.a,sk,sy,20,0) + end end function back.event(level) - for i=1,8 do - local B=crystal[i] - B.va=B.va+.001*level*(1+rnd()) - B=crystal[17-i] - B.va=B.va-.001*level*(1+rnd()) - end + for i=1,8 do + local B=crystal[i] + B.va=B.va+.001*level*(1+rnd()) + B=crystal[17-i] + B.va=B.va-.001*level*(1+rnd()) + end end function back.discard() - bar,crystal=nil + bar,crystal=nil end return back \ No newline at end of file diff --git a/parts/bot/bot_9s.lua b/parts/bot/bot_9s.lua index 8ae6d1ff..cf1360de 100644 --- a/parts/bot/bot_9s.lua +++ b/parts/bot/bot_9s.lua @@ -1,15 +1,15 @@ --[[ControlID: - 1~5:mL,mR,rR,rL,rF, - 6~10:hD,sD,H,A,R, - 11~13:LL,RR,DD + 1~5:mL,mR,rR,rL,rF, + 6~10:hD,sD,H,A,R, + 11~13:LL,RR,DD ]] --[[Future: - HighestBlock - BlockedCells - Wells - FilledLines - 4deepShape - BlockedWells + HighestBlock + BlockedCells + Wells + FilledLines + 4deepShape + BlockedWells ]] local min,abs=math.min,math.abs local ins,rem=table.insert,table.remove @@ -17,184 +17,184 @@ local yield=coroutine.yield local dirCount={1,1,3,3,3,0,1} local FCL={ - [1]={ - {{11},{11,2},{1},{},{2},{2,2},{12,1},{12}}, - {{11,4},{11,3},{1,4},{4},{3},{2,3},{2,2,3},{12,4},{12,3}}, - }, - [3]={ - {{11},{11,2},{1},{},{2},{2,2},{12,1},{12}}, - {{3,11},{11,3},{11,2,3},{1,3},{3},{2,3},{2,2,3},{12,1,3},{12,3}}, - {{11,5},{11,2,5},{1,5},{5},{2,5},{2,2,5},{12,1,5},{12,5}}, - {{11,4},{11,2,4},{1,4},{4},{2,4},{2,2,4},{12,1,4},{12,4},{4,12}}, - }, - [6]={ - {{11},{11,2},{1,1},{1},{},{2},{2,2},{12,1},{12}}, - }, - [7]={ - {{11},{11,2},{1},{},{2},{12,1},{12}}, - {{4,11},{11,4},{11,3},{1,4},{4},{3},{2,3},{12,4},{12,3},{3,12}}, - }, + [1]={ + {{11},{11,2},{1},{},{2},{2,2},{12,1},{12}}, + {{11,4},{11,3},{1,4},{4},{3},{2,3},{2,2,3},{12,4},{12,3}}, + }, + [3]={ + {{11},{11,2},{1},{},{2},{2,2},{12,1},{12}}, + {{3,11},{11,3},{11,2,3},{1,3},{3},{2,3},{2,2,3},{12,1,3},{12,3}}, + {{11,5},{11,2,5},{1,5},{5},{2,5},{2,2,5},{12,1,5},{12,5}}, + {{11,4},{11,2,4},{1,4},{4},{2,4},{2,2,4},{12,1,4},{12,4},{4,12}}, + }, + [6]={ + {{11},{11,2},{1,1},{1},{},{2},{2,2},{12,1},{12}}, + }, + [7]={ + {{11},{11,2},{1},{},{2},{12,1},{12}}, + {{4,11},{11,4},{11,3},{1,4},{4},{3},{2,3},{12,4},{12,3},{3,12}}, + }, }FCL[2],FCL[4],FCL[5]=FCL[1],FCL[3],FCL[3] local LclearScore={[0]=0,-200,-150,-100,200} local HclearScore={[0]=0,100,140,200,500} local function _ifoverlapAI(f,bk,x,y) - 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 return true end - end end + 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 return true end + end end end local discardRow=FREEROW.discard local getRow=FREEROW.get local function _resetField(f0,f,start) - for _=#f,start,-1 do - discardRow(f[_]) - f[_]=nil - end - for i=start,#f0 do - f[i]=getRow(0) - for j=1,10 do - f[i][j]=f0[i][j] - end - end + for _=#f,start,-1 do + discardRow(f[_]) + f[_]=nil + end + for i=start,#f0 do + f[i]=getRow(0) + for j=1,10 do + f[i][j]=f0[i][j] + end + end end local function _getScore(field,cb,cy) - local score=0 - local highest=0 - local height=getRow(0) - local clear=0 - local hole=0 + local score=0 + local highest=0 + local height=getRow(0) + local clear=0 + local hole=0 - for i=cy+#cb-1,cy,-1 do - for j=1,10 do - if field[i][j]==0 then goto CONTINUE_notFull end - end - discardRow(rem(field,i)) - clear=clear+1 - ::CONTINUE_notFull:: - end - if #field==0 then return 1e99 end--PC - for x=1,10 do - local h=#field - while field[h][x]==0 and h>1 do - h=h-1 - end - height[x]=h - if x>3 and x<8 and h>highest then highest=h end - if h>1 then - for h1=h-1,1,-1 do - if field[h1][x]==0 then - hole=hole+1 - if hole==5 then break end - end - end - end - end - local sdh=0 - local h1,mh1=0,0 - for x=1,9 do - local dh=abs(height[x]-height[x+1]) - if dh==1 then - h1=h1+1 - if h1>mh1 then mh1=h1 end - else - h1=0 - end - sdh=sdh+min(dh^1.6,20) - end - discardRow(height) - score= - -#field*30 - -#cb*15 - +(#field>10 and - HclearScore[clear]--Clearing - -hole*70--Hole - -cy*50--Height - -sdh--Sum of DeltaH - or - LclearScore[clear] - -hole*100 - -cy*40 - -sdh*3 - ) - if #field>6 then score=score-highest*5+20 end - if mh1>3 then score=score-20-mh1*30 end - return score + for i=cy+#cb-1,cy,-1 do + for j=1,10 do + if field[i][j]==0 then goto CONTINUE_notFull end + end + discardRow(rem(field,i)) + clear=clear+1 + ::CONTINUE_notFull:: + end + if #field==0 then return 1e99 end--PC + for x=1,10 do + local h=#field + while field[h][x]==0 and h>1 do + h=h-1 + end + height[x]=h + if x>3 and x<8 and h>highest then highest=h end + if h>1 then + for h1=h-1,1,-1 do + if field[h1][x]==0 then + hole=hole+1 + if hole==5 then break end + end + end + end + end + local sdh=0 + local h1,mh1=0,0 + for x=1,9 do + local dh=abs(height[x]-height[x+1]) + if dh==1 then + h1=h1+1 + if h1>mh1 then mh1=h1 end + else + h1=0 + end + sdh=sdh+min(dh^1.6,20) + end + discardRow(height) + score= + -#field*30 + -#cb*15 + +(#field>10 and + HclearScore[clear]--Clearing + -hole*70--Hole + -cy*50--Height + -sdh--Sum of DeltaH + or + LclearScore[clear] + -hole*100 + -cy*40 + -sdh*3 + ) + if #field>6 then score=score-highest*5+20 end + if mh1>3 then score=score-20-mh1*30 end + return score end local bot_9s={} function bot_9s.thread(bot) - local P,data,keys=bot.P,bot.data,bot.keys - while true do - --Thinking - yield() - local Tfield={}--Test field - local best={x=1,dir=0,hold=false,score=-1e99}--Best method - local field_org=P.field - for i=1,#field_org do - Tfield[i]=getRow(0) - for j=1,10 do - Tfield[i][j]=field_org[i][j] - end - end + local P,data,keys=bot.P,bot.data,bot.keys + while true do + --Thinking + yield() + local Tfield={}--Test field + local best={x=1,dir=0,hold=false,score=-1e99}--Best method + local field_org=P.field + for i=1,#field_org do + Tfield[i]=getRow(0) + for j=1,10 do + Tfield[i][j]=field_org[i][j] + end + end - for ifhold=0,data.hold and P.gameEnv.holdCount>0 and 1 or 0 do - --Get block id - local bn - if ifhold==0 then - bn=P.cur and P.cur.id - else - bn=P.holdQueue[1]and P.holdQueue[1].id or P.nextQueue[1]and P.nextQueue[1].id - end - if bn then - for dir=0,dirCount[bn]do--Each dir - local cb=BLOCKS[bn][dir] - for cx=1,11-#cb[1]do--Each pos - local cy=#Tfield+1 + for ifhold=0,data.hold and P.gameEnv.holdCount>0 and 1 or 0 do + --Get block id + local bn + if ifhold==0 then + bn=P.cur and P.cur.id + else + bn=P.holdQueue[1]and P.holdQueue[1].id or P.nextQueue[1]and P.nextQueue[1].id + end + if bn then + for dir=0,dirCount[bn]do--Each dir + local cb=BLOCKS[bn][dir] + for cx=1,11-#cb[1]do--Each pos + local cy=#Tfield+1 - --Move to bottom - while cy>1 and not _ifoverlapAI(Tfield,cb,cx,cy-1)do - cy=cy-1 - end + --Move to bottom + while cy>1 and not _ifoverlapAI(Tfield,cb,cx,cy-1)do + cy=cy-1 + end - --Simulate lock - for i=1,#cb do - local y=cy+i-1 - if not Tfield[y]then Tfield[y]=getRow(0)end - local L=Tfield[y] - for j=1,#cb[1]do - if cb[i][j]then - L[cx+j-1]=1 - end - end - end - local score=_getScore(Tfield,cb,cy) - if score>best.score then - best={bn=bn,x=cx,dir=dir,hold=ifhold==1,score=score} - end - _resetField(field_org,Tfield,cy) - end - end - end - end - if not best.bn then return 1 end + --Simulate lock + for i=1,#cb do + local y=cy+i-1 + if not Tfield[y]then Tfield[y]=getRow(0)end + local L=Tfield[y] + for j=1,#cb[1]do + if cb[i][j]then + L[cx+j-1]=1 + end + end + end + local score=_getScore(Tfield,cb,cy) + if score>best.score then + best={bn=bn,x=cx,dir=dir,hold=ifhold==1,score=score} + end + _resetField(field_org,Tfield,cy) + end + end + end + end + if not best.bn then return 1 end - --Release cache - while #Tfield>0 do - discardRow(rem(Tfield,1)) - end - if best.hold then - ins(keys,8) - end - local l=FCL[best.bn][best.dir+1][best.x] - for i=1,#l do - ins(keys,l[i]) - end - ins(keys,6) + --Release cache + while #Tfield>0 do + discardRow(rem(Tfield,1)) + end + if best.hold then + ins(keys,8) + end + local l=FCL[best.bn][best.dir+1][best.x] + for i=1,#l do + ins(keys,l[i]) + end + ins(keys,6) - --Check if time to change target - yield() - if P.aiRND:random()<.00126 then - P:changeAtkMode(P.aiRND:random()<.85 and 1 or #P.atker>3 and 4 or P.aiRND:random()<.3 and 2 or 3) - end - end + --Check if time to change target + yield() + if P.aiRND:random()<.00126 then + P:changeAtkMode(P.aiRND:random()<.85 and 1 or #P.atker>3 and 4 or P.aiRND:random()<.3 and 2 or 3) + end + end end return bot_9s \ No newline at end of file diff --git a/parts/bot/bot_cc.lua b/parts/bot/bot_cc.lua index 0d6eaa02..96a6b64f 100644 --- a/parts/bot/bot_cc.lua +++ b/parts/bot/bot_cc.lua @@ -1,55 +1,55 @@ --[[ControlID: - 1~5:mL,mR,rR,rL,rF, - 6~10:hD,sD,H,A,R, - 11~13:LL,RR,DD + 1~5:mL,mR,rR,rL,rF, + 6~10:hD,sD,H,A,R, + 11~13:LL,RR,DD ]] local ins,rem=table.insert,table.remove local yield=coroutine.yield local bot_cc={} function bot_cc:pushNewNext(id) - self.bot:addNext(rem(self.nexts,1)) - ins(self.nexts,id) + self.bot:addNext(rem(self.nexts,1)) + ins(self.nexts,id) end function bot_cc:thread() - local P,keys=self.P,self.keys - local ccBot=self.ccBot - while true do - --Start thinking - yield() - ccBot:think() + local P,keys=self.P,self.keys + local ccBot=self.ccBot + while true do + --Start thinking + yield() + ccBot:think() - --Poll keys - local success,result,dest,hold,move - repeat - yield() - success,result,dest,hold,move=ccBot:getMove() - until not success or result==0 or result==2 - if not success then break end - if result==2 then - break - elseif result==0 then - dest[5],dest[6]=dest[1][1],dest[1][2] - dest[7],dest[8]=dest[2][1],dest[2][2] - dest[1],dest[2]=dest[3][1],dest[3][2] - dest[3],dest[4]=dest[4][1],dest[4][2] - P.AI_dest=dest - if hold then keys[1]=8 end--Hold - while move[1]do - local m=rem(move,1) - if m<4 then - ins(keys,m+1) - elseif not P.AIdata._20G then - ins(keys,13) - end - end - ins(keys,6) - end + --Poll keys + local success,result,dest,hold,move + repeat + yield() + success,result,dest,hold,move=ccBot:getMove() + until not success or result==0 or result==2 + if not success then break end + if result==2 then + break + elseif result==0 then + dest[5],dest[6]=dest[1][1],dest[1][2] + dest[7],dest[8]=dest[2][1],dest[2][2] + dest[1],dest[2]=dest[3][1],dest[3][2] + dest[3],dest[4]=dest[4][1],dest[4][2] + P.AI_dest=dest + if hold then keys[1]=8 end--Hold + while move[1]do + local m=rem(move,1) + if m<4 then + ins(keys,m+1) + elseif not P.AIdata._20G then + ins(keys,13) + end + end + ins(keys,6) + end - --Check if time to change target - yield() - if P.aiRND:random()<.00126 then - P:changeAtkMode(P.aiRND:random()<.85 and 1 or #P.atker>3 and 4 or P.aiRND:random()<.3 and 2 or 3) - end - end + --Check if time to change target + yield() + if P.aiRND:random()<.00126 then + P:changeAtkMode(P.aiRND:random()<.85 and 1 or #P.atker>3 and 4 or P.aiRND:random()<.3 and 2 or 3) + end + end end return bot_cc \ No newline at end of file diff --git a/parts/bot/init.lua b/parts/bot/init.lua index f106c15a..ca1a2f04 100644 --- a/parts/bot/init.lua +++ b/parts/bot/init.lua @@ -1,35 +1,35 @@ local ins,rem=table.insert,table.remove local baseBot={ - pushNewNext=NULL, - updateField=NULL, - lockWrongPlace=NULL, - switch20G=NULL, - revive=NULL, + pushNewNext=NULL, + updateField=NULL, + lockWrongPlace=NULL, + switch20G=NULL, + revive=NULL, } function baseBot.update(bot) - local P=bot.P - local keys=bot.keys - if P.control and P.waiting==-1 then - bot.delay=bot.delay-1 - if not keys[1]then - if bot.runningThread then - pcall(bot.runningThread) - else - P:act_hardDrop() - end - elseif bot.delay<=0 then - bot.delay=bot.delay0*.5 - P:pressKey(keys[1])P:releaseKey(keys[1]) - rem(keys,1) - end - end + local P=bot.P + local keys=bot.keys + if P.control and P.waiting==-1 then + bot.delay=bot.delay-1 + if not keys[1]then + if bot.runningThread then + pcall(bot.runningThread) + else + P:act_hardDrop() + end + elseif bot.delay<=0 then + bot.delay=bot.delay0*.5 + P:pressKey(keys[1])P:releaseKey(keys[1]) + rem(keys,1) + end + end end local function _undefMethod(self,k) - print("Undefined method: "..k) - self[k]=NULL - return NULL + print("Undefined method: "..k) + self[k]=NULL + return NULL end local botMeta={__index=_undefMethod} @@ -37,75 +37,75 @@ local BOT={} local AISpeed={60,50,40,30,20,14,10,6,4,3} function BOT.template(arg) - if arg.type=='CC'then - if not arg.hold then arg.hold=false else arg.hold=true end - return{ - type='CC', - next=arg.next, - hold=arg.hold, - delay=AISpeed[arg.speedLV], - ["args.node"]=arg.node, - } - elseif arg.type=='9S'then - return{ - type='9S', - delay=math.floor(AISpeed[arg.speedLV]), - hold=arg.hold, - } - end + if arg.type=='CC'then + if not arg.hold then arg.hold=false else arg.hold=true end + return{ + type='CC', + next=arg.next, + hold=arg.hold, + delay=AISpeed[arg.speedLV], + ["args.node"]=arg.node, + } + elseif arg.type=='9S'then + return{ + type='9S', + delay=math.floor(AISpeed[arg.speedLV]), + hold=arg.hold, + } + end end function BOT.new(P,data) - local bot={P=P,data=data} - if data.type=="CC"then - -- P:setRS('SRS') - -- bot.keys={} - -- bot.nexts={} - -- bot.delay=data.delay - -- bot.delay0=data.delay - -- if P.gameEnv.holdCount and P.gameEnv.holdCount>1 then P:setHold(1)end + local bot={P=P,data=data} + if data.type=="CC"then + -- P:setRS('SRS') + -- bot.keys={} + -- bot.nexts={} + -- bot.delay=data.delay + -- bot.delay0=data.delay + -- if P.gameEnv.holdCount and P.gameEnv.holdCount>1 then P:setHold(1)end - -- local cc=require"parts.bot.cc_wrapper" - -- local opt,wei=cc.getConf() - -- wei:fastWeights() - -- opt:setHold(P.AIdata.hold) - -- opt:set20G(P.AIdata._20G) - -- opt:setBag(P.AIdata.bag=='bag') - -- opt:setNode(P.AIdata.node) - -- bot.ccBot=cc.new(opt,wei) - -- local cc_lua=require"parts.bot.bot_cc" - -- setmetatable(bot,{__index=function(self,k) - -- if self.ccBot[k]then - -- self.ccBot[k](self.ccBot) - -- elseif cc_lua[k]then - -- cc_lua[k](self) - -- elseif baseBot[k]then - -- baseBot[k](self) - -- end - -- end}) + -- local cc=require"parts.bot.cc_wrapper" + -- local opt,wei=cc.getConf() + -- wei:fastWeights() + -- opt:setHold(P.AIdata.hold) + -- opt:set20G(P.AIdata._20G) + -- opt:setBag(P.AIdata.bag=='bag') + -- opt:setNode(P.AIdata.node) + -- bot.ccBot=cc.new(opt,wei) + -- local cc_lua=require"parts.bot.bot_cc" + -- setmetatable(bot,{__index=function(self,k) + -- if self.ccBot[k]then + -- self.ccBot[k](self.ccBot) + -- elseif cc_lua[k]then + -- cc_lua[k](self) + -- elseif baseBot[k]then + -- baseBot[k](self) + -- end + -- end}) - -- for i,B in next,P.gameEnv.nextQueue do - -- if i<=data.next then - -- bot:addNext(B.id) - -- else - -- ins(bot.nexts,B.id) - -- end - -- end - -- bot.runningThread=coroutine.wrap(cc_lua.thread) - -- bot.runningThread(bot) - setmetatable(bot,botMeta) - elseif data.type=="9S"or true then--9s or else - TABLE.cover(baseBot,bot) - TABLE.cover(require"parts.bot.bot_9s",bot) - P:setRS('TRS') - bot.keys={} - bot.delay=data.delay - bot.delay0=data.delay - bot.runningThread=coroutine.wrap(bot.thread) - bot.runningThread(bot) - setmetatable(bot,botMeta) - end - return bot + -- for i,B in next,P.gameEnv.nextQueue do + -- if i<=data.next then + -- bot:addNext(B.id) + -- else + -- ins(bot.nexts,B.id) + -- end + -- end + -- bot.runningThread=coroutine.wrap(cc_lua.thread) + -- bot.runningThread(bot) + setmetatable(bot,botMeta) + elseif data.type=="9S"or true then--9s or else + TABLE.cover(baseBot,bot) + TABLE.cover(require"parts.bot.bot_9s",bot) + P:setRS('TRS') + bot.keys={} + bot.delay=data.delay + bot.delay0=data.delay + bot.runningThread=coroutine.wrap(bot.thread) + bot.runningThread(bot) + setmetatable(bot,botMeta) + end + return bot end return BOT \ No newline at end of file diff --git a/parts/customEnv0.lua b/parts/customEnv0.lua index bec20267..b0dff048 100644 --- a/parts/customEnv0.lua +++ b/parts/customEnv0.lua @@ -1,43 +1,43 @@ return{ - version=VERSION.code, + version=VERSION.code, - --Basic - drop=1e99, - lock=1e99, - wait=0, - fall=0, + --Basic + drop=1e99, + lock=1e99, + wait=0, + fall=0, - --Control - nextCount=6, - holdCount=1, - infHold=true, - phyHold=false, + --Control + nextCount=6, + holdCount=1, + infHold=true, + phyHold=false, - --Visual - bone=false, + --Visual + bone=false, - --Rule - sequence='bag', - fieldH=20, - heightLimit=1e99, - bufferLimit=1e99, + --Rule + sequence='bag', + fieldH=20, + heightLimit=1e99, + bufferLimit=1e99, - ospin=true, - fineKill=false, - b2bKill=false, - easyFresh=true, - deepDrop=false, - visible='show', - freshLimit=1e99, + ospin=true, + fineKill=false, + b2bKill=false, + easyFresh=true, + deepDrop=false, + visible='show', + freshLimit=1e99, - opponent="X", - life=0, - pushSpeed=3, - garbageSpeed=1, - missionKill=false, + opponent="X", + life=0, + pushSpeed=3, + garbageSpeed=1, + missionKill=false, - --Else - bg='blockrain', - bgm='hang out', + --Else + bg='blockrain', + bgm='hang out', } diff --git a/parts/data.lua b/parts/data.lua index 4e22ed83..faaa4a82 100644 --- a/parts/data.lua +++ b/parts/data.lua @@ -8,423 +8,423 @@ local DATA={} --Sep symbol: 33 (!) --Safe char: 34~126 --[[ - Count: 34~96 - Block: 97~125 - Encode: A[B] sequence, A = block ID, B = repeat times, no B means do not repeat. - Example: "abcdefg" is [SZJLTOI], "a^aDb)" is [Z*63,Z*37,S*10] + Count: 34~96 + Block: 97~125 + Encode: A[B] sequence, A = block ID, B = repeat times, no B means do not repeat. + Example: "abcdefg" is [SZJLTOI], "a^aDb)" is [Z*63,Z*37,S*10] ]] function DATA.copySequence() - local str="" + local str="" - local count=1 - for i=1,#BAG+1 do - if BAG[i+1]~=BAG[i]or count==64 then - str=str..char(96+BAG[i]) - if count>1 then - str=str..char(32+count) - count=1 - end - else - count=count+1 - end - end + local count=1 + for i=1,#BAG+1 do + if BAG[i+1]~=BAG[i]or count==64 then + str=str..char(96+BAG[i]) + if count>1 then + str=str..char(32+count) + count=1 + end + else + count=count+1 + end + end - return str + return str end function DATA.pasteSequence(str) - TABLE.cut(BAG) - local b,reg - for i=1,#str do - b=byte(str,i) - if not reg then - if b>=97 and b<=125 then - reg=b-96 - else - return - end - else - if b>=97 and b<=125 then - ins(BAG,reg) - reg=b-96 - elseif b>=34 and b<=96 then - for _=1,b-32 do - ins(BAG,reg) - end - reg=false - end - end - end - if reg then ins(BAG,reg)end - return true + TABLE.cut(BAG) + local b,reg + for i=1,#str do + b=byte(str,i) + if not reg then + if b>=97 and b<=125 then + reg=b-96 + else + return + end + else + if b>=97 and b<=125 then + ins(BAG,reg) + reg=b-96 + elseif b>=34 and b<=96 then + for _=1,b-32 do + ins(BAG,reg) + end + reg=false + end + end + end + if reg then ins(BAG,reg)end + return true end function DATA.newBoard(f)--Generate a new board - if f then - return TABLE.shift(f) - else - local F={} - for i=1,20 do F[i]={0,0,0,0,0,0,0,0,0,0}end - return F - end + if f then + return TABLE.shift(f) + else + local F={} + for i=1,20 do F[i]={0,0,0,0,0,0,0,0,0,0}end + return F + end end function DATA.copyBoard(page)--Copy the [page] board - local F=FIELD[page or 1] - local str="" - local H=0 + local F=FIELD[page or 1] + local str="" + local H=0 - for y=20,1,-1 do - for x=1,10 do - if F[y][x]~=0 then - H=y - goto BREAK_topFound - end - end - end - ::BREAK_topFound:: + for y=20,1,-1 do + for x=1,10 do + if F[y][x]~=0 then + H=y + goto BREAK_topFound + end + end + end + ::BREAK_topFound:: - --Encode field - for y=1,H do - local S="" - local L=F[y] - for x=1,10 do - S=S..char(L[x]+1) - end - str=str..S - end - return STRING.packBin(str) + --Encode field + for y=1,H do + local S="" + local L=F[y] + for x=1,10 do + S=S..char(L[x]+1) + end + str=str..S + end + return STRING.packBin(str) end function DATA.copyBoards() - local out={} - for i=1,#FIELD do - out[i]=DATA.copyBoard(i) - end - return table.concat(out,"!") + local out={} + for i=1,#FIELD do + out[i]=DATA.copyBoard(i) + end + return table.concat(out,"!") end function DATA.pasteBoard(str,page)--Paste [str] data to [page] board - if not page then page=1 end - if not FIELD[page]then FIELD[page]=DATA.newBoard()end - local F=FIELD[page] + if not page then page=1 end + if not FIELD[page]then FIELD[page]=DATA.newBoard()end + local F=FIELD[page] - --Decode - str=STRING.unpackBin(str) - if not str then return end + --Decode + str=STRING.unpackBin(str) + if not str then return end - local fX,fY=1,1--*ptr for Field(r*10+(c-1)) - local p=1 - while true do - local b=byte(str,p)--1byte + local fX,fY=1,1--*ptr for Field(r*10+(c-1)) + local p=1 + while true do + local b=byte(str,p)--1byte - --Str end - if not b then - if fX~=1 then - return - else - break - end - end + --Str end + if not b then + if fX~=1 then + return + else + break + end + end - local id=b%32-1--Block id - if id>26 then return end--Illegal blockid - b=int(b/32)--Mode id + local id=b%32-1--Block id + if id>26 then return end--Illegal blockid + b=int(b/32)--Mode id - F[fY][fX]=id - if fX<10 then - fX=fX+1 - else - fY=fY+1 - if fY>20 then break end - fX=1 - end - p=p+1 - end + F[fY][fX]=id + if fX<10 then + fX=fX+1 + else + fY=fY+1 + if fY>20 then break end + fX=1 + end + p=p+1 + end - for y=fY,20 do - for x=1,10 do - F[y][x]=0 - end - end + for y=fY,20 do + for x=1,10 do + F[y][x]=0 + end + end - return true + return true end --[[ - Mission: 34~114 - Count: 115~126 - Encode: [A] or [AB] sequence, A = mission ID, B = repeat times, no B means do not repeat. + Mission: 34~114 + Count: 115~126 + Encode: [A] or [AB] sequence, A = mission ID, B = repeat times, no B means do not repeat. - _1=01,_2=02,_3=03,_4=04, - A1=05,A2=06,A3=07,A4=08, - PC=09, - Z1=11,Z2=12,Z3=13, - S1=21,S2=22,S3=23, - J1=31,J2=32,J3=33, - L1=41,L2=42,L3=43, - T1=51,T2=52,T3=53, - O1=61,O2=62,O3=63,O4=64, - I1=71,I2=72,I3=73,I4=74, + _1=01,_2=02,_3=03,_4=04, + A1=05,A2=06,A3=07,A4=08, + PC=09, + Z1=11,Z2=12,Z3=13, + S1=21,S2=22,S3=23, + J1=31,J2=32,J3=33, + L1=41,L2=42,L3=43, + T1=51,T2=52,T3=53, + O1=61,O2=62,O3=63,O4=64, + I1=71,I2=72,I3=73,I4=74, ]] function DATA.copyMission() - local _ - local str="" + local _ + local str="" - local count=1 - for i=1,#MISSION+1 do - if MISSION[i+1]~=MISSION[i]or count==13 then - _=33+MISSION[i] - str=str..char(_) - if count>1 then - str=str..char(113+count) - count=1 - end - else - count=count+1 - end - end + local count=1 + for i=1,#MISSION+1 do + if MISSION[i+1]~=MISSION[i]or count==13 then + _=33+MISSION[i] + str=str..char(_) + if count>1 then + str=str..char(113+count) + count=1 + end + else + count=count+1 + end + end - return str + return str end function DATA.pasteMission(str) - local b - TABLE.cut(MISSION) - local reg - for i=1,#str do - b=byte(str,i) - if not reg then - if b>=34 and b<=114 then - reg=b-33 - else - return - end - else - if b>=34 and b<=114 then - if missionEnum[reg]then - ins(MISSION,reg) - reg=b-33 - else - TABLE.cut(MISSION) - return - end - elseif b>=115 and b<=126 then - for _=1,b-113 do - ins(MISSION,reg) - end - reg=false - end - end - end - if reg then ins(MISSION,reg)end - return true + local b + TABLE.cut(MISSION) + local reg + for i=1,#str do + b=byte(str,i) + if not reg then + if b>=34 and b<=114 then + reg=b-33 + else + return + end + else + if b>=34 and b<=114 then + if missionEnum[reg]then + ins(MISSION,reg) + reg=b-33 + else + TABLE.cut(MISSION) + return + end + elseif b>=115 and b<=126 then + for _=1,b-113 do + ins(MISSION,reg) + end + reg=false + end + end + end + if reg then ins(MISSION,reg)end + return true end function DATA.copyQuestArgs() - local ENV=CUSTOMENV - local str="".. - ENV.holdCount.. - (ENV.ospin and"O"or"Z").. - (ENV.missionKill and"M"or"Z").. - ENV.sequence - return str + local ENV=CUSTOMENV + local str="".. + ENV.holdCount.. + (ENV.ospin and"O"or"Z").. + (ENV.missionKill and"M"or"Z").. + ENV.sequence + return str end function DATA.pasteQuestArgs(str) - if #str<4 then return end - local ENV=CUSTOMENV - ENV.holdCount= str:byte(1)-48 - ENV.ospin= str:byte(2)~=90 - ENV.missionKill= str:byte(3)~=90 - ENV.sequence= str:sub(4) - return true + if #str<4 then return end + local ENV=CUSTOMENV + ENV.holdCount= str:byte(1)-48 + ENV.ospin= str:byte(2)~=90 + ENV.missionKill=str:byte(3)~=90 + ENV.sequence= str:sub(4) + return true end --[[ - Replay file: - a zlib-compressed json table + Replay file: + a zlib-compressed json table - Replay data format (table): - {frame,event, frame,event, ...} + Replay data format (table): + {frame,event, frame,event, ...} - Replay data format (byte): (1 byte each period) - dt, event, dt, event, ... - all data range from 0 to 127 - large value will be encoded as 1xxxxxxx(high)-1xxxxxxx-...-0xxxxxxx(low) + Replay data format (byte): (1 byte each period) + dt, event, dt, event, ... + all data range from 0 to 127 + large value will be encoded as 1xxxxxxx(high)-1xxxxxxx-...-0xxxxxxx(low) - Example (decoded): - 6,1, 20,-1, 0,2, 26,-2, 872,4, ... - This means: - Press key1 at 6f - Release key1 at 26f (6+20) - Press key2 at the same time (26+0) - Release key 2 after 26 frame (26+26) - Press key 4 after 872 frame (52+872) - ... + Example (decoded): + 6,1, 20,-1, 0,2, 26,-2, 872,4, ... + This means: + Press key1 at 6f + Release key1 at 26f (6+20) + Press key2 at the same time (26+0) + Release key 2 after 26 frame (26+26) + Press key 4 after 872 frame (52+872) + ... ]] function DATA.dumpRecording(list,ptr) - local out="" - local buffer,buffer2="" - if not ptr then ptr=1 end - local prevFrm=list[ptr-2]or 0 - while list[ptr]do - --Flush buffer - if #buffer>10 then - out=out..buffer - buffer="" - end + local out="" + local buffer,buffer2="" + if not ptr then ptr=1 end + local prevFrm=list[ptr-2]or 0 + while list[ptr]do + --Flush buffer + if #buffer>10 then + out=out..buffer + buffer="" + end - --Encode time - local t=list[ptr]-prevFrm - prevFrm=list[ptr] - if t>=128 then - buffer2=char(t%128) - t=int(t/128) - while t>=128 do - buffer2=char(128+t%128)..buffer2 - t=int(t/128) - end - buffer=buffer..char(128+t)..buffer2 - else - buffer=buffer..char(t) - end + --Encode time + local t=list[ptr]-prevFrm + prevFrm=list[ptr] + if t>=128 then + buffer2=char(t%128) + t=int(t/128) + while t>=128 do + buffer2=char(128+t%128)..buffer2 + t=int(t/128) + end + buffer=buffer..char(128+t)..buffer2 + else + buffer=buffer..char(t) + end - --Encode event - t=list[ptr+1] - if t>=128 then - buffer2=char(t%128) - t=int(t/128) - while t>=128 do - buffer2=char(128+t%128)..buffer2 - t=int(t/128) - end - buffer=buffer..char(128+t)..buffer2 - else - buffer=buffer..char(t) - end + --Encode event + t=list[ptr+1] + if t>=128 then + buffer2=char(t%128) + t=int(t/128) + while t>=128 do + buffer2=char(128+t%128)..buffer2 + t=int(t/128) + end + buffer=buffer..char(128+t)..buffer2 + else + buffer=buffer..char(t) + end - --Step - ptr=ptr+2 - end - return out..buffer,ptr + --Step + ptr=ptr+2 + end + return out..buffer,ptr end function DATA.pumpRecording(str,L) - local len=#str - local p=1 + local len=#str + local p=1 - local curFrm=L[#L-1]or 0 - local code - while p<=len do - --Read delta time - code=0 - local b=byte(str,p) - while b>=128 do - code=code*128+b-128 - p=p+1 - b=byte(str,p) - end - curFrm=curFrm+code*128+b - L[#L+1]=curFrm - p=p+1 + local curFrm=L[#L-1]or 0 + local code + while p<=len do + --Read delta time + code=0 + local b=byte(str,p) + while b>=128 do + code=code*128+b-128 + p=p+1 + b=byte(str,p) + end + curFrm=curFrm+code*128+b + L[#L+1]=curFrm + p=p+1 - local event=0 - b=byte(str,p) - while b>=128 do - event=event*128+b-128 - p=p+1 - b=byte(str,p) - end - L[#L+1]=event*128+b - p=p+1 - end + local event=0 + b=byte(str,p) + while b>=128 do + event=event*128+b-128 + p=p+1 + b=byte(str,p) + end + L[#L+1]=event*128+b + p=p+1 + end end do--function DATA.saveReplay() - local noRecList={"custom","solo","round","techmino"} - local function _getModList() - local res={} - for _,v in next,GAME.mod do - if v.sel>0 then - ins(res,{v.no,v.sel}) - end - end - return res - end - function DATA.saveReplay() - --Filtering modes that cannot be saved - for _,v in next,noRecList do - if GAME.curModeName:find(v)then - MES.new('error',"Cannot save recording of this mode now!") - return - end - end + local noRecList={"custom","solo","round","techmino"} + local function _getModList() + local res={} + for _,v in next,GAME.mod do + if v.sel>0 then + ins(res,{v.no,v.sel}) + end + end + return res + end + function DATA.saveReplay() + --Filtering modes that cannot be saved + for _,v in next,noRecList do + if GAME.curModeName:find(v)then + MES.new('error',"Cannot save recording of this mode now!") + return + end + end - --Write file - local fileName=os.date("replay/%Y_%m_%d_%H%M%S.rep") - if not love.filesystem.getInfo(fileName)then - love.filesystem.write(fileName, - love.data.compress('string','zlib', - JSON.encode{ - date=os.date("%Y/%m/%d %H:%M:%S"), - mode=GAME.curModeName, - version=VERSION.string, - player=USERS.getUsername(USER.uid), - seed=GAME.seed, - setting=GAME.setting, - mod=_getModList(), - tasUsed=GAME.tasUsed, - }.."\n".. - DATA.dumpRecording(GAME.rep) - ) - ) - ins(REPLAY,1,DATA.parseReplay(fileName)) - return true - else - MES.new('error',"Save failed: File already exists") - end - end + --Write file + local fileName=os.date("replay/%Y_%m_%d_%H%M%S.rep") + if not love.filesystem.getInfo(fileName)then + love.filesystem.write(fileName, + love.data.compress('string','zlib', + JSON.encode{ + date=os.date("%Y/%m/%d %H:%M:%S"), + mode=GAME.curModeName, + version=VERSION.string, + player=USERS.getUsername(USER.uid), + seed=GAME.seed, + setting=GAME.setting, + mod=_getModList(), + tasUsed=GAME.tasUsed, + }.."\n".. + DATA.dumpRecording(GAME.rep) + ) + ) + ins(REPLAY,1,DATA.parseReplay(fileName)) + return true + else + MES.new('error',"Save failed: File already exists") + end + end end function DATA.parseReplay(fileName,ifFull) - local fileData - --Read file - fileData=love.filesystem.read(fileName) - return DATA.parseReplayData(fileName,fileData,ifFull) + local fileData + --Read file + fileData=love.filesystem.read(fileName) + return DATA.parseReplayData(fileName,fileData,ifFull) end 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 - success,fileData=pcall(love.data.decompress,'string','zlib',fileData) - if not success then goto BREAK_cannotParse end + --Decompress file + success,fileData=pcall(love.data.decompress,'string','zlib',fileData) + if not success then goto BREAK_cannotParse end - --Load metadata - metaData,fileData=STRING.readLine(fileData) - metaData=JSON.decode(metaData) - if not metaData then goto BREAK_cannotParse end + --Load metadata + metaData,fileData=STRING.readLine(fileData) + metaData=JSON.decode(metaData) + if not metaData then goto BREAK_cannotParse end - --Convert ancient replays - metaData.mode=oldModeNameTable[metaData.mode]or metaData.mode - if not MODES[metaData.mode]then goto BREAK_cannotParse end + --Convert ancient replays + metaData.mode=oldModeNameTable[metaData.mode]or metaData.mode + if not MODES[metaData.mode]then goto BREAK_cannotParse end - --Create replay object - rep={ - fileName=fileName, - available=true, + --Create replay object + rep={ + fileName=fileName, + available=true, - date=metaData.date, - mode=metaData.mode, - version=metaData.version, - player=metaData.player, + date=metaData.date, + mode=metaData.mode, + version=metaData.version, + player=metaData.player, - seed=metaData.seed, - setting=metaData.setting, - mod=metaData.mod, - tasUsed=metaData.tasUsed, - } - if ifFull then rep.data=fileData end - do return rep end + seed=metaData.seed, + setting=metaData.setting, + mod=metaData.mod, + tasUsed=metaData.tasUsed, + } + if ifFull then rep.data=fileData end + do return rep end - --Create unavailable replay object - ::BREAK_cannotParse:: - return{ - fileName=fileName, - available=false, - } + --Create unavailable replay object + ::BREAK_cannotParse:: + return{ + fileName=fileName, + available=false, + } end return DATA \ No newline at end of file diff --git a/parts/freeRow.lua b/parts/freeRow.lua index 74e53e31..ce17ac40 100644 --- a/parts/freeRow.lua +++ b/parts/freeRow.lua @@ -2,36 +2,36 @@ local FREEROW={} local L={}--Storage local len=0--Length function FREEROW.reset(num) - if numlen then - for i=len+1,num do - L[i]={0,0,0,0,0,0,0,0,0,0,garbage=false} - end - end - len=num + if numlen then + for i=len+1,num do + L[i]={0,0,0,0,0,0,0,0,0,0,garbage=false} + end + end + len=num end function FREEROW.get(val,ifGarbage) - if len==0 then - for i=1,10 do - L[i]={0,0,0,0,0,0,0,0,0,0,garbage=false} - end - len=len+10 - end - local t=L[len] - for i=1,10 do t[i]=val end - t.garbage=ifGarbage==true - L[len]=nil - len=len-1 - return t + if len==0 then + for i=1,10 do + L[i]={0,0,0,0,0,0,0,0,0,0,garbage=false} + end + len=len+10 + end + local t=L[len] + for i=1,10 do t[i]=val end + t.garbage=ifGarbage==true + L[len]=nil + len=len-1 + return t end function FREEROW.discard(t) - len=len+1 - L[len]=t + len=len+1 + L[len]=t end function FREEROW.getCount() - return len + return len end return FREEROW \ No newline at end of file diff --git a/parts/gametoolfunc.lua b/parts/gametoolfunc.lua index 8451220d..5d77b0a9 100644 --- a/parts/gametoolfunc.lua +++ b/parts/gametoolfunc.lua @@ -13,661 +13,661 @@ local SETTING,GAME,SCR=SETTING,GAME,SCR --System function saveStats() - FILE.save(STAT,'conf/data') + FILE.save(STAT,'conf/data') end function saveProgress() - FILE.save(RANKS,'conf/unlock') + FILE.save(RANKS,'conf/unlock') end function saveSettings() - FILE.save(SETTING,'conf/settings') + FILE.save(SETTING,'conf/settings') end function applySettings() - love.window.setFullscreen(SETTING.fullscreen) - LANG.set(SETTING.lang) - VK.setShape(SETTING.VKSkin) - applyBlockSatur(SETTING.blockSatur) - applyFieldSatur(SETTING.fieldSatur) + love.window.setFullscreen(SETTING.fullscreen) + LANG.set(SETTING.lang) + VK.setShape(SETTING.VKSkin) + applyBlockSatur(SETTING.blockSatur) + applyFieldSatur(SETTING.fieldSatur) end function switchFullscreen() - SETTING.fullscreen=not SETTING.fullscreen - love.window.setFullscreen(SETTING.fullscreen) - love.resize(gc.getWidth(),gc.getHeight()) + SETTING.fullscreen=not SETTING.fullscreen + love.window.setFullscreen(SETTING.fullscreen) + love.resize(gc.getWidth(),gc.getHeight()) end do--function applyXxxSatur(mode) - local saturateValues={ - normal={0,1}, - soft={.2,.7}, - gray={.4,.4}, - light={.2,.8}, - color={-.2,1.2}, - } - function applyBlockSatur(mode) - local m=saturateValues[mode]or saturateValues.normal - SHADER.blockSatur:send('b',m[1]) - SHADER.blockSatur:send('k',m[2]) - end - function applyFieldSatur(mode) - local m=saturateValues[mode]or saturateValues.normal - SHADER.fieldSatur:send('b',m[1]) - SHADER.fieldSatur:send('k',m[2]) - end + local saturateValues={ + normal={0,1}, + soft={.2,.7}, + gray={.4,.4}, + light={.2,.8}, + color={-.2,1.2}, + } + function applyBlockSatur(mode) + local m=saturateValues[mode]or saturateValues.normal + SHADER.blockSatur:send('b',m[1]) + SHADER.blockSatur:send('k',m[2]) + end + function applyFieldSatur(mode) + local m=saturateValues[mode]or saturateValues.normal + SHADER.fieldSatur:send('b',m[1]) + SHADER.fieldSatur:send('k',m[2]) + end end --Royale mode function randomTarget(P)--Return a random opponent for P - local rnd=math.random - if #PLY_ALIVE>1 then - local R - repeat - R=PLY_ALIVE[rnd(#PLY_ALIVE)] - until R~=P - return R - end + local rnd=math.random + if #PLY_ALIVE>1 then + local R + repeat + R=PLY_ALIVE[rnd(#PLY_ALIVE)] + until R~=P + return R + end end function freshMostDangerous() - GAME.mostDangerous,GAME.secDangerous=false,false - local m,m2=0,0 - for i=1,#PLY_ALIVE do - local h=#PLY_ALIVE[i].field - if h>=m then - GAME.mostDangerous,GAME.secDangerous=PLY_ALIVE[i],GAME.mostDangerous - m,m2=h,m - elseif h>=m2 then - GAME.secDangerous=PLY_ALIVE[i] - m2=h - end - end + GAME.mostDangerous,GAME.secDangerous=false,false + local m,m2=0,0 + for i=1,#PLY_ALIVE do + local h=#PLY_ALIVE[i].field + if h>=m then + GAME.mostDangerous,GAME.secDangerous=PLY_ALIVE[i],GAME.mostDangerous + m,m2=h,m + elseif h>=m2 then + GAME.secDangerous=PLY_ALIVE[i] + m2=h + end + end - for i=1,#PLY_ALIVE do - if PLY_ALIVE[i].atkMode==3 then - PLY_ALIVE[i]:freshTarget() - end - end + for i=1,#PLY_ALIVE do + if PLY_ALIVE[i].atkMode==3 then + PLY_ALIVE[i]:freshTarget() + end + end end function freshMostBadge() - GAME.mostBadge,GAME.secBadge=false,false - local m,m2=0,0 - for i=1,#PLY_ALIVE do - local P=PLY_ALIVE[i] - local b=P.badge - if b>=m then - GAME.mostBadge,GAME.secBadge=P,GAME.mostBadge - m,m2=b,m - elseif b>=m2 then - GAME.secBadge=P - m2=b - end - end + GAME.mostBadge,GAME.secBadge=false,false + local m,m2=0,0 + for i=1,#PLY_ALIVE do + local P=PLY_ALIVE[i] + local b=P.badge + if b>=m then + GAME.mostBadge,GAME.secBadge=P,GAME.mostBadge + m,m2=b,m + elseif b>=m2 then + GAME.secBadge=P + m2=b + end + end - for i=1,#PLY_ALIVE do - if PLY_ALIVE[i].atkMode==4 then - PLY_ALIVE[i]:freshTarget() - end - end + for i=1,#PLY_ALIVE do + if PLY_ALIVE[i].atkMode==4 then + PLY_ALIVE[i]:freshTarget() + end + end end function royaleLevelup() - GAME.stage=GAME.stage+1 - local spd - TEXT.show(text.royale_remain:gsub("$1",#PLY_ALIVE),640,200,40,'beat',.3) - if GAME.stage==2 then - spd=30 - elseif GAME.stage==3 then - spd=15 - for _,P in next,PLY_ALIVE do - P.gameEnv.garbageSpeed=.6 - end - if PLAYERS[1].alive then BGM.play('cruelty')end - elseif GAME.stage==4 then - spd=10 - for _,P in next,PLY_ALIVE do - P.gameEnv.pushSpeed=3 - end - elseif GAME.stage==5 then - spd=5 - for _,P in next,PLY_ALIVE do - P.gameEnv.garbageSpeed=1 - end - elseif GAME.stage==6 then - spd=3 - if PLAYERS[1].alive then BGM.play('final')end - end - for _,P in next,PLY_ALIVE do - P.gameEnv.drop=spd - end - if GAME.curMode.name:find("_u")then - local int=math.floor - for i=1,#PLY_ALIVE do - local P=PLY_ALIVE[i] - P.gameEnv.drop=int(P.gameEnv.drop*.3) - if P.gameEnv.drop==0 then - P.curY=P.ghoY - P:set20G(true) - end - end - end + GAME.stage=GAME.stage+1 + local spd + TEXT.show(text.royale_remain:gsub("$1",#PLY_ALIVE),640,200,40,'beat',.3) + if GAME.stage==2 then + spd=30 + elseif GAME.stage==3 then + spd=15 + for _,P in next,PLY_ALIVE do + P.gameEnv.garbageSpeed=.6 + end + if PLAYERS[1].alive then BGM.play('cruelty')end + elseif GAME.stage==4 then + spd=10 + for _,P in next,PLY_ALIVE do + P.gameEnv.pushSpeed=3 + end + elseif GAME.stage==5 then + spd=5 + for _,P in next,PLY_ALIVE do + P.gameEnv.garbageSpeed=1 + end + elseif GAME.stage==6 then + spd=3 + if PLAYERS[1].alive then BGM.play('final')end + end + for _,P in next,PLY_ALIVE do + P.gameEnv.drop=spd + end + if GAME.curMode.name:find("_u")then + local int=math.floor + for i=1,#PLY_ALIVE do + local P=PLY_ALIVE[i] + P.gameEnv.drop=int(P.gameEnv.drop*.3) + if P.gameEnv.drop==0 then + P.curY=P.ghoY + P:set20G(true) + end + end + end end --Game function generateLine(hole) - return 1023-2^(hole-1) + return 1023-2^(hole-1) end function freshDate(mode) - if not mode then mode=""end - local date=os.date("%Y/%m/%d") - if STAT.date~=date then - STAT.date=date - STAT.todayTime=0 - if not mode:find'q'then - MES.new('info',text.newDay) - end - return true - end + if not mode then mode=""end + local date=os.date("%Y/%m/%d") + if STAT.date~=date then + STAT.date=date + STAT.todayTime=0 + if not mode:find'q'then + MES.new('info',text.newDay) + end + return true + end end function legalGameTime()--Check if today's playtime is legal - if - (SETTING.lang==1 or SETTING.lang==2 or SETTING.lang==7)and - RANKS.sprint_10l<4 and - (not RANKS.sprint_40l or RANKS.sprint_40l<3) - then - if STAT.todayTime<14400 then - return true - elseif STAT.todayTime<21600 then - MES.new('warn',text.playedLong) - return true - else - MES.new('error',text.playedTooMuch) - return false - end - end - return true + if + (SETTING.lang==1 or SETTING.lang==2 or SETTING.lang==7)and + RANKS.sprint_10l<4 and + (not RANKS.sprint_40l or RANKS.sprint_40l<3) + then + if STAT.todayTime<14400 then + return true + elseif STAT.todayTime<21600 then + MES.new('warn',text.playedLong) + return true + else + MES.new('error',text.playedTooMuch) + return false + end + end + return true end function mergeStat(stat,delta)--Merge delta stat. to global stat. - for k,v in next,delta do - if type(v)=='table'then - if type(stat[k])=='table'then - mergeStat(stat[k],v) - end - else - if stat[k]then - stat[k]=stat[k]+v - end - end - end + for k,v in next,delta do + if type(v)=='table'then + if type(stat[k])=='table'then + mergeStat(stat[k],v) + end + else + if stat[k]then + stat[k]=stat[k]+v + end + end + end end function scoreValid()--Check if any unranked mods are activated - for _,M in next,GAME.mod do - if M.unranked then - return false - end - end - if GAME.tasUsed then - return false - end - return true + for _,M in next,GAME.mod do + if M.unranked then + return false + end + end + if GAME.tasUsed then + return false + end + return true end function destroyPlayers()--Destroy all player objects, restore freerows and free CCs - for i=#PLAYERS,1,-1 do - local P=PLAYERS[i] - if P.canvas then P.canvas:release()end - while P.field[1]do - FREEROW.discard(rem(P.field)) - FREEROW.discard(rem(P.visTime)) - end - end - TABLE.cut(PLAYERS) - TABLE.cut(PLY_ALIVE) + for i=#PLAYERS,1,-1 do + local P=PLAYERS[i] + if P.canvas then P.canvas:release()end + while P.field[1]do + FREEROW.discard(rem(P.field)) + FREEROW.discard(rem(P.visTime)) + end + end + TABLE.cut(PLAYERS) + TABLE.cut(PLY_ALIVE) end function pauseGame() - if not SCN.swapping then - if not GAME.replaying then - for i=1,#PLAYERS do - local l=PLAYERS[i].keyPressing - for j=1,#l do - if l[j]then - PLAYERS[i]:releaseKey(j) - end - end - end - end - if not(GAME.result or GAME.replaying)then - GAME.pauseCount=GAME.pauseCount+1 - end - SCN.swapTo('pause','none') - end + if not SCN.swapping then + if not GAME.replaying then + for i=1,#PLAYERS do + local l=PLAYERS[i].keyPressing + for j=1,#l do + if l[j]then + PLAYERS[i]:releaseKey(j) + end + end + end + end + if not(GAME.result or GAME.replaying)then + GAME.pauseCount=GAME.pauseCount+1 + end + SCN.swapTo('pause','none') + end end function applyCustomGame()--Apply CUSTOMENV, BAG, MISSION - for k,v in next,CUSTOMENV do - GAME.modeEnv[k]=v - end - if BAG[1]then - GAME.modeEnv.seqData=BAG - else - GAME.modeEnv.seqData=nil - end - if MISSION[1]then - GAME.modeEnv.mission=MISSION - else - GAME.modeEnv.mission=nil - end + for k,v in next,CUSTOMENV do + GAME.modeEnv[k]=v + end + if BAG[1]then + GAME.modeEnv.seqData=BAG + else + GAME.modeEnv.seqData=nil + end + if MISSION[1]then + GAME.modeEnv.mission=MISSION + else + GAME.modeEnv.mission=nil + end end function loadGame(mode,ifQuickPlay,ifNet)--Load a mode and go to game scene - freshDate() - if legalGameTime()then - if MODES[mode].score then STAT.lastPlay=mode end - GAME.playing=true - GAME.init=true - GAME.fromRepMenu=false - GAME.curModeName=mode - GAME.curMode=MODES[mode] - GAME.modeEnv=GAME.curMode.env - GAME.net=ifNet - if ifNet then - SCN.go('net_game','swipeD') - else - local modeText=text.modes[mode]or{"["..MODES[mode].name.."]",""} - drawableText.modeName:set(modeText[1].." "..modeText[2]) - SCN.go('game',ifQuickPlay and'swipeD'or'fade_togame') - SFX.play('enter') - end - end + freshDate() + if legalGameTime()then + if MODES[mode].score then STAT.lastPlay=mode end + GAME.playing=true + GAME.init=true + GAME.fromRepMenu=false + GAME.curModeName=mode + GAME.curMode=MODES[mode] + GAME.modeEnv=GAME.curMode.env + GAME.net=ifNet + if ifNet then + SCN.go('net_game','swipeD') + else + local modeText=text.modes[mode]or{"["..MODES[mode].name.."]",""} + drawableText.modeName:set(modeText[1].." "..modeText[2]) + SCN.go('game',ifQuickPlay and'swipeD'or'fade_togame') + SFX.play('enter') + end + end end function gameOver()--Save record - if GAME.replaying then - local R=GAME.curMode.getRank - if R then - R=R(PLAYERS[1]) - if R and R>0 then GAME.rank=R end - end - end - trySave() + if GAME.replaying then + local R=GAME.curMode.getRank + if R then + R=R(PLAYERS[1]) + if R and R>0 then GAME.rank=R end + end + end + trySave() - local M=GAME.curMode - local R=M.getRank - if R then - local P=PLAYERS[1] - R=R(P)--New rank - if R then - if R>0 then - GAME.rank=R - end - if not GAME.replaying and M.score and scoreValid()then - if RANKS[M.name]then--Old rank exist - local needSave - if R>RANKS[M.name]then - RANKS[M.name]=R - needSave=true - end - if R>0 then - if M.unlock then - for i=1,#M.unlock do - local m=M.unlock[i] - local n=MODES[m].name - if not RANKS[n]then - if MODES[m].x then RANKS[n]=0 end - needSave=true - end - end - end - end - if needSave then - saveProgress() - end - end - local D=M.score(P) - local L=M.records - local p=#L--Rank-1 - if p>0 then - while M.comp(D,L[p])do--If higher rank - p=p-1 - if p==0 then break end - end - end - if p<10 then - if p==0 then - P:showTextF(text.newRecord,0,-100,100,'beat',.5) - if SETTING.autoSave and DATA.saveReplay()then - GAME.saved=true - SFX.play('connected') - MES.new('check',text.saveDone) - end - end - D.date=os.date("%Y/%m/%d %H:%M") - ins(L,p+1,D) - if L[11]then L[11]=nil end - FILE.save(L,('record/%s.rec'):format(M.name),'l') - end - end - end - end + local M=GAME.curMode + local R=M.getRank + if R then + local P=PLAYERS[1] + R=R(P)--New rank + if R then + if R>0 then + GAME.rank=R + end + if not GAME.replaying and M.score and scoreValid()then + if RANKS[M.name]then--Old rank exist + local needSave + if R>RANKS[M.name]then + RANKS[M.name]=R + needSave=true + end + if R>0 then + if M.unlock then + for i=1,#M.unlock do + local m=M.unlock[i] + local n=MODES[m].name + if not RANKS[n]then + if MODES[m].x then RANKS[n]=0 end + needSave=true + end + end + end + end + if needSave then + saveProgress() + end + end + local D=M.score(P) + local L=M.records + local p=#L--Rank-1 + if p>0 then + while M.comp(D,L[p])do--If higher rank + p=p-1 + if p==0 then break end + end + end + if p<10 then + if p==0 then + P:showTextF(text.newRecord,0,-100,100,'beat',.5) + if SETTING.autoSave and DATA.saveReplay()then + GAME.saved=true + SFX.play('connected') + MES.new('check',text.saveDone) + end + end + D.date=os.date("%Y/%m/%d %H:%M") + ins(L,p+1,D) + if L[11]then L[11]=nil end + FILE.save(L,('record/%s.rec'):format(M.name),'l') + end + end + end + end end function trySave() - if not GAME.statSaved and PLAYERS[1]and PLAYERS[1].type=='human'and(PLAYERS[1].frameRun>300 or GAME.result)then - GAME.statSaved=true - STAT.game=STAT.game+1 - mergeStat(STAT,PLAYERS[1].stat) - STAT.todayTime=STAT.todayTime+PLAYERS[1].stat.time - saveStats() - end + if not GAME.statSaved and PLAYERS[1]and PLAYERS[1].type=='human'and(PLAYERS[1].frameRun>300 or GAME.result)then + GAME.statSaved=true + STAT.game=STAT.game+1 + mergeStat(STAT,PLAYERS[1].stat) + STAT.todayTime=STAT.todayTime+PLAYERS[1].stat.time + saveStats() + end end do--function freshPlayerPosition(sudden) - local posLists={ - --1~5 - { - {340,75,1}, - {965,390,.5}, - {965,30,.5}, - {20,390,.5}, - {20,30,.5}, - }, - --6~17 - (function() - 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,{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,{1120,-160+180*i,.25})end - return L - end)(), - --18~31 - (function() - 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,{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,{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,{1160,-100+135*i,.18})end - return L - end)(), - --32~49 - (function() - 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=9,12 do for j=1,6 do ins(L,{78*i+267,115*j-98,.09})end end - return L - end)(), - --50~99 - (function() - 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=15,21 do for j=1,7 do ins(L,{46*i+264,97*j-72,.068})end end - return L - end)(), - } - function freshPlayerPosition(sudden)--Set initial position for every player - local L=PLY_ALIVE - if not sudden then - for i=1,#L do - L[i]:setPosition(640,#L<=5 and 360 or -62,0) - end - end + local posLists={ + --1~5 + { + {340,75,1}, + {965,390,.5}, + {965,30,.5}, + {20,390,.5}, + {20,30,.5}, + }, + --6~17 + (function() + 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,{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,{1120,-160+180*i,.25})end + return L + end)(), + --18~31 + (function() + 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,{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,{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,{1160,-100+135*i,.18})end + return L + end)(), + --32~49 + (function() + 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=9,12 do for j=1,6 do ins(L,{78*i+267,115*j-98,.09})end end + return L + end)(), + --50~99 + (function() + 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=15,21 do for j=1,7 do ins(L,{46*i+264,97*j-72,.068})end end + return L + end)(), + } + function freshPlayerPosition(sudden)--Set initial position for every player + local L=PLY_ALIVE + if not sudden then + for i=1,#L do + L[i]:setPosition(640,#L<=5 and 360 or -62,0) + end + end - local posList - if #L<=5 then posList=posLists[1] - elseif #L<=17 then posList=posLists[2] - elseif #L<=31 then posList=posLists[3] - elseif #L<=49 then posList=posLists[4] - elseif #L<=99 then posList=posLists[5] - else error("TOO MANY PLAYERS!") - end - local method=sudden and'setPosition'or'movePosition' - for i=1,#L do L[i][method](L[i],unpack(posList[i]))end - end + local posList + if #L<=5 then posList=posLists[1] + elseif #L<=17 then posList=posLists[2] + elseif #L<=31 then posList=posLists[3] + elseif #L<=49 then posList=posLists[4] + elseif #L<=99 then posList=posLists[5] + else error("TOO MANY PLAYERS!") + end + local method=sudden and'setPosition'or'movePosition' + for i=1,#L do L[i][method](L[i],unpack(posList[i]))end + end end do--function dumpBasicConfig() - local gameSetting={ - --Tuning - 'das','arr','dascut','dropcut','sddas','sdarr', - 'ihs','irs','ims','RS','swap', + local gameSetting={ + --Tuning + 'das','arr','dascut','dropcut','sddas','sdarr', + 'ihs','irs','ims','RS','swap', - --System - 'skin','face', + --System + 'skin','face', - --Graphic - 'ghostType','block','ghost','center','bagLine', - 'dropFX','moveFX','shakeFX', - 'text','highCam','nextPos', + --Graphic + 'ghostType','block','ghost','center','bagLine', + 'dropFX','moveFX','shakeFX', + 'text','highCam','nextPos', - --Unnecessary graphic - -- 'grid','smooth', - -- 'lockFX','clearFX','splashFX','atkFX', - -- 'score', - } - function dumpBasicConfig() - local S={} - for _,key in next,gameSetting do - S[key]=SETTING[key] - end - return JSON.encode(S) - end + --Unnecessary graphic + -- 'grid','smooth', + -- 'lockFX','clearFX','splashFX','atkFX', + -- 'score', + } + function dumpBasicConfig() + local S={} + for _,key in next,gameSetting do + S[key]=SETTING[key] + end + return JSON.encode(S) + end end do--function resetGameData(args) - local function task_showMods() - local time=0 - while true do - YIELD() - time=time+1 - if time%20==0 then - local M=GAME.mod[time/20] - if M then - TEXT.show(M.id,700+(time-20)%120*4,36,45,'spin',.5) - else - return - end - end - end - end - local gameSetting={ - --Tuning - 'das','arr','dascut','dropcut','sddas','sdarr', - 'ihs','irs','ims','RS','swap', + local function task_showMods() + local time=0 + while true do + YIELD() + time=time+1 + if time%20==0 then + local M=GAME.mod[time/20] + if M then + TEXT.show(M.id,700+(time-20)%120*4,36,45,'spin',.5) + else + return + end + end + end + end + local gameSetting={ + --Tuning + 'das','arr','dascut','dropcut','sddas','sdarr', + 'ihs','irs','ims','RS','swap', - --System - 'skin','face', + --System + 'skin','face', - --Graphic - 'block','ghost','center','smooth','grid','bagLine', - 'lockFX','dropFX','moveFX','clearFX','splashFX','shakeFX','atkFX', - 'text','score','warn','highCam','nextPos', - } - local function _copyGameSetting() - local S={} - for _,key in next,gameSetting do - if type(SETTING[key])=='table'then - S[key]=TABLE.shift(SETTING[key]) - else - S[key]=SETTING[key] - end - end - return S - end - function resetGameData(args,seed) - if not args then args=""end - trySave() + --Graphic + 'block','ghost','center','smooth','grid','bagLine', + 'lockFX','dropFX','moveFX','clearFX','splashFX','shakeFX','atkFX', + 'text','score','warn','highCam','nextPos', + } + local function _copyGameSetting() + local S={} + for _,key in next,gameSetting do + if type(SETTING[key])=='table'then + S[key]=TABLE.shift(SETTING[key]) + else + S[key]=SETTING[key] + end + end + return S + end + function resetGameData(args,seed) + if not args then args=""end + trySave() - GAME.result=false - GAME.rank=0 - GAME.warnLVL0=0 - GAME.warnLVL=0 - if args:find'r'then - GAME.frameStart=0 - GAME.recording=false - GAME.replaying=1 - else - GAME.frameStart=args:find'n'and 0 or 150-SETTING.reTime*15 - GAME.seed=seed or math.random(1046101471,2662622626) - GAME.pauseTime=0 - GAME.pauseCount=0 - GAME.saved=false - GAME.setting=_copyGameSetting() - GAME.tasUsed=false - GAME.rep={} - GAME.recording=true - GAME.statSaved=false - GAME.replaying=false - math.randomseed(TIME()) - end + GAME.result=false + GAME.rank=0 + GAME.warnLVL0=0 + GAME.warnLVL=0 + if args:find'r'then + GAME.frameStart=0 + GAME.recording=false + GAME.replaying=1 + else + GAME.frameStart=args:find'n'and 0 or 150-SETTING.reTime*15 + GAME.seed=seed or math.random(1046101471,2662622626) + GAME.pauseTime=0 + GAME.pauseCount=0 + GAME.saved=false + GAME.setting=_copyGameSetting() + GAME.tasUsed=false + GAME.rep={} + GAME.recording=true + GAME.statSaved=false + GAME.replaying=false + math.randomseed(TIME()) + end - destroyPlayers() - if GAME.curMode.load then - GAME.curMode.load() - else - PLY.newPlayer(1) - end - freshPlayerPosition(args:find'q') - VK.restore() - if GAME.modeEnv.task then - local task=GAME.modeEnv.task - if type(task)=='function'then - for i=1,#PLAYERS do - PLAYERS[i]:newTask(task) - end - elseif type(task)=='table'then - for i=1,#PLAYERS do - for _,t in ipairs(task)do - PLAYERS[i]:newTask(t) - end - end - else - MES.new('error',"Wrong task type") - end - end + destroyPlayers() + if GAME.curMode.load then + GAME.curMode.load() + else + PLY.newPlayer(1) + end + freshPlayerPosition(args:find'q') + VK.restore() + if GAME.modeEnv.task then + local task=GAME.modeEnv.task + if type(task)=='function'then + for i=1,#PLAYERS do + PLAYERS[i]:newTask(task) + end + elseif type(task)=='table'then + for i=1,#PLAYERS do + for _,t in ipairs(task)do + PLAYERS[i]:newTask(t) + end + end + else + MES.new('error',"Wrong task type") + end + end - local bg=GAME.modeEnv.bg - BG.set(type(bg)=='string'and bg or type(bg)=='table'and bg[math.random(#bg)]) - local bgm=GAME.modeEnv.bgm - BGM.play(type(bgm)=='string'and bgm or type(bgm)=='table'and bgm[math.random(#bgm)]) + local bg=GAME.modeEnv.bg + BG.set(type(bg)=='string'and bg or type(bg)=='table'and bg[math.random(#bg)]) + local bgm=GAME.modeEnv.bgm + BGM.play(type(bgm)=='string'and bgm or type(bgm)=='table'and bgm[math.random(#bgm)]) - TEXT.clear() - if GAME.modeEnv.royaleMode then - for i=1,#PLAYERS do - PLAYERS[i]:changeAtk(randomTarget(PLAYERS[i])) - end - GAME.stage=false - GAME.mostBadge=false - GAME.secBadge=false - GAME.mostDangerous=false - GAME.secDangerous=false - GAME.stage=1 - end - FREEROW.reset(30*#PLAYERS) - TASK.removeTask_code(task_showMods) - if GAME.setting.allowMod then - TASK.new(task_showMods) - end - SFX.play('ready') - collectgarbage() - end + TEXT.clear() + if GAME.modeEnv.royaleMode then + for i=1,#PLAYERS do + PLAYERS[i]:changeAtk(randomTarget(PLAYERS[i])) + end + GAME.stage=false + GAME.mostBadge=false + GAME.secBadge=false + GAME.mostDangerous=false + GAME.secDangerous=false + GAME.stage=1 + end + FREEROW.reset(30*#PLAYERS) + TASK.removeTask_code(task_showMods) + if GAME.setting.allowMod then + TASK.new(task_showMods) + end + SFX.play('ready') + collectgarbage() + end end do--function checkWarning() - local max=math.max - function checkWarning() - local P1=PLAYERS[1] - if P1.alive then - if P1.frameRun%26==0 then - local F=P1.field - local height=0--Max height of row 4~7 - for x=4,7 do - for y=#F,1,-1 do - if F[y][x]>0 then - if y>height then - height=y - end - break - end - end - end - GAME.warnLVL0=math.log(height-(P1.gameEnv.fieldH-5)+P1.atkBufferSum*.8) - end - local _=GAME.warnLVL - if _0 then - _=max(_-.026,0) - end - GAME.warnLVL=_ - if GAME.warnLVL>1.126 and P1.frameRun%30==0 then - SFX.fplay('warning',SETTING.sfx_warn) - end - elseif GAME.warnLVL>0 then - GAME.warnLVL=max(GAME.warnLVL-.026,0) - end - end + local max=math.max + function checkWarning() + local P1=PLAYERS[1] + if P1.alive then + if P1.frameRun%26==0 then + local F=P1.field + local height=0--Max height of row 4~7 + for x=4,7 do + for y=#F,1,-1 do + if F[y][x]>0 then + if y>height then + height=y + end + break + end + end + end + GAME.warnLVL0=math.log(height-(P1.gameEnv.fieldH-5)+P1.atkBufferSum*.8) + end + local _=GAME.warnLVL + if _0 then + _=max(_-.026,0) + end + GAME.warnLVL=_ + if GAME.warnLVL>1.126 and P1.frameRun%30==0 then + SFX.fplay('warning',SETTING.sfx_warn) + end + elseif GAME.warnLVL>0 then + GAME.warnLVL=max(GAME.warnLVL-.026,0) + end + end end --Game draw do--function drawSelfProfile() - local lvIcon=setmetatable({},{__index=function(self,lv) - local img={25,25} + local lvIcon=setmetatable({},{__index=function(self,lv) + local img={25,25} - ins(img,{"clear",0,0,0}) - ins(img,{"setLW",4}) - ins(img,{"setCL",.5,.8,1}) - ins(img,{"dRect",2,2,21,21,2}) - --TODO: draw with lv + ins(img,{"clear",0,0,0}) + ins(img,{"setLW",4}) + ins(img,{"setCL",.5,.8,1}) + ins(img,{"dRect",2,2,21,21,2}) + --TODO: draw with lv - img=GC.DO(img) - rawset(self,lv,img) - return img - end}) - local name - local textObject,scaleK,width,offY - function drawSelfProfile() - local selfAvatar=USERS.getAvatar(USER.uid) - gc_push('transform') - gc_replaceTransform(SCR.xOy_ur) + img=GC.DO(img) + rawset(self,lv,img) + return img + end}) + local name + local textObject,scaleK,width,offY + function drawSelfProfile() + local selfAvatar=USERS.getAvatar(USER.uid) + gc_push('transform') + gc_replaceTransform(SCR.xOy_ur) - --Draw avatar - gc_setLineWidth(2) - gc_setColor(.3,.3,.3,.8)gc_rectangle('fill',0,0,-300,80) - gc_setColor(1,1,1)gc_rectangle('line',-300,0,300,80,5) - gc_rectangle('line',-73,7,66,66,2) - gc_draw(selfAvatar,-72,8,nil,.5) + --Draw avatar + gc_setLineWidth(2) + gc_setColor(.3,.3,.3,.8)gc_rectangle('fill',0,0,-300,80) + gc_setColor(1,1,1)gc_rectangle('line',-300,0,300,80,5) + gc_rectangle('line',-73,7,66,66,2) + gc_draw(selfAvatar,-72,8,nil,.5) - --Draw username - if name~=USERS.getUsername(USER.uid)then - name=USERS.getUsername(USER.uid) - textObject=gc.newText(getFont(30),name) - width=textObject:getWidth() - scaleK=210/math.max(width,210) - offY=textObject:getHeight()/2 - end - gc_draw(textObject,-82,26,nil,scaleK,nil,width,offY) + --Draw username + if name~=USERS.getUsername(USER.uid)then + name=USERS.getUsername(USER.uid) + textObject=gc.newText(getFont(30),name) + width=textObject:getWidth() + scaleK=210/math.max(width,210) + offY=textObject:getHeight()/2 + end + gc_draw(textObject,-82,26,nil,scaleK,nil,width,offY) - --Draw lv. & xp. - gc_draw(lvIcon[USER.lv],-295,50) - gc_line(-270,55,-80,55,-80,70,-270,70) - gc_rectangle('fill',-210,55,150*USER.xp/USER.lv/USER.lv,15) + --Draw lv. & xp. + gc_draw(lvIcon[USER.lv],-295,50) + gc_line(-270,55,-80,55,-80,70,-270,70) + gc_rectangle('fill',-210,55,150*USER.xp/USER.lv/USER.lv,15) - gc_pop() - end + gc_pop() + end end function drawOnlinePlayerCount() - setFont(20) - gc_setColor(1,1,1) - gc_push('transform') - gc_replaceTransform(SCR.xOy_ur) - gc_printf(("%s: %s/%s/%s"):format(text.onlinePlayerCount,NET.UserCount,NET.PlayCount,NET.StreamCount),-600,80,594,'right') - gc_pop() + setFont(20) + gc_setColor(1,1,1) + gc_push('transform') + gc_replaceTransform(SCR.xOy_ur) + gc_printf(("%s: %s/%s/%s"):format(text.onlinePlayerCount,NET.UserCount,NET.PlayCount,NET.StreamCount),-600,80,594,'right') + gc_pop() end do--function drawWarning() - local shader_warning=SHADER.warning - function drawWarning() - if SETTING.warn and GAME.warnLVL>0 then - gc_push('transform') - gc_origin() - shader_warning:send('level',GAME.warnLVL) - gc_setShader(shader_warning) - gc_rectangle('fill',0,0,SCR.w,SCR.h) - gc_setShader() - gc_pop() - end - end + local shader_warning=SHADER.warning + function drawWarning() + if SETTING.warn and GAME.warnLVL>0 then + gc_push('transform') + gc_origin() + shader_warning:send('level',GAME.warnLVL) + gc_setShader(shader_warning) + gc_rectangle('fill',0,0,SCR.w,SCR.h) + gc_setShader() + gc_pop() + end + end end @@ -675,43 +675,43 @@ end --Widget function shortcuts function backScene()SCN.back()end do--function goScene(name,style) - local cache={} - function goScene(name,style) - local hash=style and name..style or name - if not cache[hash]then - cache[hash]=function()SCN.go(name,style)end - end - return cache[hash] - end + local cache={} + function goScene(name,style) + local hash=style and name..style or name + if not cache[hash]then + cache[hash]=function()SCN.go(name,style)end + end + return cache[hash] + end end do--function swapScene(name,style) - local cache={} - function swapScene(name,style) - local hash=style and name..style or name - if not cache[hash]then - cache[hash]=function()SCN.swapTo(name,style)end - end - return cache[hash] - end + local cache={} + function swapScene(name,style) + local hash=style and name..style or name + if not cache[hash]then + cache[hash]=function()SCN.swapTo(name,style)end + end + return cache[hash] + end end do--function pressKey(k) - local cache={} - function pressKey(k) - if not cache[k]then - cache[k]=function()love.keypressed(k)end - end - return cache[k] - end + local cache={} + function pressKey(k) + if not cache[k]then + cache[k]=function()love.keypressed(k)end + end + return cache[k] + end end do--CUS/SETXXX(k) - local CUSTOMENV=CUSTOMENV - function CUSval(k)return function()return CUSTOMENV[k]end end - function ROOMval(k)return function()return ROOMENV[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 ROOMrev(k)return function()ROOMENV[k]=not ROOMENV[k]end end - function SETrev(k)return function()SETTING[k]=not SETTING[k]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 SETsto(k)return function(i)SETTING[k]=i end end + local CUSTOMENV=CUSTOMENV + function CUSval(k)return function()return CUSTOMENV[k]end end + function ROOMval(k)return function()return ROOMENV[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 ROOMrev(k)return function()ROOMENV[k]=not ROOMENV[k]end end + function SETrev(k)return function()SETTING[k]=not SETTING[k]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 SETsto(k)return function(i)SETTING[k]=i end end end \ No newline at end of file diff --git a/parts/globalTables.lua b/parts/globalTables.lua index d5d9b734..bb9ffc84 100644 --- a/parts/globalTables.lua +++ b/parts/globalTables.lua @@ -1,151 +1,151 @@ --Complex tables local function _disableKey(P,key) - table.insert(P.gameEnv.keyCancel,key) + table.insert(P.gameEnv.keyCancel,key) end MODOPT={--Mod options - {no=0,id="NX",name="next", - key="q",x=80,y=230,color='lO', - list={0,1,2,3,4,5,6}, - func=function(P,O)P.gameEnv.nextCount=O end, - unranked=true, - }, - {no=1,id="HL",name="hold", - key="w",x=200,y=230,color='lO', - list={0,1,2,3,4,5,6}, - func=function(P,O)P.gameEnv.holdCount=O end, - unranked=true, - }, - {no=2,id="FL",name="hideNext", - key="e",x=320,y=230,color='lA', - list={1,2,3,4,5}, - func=function(P,O)P.gameEnv.nextStartPos=O+1 end, - unranked=true, - }, - {no=3,id="IH",name="infHold", - key="r",x=440,y=230,color='lA', - func=function(P)P.gameEnv.infHold=true end, - unranked=true, - }, - {no=4,id="HB",name="hideBlock", - key="y",x=680,y=230,color='lV', - func=function(P)P.gameEnv.block=false end, - unranked=true, - }, - {no=5,id="HG",name="hideGhost", - key="u",x=800,y=230,color='lV', - func=function(P)P.gameEnv.ghost=false end, - unranked=true, - }, - {no=6,id="HD",name="hidden", - key="i",x=920,y=230,color='lP', - list={'easy','slow','medium','fast','none'}, - func=function(P,O)P.gameEnv.visible=O end, - unranked=true, - }, - {no=7,id="HB",name="hideBoard", - key="o",x=1040,y=230,color='lP', - list={'down','up','all'}, - func=function(P,O)P.gameEnv.hideBoard=O end, - unranked=true, - }, - {no=8,id="FB",name="flipBoard", - key="p",x=1160,y=230,color='lJ', - list={'U-D','L-R','180'}, - func=function(P,O)P.gameEnv.flipBoard=O end, - unranked=true, - }, + {no=0,id="NX",name="next", + key="q",x=80,y=230,color='lO', + list={0,1,2,3,4,5,6}, + func=function(P,O)P.gameEnv.nextCount=O end, + unranked=true, + }, + {no=1,id="HL",name="hold", + key="w",x=200,y=230,color='lO', + list={0,1,2,3,4,5,6}, + func=function(P,O)P.gameEnv.holdCount=O end, + unranked=true, + }, + {no=2,id="FL",name="hideNext", + key="e",x=320,y=230,color='lA', + list={1,2,3,4,5}, + func=function(P,O)P.gameEnv.nextStartPos=O+1 end, + unranked=true, + }, + {no=3,id="IH",name="infHold", + key="r",x=440,y=230,color='lA', + func=function(P)P.gameEnv.infHold=true end, + unranked=true, + }, + {no=4,id="HB",name="hideBlock", + key="y",x=680,y=230,color='lV', + func=function(P)P.gameEnv.block=false end, + unranked=true, + }, + {no=5,id="HG",name="hideGhost", + key="u",x=800,y=230,color='lV', + func=function(P)P.gameEnv.ghost=false end, + unranked=true, + }, + {no=6,id="HD",name="hidden", + key="i",x=920,y=230,color='lP', + list={'easy','slow','medium','fast','none'}, + func=function(P,O)P.gameEnv.visible=O end, + unranked=true, + }, + {no=7,id="HB",name="hideBoard", + key="o",x=1040,y=230,color='lP', + list={'down','up','all'}, + func=function(P,O)P.gameEnv.hideBoard=O end, + unranked=true, + }, + {no=8,id="FB",name="flipBoard", + key="p",x=1160,y=230,color='lJ', + list={'U-D','L-R','180'}, + func=function(P,O)P.gameEnv.flipBoard=O end, + unranked=true, + }, - {no=9,id="DT",name="dropDelay", - 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}, - func=function(P,O)P.gameEnv.drop=O end, - unranked=true, - }, - {no=10,id="LT",name="lockDelay", - 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}, - func=function(P,O)P.gameEnv.lock=O end, - unranked=true, - }, - {no=11,id="ST",name="waitDelay", - key="d",x=380,y=350,color='lR', - list={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, - func=function(P,O)P.gameEnv.wait=O end, - unranked=true, - }, - {no=12,id="CT",name="fallDelay", - key="f",x=500,y=350,color='lR', - list={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, - func=function(P,O)P.gameEnv.fall=O end, - unranked=true, - }, - {no=13,id="LF",name="life", - key="j",x=860,y=350,color='lY', - list={0,1,2,3,5,10,15,26,42,87,500}, - func=function(P,O)P.gameEnv.life=O end, - unranked=true, - }, - {no=14,id="FB",name="forceB2B", - key="k",x=980,y=350,color='lY', - func=function(P)P.gameEnv.b2bKill=true end, - unranked=true, - }, - {no=15,id="PF",name="forceFinesse", - key="l",x=1100,y=350,color='lY', - func=function(P)P.gameEnv.fineKill=true end, - unranked=true, - }, + {no=9,id="DT",name="dropDelay", + 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}, + func=function(P,O)P.gameEnv.drop=O end, + unranked=true, + }, + {no=10,id="LT",name="lockDelay", + 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}, + func=function(P,O)P.gameEnv.lock=O end, + unranked=true, + }, + {no=11,id="ST",name="waitDelay", + key="d",x=380,y=350,color='lR', + list={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, + func=function(P,O)P.gameEnv.wait=O end, + unranked=true, + }, + {no=12,id="CT",name="fallDelay", + key="f",x=500,y=350,color='lR', + list={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, + func=function(P,O)P.gameEnv.fall=O end, + unranked=true, + }, + {no=13,id="LF",name="life", + key="j",x=860,y=350,color='lY', + list={0,1,2,3,5,10,15,26,42,87,500}, + func=function(P,O)P.gameEnv.life=O end, + unranked=true, + }, + {no=14,id="FB",name="forceB2B", + key="k",x=980,y=350,color='lY', + func=function(P)P.gameEnv.b2bKill=true end, + unranked=true, + }, + {no=15,id="PF",name="forceFinesse", + key="l",x=1100,y=350,color='lY', + func=function(P)P.gameEnv.fineKill=true end, + unranked=true, + }, - {no=16,id="TL",name="tele", - key="z",x=200,y=470,color='lH', - func=function(P) - P.gameEnv.das,P.gameEnv.arr=0,0 - P.gameEnv.sddas,P.gameEnv.sdarr=0,0 - end, - unranked=true, - }, - {no=17,id="FX",name="noRotation", - key="x",x=320,y=470,color='lH', - func=function(P) - _disableKey(P,3) - _disableKey(P,4) - _disableKey(P,5) - end, - unranked=true, - }, - {no=18,id="GL",name="noMove", - key="c",x=440,y=470,color='lH', - func=function(P) - _disableKey(P,1)_disableKey(P,2) - _disableKey(P,11)_disableKey(P,12) - _disableKey(P,17)_disableKey(P,18) - _disableKey(P,19)_disableKey(P,20) - end, - unranked=true, - }, - {no=19,id="CS",name="customSeq", - key="b",x=680,y=470,color='lB', - list={'bag','his','hisPool','c2','rnd','mess','reverb'}, - func=function(P,O)P.gameEnv.sequence=O end, - unranked=true, - }, - {no=20,id="PS",name="pushSpeed", - key="n",x=800,y=470,color='lB', - list={.5,1,2,3,5,15,1e99}, - func=function(P,O)P.gameEnv.pushSpeed=O end, - unranked=true, - }, - {no=21,id="BN",name="boneBlock", - key="m",x=920,y=470,color='lB', - list={'on','off'}, - func=function(P,O)P.gameEnv.bone=O=='on'end, - unranked=true, - }, + {no=16,id="TL",name="tele", + key="z",x=200,y=470,color='lH', + func=function(P) + P.gameEnv.das,P.gameEnv.arr=0,0 + P.gameEnv.sddas,P.gameEnv.sdarr=0,0 + end, + unranked=true, + }, + {no=17,id="FX",name="noRotation", + key="x",x=320,y=470,color='lH', + func=function(P) + _disableKey(P,3) + _disableKey(P,4) + _disableKey(P,5) + end, + unranked=true, + }, + {no=18,id="GL",name="noMove", + key="c",x=440,y=470,color='lH', + func=function(P) + _disableKey(P,1)_disableKey(P,2) + _disableKey(P,11)_disableKey(P,12) + _disableKey(P,17)_disableKey(P,18) + _disableKey(P,19)_disableKey(P,20) + end, + unranked=true, + }, + {no=19,id="CS",name="customSeq", + key="b",x=680,y=470,color='lB', + list={'bag','his','hisPool','c2','rnd','mess','reverb'}, + func=function(P,O)P.gameEnv.sequence=O end, + unranked=true, + }, + {no=20,id="PS",name="pushSpeed", + key="n",x=800,y=470,color='lB', + list={.5,1,2,3,5,15,1e99}, + func=function(P,O)P.gameEnv.pushSpeed=O end, + unranked=true, + }, + {no=21,id="BN",name="boneBlock", + key="m",x=920,y=470,color='lB', + list={'on','off'}, + func=function(P,O)P.gameEnv.bone=O=='on'end, + unranked=true, + }, } for i=1,#MODOPT do - local M=MODOPT[i] - M.sel,M.time=0,0 - M.color=COLOR[M.color] + local M=MODOPT[i] + M.sel,M.time=0,0 + M.color=COLOR[M.color] end --Game tables @@ -155,216 +155,216 @@ FIELD={}--Field(s) for custom game BAG={}--Sequence for custom game MISSION={}--Clearing mission for custom game GAME={--Global game data - playing=false, --If in-game - init=false, --If need initializing game when enter scene-play - net=false, --If play net game + playing=false, --If in-game + init=false, --If need initializing game when enter scene-play + net=false, --If play net game - result=false, --Game result (string) - rank=0, --Rank reached - pauseTime=0, --Time paused - pauseCount=0, --Pausing count - warnLVL0=0, --Warning level - warnLVL=0, --Warning level (show) + result=false, --Game result (string) + rank=0, --Rank reached + pauseTime=0, --Time paused + pauseCount=0, --Pausing count + warnLVL0=0, --Warning level + warnLVL=0, --Warning level (show) - seed=1046101471, --Game seed - curMode=false, --Current gamemode object - mod={}, --List of loaded mods - modeEnv=false, --Current gamemode environment - setting={}, --Game settings - rep={}, --Recording list, key,time,key,time... - statSaved=true, --If recording saved - recording=false, --If recording - replaying=false, --If replaying - saved=false, --If recording saved - tasUsed=false, --If tasMode used + seed=1046101471, --Game seed + curMode=false, --Current gamemode object + mod={}, --List of loaded mods + modeEnv=false, --Current gamemode environment + setting={}, --Game settings + rep={}, --Recording list, key,time,key,time... + statSaved=true, --If recording saved + recording=false, --If recording + replaying=false, --If replaying + saved=false, --If recording saved + tasUsed=false, --If tasMode used - prevBG=false, --Previous background, for restore BG when quit setting page + prevBG=false, --Previous background, for restore BG when quit setting page - --Data for royale mode - stage=false, --Game stage - mostBadge=false, --Most badge owner - secBadge=false, --Second badge owner - mostDangerous=false,--Most dangerous player - secDangerous=false, --Second dangerous player + --Data for royale mode + stage=false, --Game stage + mostBadge=false, --Most badge owner + secBadge=false, --Second badge owner + mostDangerous=false,--Most dangerous player + secDangerous=false, --Second dangerous player } ROYALEDATA={ - powerUp=false, - stage=false, + powerUp=false, + stage=false, } CUSTOMENV={} ROOMENV={ - --Room config - capacity=10, + --Room config + capacity=10, - --Basic - drop=30, - lock=60, - wait=0, - fall=0, + --Basic + drop=30, + lock=60, + wait=0, + fall=0, - --Control - nextCount=6, - holdCount=1, - infHold=false, - phyHold=false, + --Control + nextCount=6, + holdCount=1, + infHold=false, + phyHold=false, - --Visual - bone=false, + --Visual + bone=false, - --Rule - life=0, - pushSpeed=5, - garbageSpeed=2, - visible='show', - freshLimit=15, + --Rule + life=0, + pushSpeed=5, + garbageSpeed=2, + visible='show', + freshLimit=15, - fieldH=20, - heightLimit=1e99, - bufferLimit=1e99, + fieldH=20, + heightLimit=1e99, + bufferLimit=1e99, - ospin=true, - fineKill=false, - b2bKill=false, - easyFresh=true, - deepDrop=false, + ospin=true, + fineKill=false, + b2bKill=false, + easyFresh=true, + deepDrop=false, } REPLAY={}--Replay objects (not include stream data) --Userdata tables USER={--User infomation - --Network infos - uid=false, - authToken=false, + --Network infos + uid=false, + authToken=false, - --Local data - xp=0,lv=1, + --Local data + xp=0,lv=1, } SETTING={--Settings - --Tuning - das=10,arr=2, - dascut=0,dropcut=0, - sddas=0,sdarr=2, - ihs=true,irs=true,ims=true, - RS='TRS', - swap=true, + --Tuning + das=10,arr=2, + dascut=0,dropcut=0, + sddas=0,sdarr=2, + ihs=true,irs=true,ims=true, + RS='TRS', + swap=true, - --System - reTime=4, - allowTAS=false, - autoPause=true, - menuPos='middle', - fine=false, - autoSave=false, - simpMode=false, - lang=1, - skinSet='crystal_scf', - skin={ - 1,7,11,3,14,4,9, - 1,7,2,6,10,2,13,5,9,15,10,11,3,12,2,16,8,4, - 10,13,2,8 - }, - face={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + --System + reTime=4, + allowTAS=false, + autoPause=true, + menuPos='middle', + fine=false, + autoSave=false, + simpMode=false, + lang=1, + skinSet='crystal_scf', + skin={ + 1,7,11,3,14,4,9, + 1,7,2,6,10,2,13,5,9,15,10,11,3,12,2,16,8,4, + 10,13,2,8 + }, + face={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, - --Graphic - ghostType='gray', - block=true,ghost=.3,center=1, - smooth=true,grid=.16,lineNum=.5, - upEdge=true, - bagLine=false, - lockFX=2, - dropFX=2, - moveFX=2, - clearFX=2, - splashFX=2, - shakeFX=2, - atkFX=2, - frameMul=100, - cleanCanvas=false, - blockSatur='normal', - fieldSatur='normal', + --Graphic + ghostType='gray', + block=true,ghost=.3,center=1, + smooth=true,grid=.16,lineNum=.5, + upEdge=true, + bagLine=false, + lockFX=2, + dropFX=2, + moveFX=2, + clearFX=2, + splashFX=2, + shakeFX=2, + atkFX=2, + frameMul=100, + cleanCanvas=false, + blockSatur='normal', + fieldSatur='normal', - text=true, - score=true, - bufferWarn=true, - showSpike=true, - highCam=true, - nextPos=true, - fullscreen=true, - bg=true, - powerInfo=false, - clickFX=true, - warn=true, + text=true, + score=true, + bufferWarn=true, + showSpike=true, + highCam=true, + nextPos=true, + fullscreen=true, + bg=true, + powerInfo=false, + clickFX=true, + warn=true, - --Sound - sfx=1, - sfx_spawn=0, - sfx_warn=.4, - bgm=.7, - stereo=.7, - vib=0, - voc=0, - cv='miya', + --Sound + sfx=1, + sfx_spawn=0, + sfx_warn=.4, + bgm=.7, + stereo=.7, + vib=0, + voc=0, + cv='miya', - --Virtualkey - VKSFX=.2,--SFX volume - VKVIB=0,--VIB - VKSwitch=false,--If disp - VKSkin=1,--If disp - VKTrack=false,--If tracked - VKDodge=false,--If dodge - VKTchW=.3,--Touch-Pos Weight - VKCurW=.4,--Cur-Pos Weight - VKIcon=true,--If disp icon - VKAlpha=.3, + --Virtualkey + VKSFX=.2,--SFX volume + VKVIB=0,--VIB + VKSwitch=false,--If disp + VKSkin=1,--If disp + VKTrack=false,--If tracked + VKDodge=false,--If dodge + VKTchW=.3,--Touch-Pos Weight + VKCurW=.4,--Cur-Pos Weight + VKIcon=true,--If disp icon + VKAlpha=.3, } keyMap={--Key setting - keyboard={ - left=1,right=2,x=3,z=4,c=5, - up=6,down=7,space=8,a=9,s=10, - r=0, - }, - joystick={ - dpleft=1,dpright=2,a=3,b=4,y=5, - dpup=6,dpdown=7,rightshoulder=8,x=9, - leftshoulder=0, - }, + keyboard={ + left=1,right=2,x=3,z=4,c=5, + up=6,down=7,space=8,a=9,s=10, + r=0, + }, + joystick={ + dpleft=1,dpright=2,a=3,b=4,y=5, + dpup=6,dpdown=7,rightshoulder=8,x=9, + leftshoulder=0, + }, } VK_org={--Virtualkey layout, refresh all VKs' position with this before each game - {ava=true, x=80, y=720-200, r=80},--moveLeft - {ava=true, x=320, y=720-200, r=80},--moveRight - {ava=true, x=1280-80, y=720-200, r=80},--rotRight - {ava=true, x=1280-200, y=720-80, r=80},--rotLeft - {ava=true, x=1280-200, y=720-320, r=80},--rot180 - {ava=true, x=200, y=720-320, r=80},--hardDrop - {ava=true, x=200, y=720-80, r=80},--softDrop - {ava=true, x=1280-320, y=720-200, r=80},--hold - {ava=true, x=80, y=280, r=80},--func1 - {ava=true, x=1280-80, y=280, r=80},--func2 - {ava=false, x=670, y=50, r=30},--insLeft - {ava=false, x=730, y=50, r=30},--insRight - {ava=false, x=790, y=50, r=30},--insDown - {ava=false, x=850, y=50, r=30},--down1 - {ava=false, x=910, y=50, r=30},--down4 - {ava=false, x=970, y=50, r=30},--down10 - {ava=false, x=1030, y=50, r=30},--dropLeft - {ava=false, x=1090, y=50, r=30},--dropRight - {ava=false, x=1150, y=50, r=30},--zangiLeft - {ava=false, x=1210, y=50, r=30},--zangiRight + {ava=true, x=80, y=720-200,r=80},--moveLeft + {ava=true, x=320, y=720-200,r=80},--moveRight + {ava=true, x=1280-80, y=720-200,r=80},--rotRight + {ava=true, x=1280-200,y=720-80, r=80},--rotLeft + {ava=true, x=1280-200,y=720-320,r=80},--rot180 + {ava=true, x=200, y=720-320,r=80},--hardDrop + {ava=true, x=200, y=720-80, r=80},--softDrop + {ava=true, x=1280-320,y=720-200,r=80},--hold + {ava=true, x=80, y=280, r=80},--func1 + {ava=true, x=1280-80, y=280, r=80},--func2 + {ava=false, x=670, y=50, r=30},--insLeft + {ava=false, x=730, y=50, r=30},--insRight + {ava=false, x=790, y=50, r=30},--insDown + {ava=false, x=850, y=50, r=30},--down1 + {ava=false, x=910, y=50, r=30},--down4 + {ava=false, x=970, y=50, r=30},--down10 + {ava=false, x=1030, y=50, r=30},--dropLeft + {ava=false, x=1090, y=50, r=30},--dropRight + {ava=false, x=1150, y=50, r=30},--zangiLeft + {ava=false, x=1210, y=50, r=30},--zangiRight } RANKS={sprint_10l=0}--Ranks of modes STAT={ - version=VERSION.code, - run=0,game=0,time=0,frame=0, - key=0,rotate=0,hold=0, - extraPiece=0,finesseRate=0, - piece=0,row=0,dig=0, - atk=0,digatk=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)(), - 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, - lastPlay='sprint_10l',--Last played mode ID - date=false, - todayTime=0, + version=VERSION.code, + run=0,game=0,time=0,frame=0, + key=0,rotate=0,hold=0, + extraPiece=0,finesseRate=0, + piece=0,row=0,dig=0, + atk=0,digatk=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)(), + 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, + lastPlay='sprint_10l',--Last played mode ID + date=false, + todayTime=0, } \ No newline at end of file diff --git a/parts/language/dict_en.lua b/parts/language/dict_en.lua index b2165136..f7efc55f 100644 --- a/parts/language/dict_en.lua +++ b/parts/language/dict_en.lua @@ -1,1157 +1,1157 @@ local HDsearch="https://harddrop.com/wiki?search=" local HDwiki="\nVisit HD Wiki for more information" return{ - {"Translator Note 1", - "", - "help", - "This translation of the TetroDictionary is provided by me, User670 (Discord: User670#9501).\n\nThe translation may not completely reflect the contents of the original Chinese text." - }, - {"Official website", - "official website homepage", - "help", - "Official website of Techmino!\nYou can modify your profile on it", - "http://home.techmino.org", - }, - {"To New Players", - "guide newbie noob", - "help", - "To new players that want to get better at the game:\n\tTwo principles:\n\t1. find a version with good controls (for example, Techmino, Tetr.io, Tetris Online, Jstris, Tetr.js). Do not use programming practice versions (they are garbage).\n\t2. Build foundations in your skills (stable Tetrises using next queue to aid decisions), don't go for fancy T-Spins from the start.\n\n\tTwo main techniques:\n\t1. familiarize yourself with spawn locations of pieces, and the controls to move the piece into each location\n\t2. Plan ahead of where to put pieces\nWe recommend that you read this article titled \"Words to newbies from a Tetris Pro\" (Click \"Open URL\". This article is in Chinese.)", - "https://bilibili.com/read/cv2352939", - }, - {"Tetris Wiki", - "tetris wiki", - "help", - "Tetris.wiki is a wiki focused on creating Tetris related content. It was started by Myndzi in 2015. Over the years, thousands of contributions have been made documenting official and fan games in the series, uncovering game mechanics, and creating guides to improve playing.", - "https://tetris.wiki", - }, - {"Hard Drop Wiki", - "harddrop hd wiki", - "help", - "A wiki hosted on the Hard Drop community.", - "https://harddrop.com/wiki/Tetris_Wiki", - }, - {"Tetris Wiki Fandom", - "tetris wiki fandom", - "help", - "A tetris wiki.", - "https://tetris.fandom.com/wiki/Tetris_Wiki", - }, - {"Huiji Wiki", - "huiji wiki", - "help", - "Chinese: 灰机wiki\nA Chinese Tetris wiki, written by Tetris fans from the Tetris Research community.\nCurrently, most of its pages are translated from Hard Drop Wiki and Tetris Wiki.\n(Link is in Chinese.)", - "https://tetris.huijiwiki.com", - }, + {"Translator Note 1", + "", + "help", + "This translation of the TetroDictionary is provided by me, User670 (Discord: User670#9501).\n\nThe translation may not completely reflect the contents of the original Chinese text." + }, + {"Official website", + "official website homepage", + "help", + "Official website of Techmino!\nYou can modify your profile on it", + "http://home.techmino.org", + }, + {"To New Players", + "guide newbie noob", + "help", + "To new players that want to get better at the game:\n\tTwo principles:\n\t1. find a version with good controls (for example, Techmino, Tetr.io, Tetris Online, Jstris, Tetr.js). Do not use programming practice versions (they are garbage).\n\t2. Build foundations in your skills (stable Tetrises using next queue to aid decisions), don't go for fancy T-Spins from the start.\n\n\tTwo main techniques:\n\t1. familiarize yourself with spawn locations of pieces, and the controls to move the piece into each location\n\t2. Plan ahead of where to put pieces\nWe recommend that you read this article titled \"Words to newbies from a Tetris Pro\" (Click \"Open URL\". This article is in Chinese.)", + "https://bilibili.com/read/cv2352939", + }, + {"Tetris Wiki", + "tetris wiki", + "help", + "Tetris.wiki is a wiki focused on creating Tetris related content. It was started by Myndzi in 2015. Over the years, thousands of contributions have been made documenting official and fan games in the series, uncovering game mechanics, and creating guides to improve playing.", + "https://tetris.wiki", + }, + {"Hard Drop Wiki", + "harddrop hd wiki", + "help", + "A wiki hosted on the Hard Drop community.", + "https://harddrop.com/wiki/Tetris_Wiki", + }, + {"Tetris Wiki Fandom", + "tetris wiki fandom", + "help", + "A tetris wiki.", + "https://tetris.fandom.com/wiki/Tetris_Wiki", + }, + {"Huiji Wiki", + "huiji wiki", + "help", + "Chinese: 灰机wiki\nA Chinese Tetris wiki, written by Tetris fans from the Tetris Research community.\nCurrently, most of its pages are translated from Hard Drop Wiki and Tetris Wiki.\n(Link is in Chinese.)", + "https://tetris.huijiwiki.com", + }, - --Games - {"TTT", - "ttt tetris trainer tres bien", - "game", - "*Web-based, no mobile support | Single player*\nTetris Trainer Tres-Bien. A hands-on tutorial of advanced techniques in modern Tetris.\nRecommended for players that can complete a 40-line Sprint with all Tetris line clears and no hold.\nCovered topics include T-Spin, finesse, SRS, and some battle setups.\nLinked is translated to Simplified Chinese; original in Japanese.", - "http://teatube.ltd/ttt", - }, - {"TTPC", - "ttpc tetris perfect clear challenge", - "game", - "*Web-based, no mobile support | Single player*\nTetris Perfect Clear Challenge. The PC opener tutorial for SRS+bag7.\nRecommended for players that have completed TTT. You need to know SRS to play this.\nIncludes only the basic PC opener.\nLinked is translated to Simplified Chinese; original in Japanese.", - "http://teatube.ltd/ttpc", - }, - {"NAZO", - "nazo", - "game", - "*Web-based, no mobile support | Single player*\nAll sorts of SRS puzzles. Recommended for players that have completed TTT.\nHas T-Spin and all spin puzzles of all difficulties.\nLinked is translated to Simplified Chinese; original in Japanese.", - "http://teatube.ltd/nazo", - }, + --Games + {"TTT", + "ttt tetris trainer tres bien", + "game", + "*Web-based, no mobile support | Single player*\nTetris Trainer Tres-Bien. A hands-on tutorial of advanced techniques in modern Tetris.\nRecommended for players that can complete a 40-line Sprint with all Tetris line clears and no hold.\nCovered topics include T-Spin, finesse, SRS, and some battle setups.\nLinked is translated to Simplified Chinese; original in Japanese.", + "http://teatube.ltd/ttt", + }, + {"TTPC", + "ttpc tetris perfect clear challenge", + "game", + "*Web-based, no mobile support | Single player*\nTetris Perfect Clear Challenge. The PC opener tutorial for SRS+bag7.\nRecommended for players that have completed TTT. You need to know SRS to play this.\nIncludes only the basic PC opener.\nLinked is translated to Simplified Chinese; original in Japanese.", + "http://teatube.ltd/ttpc", + }, + {"NAZO", + "nazo", + "game", + "*Web-based, no mobile support | Single player*\nAll sorts of SRS puzzles. Recommended for players that have completed TTT.\nHas T-Spin and all spin puzzles of all difficulties.\nLinked is translated to Simplified Chinese; original in Japanese.", + "http://teatube.ltd/nazo", + }, - {"King of Stackers", - "kos kingofstackers", - "game", - "*Web-based | Multiplayer*\nTurn-based battle Tetris game.", - "https://kingofstackers.com/games.php", - }, - {"Tetr.js", - "tetrjs tetr.js", - "game", - "*Web-based | Single player*\nHas newbie-friendly custom modes (most common features). Mobile can only use a few preset on-screen control schemes.\nLinked to Farter's Dig Mod, which itself is a mod of another version. Also has another mod called Tetr.js Enhanced.", - "http://farter.cn/t", - }, - {"Tetra Legends", - "tl tetralegends", - "game", - "*Web-based, no mobile support | Single player*\nFeature-rich game with fancy visuals, also visualized some data that are otherwise hidden in other games, although controls aren't exactly the most comfortable. Has a rhythm mode.\nIt can be slow to load the game the first time.", - "https://tetralegends.app", - }, - {"Ascension", - "asc ascension", - "game", - "",--TODO - "https://asc.winternebs.com", - }, - {"Jstris", - "js jstris", - "game", - "*Web-based | Single player and multiplayer*\nBasic web-based battle Tetris game.", - "https://jstris.jezevec10.com", - }, - {"TETR.IO", - "io tetrio tetr.io", - "game", - "*Web-based, no mobile support | Single player and multiplayer*\nFancy online battle Tetris game.", - "https://tetr.io", - }, - {"Nuketris", - "nuketris", - "game", - "*Web-based | Single player and multiplayer*\nA block stacker game with 1-vs-1 ranked mode and a few single player modes. A PC is recommended for playing this game.", - "https://nuketris.herokuapp.com", - }, - {"WWC", - "wwc worldwidecombos", - "game", - "*Web-based | Multiplayer*\nWorldwide Combos, a web-based worldwide 1-vs-1 battle Tetris game.", - "https://worldwidecombos.com", - }, - {"Tetris Friends", - "tf tetrisfriends notrisfoes", - "game", - "*Web-based, no mobile support | Single player and multiplayer*\nA now-defunct web-based Tetris game; used to be a decent battle game. An unofficial private server known as Notris Foes exist.\nIt is built using Flash, which might require workarounds to play or cannot run at all on your machine.", - }, + {"King of Stackers", + "kos kingofstackers", + "game", + "*Web-based | Multiplayer*\nTurn-based battle Tetris game.", + "https://kingofstackers.com/games.php", + }, + {"Tetr.js", + "tetrjs tetr.js", + "game", + "*Web-based | Single player*\nHas newbie-friendly custom modes (most common features). Mobile can only use a few preset on-screen control schemes.\nLinked to Farter's Dig Mod, which itself is a mod of another version. Also has another mod called Tetr.js Enhanced.", + "http://farter.cn/t", + }, + {"Tetra Legends", + "tl tetralegends", + "game", + "*Web-based, no mobile support | Single player*\nFeature-rich game with fancy visuals, also visualized some data that are otherwise hidden in other games, although controls aren't exactly the most comfortable. Has a rhythm mode.\nIt can be slow to load the game the first time.", + "https://tetralegends.app", + }, + {"Ascension", + "asc ascension", + "game", + "",--TODO + "https://asc.winternebs.com", + }, + {"Jstris", + "js jstris", + "game", + "*Web-based | Single player and multiplayer*\nBasic web-based battle Tetris game.", + "https://jstris.jezevec10.com", + }, + {"TETR.IO", + "io tetrio tetr.io", + "game", + "*Web-based, no mobile support | Single player and multiplayer*\nFancy online battle Tetris game.", + "https://tetr.io", + }, + {"Nuketris", + "nuketris", + "game", + "*Web-based | Single player and multiplayer*\nA block stacker game with 1-vs-1 ranked mode and a few single player modes. A PC is recommended for playing this game.", + "https://nuketris.herokuapp.com", + }, + {"WWC", + "wwc worldwidecombos", + "game", + "*Web-based | Multiplayer*\nWorldwide Combos, a web-based worldwide 1-vs-1 battle Tetris game.", + "https://worldwidecombos.com", + }, + {"Tetris Friends", + "tf tetrisfriends notrisfoes", + "game", + "*Web-based, no mobile support | Single player and multiplayer*\nA now-defunct web-based Tetris game; used to be a decent battle game. An unofficial private server known as Notris Foes exist.\nIt is built using Flash, which might require workarounds to play or cannot run at all on your machine.", + }, - {"TGM", - "tgm tetrisgrandmaster tetristhegrandmaster", - "game", - "*Arcade | Single player*\nTetris: The Grand Master, an arcade series famous for its difficulty. Some player titles like S13 and GM (Grand Master) come from this series.", - }, - {"DTET", - "dtet", - "game", - "*Windows | Single player*\nA game based on TGM's Classic rule with 20G and a powerful rotation system. Decent controls, but has no customization other than control mappings. The game is a it hard to find now and you might need to manually install required DLLs.", - }, - {"Heboris", - "hb heboris", - "game", - "*Windows*\nA game with Arcade-ish play style, simulates some modes of many Tetris games.", - }, - {"Texmaster", - "txm texmaster", - "game", - "*Windows | Single player*\nA game with all modes from TGM which you can use to practice. Has better controls than actual TGM. The world rule is slightly different, however (eg, instant-lock soft drops, and slightly different kick tables)", - }, + {"TGM", + "tgm tetrisgrandmaster tetristhegrandmaster", + "game", + "*Arcade | Single player*\nTetris: The Grand Master, an arcade series famous for its difficulty. Some player titles like S13 and GM (Grand Master) come from this series.", + }, + {"DTET", + "dtet", + "game", + "*Windows | Single player*\nA game based on TGM's Classic rule with 20G and a powerful rotation system. Decent controls, but has no customization other than control mappings. The game is a it hard to find now and you might need to manually install required DLLs.", + }, + {"Heboris", + "hb heboris", + "game", + "*Windows*\nA game with Arcade-ish play style, simulates some modes of many Tetris games.", + }, + {"Texmaster", + "txm texmaster", + "game", + "*Windows | Single player*\nA game with all modes from TGM which you can use to practice. Has better controls than actual TGM. The world rule is slightly different, however (eg, instant-lock soft drops, and slightly different kick tables)", + }, - {"Tetris99", - "t99 tetris99", - "game", - "*Nintendo Switch | Multiplayer*\nA game famous for its 99-player battle royale mode, has many interesting strategies not present on traditional battle Tetris games. Also has limited single player modes like Marathon and bot matches available as DLC.", - }, - {"Puyo Puyo Tetris", - "ppt puyopuyotetris", - "game", - "*Multiple platforms | Single player and multiplayer*\nA game that combines two games, Tetris and Puyo Puyo, and can battle between those two games. Has many modes for both single player and online. PC/Steam has worse controls and horrible online experience, not recommended.", - }, - {"Tetris Online", - "top tetrisonline", - "game", - "*Windows | Single player and multiplyer*\nA now-defunct Japanese Tetris game with both online and single player modes. Allows custom DAS/ARR but neither can be set to 0. Minor input delay. Private servers exist and is decent for new players to get started.", - }, - {"Tetris Effect", - "te tetriseffect", - "game", - "*PS4, Windows, XBox | Single player*\nFancy graphics and soundtrack that react to your actions. Not-so-good controls. You can have a go if you are into the visuals, but not exactly worth it if you are just trying to play some Tetris.", - }, - {"Techmino", - "techmino", - "game", - "*Windows, MacOS, Android | Single player and multiplyer*\nA game with many modes and loads of customization. Low input delay, decent controls.", - }, - {"Cultris II", - "c2 cultris2 cultrisii", - "game", - "*Windows, MacOS, Linux | Single player and multiplayer*\nA game focusing on speed. Has no hold and limited lockdown timer (like old school Tetris), but has customizable DAS/ARR. The main gimmick is its timer-based combos, and emphasizes on speed, combo setups and digging.", - }, - {"Nullpomino", - "np nullpomino", - "game", - "*Windows | Single player and multiplayer*\nProfessional Tetris game with extreme room for customization. You can customize almost every aspect of the game. However, this is not a beginner-friendly game (you can get lost in the menus quite easily).", - }, - {"Touhoumino", - "touhoumino", - "game", - "*Windows | Single player*\nA Nullpomino mod with Touhou elements. Fun to play, but difficult. Recommended for players with at least half-decent skills, otherwise you don't even know how you die", - }, - {"Misamino", - "misamino", - "game", - "*Windows | Single player?*\nLocal 1-vs-1 game, mainly plays turn-based mode. You can write your own bot for it (though you need to learn its API if you do).\nMisamino is also the name of its built-in bot. Said bot is also the core for the Puyo Puyo Tetris bot, Zetris.", - }, - {"JJ Tetris", - "jjtetris", - "game", - "*Android | Multiplayer*\nChinese: JJ块\nA casual game on JJ Card Games (JJ棋牌). Portrait screen, low input delay, smooth controls. Customizable DAS/ARR and toggle-able 20G soft drop, limited control scheme customization. No hold nor B2B, no garbage buffer nor cancelling. Every attack sends at most 4 lines, combos are more powerful, otherwise similar to modern Tetris.", - }, - {"Falling lightblock", - "fl fallinglightblock", - "game", - "*Android, iOS, Web | Single player and multiplayer*\nA game that supports many platforms. Has delays that cannot be adjusted. Can, to some extent, customize controls on mobile. Most of the modes are similar to classic Tetris, but modern-ish modes also exist. Battles are half-turn-based-half-real-time, and garbage cannot be buffered or cancelled.", - "https://golfgl.de/lightblocks/", - }, - {"Huopin Tetris", - "huopin qq", - "game", - "*Windows | Multiplayer*\nChinese: 火拼俄罗斯\nThe Tetris game on Tencent Game Center, 12-wide board, DAS/ARR the same as your typing, 1 next, no hold. Can only send garbage though Tetris (sends 3 lines) and Triple (sends 2 lines). Garbage is checker-board-shaped and very difficult to dig through.", - }, + {"Tetris99", + "t99 tetris99", + "game", + "*Nintendo Switch | Multiplayer*\nA game famous for its 99-player battle royale mode, has many interesting strategies not present on traditional battle Tetris games. Also has limited single player modes like Marathon and bot matches available as DLC.", + }, + {"Puyo Puyo Tetris", + "ppt puyopuyotetris", + "game", + "*Multiple platforms | Single player and multiplayer*\nA game that combines two games, Tetris and Puyo Puyo, and can battle between those two games. Has many modes for both single player and online. PC/Steam has worse controls and horrible online experience, not recommended.", + }, + {"Tetris Online", + "top tetrisonline", + "game", + "*Windows | Single player and multiplyer*\nA now-defunct Japanese Tetris game with both online and single player modes. Allows custom DAS/ARR but neither can be set to 0. Minor input delay. Private servers exist and is decent for new players to get started.", + }, + {"Tetris Effect", + "te tetriseffect", + "game", + "*PS4, Windows, XBox | Single player*\nFancy graphics and soundtrack that react to your actions. Not-so-good controls. You can have a go if you are into the visuals, but not exactly worth it if you are just trying to play some Tetris.", + }, + {"Techmino", + "techmino", + "game", + "*Windows, MacOS, Android | Single player and multiplyer*\nA game with many modes and loads of customization. Low input delay, decent controls.", + }, + {"Cultris II", + "c2 cultris2 cultrisii", + "game", + "*Windows, MacOS, Linux | Single player and multiplayer*\nA game focusing on speed. Has no hold and limited lockdown timer (like old school Tetris), but has customizable DAS/ARR. The main gimmick is its timer-based combos, and emphasizes on speed, combo setups and digging.", + }, + {"Nullpomino", + "np nullpomino", + "game", + "*Windows | Single player and multiplayer*\nProfessional Tetris game with extreme room for customization. You can customize almost every aspect of the game. However, this is not a beginner-friendly game (you can get lost in the menus quite easily).", + }, + {"Touhoumino", + "touhoumino", + "game", + "*Windows | Single player*\nA Nullpomino mod with Touhou elements. Fun to play, but difficult. Recommended for players with at least half-decent skills, otherwise you don't even know how you die", + }, + {"Misamino", + "misamino", + "game", + "*Windows | Single player?*\nLocal 1-vs-1 game, mainly plays turn-based mode. You can write your own bot for it (though you need to learn its API if you do).\nMisamino is also the name of its built-in bot. Said bot is also the core for the Puyo Puyo Tetris bot, Zetris.", + }, + {"JJ Tetris", + "jjtetris", + "game", + "*Android | Multiplayer*\nChinese: JJ块\nA casual game on JJ Card Games (JJ棋牌). Portrait screen, low input delay, smooth controls. Customizable DAS/ARR and toggle-able 20G soft drop, limited control scheme customization. No hold nor B2B, no garbage buffer nor cancelling. Every attack sends at most 4 lines, combos are more powerful, otherwise similar to modern Tetris.", + }, + {"Falling lightblock", + "fl fallinglightblock", + "game", + "*Android, iOS, Web | Single player and multiplayer*\nA game that supports many platforms. Has delays that cannot be adjusted. Can, to some extent, customize controls on mobile. Most of the modes are similar to classic Tetris, but modern-ish modes also exist. Battles are half-turn-based-half-real-time, and garbage cannot be buffered or cancelled.", + "https://golfgl.de/lightblocks/", + }, + {"Huopin Tetris", + "huopin qq", + "game", + "*Windows | Multiplayer*\nChinese: 火拼俄罗斯\nThe Tetris game on Tencent Game Center, 12-wide board, DAS/ARR the same as your typing, 1 next, no hold. Can only send garbage though Tetris (sends 3 lines) and Triple (sends 2 lines). Garbage is checker-board-shaped and very difficult to dig through.", + }, - --Terms - {"Translator Note 2", - "", - "help", - "Translator's note on those per-minute and per-second values\n\nNot all of them are commonly used in the communities, and not all terms mean the same thing across all contexts. They mostly apply to Techmino." - }, - {"LPM", - "lpm linesperminute speed", - "term", - "Lines per minute\n\tReflects playing speed of a player.\nDifferent games calculates LPM differently. For example, Tetris Online calculates its LPM using PPS (see below), where 1PPS=24LPM. This basically ignores clearing garbage lines, and makes it different from its literal meaning. In Techmino, this converted LPM value is marked \"L'PM\".", - }, - {"PPS", - "pps piecespersecond speed", - "term", - "Pieces per second\n\tReflects playing speed of a player.", - }, - {"BPM", - "bpm blocksperminute piecesperminute speed", - "term", - "Blocks per minute\n\tReflects playing speed of a player.\nAlso apparently MrZ forgot that it can be called PPM to avoid confusing with the music term.", - }, - {"KPM", - "kpm keysperminute keypressesperminute", - "term", - "Keypresses per minute\n\tHow fast the player presses buttons.", - }, - {"KPP", - "kpp keysperpiece keypressesperpiece", - "term", - "Keypresses per piece\n\tReflects how efficient the player is with the controls. Reduce this number by learning to finesse.", - }, - {"APM", - "apm attackperminute", - "term", - "Attack per minute\n\tReflects offensive power of a player.\nIn Techmino, the concept of \"attack\" sometimes includes the fractional lines of an attack. Since sending garbage rounds down before sending, this value can be higher than your actual attack power.", - }, - {"SPM", - "spm linessentperminute", - "term", - "[lines] Sent per minute\n\tReflects *actual* offensive power of a player. (does not count lines used for cancelling garbage in buffer.)", - }, - {"RPM", - "rpm receive jieshou", - "term", - "[lines] Receive per Minute\n\tReflects pressure applied to a player.", - }, - {"DPM", - "dpm digperminute defendperminute", - "term", - "Dig/Defend per minute\n\tSometimes can reflect how well a player can survive garbage.", - }, - {"ADPM", - "adpm attackdigperminute vs", - "term", - "Attack&Dig per minute\n\tUsed to compare skill differences between the two players within one match; slightly more accurate than APM.\n\"vs\" in TETR.IO is Atk+Dig per 100s", - }, - {"APL", - "apl attackperline efficiency", - "term", - "Attack per line [cleared]\n\tAlso known as \"efficiency\"; reflects the per-line efficiency of attacks. For example, Tetrises and T-spins have higher efficiency than doubles and triples.", - }, + --Terms + {"Translator Note 2", + "", + "help", + "Translator's note on those per-minute and per-second values\n\nNot all of them are commonly used in the communities, and not all terms mean the same thing across all contexts. They mostly apply to Techmino." + }, + {"LPM", + "lpm linesperminute speed", + "term", + "Lines per minute\n\tReflects playing speed of a player.\nDifferent games calculates LPM differently. For example, Tetris Online calculates its LPM using PPS (see below), where 1PPS=24LPM. This basically ignores clearing garbage lines, and makes it different from its literal meaning. In Techmino, this converted LPM value is marked \"L'PM\".", + }, + {"PPS", + "pps piecespersecond speed", + "term", + "Pieces per second\n\tReflects playing speed of a player.", + }, + {"BPM", + "bpm blocksperminute piecesperminute speed", + "term", + "Blocks per minute\n\tReflects playing speed of a player.\nAlso apparently MrZ forgot that it can be called PPM to avoid confusing with the music term.", + }, + {"KPM", + "kpm keysperminute keypressesperminute", + "term", + "Keypresses per minute\n\tHow fast the player presses buttons.", + }, + {"KPP", + "kpp keysperpiece keypressesperpiece", + "term", + "Keypresses per piece\n\tReflects how efficient the player is with the controls. Reduce this number by learning to finesse.", + }, + {"APM", + "apm attackperminute", + "term", + "Attack per minute\n\tReflects offensive power of a player.\nIn Techmino, the concept of \"attack\" sometimes includes the fractional lines of an attack. Since sending garbage rounds down before sending, this value can be higher than your actual attack power.", + }, + {"SPM", + "spm linessentperminute", + "term", + "[lines] Sent per minute\n\tReflects *actual* offensive power of a player. (does not count lines used for cancelling garbage in buffer.)", + }, + {"RPM", + "rpm receive jieshou", + "term", + "[lines] Receive per Minute\n\tReflects pressure applied to a player.", + }, + {"DPM", + "dpm digperminute defendperminute", + "term", + "Dig/Defend per minute\n\tSometimes can reflect how well a player can survive garbage.", + }, + {"ADPM", + "adpm attackdigperminute vs", + "term", + "Attack&Dig per minute\n\tUsed to compare skill differences between the two players within one match; slightly more accurate than APM.\n\"vs\" in TETR.IO is Atk+Dig per 100s", + }, + {"APL", + "apl attackperline efficiency", + "term", + "Attack per line [cleared]\n\tAlso known as \"efficiency\"; reflects the per-line efficiency of attacks. For example, Tetrises and T-spins have higher efficiency than doubles and triples.", + }, - {"Single", - "single", - "term", - "Clear 1 line.", - }, - {"Double", - "double", - "term", - "Clear 2 lines.", - }, - {"Triple", - "triple", - "term", - "Clear 3 lines.", - }, - {"Techrash", - "techrash", - "term", - "*Techmino-exclusive*\nClear 4 lines.", - }, - {"Tetris", - "tetris", - "term", - "The name of the game (and its trademark). Also the name for clearing 4 lines.\nCoined from Tetra (greek for \"four\") and Tennis (favorite sport of Alexey Pajitnov, creator of Tetris).", - }, - {"All Clear", - "pc perfectclear ac allclear", - "term", - "Formerly known as Perfect Clear (PC). That is also still the term preferred by the communities and used in Techmino.\nClear all minoes on the field.", - }, - {"HPC", - "hpc hc clear halfperfectclear", - "term", - "*Techmino-exclusive*\nHalf Perfect Clear\nExtension of an All Clear. Should a line clear resemble an All Clear when ignoring lines below the clear, the clear is a Half Perfect Clear, and sends a small extra amount of attack.", - }, + {"Single", + "single", + "term", + "Clear 1 line.", + }, + {"Double", + "double", + "term", + "Clear 2 lines.", + }, + {"Triple", + "triple", + "term", + "Clear 3 lines.", + }, + {"Techrash", + "techrash", + "term", + "*Techmino-exclusive*\nClear 4 lines.", + }, + {"Tetris", + "tetris", + "term", + "The name of the game (and its trademark). Also the name for clearing 4 lines.\nCoined from Tetra (greek for \"four\") and Tennis (favorite sport of Alexey Pajitnov, creator of Tetris).", + }, + {"All Clear", + "pc perfectclear ac allclear", + "term", + "Formerly known as Perfect Clear (PC). That is also still the term preferred by the communities and used in Techmino.\nClear all minoes on the field.", + }, + {"HPC", + "hpc hc clear halfperfectclear", + "term", + "*Techmino-exclusive*\nHalf Perfect Clear\nExtension of an All Clear. Should a line clear resemble an All Clear when ignoring lines below the clear, the clear is a Half Perfect Clear, and sends a small extra amount of attack.", + }, - {"Spin", - "spin", - "term", - "Use rotation to move a piece into a position otherwise unreachable. In some games, this sends extra attack or awards extra score.", - }, - {"Mini", - "mini", - "term", - "A modifier to Spins, applied to Spin actions that the game considers easy (thus the name \"EZ T-Spin\" in an old game). Score and attack bonuses are reduced for Mini Spins.\nDifferent games have different rules for what counts as a Mini, and many are not intuitive. You can just remember a few common shapes.", - }, - {"All-Spin", - "allspin", - "term", - "A rule in which spins of all pieces are awarded extra attack/score, rather than just spins of the T piece (\"T-Spin only\").", - }, - {"T-Spin", - "tspin", - "term", - "A spin using the T piece.\nIn modern official games, T-Spins are detected using the 3-corner rule, i.e. if at least three of the four cells diagonal to the rotation center, it is a T-Spin. Some games have extra rules to mark a T-Spin as a Mini T-Spin instead, which has reduced attack/score.", - }, - {"TSS", - "tss t1 tspinsingle", - "term", - "T-Spin Single\nClear 1 line with a T-Spin.", - }, - {"TSD", - "tsd t2 tspindouble", - "term", - "T-Spin Double\nClear 2 lines with a T-Spin.", - }, - {"TST", - "tst t3 tspintriple", - "term", - "T-Spin Triple\nClear 3 lines with a T-Spin.", - }, - {"MTSS", - "mtss minitspinsingle tsms tspinminisingle", - "term", - "Mini T-Spin Single\nFormerly known as T-Spin Mini Single.\nClear 1 line with a Mini T-Spin.\nDifferent games apparently have different ways to determine whether a T-Spin is a Mini.", - }, - {"MTSD", - "mtsd minitspindouble tsmd tspinminidouble", - "term", - "Mini T-Spin Double\nFormerly known as T-Spin Mini Double (TSMD).\nClear 2 lines with a Mini T-Spin.\nDifferent games apparently have different ways to determine whether a T-Spin is a Mini.\nIn addition, different games have different behavior when clearing a Mini T-Spin Double: some games credit this move correctly, and some games use a different displayed text because they never programmed this in.", - }, - {"O-Spin", - "ospin", - "term", - "In most cases, it's a meme.\nThe O Tetromino (a.k.a. the Square) does not change upon rotation, thus making it lack interesting spins/kicks that other Tetrominoes have, or be stuck in a place unable to get out.\nAs a joke, some people have made heavily edited videos or even programmed games where the O piece can change shape and \"spin\" into different positions.\nTechmino also supports O-Spin in most modes.", - }, - {"Rotation Systems", - "wallkick rotationsystem", - "term", - "Systems that determine how pieces rotate.\n\nRotation systems usually handle two things: basic rotation and kicks.\n\nBasic rotation refers to how pieces rotate in an open area. Because rotating pieces on their geometric center will usually cause the piece to be misaligned from the grid, rotation systems need to specify alternative rotation centers or rotation offsets in order to align rotated pieces back to the grid.\n\nKicks refer to offsets applied if the rotated piece overlaps with the border of the matrix or other blocks. While older games, like the ones on NES and Gameboy, lack kicks, people soon realized that if a piece is too close to the wall, the floor or other pieces, the piece can (unintuitively) fail to rotate due to overlapping. Games started to implement systems that allow pieces close to walls/floors to rotate, and move them away from the wall/floor into a valid position (\"kicking off the wall/floor\"), and such movements, or offsets used in said movements, are referred to as (wall/floor) kicks.\n\nWhile Super Rotation System (SRS) is the current standard for modern official Tetris games, older games and unofficial games may have their own rotation systems, implementing different basic rotations and kicks.", - }, - {"ARS", - "ars arikrotationsystem atarirotationsystem", - "term", - "It can refer to two things:\nArika Rotation System, which is used in Tetris: The Grand Master games.\nAtari Rotation System, which aligns pieces to the top-left when rotating.", - }, - {"ASC", - "ascension", - "term", - "Rotation system used in the Tetris clone Ascension. All pieces use the same two kick tables (one for CW, one for CCW), and the kick range is approximately +/- 2 blocks on both axis.\n\nIn Techmino, ASC+ is a modified version of Ascension's rotation system, adding kicks for 180 spins.", - }, - {"BRS", - "brs bulletproofsoftware", - "term", - "BPS rotation system, the rotation system used in Tetris games by Bullet-Proof Software.", - }, - {"BiRS", - "birs biasrs biasrotationsystem", - "term", - "*Techmino exclusive*\n\nBias Rotation System, Techmino's original rotation system based on XRS and SRS.\nIt sets an offset to rotation if you hold left/right/soft drop when you rotate.\nIf rotation fails when downwards offset is applied, it tries again without the downwards offset.\nThen it tries without left/right offset.\nIf it fails, then rotation will not occur.\n\nCompared to XRS, BiRS only uses a single kick table, making it easier to memorize; also keeps the climbing-over-terrain feature of SRS.\n\nThe final kick offset's euclidean distance can't be larger than sqrt(5) and if there is a horizontal offset, the final kick offset can't be in the opposite direction.", - }, - {"C2RS", - "c2rs", - "term", - "Cultris II rotation system, a rotation system used in the Tetris clone Cultris II.\nAll rotations and all pieces share the same kick table (left, right, down, down-left, down-right, left 2, right 2), with left priortizing over right.\n\nIn Techmino, C2sym is a modification to this rotation system that chooses whether to check left or right first depending on the piece and rotation.", - }, - {"DRS", - "drs dtetrotationsystem", - "term", - "DTET Rotation System\nThe rotation system used in DTET.", - }, - {"NRS", - "nrs nintendorotationsystem", - "term", - "Nintendo Rotation System\nThe rotation system used in the Tetris games on the NES and Gameboy.\nIt has two mirrored versions; the left-handed version is used on Gameboy, and the right-handed version on the NES.", - }, - {"SRS", - "srs superrotationsystem", - "term", - "Super Rotation System\nThe rotation system used in modern, official Tetris games.\nEach Tetromino has a rotation center for the piece to rotate around. Should a Tetromino overlap with the wall, floor or another mino on the field after rotation, a few offset positions will be checked, allowing pieces to kick off walls and floors. This also allows pieces to rotate into openings that are otherwise unreachable.\n\nMany unofficial games implement some modification of this rotation system that adds a kick for 180 spins. In Techmino, such a modification is called SRS+.", - }, - {"TRS", - "trs techminorotationsystem", - "term", - "*Techmino-exclusive*\nTechmino Rotation System\nThe rotation system used in Techmino, based on SRS.\nIt includes fixes on common cases where S/Z are locked from rotating, and some extra useful kicks. Each pentomino also has a kick table roughly based on SRS logic.", - }, - {"XRS", - "xrs", - "term", - "X rotation system, a rotation system used in T-ex.\n\nIt introduced a feature to \"use another kick table if you hold a direction key\", making it possible for players to tell the game where they want the piece to go.", - }, + {"Spin", + "spin", + "term", + "Use rotation to move a piece into a position otherwise unreachable. In some games, this sends extra attack or awards extra score.", + }, + {"Mini", + "mini", + "term", + "A modifier to Spins, applied to Spin actions that the game considers easy (thus the name \"EZ T-Spin\" in an old game). Score and attack bonuses are reduced for Mini Spins.\nDifferent games have different rules for what counts as a Mini, and many are not intuitive. You can just remember a few common shapes.", + }, + {"All-Spin", + "allspin", + "term", + "A rule in which spins of all pieces are awarded extra attack/score, rather than just spins of the T piece (\"T-Spin only\").", + }, + {"T-Spin", + "tspin", + "term", + "A spin using the T piece.\nIn modern official games, T-Spins are detected using the 3-corner rule, i.e. if at least three of the four cells diagonal to the rotation center, it is a T-Spin. Some games have extra rules to mark a T-Spin as a Mini T-Spin instead, which has reduced attack/score.", + }, + {"TSS", + "tss t1 tspinsingle", + "term", + "T-Spin Single\nClear 1 line with a T-Spin.", + }, + {"TSD", + "tsd t2 tspindouble", + "term", + "T-Spin Double\nClear 2 lines with a T-Spin.", + }, + {"TST", + "tst t3 tspintriple", + "term", + "T-Spin Triple\nClear 3 lines with a T-Spin.", + }, + {"MTSS", + "mtss minitspinsingle tsms tspinminisingle", + "term", + "Mini T-Spin Single\nFormerly known as T-Spin Mini Single.\nClear 1 line with a Mini T-Spin.\nDifferent games apparently have different ways to determine whether a T-Spin is a Mini.", + }, + {"MTSD", + "mtsd minitspindouble tsmd tspinminidouble", + "term", + "Mini T-Spin Double\nFormerly known as T-Spin Mini Double (TSMD).\nClear 2 lines with a Mini T-Spin.\nDifferent games apparently have different ways to determine whether a T-Spin is a Mini.\nIn addition, different games have different behavior when clearing a Mini T-Spin Double: some games credit this move correctly, and some games use a different displayed text because they never programmed this in.", + }, + {"O-Spin", + "ospin", + "term", + "In most cases, it's a meme.\nThe O Tetromino (a.k.a. the Square) does not change upon rotation, thus making it lack interesting spins/kicks that other Tetrominoes have, or be stuck in a place unable to get out.\nAs a joke, some people have made heavily edited videos or even programmed games where the O piece can change shape and \"spin\" into different positions.\nTechmino also supports O-Spin in most modes.", + }, + {"Rotation Systems", + "wallkick rotationsystem", + "term", + "Systems that determine how pieces rotate.\n\nRotation systems usually handle two things: basic rotation and kicks.\n\nBasic rotation refers to how pieces rotate in an open area. Because rotating pieces on their geometric center will usually cause the piece to be misaligned from the grid, rotation systems need to specify alternative rotation centers or rotation offsets in order to align rotated pieces back to the grid.\n\nKicks refer to offsets applied if the rotated piece overlaps with the border of the matrix or other blocks. While older games, like the ones on NES and Gameboy, lack kicks, people soon realized that if a piece is too close to the wall, the floor or other pieces, the piece can (unintuitively) fail to rotate due to overlapping. Games started to implement systems that allow pieces close to walls/floors to rotate, and move them away from the wall/floor into a valid position (\"kicking off the wall/floor\"), and such movements, or offsets used in said movements, are referred to as (wall/floor) kicks.\n\nWhile Super Rotation System (SRS) is the current standard for modern official Tetris games, older games and unofficial games may have their own rotation systems, implementing different basic rotations and kicks.", + }, + {"ARS", + "ars arikrotationsystem atarirotationsystem", + "term", + "It can refer to two things:\nArika Rotation System, which is used in Tetris: The Grand Master games.\nAtari Rotation System, which aligns pieces to the top-left when rotating.", + }, + {"ASC", + "ascension", + "term", + "Rotation system used in the Tetris clone Ascension. All pieces use the same two kick tables (one for CW, one for CCW), and the kick range is approximately +/- 2 blocks on both axis.\n\nIn Techmino, ASC+ is a modified version of Ascension's rotation system, adding kicks for 180 spins.", + }, + {"BRS", + "brs bulletproofsoftware", + "term", + "BPS rotation system, the rotation system used in Tetris games by Bullet-Proof Software.", + }, + {"BiRS", + "birs biasrs biasrotationsystem", + "term", + "*Techmino exclusive*\n\nBias Rotation System, Techmino's original rotation system based on XRS and SRS.\nIt sets an offset to rotation if you hold left/right/soft drop when you rotate.\nIf rotation fails when downwards offset is applied, it tries again without the downwards offset.\nThen it tries without left/right offset.\nIf it fails, then rotation will not occur.\n\nCompared to XRS, BiRS only uses a single kick table, making it easier to memorize; also keeps the climbing-over-terrain feature of SRS.\n\nThe final kick offset's euclidean distance can't be larger than sqrt(5) and if there is a horizontal offset, the final kick offset can't be in the opposite direction.", + }, + {"C2RS", + "c2rs", + "term", + "Cultris II rotation system, a rotation system used in the Tetris clone Cultris II.\nAll rotations and all pieces share the same kick table (left, right, down, down-left, down-right, left 2, right 2), with left priortizing over right.\n\nIn Techmino, C2sym is a modification to this rotation system that chooses whether to check left or right first depending on the piece and rotation.", + }, + {"DRS", + "drs dtetrotationsystem", + "term", + "DTET Rotation System\nThe rotation system used in DTET.", + }, + {"NRS", + "nrs nintendorotationsystem", + "term", + "Nintendo Rotation System\nThe rotation system used in the Tetris games on the NES and Gameboy.\nIt has two mirrored versions; the left-handed version is used on Gameboy, and the right-handed version on the NES.", + }, + {"SRS", + "srs superrotationsystem", + "term", + "Super Rotation System\nThe rotation system used in modern, official Tetris games.\nEach Tetromino has a rotation center for the piece to rotate around. Should a Tetromino overlap with the wall, floor or another mino on the field after rotation, a few offset positions will be checked, allowing pieces to kick off walls and floors. This also allows pieces to rotate into openings that are otherwise unreachable.\n\nMany unofficial games implement some modification of this rotation system that adds a kick for 180 spins. In Techmino, such a modification is called SRS+.", + }, + {"TRS", + "trs techminorotationsystem", + "term", + "*Techmino-exclusive*\nTechmino Rotation System\nThe rotation system used in Techmino, based on SRS.\nIt includes fixes on common cases where S/Z are locked from rotating, and some extra useful kicks. Each pentomino also has a kick table roughly based on SRS logic.", + }, + {"XRS", + "xrs", + "term", + "X rotation system, a rotation system used in T-ex.\n\nIt introduced a feature to \"use another kick table if you hold a direction key\", making it possible for players to tell the game where they want the piece to go.", + }, - {"Back to Back", - "b2b btb backtoback", - "term", - "Clearing 2 or more technical line clears (Spins and Tetrises) in a row gives extra attack power.\nUnlike combos, placing pieces that do not clear lines does not affect Back to Back.", - }, - {"B2B2B", - "b2b2b b3b", - "term", - "*Techmino-exclusive*\nClearing many Back to Backs to fill the Back to Back gauge, and eventually you will be able to perform a Back to Back to Back, giving more bonus attack.", - }, - {"Fin, Neo, Iso", - "fin neo iso", - "term", - "Special T-Spin techniques that exploit the T piece's kicks and T-Spin detections.\nThey might worth different values in different games (some games consider them Minis), and hardly have real value in combat due to their relatively complex setup.", - }, - {"Modern Tetris", - "modern", - "term", - "The concept of a \"modern\" Tetris game or block-stacking game is a bit fuzzy. In general, a block-stacking game that somewhat resembles games that follow the Tetris Design Guideline is considered a modern game. Here are some rules of thumb, but they are not hard requirements:\n1. The visible part of the Matrix is 10w x 20h, often with additional hidden rows above this.\n2. Pieces spawn in the top-middle of the visible matrix. Each piece has a consistent spawn orientation and color.\n3. Has an appropriate randomizer like 7-Bag and His.\n4. Has an appropriate rotation system, with at least the ability to rotate both directions.\n5. Has an appropriate lockdown delay system.\n6. Has an appropriate top-out condition.\n7. Has a NEXT queue, with multiple next pieces displayed (usually 3 to 6), and with presentation in the queue matching the spawn orientation of the piece.\n8. Has a HOLD queue.\n9. If there is spawn delay or line delay, usually has IRS and IHS.\n10. Has a DAS system for precise and swift sideways movements.", - }, - {"IRS", - "irs initialrotationsystem", - "term", - "Initial Rotation System\nHolding a rotation key during spawn delay to spawn the piece pre-rotated. Sometimes prevents death.", - }, - {"IHS", - "ihs initialholdsystem", - "term", - "Initial Hold System\nHolding the hold key during spawn delay to spawn the held piece (or next piece in the next queue if there is no held piece) instead of the current piece, and put the current piece in hold, as if the player has performed the held before spawning. Sometimes prevents death.", - }, - {"IMS", - "ims initialmovesystem", - "term", - "*Techmino-exclusive*\nInitial Movement System\nHolding a sideways movement key during spawn delay to spawn the piece one block off to the side. Sometimes prevents death.", - }, - {"Next", - "nextpreview", - "term", - "Displays the next few pieces to come. Using this to plan ahead is often a good habit.", - }, - {"Hold", - "hold", - "term", - "Save your current piece for later use, and take out a previously held piece (or next piece in the next queue, if no piece was held) to place instead. You can only perform this once per piece.\n\nTechmino Exclusive: Techmino has a \"In-place hold\" feature. When enabled, piece that spawn from the Hold queue will spawn at where your currently-controlling piece is, instead of at the top of the matrix.", - }, - {"Misdrop", - "md misdrop", - "term", - "Accidentally placed (dropped) a piece in an unintended location.", - }, - {"Mishold", - "mh mishold", - "term", - "Accidentally pressed held key. This can lead to having to use an undesired piece or missing out a chance to All Clear.", - }, - {"sub", - "sub", - "term", - "A sub-(number) time means the time is below a certain milestone. The unit of the time is often left out and inferred, for example, a \"sub-30\" time for a 40-line Sprint means below 30 seconds, and a \"sub-15\" time for a 1000-line Sprint means below 15 minutes.", - }, - {"Donation", - "donation", - "term", - "A technique where you purposefully cover up a well to perform T-Spins.", - }, - {"Attacking & Defending", - "attacking defending", - "term", - "Attacking: send garbage lines to your opponent by clearing lines.\nDefending: after your opponent send you lines, you offset this garbage by clearing lines.\nCounter attack: Send attack back at your opponent after offseting incoming garbage, or taking the hit then attack back.\nIn most games, garbage offsetting is 1:1, i.e. one attack offsets one incoming garbage.", - }, - {"Combo", - "ren combo", - "term", - "Known in Japan as REN.\nConsecutive line clears make up combos. The second line clear in the combo is 1 combo, and the third line clear is 2 combo, and so on.\nUnlike Back to Back, placing a piece that does not clear a line will break the combo.", - }, - {"Spike", - "spike", - "term", - "Send a lot of attack in a short time.\n\nTechmino and Tetr.io has a spike counter, which shows how much attack you send in a short time.\n\nNote that accumulated garbage due to network lag do not count as a spike.", - }, - {"Side well", - "sidewell", - "term", - "A stacking method where you leave a well of a certain width on the side.\nA Side 1-wide setup is the traditional Tetris setup (i.e. Side well Tetris).\nA Side 2-, 3-, or 4-wide setup is a combo setup. For new players, they can be effective ways to send attack. However, opponents can easily send you garbage while you are building your stack, killing you or cutting your stack short. Because of this, advanced players might not opt to building tall stacks, and rather keep a steady stream of T-Spins and Tetrises and attack when the opponent is unlikely to offset the garbage.", - }, - {"Side 1-wide", - "s1w side1wide sidewelltetris", - "term", - "Also known as Side well Tetris\nThe most traditional way to play. It is also easy to do in modern Tetris, and can send a half-decent amount of attack. However this is hardly used in advanced matches due to the lower efficiency of Tetrises compared to T-Spins.", - }, - {"Side 2-wide", - "s2w side2wide", - "term", - "The stacking method where you leave a 2-block-wide well on the side. A common combo setup.\nEasy to use. New players can give it a try, and can produce some half-decent combos when combined with hold. Not often used in advanced games, because it takes more time to build the stack, leaving room for opponent to send garbage and cut your stack short. It is also not so good in efficiency.", - }, - {"Side 3-wide", - "s3w side2wide", - "term", - "The stacking method where you leave a 3-block-wide well on the side. A combo setup less common than 2-wide.\nCan perform more combos than 2-wide, but also harder to do, easy to break the combo.", - }, - {"Side 4-wide", - "s4w side4wide", - "term", - "The stacking method where you leave a 4-block-wide well on the side. A combo setup.\nIf done well, can produce very impressive combos. Also it takes less time to build up, so you might be able to start your combo before incoming garbage. However, there is still a risk of being killed by incoming garbage, and is thus less overpowered.", - }, - {"Center 1-wide", - "c1w center1wide centerwelltetris", - "term", - "Also known as Center well Tetris\nThe stacking method where you leave a 1-block-wide well in the middle. Commonly used in combat because this allows Tetrises as well as T-Spins, and not too difficult.", - }, - {"Center 2-wide", - "c2w center2wide", - "term", - "The stacking method where you leave a 2-block-wide well in the middle.", - }, - {"Center 3-wide", - "c3w center3wide", - "term", - "The stacking method where you leave a 3-block-wide well in the middle.", - }, - {"Center 4-wide", - "c4w center4wide", - "term", - "The stacking method where you leave a 4-block-wide well in the middle.\nThe infamous combo setup that not only makes a lot of combos, but also abuses the death conditions and won't die even if you receive some garbage. This technique is often disliked by players due to how unbalanced it is.", - }, - {"Residual", - "residual c4w s4w", - "term", - "Refers to how many blocks to leave in the well of a 4-wide combo setup. The most common are 3-residual and 6-residual.\n3-residual has less variations and is easier to learn, with pretty good chance of success, and it's pretty useful in combat.\n6-residual has more variables and is harder, but can be more consistent if you do it well. It can also be used for special challenges like getting 100 combos in an infinite 4-wide challenge.", - }, - {"6-3 Stacking", - "63stacking", - "term", - "A way of stacking where you have a 6-block-wide stack on the left, and a 3-block-wide stack on the right.\nFor a skilled player, this method of stacking might reduce the key presses needed for stacking, and is a popular Sprint stacking method. The reason why it works has to do with the fact that pieces spawn with a bias to the left.", - }, - {"20G", - "20g", - "term", - "The fastest falling speed of modern Tetris. In 20G, pieces do not have a falling process and instantly appear on the bottom. This sometimes also limits a piece's sideways movements, as it is not always possible to make a piece climb over a bump or out of a well in 20G.", - }, - {"Topping out", - "die death topout toppingout", - "term", - "Modern Tetris games have three different conditions in which the player tops out:\n1. Block out: when a piece spawns overlapping with another block;\n2. Lock out: when a piece locks entirely above the skyline;\n3. Garbage out: when the stack exceeds 40 lines in height (often due to incoming garbage).\nTechmino does not check for locking out and garbage out.", - }, - {"Falling speed", - "fallingspeed", - "term", - "Falling speed is often described in terms of G, i.e. how many lines it falls in one frame (often assuming 60 frames per second).\nG is a large unit. The speed of Lv 1 in a regular Marathon (one second per line) is 1/60 G, and 1G is about Lv 13 speed. G usually caps at 20G, for there are only 20 (visible) blocks in the matrix's height.", - }, - {"Lockdown Delay", - "lockdelay lockdowndelay lockdowntimer", - "term", - "The delay between block touching the ground and locking down (i.e. can no longer be controlled, and the next piece spawns).\nModern Tetris games often have a forgiving lockdown delay mechanics where you can reset this delay by moving or rotating (up to 15 times), and you can sometimes stall for time by doing this. Classic Tetris games often have a far less forgiving lockdown delay.", - }, - {"Finesse", - "finesse", - "term", - "A technique to move a piece into the desired position with the minimum number of key presses. This saves time and reduces chances to misdrop.\nYou can practice by playing with Jstris's restart on finesse error, or with Techmino's finesse error sound effect.\n\nTechmino's finesse detection is not exactly \"theoretical minimum key presses\", but instead only checks for finesse against a pre-determined par key press count *when the piece locks in a position that does not require soft dropping*. This means that Techmino will not judge a piece as having a finesse error when you soft drop and spin or tuck.\nTechmino also introduced additional checks, such as holding while the current piece and the held piece is the same, or holding after you have manipulated the current piece, count as a finesse fault.\nFinesse% in Techmino is defined to be 100% when par or below par, 50% when one keypress above par, 25% when two keypresses above par, and 0% when three or more keypresses above par.\nAlso note that in 20G finesse still runs as if there were no gravity, which can cause inaccurate results.", - }, - {"\"doing research\"", - "scientificresearch", - "term", - "\"Doing scientific research\" is a term sometimes used in the Chinese community, referring to researching/practicing techniques in a low-falling-speed, single player environment.", - }, - {"Handling", - "feel handling", - "term", - "Several main factors that affecting the hand feel:\n(1) Input delay is affected by device configuration or device condition. Restart / change device.\n(2) Program stability, program design (or implementation) is not good, cause lagging too much. May be alleviated by lowering the effect setting.\n(3) Designed on purpose. Adapt it.\n(4) Improper parameter setting. Change the settings.\n(5) Improper play posture. It's not convenient to use force. Change your posture.\n(6) Not used to the operation after changing the key position or changing the device. Get used to it or change the settings.\n(7) Muscle fatigue, response and coordination ability decreased. Get some sleep or do some sports, and come back later (maybe a few days).", - }, - {"DAS & ARR", - "das arr delayedautoshift autorepeatrate", - "term", - "DAS refers to Delayed Auto Shift, the way how blocks move to the side when you hold left or right. Also refers to the delay between the initial movement (when you press down the button) and the first automatic movement.\nARR refers to Auto Repeat Rate, which is the delay between automatic movements.\nFor new players, the recommended values are: DAS 8-10f (133-167ms), ARR 1-2f (17-33ms).\nFor advanced players who want to play faster, the recommended values are DAS 4-6f (67-100ms), ARR 0f (0ms). (At 0ms ARR, pieces will instantly snap to the wall once you get past DAS.)\n\nThe ideal configuration strategy for advanced players is to minimize DAS while still being able to reliably control whether to tap or hold; and to set to ARR to 0 if possible, or as low as possible otherwise.", - }, - {"DAS (simple)", - "das arr delayedautoshift autorepeatrate", - "term", - "Imagine you are typing, and you hold down a letter. Say you hold down \"O\".\nYou get a long string of O's.\nOn the time line, it kinda looks like: O--------------O-O-O-O-O-O-O-O-O\nThe -------------- is DAS, the - is ARR.", - }, - {"DAS cut", - "dascut", - "term", - "Techmino exclusive: in Techmino, the DAS timer can be cleared or discharged for a short time when player start to control a new piece. This can reduce the case where a piece instantly starts moving if spawned with a direction button held.\n\nOther games may have a similar feature but may function differently.", - }, - {"Auto-lock cut", - "autolockcut mdcut", - "term", - "Techmino exclusive: this feature is designed to prevent mis-harddropping from pressing hard drop key shortly after the previous piece naturally locked down.\nHard drop key can be disabled for a few frames (depending on the settings) after a natural lockdown.\n\nOther games may have a similar feature but may function differently.",--TODO - }, - {"SDF", - "sdf softdropfactor", - "term", - "Soft Drop Factor\n\nA way to define soft drop speed as a multiple of natural falling speed. In guideline games, soft drop is usually 20x the speed of natural falling, i.e. it has an SDF of 20. Techmino does not use SDF to define soft drop speed.", - }, - {"Bag7 generator", - "bag7bag randomgenerator", - "term", - "Also known as \"7-Bag Generator\". Officially known as \"Random Generator\".\nThis is the algorithm used by modern, official Tetris games to generate pieces. Starting from the beginning of a game, every 7 pieces there are guaranteed to be one of each of the 7 Tetrominoes.", - }, - {"His generator", - "history hisgenerator", - "term", - "A way to generate pieces, notably used in Tetris: The Grand Master games. Every time a random Tetromino is selected, but if this Tetromino is the same as one of the few previous pieces, then reroll until a different piece is rolled or until a reroll limit is reached.\nFor example, a \"his 4 roll 6\" (h4r6) generator rerolls when the piece is the same as one of the 4 previous pieces, and rerolls up to 6 times.\nThere are other variations as well, such as \"his4 roll6 pool35\", which further reduces the randomness of the piece sequence.\n\nIn Techmino, the max. reroll count is half of the sequence length, rounded up.", - }, - {"Hypertapping", - "hypertapping", - "term", - "Vibrate your finger on the controller to achieve faster sideways movement speed than holding it.\nIt is most commonly used on classic Tetris where DAS is rather slow. In most cases you do not need to hypertap in modern Tetris games, because their DAS is often fast enough.", - }, - {"Tetris OL attack", - "top tetrisonlineattack", - "term", - "Single/Double/Triple/Tetris sends 0/1/2/4.\nT-Spin Single/Double/Triple sends 2/4/6, half if Mini.\nCombo send 0, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5.\nBack to Back sends extra 1 (or 2 if T-Spin Triple).\nAll Clear sends extra 6. This extra 6 will be sent to opponents directly, and does not cancel your buffered incoming damage.", - }, - {"Techmino attack", - "techminoattack", - "term", - "Regular line clears (clearing <=3 lines):\n\tSends (lines cleared -0.5) attack\nSpecial line clears:\n\tSpin sends (lines cleared x2) attack,\n\t\t- B2B sends extra 1/1/2/4/8 (for Spin Single/Double/Triple/Techrash/Techrash+ respectively)\n\t\t- B2B2B sends (lines cleared x0.5), and +1 extra blocking\n\t\t- If it's a Mini, x0.25\n\tNon-Spin Techrash/Techrash+ sends (lines cleared) attack,\n\t\t- B2B sends extra 1 attack,\n\t\t- B2B2B sends 50% more attack and +1 extra blocking.\n\nSpecial line clears will increase B2B gauge, making later special line clears have B2B or B2B2B bonus (see below)\nHalf Perfect Clear (a Perfect Clear \"with blocks left below\". If it's an I clearing 1 line, then the remaining blocks must not be player-placed): Attack +2, Extra Blocking +2\nPerfect Clear: half all damage above, then +8 to +20 attack (increases within a round by +2 per Perfect Clear) and +2 extra blocking. (note: if lines cleared in this round >4, then B2B gauge will be filled)\nCombos: All damage above will be given a (combo x25%) bonus, or (combo x15%) if the line clear is a Single, capped at 12 combo. +1 more attack for 3 Combo or more.\nAfter calculating all above, the damage value will be rounded down then sent", - }, - {"C2 Generator", - "cultris2generator cultrisiigenerator c2generator", - "term", - "All Tetrominoes have a initial weight of 0.\nEvery time, divide all weights by 2, add a random number between 0 and 1, pick the piece with the highest weight, and divide this piece's weight by 3.5.", - }, - {"C2 wall kicks", - "cultris2wallkicks cultrisiiwallkicks c2wallkicks cultris2kicks cultrisiikicks c2kicks", - "term", - "Left, right, down, bottom-left, bottom-right, left 2, right 2. (This applies to *any* rotation of *any* Tetromino.)", - }, - {"Stacking", - "stacking", - "term", - "Often refers to stacking Tetrominoes without leaving holes in the stack.", - }, - {"Rotation buttons (1)", - "doublerotation", - "term", - "Using both clockwise and counter-clockwise rotation buttons allows to reduce number of key presses by replacing three rotation presses with one press of the opposite direction.\nFinesse assumes the use of both rotation buttons.", - }, - {"Rotation buttons (2)", - "triplerotation", - "term", - "Using all three rotation buttons (the third being 180-degree rotation), any piece only requires one rotation press to reach the desired direction.\nHowever, it is not exactly useful for not every game has this feature, and the speed increase from learning this technique is not as much as when you learn using both rotation buttons as opposed to one. You can skip this technique unless you want extreme speeds.", - }, - {"Drought", - "drought", - "term", - "A situation where a piece you want, often the I Tetromino (a.k.a. the Long Bar), does not spawn for a long time. This often happens, and can be deadly, for classic Tetris, but it is almost impossible for modern Tetris thanks to the Random Generator.\nWith the Random Generator, there can be at most 12 other pieces between two I Tetrominoes.", - }, - {"Bone block", - "bone tgm", - "term", - "",--TODO - }, - {"MPH mode", - "mph", - "term", - "Memoryless (i.e. random spawn), previewless (i.e. no next queue), holdless. A mode that requires quite some reaction speed.", - }, - {"Input delay", - "input delay", - "term", - "Any input device take some time for the input to reach the game. This delay can range from a few milliseconds to a few dozens milliseconds.\nIf input delay is too long, the controls can feel uncomfortable.\nThis delay is often due to the performance of the hardwares and softwares used, and often out of your control. Turn on performance mode (or turn off power saving mode) on your device, and turn on gaming mode on your monitor/TV (if you have one), may help reducing input delay.", - }, - {"Cold Clear", - "cc coldclear", - "term", - "A Tetris bot. Originally built for Puyo Puyo Tetris, thus can be less powerful on Techmino.", - }, - {"ZZZbot", - "zzzbot", - "term", - "A Tetris bot. Built by the Chinese Tetris player 奏之章, has decent performance in many games", - }, + {"Back to Back", + "b2b btb backtoback", + "term", + "Clearing 2 or more technical line clears (Spins and Tetrises) in a row gives extra attack power.\nUnlike combos, placing pieces that do not clear lines does not affect Back to Back.", + }, + {"B2B2B", + "b2b2b b3b", + "term", + "*Techmino-exclusive*\nClearing many Back to Backs to fill the Back to Back gauge, and eventually you will be able to perform a Back to Back to Back, giving more bonus attack.", + }, + {"Fin, Neo, Iso", + "fin neo iso", + "term", + "Special T-Spin techniques that exploit the T piece's kicks and T-Spin detections.\nThey might worth different values in different games (some games consider them Minis), and hardly have real value in combat due to their relatively complex setup.", + }, + {"Modern Tetris", + "modern", + "term", + "The concept of a \"modern\" Tetris game or block-stacking game is a bit fuzzy. In general, a block-stacking game that somewhat resembles games that follow the Tetris Design Guideline is considered a modern game. Here are some rules of thumb, but they are not hard requirements:\n1. The visible part of the Matrix is 10w x 20h, often with additional hidden rows above this.\n2. Pieces spawn in the top-middle of the visible matrix. Each piece has a consistent spawn orientation and color.\n3. Has an appropriate randomizer like 7-Bag and His.\n4. Has an appropriate rotation system, with at least the ability to rotate both directions.\n5. Has an appropriate lockdown delay system.\n6. Has an appropriate top-out condition.\n7. Has a NEXT queue, with multiple next pieces displayed (usually 3 to 6), and with presentation in the queue matching the spawn orientation of the piece.\n8. Has a HOLD queue.\n9. If there is spawn delay or line delay, usually has IRS and IHS.\n10. Has a DAS system for precise and swift sideways movements.", + }, + {"IRS", + "irs initialrotationsystem", + "term", + "Initial Rotation System\nHolding a rotation key during spawn delay to spawn the piece pre-rotated. Sometimes prevents death.", + }, + {"IHS", + "ihs initialholdsystem", + "term", + "Initial Hold System\nHolding the hold key during spawn delay to spawn the held piece (or next piece in the next queue if there is no held piece) instead of the current piece, and put the current piece in hold, as if the player has performed the held before spawning. Sometimes prevents death.", + }, + {"IMS", + "ims initialmovesystem", + "term", + "*Techmino-exclusive*\nInitial Movement System\nHolding a sideways movement key during spawn delay to spawn the piece one block off to the side. Sometimes prevents death.", + }, + {"Next", + "nextpreview", + "term", + "Displays the next few pieces to come. Using this to plan ahead is often a good habit.", + }, + {"Hold", + "hold", + "term", + "Save your current piece for later use, and take out a previously held piece (or next piece in the next queue, if no piece was held) to place instead. You can only perform this once per piece.\n\nTechmino Exclusive: Techmino has a \"In-place hold\" feature. When enabled, piece that spawn from the Hold queue will spawn at where your currently-controlling piece is, instead of at the top of the matrix.", + }, + {"Misdrop", + "md misdrop", + "term", + "Accidentally placed (dropped) a piece in an unintended location.", + }, + {"Mishold", + "mh mishold", + "term", + "Accidentally pressed held key. This can lead to having to use an undesired piece or missing out a chance to All Clear.", + }, + {"sub", + "sub", + "term", + "A sub-(number) time means the time is below a certain milestone. The unit of the time is often left out and inferred, for example, a \"sub-30\" time for a 40-line Sprint means below 30 seconds, and a \"sub-15\" time for a 1000-line Sprint means below 15 minutes.", + }, + {"Donation", + "donation", + "term", + "A technique where you purposefully cover up a well to perform T-Spins.", + }, + {"Attacking & Defending", + "attacking defending", + "term", + "Attacking: send garbage lines to your opponent by clearing lines.\nDefending: after your opponent send you lines, you offset this garbage by clearing lines.\nCounter attack: Send attack back at your opponent after offseting incoming garbage, or taking the hit then attack back.\nIn most games, garbage offsetting is 1:1, i.e. one attack offsets one incoming garbage.", + }, + {"Combo", + "ren combo", + "term", + "Known in Japan as REN.\nConsecutive line clears make up combos. The second line clear in the combo is 1 combo, and the third line clear is 2 combo, and so on.\nUnlike Back to Back, placing a piece that does not clear a line will break the combo.", + }, + {"Spike", + "spike", + "term", + "Send a lot of attack in a short time.\n\nTechmino and Tetr.io has a spike counter, which shows how much attack you send in a short time.\n\nNote that accumulated garbage due to network lag do not count as a spike.", + }, + {"Side well", + "sidewell", + "term", + "A stacking method where you leave a well of a certain width on the side.\nA Side 1-wide setup is the traditional Tetris setup (i.e. Side well Tetris).\nA Side 2-, 3-, or 4-wide setup is a combo setup. For new players, they can be effective ways to send attack. However, opponents can easily send you garbage while you are building your stack, killing you or cutting your stack short. Because of this, advanced players might not opt to building tall stacks, and rather keep a steady stream of T-Spins and Tetrises and attack when the opponent is unlikely to offset the garbage.", + }, + {"Side 1-wide", + "s1w side1wide sidewelltetris", + "term", + "Also known as Side well Tetris\nThe most traditional way to play. It is also easy to do in modern Tetris, and can send a half-decent amount of attack. However this is hardly used in advanced matches due to the lower efficiency of Tetrises compared to T-Spins.", + }, + {"Side 2-wide", + "s2w side2wide", + "term", + "The stacking method where you leave a 2-block-wide well on the side. A common combo setup.\nEasy to use. New players can give it a try, and can produce some half-decent combos when combined with hold. Not often used in advanced games, because it takes more time to build the stack, leaving room for opponent to send garbage and cut your stack short. It is also not so good in efficiency.", + }, + {"Side 3-wide", + "s3w side2wide", + "term", + "The stacking method where you leave a 3-block-wide well on the side. A combo setup less common than 2-wide.\nCan perform more combos than 2-wide, but also harder to do, easy to break the combo.", + }, + {"Side 4-wide", + "s4w side4wide", + "term", + "The stacking method where you leave a 4-block-wide well on the side. A combo setup.\nIf done well, can produce very impressive combos. Also it takes less time to build up, so you might be able to start your combo before incoming garbage. However, there is still a risk of being killed by incoming garbage, and is thus less overpowered.", + }, + {"Center 1-wide", + "c1w center1wide centerwelltetris", + "term", + "Also known as Center well Tetris\nThe stacking method where you leave a 1-block-wide well in the middle. Commonly used in combat because this allows Tetrises as well as T-Spins, and not too difficult.", + }, + {"Center 2-wide", + "c2w center2wide", + "term", + "The stacking method where you leave a 2-block-wide well in the middle.", + }, + {"Center 3-wide", + "c3w center3wide", + "term", + "The stacking method where you leave a 3-block-wide well in the middle.", + }, + {"Center 4-wide", + "c4w center4wide", + "term", + "The stacking method where you leave a 4-block-wide well in the middle.\nThe infamous combo setup that not only makes a lot of combos, but also abuses the death conditions and won't die even if you receive some garbage. This technique is often disliked by players due to how unbalanced it is.", + }, + {"Residual", + "residual c4w s4w", + "term", + "Refers to how many blocks to leave in the well of a 4-wide combo setup. The most common are 3-residual and 6-residual.\n3-residual has less variations and is easier to learn, with pretty good chance of success, and it's pretty useful in combat.\n6-residual has more variables and is harder, but can be more consistent if you do it well. It can also be used for special challenges like getting 100 combos in an infinite 4-wide challenge.", + }, + {"6-3 Stacking", + "63stacking", + "term", + "A way of stacking where you have a 6-block-wide stack on the left, and a 3-block-wide stack on the right.\nFor a skilled player, this method of stacking might reduce the key presses needed for stacking, and is a popular Sprint stacking method. The reason why it works has to do with the fact that pieces spawn with a bias to the left.", + }, + {"20G", + "20g", + "term", + "The fastest falling speed of modern Tetris. In 20G, pieces do not have a falling process and instantly appear on the bottom. This sometimes also limits a piece's sideways movements, as it is not always possible to make a piece climb over a bump or out of a well in 20G.", + }, + {"Topping out", + "die death topout toppingout", + "term", + "Modern Tetris games have three different conditions in which the player tops out:\n1. Block out: when a piece spawns overlapping with another block;\n2. Lock out: when a piece locks entirely above the skyline;\n3. Garbage out: when the stack exceeds 40 lines in height (often due to incoming garbage).\nTechmino does not check for locking out and garbage out.", + }, + {"Falling speed", + "fallingspeed", + "term", + "Falling speed is often described in terms of G, i.e. how many lines it falls in one frame (often assuming 60 frames per second).\nG is a large unit. The speed of Lv 1 in a regular Marathon (one second per line) is 1/60 G, and 1G is about Lv 13 speed. G usually caps at 20G, for there are only 20 (visible) blocks in the matrix's height.", + }, + {"Lockdown Delay", + "lockdelay lockdowndelay lockdowntimer", + "term", + "The delay between block touching the ground and locking down (i.e. can no longer be controlled, and the next piece spawns).\nModern Tetris games often have a forgiving lockdown delay mechanics where you can reset this delay by moving or rotating (up to 15 times), and you can sometimes stall for time by doing this. Classic Tetris games often have a far less forgiving lockdown delay.", + }, + {"Finesse", + "finesse", + "term", + "A technique to move a piece into the desired position with the minimum number of key presses. This saves time and reduces chances to misdrop.\nYou can practice by playing with Jstris's restart on finesse error, or with Techmino's finesse error sound effect.\n\nTechmino's finesse detection is not exactly \"theoretical minimum key presses\", but instead only checks for finesse against a pre-determined par key press count *when the piece locks in a position that does not require soft dropping*. This means that Techmino will not judge a piece as having a finesse error when you soft drop and spin or tuck.\nTechmino also introduced additional checks, such as holding while the current piece and the held piece is the same, or holding after you have manipulated the current piece, count as a finesse fault.\nFinesse% in Techmino is defined to be 100% when par or below par, 50% when one keypress above par, 25% when two keypresses above par, and 0% when three or more keypresses above par.\nAlso note that in 20G finesse still runs as if there were no gravity, which can cause inaccurate results.", + }, + {"\"doing research\"", + "scientificresearch", + "term", + "\"Doing scientific research\" is a term sometimes used in the Chinese community, referring to researching/practicing techniques in a low-falling-speed, single player environment.", + }, + {"Handling", + "feel handling", + "term", + "Several main factors that affecting the hand feel:\n(1) Input delay is affected by device configuration or device condition. Restart / change device.\n(2) Program stability, program design (or implementation) is not good, cause lagging too much. May be alleviated by lowering the effect setting.\n(3) Designed on purpose. Adapt it.\n(4) Improper parameter setting. Change the settings.\n(5) Improper play posture. It's not convenient to use force. Change your posture.\n(6) Not used to the operation after changing the key position or changing the device. Get used to it or change the settings.\n(7) Muscle fatigue, response and coordination ability decreased. Get some sleep or do some sports, and come back later (maybe a few days).", + }, + {"DAS & ARR", + "das arr delayedautoshift autorepeatrate", + "term", + "DAS refers to Delayed Auto Shift, the way how blocks move to the side when you hold left or right. Also refers to the delay between the initial movement (when you press down the button) and the first automatic movement.\nARR refers to Auto Repeat Rate, which is the delay between automatic movements.\nFor new players, the recommended values are: DAS 8-10f (133-167ms), ARR 1-2f (17-33ms).\nFor advanced players who want to play faster, the recommended values are DAS 4-6f (67-100ms), ARR 0f (0ms). (At 0ms ARR, pieces will instantly snap to the wall once you get past DAS.)\n\nThe ideal configuration strategy for advanced players is to minimize DAS while still being able to reliably control whether to tap or hold; and to set to ARR to 0 if possible, or as low as possible otherwise.", + }, + {"DAS (simple)", + "das arr delayedautoshift autorepeatrate", + "term", + "Imagine you are typing, and you hold down a letter. Say you hold down \"O\".\nYou get a long string of O's.\nOn the time line, it kinda looks like: O--------------O-O-O-O-O-O-O-O-O\nThe -------------- is DAS, the - is ARR.", + }, + {"DAS cut", + "dascut", + "term", + "Techmino exclusive: in Techmino, the DAS timer can be cleared or discharged for a short time when player start to control a new piece. This can reduce the case where a piece instantly starts moving if spawned with a direction button held.\n\nOther games may have a similar feature but may function differently.", + }, + {"Auto-lock cut", + "autolockcut mdcut", + "term", + "Techmino exclusive: this feature is designed to prevent mis-harddropping from pressing hard drop key shortly after the previous piece naturally locked down.\nHard drop key can be disabled for a few frames (depending on the settings) after a natural lockdown.\n\nOther games may have a similar feature but may function differently.",--TODO + }, + {"SDF", + "sdf softdropfactor", + "term", + "Soft Drop Factor\n\nA way to define soft drop speed as a multiple of natural falling speed. In guideline games, soft drop is usually 20x the speed of natural falling, i.e. it has an SDF of 20. Techmino does not use SDF to define soft drop speed.", + }, + {"Bag7 generator", + "bag7bag randomgenerator", + "term", + "Also known as \"7-Bag Generator\". Officially known as \"Random Generator\".\nThis is the algorithm used by modern, official Tetris games to generate pieces. Starting from the beginning of a game, every 7 pieces there are guaranteed to be one of each of the 7 Tetrominoes.", + }, + {"His generator", + "history hisgenerator", + "term", + "A way to generate pieces, notably used in Tetris: The Grand Master games. Every time a random Tetromino is selected, but if this Tetromino is the same as one of the few previous pieces, then reroll until a different piece is rolled or until a reroll limit is reached.\nFor example, a \"his 4 roll 6\" (h4r6) generator rerolls when the piece is the same as one of the 4 previous pieces, and rerolls up to 6 times.\nThere are other variations as well, such as \"his4 roll6 pool35\", which further reduces the randomness of the piece sequence.\n\nIn Techmino, the max. reroll count is half of the sequence length, rounded up.", + }, + {"Hypertapping", + "hypertapping", + "term", + "Vibrate your finger on the controller to achieve faster sideways movement speed than holding it.\nIt is most commonly used on classic Tetris where DAS is rather slow. In most cases you do not need to hypertap in modern Tetris games, because their DAS is often fast enough.", + }, + {"Tetris OL attack", + "top tetrisonlineattack", + "term", + "Single/Double/Triple/Tetris sends 0/1/2/4.\nT-Spin Single/Double/Triple sends 2/4/6, half if Mini.\nCombo send 0, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5.\nBack to Back sends extra 1 (or 2 if T-Spin Triple).\nAll Clear sends extra 6. This extra 6 will be sent to opponents directly, and does not cancel your buffered incoming damage.", + }, + {"Techmino attack", + "techminoattack", + "term", + "Regular line clears (clearing <=3 lines):\n\tSends (lines cleared -0.5) attack\nSpecial line clears:\n\tSpin sends (lines cleared x2) attack,\n\t\t- B2B sends extra 1/1/2/4/8 (for Spin Single/Double/Triple/Techrash/Techrash+ respectively)\n\t\t- B2B2B sends (lines cleared x0.5), and +1 extra blocking\n\t\t- If it's a Mini, x0.25\n\tNon-Spin Techrash/Techrash+ sends (lines cleared) attack,\n\t\t- B2B sends extra 1 attack,\n\t\t- B2B2B sends 50% more attack and +1 extra blocking.\n\nSpecial line clears will increase B2B gauge, making later special line clears have B2B or B2B2B bonus (see below)\nHalf Perfect Clear (a Perfect Clear \"with blocks left below\". If it's an I clearing 1 line, then the remaining blocks must not be player-placed): Attack +2, Extra Blocking +2\nPerfect Clear: half all damage above, then +8 to +20 attack (increases within a round by +2 per Perfect Clear) and +2 extra blocking. (note: if lines cleared in this round >4, then B2B gauge will be filled)\nCombos: All damage above will be given a (combo x25%) bonus, or (combo x15%) if the line clear is a Single, capped at 12 combo. +1 more attack for 3 Combo or more.\nAfter calculating all above, the damage value will be rounded down then sent", + }, + {"C2 Generator", + "cultris2generator cultrisiigenerator c2generator", + "term", + "All Tetrominoes have a initial weight of 0.\nEvery time, divide all weights by 2, add a random number between 0 and 1, pick the piece with the highest weight, and divide this piece's weight by 3.5.", + }, + {"C2 wall kicks", + "cultris2wallkicks cultrisiiwallkicks c2wallkicks cultris2kicks cultrisiikicks c2kicks", + "term", + "Left, right, down, bottom-left, bottom-right, left 2, right 2. (This applies to *any* rotation of *any* Tetromino.)", + }, + {"Stacking", + "stacking", + "term", + "Often refers to stacking Tetrominoes without leaving holes in the stack.", + }, + {"Rotation buttons (1)", + "doublerotation", + "term", + "Using both clockwise and counter-clockwise rotation buttons allows to reduce number of key presses by replacing three rotation presses with one press of the opposite direction.\nFinesse assumes the use of both rotation buttons.", + }, + {"Rotation buttons (2)", + "triplerotation", + "term", + "Using all three rotation buttons (the third being 180-degree rotation), any piece only requires one rotation press to reach the desired direction.\nHowever, it is not exactly useful for not every game has this feature, and the speed increase from learning this technique is not as much as when you learn using both rotation buttons as opposed to one. You can skip this technique unless you want extreme speeds.", + }, + {"Drought", + "drought", + "term", + "A situation where a piece you want, often the I Tetromino (a.k.a. the Long Bar), does not spawn for a long time. This often happens, and can be deadly, for classic Tetris, but it is almost impossible for modern Tetris thanks to the Random Generator.\nWith the Random Generator, there can be at most 12 other pieces between two I Tetrominoes.", + }, + {"Bone block", + "bone tgm", + "term", + "",--TODO + }, + {"MPH mode", + "mph", + "term", + "Memoryless (i.e. random spawn), previewless (i.e. no next queue), holdless. A mode that requires quite some reaction speed.", + }, + {"Input delay", + "input delay", + "term", + "Any input device take some time for the input to reach the game. This delay can range from a few milliseconds to a few dozens milliseconds.\nIf input delay is too long, the controls can feel uncomfortable.\nThis delay is often due to the performance of the hardwares and softwares used, and often out of your control. Turn on performance mode (or turn off power saving mode) on your device, and turn on gaming mode on your monitor/TV (if you have one), may help reducing input delay.", + }, + {"Cold Clear", + "cc coldclear", + "term", + "A Tetris bot. Originally built for Puyo Puyo Tetris, thus can be less powerful on Techmino.", + }, + {"ZZZbot", + "zzzbot", + "term", + "A Tetris bot. Built by the Chinese Tetris player 奏之章, has decent performance in many games", + }, - --Setups - {"Openers", - "setup openers", - "setup", - "Openers are setups that can be build when a game begins. You can still make these setups mid-game, but will often require a different set of piece placements.\n\nGood setups often satisfy two to three of the following:\n- Can adapt to many piece orders,\n- Strong attack, minimal waste of the T piece,\n- require minimal soft dropping for more fast placement and using finesse,\n- has clear follow-up strategies with few branches.\n\nMost openers make use of the Random Generator (bag-7 generator) and exploit the fact that it gives one of every piece for every 7 pieces. This element of predictability makes it possible to have reliable setups.", - }, - {"DT Cannon", - "dtcannon doubletriplecannon", - "setup", - "Double-Triple Cannon"..HDwiki, - HDsearch.."dt", - }, - {"DTPC", - "dtpc dtcannon doubletriplecannon", - "setup", - "A follow-up of the DT Cannon that ends with an All Clear"..HDwiki, - HDsearch.."dt", - }, - {"BT Cannon", - "btcannon betacannon", - "setup", - "β Cannon, Beta Cannon"..HDwiki, - HDsearch.."bt_cannon", - }, - {"BTPC", - "btpc btcannon betacannon", - "setup", - "A follow-up of the BT Cannon that ends with an All Clear"..HDwiki, - HDsearch.."bt_cannon", - }, - {"TKI 3 Perfect Clear", - "ddpc tki3perfectclear", - "setup", - "A TSD opener that leads to a Double-Double-All Clear."..HDwiki, - HDsearch.."TKI_3_Perfect_Clear", - }, - {"QT Cannon", - "qtcannon", - "setup", - "We don't know much about this.", - }, - {"Mini-Triple", - "mt minitriple", - "setup", - "A Mini T-Spin - T-Spin Triple structure", - HDsearch.."mt", - }, - {"Wolfmoon Cannon", - "wolfmooncannon", - "setup", - "We don't know much about this."..HDwiki, - HDsearch.."wolfmoon_cannon", - }, - {"ASC opener", - "ascopener", - "setup", - "We don't know much about this.", - }, - {"Sewer", - "sewer", - "setup", - "An opener."..HDwiki, - HDsearch.."sewer", - }, - {"TKI", - "tki", - "setup", - "Can refer to a TSD opener or a C Spin opener."..HDwiki, - HDsearch.."tki", - }, - {"God Spin", - "godspin", - "setup", - "a setup that is fancy on the eyes but awkward to use in action. Invented by Windkey."..HDwiki, - HDsearch.."godspin", - }, - {"Albatross", - "albatross", - "setup", - "A fancy, fast paced opener with TSD-TST-TSD-All Clear, hardly wasting any T pieces.", - }, - {"鹈鹕", - "", - "setup", - "An Albatross-ish opener to use when the piece orders do not support that", - }, - {"7-piece Puzzle", - "7piecepuzzle", - "setup", - "An All Clear opener with a high success rate. In Techmino's PC Practice modes, the setup that leaves an irregular opening is this setup.", - }, + --Setups + {"Openers", + "setup openers", + "setup", + "Openers are setups that can be build when a game begins. You can still make these setups mid-game, but will often require a different set of piece placements.\n\nGood setups often satisfy two to three of the following:\n- Can adapt to many piece orders,\n- Strong attack, minimal waste of the T piece,\n- require minimal soft dropping for more fast placement and using finesse,\n- has clear follow-up strategies with few branches.\n\nMost openers make use of the Random Generator (bag-7 generator) and exploit the fact that it gives one of every piece for every 7 pieces. This element of predictability makes it possible to have reliable setups.", + }, + {"DT Cannon", + "dtcannon doubletriplecannon", + "setup", + "Double-Triple Cannon"..HDwiki, + HDsearch.."dt", + }, + {"DTPC", + "dtpc dtcannon doubletriplecannon", + "setup", + "A follow-up of the DT Cannon that ends with an All Clear"..HDwiki, + HDsearch.."dt", + }, + {"BT Cannon", + "btcannon betacannon", + "setup", + "β Cannon, Beta Cannon"..HDwiki, + HDsearch.."bt_cannon", + }, + {"BTPC", + "btpc btcannon betacannon", + "setup", + "A follow-up of the BT Cannon that ends with an All Clear"..HDwiki, + HDsearch.."bt_cannon", + }, + {"TKI 3 Perfect Clear", + "ddpc tki3perfectclear", + "setup", + "A TSD opener that leads to a Double-Double-All Clear."..HDwiki, + HDsearch.."TKI_3_Perfect_Clear", + }, + {"QT Cannon", + "qtcannon", + "setup", + "We don't know much about this.", + }, + {"Mini-Triple", + "mt minitriple", + "setup", + "A Mini T-Spin - T-Spin Triple structure", + HDsearch.."mt", + }, + {"Wolfmoon Cannon", + "wolfmooncannon", + "setup", + "We don't know much about this."..HDwiki, + HDsearch.."wolfmoon_cannon", + }, + {"ASC opener", + "ascopener", + "setup", + "We don't know much about this.", + }, + {"Sewer", + "sewer", + "setup", + "An opener."..HDwiki, + HDsearch.."sewer", + }, + {"TKI", + "tki", + "setup", + "Can refer to a TSD opener or a C Spin opener."..HDwiki, + HDsearch.."tki", + }, + {"God Spin", + "godspin", + "setup", + "a setup that is fancy on the eyes but awkward to use in action. Invented by Windkey."..HDwiki, + HDsearch.."godspin", + }, + {"Albatross", + "albatross", + "setup", + "A fancy, fast paced opener with TSD-TST-TSD-All Clear, hardly wasting any T pieces.", + }, + {"鹈鹕", + "", + "setup", + "An Albatross-ish opener to use when the piece orders do not support that", + }, + {"7-piece Puzzle", + "7piecepuzzle", + "setup", + "An All Clear opener with a high success rate. In Techmino's PC Practice modes, the setup that leaves an irregular opening is this setup.", + }, - --Pattern - {"Mid-game Setups", - "midgamesetups", - "pattern", - "Refers to some setups usually used to send a lot of garbage mid-game. Some of them can also be openers, though it is usually unnecessary.", - }, - {"C-spin", - "cspin", - "pattern", - "Placing a J on top of an L (or vice versa) to form a C shape, filling the rest with appropriate shapes to perform a T-Spin Triple + T-Spin Double."..HDwiki, - HDsearch.."c-spin", - }, - {"STSD", - "stsd", - "pattern", - "Super T-Spin Double, a setup that allows two T-Spin Doubles."..HDwiki, - HDsearch.."stsd", - }, - {"STMB", - "stmb", - "pattern", - "STMB cave, a donation setup by using S/Z to block off a 3-wide well and clear a T-Spin Double."..HDwiki, - HDsearch.."stmb_cave", - }, - {"LST stacking", - "lst", - "pattern", - "An infinite T-Spin Double setup"..HDwiki, - HDsearch.."st_stacking", - }, - {"Hamburger", - "hamburger", - "pattern", - "A donation setup that still opens up for Tetrises"..HDwiki, - HDsearch.."hamburger", - }, - {"Imperial Cross", - "imperialcross", - "pattern", - "Cover a cross-shaped hole with an overhang to do two T-Spin Doubles"..HDwiki, - HDsearch.."imperial_cross", - }, - {"Amemiya Cannon", - "amemiyacannon", - "pattern", - "Donation T-Spin Double then Tetris, often a variation of a DT cannon", - }, - {"千鸟格子", - "", - "pattern", - "A setup to donate a T-Spin Double over a small hole and can do another T-Spin Double after that", - }, - {"6-piece puzzle", - "liuqiaoban", - "pattern", - "a setup that is often used to increase chances of a mid-game All Clear.", - }, - {"King Crimson", - "kingcrimson", - "pattern", - "Stacking TST(s) on top of a STSD", - }, + --Pattern + {"Mid-game Setups", + "midgamesetups", + "pattern", + "Refers to some setups usually used to send a lot of garbage mid-game. Some of them can also be openers, though it is usually unnecessary.", + }, + {"C-spin", + "cspin", + "pattern", + "Placing a J on top of an L (or vice versa) to form a C shape, filling the rest with appropriate shapes to perform a T-Spin Triple + T-Spin Double."..HDwiki, + HDsearch.."c-spin", + }, + {"STSD", + "stsd", + "pattern", + "Super T-Spin Double, a setup that allows two T-Spin Doubles."..HDwiki, + HDsearch.."stsd", + }, + {"STMB", + "stmb", + "pattern", + "STMB cave, a donation setup by using S/Z to block off a 3-wide well and clear a T-Spin Double."..HDwiki, + HDsearch.."stmb_cave", + }, + {"LST stacking", + "lst", + "pattern", + "An infinite T-Spin Double setup"..HDwiki, + HDsearch.."st_stacking", + }, + {"Hamburger", + "hamburger", + "pattern", + "A donation setup that still opens up for Tetrises"..HDwiki, + HDsearch.."hamburger", + }, + {"Imperial Cross", + "imperialcross", + "pattern", + "Cover a cross-shaped hole with an overhang to do two T-Spin Doubles"..HDwiki, + HDsearch.."imperial_cross", + }, + {"Amemiya Cannon", + "amemiyacannon", + "pattern", + "Donation T-Spin Double then Tetris, often a variation of a DT cannon", + }, + {"千鸟格子", + "", + "pattern", + "A setup to donate a T-Spin Double over a small hole and can do another T-Spin Double after that", + }, + {"6-piece puzzle", + "liuqiaoban", + "pattern", + "a setup that is often used to increase chances of a mid-game All Clear.", + }, + {"King Crimson", + "kingcrimson", + "pattern", + "Stacking TST(s) on top of a STSD", + }, - --Other - {"Communities", - "community communities", - "other", - "Join Tetris communities and talk with other players!\n\nChina: [QQ] Tetris Research: 112897780\nGlobal: [Discord] Hard Drop: discord.gg/harddrop (click \"Open URL\")", - "https://discord.gg/harddrop" - }, - {"Tetris OL Servers", - "tetrisonline servers", - "other", - "Google \"Tetris Online Poland\" for the Poland server.\nClick \"Open URL\" for information about the Tetris Online Study server.", - "http://teatube.ltd/tos", - }, - {"Github Repository", - "githubrepository sourcecode", - "other", - "Techmino's Github repository. Stars are appreciated", - "https://github.com/26F-Studio/Techmino", - }, + --Other + {"Communities", + "community communities", + "other", + "Join Tetris communities and talk with other players!\n\nChina: [QQ] Tetris Research: 112897780\nGlobal: [Discord] Hard Drop: discord.gg/harddrop (click \"Open URL\")", + "https://discord.gg/harddrop" + }, + {"Tetris OL Servers", + "tetrisonline servers", + "other", + "Google \"Tetris Online Poland\" for the Poland server.\nClick \"Open URL\" for information about the Tetris Online Study server.", + "http://teatube.ltd/tos", + }, + {"Github Repository", + "githubrepository sourcecode", + "other", + "Techmino's Github repository. Stars are appreciated", + "https://github.com/26F-Studio/Techmino", + }, - --Savedata managing - {"Console", - "console cmd commamd minglinghang kongzhitai", - "command", - "Techmino has a console which enables debugging/advanced features.\nTo access the console, repeatedly tap the Techmino logo or press C key on the keyboard on the main menu.\n\nCareless actions in the console may result in corrupting or losing save data. Proceed at your own risk.", - }, - {"Reset setting", - "reset setting", - "command", - "Go to console and type \"rm conf/setting\" then press enter.\nEffected after restart game\nplay one game to get setting back", - }, - {"Reset statistics", - "reset statistic data", - "command", - "Go to console and type \"rm conf/data\" then press enter.\nEffected after restart game\nplay one game to get data back", - }, - {"Reset unlock", - "reset unlock", - "command", - "Go to console and type \"rm conf/unlock\" then press enter.\nEffected after restart game\nfresh a rank to get data back", - }, - {"Reset records", - "reset record", - "command", - "Go to console and type \"rm -s record\" then press enter.\nEffected after restart game\nfresh a record list to get one list back", - }, - {"Reset key", - "reset virtualkey", - "command", - "Go to console and type \"rm conf/[keyFile]\" then press enter.\nKeyboard: key, Virtualkey: virtualkey, Virtualkey save: vkSave1(2)\nFirst two effected after restart game\nEnter setting and back to get one file back", - }, - {"Delete replays", - "delete recording", - "command", - "Go to console and type \"rm -s replay\" then press enter.\nEffected immediately", - }, - {"Delete cache", - "delete cache", - "command", - "Go to console and type \"rm -s cache\" then press enter.\nEffected immediately", - }, + --Savedata managing + {"Console", + "console cmd commamd minglinghang kongzhitai", + "command", + "Techmino has a console which enables debugging/advanced features.\nTo access the console, repeatedly tap the Techmino logo or press C key on the keyboard on the main menu.\n\nCareless actions in the console may result in corrupting or losing save data. Proceed at your own risk.", + }, + {"Reset setting", + "reset setting", + "command", + "Go to console and type \"rm conf/setting\" then press enter.\nEffected after restart game\nplay one game to get setting back", + }, + {"Reset statistics", + "reset statistic data", + "command", + "Go to console and type \"rm conf/data\" then press enter.\nEffected after restart game\nplay one game to get data back", + }, + {"Reset unlock", + "reset unlock", + "command", + "Go to console and type \"rm conf/unlock\" then press enter.\nEffected after restart game\nfresh a rank to get data back", + }, + {"Reset records", + "reset record", + "command", + "Go to console and type \"rm -s record\" then press enter.\nEffected after restart game\nfresh a record list to get one list back", + }, + {"Reset key", + "reset virtualkey", + "command", + "Go to console and type \"rm conf/[keyFile]\" then press enter.\nKeyboard: key, Virtualkey: virtualkey, Virtualkey save: vkSave1(2)\nFirst two effected after restart game\nEnter setting and back to get one file back", + }, + {"Delete replays", + "delete recording", + "command", + "Go to console and type \"rm -s replay\" then press enter.\nEffected immediately", + }, + {"Delete cache", + "delete cache", + "command", + "Go to console and type \"rm -s cache\" then press enter.\nEffected immediately", + }, - --English - {"SFX", - "sfx soundeffects", - "english", - "Short for \"Sound effects\".", - }, - {"BGM", - "bgm backgroundmusic", - "english", - "Short for \"Background music\".", - }, - {"TAS", - "tas", - "english", - "Short for \"Tool-Assisted Speedrun(Supergaming)\"",--TODO - }, - {"AFK", - "afk", - "english", - "\"Away from keyboard\", or in a broader sense, a period of time when you are not playing.\nTaking regular breaks helps relief your muscle strain and help you player better when you come back.", - }, + --English + {"SFX", + "sfx soundeffects", + "english", + "Short for \"Sound effects\".", + }, + {"BGM", + "bgm backgroundmusic", + "english", + "Short for \"Background music\".", + }, + {"TAS", + "tas", + "english", + "Short for \"Tool-Assisted Speedrun(Supergaming)\"",--TODO + }, + {"AFK", + "afk", + "english", + "\"Away from keyboard\", or in a broader sense, a period of time when you are not playing.\nTaking regular breaks helps relief your muscle strain and help you player better when you come back.", + }, - --Famous - {"Hebomai", - "hebomai hbm", - "name", - "One of the top players.\nOnce Beat Wu Songhao (a Chinese player) on TV.", - }, - {"Amemiya Taiyou", - "amemiya taiyou", - "name", - "One of the top players.\nWon champion on a game in Puyo Puyo Tetris's Swap mode.", - }, - {"Ajanba", - "ajanba ajb", - "name", - "One of the top players.\nWon champion of JsCup.", - }, - {"Blink", - "blink", - "name", - "One of the top players.\nRuns the Tetris community, Hard Drop.", - }, - {"Doremy", - "doremy 123", - "name", - "One of the top players.\nAmemiya once said he was the second best player in the world.", - }, - {"Firestorm", - "firestorm fst", - "name", - "One of the top players.\nWon champion of JsCup.", - }, - {"Furea", - "furea fuleiya jk", - "name", - "One of the top players.\nWorld record holder of Puyo Puyo Tetris's Sprint mode and Ultra mode.", - }, - {"Iljain", - "iljain yijianlian", - "name", - "One of the top players.\nAchieved Rank 1 in Cultris II.", - }, - {"Jonas", - "jonas", - "name", - "One of the top players in Classic Tetris.\nFour-times-in-a-row champion of CTWC.\n\n(1981-2021)", - }, - {"Joseph", - "joseph", - "name", - "One of the top players in Classic Tetris.\nTwice-in-a-row champion of CTWC. Also holds many world records of Tetris (NES, Nintendo).", - }, - {"Kazu", - "kazu mdking", - "name", - "One of the top players.\nFamous for how he can turn misdrops into donation setups.", - }, - {"Microblizz", - "microblizz", - "name", - "One of the top players.\nFormer world record holder for Sprint.", - }, - {"Vince", - "vincehd", - "name", - "One of the top players.\nLast world record holder for Sprint (no delay).", - }, - {"Wumbo", - "wumbotize squirtle", - "name", - "One of the top players.\nFamously fond of using Center 4-Wide setups, thus having a bad reputation. However, he is also undeniably skilled in other techniques as well.", - }, - {"Yakine", - "yakine heshui", - "name", - "One of the top players.\nFamous for fancy T-Spins. When in combat but not in danger, he could often pull off some fancy donations very high on the field. Third place on the speed leaderboards of Jstris's 20TSD mode, and didn't use setups (the first and second place both used LST setup).", - }, - {"Translator Note 3", - "", - "help", - "Starting from here, all but one terms are China-specific (the not-China term is Diao), and are less relevant for the global community. Read at your own risk.\n\"Virtual content creator\" refers to people who produce content online under a fictional persona, and appear as a motion-controlled animated character on screens. Basically \"Virtual YouTuber\" but not platform-specific." - }, - {"TetroDictionary", - "zictionary tetrodictionary littlez", - "name", - "The name of this thing... or Zictionary for short.\nUsed to be a chat bot that serves for the same function, and mostly uses the same list of keywords.", - }, - {"MrZ", - "mrz 626", - "name", - "Tetris Research community member, author of Techmino.\nPersonal bests: Sprint 25.95 seconds, MPH Sprint 57 seconds, #8 on Jstris leaderboards, X rank on TETR.IO, cleared TGM3 (World rule, Shirase gold 1300).", - "https://space.bilibili.com/225238922", - }, + --Famous + {"Hebomai", + "hebomai hbm", + "name", + "One of the top players.\nOnce Beat Wu Songhao (a Chinese player) on TV.", + }, + {"Amemiya Taiyou", + "amemiya taiyou", + "name", + "One of the top players.\nWon champion on a game in Puyo Puyo Tetris's Swap mode.", + }, + {"Ajanba", + "ajanba ajb", + "name", + "One of the top players.\nWon champion of JsCup.", + }, + {"Blink", + "blink", + "name", + "One of the top players.\nRuns the Tetris community, Hard Drop.", + }, + {"Doremy", + "doremy 123", + "name", + "One of the top players.\nAmemiya once said he was the second best player in the world.", + }, + {"Firestorm", + "firestorm fst", + "name", + "One of the top players.\nWon champion of JsCup.", + }, + {"Furea", + "furea fuleiya jk", + "name", + "One of the top players.\nWorld record holder of Puyo Puyo Tetris's Sprint mode and Ultra mode.", + }, + {"Iljain", + "iljain yijianlian", + "name", + "One of the top players.\nAchieved Rank 1 in Cultris II.", + }, + {"Jonas", + "jonas", + "name", + "One of the top players in Classic Tetris.\nFour-times-in-a-row champion of CTWC.\n\n(1981-2021)", + }, + {"Joseph", + "joseph", + "name", + "One of the top players in Classic Tetris.\nTwice-in-a-row champion of CTWC. Also holds many world records of Tetris (NES, Nintendo).", + }, + {"Kazu", + "kazu mdking", + "name", + "One of the top players.\nFamous for how he can turn misdrops into donation setups.", + }, + {"Microblizz", + "microblizz", + "name", + "One of the top players.\nFormer world record holder for Sprint.", + }, + {"Vince", + "vincehd", + "name", + "One of the top players.\nLast world record holder for Sprint (no delay).", + }, + {"Wumbo", + "wumbotize squirtle", + "name", + "One of the top players.\nFamously fond of using Center 4-Wide setups, thus having a bad reputation. However, he is also undeniably skilled in other techniques as well.", + }, + {"Yakine", + "yakine heshui", + "name", + "One of the top players.\nFamous for fancy T-Spins. When in combat but not in danger, he could often pull off some fancy donations very high on the field. Third place on the speed leaderboards of Jstris's 20TSD mode, and didn't use setups (the first and second place both used LST setup).", + }, + {"Translator Note 3", + "", + "help", + "Starting from here, all but one terms are China-specific (the not-China term is Diao), and are less relevant for the global community. Read at your own risk.\n\"Virtual content creator\" refers to people who produce content online under a fictional persona, and appear as a motion-controlled animated character on screens. Basically \"Virtual YouTuber\" but not platform-specific." + }, + {"TetroDictionary", + "zictionary tetrodictionary littlez", + "name", + "The name of this thing... or Zictionary for short.\nUsed to be a chat bot that serves for the same function, and mostly uses the same list of keywords.", + }, + {"MrZ", + "mrz 626", + "name", + "Tetris Research community member, author of Techmino.\nPersonal bests: Sprint 25.95 seconds, MPH Sprint 57 seconds, #8 on Jstris leaderboards, X rank on TETR.IO, cleared TGM3 (World rule, Shirase gold 1300).", + "https://space.bilibili.com/225238922", + }, - {"Circu1ation", - "circu1ation", - "name", - "One of the top players. First one to achieve sub-20 Sprint in China, X rank on TETR.IO.", - "https://space.bilibili.com/557547205", - }, - {"Farter", - "farteryhr", - "name", - "Tetris Research community member.\nPersonal bests: Sprint 26.193 seconds\nOne of the prestigious players in the Chinese Tetris community. Author of T-ex and Tetr.js Farter's Dig Mod.", - "https://space.bilibili.com/132966", - }, - {"Teatube", - "teatube ttb chaguan chanaiye sifangchaye 022", - "name", - "Administrator of the Tetris Research community, Operator of the Tetris Online Study private server, chief editor of the Huiji wiki.\nPersonal bests: Sprint 33 seconds.", - "https://space.bilibili.com/834903", - }, - {"Sniraite", - "sniraite", - "name", - "Tetris Research community member.\nPersonal bests: Sprint 23 seconds\nOne of the top players in China. Should be the fastest player in Mainland China.", - "https://space.bilibili.com/561589", - }, - {"xb", - "xb", - "name", - "Tetris Research community member.\nMain organizer for competitions in the community.", - }, - {"Flyz", - "flyz fxg", - "name", - "Tetris Research community member.\nA technical player.", - "https://space.bilibili.com/787096", - }, - {"gggf", - "xiaoqi kissne gggf", - "name", - "Tetris Research community member.\nPersonal bests: Sprint 22.677 seconds (25.483 seconds on mobile), MPH Sprint 56 seconds, X rank on Tetr.io\nOne of the top players of 20G in China, achieved almost every achievement in TGM3.", - "https://space.bilibili.com/287769888", - }, - {"蕴空之灵", - "ykzl yunkongzhiling niao bird", - "name", - "Tetris Research community member.\nPersonal bests: Sprint 33 seconds.\nDecent efficiency. Can't eat spicy food. Often uses TKI 3, Albatross and PC opener.", - "https://space.bilibili.com/9964553", - }, - {"安樱奈莯Naki", - "naki anyingnaimu", - "name", - "Tetris Research community member, Virtual content creator.\nWe seem to have asked her to record some voice clips for this game?", - "https://space.bilibili.com/33212649", - }, - {"奏之章", - "zzz zouzhizhang", - "name", - "Tetris Research community member.\nAuthor of ZZZbot. An important figure in the developement of Tetris AI in China.", - "https://space.bilibili.com/311039", - }, - {"吴淞昊", - "wusonghao modian", - "name", - "Tetris Research community member.\nOne of the top players of hidden Tetris in China. Was once on TV.", - "https://space.bilibili.com/17583394", - }, - {"他天一", - "tty tatianyi hydrofierus", - "name", - "Tetris Research community member.\nPersonal bests: Sprint 22.72 seconds, U rank on Tetr.io.\nOne of the top players of Tetris in China.", - "https://space.bilibili.com/3895759", - }, - {"Mars608", - "mars608", - "name", - "Tetris Research community member.\nFormer regional first place on Puyo Puyo Tetris (Nintendo Switch, People's Republic of China region).", - "https://space.bilibili.com/1471400", - }, - {"Mifu", - "mifu swl nanmaomao", - "name", - "Originally known as swl.\nPersonal bests: Sprint 32 seconds, Tetris Research community member.\nMiya's Tetris coach. Miya made an animated character art for him called Mifu, meaning \"Miya's Shifu\".", - "https://space.bilibili.com/109356367", - }, - {"ZXC", - "zxc thtsod", - "name", - "Also known as ThTsOd.\nTetris Research community member.\nA technical player.", - "https://space.bilibili.com/4610502", - }, - {"Tinko", - "tinko", - "name", - "Tetris Research community member.\nA technical player.", - "https://tinko.moe", - }, - {"T722", - "722", - "name", - "Tetris Research community member.\nMusician.", - "https://space.bilibili.com/30452985", - }, - {"Diao", - "diao", - "name", - "Tetris Research community member.\nOne of the top battle players. Won second place in JsCup, champion in TTT, champion in HDO XII.\nHas many former nicknames including nmdtql, diao, nanami.", - "https://space.bilibili.com/471341780", - }, - {"思竣", - "sijun", - "name", - "Tetris Research community member.\nLots of mental computation power.", - "https://space.bilibili.com/403250559", - }, - {"Particle_G", - "particleg", - "name", - "Tetris Research community member.\nSprint 59.4 seconds\nThe developer of Techmino backend", - "https://space.bilibili.com/3306106", - }, - {"琳雨空", - "linyukong", - "name", - "Tetris Research community member.\nSprint 38.3 seconds, S Rank in pentomino mode and Blind-WTF (world No.1)", - "https://space.bilibili.com/263909369", - }, - {"子心Koishi", - "koishi", - "name", - "Tetris Research community member, Virtual content creator.\nA top Tetris 99 players known for his strategies.", - "https://space.bilibili.com/147529", - }, - {"蓝绿", - "lanlv gompyn imple lee blari'o blariho", - "name", - "Tetris Research community member.\nParticipant of $1",--Techmino backend - }, - {"喵田弥夜Miya", - "miya miaotianmiye", - "name", - "Tetris Research community member, Virtual content creator.\nPractically the mascot of the community. Voice actress of Techmino.", - "https://space.bilibili.com/846180", - }, + {"Circu1ation", + "circu1ation", + "name", + "One of the top players. First one to achieve sub-20 Sprint in China, X rank on TETR.IO.", + "https://space.bilibili.com/557547205", + }, + {"Farter", + "farteryhr", + "name", + "Tetris Research community member.\nPersonal bests: Sprint 26.193 seconds\nOne of the prestigious players in the Chinese Tetris community. Author of T-ex and Tetr.js Farter's Dig Mod.", + "https://space.bilibili.com/132966", + }, + {"Teatube", + "teatube ttb chaguan chanaiye sifangchaye 022", + "name", + "Administrator of the Tetris Research community, Operator of the Tetris Online Study private server, chief editor of the Huiji wiki.\nPersonal bests: Sprint 33 seconds.", + "https://space.bilibili.com/834903", + }, + {"Sniraite", + "sniraite", + "name", + "Tetris Research community member.\nPersonal bests: Sprint 23 seconds\nOne of the top players in China. Should be the fastest player in Mainland China.", + "https://space.bilibili.com/561589", + }, + {"xb", + "xb", + "name", + "Tetris Research community member.\nMain organizer for competitions in the community.", + }, + {"Flyz", + "flyz fxg", + "name", + "Tetris Research community member.\nA technical player.", + "https://space.bilibili.com/787096", + }, + {"gggf", + "xiaoqi kissne gggf", + "name", + "Tetris Research community member.\nPersonal bests: Sprint 22.677 seconds (25.483 seconds on mobile), MPH Sprint 56 seconds, X rank on Tetr.io\nOne of the top players of 20G in China, achieved almost every achievement in TGM3.", + "https://space.bilibili.com/287769888", + }, + {"蕴空之灵", + "ykzl yunkongzhiling niao bird", + "name", + "Tetris Research community member.\nPersonal bests: Sprint 33 seconds.\nDecent efficiency. Can't eat spicy food. Often uses TKI 3, Albatross and PC opener.", + "https://space.bilibili.com/9964553", + }, + {"安樱奈莯Naki", + "naki anyingnaimu", + "name", + "Tetris Research community member, Virtual content creator.\nWe seem to have asked her to record some voice clips for this game?", + "https://space.bilibili.com/33212649", + }, + {"奏之章", + "zzz zouzhizhang", + "name", + "Tetris Research community member.\nAuthor of ZZZbot. An important figure in the developement of Tetris AI in China.", + "https://space.bilibili.com/311039", + }, + {"吴淞昊", + "wusonghao modian", + "name", + "Tetris Research community member.\nOne of the top players of hidden Tetris in China. Was once on TV.", + "https://space.bilibili.com/17583394", + }, + {"他天一", + "tty tatianyi hydrofierus", + "name", + "Tetris Research community member.\nPersonal bests: Sprint 22.72 seconds, U rank on Tetr.io.\nOne of the top players of Tetris in China.", + "https://space.bilibili.com/3895759", + }, + {"Mars608", + "mars608", + "name", + "Tetris Research community member.\nFormer regional first place on Puyo Puyo Tetris (Nintendo Switch, People's Republic of China region).", + "https://space.bilibili.com/1471400", + }, + {"Mifu", + "mifu swl nanmaomao", + "name", + "Originally known as swl.\nPersonal bests: Sprint 32 seconds, Tetris Research community member.\nMiya's Tetris coach. Miya made an animated character art for him called Mifu, meaning \"Miya's Shifu\".", + "https://space.bilibili.com/109356367", + }, + {"ZXC", + "zxc thtsod", + "name", + "Also known as ThTsOd.\nTetris Research community member.\nA technical player.", + "https://space.bilibili.com/4610502", + }, + {"Tinko", + "tinko", + "name", + "Tetris Research community member.\nA technical player.", + "https://tinko.moe", + }, + {"T722", + "722", + "name", + "Tetris Research community member.\nMusician.", + "https://space.bilibili.com/30452985", + }, + {"Diao", + "diao", + "name", + "Tetris Research community member.\nOne of the top battle players. Won second place in JsCup, champion in TTT, champion in HDO XII.\nHas many former nicknames including nmdtql, diao, nanami.", + "https://space.bilibili.com/471341780", + }, + {"思竣", + "sijun", + "name", + "Tetris Research community member.\nLots of mental computation power.", + "https://space.bilibili.com/403250559", + }, + {"Particle_G", + "particleg", + "name", + "Tetris Research community member.\nSprint 59.4 seconds\nThe developer of Techmino backend", + "https://space.bilibili.com/3306106", + }, + {"琳雨空", + "linyukong", + "name", + "Tetris Research community member.\nSprint 38.3 seconds, S Rank in pentomino mode and Blind-WTF (world No.1)", + "https://space.bilibili.com/263909369", + }, + {"子心Koishi", + "koishi", + "name", + "Tetris Research community member, Virtual content creator.\nA top Tetris 99 players known for his strategies.", + "https://space.bilibili.com/147529", + }, + {"蓝绿", + "lanlv gompyn imple lee blari'o blariho", + "name", + "Tetris Research community member.\nParticipant of $1",--Techmino backend + }, + {"喵田弥夜Miya", + "miya miaotianmiye", + "name", + "Tetris Research community member, Virtual content creator.\nPractically the mascot of the community. Voice actress of Techmino.", + "https://space.bilibili.com/846180", + }, } diff --git a/parts/language/dict_zh.lua b/parts/language/dict_zh.lua index d5290c9b..09220dc7 100644 --- a/parts/language/dict_zh.lua +++ b/parts/language/dict_zh.lua @@ -1,1191 +1,1191 @@ local HDsearch="https://harddrop.com/wiki?search=" local HDwiki="\t更多内容见HD wiki" return{ - {"新人须知", - "新人须知 xinren new noob readme", - "help", - "致想深入玩下去的新人:\n\t两大根本原则:\n\t\t1.选手感好的版本(Techmino/Tetr.io/Jstris/TOP/Tetr.js),别用编程练习渣版本\n\t\t2.踏实打好基础(预判next稳定消四等),别总想着炫酷T旋,对未来发展没好处\n\t两大主要技巧:\n\t\t1.熟悉初始位置以及到各个位置的初始操作\n\t\t2.提前计算好下一块能放哪\n(推荐阅读专栏)一位块圈dalao给新人的话\n\n[点击右下角按钮打开链接]", - "https://bilibili.com/read/cv2352939", - }, - {"关于T-spin学习", - "tspin", - "help", - "首先指出:要能熟练做出各种Tspin并不是只看着Tspin的那一小部分地形就可以玩好的,对玩家堆叠能力和计算next能力同样也有较高的要求。\n\n如果不只是出于娱乐、随便玩玩的目的,是真的想不断提升Tspin能力变强,请在基础能力达到一定要求前不要刻意去学习太多的Tspin,而先把重点放在堆叠等基本功上。\n\n参考学T门槛水平:40行达到60秒以内(可以视个人情况调整为40~120秒)、能够轻松完成全消四的40行、不使用hold不降太多速度的前提下比较轻松完成全消四的40行。", - }, - {"游戏官网", - "official website homepage guanwang", - "help", - "Techmino的官网!\n可以在上面修改头像和个人信息", - "http://home.techmino.org", - }, - {"Tetris Wiki", - "tetris wiki", - "help", - "(英文)一个专注于创建俄罗斯方块相关内容的wiki百科,由Myndzi在2015创办。年复一年,上千玩家贡献了一系列的官块和自制块的说明,游戏的隐藏机制,和提升游戏体验的教程", - "https://tetris.wiki", - }, - {"HardDrop wiki", - "harddrop hd wiki", - "help", - "(英文)位于Harddrop全球俄罗斯方块社区的wiki百科", - "https://harddrop.com/wiki/Tetris_Wiki", - }, - {"Tetris Wiki Fandom", - "tetris wiki fandom", - "help", - "(英文)一个俄罗斯方块维基", - "https://tetris.fandom.com/wiki/Tetris_Wiki", - }, - {"灰机wiki", - "灰机wiki huiji wiki", - "help", - "俄罗斯方块中文维基,由一群来自俄罗斯方块研究群及下属群的方块同好建立的关于俄罗斯方块的中文百科全书。\n目前其大部分页面翻译和参考来自Harddrop wiki和Tetris Wiki", - "https://tetris.huijiwiki.com", - }, + {"新人须知", + "新人须知 xinren new noob readme", + "help", + "致想深入玩下去的新人:\n\t两大根本原则:\n\t\t1.选手感好的版本(Techmino/Tetr.io/Jstris/TOP/Tetr.js),别用编程练习渣版本\n\t\t2.踏实打好基础(预判next稳定消四等),别总想着炫酷T旋,对未来发展没好处\n\t两大主要技巧:\n\t\t1.熟悉初始位置以及到各个位置的初始操作\n\t\t2.提前计算好下一块能放哪\n(推荐阅读专栏)一位块圈dalao给新人的话\n\n[点击右下角按钮打开链接]", + "https://bilibili.com/read/cv2352939", + }, + {"关于T-spin学习", + "tspin", + "help", + "首先指出:要能熟练做出各种Tspin并不是只看着Tspin的那一小部分地形就可以玩好的,对玩家堆叠能力和计算next能力同样也有较高的要求。\n\n如果不只是出于娱乐、随便玩玩的目的,是真的想不断提升Tspin能力变强,请在基础能力达到一定要求前不要刻意去学习太多的Tspin,而先把重点放在堆叠等基本功上。\n\n参考学T门槛水平:40行达到60秒以内(可以视个人情况调整为40~120秒)、能够轻松完成全消四的40行、不使用hold不降太多速度的前提下比较轻松完成全消四的40行。", + }, + {"游戏官网", + "official website homepage guanwang", + "help", + "Techmino的官网!\n可以在上面修改头像和个人信息", + "http://home.techmino.org", + }, + {"Tetris Wiki", + "tetris wiki", + "help", + "(英文)一个专注于创建俄罗斯方块相关内容的wiki百科,由Myndzi在2015创办。年复一年,上千玩家贡献了一系列的官块和自制块的说明,游戏的隐藏机制,和提升游戏体验的教程", + "https://tetris.wiki", + }, + {"HardDrop wiki", + "harddrop hd wiki", + "help", + "(英文)位于Harddrop全球俄罗斯方块社区的wiki百科", + "https://harddrop.com/wiki/Tetris_Wiki", + }, + {"Tetris Wiki Fandom", + "tetris wiki fandom", + "help", + "(英文)一个俄罗斯方块维基", + "https://tetris.fandom.com/wiki/Tetris_Wiki", + }, + {"灰机wiki", + "灰机wiki huiji wiki", + "help", + "俄罗斯方块中文维基,由一群来自俄罗斯方块研究群及下属群的方块同好建立的关于俄罗斯方块的中文百科全书。\n目前其大部分页面翻译和参考来自Harddrop wiki和Tetris Wiki", + "https://tetris.huijiwiki.com", + }, - --游戏(题库) - {"TTT", - "教程 ttt", - "game", - "现代方块特殊操作手把手教程(推荐使用电脑,移动设备需要外接键盘)\n\t推荐能无hold纯消四完成40行挑战的人学习\n\t内含T-spin、极简、SRS、部分对战定式介绍等教程\n\t完全吃透了话就可以成为教练啦!\n注:提供的链接是翻译后挂在茶服的版本", - "http://teatube.ltd/ttt", - }, - {"TTPC", - "pc教程 ttpc", - "game", - "SRS+bag7方块游戏开局PC教程(推荐使用电脑,移动设备需要外接键盘)\n\t推荐完成了ttt的人学习(必须先学会SRS)\n\t(不包括六巧板等其它PC定式)\n\n注:提供的链接是翻译后挂在茶服的版本", - "http://teatube.ltd/ttpc", - }, - {"NAZO", - "题库 nazo", - "game", - "各类SRS试题(手机触屏玩不了)\n\t推荐能通过ttt的玩家尝试。\n\t内含各种t-spin/all-spin题目,简单到极难题目都有。\n\n注:提供的链接是翻译后挂在茶服的版本", - "http://teatube.ltd/nazo", - }, + --游戏(题库) + {"TTT", + "教程 ttt", + "game", + "现代方块特殊操作手把手教程(推荐使用电脑,移动设备需要外接键盘)\n\t推荐能无hold纯消四完成40行挑战的人学习\n\t内含T-spin、极简、SRS、部分对战定式介绍等教程\n\t完全吃透了话就可以成为教练啦!\n注:提供的链接是翻译后挂在茶服的版本", + "http://teatube.ltd/ttt", + }, + {"TTPC", + "pc教程 ttpc", + "game", + "SRS+bag7方块游戏开局PC教程(推荐使用电脑,移动设备需要外接键盘)\n\t推荐完成了ttt的人学习(必须先学会SRS)\n\t(不包括六巧板等其它PC定式)\n\n注:提供的链接是翻译后挂在茶服的版本", + "http://teatube.ltd/ttpc", + }, + {"NAZO", + "题库 nazo", + "game", + "各类SRS试题(手机触屏玩不了)\n\t推荐能通过ttt的玩家尝试。\n\t内含各种t-spin/all-spin题目,简单到极难题目都有。\n\n注:提供的链接是翻译后挂在茶服的版本", + "http://teatube.ltd/nazo", + }, - --游戏(网页) - {"King of Stackers", - "回合制 kos kingofstackers", - "game", - "简称KOS,King of Stackers\n网页版回合制对战方块点击即玩(可能很卡),主要规则为:以7块为一个回合,双方轮流在自己场地中放置方块,任何的攻击只在对方回合放一块不消行后生效,策略性很强。有不同的伤害表设置。", - "https://kingofstackers.com/games.php", - }, - {"Tetr.js", - "网页 手机 tetrjs", - "game", - "简称屁块,全平台网页版单机方块点击即玩,有对新人比较友好的全自定义(大多数常用功能),手机只能选几个默认按键组,不能自由摆放。别的都很好", - "http://farter.cn/t", - }, - {"Tetra Legends", - "网页 tl tetralegends", - "game", - "简称TL,全平台网页版单机方块点击即玩(推荐使用电脑,移动设备需要外接键盘)(第一次加载可能很慢),除了手感不够舒适以外功能比较强大,动效很好看,还把很多别的游戏里不可见的机制可视化了,游戏体验很好。\n\n注:包含节奏模式!\n\n2020年12月,基本确定由于各种原因不再继续开发", - "https://tetralegends.app", - }, - {"Ascension", - "网页 asc ascension", - "game", - "简称asc,全平台网页版单机方块点击即玩(第一次加载可能很慢),使用自己的ASC旋转系统,有不少单机模式(本游戏的堆积模式就来自asc),对战模式目前处在测试阶段(2021.8.20)", - "https://asc.winternebs.com", - }, - {"Jstris", - "网页 手机 js jstris", - "game", - "简称JS,全平台网页对战方块点击即玩(服务器在国外可能很卡)。有常用的科研向单机模式和自定义各种参数的功能,但没有很多强制速度向的挑战项目。都是纯色素材导致画面效果不怎么好。移动端的键位设置并不舒适。", - "https://jstris.jezevec10.com", - }, - {"TETR.IO", - "网页 io tetrio", - "game", - "简称IO,炫酷在线对战方块点击即玩(推荐使用电脑,移动设备需要外接键盘)(服务器在国外,可能超级慢甚至打不开)有很科学的排位系统,自定义功能非常全面,同时也提供电脑客户端下载(可以去除广告)。缺点是单机模式非常非常少。", - "https://tetr.io", - }, - {"Nuketris", - "网页 nuketris he", - "game", - "在线对战网页方块点击即玩(推荐使用电脑)(服务器在国外可能很卡)有几个基础单机模式和1v1排位。", - "https://nuketris.herokuapp.com/", - }, - {"World Wide Combo", - "网页 wwc worldwidecombo", - "game", - "简称WWC,网页全世界匹配制1对1方块点击即玩(服务器在国外可能很卡)", - "https://worldwidecombos.com", - }, - {"Tetris Friends", - "网页 tf tetrisfriends", - "game", - "简称TF,一个已经关服了的网页版方块,曾经是一个不错的对战平台\n现在有人架了私服(怀旧服?)", - "https://notrisfoes.com", - }, + --游戏(网页) + {"King of Stackers", + "回合制 kos kingofstackers", + "game", + "简称KOS,King of Stackers\n网页版回合制对战方块点击即玩(可能很卡),主要规则为:以7块为一个回合,双方轮流在自己场地中放置方块,任何的攻击只在对方回合放一块不消行后生效,策略性很强。有不同的伤害表设置。", + "https://kingofstackers.com/games.php", + }, + {"Tetr.js", + "网页 手机 tetrjs", + "game", + "简称屁块,全平台网页版单机方块点击即玩,有对新人比较友好的全自定义(大多数常用功能),手机只能选几个默认按键组,不能自由摆放。别的都很好", + "http://farter.cn/t", + }, + {"Tetra Legends", + "网页 tl tetralegends", + "game", + "简称TL,全平台网页版单机方块点击即玩(推荐使用电脑,移动设备需要外接键盘)(第一次加载可能很慢),除了手感不够舒适以外功能比较强大,动效很好看,还把很多别的游戏里不可见的机制可视化了,游戏体验很好。\n\n注:包含节奏模式!\n\n2020年12月,基本确定由于各种原因不再继续开发", + "https://tetralegends.app", + }, + {"Ascension", + "网页 asc ascension", + "game", + "简称asc,全平台网页版单机方块点击即玩(第一次加载可能很慢),使用自己的ASC旋转系统,有不少单机模式(本游戏的堆积模式就来自asc),对战模式目前处在测试阶段(2021.8.20)", + "https://asc.winternebs.com", + }, + {"Jstris", + "网页 手机 js jstris", + "game", + "简称JS,全平台网页对战方块点击即玩(服务器在国外可能很卡)。有常用的科研向单机模式和自定义各种参数的功能,但没有很多强制速度向的挑战项目。都是纯色素材导致画面效果不怎么好。移动端的键位设置并不舒适。", + "https://jstris.jezevec10.com", + }, + {"TETR.IO", + "网页 io tetrio", + "game", + "简称IO,炫酷在线对战方块点击即玩(推荐使用电脑,移动设备需要外接键盘)(服务器在国外,可能超级慢甚至打不开)有很科学的排位系统,自定义功能非常全面,同时也提供电脑客户端下载(可以去除广告)。缺点是单机模式非常非常少。", + "https://tetr.io", + }, + {"Nuketris", + "网页 nuketris he", + "game", + "在线对战网页方块点击即玩(推荐使用电脑)(服务器在国外可能很卡)有几个基础单机模式和1v1排位。", + "https://nuketris.herokuapp.com/", + }, + {"World Wide Combo", + "网页 wwc worldwidecombo", + "game", + "简称WWC,网页全世界匹配制1对1方块点击即玩(服务器在国外可能很卡)", + "https://worldwidecombos.com", + }, + {"Tetris Friends", + "网页 tf tetrisfriends", + "game", + "简称TF,一个已经关服了的网页版方块,曾经是一个不错的对战平台\n现在有人架了私服(怀旧服?)", + "https://notrisfoes.com", + }, - --游戏(街机/类街机) - {"TGM", - "俄罗斯方块大师 tgm tetrisgrandmaster", - "game", - "一个街机平台方块系列,S13/GM等称号出自该系列,可以在win平台运行\n\n其中TGM3目前玩得最普遍,部分模式说明:\nMaster:大师模式,有段位评价,拿到更高段位点的要求:非消一的连击和消四,字幕战中消除和通关,每100的前70小于【标准时间,上一个0~70秒数+2】中小的一个,每100总用时不能超过限定值(不然取消上一个方法的加分并反扣点数);到500若没有进标准时间会强制结束游戏(称为铁门);字幕战有两个难度,半隐和全隐,后者必须拿到几乎全部的段位点才能进,消除奖励的段位点也更多。\nShirase:死亡模式,类似于techmino中的20G-极限,开局就是高速20G,500和1000有铁门,500开始底下开始涨垃圾行,1000开始出现骨块,1300通关进入大方块字幕战;段位结算:每通100加1段从S1到S13,如果通关了字幕战就会有金色的S13\n\n更多内容详见链接", - "http://teatube.ltd/TGMGUIDE/", - }, - {"DTET", - "dtet", - "game", - "一个win平台方块,基于经典规则加入了20G和一个很强大的旋转系统,手感非常好,但是除了键位都不可自定义,能习惯经典出块方向的玩家可以玩(就是有点难找到,找到了可能还要自己装缺了的dll文件)", - }, - {"Heboris", - "hb heboris", - "game", - "一个win平台方块,仿街机,可以模拟多个方块游戏的部分模式", - }, - {"Texmaster", - "txm texmaster", - "game", - "简称Tex,一个win平台方块,包含TGM的所有模式,可以用来练习TGM,手感比真版较好,不足的是world规则不完全一样(如软降到底无锁延,踢墙表有细节不同等)", - }, + --游戏(街机/类街机) + {"TGM", + "俄罗斯方块大师 tgm tetrisgrandmaster", + "game", + "一个街机平台方块系列,S13/GM等称号出自该系列,可以在win平台运行\n\n其中TGM3目前玩得最普遍,部分模式说明:\nMaster:大师模式,有段位评价,拿到更高段位点的要求:非消一的连击和消四,字幕战中消除和通关,每100的前70小于【标准时间,上一个0~70秒数+2】中小的一个,每100总用时不能超过限定值(不然取消上一个方法的加分并反扣点数);到500若没有进标准时间会强制结束游戏(称为铁门);字幕战有两个难度,半隐和全隐,后者必须拿到几乎全部的段位点才能进,消除奖励的段位点也更多。\nShirase:死亡模式,类似于techmino中的20G-极限,开局就是高速20G,500和1000有铁门,500开始底下开始涨垃圾行,1000开始出现骨块,1300通关进入大方块字幕战;段位结算:每通100加1段从S1到S13,如果通关了字幕战就会有金色的S13\n\n更多内容详见链接", + "http://teatube.ltd/TGMGUIDE/", + }, + {"DTET", + "dtet", + "game", + "一个win平台方块,基于经典规则加入了20G和一个很强大的旋转系统,手感非常好,但是除了键位都不可自定义,能习惯经典出块方向的玩家可以玩(就是有点难找到,找到了可能还要自己装缺了的dll文件)", + }, + {"Heboris", + "hb heboris", + "game", + "一个win平台方块,仿街机,可以模拟多个方块游戏的部分模式", + }, + {"Texmaster", + "txm texmaster", + "game", + "简称Tex,一个win平台方块,包含TGM的所有模式,可以用来练习TGM,手感比真版较好,不足的是world规则不完全一样(如软降到底无锁延,踢墙表有细节不同等)", + }, - --游戏(PC/主机/手机) - {"Tetris99", - "吃鸡 t99 tetris99", - "game", - "简称T99,ns端方块,主玩99人混战的吃鸡模式,战术比重比较大,胜率不只由玩家在平时1v1时的水平决定。也有一些常用单机模式如马拉松等", - }, - {"Puyopuyo Tetris", - "噗哟方块 ppt puyopuyotetris", - "game", - "简称PPT,多平台方块(steamPC版相对NS版手感和网络等都不太好),将tetris和puyopuyo两个下落消除游戏放到一个游戏里,二者可以对战,联机单机模式都很多,很有趣", - }, - {"Tetris Online", - "top tetris online study", - "game", - "简称TO[服务器名首字母],一个win平台方块,主要用来6人内对战/单挑/刷每日40L榜/挖掘模式/打机器人。支持自定义das/arr但都不能到0,有一点输入延迟但问题不大,是新人入块圈不错的选择。\n\n现在还开着的服务器有:\n\tTO-P(波兰服,服务器在波兰,可能会卡顿)\n\tTO-S(研究服,研究群群友自己开的服,很稳定,需要进群注册)\n\tTO-X(千雪服,VUP星月千雪于20年9月开的服,还处于实验阶段)", - }, - {"Tetra Online", - "to tetraonline", - "game", - "简称TO,PC方块打开Steam免费下载即玩(现在已经没了),开发团队只有Dr.Ocelot和Mine两个人(都没有很多开发经验),UI部分模仿PPT,手感故意设计为较慢,平时玩无延迟方块的玩家会很不习惯,音乐不错,攻击特效好看。2020年12月9日收到来自TTC的DCMA警告信于是被迫停止开发,在一段时间后关服并下架。", - }, - {"Tetris Effect", - "效应 tec tetriseffectconnect", - "game", - "简称TE(C),一个win/ps4/xbox平台方块,特效方块游戏,只有单机模式,手感不算太好,想看特效的可以一试,只是去玩方块的不是很建议\n有一个拓展版本Tetris Effect: Connected增加了联网对战,包含普通对战,zone对战,经典对战和boss战四个模式", - }, - {"Techmino", - "铁壳 techmino tieke", - "game", - "简称Tech,一个win/android/linux/macOS方块,单机模式和各种设置都很齐全,联机正在逐渐开发中,输入延迟很小,手感很好", - }, - {"Cultris II", - "文艺 c2 cultris2 cultrisii", - "game", - "简称C2,一个win/linux/macOS平台方块,设计基于经典规则出发,但支持自定义das/arr,对战的主要玩法是基于时间的连击,考验玩家速度/wide打法/挖掘", - }, - {"Nullpomino", - "np nullpomino", - "game", - "简称NP,一个win平台方块,整个游戏自定义程度极高,几乎任何参数都可以自己设置,是一个专业级方块,不太适合新人上手,连菜单都不太好搞清楚", - }, - {"Touhoumino", - "东方 车万 touhoumino chewan dongfang", - "game", - "块圈玩家自制win平台方块,其实就是一个nullpomino的自带资源包的改版,将东方project元素结合到俄罗斯方块的游戏,好玩但是难度较大,适合有方块基础并且各项能力都较强的玩家游玩(不然都不知道自己怎么死的)", - }, - {"Misamino", - "回合制 misamino", - "game", - "块圈玩家自制win平台方块,单机1v1,主玩回合制模式,可以自定义ai(自己写的话需要了解接口)", - }, - {"JJ块", - "手机 jj gougou", - "game", - "jj棋牌平台下一个休闲游戏,安卓百度“JJ比赛”官网下载平台后可以找到(找不到的原因是ios系统或者没在官网下载或者被限制不可直接访问游戏)。竖屏,输入延迟很小超流畅,可自定义das/arr/20G软降,简单自定义键位,无hold,没有b2b,无攻击缓冲不可抵消,每次攻击上限为4,连击较强,其他同现代方块", - }, - {"Falling lightblock", - "手机 fl fallinglightblock", - "game", - "一个全平台块,横竖屏,有延迟并且不可调。手机支持自定义键位,主要玩法基于nes块设计,也有现代模式。对战为半即时半回合制,无攻击缓冲不可抵消。", - }, - {"火拼俄罗斯", - "火拼俄罗斯 huopin qq", - "game", - "腾讯游戏大厅的方块,场地12列,打字的das和arr,1next,无hold,攻击途径只有 消4打3 消3打2,垃圾行为国际象棋棋盘式,几乎不可能挖掘", - }, + --游戏(PC/主机/手机) + {"Tetris99", + "吃鸡 t99 tetris99", + "game", + "简称T99,ns端方块,主玩99人混战的吃鸡模式,战术比重比较大,胜率不只由玩家在平时1v1时的水平决定。也有一些常用单机模式如马拉松等", + }, + {"Puyopuyo Tetris", + "噗哟方块 ppt puyopuyotetris", + "game", + "简称PPT,多平台方块(steamPC版相对NS版手感和网络等都不太好),将tetris和puyopuyo两个下落消除游戏放到一个游戏里,二者可以对战,联机单机模式都很多,很有趣", + }, + {"Tetris Online", + "top tetris online study", + "game", + "简称TO[服务器名首字母],一个win平台方块,主要用来6人内对战/单挑/刷每日40L榜/挖掘模式/打机器人。支持自定义das/arr但都不能到0,有一点输入延迟但问题不大,是新人入块圈不错的选择。\n\n现在还开着的服务器有:\n\tTO-P(波兰服,服务器在波兰,可能会卡顿)\n\tTO-S(研究服,研究群群友自己开的服,很稳定,需要进群注册)\n\tTO-X(千雪服,VUP星月千雪于20年9月开的服,还处于实验阶段)", + }, + {"Tetra Online", + "to tetraonline", + "game", + "简称TO,PC方块打开Steam免费下载即玩(现在已经没了),开发团队只有Dr.Ocelot和Mine两个人(都没有很多开发经验),UI部分模仿PPT,手感故意设计为较慢,平时玩无延迟方块的玩家会很不习惯,音乐不错,攻击特效好看。2020年12月9日收到来自TTC的DCMA警告信于是被迫停止开发,在一段时间后关服并下架。", + }, + {"Tetris Effect", + "效应 tec tetriseffectconnect", + "game", + "简称TE(C),一个win/ps4/xbox平台方块,特效方块游戏,只有单机模式,手感不算太好,想看特效的可以一试,只是去玩方块的不是很建议\n有一个拓展版本Tetris Effect: Connected增加了联网对战,包含普通对战,zone对战,经典对战和boss战四个模式", + }, + {"Techmino", + "铁壳 techmino tieke", + "game", + "简称Tech,一个win/android/linux/macOS方块,单机模式和各种设置都很齐全,联机正在逐渐开发中,输入延迟很小,手感很好", + }, + {"Cultris II", + "文艺 c2 cultris2 cultrisii", + "game", + "简称C2,一个win/linux/macOS平台方块,设计基于经典规则出发,但支持自定义das/arr,对战的主要玩法是基于时间的连击,考验玩家速度/wide打法/挖掘", + }, + {"Nullpomino", + "np nullpomino", + "game", + "简称NP,一个win平台方块,整个游戏自定义程度极高,几乎任何参数都可以自己设置,是一个专业级方块,不太适合新人上手,连菜单都不太好搞清楚", + }, + {"Touhoumino", + "东方 车万 touhoumino chewan dongfang", + "game", + "块圈玩家自制win平台方块,其实就是一个nullpomino的自带资源包的改版,将东方project元素结合到俄罗斯方块的游戏,好玩但是难度较大,适合有方块基础并且各项能力都较强的玩家游玩(不然都不知道自己怎么死的)", + }, + {"Misamino", + "回合制 misamino", + "game", + "块圈玩家自制win平台方块,单机1v1,主玩回合制模式,可以自定义ai(自己写的话需要了解接口)", + }, + {"JJ块", + "手机 jj gougou", + "game", + "jj棋牌平台下一个休闲游戏,安卓百度“JJ比赛”官网下载平台后可以找到(找不到的原因是ios系统或者没在官网下载或者被限制不可直接访问游戏)。竖屏,输入延迟很小超流畅,可自定义das/arr/20G软降,简单自定义键位,无hold,没有b2b,无攻击缓冲不可抵消,每次攻击上限为4,连击较强,其他同现代方块", + }, + {"Falling lightblock", + "手机 fl fallinglightblock", + "game", + "一个全平台块,横竖屏,有延迟并且不可调。手机支持自定义键位,主要玩法基于nes块设计,也有现代模式。对战为半即时半回合制,无攻击缓冲不可抵消。", + }, + {"火拼俄罗斯", + "火拼俄罗斯 huopin qq", + "game", + "腾讯游戏大厅的方块,场地12列,打字的das和arr,1next,无hold,攻击途径只有 消4打3 消3打2,垃圾行为国际象棋棋盘式,几乎不可能挖掘", + }, - --术语(缩写) - {"LPM", - "lpm sudu", - "term", - "Line per Minute\n行每分,体现玩家下块速度。\n\n注:不同游戏中显示的LPM算法可能不一样,例如TO中的lpm是用pps换算的,每1pps=24lpm,忽略掉了垃圾行的影响,不再是字面意思,本游戏中使用L'PM代表这种换算后LPM", - }, - {"PPS", - "pps sudu", - "term", - "Piece per Second\n块每秒,体现玩家下块速度。", - }, - {"BPM", - "bpm sudu", - "term", - "Block per Minute\n块每分,体现玩家下块速度\n别问为什么不是PPM,问就是不知道", - }, - {"KPM", - "kpm sudu", - "term", - "Key per Minute\n按键每分,体现玩家按键速度。", - }, - {"KPP", - "kpp anjian", - "term", - "Key per Piece\n按键每块,体现玩家操作是否繁琐。\n学会极简提升操作效率以减少此数字", - }, - {"APM", - "apm attack gongji", - "term", - "Attack per Minute\n攻击每分,即玩家每分钟能打出的垃圾行数。\n一定程度体现玩家攻击力", - }, - {"SPM", - "spm send gongji", - "term", - "Send per Minute\n送出每分,即玩家每分钟实际打出去给对手的垃圾行数。\n一定程度体现玩家给对手实际造成的攻击力", - }, - {"DPM", - "dpm dig defend", - "term", - "Dig/Defend per Minute\n挖掘每分,即玩家每分钟向下挖掘的垃圾行数。\n某些时候可以体现玩家生存能力\n\n或:防御(抵消+挖掘)每分", - }, - {"RPM", - "rpm receive jieshou", - "term", - "Receive per Minute\n接收每分,即玩家每分钟收到来自对手的垃圾行数。\n一定程度体现玩家被对手施加的压力", - }, - {"ADPM", - "adpm attack defend vs", - "term", - "Atk+Dig per Minute\n攻击+挖掘每分,用于在同一局游戏内对比玩家间水平差距,比apm更准确一些。\n在TETR.IO中叫vs的数据就是ADPM(调整过比例,具体是Atk+Dig per 100s)", - }, - {"APL", - "apl xiaolv", - "term", - "Attack per Line\n攻击每行,也叫效率,体现玩家攻击的行利用率。", - }, + --术语(缩写) + {"LPM", + "lpm sudu", + "term", + "Line per Minute\n行每分,体现玩家下块速度。\n\n注:不同游戏中显示的LPM算法可能不一样,例如TO中的lpm是用pps换算的,每1pps=24lpm,忽略掉了垃圾行的影响,不再是字面意思,本游戏中使用L'PM代表这种换算后LPM", + }, + {"PPS", + "pps sudu", + "term", + "Piece per Second\n块每秒,体现玩家下块速度。", + }, + {"BPM", + "bpm sudu", + "term", + "Block per Minute\n块每分,体现玩家下块速度\n别问为什么不是PPM,问就是不知道", + }, + {"KPM", + "kpm sudu", + "term", + "Key per Minute\n按键每分,体现玩家按键速度。", + }, + {"KPP", + "kpp anjian", + "term", + "Key per Piece\n按键每块,体现玩家操作是否繁琐。\n学会极简提升操作效率以减少此数字", + }, + {"APM", + "apm attack gongji", + "term", + "Attack per Minute\n攻击每分,即玩家每分钟能打出的垃圾行数。\n一定程度体现玩家攻击力", + }, + {"SPM", + "spm send gongji", + "term", + "Send per Minute\n送出每分,即玩家每分钟实际打出去给对手的垃圾行数。\n一定程度体现玩家给对手实际造成的攻击力", + }, + {"DPM", + "dpm dig defend", + "term", + "Dig/Defend per Minute\n挖掘每分,即玩家每分钟向下挖掘的垃圾行数。\n某些时候可以体现玩家生存能力\n\n或:防御(抵消+挖掘)每分", + }, + {"RPM", + "rpm receive jieshou", + "term", + "Receive per Minute\n接收每分,即玩家每分钟收到来自对手的垃圾行数。\n一定程度体现玩家被对手施加的压力", + }, + {"ADPM", + "adpm attack defend vs", + "term", + "Atk+Dig per Minute\n攻击+挖掘每分,用于在同一局游戏内对比玩家间水平差距,比apm更准确一些。\n在TETR.IO中叫vs的数据就是ADPM(调整过比例,具体是Atk+Dig per 100s)", + }, + {"APL", + "apl xiaolv", + "term", + "Attack per Line\n攻击每行,也叫效率,体现玩家攻击的行利用率。", + }, - --术语(消除名) - {"Single", - "single xiaoyi", - "term", - "消一行", - }, - {"Double", - "double xiaoer", - "term", - "消两行", - }, - {"Triple", - "triple xiaosan", - "term", - "消三行", - }, - {"Techrash", - "techrash xiaosi", - "term", - "消四行(Tech限定)", - }, - {"Tetris", - "tetris xiaosi", - "term", - "商标,Tetris游戏名,同时也是别的方块游戏里消四行的名字。\n含义是Tetra(古希腊语 四)+Tennis(游戏原作者喜欢的运动)。\n现在版权在TTC(The Tetris Company)手上,任天堂和世嘉开发游戏是TTC授权的,本身并没有版权。", - }, - {"PC", - "pc perfectclear ac allclear quanxiao quanqing", - "term", - "Perfect Clear(也叫All Clear,全消,或全清)\n消除场地上所有的方块。", - }, - {"HPC", - "hpc hc clear banqing banquanqing banquanxiao", - "term", - "Half-PC\nPC(全消)的外延,\"下方有剩余方块\"的全消(特别地,如果只消1行则必须不剩余玩家放置的方块),能打出一些攻击和防御(仅Tech中有)。", - }, + --术语(消除名) + {"Single", + "single xiaoyi", + "term", + "消一行", + }, + {"Double", + "double xiaoer", + "term", + "消两行", + }, + {"Triple", + "triple xiaosan", + "term", + "消三行", + }, + {"Techrash", + "techrash xiaosi", + "term", + "消四行(Tech限定)", + }, + {"Tetris", + "tetris xiaosi", + "term", + "商标,Tetris游戏名,同时也是别的方块游戏里消四行的名字。\n含义是Tetra(古希腊语 四)+Tennis(游戏原作者喜欢的运动)。\n现在版权在TTC(The Tetris Company)手上,任天堂和世嘉开发游戏是TTC授权的,本身并没有版权。", + }, + {"PC", + "pc perfectclear ac allclear quanxiao quanqing", + "term", + "Perfect Clear(也叫All Clear,全消,或全清)\n消除场地上所有的方块。", + }, + {"HPC", + "hpc hc clear banqing banquanqing banquanxiao", + "term", + "Half-PC\nPC(全消)的外延,\"下方有剩余方块\"的全消(特别地,如果只消1行则必须不剩余玩家放置的方块),能打出一些攻击和防御(仅Tech中有)。", + }, - --术语(旋转相关) - {"Spin", - "spin xuanzhuan zuandong", - "term", - "(部分游戏中)使用旋转将方块卡进不能直接移动进入的位置,具体判定规则不同游戏不一样,可能会有攻击加成。", - }, - {"Mini", - "迷你 mini", - "term", - "spin附加mini后攻击会弱化,用于平衡不同难易度的tspin攻击,判定在不同游戏都不一样,而且大多数很不好理解,建议只记住常见形状即可。", - }, - {"Allspin", - "allspin", - "term", - "一种规则,指所有方块的spin都有攻击力,而不止是Tspin才有攻击(Tspin only)。", - }, - {"Tspin", - "tspin txuan", - "term", - "在官方规则中,当T方块在锁定前的最后一个操作是旋转,并且锁定后旋转中心对应的四个斜角位置有三个不是空气,那么这就是一个Tspin。PS:如果满足一些额外条件会被打上mini标签减少攻击力。", - }, - {"TSS", - "tss t1 tspin", - "term", - "T-spin single\n指T方块spin消1行。", - }, - {"TSD", - "tsd t2 tspin", - "term", - "T-spin double\n指T方块spin消2行。", - }, - {"TST", - "tst t3 tspin", - "term", - "T-spin triple\n指T方块spin消3行。", - }, - {"MTSS", - "mtss tspin", - "term", - "mini T-spin single\n指T方块mini spin消1行(不同游戏判定不一样)。", - }, - {"MTSD", - "mtsd tspin", - "term", - "mini T-spin double\n指T方块mini spin消2行(仅部分游戏内存在且判定不一样)。", - }, - {"Ospin", - "ospin", - "term", - "由于O方块旋转后形状不变,只能左右移动,所以经常被卡住,于是方块圈就有了ospin的梗:\n有人做过T99/TF中的O变形的特效视频且广为流传;\nT-ex设计的旋转系统可以用spin使O传送进坑;\nTech设计的变形系统中可以旋转O来变形/传送进入一些特定形状的洞。", - }, - {"旋转系统(踢墙)", - "旋转系统 踢墙 xuanzhuanxitong wallkick tiqiang", - "term", - "(部分游戏中)方块旋转后可能和场地或者墙壁有碰撞,此时系统可能会给方块施加偏移,让方块不会因此被卡住而不能操作。这个偏移就是踢墙。\n建议阅读SRS词条", - }, - {"ARS", - "旋转系统 ars rotate", - "term", - "Arika Rotation System, TGM系列使用的旋转系统(3代中的C模式)\n\n或者\n\nAtari Rotation System, 一个左上对齐旋转系统", - }, - {"ASC RS", - "旋转系统 ascrs rotate", - "term", - "ASC Rotation System\nASC块使用的旋转系统,所有块所有形状只根据旋转方向(顺时针和逆时针)使用两个对称的表,踢墙范围大概是±2,±2", - }, - {"ASC+ RS", - "旋转系统 asc+rs ascplusrs rotate", - "term", - "Techmino中对ASC的修改版本,添加了180度转的踢墙表", - }, - {"BRS", - "旋转系统 brs rotate", - "term", - "BPS Rotation System\nBPS块使用的旋转系统", - }, - {"BiRS", - "旋转系统 birs rotate", - "term", - "Bias Rotation System\nTechmino原创旋转系统,基于XRS和SRS设计。\n当左/右/下(软降)被按下并且那个方向顶住了墙,按旋转后会先设定一个偏移(三个键朝各自方向加1格),在偏移的基础上试踢墙表里的位移(全都失败了会先取消向下的偏移再把踢墙重新试一遍,再都不行就取消左右,再不行就失败)。\nBiRS相比XRS只使用一个踢墙表更容易记忆,并且保留了SRS翻越地形的功能。\n\n细节补充:在测试踢墙时要满足两个条件,最终位移欧氏距离不能超过根号5,并且存在水平偏移时最终水平位移必须和它不反向。", - }, - {"C2RS", - "旋转系统 c2rs rotate", - "term", - "Cultris II Rotation System\nCultris II原创的旋转系统,所有旋转共用一个表,顺序是:\n左1→右1→下1→左下→右下→左2→右2\n注意,左优先于右", - }, - {"C2sym", - "旋转系统 c2sym rotate", - "term", - "Techmino中对C2RS的修改版本,根据不同的方块形状和状态,各自选择优先测试左还是右", - }, - {"DRS", - "旋转系统 drs rotate", - "term", - "DTET Rotation System", - }, - {"NRS", - "旋转系统 nrs rotate", - "term", - "Nintendo Rotation System", - }, - {"SRS", - "超级旋转系统 srs rotate", - "term", - "Super Rotation System\n现代方块最常用的旋转系统,也是不少自制旋转系统的设计模板。\n简单原理介绍:每个方块都有一个旋转中心,旋转后如果和场地有重合,会根据<从哪个方向转到哪个方向>进行一些偏移测试,可以让方块钻进入一些特定形状的洞。\n注:对于SRS,每个方块有四个方向,可以朝两边转(180度不算,设计的时候还没有,所以不能踢墙),所以总共8种,对应8个偏移表,具体数据去wiki上查,这里就不放了", - }, - {"SRS+", - "超级旋转系统 srs+ srsplus rotate", - "term", - "SRS的拓展版,添加了180度转的踢墙表", - }, - {"TRS", - "旋转系统 trs rotate", - "term", - "Techmino Rotation System\nTechmino原创旋转系统,基于SRS设计,修补了一些常见SZ卡死的地形,增加了不少实用踢墙。\n每个五连块也基本按照SRS的spin逻辑单独设计了踢墙表。\n更有神奇Ospin等你探索!", - }, - {"XRS", - "旋转系统 xrs rotate", - "term", - "X Rotation System\nT-ex原创旋转系统,引入了\"按住方向键换一套踢墙表\"的设定(在对应的方向需要顶住墙),让\"想去哪\"能被游戏捕获从而转到玩家希望到达的位置。\n\n其他旋转系统无论踢墙表怎么设计,块处在某个位置时旋转后最终只能按固定顺序测试,这导致不同的踢墙是竞争的,若存在两个可能想去的位置就只能二选一,XRS解决了这个问题。", - }, + --术语(旋转相关) + {"Spin", + "spin xuanzhuan zuandong", + "term", + "(部分游戏中)使用旋转将方块卡进不能直接移动进入的位置,具体判定规则不同游戏不一样,可能会有攻击加成。", + }, + {"Mini", + "迷你 mini", + "term", + "spin附加mini后攻击会弱化,用于平衡不同难易度的tspin攻击,判定在不同游戏都不一样,而且大多数很不好理解,建议只记住常见形状即可。", + }, + {"Allspin", + "allspin", + "term", + "一种规则,指所有方块的spin都有攻击力,而不止是Tspin才有攻击(Tspin only)。", + }, + {"Tspin", + "tspin txuan", + "term", + "在官方规则中,当T方块在锁定前的最后一个操作是旋转,并且锁定后旋转中心对应的四个斜角位置有三个不是空气,那么这就是一个Tspin。PS:如果满足一些额外条件会被打上mini标签减少攻击力。", + }, + {"TSS", + "tss t1 tspin", + "term", + "T-spin single\n指T方块spin消1行。", + }, + {"TSD", + "tsd t2 tspin", + "term", + "T-spin double\n指T方块spin消2行。", + }, + {"TST", + "tst t3 tspin", + "term", + "T-spin triple\n指T方块spin消3行。", + }, + {"MTSS", + "mtss tspin", + "term", + "mini T-spin single\n指T方块mini spin消1行(不同游戏判定不一样)。", + }, + {"MTSD", + "mtsd tspin", + "term", + "mini T-spin double\n指T方块mini spin消2行(仅部分游戏内存在且判定不一样)。", + }, + {"Ospin", + "ospin", + "term", + "由于O方块旋转后形状不变,只能左右移动,所以经常被卡住,于是方块圈就有了ospin的梗:\n有人做过T99/TF中的O变形的特效视频且广为流传;\nT-ex设计的旋转系统可以用spin使O传送进坑;\nTech设计的变形系统中可以旋转O来变形/传送进入一些特定形状的洞。", + }, + {"旋转系统(踢墙)", + "旋转系统 踢墙 xuanzhuanxitong wallkick tiqiang", + "term", + "(部分游戏中)方块旋转后可能和场地或者墙壁有碰撞,此时系统可能会给方块施加偏移,让方块不会因此被卡住而不能操作。这个偏移就是踢墙。\n建议阅读SRS词条", + }, + {"ARS", + "旋转系统 ars rotate", + "term", + "Arika Rotation System, TGM系列使用的旋转系统(3代中的C模式)\n\n或者\n\nAtari Rotation System, 一个左上对齐旋转系统", + }, + {"ASC RS", + "旋转系统 ascrs rotate", + "term", + "ASC Rotation System\nASC块使用的旋转系统,所有块所有形状只根据旋转方向(顺时针和逆时针)使用两个对称的表,踢墙范围大概是±2,±2", + }, + {"ASC+ RS", + "旋转系统 asc+rs ascplusrs rotate", + "term", + "Techmino中对ASC的修改版本,添加了180度转的踢墙表", + }, + {"BRS", + "旋转系统 brs rotate", + "term", + "BPS Rotation System\nBPS块使用的旋转系统", + }, + {"BiRS", + "旋转系统 birs rotate", + "term", + "Bias Rotation System\nTechmino原创旋转系统,基于XRS和SRS设计。\n当左/右/下(软降)被按下并且那个方向顶住了墙,按旋转后会先设定一个偏移(三个键朝各自方向加1格),在偏移的基础上试踢墙表里的位移(全都失败了会先取消向下的偏移再把踢墙重新试一遍,再都不行就取消左右,再不行就失败)。\nBiRS相比XRS只使用一个踢墙表更容易记忆,并且保留了SRS翻越地形的功能。\n\n细节补充:在测试踢墙时要满足两个条件,最终位移欧氏距离不能超过根号5,并且存在水平偏移时最终水平位移必须和它不反向。", + }, + {"C2RS", + "旋转系统 c2rs rotate", + "term", + "Cultris II Rotation System\nCultris II原创的旋转系统,所有旋转共用一个表,顺序是:\n左1→右1→下1→左下→右下→左2→右2\n注意,左优先于右", + }, + {"C2sym", + "旋转系统 c2sym rotate", + "term", + "Techmino中对C2RS的修改版本,根据不同的方块形状和状态,各自选择优先测试左还是右", + }, + {"DRS", + "旋转系统 drs rotate", + "term", + "DTET Rotation System", + }, + {"NRS", + "旋转系统 nrs rotate", + "term", + "Nintendo Rotation System", + }, + {"SRS", + "超级旋转系统 srs rotate", + "term", + "Super Rotation System\n现代方块最常用的旋转系统,也是不少自制旋转系统的设计模板。\n简单原理介绍:每个方块都有一个旋转中心,旋转后如果和场地有重合,会根据<从哪个方向转到哪个方向>进行一些偏移测试,可以让方块钻进入一些特定形状的洞。\n注:对于SRS,每个方块有四个方向,可以朝两边转(180度不算,设计的时候还没有,所以不能踢墙),所以总共8种,对应8个偏移表,具体数据去wiki上查,这里就不放了", + }, + {"SRS+", + "超级旋转系统 srs+ srsplus rotate", + "term", + "SRS的拓展版,添加了180度转的踢墙表", + }, + {"TRS", + "旋转系统 trs rotate", + "term", + "Techmino Rotation System\nTechmino原创旋转系统,基于SRS设计,修补了一些常见SZ卡死的地形,增加了不少实用踢墙。\n每个五连块也基本按照SRS的spin逻辑单独设计了踢墙表。\n更有神奇Ospin等你探索!", + }, + {"XRS", + "旋转系统 xrs rotate", + "term", + "X Rotation System\nT-ex原创旋转系统,引入了\"按住方向键换一套踢墙表\"的设定(在对应的方向需要顶住墙),让\"想去哪\"能被游戏捕获从而转到玩家希望到达的位置。\n\n其他旋转系统无论踢墙表怎么设计,块处在某个位置时旋转后最终只能按固定顺序测试,这导致不同的踢墙是竞争的,若存在两个可能想去的位置就只能二选一,XRS解决了这个问题。", + }, - --术语(其他) - {"B2B", - "大满贯 b2b btb backtoback", - "term", - "Back to Back\n连续打出两次特殊消行(spin和消四),中间不夹杂普通消行,可以提供额外的攻击(在tech中b2b为满贯,大满贯是b3b)", - }, - {"B2B2B", - "大满贯 b2b2b b3b", - "term", - "b2b的加强版,缩写b3b,大量b2b后连续b2b会变成b2b2b(b3b),提供更强的攻击(仅Tech中有)", - }, - {"Fin/Neo/Iso", - "特殊 fin neo iso", - "term", - "一种特殊T2的名字,不同的游戏内的攻击可能不一样,没有特殊价值,可以不详细了解。", - }, - {"现代方块", - "现代方块 modern xiandaikuai", - "term", - "现代方块是一个模糊的概念,这里列出一部分\"标准\"规则,满足大部分的都可以认为是现代方块:\n1.可见场地大小是10*20,不过上方空间也是存在的,上限可以自己定,一些游戏用的是40\n2.七种方块从顶部正中间出现(奇数宽方块偏左,高度可以是方块底部或顶部贴着场地顶),同一种方块的朝向(一般是平的面朝下)和颜色都一致\n3.一个合适的随机出块机制(常见的详见bag7词条和his词条)\n4.一个合适的的旋转系统(至少有双旋,详见双旋词条)(比如SRS,详见SRS词条)\n5.一个合适的锁定延迟系统,详见锁定延迟词条\n6.一个合适的死亡判定,详见死亡判定词条\n7.有Next系统(一般是3~6个),详见Next词条,并且方向和出现时候的方向一致\n8.有Hold系统,详见Hold词条\n9.如果有出块延迟和消行延迟,那么需要有提前xx系统,详见IRS和IHS词条,IMS是本游戏特有\n10.有DAS系统负责精密并且快速的左右移动,详见DAS词条", - }, - {"IRS", - "提前 irs initialrotatesystem", - "term", - "Initial Rotation System\n提前旋转系统,提前按下旋转后方块出现就是转好的形状,有时可以避免死亡。", - }, - {"IHS", - "提前 ihs initialholdsystem", - "term", - "Initial Hold System\n提前Hold系统,提前按下hold后直接出现hold里的方块,有时可以避免死亡。", - }, - {"IMS", - "提前 ims initialmovesystem", - "term", - "Initial Move System\n提前移动系统,提前按下移动后方块出现在移动好的位置,有时可以避免死亡。", - }, - {"Next", - "预览 下一个 next yulan xiayige", - "term", - "预览功能,指示后边几个块的顺序。\n提前思考手上这块怎么摆可以让后面轻松是玩家提升的必需技能。", - }, - {"Hold", - "暂存 交换 hold zancun", - "term", - "暂存功能,将手里的方块和hold槽中的交换,不能连续使用。\n用来调整块序,更容易摆出你想要的形状。\n本游戏中有一个“物理hold”机制,开启后hold换出的方块会直接出现在当前方块所在的位置", - }, - {"Misdrop", - "误 md misdrop", - "term", - "误放,就是不小心放错了地方", - }, - {"Mishold", - "误hold mh mishold", - "term", - "误hold,就是不小心按到hold导致死亡或失去pc机会等", - }, - {"sub", - "sub", - "term", - "在…之下\n用于表示成绩,单位一般可不写,比如40行成绩sub30是秒,1000行sub15是分钟,不写项目默认是40L\n\n例:39.95秒是sub40,40.5秒不是sub40\n请不要使用sub62之类的词,因为sub本身就是表示大约,一分钟左右的成绩精确到10就可以了,一般30秒以内的sub才会精确到1秒。", - }, - {"Donate", - "捐赠 捐献 donate juanzeng", - "term", - "捐赠\n指刻意临时盖住洞去做tspin等操作来实现不断b2b的一类技巧。", - }, - {"攻守", - "攻守 gong shou", - "term", - "通过消除给对手发送垃圾行=攻击\n别人打过来攻击之后用攻击抵消=防御(相杀)\n抵消/吃下所有攻击后打出攻击=反击\n\n注:大多游戏的攻防是1:1的,4行攻击抵消对手的4行攻击", - }, - {"连击", - "连击 ren combo", - "term", - "从第二次消除起叫1ren/combo,打出的攻击根据游戏设计的不同也不同", - }, - {"Spike", - "spike baofa xingbao", - "term", - "爆发攻击\n指短时间内打出大量的攻击,本游戏和TETR.IO中有spike计数器,可以看到自己短时间内打出了多少攻击。\n注意,网络卡顿导致的累计攻击瞬间释放不算spike。", - }, - {"Side", - "连击 ·side", - "term", - "在场地旁边空出n列的堆叠法\n用来制造连击,对于新人是一个不错的进攻方法。但由于起楼的时候可能会被顶死而且总效率不高,导致高端玩家不会单独做wide,更可能会在中局堆好炮并且观察到对手短时间内不会打出伤害的时候可以造,用来大幅加强瞬时火力。", - }, - {"S1W", - "s1w side2wide", - "term", - "Side 1 Wide\n旁边空1列,是传统方块游戏里常见的消四打法。\n在现代方块对战中新手可以使用,短时间能打出大量攻击,但在高手场出场率不高,因为效率低,容易被对面一波打死,故只在极少数情况合适的时候用。", - }, - {"S2W", - "连击 ·s2w side2wide", - "term", - "Side 2 Wide\n旁边空2列,是常见的连击打法。\n难度很低,现代块对战中新手可以使用,结合hold可以很轻松地打出大连击。高手场使用不多,因为准备时间太长,会被对面提前打进垃圾行,导致连击数减少,效率也没有特别高,故一套打完也不一定能杀人。", - }, - {"S3W", - "连击 ·s3w side2wide", - "term", - "Side 3 Wide\n旁边空3列,不如2w常见的连击打法。能打出的连击数比2w多,但是难度偏大很容易断连。", - }, - {"S4W", - "连击 ·s4w side4wide", - "term", - "Side 4 Wide\n旁边空4列,一种连击打法,能打出很高的连击,并且准备时间比别的wide打法短,故动作快的话可以抢在对手打进垃圾之前堆很高然后打出超大连击。\n(因为可能会被提前打死,风险挺大,所以没有c4w那么不平衡)", - }, - {"C1W", - "c1w center1wide", - "term", - "Center 1 Wide\n中间空1列,一种实战里消4同时辅助打TSD的打法,需要玩家理解<平衡法>,熟练之后可以轻松消四+T2输出,难度也不是特别大。", - }, - {"C2W", - "连击 ·c2w center2wide", - "term", - "Center 2 Wide\n中间空2列,一种连击打法", - }, - {"C3W", - "连击 ·c3w center3wide", - "term", - "Center 3 Wide\n中间空3列,一种连击打法", - }, - {"C4W", - "连击 ·c4w center4wide", - "term", - "Center 4 Wide\n中间空四列,一种连击打法,能打出很高的连击,利用了大多数专业对战方块游戏的死亡判定机制,可以放心堆高不担心被顶死,然后开始连击。是一种利用游戏机制的不平衡策略(尤其在开局时),观赏性不是很强还可以以弱胜强,成本太低所以成为了部分游戏中约定的类似 禁招 的东西,请在了解情况后再使用,不然可能会被别人骂。\n本游戏里考虑到了平衡问题,所以c4w的强度没有别的游戏那么夸张。", - }, - {"N-res", - "连击 ·residual c4w s4w", - "term", - "N-Residual\nN-剩余,指4w连击楼底部留几个方格,常用的是3-res和6-res。\n3-res路线少比较好学,成功率也很高,实战完全够用\n6-res路线多更难用,但是计算力很强的话比3res更稳,也可以用来完成特殊挑战(比如本游戏的c4w练习要求100连击通关)", - }, - {"6-3堆叠法", - "63", - "term", - "指左边6列右边3列的堆叠方式。在玩家有足够的计算能力后可以减少堆叠所用的按键数(反之可能甚至会增加),是主流的用于减少操作数的高端40L堆叠方式,原理跟出块位置是中间偏左有关。", - }, - {"Freestyle", - "freestyle ziyou", - "term", - "自由发挥的意思,常用于freestyle TSD(T2),指不用固定的堆叠方式而是随机应变完成20TSD。比用lst或者垃圾分类完成的20tsd的含金量高不少", - }, - {"20G", - "高重力 20g", - "term", - "现代方块的最高下落速度,表观就是方块瞬间到底,不存在中间的下落过程,会让方块无法跨越壕沟/从山谷爬出。", - }, - {"死亡判定", - "死亡判定 die death siwang", - "term", - "现代方块普遍使用的死亡判定:\n1.新出现的方块和场地方块有重叠(窒息)(c4w比s4w强的原因,因为被打进18行都不会窒息)\n2.方块锁定时完全在场地的外面\n3.所有东西的总高度超出40。\n\n注:本游戏使用的死亡判定不包含上述的第二条和第三条", - }, - {"下落速度", - "下落速度 drop speed", - "term", - "一般用?G表示方块的下落速度,意思是每一帧方块往下移动多少格子,一秒下落一格就是1/60G(默认60fps),故G是一个很大的单位,20G即为上限(因为场地就20格)。", - }, - {"锁定延迟", - "锁定延迟 lock delay suoyan", - "term", - "方块<碰到地面→锁定>之间的时间。经典块仅方块下落一格时刷新倒计时,而现代方块中往往任何操作都将重置该倒计时,所以连续移动和操作可以让方块不马上锁定,拖一会时间(重置次数有限,一般是15)。", - }, - {"Finesse", - "极简操作 最简操作 finesse jijiancaozuo zuijiancaozuo", - "term", - "极简操作\n用最少的按键数将方块移到想去的位置的技术,节约时间和减少misdrop。练习可用jstris的极简错误重开或者techmino中打开极简错误提示,多玩就可以。\n\n注意,本游戏使用的极简判定系统不是说完全和理论最少操作数一样,而是不需要软降就能达到的位置才会按照标准出块方向和你的按键次数执行极简检测,故在此不像js存在软降后误杀。但是多了一些新的条件,比如【手上和hold一样/已经按了超过3次按键后】再hold后按键次数不重置(让下一块极简失误)。\n极简率计算:\n没有超过标准极简法操作数的为Perfect计100%,超出一步为Great计50%,超出两步为Bad计25%,两步以上为Miss计0%,其中Bad和Miss会断连\n\n注:20G下极简系统和0G一样工作,所以得到的数值不准确,参考价值偏低", - }, - {"科研", - "科研 keyan", - "term", - "常用语,指在低重力的单人模式里减速研究怎么做各种Tspin,本游戏中拓展了含义,用于称呼几乎需要全程spin的游戏模式。", - }, - {"手感", - "手感 feel shougan", - "term", - "决定手感的几个主要因素:\n(1)输入延迟受设备配置或者设备状况影响。可以重启/换设备解决\n(2)程序运行稳定性程序设计(或者实现)得不好,时不时会卡一下。把设置画面效果拉低可能可以缓解\n(3)游戏设计故意的。自己适应\n(4)参数设置设置不当。去改设置\n(5)游玩姿势姿势不当。不便用力,换个姿势\n(6)换键位或者换设备后不适应,操作不习惯。多习惯习惯,改改设置\n(7)肌肉疲劳反应和协调能力下降。睡一觉或者做点体育运动,过段时间(也可能要几天)再来玩", - }, - {"DAS & ARR", - "灵敏度 das arr", - "term", - "DAS系统。\n\nDAS(Delay-auto-shift,自动加(延迟)具体指从<按下移动键时动了一格>到<开始自动移动>之间的时间\nARR(Auto-repeat-rate),自动重复速率,指<每次自动移动>之间的时间\n单位都是f(帧,1帧=1/60秒)\n别的游戏里用的单位可能是ms(毫秒),乘16.7就可得出对应数值,例如4f≈67ms\n\n对于不是刚入门的并且了解极简操作的玩家来说推荐arr=0,das=4~6(具体看个人手部协调性,只要能控制区别就不大)\n新人如果实在觉得太快可以适当增加一点das,arr要改的话强烈建议不要超过2\n\n最佳调整方法:das越小越好,小到依然能准确区分单点/长按为止;arr能0就0,游戏不允许的话就能拉多小拉多小", - }, - {"DAS通俗", - "das arr", - "term", - "打字时按住o,你会看到:ooooooooooo\n在时间轴上:o-----------o-o-o-o-o-o-o-o-o-o\n-----------就是das长度,-就是arr长度", - }, - {"DAS打断", - "dascut daduan", - "term", - "本游戏中指玩家的操作焦点转移到新方块的瞬间,此时减小(重置)das计时器,让自动移动不会立刻生效,减少“移动键松开晚了导致下一块一出来就立即开始移动”的情况\n注:其他游戏中的das打断机制可能和本游戏的有区别,仅供参考", - }, - {"误硬降打断", - "autolockcut mdcut daduan", - "term", - "为了防止玩家硬降时当前方块已经锁定,下一块出现就被立刻硬降导致严重md,所以设计了此打断参数。\n方块自然锁定之后几帧内硬降键是无效的,具体看设置了多久。\n注:其他游戏中的防误硬降机制可能和本游戏的有区别,仅供参考", - }, - {"SDF", - "软降速度 sdf softdropfactor", - "term", - "Soft Drop Factor,软降速度因子(倍率)\n部分游戏中的软降机制就是在按住软降键时方块受到的重力变为原来的若干倍,SDF就是这个变大的倍数。\n基本所有官块和tetr.io使用这个机制,但本游戏不使用。", - }, - {"bag7出块", - "bag出块 bag7bag", - "term", - "bag7\n一种现代方块的出块方式,开局起每7个块是7种形状各出现一次\n\n例如:\nZSJLTOI OTSLZIJ LTISZOJ", - }, - {"His出块", - "his出块 history", - "term", - "一种出块方式,例如his4 roll6 (h4r6) 就是在随机生成新的next的时候,随机一个跟最后4次生成的next中有一样的,就重新随机,直到已经尝试6次或和那4个都不一样。另有拓展算法his4 roll6 pool35等更复杂的算法,能让序列更稳定,更接近bag。\n本游戏的his序列模式中最大roll次数为序列长度的一半(向上取整)", - }, - {"Hypertap", - "超连点 hypertap", - "term", - "快速震动手指,实现比长按更快速+灵活的高速单点移动,主要在经典块的高难度下(因为das不可调而且特别慢,高速下很容易md导致失败,此时手动连点就比自动移动更快)或者受特殊情况限制不适合用自动移动时使用。会使用这个技术的人被称为Hypertapper", - }, - {"TOP攻击表", - "攻击表 top attack", - "term", - "消1/2/3/4打0/1/2/4\nTspin攻击为消行数*2,如果符合mini条件则/2\n连击攻击:001122334445+\nb2b攻击+1(如果是T3则+2)\npc攻击+6(该部分攻击aoe直接打出到所有对手,不抵消缓冲槽中的攻击)", - }, - {"Techmino攻击表", - "攻击表 tech attack", - "term", - "攻击系统:\n 普通消除:\n 消<4行打出[消行数-0.5]攻击\n 特殊消除:\n 如果是spin,打出[2*消行数]攻击,\n B2B攻击+[1/1/2/4/8(spin1~5)]\n B3B攻击在B2B基础上+消行数*0.5,+1额外抵挡\n mini减至25%\n 不是spin但是单次消>=4行,打出[消行数]攻击,\n B2B攻击+1\n B3B攻击+50%,+1额外抵挡\n 特殊消除会增加B2B点数,让之后的特殊消除获得B2B(B3B)增益(详细说明见下文)\n 半全消(<下方有剩余方块>的全消,如果是I消1行则必须不剩余玩家放置的方块):伤害+2,额外抵挡+2\n 全消:将上述伤害之和减半,再+8~20(本局内递增2),+2额外抵挡(注:本局消行数>4时会将B2B点数拉满)\n 连击:每次连击给予上述攻击[连击数*25%(如果只消一行就是15%)]的加成,12combo达到上限,连击>=3次时再额外加1攻击\n 根据上述规则计算后,向下取整,攻击打出", - }, - {"C2序列", - "c2序列 seq", - "term", - "七个块初始权重0\n全体除以2再加0~1的随机数,选数字最大的块出,然后将其权重除以3.5,循环",--Reversed by zxc - }, - {"C2踢墙", - "c2踢墙 kick", - "term", - "左,右,下,左下,右下,左2,右2\n(任何方块的任何旋转都使用这个表)", - }, - {"堆叠", - "堆叠 duidie stack", - "term", - "将方块无缝隙地堆起来,需要玩家有预读next的能力,可以通过不使用hold并且用十个消四完成40行模式进行练习。\n这项能力从入坑到封神都是非常重要的。", - }, - {"双旋", - "双旋 shuangxuan", - "term", - "指能够使用顺时针+逆时针两个旋转键的技术,原来要转三下的情况可以反向转一下就够,减少烦琐操作。\n同时双旋也是学习finesse的必要前提\n\n另见 三旋", - }, - {"三旋", - "三旋 sanxuan", - "term", - "指能够使用顺+逆时针+180度旋转三个旋转键的技术,任何方块放哪只需要旋转一次即可(spin不算)\n但由于只有部分游戏有180度旋转所以改操作并不通用,而且对速度提升的效果不如从单旋转双旋显著,不追求极限速度的玩家可不学", - }, - {"干旱", - "干旱 drought ganhan", - "term", - "指长时间不来i方块(长条),但在现代方块使用的bag7出块规则下干旱几乎不可能,平均7块就会有一个i,理论极限两个i最远中间隔12块", - }, - {"骨块", - "gukuai bone tgm", - "term", - "最早的方块游戏使用的方块样式。\n很久以前的电脑没有可以显示复杂图案的屏幕,只能往上打字,所以一格方块用两个方括号[ ]表示,长得像骨头所以叫骨块。\n基于骨块的特点,本游戏把骨块重新定义为,“所有形状使用的同一个比较花眼的贴图”,不同的皮肤有不同的骨块样式。", - }, - {"MPH模式", - "mph", - "term", - "一个游戏模式:\nMemoryless, Previewless, Holdless\n纯随机+无next+无hold,一个非常考验玩家反应速度的模式", - }, - {"输入延迟", - "输入延迟 input delay", - "term", - "用任何设备玩任何游戏时,所有的操作(按键盘,点鼠标等)都会晚一点点(很短,几毫秒到几十毫秒)才到达游戏,如果过长就会很影响游戏手感,作用效果类似于你拿qq远程控制打fps游戏\ntop、te等游戏比较明显\n这个延迟一般由硬件性能,硬件状态影响,通常来说不可设置,开启性能模式(或者关闭节能模式)可能会好一点", - }, - {"Cold Clear", - "cc coldclear", - "term", - "一个ai的名字(就跟alphaGo一样)\n本身是为ppt开发,故在本游戏中使用效果欠佳,版本也较旧", - }, - {"ZZZbot", - "zzzbot", - "term", - "一个ai的名字(就跟alphaGo一样)\n由研究群群友奏之章开发,重新调参后在各个游戏平台上的表现都很不错", - }, + --术语(其他) + {"B2B", + "大满贯 b2b btb backtoback", + "term", + "Back to Back\n连续打出两次特殊消行(spin和消四),中间不夹杂普通消行,可以提供额外的攻击(在tech中b2b为满贯,大满贯是b3b)", + }, + {"B2B2B", + "大满贯 b2b2b b3b", + "term", + "b2b的加强版,缩写b3b,大量b2b后连续b2b会变成b2b2b(b3b),提供更强的攻击(仅Tech中有)", + }, + {"Fin/Neo/Iso", + "特殊 fin neo iso", + "term", + "一种特殊T2的名字,不同的游戏内的攻击可能不一样,没有特殊价值,可以不详细了解。", + }, + {"现代方块", + "现代方块 modern xiandaikuai", + "term", + "现代方块是一个模糊的概念,这里列出一部分\"标准\"规则,满足大部分的都可以认为是现代方块:\n1.可见场地大小是10*20,不过上方空间也是存在的,上限可以自己定,一些游戏用的是40\n2.七种方块从顶部正中间出现(奇数宽方块偏左,高度可以是方块底部或顶部贴着场地顶),同一种方块的朝向(一般是平的面朝下)和颜色都一致\n3.一个合适的随机出块机制(常见的详见bag7词条和his词条)\n4.一个合适的的旋转系统(至少有双旋,详见双旋词条)(比如SRS,详见SRS词条)\n5.一个合适的锁定延迟系统,详见锁定延迟词条\n6.一个合适的死亡判定,详见死亡判定词条\n7.有Next系统(一般是3~6个),详见Next词条,并且方向和出现时候的方向一致\n8.有Hold系统,详见Hold词条\n9.如果有出块延迟和消行延迟,那么需要有提前xx系统,详见IRS和IHS词条,IMS是本游戏特有\n10.有DAS系统负责精密并且快速的左右移动,详见DAS词条", + }, + {"IRS", + "提前 irs initialrotatesystem", + "term", + "Initial Rotation System\n提前旋转系统,提前按下旋转后方块出现就是转好的形状,有时可以避免死亡。", + }, + {"IHS", + "提前 ihs initialholdsystem", + "term", + "Initial Hold System\n提前Hold系统,提前按下hold后直接出现hold里的方块,有时可以避免死亡。", + }, + {"IMS", + "提前 ims initialmovesystem", + "term", + "Initial Move System\n提前移动系统,提前按下移动后方块出现在移动好的位置,有时可以避免死亡。", + }, + {"Next", + "预览 下一个 next yulan xiayige", + "term", + "预览功能,指示后边几个块的顺序。\n提前思考手上这块怎么摆可以让后面轻松是玩家提升的必需技能。", + }, + {"Hold", + "暂存 交换 hold zancun", + "term", + "暂存功能,将手里的方块和hold槽中的交换,不能连续使用。\n用来调整块序,更容易摆出你想要的形状。\n本游戏中有一个“物理hold”机制,开启后hold换出的方块会直接出现在当前方块所在的位置", + }, + {"Misdrop", + "误 md misdrop", + "term", + "误放,就是不小心放错了地方", + }, + {"Mishold", + "误hold mh mishold", + "term", + "误hold,就是不小心按到hold导致死亡或失去pc机会等", + }, + {"sub", + "sub", + "term", + "在…之下\n用于表示成绩,单位一般可不写,比如40行成绩sub30是秒,1000行sub15是分钟,不写项目默认是40L\n\n例:39.95秒是sub40,40.5秒不是sub40\n请不要使用sub62之类的词,因为sub本身就是表示大约,一分钟左右的成绩精确到10就可以了,一般30秒以内的sub才会精确到1秒。", + }, + {"Donate", + "捐赠 捐献 donate juanzeng", + "term", + "捐赠\n指刻意临时盖住洞去做tspin等操作来实现不断b2b的一类技巧。", + }, + {"攻守", + "攻守 gong shou", + "term", + "通过消除给对手发送垃圾行=攻击\n别人打过来攻击之后用攻击抵消=防御(相杀)\n抵消/吃下所有攻击后打出攻击=反击\n\n注:大多游戏的攻防是1:1的,4行攻击抵消对手的4行攻击", + }, + {"连击", + "连击 ren combo", + "term", + "从第二次消除起叫1ren/combo,打出的攻击根据游戏设计的不同也不同", + }, + {"Spike", + "spike baofa xingbao", + "term", + "爆发攻击\n指短时间内打出大量的攻击,本游戏和TETR.IO中有spike计数器,可以看到自己短时间内打出了多少攻击。\n注意,网络卡顿导致的累计攻击瞬间释放不算spike。", + }, + {"Side", + "连击 ·side", + "term", + "在场地旁边空出n列的堆叠法\n用来制造连击,对于新人是一个不错的进攻方法。但由于起楼的时候可能会被顶死而且总效率不高,导致高端玩家不会单独做wide,更可能会在中局堆好炮并且观察到对手短时间内不会打出伤害的时候可以造,用来大幅加强瞬时火力。", + }, + {"S1W", + "s1w side2wide", + "term", + "Side 1 Wide\n旁边空1列,是传统方块游戏里常见的消四打法。\n在现代方块对战中新手可以使用,短时间能打出大量攻击,但在高手场出场率不高,因为效率低,容易被对面一波打死,故只在极少数情况合适的时候用。", + }, + {"S2W", + "连击 ·s2w side2wide", + "term", + "Side 2 Wide\n旁边空2列,是常见的连击打法。\n难度很低,现代块对战中新手可以使用,结合hold可以很轻松地打出大连击。高手场使用不多,因为准备时间太长,会被对面提前打进垃圾行,导致连击数减少,效率也没有特别高,故一套打完也不一定能杀人。", + }, + {"S3W", + "连击 ·s3w side2wide", + "term", + "Side 3 Wide\n旁边空3列,不如2w常见的连击打法。能打出的连击数比2w多,但是难度偏大很容易断连。", + }, + {"S4W", + "连击 ·s4w side4wide", + "term", + "Side 4 Wide\n旁边空4列,一种连击打法,能打出很高的连击,并且准备时间比别的wide打法短,故动作快的话可以抢在对手打进垃圾之前堆很高然后打出超大连击。\n(因为可能会被提前打死,风险挺大,所以没有c4w那么不平衡)", + }, + {"C1W", + "c1w center1wide", + "term", + "Center 1 Wide\n中间空1列,一种实战里消4同时辅助打TSD的打法,需要玩家理解<平衡法>,熟练之后可以轻松消四+T2输出,难度也不是特别大。", + }, + {"C2W", + "连击 ·c2w center2wide", + "term", + "Center 2 Wide\n中间空2列,一种连击打法", + }, + {"C3W", + "连击 ·c3w center3wide", + "term", + "Center 3 Wide\n中间空3列,一种连击打法", + }, + {"C4W", + "连击 ·c4w center4wide", + "term", + "Center 4 Wide\n中间空四列,一种连击打法,能打出很高的连击,利用了大多数专业对战方块游戏的死亡判定机制,可以放心堆高不担心被顶死,然后开始连击。是一种利用游戏机制的不平衡策略(尤其在开局时),观赏性不是很强还可以以弱胜强,成本太低所以成为了部分游戏中约定的类似 禁招 的东西,请在了解情况后再使用,不然可能会被别人骂。\n本游戏里考虑到了平衡问题,所以c4w的强度没有别的游戏那么夸张。", + }, + {"N-res", + "连击 ·residual c4w s4w", + "term", + "N-Residual\nN-剩余,指4w连击楼底部留几个方格,常用的是3-res和6-res。\n3-res路线少比较好学,成功率也很高,实战完全够用\n6-res路线多更难用,但是计算力很强的话比3res更稳,也可以用来完成特殊挑战(比如本游戏的c4w练习要求100连击通关)", + }, + {"6-3堆叠法", + "63", + "term", + "指左边6列右边3列的堆叠方式。在玩家有足够的计算能力后可以减少堆叠所用的按键数(反之可能甚至会增加),是主流的用于减少操作数的高端40L堆叠方式,原理跟出块位置是中间偏左有关。", + }, + {"Freestyle", + "freestyle ziyou", + "term", + "自由发挥的意思,常用于freestyle TSD(T2),指不用固定的堆叠方式而是随机应变完成20TSD。比用lst或者垃圾分类完成的20tsd的含金量高不少", + }, + {"20G", + "高重力 20g", + "term", + "现代方块的最高下落速度,表观就是方块瞬间到底,不存在中间的下落过程,会让方块无法跨越壕沟/从山谷爬出。", + }, + {"死亡判定", + "死亡判定 die death siwang", + "term", + "现代方块普遍使用的死亡判定:\n1.新出现的方块和场地方块有重叠(窒息)(c4w比s4w强的原因,因为被打进18行都不会窒息)\n2.方块锁定时完全在场地的外面\n3.所有东西的总高度超出40。\n\n注:本游戏使用的死亡判定不包含上述的第二条和第三条", + }, + {"下落速度", + "下落速度 drop speed", + "term", + "一般用?G表示方块的下落速度,意思是每一帧方块往下移动多少格子,一秒下落一格就是1/60G(默认60fps),故G是一个很大的单位,20G即为上限(因为场地就20格)。", + }, + {"锁定延迟", + "锁定延迟 lock delay suoyan", + "term", + "方块<碰到地面→锁定>之间的时间。经典块仅方块下落一格时刷新倒计时,而现代方块中往往任何操作都将重置该倒计时,所以连续移动和操作可以让方块不马上锁定,拖一会时间(重置次数有限,一般是15)。", + }, + {"Finesse", + "极简操作 最简操作 finesse jijiancaozuo zuijiancaozuo", + "term", + "极简操作\n用最少的按键数将方块移到想去的位置的技术,节约时间和减少misdrop。练习可用jstris的极简错误重开或者techmino中打开极简错误提示,多玩就可以。\n\n注意,本游戏使用的极简判定系统不是说完全和理论最少操作数一样,而是不需要软降就能达到的位置才会按照标准出块方向和你的按键次数执行极简检测,故在此不像js存在软降后误杀。但是多了一些新的条件,比如【手上和hold一样/已经按了超过3次按键后】再hold后按键次数不重置(让下一块极简失误)。\n极简率计算:\n没有超过标准极简法操作数的为Perfect计100%,超出一步为Great计50%,超出两步为Bad计25%,两步以上为Miss计0%,其中Bad和Miss会断连\n\n注:20G下极简系统和0G一样工作,所以得到的数值不准确,参考价值偏低", + }, + {"科研", + "科研 keyan", + "term", + "常用语,指在低重力的单人模式里减速研究怎么做各种Tspin,本游戏中拓展了含义,用于称呼几乎需要全程spin的游戏模式。", + }, + {"手感", + "手感 feel shougan", + "term", + "决定手感的几个主要因素:\n(1)输入延迟受设备配置或者设备状况影响。可以重启/换设备解决\n(2)程序运行稳定性程序设计(或者实现)得不好,时不时会卡一下。把设置画面效果拉低可能可以缓解\n(3)游戏设计故意的。自己适应\n(4)参数设置设置不当。去改设置\n(5)游玩姿势姿势不当。不便用力,换个姿势\n(6)换键位或者换设备后不适应,操作不习惯。多习惯习惯,改改设置\n(7)肌肉疲劳反应和协调能力下降。睡一觉或者做点体育运动,过段时间(也可能要几天)再来玩", + }, + {"DAS & ARR", + "灵敏度 das arr", + "term", + "DAS系统。\n\nDAS(Delay-auto-shift,自动加(延迟)具体指从<按下移动键时动了一格>到<开始自动移动>之间的时间\nARR(Auto-repeat-rate),自动重复速率,指<每次自动移动>之间的时间\n单位都是f(帧,1帧=1/60秒)\n别的游戏里用的单位可能是ms(毫秒),乘16.7就可得出对应数值,例如4f≈67ms\n\n对于不是刚入门的并且了解极简操作的玩家来说推荐arr=0,das=4~6(具体看个人手部协调性,只要能控制区别就不大)\n新人如果实在觉得太快可以适当增加一点das,arr要改的话强烈建议不要超过2\n\n最佳调整方法:das越小越好,小到依然能准确区分单点/长按为止;arr能0就0,游戏不允许的话就能拉多小拉多小", + }, + {"DAS通俗", + "das arr", + "term", + "打字时按住o,你会看到:ooooooooooo\n在时间轴上:o-----------o-o-o-o-o-o-o-o-o-o\n-----------就是das长度,-就是arr长度", + }, + {"DAS打断", + "dascut daduan", + "term", + "本游戏中指玩家的操作焦点转移到新方块的瞬间,此时减小(重置)das计时器,让自动移动不会立刻生效,减少“移动键松开晚了导致下一块一出来就立即开始移动”的情况\n注:其他游戏中的das打断机制可能和本游戏的有区别,仅供参考", + }, + {"误硬降打断", + "autolockcut mdcut daduan", + "term", + "为了防止玩家硬降时当前方块已经锁定,下一块出现就被立刻硬降导致严重md,所以设计了此打断参数。\n方块自然锁定之后几帧内硬降键是无效的,具体看设置了多久。\n注:其他游戏中的防误硬降机制可能和本游戏的有区别,仅供参考", + }, + {"SDF", + "软降速度 sdf softdropfactor", + "term", + "Soft Drop Factor,软降速度因子(倍率)\n部分游戏中的软降机制就是在按住软降键时方块受到的重力变为原来的若干倍,SDF就是这个变大的倍数。\n基本所有官块和tetr.io使用这个机制,但本游戏不使用。", + }, + {"bag7出块", + "bag出块 bag7bag", + "term", + "bag7\n一种现代方块的出块方式,开局起每7个块是7种形状各出现一次\n\n例如:\nZSJLTOI OTSLZIJ LTISZOJ", + }, + {"His出块", + "his出块 history", + "term", + "一种出块方式,例如his4 roll6 (h4r6) 就是在随机生成新的next的时候,随机一个跟最后4次生成的next中有一样的,就重新随机,直到已经尝试6次或和那4个都不一样。另有拓展算法his4 roll6 pool35等更复杂的算法,能让序列更稳定,更接近bag。\n本游戏的his序列模式中最大roll次数为序列长度的一半(向上取整)", + }, + {"Hypertap", + "超连点 hypertap", + "term", + "快速震动手指,实现比长按更快速+灵活的高速单点移动,主要在经典块的高难度下(因为das不可调而且特别慢,高速下很容易md导致失败,此时手动连点就比自动移动更快)或者受特殊情况限制不适合用自动移动时使用。会使用这个技术的人被称为Hypertapper", + }, + {"TOP攻击表", + "攻击表 top attack", + "term", + "消1/2/3/4打0/1/2/4\nTspin攻击为消行数*2,如果符合mini条件则/2\n连击攻击:001122334445+\nb2b攻击+1(如果是T3则+2)\npc攻击+6(该部分攻击aoe直接打出到所有对手,不抵消缓冲槽中的攻击)", + }, + {"Techmino攻击表", + "攻击表 tech attack", + "term", + "攻击系统:\n 普通消除:\n 消<4行打出[消行数-0.5]攻击\n 特殊消除:\n 如果是spin,打出[2*消行数]攻击,\n B2B攻击+[1/1/2/4/8(spin1~5)]\n B3B攻击在B2B基础上+消行数*0.5,+1额外抵挡\n mini减至25%\n 不是spin但是单次消>=4行,打出[消行数]攻击,\n B2B攻击+1\n B3B攻击+50%,+1额外抵挡\n 特殊消除会增加B2B点数,让之后的特殊消除获得B2B(B3B)增益(详细说明见下文)\n 半全消(<下方有剩余方块>的全消,如果是I消1行则必须不剩余玩家放置的方块):伤害+2,额外抵挡+2\n 全消:将上述伤害之和减半,再+8~20(本局内递增2),+2额外抵挡(注:本局消行数>4时会将B2B点数拉满)\n 连击:每次连击给予上述攻击[连击数*25%(如果只消一行就是15%)]的加成,12combo达到上限,连击>=3次时再额外加1攻击\n 根据上述规则计算后,向下取整,攻击打出", + }, + {"C2序列", + "c2序列 seq", + "term", + "七个块初始权重0\n全体除以2再加0~1的随机数,选数字最大的块出,然后将其权重除以3.5,循环",--Reversed by zxc + }, + {"C2踢墙", + "c2踢墙 kick", + "term", + "左,右,下,左下,右下,左2,右2\n(任何方块的任何旋转都使用这个表)", + }, + {"堆叠", + "堆叠 duidie stack", + "term", + "将方块无缝隙地堆起来,需要玩家有预读next的能力,可以通过不使用hold并且用十个消四完成40行模式进行练习。\n这项能力从入坑到封神都是非常重要的。", + }, + {"双旋", + "双旋 shuangxuan", + "term", + "指能够使用顺时针+逆时针两个旋转键的技术,原来要转三下的情况可以反向转一下就够,减少烦琐操作。\n同时双旋也是学习finesse的必要前提\n\n另见 三旋", + }, + {"三旋", + "三旋 sanxuan", + "term", + "指能够使用顺+逆时针+180度旋转三个旋转键的技术,任何方块放哪只需要旋转一次即可(spin不算)\n但由于只有部分游戏有180度旋转所以改操作并不通用,而且对速度提升的效果不如从单旋转双旋显著,不追求极限速度的玩家可不学", + }, + {"干旱", + "干旱 drought ganhan", + "term", + "指长时间不来i方块(长条),但在现代方块使用的bag7出块规则下干旱几乎不可能,平均7块就会有一个i,理论极限两个i最远中间隔12块", + }, + {"骨块", + "gukuai bone tgm", + "term", + "最早的方块游戏使用的方块样式。\n很久以前的电脑没有可以显示复杂图案的屏幕,只能往上打字,所以一格方块用两个方括号[ ]表示,长得像骨头所以叫骨块。\n基于骨块的特点,本游戏把骨块重新定义为,“所有形状使用的同一个比较花眼的贴图”,不同的皮肤有不同的骨块样式。", + }, + {"MPH模式", + "mph", + "term", + "一个游戏模式:\nMemoryless, Previewless, Holdless\n纯随机+无next+无hold,一个非常考验玩家反应速度的模式", + }, + {"输入延迟", + "输入延迟 input delay", + "term", + "用任何设备玩任何游戏时,所有的操作(按键盘,点鼠标等)都会晚一点点(很短,几毫秒到几十毫秒)才到达游戏,如果过长就会很影响游戏手感,作用效果类似于你拿qq远程控制打fps游戏\ntop、te等游戏比较明显\n这个延迟一般由硬件性能,硬件状态影响,通常来说不可设置,开启性能模式(或者关闭节能模式)可能会好一点", + }, + {"Cold Clear", + "cc coldclear", + "term", + "一个ai的名字(就跟alphaGo一样)\n本身是为ppt开发,故在本游戏中使用效果欠佳,版本也较旧", + }, + {"ZZZbot", + "zzzbot", + "term", + "一个ai的名字(就跟alphaGo一样)\n由研究群群友奏之章开发,重新调参后在各个游戏平台上的表现都很不错", + }, - --定式 - {"开局定式", - "开局定式 setup opening kaijudingshi", - "setup", - "开局定式,定式一般指开局定式这个概念。\n指开局后可以使用的套路摆法。局中情况合适的时候也可以摆出同样的形状,但是和摆法开局一般都不一样。\n\n能称为定式的摆法要尽量满足以下至少2~3条:\n能适应大多数块序\n输出高,尽量不浪费T块\n很多方块无需软降,极简操作数少\n有明确后续,分支尽量少。\n\n注:绝大多数定式基于bag7,序列规律性强才有发明定式的可能。", - }, - {"DT炮", - "dt炮", - "setup", - "Double-Triple Cannon"..HDwiki, - HDsearch.."dt", - }, - {"DTPC", - "dtpc", - "setup", - "DT炮一个能接PC的分支"..HDwiki, - HDsearch.."dt", - }, - {"BT炮", - "bt炮", - "setup", - "β炮(Beta炮)"..HDwiki, - HDsearch.."bt_cannon", - }, - {"BTPC", - "btpc", - "setup", - "BT炮一个能接PC的分支"..HDwiki, - HDsearch.."bt_cannon", - }, - {"DDPC", - "ddpc", - "setup", - "开局TSD的一个能接Double-Double-PC的分支"..HDwiki, - HDsearch.."TKI_3_Perfect_Clear", - }, - {"QT炮", - "qt炮", - "setup", - "QT炮,细节未知", - }, - {"MT", - "mt", - "setup", - "Mini-Triple\n一个TSM+TST的结构", - HDsearch.."mt", - }, - {"狼月炮", - "狼月炮 wolfmoon", - "setup", - "狼月炮"..HDwiki, - HDsearch.."wolfmoon_cannon", - }, - {"ASC", - "asc", - "setup", - "ASC开局,细节未知", - }, - {"Sewer", - "sewer", - "setup", - "Sewer开局"..HDwiki, - HDsearch.."sewer", - }, - {"TKI", - "tki", - "setup", - "TKI开局\n有两种解释,一个是TSD开局,另一个是Cspin开局。"..HDwiki, - HDsearch.."tki", - }, - {"God Spin", - "god", - "setup", - "God Spin\nwindkey发明的一个观赏性很强但实战没啥用的炫酷特殊T2+T3开局定式。"..HDwiki, - HDsearch.."godspin", - }, - {"信天翁", - "信天翁 xintianweng", - "setup", - "一种高观赏性几乎不浪费T的快节奏强力T2-T3-T2-PC开局", - }, - {"鹈鹕", - "鹈鹕 tihu", - "setup", - "一种类似信天翁的定式,在块序不能信天翁的时候可以用", - }, - {"七巧板", - "七巧板 qiqiaoban", - "setup", - "一种极大概率能摆出来并且很大概率能做到PC的定式,本游戏中的pc练习中空出不规则区域的那个就是七巧板", - }, + --定式 + {"开局定式", + "开局定式 setup opening kaijudingshi", + "setup", + "开局定式,定式一般指开局定式这个概念。\n指开局后可以使用的套路摆法。局中情况合适的时候也可以摆出同样的形状,但是和摆法开局一般都不一样。\n\n能称为定式的摆法要尽量满足以下至少2~3条:\n能适应大多数块序\n输出高,尽量不浪费T块\n很多方块无需软降,极简操作数少\n有明确后续,分支尽量少。\n\n注:绝大多数定式基于bag7,序列规律性强才有发明定式的可能。", + }, + {"DT炮", + "dt炮", + "setup", + "Double-Triple Cannon"..HDwiki, + HDsearch.."dt", + }, + {"DTPC", + "dtpc", + "setup", + "DT炮一个能接PC的分支"..HDwiki, + HDsearch.."dt", + }, + {"BT炮", + "bt炮", + "setup", + "β炮(Beta炮)"..HDwiki, + HDsearch.."bt_cannon", + }, + {"BTPC", + "btpc", + "setup", + "BT炮一个能接PC的分支"..HDwiki, + HDsearch.."bt_cannon", + }, + {"DDPC", + "ddpc", + "setup", + "开局TSD的一个能接Double-Double-PC的分支"..HDwiki, + HDsearch.."TKI_3_Perfect_Clear", + }, + {"QT炮", + "qt炮", + "setup", + "QT炮,细节未知", + }, + {"MT", + "mt", + "setup", + "Mini-Triple\n一个TSM+TST的结构", + HDsearch.."mt", + }, + {"狼月炮", + "狼月炮 wolfmoon", + "setup", + "狼月炮"..HDwiki, + HDsearch.."wolfmoon_cannon", + }, + {"ASC", + "asc", + "setup", + "ASC开局,细节未知", + }, + {"Sewer", + "sewer", + "setup", + "Sewer开局"..HDwiki, + HDsearch.."sewer", + }, + {"TKI", + "tki", + "setup", + "TKI开局\n有两种解释,一个是TSD开局,另一个是Cspin开局。"..HDwiki, + HDsearch.."tki", + }, + {"God Spin", + "god", + "setup", + "God Spin\nwindkey发明的一个观赏性很强但实战没啥用的炫酷特殊T2+T3开局定式。"..HDwiki, + HDsearch.."godspin", + }, + {"信天翁", + "信天翁 xintianweng", + "setup", + "一种高观赏性几乎不浪费T的快节奏强力T2-T3-T2-PC开局", + }, + {"鹈鹕", + "鹈鹕 tihu", + "setup", + "一种类似信天翁的定式,在块序不能信天翁的时候可以用", + }, + {"七巧板", + "七巧板 qiqiaoban", + "setup", + "一种极大概率能摆出来并且很大概率能做到PC的定式,本游戏中的pc练习中空出不规则区域的那个就是七巧板", + }, - --形状 - {"中局定式", - "中局定式 setup dingshi", - "pattern", - "指一些特定的能打出较高伤害的常见典型形状,是中局输出的途径之一,部分也可以在开局做不过不是很有必要,主要见于中局\n另见开局定式,只说定式两个字一般指开局定式而非中局。", - }, - {"Cspin", - "cspin", - "pattern", - "JL脚对脚立起来形成一个C形,缺口做适当的填充后可以打T3+T2"..HDwiki, - HDsearch.."c-spin", - }, - {"STSD", - "stsd", - "pattern", - "Super T-spin Double\n一种能做两个T2的形状"..HDwiki, - HDsearch.."stsd", - }, - {"STMB", - "stmb", - "pattern", - "STMB cave\n在高空3宽坑架SZ捐一个T2的形状"..HDwiki, - HDsearch.."stmb_cave", - }, - {"LST堆叠", - "lst", - "pattern", - "一种不断b2b一直做T2的堆叠方法"..HDwiki, - HDsearch.."st_stacking", - }, - {"汉堡包", - "汉堡包 hamburger hanbaobao", - "pattern", - "一种边缘捐T不影响消四的堆叠法"..HDwiki, - HDsearch.."hamburger", - }, - {"皇家十字", - "皇家十字 imperial cross huangjiashizi", - "pattern", - "在一个十字形洞口盖屋檐后可以做两个T2的形状"..HDwiki, - HDsearch.."imperial_cross", - }, - {"雨宫炮", - "雨宫炮 yugong", - "pattern", - "一种捐T2后可消四的形状,常见于DT的一个分支", - }, - {"千鸟格子", - "千鸟格子 qianniaoge", - "pattern", - "一种在小洞上捐一个T2后还能做一个T2的形状", - }, - {"六巧板", - "六巧板 liuqiaoban", - "pattern", - "一种常用于增加中局PC概率的形状,本游戏中的pc练习中空出4*4方形区域就是六巧板", - }, - {"绯红之王", - "绯红之王 feihongzhiwang", - "pattern", - "在STSD上叠若干个T3的形状", - }, + --形状 + {"中局定式", + "中局定式 setup dingshi", + "pattern", + "指一些特定的能打出较高伤害的常见典型形状,是中局输出的途径之一,部分也可以在开局做不过不是很有必要,主要见于中局\n另见开局定式,只说定式两个字一般指开局定式而非中局。", + }, + {"Cspin", + "cspin", + "pattern", + "JL脚对脚立起来形成一个C形,缺口做适当的填充后可以打T3+T2"..HDwiki, + HDsearch.."c-spin", + }, + {"STSD", + "stsd", + "pattern", + "Super T-spin Double\n一种能做两个T2的形状"..HDwiki, + HDsearch.."stsd", + }, + {"STMB", + "stmb", + "pattern", + "STMB cave\n在高空3宽坑架SZ捐一个T2的形状"..HDwiki, + HDsearch.."stmb_cave", + }, + {"LST堆叠", + "lst", + "pattern", + "一种不断b2b一直做T2的堆叠方法"..HDwiki, + HDsearch.."st_stacking", + }, + {"汉堡包", + "汉堡包 hamburger hanbaobao", + "pattern", + "一种边缘捐T不影响消四的堆叠法"..HDwiki, + HDsearch.."hamburger", + }, + {"皇家十字", + "皇家十字 imperial cross huangjiashizi", + "pattern", + "在一个十字形洞口盖屋檐后可以做两个T2的形状"..HDwiki, + HDsearch.."imperial_cross", + }, + {"雨宫炮", + "雨宫炮 yugong", + "pattern", + "一种捐T2后可消四的形状,常见于DT的一个分支", + }, + {"千鸟格子", + "千鸟格子 qianniaoge", + "pattern", + "一种在小洞上捐一个T2后还能做一个T2的形状", + }, + {"六巧板", + "六巧板 liuqiaoban", + "pattern", + "一种常用于增加中局PC概率的形状,本游戏中的pc练习中空出4*4方形区域就是六巧板", + }, + {"绯红之王", + "绯红之王 feihongzhiwang", + "pattern", + "在STSD上叠若干个T3的形状", + }, - --其他 - {"研究群", - "研究群 yanjiu study", - "other", - "俄罗斯方块·[研究]群号112897780,“中国俄罗斯方块总群”", - }, - {"茶服", - "茶服 chafu study", - "other", - "TO-S的添加方法、说明等关于茶服的一切", - "http://teatube.ltd/tos", - }, - {"Github仓库", - "源代码 github sourcecode yuandaima", - "other", - "Techmino的github仓库地址,欢迎star", - "https://github.com/26F-Studio/Techmino", - }, + --其他 + {"研究群", + "研究群 yanjiu study", + "other", + "俄罗斯方块·[研究]群号112897780,“中国俄罗斯方块总群”", + }, + {"茶服", + "茶服 chafu study", + "other", + "TO-S的添加方法、说明等关于茶服的一切", + "http://teatube.ltd/tos", + }, + {"Github仓库", + "源代码 github sourcecode yuandaima", + "other", + "Techmino的github仓库地址,欢迎star", + "https://github.com/26F-Studio/Techmino", + }, - --存档管理 - {"控制台", - "console cmd commamd minglinghang kongzhitai", - "command", - "目前进入控制台的方式是在主菜单 点特定位置/按键盘某个键 数次", - }, - {"重置设置", - "reset setting chongzhi qingkong shezhi", - "command", - "前往控制台输入\"rm conf/setting\"并回车\n需要重启游戏生效,若反悔,进入设置菜单再退出即可恢复文件", - }, - {"重置统计数据", - "reset statistic data chongzhi tongji shuju", - "command", - "前往控制台输入\"rm conf/data\"并回车\n需要重启游戏生效,若反悔,玩一局并触发结算即可恢复文件", - }, - {"重置解锁状态", - "reset unlock chongzhi qingkong jiesuo", - "command", - "前往控制台输入\"rm conf/unlock\"并回车\n需要重启游戏生效,若反悔,刷新任意一个模式在地图上的状态即可恢复文件", - }, - {"重置本地排行榜", - "reset chongzhi paihangbang", - "command", - "前往控制台输入\"rm -s record\"并回车\n需要重启游戏生效,若反悔,玩一局并更新模式排行榜即可恢复对应模式的单个排行榜文件", - }, - {"删除键位", - "reset virtualkey", - "command", - "前往控制台输入\"rm conf/键位文件\"并回车\n键盘是key,虚拟按键是virtualkey,虚拟按键预设是vkSave1(2)\n前两者重启生效,若反悔,进入对应的设置菜单再返回即可恢复文件", - }, - {"删除录像", - "reset replay luxiang", - "command", - "前往控制台输入\"rm -s replay\"并回车\n立即生效", - }, - {"删除缓存", - "reset cache huancun touxiang", - "command", - "前往控制台输入\"rm -s cache\"并回车\n立即生效", - }, + --存档管理 + {"控制台", + "console cmd commamd minglinghang kongzhitai", + "command", + "目前进入控制台的方式是在主菜单 点特定位置/按键盘某个键 数次", + }, + {"重置设置", + "reset setting chongzhi qingkong shezhi", + "command", + "前往控制台输入\"rm conf/setting\"并回车\n需要重启游戏生效,若反悔,进入设置菜单再退出即可恢复文件", + }, + {"重置统计数据", + "reset statistic data chongzhi tongji shuju", + "command", + "前往控制台输入\"rm conf/data\"并回车\n需要重启游戏生效,若反悔,玩一局并触发结算即可恢复文件", + }, + {"重置解锁状态", + "reset unlock chongzhi qingkong jiesuo", + "command", + "前往控制台输入\"rm conf/unlock\"并回车\n需要重启游戏生效,若反悔,刷新任意一个模式在地图上的状态即可恢复文件", + }, + {"重置本地排行榜", + "reset chongzhi paihangbang", + "command", + "前往控制台输入\"rm -s record\"并回车\n需要重启游戏生效,若反悔,玩一局并更新模式排行榜即可恢复对应模式的单个排行榜文件", + }, + {"删除键位", + "reset virtualkey", + "command", + "前往控制台输入\"rm conf/键位文件\"并回车\n键盘是key,虚拟按键是virtualkey,虚拟按键预设是vkSave1(2)\n前两者重启生效,若反悔,进入对应的设置菜单再返回即可恢复文件", + }, + {"删除录像", + "reset replay luxiang", + "command", + "前往控制台输入\"rm -s replay\"并回车\n立即生效", + }, + {"删除缓存", + "reset cache huancun touxiang", + "command", + "前往控制台输入\"rm -s cache\"并回车\n立即生效", + }, - --英文 - {"SFX", - "sfx", - "english", - "Sound Effects\n音效", - }, - {"BGM", - "bgm", - "english", - "Background Music\n背景音乐", - }, - {"TAS", - "tas", - "english", - "Tool-Assisted Speedrun(Supergaming)\n使用特殊工具在不破坏游戏规则(允许超越人类操作,只是在程序层面不作弊)进行的游戏\n一般用于冲击理论值或者达成各种有趣的目标用来观赏\n本游戏中内置了非常简单的TAS工具", - }, - {"AFK", - "afk", - "english", - "Away from keyboard\n一段时间不接触键盘,就是不玩一段时间,可以缓解手部疲劳,休息好之后马上破纪录也是可能的", - }, + --英文 + {"SFX", + "sfx", + "english", + "Sound Effects\n音效", + }, + {"BGM", + "bgm", + "english", + "Background Music\n背景音乐", + }, + {"TAS", + "tas", + "english", + "Tool-Assisted Speedrun(Supergaming)\n使用特殊工具在不破坏游戏规则(允许超越人类操作,只是在程序层面不作弊)进行的游戏\n一般用于冲击理论值或者达成各种有趣的目标用来观赏\n本游戏中内置了非常简单的TAS工具", + }, + {"AFK", + "afk", + "english", + "Away from keyboard\n一段时间不接触键盘,就是不玩一段时间,可以缓解手部疲劳,休息好之后马上破纪录也是可能的", + }, - --人物 - {"吉备宏纯", - "吉备宏纯 hebomai hbm jibei", - "name", - "一流玩家(在最强大脑上以3:0击败模电)", - }, - {"雨宫太阳", - "雨宫太阳 amemiya taiyou yugong", - "name", - "一流玩家,曾获得PPT的swap模式冠军", - }, - {"Ajanba", - "ajanba ajb", - "name", - "一流玩家,得过jscup冠军", - }, - {"Blink", - "blink", - "name", - "一流玩家,很强", - }, - {"Doremy", - "哆来咪 doremy 123", - "name", - "一流玩家,雨宫说他是世界第二", - }, - {"Dr.Ocelot", - "drocelot", - "name", - "国外方块游戏开发者,独自开发了Tetra Legends\n\n和Mine一起开发了Tetra Online,质量欠佳的半成品上架Steam后受到大量圈内人士批评(但都虚心采纳并修改)。", - }, - {"Firestorm", - "firestorm fst", - "name", - "一流玩家,得过jscup冠军", - }, - {"Furea", - "furea fuleiya jk", - "name", - "一流玩家,ppt的40L和ultra的WR保持者", - }, - {"Iljain", - "iljain yijianlian", - "name", - "一流玩家,得过C2 rank1", - }, - {"Jonas", - "jonas", - "name", - "经典块一流玩家,曾经的经典块第一,CTWC4连冠\n\n(1981-2021)", - }, - {"Joseph", - "joseph", - "name", - "经典块一流玩家,CTWC连冠,多项任天堂方块记录保持者", - }, - {"Kazu", - "kazu mdking", - "name", - "一流玩家,以熟练md转捐赠闻名(雾)", - }, - {"Microblizz", - "microblizz", - "name", - "一流玩家,曾经的世界40L WR", - }, - {"Vince", - "vincehd", - "name", - "一流玩家,上任世界最速保持者(无延迟方块)", - }, - {"Wumbo", - "wumbo wangbo", - "name", - "一流玩家,有名的爱在对战用开局c4w的世界级玩家(别的能力也很强,只是喜欢开局c4w而已,所以名声不太好)\n因为名字读音酷似王勃就得了个王勃的外号", - }, - {"Yakine", - "yakine heshui", - "name", - "一流玩家,有名的花式Tspin选手,实战压力不大的时候常常做出一些很神仙的高空捐赠,jstris的20TSD速度榜全球第三名并且没有使用定式(前两名都用了LST),故群友戏称yakine捐T如喝水", - }, + --人物 + {"吉备宏纯", + "吉备宏纯 hebomai hbm jibei", + "name", + "一流玩家(在最强大脑上以3:0击败模电)", + }, + {"雨宫太阳", + "雨宫太阳 amemiya taiyou yugong", + "name", + "一流玩家,曾获得PPT的swap模式冠军", + }, + {"Ajanba", + "ajanba ajb", + "name", + "一流玩家,得过jscup冠军", + }, + {"Blink", + "blink", + "name", + "一流玩家,很强", + }, + {"Doremy", + "哆来咪 doremy 123", + "name", + "一流玩家,雨宫说他是世界第二", + }, + {"Dr.Ocelot", + "drocelot", + "name", + "国外方块游戏开发者,独自开发了Tetra Legends\n\n和Mine一起开发了Tetra Online,质量欠佳的半成品上架Steam后受到大量圈内人士批评(但都虚心采纳并修改)。", + }, + {"Firestorm", + "firestorm fst", + "name", + "一流玩家,得过jscup冠军", + }, + {"Furea", + "furea fuleiya jk", + "name", + "一流玩家,ppt的40L和ultra的WR保持者", + }, + {"Iljain", + "iljain yijianlian", + "name", + "一流玩家,得过C2 rank1", + }, + {"Jonas", + "jonas", + "name", + "经典块一流玩家,曾经的经典块第一,CTWC4连冠\n\n(1981-2021)", + }, + {"Joseph", + "joseph", + "name", + "经典块一流玩家,CTWC连冠,多项任天堂方块记录保持者", + }, + {"Kazu", + "kazu mdking", + "name", + "一流玩家,以熟练md转捐赠闻名(雾)", + }, + {"Microblizz", + "microblizz", + "name", + "一流玩家,曾经的世界40L WR", + }, + {"Vince", + "vincehd", + "name", + "一流玩家,上任世界最速保持者(无延迟方块)", + }, + {"Wumbo", + "wumbo wangbo", + "name", + "一流玩家,有名的爱在对战用开局c4w的世界级玩家(别的能力也很强,只是喜欢开局c4w而已,所以名声不太好)\n因为名字读音酷似王勃就得了个王勃的外号", + }, + {"Yakine", + "yakine heshui", + "name", + "一流玩家,有名的花式Tspin选手,实战压力不大的时候常常做出一些很神仙的高空捐赠,jstris的20TSD速度榜全球第三名并且没有使用定式(前两名都用了LST),故群友戏称yakine捐T如喝水", + }, - {"小Z", - "小Z xiaoz zictionary tetrodictionary littlez", - "name", - "这个词典的名字!曾经是群里的答疑机器人,此词典数据库开始也是沿用的机器人问答库~", - }, - {"MrZ", - "mrz zjiang ddd 026 t626", - "name", - "【研究群】「T026」\n40行25.95秒, MPH40行57秒排世界第8(jstris),tetr.io段位X,TGM3(W)shirase金1300通关\n这个游戏的作者!", - "https://space.bilibili.com/225238922", - }, + {"小Z", + "小Z xiaoz zictionary tetrodictionary littlez", + "name", + "这个词典的名字!曾经是群里的答疑机器人,此词典数据库开始也是沿用的机器人问答库~", + }, + {"MrZ", + "mrz zjiang ddd 026 t626", + "name", + "【研究群】「T026」\n40行25.95秒, MPH40行57秒排世界第8(jstris),tetr.io段位X,TGM3(W)shirase金1300通关\n这个游戏的作者!", + "https://space.bilibili.com/225238922", + }, - {"Circu1ation", - "circu1ation", - "name", - "一流玩家,国内第一个40行sub20的玩家,io段位X", - "https://space.bilibili.com/557547205", - }, - {"Farter", - "farteryhr pi TTT t000", - "name", - "【研究群】「TTTT」\n40行26.193秒\nCN块圈元老之一,《T-ex》和《屁块》的作者", - "https://space.bilibili.com/132966", - }, - {"Teatube", - "teatube ttb chaguan chanaiye sifangchaye t022", - "name", - "【研究群】「T022」\n40行33秒 top数据高峰约50L70A\n研究群管理,探索群群主,茶服服主,人形方块百科史书,现中文方块维基主催\n自2011年正式加入CN方块社区以来,以探索方块有趣的思想作为主动力,茶茶今天也在茶馆里当着茶房管理员——\n\n其他名称:TTB,永远旋转的炸弹,茶乃叶,四方茶叶\n明明茶管是蓝孩子却被群友叫茶娘…怎么想都很奇怪啊!嘛大家喜欢的话就随便啦——", - "https://space.bilibili.com/834903", - }, - {"Sniraite", - "sniraite shege 11renpc t024", - "name", - "【研究群】「T024」\n40行sub23\n国内一流方块玩家,应该是大陆最速", - "https://space.bilibili.com/561589", - }, - {"xb", - "xb t043", - "name", - "【研究群】「T043」\n俄罗斯方块中文维基(灰机wiki)主要编者(之一", - "https://space.bilibili.com/226132", - }, - {"Flyz", - "flyz fxg t114", - "name", - "【研究群】「T114」\n高技术力", - "https://space.bilibili.com/787096", - }, - {"gggf", - "xiaoqi kissne gggf t127", - "name", - "【研究群】「T127」\n40行22.677秒(手机25.483),tetr.io段位X\n20G规则国内一流玩家,拿到了TGM3几乎全部的最终成就(全世界都没几个)\n其他名称:小柒 kissne 127\n还是车车人,几个正作成绩:永EX NM 1B FS 风L NM", - "https://space.bilibili.com/287769888", - }, - {"蕴空之灵", - "蕴空之灵 ykzl yunkongzhiling niao bird t196", - "name", - "【研究群】「T196」\n40行33秒\nvup,效率之光,不能吃辣\n常用定式:信天翁 tki3 开局pc", - "https://space.bilibili.com/9964553", - }, - {"安樱奈莯", - "安樱奈莯 naki anyingnaimu youling gui t210", - "name", - "【研究群】「T210」\nvup,喜欢打块的幽灵,techmino配音之一", - "https://space.bilibili.com/33212649", - }, - {"奏之章", - "奏之章 zzz zouzhizhang t274", - "name", - "【研究群】「T274」\nzzzbot的作者,CN块圈人工智能技术发展重要人物之一", - "https://space.bilibili.com/311039", - }, - {"吴淞昊", - "吴淞昊 wusonghao electric modian zhunbei t283", - "name", - "【研究群】「T283」\n国内一流隐形方块玩家,TGM3 world S13+GM,上过最强大脑", - "https://space.bilibili.com/17583394", - }, - {"他天一", - "他天一 tty tatianyi hydrofierus t512", - "name", - "【研究群】「T512」\n其他名称:Hydrofierus\n40行22.72秒,io段位X\nC2/SRS对战水平国内一流\n常用定式:tki 开局pc", - "https://space.bilibili.com/3895759", - }, - {"Mars608", - "mars huoxingge t608", - "name", - "【研究群】「T608」\n拿过ns ppt国区榜首", - "https://space.bilibili.com/1471400", - }, - {"Mifu", - "mifu swl nanmaomao t616", - "name", - "【研究群】「T616」\n40行32秒\nvup,miya的哥哥(方块教练)", - "https://space.bilibili.com/109356367", - }, - {"ZXC", - "zxc thtsod flag t655", - "name", - "【研究群】「T655」\n高技术力", - "https://space.bilibili.com/4610502", - }, - {"Tinko", - "tinko t665", - "name", - "【研究群】「T665」\n高技术力", - "https://tinko.moe", - }, - {"T722", - "t722", - "name", - "【研究群】「T722」\n音乐人", - "https://space.bilibili.com/30452985", - }, - {"Diao", - "diao mengxin t872", - "name", - "【研究群】「T872」\n(但这人老故意空着群名片啥都不写),一流对战选手,得过jscup亚军,ttt冠军,HDO XII冠军\n有大量曾用名(nmdtql/diao/nanami等,还有一大堆高仿名)", - "https://space.bilibili.com/471341780", - }, - {"思竣", - "思竣 sijun t942", - "name", - "【研究群】「T942」\n算力极强的思维型选手", - "https://space.bilibili.com/403250559", - }, - {"柒栎流星", - "t1013", - "name", - "【研究群】「T1013」\n音乐人", - "https://space.bilibili.com/201145153", - }, - {"Particle_G", - "particleg t1080", - "name", - "【研究群】「T1080」\n40行59.4秒\nTechmino后端(服务器)主要开发人员", - "https://space.bilibili.com/3306106", - }, - {"琳雨空", - "琳雨空 linyukong t1505", - "name", - "【研究群】「T1505」\n40行38.3秒,五连块S,黑屏隐形S(世界首位)", - "https://space.bilibili.com/263909369", - }, - {"子心", - "子心 koishi zixin t1934", - "name", - "【研究群】「T1934」\nvup,T99国内一流战术型玩家", - "https://space.bilibili.com/147529", - }, - {"蓝绿", - "蓝绿 lanlv gompyn imple lee blari'o blariho t3182", - "name", - "【研究群】「T3182」\n高技术力,参与了",--Techmino后端开发 - }, - {"喵田弥夜", - "喵田弥夜 miya miaotianmiye mao t7023", - "name", - "【研究群】「T7023」\nvup,喜欢打块的猫猫(Z酱单推),techmino配音之一", - "https://space.bilibili.com/846180", - }, + {"Circu1ation", + "circu1ation", + "name", + "一流玩家,国内第一个40行sub20的玩家,io段位X", + "https://space.bilibili.com/557547205", + }, + {"Farter", + "farteryhr pi TTT t000", + "name", + "【研究群】「TTTT」\n40行26.193秒\nCN块圈元老之一,《T-ex》和《屁块》的作者", + "https://space.bilibili.com/132966", + }, + {"Teatube", + "teatube ttb chaguan chanaiye sifangchaye t022", + "name", + "【研究群】「T022」\n40行33秒 top数据高峰约50L70A\n研究群管理,探索群群主,茶服服主,人形方块百科史书,现中文方块维基主催\n自2011年正式加入CN方块社区以来,以探索方块有趣的思想作为主动力,茶茶今天也在茶馆里当着茶房管理员——\n\n其他名称:TTB,永远旋转的炸弹,茶乃叶,四方茶叶\n明明茶管是蓝孩子却被群友叫茶娘…怎么想都很奇怪啊!嘛大家喜欢的话就随便啦——", + "https://space.bilibili.com/834903", + }, + {"Sniraite", + "sniraite shege 11renpc t024", + "name", + "【研究群】「T024」\n40行sub23\n国内一流方块玩家,应该是大陆最速", + "https://space.bilibili.com/561589", + }, + {"xb", + "xb t043", + "name", + "【研究群】「T043」\n俄罗斯方块中文维基(灰机wiki)主要编者(之一", + "https://space.bilibili.com/226132", + }, + {"Flyz", + "flyz fxg t114", + "name", + "【研究群】「T114」\n高技术力", + "https://space.bilibili.com/787096", + }, + {"gggf", + "xiaoqi kissne gggf t127", + "name", + "【研究群】「T127」\n40行22.677秒(手机25.483),tetr.io段位X\n20G规则国内一流玩家,拿到了TGM3几乎全部的最终成就(全世界都没几个)\n其他名称:小柒 kissne 127\n还是车车人,几个正作成绩:永EX NM 1B FS 风L NM", + "https://space.bilibili.com/287769888", + }, + {"蕴空之灵", + "蕴空之灵 ykzl yunkongzhiling niao bird t196", + "name", + "【研究群】「T196」\n40行33秒\nvup,效率之光,不能吃辣\n常用定式:信天翁 tki3 开局pc", + "https://space.bilibili.com/9964553", + }, + {"安樱奈莯", + "安樱奈莯 naki anyingnaimu youling gui t210", + "name", + "【研究群】「T210」\nvup,喜欢打块的幽灵,techmino配音之一", + "https://space.bilibili.com/33212649", + }, + {"奏之章", + "奏之章 zzz zouzhizhang t274", + "name", + "【研究群】「T274」\nzzzbot的作者,CN块圈人工智能技术发展重要人物之一", + "https://space.bilibili.com/311039", + }, + {"吴淞昊", + "吴淞昊 wusonghao electric modian zhunbei t283", + "name", + "【研究群】「T283」\n国内一流隐形方块玩家,TGM3 world S13+GM,上过最强大脑", + "https://space.bilibili.com/17583394", + }, + {"他天一", + "他天一 tty tatianyi hydrofierus t512", + "name", + "【研究群】「T512」\n其他名称:Hydrofierus\n40行22.72秒,io段位X\nC2/SRS对战水平国内一流\n常用定式:tki 开局pc", + "https://space.bilibili.com/3895759", + }, + {"Mars608", + "mars huoxingge t608", + "name", + "【研究群】「T608」\n拿过ns ppt国区榜首", + "https://space.bilibili.com/1471400", + }, + {"Mifu", + "mifu swl nanmaomao t616", + "name", + "【研究群】「T616」\n40行32秒\nvup,miya的哥哥(方块教练)", + "https://space.bilibili.com/109356367", + }, + {"ZXC", + "zxc thtsod flag t655", + "name", + "【研究群】「T655」\n高技术力", + "https://space.bilibili.com/4610502", + }, + {"Tinko", + "tinko t665", + "name", + "【研究群】「T665」\n高技术力", + "https://tinko.moe", + }, + {"T722", + "t722", + "name", + "【研究群】「T722」\n音乐人", + "https://space.bilibili.com/30452985", + }, + {"Diao", + "diao mengxin t872", + "name", + "【研究群】「T872」\n(但这人老故意空着群名片啥都不写),一流对战选手,得过jscup亚军,ttt冠军,HDO XII冠军\n有大量曾用名(nmdtql/diao/nanami等,还有一大堆高仿名)", + "https://space.bilibili.com/471341780", + }, + {"思竣", + "思竣 sijun t942", + "name", + "【研究群】「T942」\n算力极强的思维型选手", + "https://space.bilibili.com/403250559", + }, + {"柒栎流星", + "t1013", + "name", + "【研究群】「T1013」\n音乐人", + "https://space.bilibili.com/201145153", + }, + {"Particle_G", + "particleg t1080", + "name", + "【研究群】「T1080」\n40行59.4秒\nTechmino后端(服务器)主要开发人员", + "https://space.bilibili.com/3306106", + }, + {"琳雨空", + "琳雨空 linyukong t1505", + "name", + "【研究群】「T1505」\n40行38.3秒,五连块S,黑屏隐形S(世界首位)", + "https://space.bilibili.com/263909369", + }, + {"子心", + "子心 koishi zixin t1934", + "name", + "【研究群】「T1934」\nvup,T99国内一流战术型玩家", + "https://space.bilibili.com/147529", + }, + {"蓝绿", + "蓝绿 lanlv gompyn imple lee blari'o blariho t3182", + "name", + "【研究群】「T3182」\n高技术力,参与了",--Techmino后端开发 + }, + {"喵田弥夜", + "喵田弥夜 miya miaotianmiye mao t7023", + "name", + "【研究群】「T7023」\nvup,喜欢打块的猫猫(Z酱单推),techmino配音之一", + "https://space.bilibili.com/846180", + }, } \ No newline at end of file diff --git a/parts/language/lang_en.lua b/parts/language/lang_en.lua index f34b949e..9589701d 100644 --- a/parts/language/lang_en.lua +++ b/parts/language/lang_en.lua @@ -1,945 +1,945 @@ local C=COLOR return{ - loadText={ - loadSFX="Loading sound effects", - loadVoice="Loading voice packs", - loadFont="Loading font", - loadModeIcon="Loading mode icons", - loadMode="Loading modes", - loadOther="Loading other assets", - finish="Press any button to start!", - }, - sureQuit="Press again to exit", - newDay="A new day, a new beginning!", - playedLong="You have been playing for a long time. Make sure to rest well!", - playedTooMuch="You have been playing for too long! Playing a block game is fun, but it's time to take a break.", - - atkModeName={"Random","Badges","K.O.s","Attackers"}, - royale_remain="$1 Players Remaining", - powerUp={[0]="+000%","+025%","+050%","+075%","+100%"}, - cmb={nil,"1 Combo","2 Combo","3 Combo","4 Combo","5 Combo","6 Combo","7 Combo","8 Combo","9 Combo","10 Combo!","11 Combo!","12 Combo!","13 Combo!","14 Combo!!","15 Combo!!","16 Combo!!","17 Combo!!!","18 Combo!!!","19 Combo!!!","MEGACMB"}, - spin="-Spin ", - clear={"Single","Double","Triple","Techrash","Pentacrash","Hexacrash"}, - mini="Mini",b2b="B2B ",b3b="B2B2B ", - PC="Perfect Clear",HPC="Hemi-Perfect Clear", - replaying="[Replay]", - tasUsing="[TAS]", - - stage="Stage $1", - great="Great!", - awesome="Awesome!", - almost="Almost!", - continue="Keep going!", - maxspeed="Max speed!", - speedup="Speed up!", - missionFailed="Wrong Clear", - - speedLV="Speed Level", - piece="Piece",line="Lines",atk="Attack",eff="Efficiency", - rpm="RPM",tsd="TSD", - grade="Grade",techrash="Techrash", - wave="Wave",nextWave="Next", - combo="Combo",maxcmb="Max Combo", - pc="Perfect Clear",ko="KO", - - win="Win", - lose="Lose", - - finish="Finish", - gamewin="You Win", - gameover="Game Over", - - pause="Pause", - pauseCount="Pauses", - finesse_ap="All Perfect", - finesse_fc="Full Combo", - - page="Page:", - - ai_fixed="The AI is incompatible with fixed sequences.", - ai_prebag="The AI is incompatible with custom sequences which have nontetromino.", - ai_mission="The AI is incompatible with custom missions.", - switchSpawnSFX="Please turn on the spawn SFX .", - ranks={"D","C","B","A","S"}, - needRestart="Retry for the changes to take effect.", - - saveDone="Data Saved", - saveError="Failed to save:", - saveError_duplicate="Duplicate filename", - loadError="Failed to load:", - exportSuccess="Exported successfully", - importSuccess="Imported successfully", - dataCorrupted="Data corrupted", - pasteWrongPlace="Paste at wrong place?", - noFile="File not found", - - VKTchW="Touch Weight", - VKOrgW="Origin Weight", - VKCurW="Current. Pos. Weight", - - noScore="No Scores Yet", - modeLocked="Locked", - unlockHint="Achieve Rank D or above in prerequisite modes to unlock.", - highScore="Personal Bests", - newRecord="New Record!", - - replayBroken="Cannot load replay", - - getNoticeFail="Failed fetching announcements...", - oldVersion="Version $1 is now available!", - needUpdate="Newer version required!", - versionNotMatch="Version do not match!", - notFinished="Coming soon!", - - jsonError="JSON error", - - noUsername="Please specify a username.", - wrongEmail="You entered an incorrect e-mail address.", - noPassword="Please enter your password.", - diffPassword="Passwords don't match.", - registerRequestSent="Registration request sent", - registerSuccessed="Registration succeeded!", - loginSuccessed="You are now logged in!", - accessSuccessed="Access Granted.", - - wsConnecting="Websocket Connecting", - wsFailed="WebSocket Connection Failed", - wsClose="WebSocket Closed:", - netTimeout="Network connection timeout", - - onlinePlayerCount="Online", - createRoomSuccessed="Room successfully created!", - started="Playing", - joinRoom="has joined the room.", - leaveRoom="has left the room.", - ready="Ready", - connStream="Connecting", - waitStream="Waiting", - spectating="Spectating", - chatRemain="Online", - chatStart="------Beginning of log------", - chatHistory="------New messages below------", - - errorMsg="Techmino ran into a problem and needs to restart.\nYou can send the error log to the devs.", - - modInstruction="Choose your modifiers!\nMods allow you to change the game.\nThey may also break it in weird ways.\nBeware, the mods will cause your game to be unranked!", - modInfo={ - next="NEXT\nOverrides the number of Next pieces.", - hold="HOLD\nOverrides the number of Hold pieces.", - hideNext="Hidden NEXT\nHides a specific amount of pieces on the Next Queue.", - infHold="InfiniHold\nAllows you to hold pieces infinitely.", - hideBlock="Hide Current Piece:\nMakes the piece you are controlling invisible.", - hideGhost="No Ghost\nMakes the Ghost Piece invisible.", - hidden="Hide Locked Pieces.\nMakes locked pieces fade out.", - hideBoard="Hide Board\nPartially or fully hides the field.", - flipBoard="Flip Board\nFlips or rotates the field.", - dropDelay="Gravity\nOverrides the falling speed in frames/block.", - lockDelay="Lock Delay\nOverrides the lock delay in frames.", - waitDelay="Spawn Delay\nOverrides the spawn delay in frames.", - fallDelay="Line Clear Delay\nOverrides the line clear delay in frames.", - life="Life\nChanges the initial number of additional lives.", - forceB2B="B2B Only\nEnds the game when the B2B gauge drops below the initial line.", - forceFinesse="Finesse Only\nEnds the game on any finesse fault", - tele="Teleport\nForces 0 DAS and 0 ARR.", - noRotation="No Rotation\nDisables piece rotations.", - noMove="No Movement\nDisables left and right movements.", - customSeq="Randomizer\nOverrides the randomizer for the block sequence.", - pushSpeed="Garbage Speed\nOverride the rising speed of garbage lines (blocks/frame).", - boneBlock="[ ]\nPlay with [ ] blocks.", - }, - pauseStat={ - "Time:", - "Key/Rot./Hold:", - "Piece:", - "Row/Dig:", - "Attack/DigAtk:", - "Received:", - "Clears:", - "Spins:", - "B2B/B3B/PC/HPC:", - "Finesse:", - }, - radar={"DEF","OFF","ATK","SEND","SPD","DIG"}, - radarData={"D'PM","ADPM","APM","SPM","L'PM","DPM"}, - stat={ - "Times Launched:", - "Play Count:", - "Play Time:", - "Key/Rot./Hold:", - "Block/Row/Atk.:", - "Recv./Res./Asc.:", - "Dig/Dig Atk.:", - "Eff./Dig Eff.:", - "B2B/B3B:", - "PC/HPC:", - "FnsErrs./FnsRate:", - }, - aboutTexts={ - "This is just an *ordinary* block stacker. Really, that's it.", - "It has inspirations from C2/IO/JS/WWC/KOS etc.", - "", - "Powered by LÖVE", - "Any suggestions or bug reports are appreciated!", - "Make sure to get the game only from official sources,", - "as we can't make sure you're safe if you got it elsewhere.", - "The author is not responsible for any modifications.", - "While the game is free, donations are appreciated." - }, - staff={ - "Author: MrZ E-mail: 1046101471@qq.com", - "Powered by LÖVE", - "", - "Program: MrZ, Particle_G, [FinnTenzor]", - "Art: MrZ, Gnyar, ScF, [旋律星萤, T0722]", - "Music: MrZ, ERM, [T0722, Aether]", - "Voice & Sound: Miya, Xiaoya, Naki, MrZ", - "Performance: 模电, HBM", - "Translations: User670, MattMayuga, Mizu, Mr.Faq, ScF", - "", - "Special Thanks:", - "User670, Flyz, Big_True, Trebor, NOT-A-ROBOT, 思竣, scdhh", - "yuhao7370, Farter, Teatube, 蕴空之灵, T9972, [All test staff]", - }, - used=[[ - Tools used: - Beepbox - Goldwave - GFIE - FL Mobile - Libs used: - Cold_Clear [MinusKelvin] - json.lua [rxi] - profile.lua [itraykov] - simple-love-lights [dylhunn] - ]], - support="Support the author", - group="Join our Discord: discord.gg/f9pUvkh", - WidgetText={ - main={ - offline="Single Player", - qplay="Last Played", - online="Multiplayer", - custom="Custom Game", - setting="Settings", - stat="Statistics", - music="Music & SE", - dict="Zictionary", - replays="Replays", - }, - main_simple={ - sprint="Sprint", - marathon="Marathon", - }, - mode={ - mod="Mods (F1)", - start="Start", - }, - mod={ - title="Mods", - reset="Reset (tab)", - unranked="Unranked", - }, - pause={ - setting="Settings (S)", - replay="Replay (P)", - save="Save (O)", - resume="Resume (esc)", - restart="Retry (R)", - quit="Quit (Q)", - tas="TAS (T)", - }, - net_menu={ - league="Tech League", - ffa="FFA", - rooms="Rooms", - logout="Log out", - }, - net_league={ - match="Find Match", - }, - net_rooms={ - password="Password", - refreshing="Refreshing rooms", - noRoom="There aren't any rooms right now...", - refresh="Refresh", - new="New Room", - join="Join", - }, - net_newRoom={ - title="Room config", - roomName="Room name(default to username's room)", - password="Password", - description="Room description", - - life="Lives", - pushSpeed="Push Speed", - garbageSpeed="Garbage Speed", - visible="Visibility", - freshLimit="Lock Reset Limit", - - fieldH="Field Height", - bufferLimit="Buffer Limit", - heightLimit="Height Limit", - - drop="Drop Delay", - lock="Lock Delay", - wait="Entry Delay", - fall="Line Delay", - - capacity="Capacity", - create="Create", - - ospin="O-spin", - fineKill="100% Finesse", - b2bKill="No B2B break", - easyFresh="Normal Lock Reset", - deepDrop="Deep Drop", - bone="Bone Blocks", - - nextCount="Next", - holdCount="Hold", - infHold="Infinite Hold", - phyHold="In-place Hold", - }, - net_game={ - ready="Ready", - spectate="Spectate", - cancel="Cancel", - }, - setting_game={ - title="Game Settings", - graphic="←Video", - sound="Sound→", - - ctrl="Control Settings", - key="Key Mappings", - touch="Touch Settings", - reTime="Start Delay", - RS="Rotation System", - layout="Layout", - autoPause="Pause while unfocused", - menuPos="Menu button pos.", - swap="Key Combination (Change Atk. Mode)", - autoSave="Auto save new-best", - simpMode="Simplistic Style", - }, - setting_video={ - title="Video Settings", - sound="←Sound", - game="Game→", - - block="Draw Block", - smooth="Smooth Falling", - upEdge="3D Block", - bagLine="Bag Separator", - - ghostType="Ghost Type", - ghost="Ghost", - center="Center", - grid="Grid", - lineNum="line No.", - - lockFX="Lock FX", - dropFX="Drop FX", - moveFX="Move FX", - clearFX="Clear FX", - splashFX="Splash FX", - shakeFX="Field Sway", - atkFX="Atk. FX", - frame="Render Frame Rate(%)", - - text="Line Clear Pop-up", - score="Score Pop-up", - bufferWarn="Buffer Alert", - showSpike="Spike Counter", - nextPos="Next Preview", - highCam="Screen Scrolling", - warn="Danger Alert", - - clickFX="Click FX", - power="Power Info", - clean="Fast Draw", - fullscreen="Full Screen", - bg="Background", - - blockSatur="Block Saturation", - fieldSatur="Field Saturation", - }, - setting_sound={ - title="Sound Settings", - - game="←Game", - graphic="Video→", - - bgm="BGM", - sfx="SFX", - stereo="Stereo", - spawn="Spawn Sounds", - warn="Warning", - vib="Vibration", - voc="Voice", - - fine="Finesse Error SFX", - cv="Voice Pack", - apply="Apply", - }, - setting_control={ - title="Control Settings", - preview="Preview", - - das="DAS",arr="ARR", - dascut="DAS cut", - dropcut="Auto-lock cut", - sddas="Soft Drop DAS",sdarr="Soft Drop ARR", - ihs="Initial Hold", - irs="Initial Rotation", - ims="Initial Movement", - reset="Reset", - }, - setting_key={ - a1="Move Left", - a2="Move Right", - a3="Rotate Right", - a4="Rotate Left", - a5="Rotate 180°", - a6="Hard Drop", - a7="Soft Drop", - a8="Hold", - a9="Function1", - a10="Function2", - a11="Instant Left", - a12="Instant Right", - a13="Sonic Drop", - a14="Down 1", - a15="Down 4", - a16="Down 10", - a17="Left Drop", - a18="Right Drop", - a19="Left Zangi", - a20="Right Zangi", - restart="Retry", - }, - setting_skin={ - skinSet="Block Skin", - title="Layout Settings", - spin1="R",spin2="R",spin3="R",spin4="R",spin5="R",spin6="R",spin7="R", - skinR="Reset Color", - faceR="Reset Dir.", - }, - setting_touch={ - default="Default", - snap="Snap", - save1="Save1", - load1="Load1", - save2="Save2", - load2="Load2", - size="Size", - shape="Shape", - }, - setting_touchSwitch={ - b1= "Move Left:", b2="Move Right:", b3="Rotate Right:", b4="Rotate Left:", - b5= "Rotate 180°:", b6="Hard Drop:", b7="Soft Drop:", b8="Hold:", - b9= "Function1:", b10="Function2:", b11="Instant Left:",b12="Instant Right:", - b13="Sonic Drop:", b14="Down 1:", b15="Down 4:", b16="Down 10:", - b17="Left Drop:", b18="Right Drop:", b19="Left Zangi:", b20="Right Zangi:", - - norm="Normal", - pro="Professional", - hide="Show Virtual Keys", - icon="Icon", - sfx="SFX", - vib="VIB", - alpha="Alpha", - - track="Auto Track", - dodge="Auto Dodge", - }, - customGame={ - title="Custom Game", - subTitle="Basic", - defSeq="Default Seq.", - noMsn="No missions", - - drop="Drop Delay", - lock="Lock Delay", - wait="Entry Delay", - fall="Line Delay", - - bg="Background", - bgm="Music", - - copy="Copy Field+Seq.+Mssn.", - paste="Paste Field+Seq.+Mssn.", - clear="Start-Clear", - puzzle="Start-Puzzle", - - reset="Reset (Del)", - advance="More (A)", - mod="Mods (F1)", - field="Edit Field (F)", - sequence="Edit Sequence (S)", - mission="Edit Mission (M)", - - nextCount="Next", - holdCount="Hold", - infHold="Infinite Hold", - phyHold="In-place Hold", - - fieldH="Field Height", - visible="Visibility", - freshLimit="Lock Reset Limit", - opponent="Opponent", - life="Lives", - pushSpeed="Push Speed", - garbageSpeed="Garbage Speed", - - bufferLimit="Buffer Limit", - heightLimit="Height Limit", - ospin="O-Spin", - fineKill="100% Finesse", - b2bKill="No B2B break", - easyFresh="Normal Lock Reset", - deepDrop="Deep Drop", - bone="Bone Blocks", - }, - custom_field={ - title="Custom Game", - subTitle="Field", - - any="Erase", - space="×", - smart="Smart", - - push="Add Line(K)", - del="Del Line(L)", - - copy="Copy", - paste="Paste", - clear="Clear", - demo="Don't Show ×", - - newPg="New Page(N)", - delPg="Del Page(M)", - prevPg="Prev Page", - nextPg="Next Page", - }, - custom_sequence={ - title="Custom Game", - subTitle="Sequence", - - sequence="Sequence", - - Z="Z",S="S",J="J",L="L",T="T",O="O",I="I",left="←",right="→",ten="→→",backsp="", - "0next 0hold.", - "1next 0hold", - "1next 1hold!", - "1next 6hold!", - "20G actually is a brand new game rule.", - "40-line Sprint WR: 14.915s by Reset_", - "6next 1hold!", - "6next 6hold?!", - "Achievement system coming soon!", - "ALL SPIN!", - "Am G F G", - "B2B2B???", - "B2B2B2B does not exist.", - "B2B2B2B exists?", - "Back-to-Back Techrash, 10 Combo, PC!", - "Be sure to give it your best shot again today!", - "Bridge clear coming soon!", - "Can you master this modern yet familiar stacker?", - "Certainly within this heart lies my M@STERPIECE.", - "Changelogs in English can be found on Discord.", - "Color clear coming soon!", - "COOL!!", - "Decreasing DAS and ARR is faster but harder to control.", - "Did I just see a Back-to-Back-to-Back?", - "Don't let a small glitch ruin your entire day!", - "Don't look directly at the bugs!", - "Enjoy the Techmino rotation system!", - "Excellent, but let's go better next time...", - "Find out what's in the settings!", - "Got any suggestions? Post them in our Discord!", - "Headphones recommended for a better experience.", - "Hello world!", - "I3 and L3 are the only two unique triminoes.", - "if a==true", - "Increase your frame rate for a better experience.", - "Initial [insert action] system can save you.", - "Is B2B2B2B possible?", - "It's possible to finish 40L without left/right button.", - "It's really loading! Not just a cutscene!", - "Join our discord!", - "Let the bass kick!", - "LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF", - "Lua No.1", - "Mix clear coming soon!", - "Music of this game is made using Beepbox.", - "Music too distracting? You can turn it off.", - "No easter eggs in this menu if you have the simplistic style turned on!", - "O-Spin Triple!", - "OHHHHHHHHHHHHHH", - "Online mode is planned - please be patient.", - "Play single-handedly!", - "Playing good takes some time!", - "Powered by LÖVE", - "Powered by Un..LÖVE", - "pps-0.01", - "REGRET!!", - "Secret number: 626", - "Server down randomly", - "Some requirements to achieve rank S are intentionally set to be difficult for even the best players.", - "Soon, you'll be able to play against friends and foes all over the world.", - "Split clear coming soon!", - "Techmino = Technique + Tetromino", - "Techmino has a Nspire-CX edition!", - "Techmino is so fun!", - "TetroDictionary is now available in English.", - "The stacker future is yours in Techmino!", - "There are four hidden modes in the game.", - "There is a total of 18 different pentominoes.", - "There is a total of 7 different tetrominoes.", - "Try using multiple Hold Queues!", - "Try using two rotation buttons. Using all three of them is better.", - "Warning: Programmer Art", - "What about 20 PCs?", - "What about 23 PCs in 100 lines?", - "What about 26 TSDs?", - "What is this cheap UI & music smh", - "while(false)", - "You are a Grand Master!", - "You can connect a keyboard to your phone or tablet!", - "You can navigate the menu with a keyboard, but only in this screen.", - "You can open the save directory from the Stats page.", - "You can perform a spin with 28 of the 29 minoes in this game; the exception being O1.", - "You can set the spawning orientation for each tetromino.", - "ZS JL T O I", - {C.C,"Also try 15puzzle!"}, - {C.C,"Also try Minecraft!"}, - {C.C,"Also try Minesweeper!"}, - {C.C,"Also try Orzmic!"}, - {C.C,"Also try osu!"}, - {C.C,"Also try Phigros!"}, - {C.C,"Also try Rubik's cube!"}, - {C.C,"Also try Terraria!"}, - {C.C,"Also try VVVVVV!"}, - {C.H,"REGRET!!"}, - {C.lR,"Z ",C.lG,"S ",C.lS,"J ",C.lO,"L ",C.lP,"T ",C.lY,"O ",C.lC,"I"}, - {C.lY,"COOL!!"}, - {C.N,"Lua",C.Z," No.1"}, - {C.P,"T-spin!"}, - {C.R,"\"DMCA abusing\""}, - {C.R,"\"Intellectual property law\""}, - {C.R,"DT",C.Z," Cannon=",C.P,"TS",C.R,"D",C.Z,"+",C.P,"TS",C.R,"T",C.Z," Cannon"}, - {C.R,"LrL ",C.G,"RlR ",C.B,"LLr ",C.O,"RRl ",C.P,"RRR ",C.P,"LLL ",C.C,"FFF ",C.Y,"RfR ",C.Y,"RRf ",C.Y,"rFF"}, - {C.Y,"O-Spin Triple!"}, - {C.Z,"What? ",C.lC,"Xspin?"}, - } + loadText={ + loadSFX="Loading sound effects", + loadVoice="Loading voice packs", + loadFont="Loading font", + loadModeIcon="Loading mode icons", + loadMode="Loading modes", + loadOther="Loading other assets", + finish="Press any button to start!", + }, + sureQuit="Press again to exit", + newDay="A new day, a new beginning!", + playedLong="You have been playing for a long time. Make sure to rest well!", + playedTooMuch="You have been playing for too long! Playing a block game is fun, but it's time to take a break.", + + atkModeName={"Random","Badges","K.O.s","Attackers"}, + royale_remain="$1 Players Remaining", + powerUp={[0]="+000%","+025%","+050%","+075%","+100%"}, + cmb={nil,"1 Combo","2 Combo","3 Combo","4 Combo","5 Combo","6 Combo","7 Combo","8 Combo","9 Combo","10 Combo!","11 Combo!","12 Combo!","13 Combo!","14 Combo!!","15 Combo!!","16 Combo!!","17 Combo!!!","18 Combo!!!","19 Combo!!!","MEGACMB"}, + spin="-Spin ", + clear={"Single","Double","Triple","Techrash","Pentacrash","Hexacrash"}, + mini="Mini",b2b="B2B ",b3b="B2B2B ", + PC="Perfect Clear",HPC="Hemi-Perfect Clear", + replaying="[Replay]", + tasUsing="[TAS]", + + stage="Stage $1", + great="Great!", + awesome="Awesome!", + almost="Almost!", + continue="Keep going!", + maxspeed="Max speed!", + speedup="Speed up!", + missionFailed="Wrong Clear", + + speedLV="Speed Level", + piece="Piece",line="Lines",atk="Attack",eff="Efficiency", + rpm="RPM",tsd="TSD", + grade="Grade",techrash="Techrash", + wave="Wave",nextWave="Next", + combo="Combo",maxcmb="Max Combo", + pc="Perfect Clear",ko="KO", + + win="Win", + lose="Lose", + + finish="Finish", + gamewin="You Win", + gameover="Game Over", + + pause="Pause", + pauseCount="Pauses", + finesse_ap="All Perfect", + finesse_fc="Full Combo", + + page="Page:", + + ai_fixed="The AI is incompatible with fixed sequences.", + ai_prebag="The AI is incompatible with custom sequences which have nontetromino.", + ai_mission="The AI is incompatible with custom missions.", + switchSpawnSFX="Please turn on the spawn SFX .", + ranks={"D","C","B","A","S"}, + needRestart="Retry for the changes to take effect.", + + saveDone="Data Saved", + saveError="Failed to save:", + saveError_duplicate="Duplicate filename", + loadError="Failed to load:", + exportSuccess="Exported successfully", + importSuccess="Imported successfully", + dataCorrupted="Data corrupted", + pasteWrongPlace="Paste at wrong place?", + noFile="File not found", + + VKTchW="Touch Weight", + VKOrgW="Origin Weight", + VKCurW="Current. Pos. Weight", + + noScore="No Scores Yet", + modeLocked="Locked", + unlockHint="Achieve Rank D or above in prerequisite modes to unlock.", + highScore="Personal Bests", + newRecord="New Record!", + + replayBroken="Cannot load replay", + + getNoticeFail="Failed fetching announcements...", + oldVersion="Version $1 is now available!", + needUpdate="Newer version required!", + versionNotMatch="Version do not match!", + notFinished="Coming soon!", + + jsonError="JSON error", + + noUsername="Please specify a username.", + wrongEmail="You entered an incorrect e-mail address.", + noPassword="Please enter your password.", + diffPassword="Passwords don't match.", + registerRequestSent="Registration request sent", + registerSuccessed="Registration succeeded!", + loginSuccessed="You are now logged in!", + accessSuccessed="Access Granted.", + + wsConnecting="Websocket Connecting", + wsFailed="WebSocket Connection Failed", + wsClose="WebSocket Closed:", + netTimeout="Network connection timeout", + + onlinePlayerCount="Online", + createRoomSuccessed="Room successfully created!", + started="Playing", + joinRoom="has joined the room.", + leaveRoom="has left the room.", + ready="Ready", + connStream="Connecting", + waitStream="Waiting", + spectating="Spectating", + chatRemain="Online", + chatStart="------Beginning of log------", + chatHistory="------New messages below------", + + errorMsg="Techmino ran into a problem and needs to restart.\nYou can send the error log to the devs.", + + modInstruction="Choose your modifiers!\nMods allow you to change the game.\nThey may also break it in weird ways.\nBeware, the mods will cause your game to be unranked!", + modInfo={ + next="NEXT\nOverrides the number of Next pieces.", + hold="HOLD\nOverrides the number of Hold pieces.", + hideNext="Hidden NEXT\nHides a specific amount of pieces on the Next Queue.", + infHold="InfiniHold\nAllows you to hold pieces infinitely.", + hideBlock="Hide Current Piece:\nMakes the piece you are controlling invisible.", + hideGhost="No Ghost\nMakes the Ghost Piece invisible.", + hidden="Hide Locked Pieces.\nMakes locked pieces fade out.", + hideBoard="Hide Board\nPartially or fully hides the field.", + flipBoard="Flip Board\nFlips or rotates the field.", + dropDelay="Gravity\nOverrides the falling speed in frames/block.", + lockDelay="Lock Delay\nOverrides the lock delay in frames.", + waitDelay="Spawn Delay\nOverrides the spawn delay in frames.", + fallDelay="Line Clear Delay\nOverrides the line clear delay in frames.", + life="Life\nChanges the initial number of additional lives.", + forceB2B="B2B Only\nEnds the game when the B2B gauge drops below the initial line.", + forceFinesse="Finesse Only\nEnds the game on any finesse fault", + tele="Teleport\nForces 0 DAS and 0 ARR.", + noRotation="No Rotation\nDisables piece rotations.", + noMove="No Movement\nDisables left and right movements.", + customSeq="Randomizer\nOverrides the randomizer for the block sequence.", + pushSpeed="Garbage Speed\nOverride the rising speed of garbage lines (blocks/frame).", + boneBlock="[ ]\nPlay with [ ] blocks.", + }, + pauseStat={ + "Time:", + "Key/Rot./Hold:", + "Piece:", + "Row/Dig:", + "Attack/DigAtk:", + "Received:", + "Clears:", + "Spins:", + "B2B/B3B/PC/HPC:", + "Finesse:", + }, + radar={"DEF","OFF","ATK","SEND","SPD","DIG"}, + radarData={"D'PM","ADPM","APM","SPM","L'PM","DPM"}, + stat={ + "Times Launched:", + "Play Count:", + "Play Time:", + "Key/Rot./Hold:", + "Block/Row/Atk.:", + "Recv./Res./Asc.:", + "Dig/Dig Atk.:", + "Eff./Dig Eff.:", + "B2B/B3B:", + "PC/HPC:", + "FnsErrs./FnsRate:", + }, + aboutTexts={ + "This is just an *ordinary* block stacker. Really, that's it.", + "It has inspirations from C2/IO/JS/WWC/KOS etc.", + "", + "Powered by LÖVE", + "Any suggestions or bug reports are appreciated!", + "Make sure to get the game only from official sources,", + "as we can't make sure you're safe if you got it elsewhere.", + "The author is not responsible for any modifications.", + "While the game is free, donations are appreciated." + }, + staff={ + "Author: MrZ E-mail: 1046101471@qq.com", + "Powered by LÖVE", + "", + "Program: MrZ, Particle_G, [FinnTenzor]", + "Art: MrZ, Gnyar, ScF, [旋律星萤, T0722]", + "Music: MrZ, ERM, [T0722, Aether]", + "Voice & Sound: Miya, Xiaoya, Naki, MrZ", + "Performance: 模电, HBM", + "Translations: User670, MattMayuga, Mizu, Mr.Faq, ScF", + "", + "Special Thanks:", + "User670, Flyz, Big_True, Trebor, NOT-A-ROBOT, 思竣, scdhh", + "yuhao7370, Farter, Teatube, 蕴空之灵, T9972, [All test staff]", + }, + used=[[ + Tools used: + Beepbox + Goldwave + GFIE + FL Mobile + Libs used: + Cold_Clear [MinusKelvin] + json.lua [rxi] + profile.lua [itraykov] + simple-love-lights [dylhunn] + ]], + support="Support the author", + group="Join our Discord: discord.gg/f9pUvkh", + WidgetText={ + main={ + offline="Single Player", + qplay="Last Played", + online="Multiplayer", + custom="Custom Game", + setting="Settings", + stat="Statistics", + music="Music & SE", + dict="Zictionary", + replays="Replays", + }, + main_simple={ + sprint="Sprint", + marathon="Marathon", + }, + mode={ + mod="Mods (F1)", + start="Start", + }, + mod={ + title="Mods", + reset="Reset (tab)", + unranked="Unranked", + }, + pause={ + setting="Settings (S)", + replay="Replay (P)", + save="Save (O)", + resume="Resume (esc)", + restart="Retry (R)", + quit="Quit (Q)", + tas="TAS (T)", + }, + net_menu={ + league="Tech League", + ffa="FFA", + rooms="Rooms", + logout="Log out", + }, + net_league={ + match="Find Match", + }, + net_rooms={ + password="Password", + refreshing="Refreshing rooms", + noRoom="There aren't any rooms right now...", + refresh="Refresh", + new="New Room", + join="Join", + }, + net_newRoom={ + title="Room config", + roomName="Room name(default to username's room)", + password="Password", + description="Room description", + + life="Lives", + pushSpeed="Push Speed", + garbageSpeed="Garbage Speed", + visible="Visibility", + freshLimit="Lock Reset Limit", + + fieldH="Field Height", + bufferLimit="Buffer Limit", + heightLimit="Height Limit", + + drop="Drop Delay", + lock="Lock Delay", + wait="Entry Delay", + fall="Line Delay", + + capacity="Capacity", + create="Create", + + ospin="O-spin", + fineKill="100% Finesse", + b2bKill="No B2B break", + easyFresh="Normal Lock Reset", + deepDrop="Deep Drop", + bone="Bone Blocks", + + nextCount="Next", + holdCount="Hold", + infHold="Infinite Hold", + phyHold="In-place Hold", + }, + net_game={ + ready="Ready", + spectate="Spectate", + cancel="Cancel", + }, + setting_game={ + title="Game Settings", + graphic="←Video", + sound="Sound→", + + ctrl="Control Settings", + key="Key Mappings", + touch="Touch Settings", + reTime="Start Delay", + RS="Rotation System", + layout="Layout", + autoPause="Pause while unfocused", + menuPos="Menu button pos.", + swap="Key Combination (Change Atk. Mode)", + autoSave="Auto save new-best", + simpMode="Simplistic Style", + }, + setting_video={ + title="Video Settings", + sound="←Sound", + game="Game→", + + block="Draw Block", + smooth="Smooth Falling", + upEdge="3D Block", + bagLine="Bag Separator", + + ghostType="Ghost Type", + ghost="Ghost", + center="Center", + grid="Grid", + lineNum="line No.", + + lockFX="Lock FX", + dropFX="Drop FX", + moveFX="Move FX", + clearFX="Clear FX", + splashFX="Splash FX", + shakeFX="Field Sway", + atkFX="Atk. FX", + frame="Render Frame Rate(%)", + + text="Line Clear Pop-up", + score="Score Pop-up", + bufferWarn="Buffer Alert", + showSpike="Spike Counter", + nextPos="Next Preview", + highCam="Screen Scrolling", + warn="Danger Alert", + + clickFX="Click FX", + power="Power Info", + clean="Fast Draw", + fullscreen="Full Screen", + bg="Background", + + blockSatur="Block Saturation", + fieldSatur="Field Saturation", + }, + setting_sound={ + title="Sound Settings", + + game="←Game", + graphic="Video→", + + bgm="BGM", + sfx="SFX", + stereo="Stereo", + spawn="Spawn Sounds", + warn="Warning", + vib="Vibration", + voc="Voice", + + fine="Finesse Error SFX", + cv="Voice Pack", + apply="Apply", + }, + setting_control={ + title="Control Settings", + preview="Preview", + + das="DAS",arr="ARR", + dascut="DAS cut", + dropcut="Auto-lock cut", + sddas="Soft Drop DAS",sdarr="Soft Drop ARR", + ihs="Initial Hold", + irs="Initial Rotation", + ims="Initial Movement", + reset="Reset", + }, + setting_key={ + a1="Move Left", + a2="Move Right", + a3="Rotate Right", + a4="Rotate Left", + a5="Rotate 180°", + a6="Hard Drop", + a7="Soft Drop", + a8="Hold", + a9="Function1", + a10="Function2", + a11="Instant Left", + a12="Instant Right", + a13="Sonic Drop", + a14="Down 1", + a15="Down 4", + a16="Down 10", + a17="Left Drop", + a18="Right Drop", + a19="Left Zangi", + a20="Right Zangi", + restart="Retry", + }, + setting_skin={ + skinSet="Block Skin", + title="Layout Settings", + spin1="R",spin2="R",spin3="R",spin4="R",spin5="R",spin6="R",spin7="R", + skinR="Reset Color", + faceR="Reset Dir.", + }, + setting_touch={ + default="Default", + snap="Snap", + save1="Save1", + load1="Load1", + save2="Save2", + load2="Load2", + size="Size", + shape="Shape", + }, + setting_touchSwitch={ + b1= "Move Left:", b2="Move Right:", b3="Rotate Right:", b4="Rotate Left:", + b5= "Rotate 180°:", b6="Hard Drop:", b7="Soft Drop:", b8="Hold:", + b9= "Function1:", b10="Function2:", b11="Instant Left:", b12="Instant Right:", + b13="Sonic Drop:", b14="Down 1:", b15="Down 4:", b16="Down 10:", + b17="Left Drop:", b18="Right Drop:",b19="Left Zangi:", b20="Right Zangi:", + + norm="Normal", + pro="Professional", + hide="Show Virtual Keys", + icon="Icon", + sfx="SFX", + vib="VIB", + alpha="Alpha", + + track="Auto Track", + dodge="Auto Dodge", + }, + customGame={ + title="Custom Game", + subTitle="Basic", + defSeq="Default Seq.", + noMsn="No missions", + + drop="Drop Delay", + lock="Lock Delay", + wait="Entry Delay", + fall="Line Delay", + + bg="Background", + bgm="Music", + + copy="Copy Field+Seq.+Mssn.", + paste="Paste Field+Seq.+Mssn.", + clear="Start-Clear", + puzzle="Start-Puzzle", + + reset="Reset (Del)", + advance="More (A)", + mod="Mods (F1)", + field="Edit Field (F)", + sequence="Edit Sequence (S)", + mission="Edit Mission (M)", + + nextCount="Next", + holdCount="Hold", + infHold="Infinite Hold", + phyHold="In-place Hold", + + fieldH="Field Height", + visible="Visibility", + freshLimit="Lock Reset Limit", + opponent="Opponent", + life="Lives", + pushSpeed="Push Speed", + garbageSpeed="Garbage Speed", + + bufferLimit="Buffer Limit", + heightLimit="Height Limit", + ospin="O-Spin", + fineKill="100% Finesse", + b2bKill="No B2B break", + easyFresh="Normal Lock Reset", + deepDrop="Deep Drop", + bone="Bone Blocks", + }, + custom_field={ + title="Custom Game", + subTitle="Field", + + any="Erase", + space="×", + smart="Smart", + + push="Add Line(K)", + del="Del Line(L)", + + copy="Copy", + paste="Paste", + clear="Clear", + demo="Don't Show ×", + + newPg="New Page(N)", + delPg="Del Page(M)", + prevPg="Prev Page", + nextPg="Next Page", + }, + custom_sequence={ + title="Custom Game", + subTitle="Sequence", + + sequence="Sequence", + + Z="Z",S="S",J="J",L="L",T="T",O="O",I="I",left="←",right="→",ten="→→",backsp="", + "0next 0hold.", + "1next 0hold", + "1next 1hold!", + "1next 6hold!", + "20G actually is a brand new game rule.", + "40-line Sprint WR: 14.915s by Reset_", + "6next 1hold!", + "6next 6hold?!", + "Achievement system coming soon!", + "ALL SPIN!", + "Am G F G", + "B2B2B???", + "B2B2B2B does not exist.", + "B2B2B2B exists?", + "Back-to-Back Techrash, 10 Combo, PC!", + "Be sure to give it your best shot again today!", + "Bridge clear coming soon!", + "Can you master this modern yet familiar stacker?", + "Certainly within this heart lies my M@STERPIECE.", + "Changelogs in English can be found on Discord.", + "Color clear coming soon!", + "COOL!!", + "Decreasing DAS and ARR is faster but harder to control.", + "Did I just see a Back-to-Back-to-Back?", + "Don't let a small glitch ruin your entire day!", + "Don't look directly at the bugs!", + "Enjoy the Techmino rotation system!", + "Excellent, but let's go better next time...", + "Find out what's in the settings!", + "Got any suggestions? Post them in our Discord!", + "Headphones recommended for a better experience.", + "Hello world!", + "I3 and L3 are the only two unique triminoes.", + "if a==true", + "Increase your frame rate for a better experience.", + "Initial [insert action] system can save you.", + "Is B2B2B2B possible?", + "It's possible to finish 40L without left/right button.", + "It's really loading! Not just a cutscene!", + "Join our discord!", + "Let the bass kick!", + "LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF", + "Lua No.1", + "Mix clear coming soon!", + "Music of this game is made using Beepbox.", + "Music too distracting? You can turn it off.", + "No easter eggs in this menu if you have the simplistic style turned on!", + "O-Spin Triple!", + "OHHHHHHHHHHHHHH", + "Online mode is planned - please be patient.", + "Play single-handedly!", + "Playing good takes some time!", + "Powered by LÖVE", + "Powered by Un..LÖVE", + "pps-0.01", + "REGRET!!", + "Secret number: 626", + "Server down randomly", + "Some requirements to achieve rank S are intentionally set to be difficult for even the best players.", + "Soon, you'll be able to play against friends and foes all over the world.", + "Split clear coming soon!", + "Techmino = Technique + Tetromino", + "Techmino has a Nspire-CX edition!", + "Techmino is so fun!", + "TetroDictionary is now available in English.", + "The stacker future is yours in Techmino!", + "There are four hidden modes in the game.", + "There is a total of 18 different pentominoes.", + "There is a total of 7 different tetrominoes.", + "Try using multiple Hold Queues!", + "Try using two rotation buttons. Using all three of them is better.", + "Warning: Programmer Art", + "What about 20 PCs?", + "What about 23 PCs in 100 lines?", + "What about 26 TSDs?", + "What is this cheap UI & music smh", + "while(false)", + "You are a Grand Master!", + "You can connect a keyboard to your phone or tablet!", + "You can navigate the menu with a keyboard, but only in this screen.", + "You can open the save directory from the Stats page.", + "You can perform a spin with 28 of the 29 minoes in this game; the exception being O1.", + "You can set the spawning orientation for each tetromino.", + "ZS JL T O I", + {C.C,"Also try 15puzzle!"}, + {C.C,"Also try Minecraft!"}, + {C.C,"Also try Minesweeper!"}, + {C.C,"Also try Orzmic!"}, + {C.C,"Also try osu!"}, + {C.C,"Also try Phigros!"}, + {C.C,"Also try Rubik's cube!"}, + {C.C,"Also try Terraria!"}, + {C.C,"Also try VVVVVV!"}, + {C.H,"REGRET!!"}, + {C.lR,"Z ",C.lG,"S ",C.lS,"J ",C.lO,"L ",C.lP,"T ",C.lY,"O ",C.lC,"I"}, + {C.lY,"COOL!!"}, + {C.N,"Lua",C.Z," No.1"}, + {C.P,"T-spin!"}, + {C.R,"\"DMCA abusing\""}, + {C.R,"\"Intellectual property law\""}, + {C.R,"DT",C.Z," Cannon=",C.P,"TS",C.R,"D",C.Z,"+",C.P,"TS",C.R,"T",C.Z," Cannon"}, + {C.R,"LrL ",C.G,"RlR ",C.B,"LLr ",C.O,"RRl ",C.P,"RRR ",C.P,"LLL ",C.C,"FFF ",C.Y,"RfR ",C.Y,"RRf ",C.Y,"rFF"}, + {C.Y,"O-Spin Triple!"}, + {C.Z,"What? ",C.lC,"Xspin?"}, + } } \ No newline at end of file diff --git a/parts/language/lang_es.lua b/parts/language/lang_es.lua index da14a20a..9dddc424 100644 --- a/parts/language/lang_es.lua +++ b/parts/language/lang_es.lua @@ -1,735 +1,735 @@ return{ - fallback=4, - sureQuit="Pulsa de nuevo para salir", - newDay="[Anti-adicción] ¡Nuevo día, nuevo comienzo!", - playedLong="[Anti-adicción] Estuviste jugando un buen rato hoy. Recuerda descansar de vez en cuando.", - playedTooMuch="[Anti-adicción] ¡Has jugado mucho por hoy! No puedes jugar más.", + fallback=4, + sureQuit="Pulsa de nuevo para salir", + newDay="[Anti-adicción] ¡Nuevo día, nuevo comienzo!", + playedLong="[Anti-adicción] Estuviste jugando un buen rato hoy. Recuerda descansar de vez en cuando.", + playedTooMuch="[Anti-adicción] ¡Has jugado mucho por hoy! No puedes jugar más.", - atkModeName={"Al azar","Medallas","KOs","Atacantes"}, - royale_remain="$1 Jugadores Restantes", - cmb={nil,"Combo de 1","Combo de 2","Combo de 3","Combo de 4","Combo de 5","Combo de 6","Combo de 7","Combo de 8","Combo de 9","¡Combo de 10!","¡Combo de 11!","¡Combo de 12!","¡Combo de 13!","¡Combo de 14!","¡Combo de 15!","¡Combo de 16!","¡Combo de 17!","¡Combo de 18!","¡Combo de 19!","MEGACOMBO"}, - spin="-spin ", - clear={"Single","Doble","Triple","Techrash","Pentacrash","Hexacrash"}, - mini="Mini",b2b="B2B ",b3b="B2B2B ", - PC="Perfect Clear",HPC="Half Clear", - replaying="[Repetición]", - -- tasUsing="[TAS]", + atkModeName={"Al azar","Medallas","KOs","Atacantes"}, + royale_remain="$1 Jugadores Restantes", + cmb={nil,"Combo de 1","Combo de 2","Combo de 3","Combo de 4","Combo de 5","Combo de 6","Combo de 7","Combo de 8","Combo de 9","¡Combo de 10!","¡Combo de 11!","¡Combo de 12!","¡Combo de 13!","¡Combo de 14!","¡Combo de 15!","¡Combo de 16!","¡Combo de 17!","¡Combo de 18!","¡Combo de 19!","MEGACOMBO"}, + spin="-spin ", + clear={"Single","Doble","Triple","Techrash","Pentacrash","Hexacrash"}, + mini="Mini",b2b="B2B ",b3b="B2B2B ", + PC="Perfect Clear",HPC="Half Clear", + replaying="[Repetición]", + -- tasUsing="[TAS]", - stage="Nivel $1", - great="¡Genial!", - awesome="¡Fantástico!", - almost="¡Casi!", - continue="¡Continúa!", - maxspeed="¡Máx. Velocidad!", - speedup="¡Más rápido!", - missionFailed="Misión Fallida", + stage="Nivel $1", + great="¡Genial!", + awesome="¡Fantástico!", + almost="¡Casi!", + continue="¡Continúa!", + maxspeed="¡Máx. Velocidad!", + speedup="¡Más rápido!", + missionFailed="Misión Fallida", - speedLV="Vel. de juego", - piece="Piezas",line="Líneas",atk="Ataque",eff="Eficiencia", - rpm="RPM",tsd="TSD", - grade="Grado",techrash="Techrash", - wave="Ronda",nextWave="Sig. ronda", - combo="Combo",maxcmb="Combo Máx.", - pc="Perfect Clear",ko="KO", + speedLV="Vel. de juego", + piece="Piezas",line="Líneas",atk="Ataque",eff="Eficiencia", + rpm="RPM",tsd="TSD", + grade="Grado",techrash="Techrash", + wave="Ronda",nextWave="Sig. ronda", + combo="Combo",maxcmb="Combo Máx.", + pc="Perfect Clear",ko="KO", - win="Victoria", - lose="Derrota", + win="Victoria", + lose="Derrota", - finish="Fin", - gamewin="Victoria", - gameover="Fin del Juego", + finish="Fin", + gamewin="Victoria", + gameover="Fin del Juego", - pause="Pausa", - pauseCount="Veces pausadas", - finesse_ap="Finesse Perfecto", - finesse_fc="Full Combo", + pause="Pausa", + pauseCount="Veces pausadas", + finesse_ap="Finesse Perfecto", + finesse_fc="Full Combo", - page="Página:", + page="Página:", - ai_fixed="La IA no es compatible con secuencias de piezas prefijadas.", - --ai_prebag="The AI is incompatible with custom sequences which have nontetromino.",a IA no es compatible con secuencias de piezas personalizadas.", - ai_mission="La IA no es compatible con misiones personalizadas.", - switchSpawnSFX="Habilita los sonidos de aparición de las piezas ;)", - needRestart="Reinicia Techmino para que los cambios tengan efecto.", + ai_fixed="La IA no es compatible con secuencias de piezas prefijadas.", + --ai_prebag="The AI is incompatible with custom sequences which have nontetromino.",a IA no es compatible con secuencias de piezas personalizadas.", + ai_mission="La IA no es compatible con misiones personalizadas.", + switchSpawnSFX="Habilita los sonidos de aparición de las piezas ;)", + needRestart="Reinicia Techmino para que los cambios tengan efecto.", - saveDone="Datos guardados", - saveError="Error al guardar:", - -- saveError_duplicate="Duplicate filename", - loadError="Error al cargar:", - exportSuccess="Exportado con éxito", - importSuccess="Importado con éxito", - dataCorrupted="Los datos están corruptos.", - pasteWrongPlace="¿Pegaste en la carpeta correcta?", - noFile="Archivo no encontrado", + saveDone="Datos guardados", + saveError="Error al guardar:", + -- saveError_duplicate="Duplicate filename", + loadError="Error al cargar:", + exportSuccess="Exportado con éxito", + importSuccess="Importado con éxito", + dataCorrupted="Los datos están corruptos.", + pasteWrongPlace="¿Pegaste en la carpeta correcta?", + noFile="Archivo no encontrado", - VKTchW="Sens. al tacto", - VKOrgW="Sens. al origen", - VKCurW="Sens. Cur. Pos.", + VKTchW="Sens. al tacto", + VKOrgW="Sens. al origen", + VKCurW="Sens. Cur. Pos.", - noScore="Sin puntajes aún.", - -- modeLocked="Locked", - -- unlockHint="Achieve Rank D or above in prerequisite modes to unlock.", - highScore="Mejores puntajes", - newRecord="¡Nuevo Récord!", + noScore="Sin puntajes aún.", + -- modeLocked="Locked", + -- unlockHint="Achieve Rank D or above in prerequisite modes to unlock.", + highScore="Mejores puntajes", + newRecord="¡Nuevo Récord!", - -- replayBroken="Cannot load replay", + -- replayBroken="Cannot load replay", - getNoticeFail="Error al buscar novedades.", - oldVersion="¡Está disponible la nueva versión $1!", - versionNotMatch="¡Las versiones no coinciden!", - needUpdate="¡Nueva versión requerida!", - notFinished="Próximamente", + getNoticeFail="Error al buscar novedades.", + oldVersion="¡Está disponible la nueva versión $1!", + versionNotMatch="¡Las versiones no coinciden!", + needUpdate="¡Nueva versión requerida!", + notFinished="Próximamente", - jsonError="Error en Json", + jsonError="Error en Json", - noUsername="Por favor ingresa un nombre de usuario", - wrongEmail="Correo electrónico incorrecto", - noPassword="Por favor ingresa una contraseña", - diffPassword="Las contraseñas no coinciden", - -- registerRequestSent="Registration request sent", - registerSuccessed="¡Registro exitoso!", - loginSuccessed="¡Ingreso con éxito!", - accessSuccessed="¡Autorizado exitoso!", + noUsername="Por favor ingresa un nombre de usuario", + wrongEmail="Correo electrónico incorrecto", + noPassword="Por favor ingresa una contraseña", + diffPassword="Las contraseñas no coinciden", + -- registerRequestSent="Registration request sent", + registerSuccessed="¡Registro exitoso!", + loginSuccessed="¡Ingreso con éxito!", + accessSuccessed="¡Autorizado exitoso!", - wsConnecting="Websocket Conectando", - wsFailed="WebSocket conexión fallida", - wsClose="WebSocket cerrado:", - netTimeout="Tiempo de conexión agotado", + wsConnecting="Websocket Conectando", + wsFailed="WebSocket conexión fallida", + wsClose="WebSocket cerrado:", + netTimeout="Tiempo de conexión agotado", - onlinePlayerCount="En línea", - createRoomSuccessed="¡Sala creada con éxito!", - started="En juego", - joinRoom="entró a la sala.", - leaveRoom="salió de la sala.", - ready="LISTO", - connStream="CONECTANDO", - waitStream="ESPERANDO", - spectating="Especteando", - chatRemain="Usuarios en línea:", - chatStart="------Comienzo del historial------", - chatHistory="------Nuevos mensajes------", + onlinePlayerCount="En línea", + createRoomSuccessed="¡Sala creada con éxito!", + started="En juego", + joinRoom="entró a la sala.", + leaveRoom="salió de la sala.", + ready="LISTO", + connStream="CONECTANDO", + waitStream="ESPERANDO", + spectating="Especteando", + chatRemain="Usuarios en línea:", + chatStart="------Comienzo del historial------", + chatHistory="------Nuevos mensajes------", - errorMsg="Ha ocurrido un error y Techmino necesita reiniciarse.\nSe creó un registro de error, puedes enviarlo al autor.", + errorMsg="Ha ocurrido un error y Techmino necesita reiniciarse.\nSe creó un registro de error, puedes enviarlo al autor.", - -- modInstruction="", - -- modInfo={},--See lang_en.lua - pauseStat={ - "Tiempo:", - "Tecla/Rot./Reserva:", - "Piezas:", - "Altura/Limpiado:", - "Ataque Enviado:", - "Ataque Recibido:", - "Líneas Limpiadas:", - "Spins:", - "B2B/B3B/PC/HPC:", - "Finesse:", - }, - radar={"DEF","OFF","ATK","SEND","SPD","DIG"}, - radarData={"D'PM","ADPM","APM","SPM","L'PM","DPM"}, - stat={ - "Veces Iniciado:", - "Veces Jugado:", - "Tiempo de Juego:", - "Tecla/Rot./Reserva:", - "Bloq./Lín./Atq.:", - "Rec./Off./Sub.:", - "Limp./Atq. Limp.:", - "Effic./Eff.Limp.:", - "Slam/Gr.Slam:", - "PC/HPC:", - "Err.Fns./RatioFns:", - }, - aboutTexts={ - "Este es simplemente un juego de puzzle ordinario, no pienses de él como un juego promedio.", - "Está inspirado en otros como C2/IO/JS/WWC/KOS.", - "", - "Creado con LÖVE", - "Puedes reportar errores o enviar sugerencias al grupo de testeo del autor o por email ~", - "Descarga disponible únicamente vía el grupo de testeo y discord.gg/f9pUvkh", - "Descargas desde otros sitios pueden contener malware/viruses, y en smartphones sólo requiere permisos de internet y vibración.", - "El autor no se responabiliza por daños ocasionados debido a modificaciones del juego.", - "Por favor descarga las últimas versiones desde los sitios oficiales. El juego es gratuito", - }, - staff={ - "Autor:MrZ Email: 1046101471@qq.com", - "Creado con LÖVE", - "", - "Programación: MrZ, Particle_G, [FinnTenzor]", - "Artistas: MrZ, Gnyar, ScF, [旋律星萤, T0722]", - "Música: MrZ, ERM, [T0722, Aether]", - "Voces/Sonidos: Miya, Xiaoya, Naki, MrZ", - "Performance: 模电, HBM", - "Traducción: User670, MattMayuga, Mizu, Mr.Faq, ScF", - "", - "Agradecimientos:", - "User670, Flyz, Big_True, Trebor, NOT-A-ROBOT, 思竣, scdhh", - "yuhao7370, Farter, Teatube, 蕴空之灵, T9972, [Todo el Staff de Testeo]", - }, - used=[[ - Herramientas utilizadas: - Beepbox - Goldwave - GFIE - FL Mobile - Librerías usadas: - Cold_Clear [MinusKelvin] - json.lua [rxi] - profile.lua [itraykov] - simple-love-lights [dylhunn] - ]], - support="Apoyen al Autor", - group="Grupo Oficial de QQ (si no lo hackean) : 913154753", - WidgetText={ - main={ - offline="1 Jugador", - qplay="Jgo. Ráp.", - online="Multijugador", - custom="Personalizado", - setting="Opciones", - stat="Estadísticas", - music="Música y SFX", - dict="Zictionary", - -- replays="Replays", - }, - main_simple={ - sprint="Sprint", - marathon="Maratón", - }, - mode={ - mod="Mods (F1)", - start="Empezar", - }, - mod={ - title="Mods", - reset="Reinic. (tab)", - unranked="Sin rango", - }, - pause={ - setting="Opciones (S)", - replay="Grabación (P)", - save="Guardar (O)", - resume="Resumir (esc)", - restart="Reiniciar (R)", - quit="Finalizar (Q)", - -- tas="TAS (T)", - }, - net_menu={ - league="Liga Tech", - ffa="FFA", - rooms="Salas", - logout="Desconec.", - }, - net_league={ - match="Buscar Match", - }, - net_rooms={ - password="Contraseña", - refreshing="Refrescando Salas", - noRoom="No Hay Salas Actualmente", - refresh="Refrescar", - new="Nueva Sala", - join="Unirse", - }, - net_newRoom={ - title="Ajustes de sala", - roomName="Nombre (Por defecto: *usuario*'s room)", - password="Contraseña", - description="Descripción", + -- modInstruction="", + -- modInfo={},--See lang_en.lua + pauseStat={ + "Tiempo:", + "Tecla/Rot./Reserva:", + "Piezas:", + "Altura/Limpiado:", + "Ataque Enviado:", + "Ataque Recibido:", + "Líneas Limpiadas:", + "Spins:", + "B2B/B3B/PC/HPC:", + "Finesse:", + }, + radar={"DEF","OFF","ATK","SEND","SPD","DIG"}, + radarData={"D'PM","ADPM","APM","SPM","L'PM","DPM"}, + stat={ + "Veces Iniciado:", + "Veces Jugado:", + "Tiempo de Juego:", + "Tecla/Rot./Reserva:", + "Bloq./Lín./Atq.:", + "Rec./Off./Sub.:", + "Limp./Atq. Limp.:", + "Effic./Eff.Limp.:", + "Slam/Gr.Slam:", + "PC/HPC:", + "Err.Fns./RatioFns:", + }, + aboutTexts={ + "Este es simplemente un juego de puzzle ordinario, no pienses de él como un juego promedio.", + "Está inspirado en otros como C2/IO/JS/WWC/KOS.", + "", + "Creado con LÖVE", + "Puedes reportar errores o enviar sugerencias al grupo de testeo del autor o por email ~", + "Descarga disponible únicamente vía el grupo de testeo y discord.gg/f9pUvkh", + "Descargas desde otros sitios pueden contener malware/viruses, y en smartphones sólo requiere permisos de internet y vibración.", + "El autor no se responabiliza por daños ocasionados debido a modificaciones del juego.", + "Por favor descarga las últimas versiones desde los sitios oficiales. El juego es gratuito", + }, + staff={ + "Autor:MrZ Email: 1046101471@qq.com", + "Creado con LÖVE", + "", + "Programación: MrZ, Particle_G, [FinnTenzor]", + "Artistas: MrZ, Gnyar, ScF, [旋律星萤, T0722]", + "Música: MrZ, ERM, [T0722, Aether]", + "Voces/Sonidos: Miya, Xiaoya, Naki, MrZ", + "Performance: 模电, HBM", + "Traducción: User670, MattMayuga, Mizu, Mr.Faq, ScF", + "", + "Agradecimientos:", + "User670, Flyz, Big_True, Trebor, NOT-A-ROBOT, 思竣, scdhh", + "yuhao7370, Farter, Teatube, 蕴空之灵, T9972, [Todo el Staff de Testeo]", + }, + used=[[ + Herramientas utilizadas: + Beepbox + Goldwave + GFIE + FL Mobile + Librerías usadas: + Cold_Clear [MinusKelvin] + json.lua [rxi] + profile.lua [itraykov] + simple-love-lights [dylhunn] + ]], + support="Apoyen al Autor", + group="Grupo Oficial de QQ (si no lo hackean) : 913154753", + WidgetText={ + main={ + offline="1 Jugador", + qplay="Jgo. Ráp.", + online="Multijugador", + custom="Personalizado", + setting="Opciones", + stat="Estadísticas", + music="Música y SFX", + dict="Zictionary", + -- replays="Replays", + }, + main_simple={ + sprint="Sprint", + marathon="Maratón", + }, + mode={ + mod="Mods (F1)", + start="Empezar", + }, + mod={ + title="Mods", + reset="Reinic. (tab)", + unranked="Sin rango", + }, + pause={ + setting="Opciones (S)", + replay="Grabación (P)", + save="Guardar (O)", + resume="Resumir (esc)", + restart="Reiniciar (R)", + quit="Finalizar (Q)", + -- tas="TAS (T)", + }, + net_menu={ + league="Liga Tech", + ffa="FFA", + rooms="Salas", + logout="Desconec.", + }, + net_league={ + match="Buscar Match", + }, + net_rooms={ + password="Contraseña", + refreshing="Refrescando Salas", + noRoom="No Hay Salas Actualmente", + refresh="Refrescar", + new="Nueva Sala", + join="Unirse", + }, + net_newRoom={ + title="Ajustes de sala", + roomName="Nombre (Por defecto: *usuario*'s room)", + password="Contraseña", + description="Descripción", - life="Vida", - pushSpeed="Velocidad de Subida", - garbageSpeed="Velocidad de Basura", - visible="Visibilidad", - freshLimit="Límite de Reinicio LD", + life="Vida", + pushSpeed="Velocidad de Subida", + garbageSpeed="Velocidad de Basura", + visible="Visibilidad", + freshLimit="Límite de Reinicio LD", - fieldH="Altura del tablero", - bufferLimit="Buffer Límite", - heightLimit="Altura Límite", + fieldH="Altura del tablero", + bufferLimit="Buffer Límite", + heightLimit="Altura Límite", - drop="Retraso de Caída", - lock="Retraso de Bloqueo", - wait="Retraso de Spawneo", - fall="Retraso de Línea", + drop="Retraso de Caída", + lock="Retraso de Bloqueo", + wait="Retraso de Spawneo", + fall="Retraso de Línea", - capacity="Capacidad", - create="Crear", + capacity="Capacidad", + create="Crear", - ospin="O-Spin", - fineKill="100% Finesse", - b2bKill="No Romper B2B ", - easyFresh="Reinicio de Bloqueo Normal", - deepDrop="Deep Drop", - bone="Bone Block", + ospin="O-Spin", + fineKill="100% Finesse", + b2bKill="No Romper B2B ", + easyFresh="Reinicio de Bloqueo Normal", + deepDrop="Deep Drop", + bone="Bone Block", - nextCount="Siguiente", - holdCount="Reserva", - infHold="Reserva Inft.", - phyHold="Reserva Limit.", - }, - net_game={ - ready="Estoy Listo", - spectate="Espectear", - cancel="Cancelar", - }, - setting_game={ - title="Ajustes del Juego", - graphic="←Video", - sound="Sonido→", + nextCount="Siguiente", + holdCount="Reserva", + infHold="Reserva Inft.", + phyHold="Reserva Limit.", + }, + net_game={ + ready="Estoy Listo", + spectate="Espectear", + cancel="Cancelar", + }, + setting_game={ + title="Ajustes del Juego", + graphic="←Video", + sound="Sonido→", - ctrl="Sensibilidad", - key="Teclas", - touch="Controles Táctiles", - reTime="Retraso de Inicio", - RS="Sistema de Rotación", - layout="Diseño", - autoPause="Pausar cuando la ventana no está enfocada", - -- menuPos="Menu button pos.", - swap="Combinación de Teclas (Cambiar Modo de Ataque)", - -- autoSave="Auto save new-best", - simpMode="Modo Sencillo", - }, - setting_video={ - title="Ajustes de Video", - sound="←Sonido", - game="Juego→", + ctrl="Sensibilidad", + key="Teclas", + touch="Controles Táctiles", + reTime="Retraso de Inicio", + RS="Sistema de Rotación", + layout="Diseño", + autoPause="Pausar cuando la ventana no está enfocada", + -- menuPos="Menu button pos.", + swap="Combinación de Teclas (Cambiar Modo de Ataque)", + -- autoSave="Auto save new-best", + simpMode="Modo Sencillo", + }, + setting_video={ + title="Ajustes de Video", + sound="←Sonido", + game="Juego→", - block="Dibujar Bloques", - smooth="Caída Fluida", - upEdge="Bloques en 3D", - bagLine="Línea de Bag de Pzas.", + block="Dibujar Bloques", + smooth="Caída Fluida", + upEdge="Bloques en 3D", + bagLine="Línea de Bag de Pzas.", - -- ghostType="Ghost Type", - ghost="Fantasma", - center="Centrar", - grid="Grilla", - -- lineNum="line No.", + -- ghostType="Ghost Type", + ghost="Fantasma", + center="Centrar", + grid="Grilla", + -- lineNum="line No.", - lockFX="FX Vis. de Bloqueo", - dropFX="FX Vis. de Caída", - moveFX="FX Vis. de Movim.", - clearFX="FX Vis. de Limpieza", - splashFX="FX Vis. de Splash", - shakeFX="Bamboleo del Tablero", - atkFX="FX Vis. de Ataque", - frame="Ratio de FPSs(%)", + lockFX="FX Vis. de Bloqueo", + dropFX="FX Vis. de Caída", + moveFX="FX Vis. de Movim.", + clearFX="FX Vis. de Limpieza", + splashFX="FX Vis. de Splash", + shakeFX="Bamboleo del Tablero", + atkFX="FX Vis. de Ataque", + frame="Ratio de FPSs(%)", - text="Texto de Acciones", - score="Puntaje en Pantalla", - bufferWarn="Alerta de Búfer", - showSpike="Contador de Spike", - nextPos="Ver Spawn de Pza. Sig.", - highCam="Cám. Vista Aérea", - warn="Alerta de Peligro", + text="Texto de Acciones", + score="Puntaje en Pantalla", + bufferWarn="Alerta de Búfer", + showSpike="Contador de Spike", + nextPos="Ver Spawn de Pza. Sig.", + highCam="Cám. Vista Aérea", + warn="Alerta de Peligro", - clickFX="FX de Clickeo", - power="Inf. de Batería", - clean="Fast Draw", - fullscreen="Pant. Completa", - bg="Fondo", + clickFX="FX de Clickeo", + power="Inf. de Batería", + clean="Fast Draw", + fullscreen="Pant. Completa", + bg="Fondo", - -- blockSatur="Block Saturation", - -- fieldSatur="Field Saturation", - }, - setting_sound={ - title="Ajustes de Sonido", - game="←Juego", - graphic="Video→", + -- blockSatur="Block Saturation", + -- fieldSatur="Field Saturation", + }, + setting_sound={ + title="Ajustes de Sonido", + game="←Juego", + graphic="Video→", - bgm="BGM", - sfx="SFX", - stereo="Estéreo", - spawn="Spawn de Pzas.", - warn="Alerta de Peligro", - vib="Vibración", - voc="Voces", + bgm="BGM", + sfx="SFX", + stereo="Estéreo", + spawn="Spawn de Pzas.", + warn="Alerta de Peligro", + vib="Vibración", + voc="Voces", - fine="Sonido de Error de Finesse", - -- cv="Voice Pack", - -- apply="Apply", - }, - setting_control={ - title="Ajustes de Controles", - preview="Ejemplo", + fine="Sonido de Error de Finesse", + -- cv="Voice Pack", + -- apply="Apply", + }, + setting_control={ + title="Ajustes de Controles", + preview="Ejemplo", - das="DAS",arr="ARR", - dascut="Intrrp. de DAS", - -- dropcut="Auto-lock cut", - sddas="DAS de C. Ráp.",sdarr="ARR de C. Rápida", - ihs="Resv. Inicial", - irs="Rot. Inicial", - ims="Mov. Inicial", - reset="Reinicio", - }, - setting_key={ - a1="Mover a Izq.", - a2="Mover a Der.", - a3="Rotar Der.", - a4="Rotar Izq.", - a5="Rotar 180°", - a6="Caída Instantánea", - a7="Caída Rápida", - a8="Reserva", - a9="Función1", - a10="Función2", - a11="Izq. Instant.", - a12="Der. Instant.", - a13="Sonic Drop", - a14="Abajo 1", - a15="Abajo 4", - a16="Abajo 10", - a17="Caída a Izq.", - a18="Caída a Der.", - a19="Zangi a Izq.", - a20="Zangi a Der.", - restart="Reiniciar", - }, - setting_skin={ - -- skinSet="Block Skin", - title="Ajustes de Texturas", - skinR="Color por def.", - faceR="Direc. por def.", - }, - setting_touch={ - default="Por Defecto", - snap="Snap", - save1="Save1", - load1="Load1", - save2="Save2", - load2="Load2", - size="Tamaño", - shape="Forma", - }, - setting_touchSwitch={ - b1= "Mover Izq.:",b2="Mover Der.:",b3="Rotar Der.:",b4="Rotar Izq.:", - b5= "Rotar 180°:",b6="Caída Inst.:",b7="Caída Ráp.:",b8="Reserva:", - b9= "Función1:",b10="Función2:",b11="Izq. Instant.:",b12="Der. Instant.:", - b13="Sonic Drop:",b14="Abajo 1:",b15="Abajo 4:",b16="Abajo 10:", - b17="Soltar a Izq.:",b18="Soltar a Der.:",b19="Zangi a Izq.:",b20="Zangi a Der.:", + das="DAS",arr="ARR", + dascut="Intrrp. de DAS", + -- dropcut="Auto-lock cut", + sddas="DAS de C. Ráp.",sdarr="ARR de C. Rápida", + ihs="Resv. Inicial", + irs="Rot. Inicial", + ims="Mov. Inicial", + reset="Reinicio", + }, + setting_key={ + a1="Mover a Izq.", + a2="Mover a Der.", + a3="Rotar Der.", + a4="Rotar Izq.", + a5="Rotar 180°", + a6="Caída Instantánea", + a7="Caída Rápida", + a8="Reserva", + a9="Función1", + a10="Función2", + a11="Izq. Instant.", + a12="Der. Instant.", + a13="Sonic Drop", + a14="Abajo 1", + a15="Abajo 4", + a16="Abajo 10", + a17="Caída a Izq.", + a18="Caída a Der.", + a19="Zangi a Izq.", + a20="Zangi a Der.", + restart="Reiniciar", + }, + setting_skin={ + -- skinSet="Block Skin", + title="Ajustes de Texturas", + skinR="Color por def.", + faceR="Direc. por def.", + }, + setting_touch={ + default="Por Defecto", + snap="Snap", + save1="Save1", + load1="Load1", + save2="Save2", + load2="Load2", + size="Tamaño", + shape="Forma", + }, + setting_touchSwitch={ + b1= "Mover Izq.:",b2="Mover Der.:",b3="Rotar Der.:",b4="Rotar Izq.:", + b5= "Rotar 180°:",b6="Caída Inst.:",b7="Caída Ráp.:",b8="Reserva:", + b9= "Función1:",b10="Función2:",b11="Izq. Instant.:",b12="Der. Instant.:", + b13="Sonic Drop:",b14="Abajo 1:",b15="Abajo 4:",b16="Abajo 10:", + b17="Soltar a Izq.:",b18="Soltar a Der.:",b19="Zangi a Izq.:",b20="Zangi a Der.:", - norm="Normal", - pro="Profesional", - hide="Mostrar Tec. Virtual", - icon="Ícono", - sfx="SFX", - vib="Vibr.", - alpha="Alpha", + norm="Normal", + pro="Profesional", + hide="Mostrar Tec. Virtual", + icon="Ícono", + sfx="SFX", + vib="Vibr.", + alpha="Alpha", - track="Música Autom.", - dodge="Autoskip", - }, - customGame={ - title="Juego Personalizado", - subTitle="Básico", - defSeq="Sec. por defecto", - noMsn="Sin misión", + track="Música Autom.", + dodge="Autoskip", + }, + customGame={ + title="Juego Personalizado", + subTitle="Básico", + defSeq="Sec. por defecto", + noMsn="Sin misión", - drop="Retraso de Caída", - lock="Retraso de Bloqueo", - wait="Retraso de Spawneo", - fall="Retraso de Línea", + drop="Retraso de Caída", + lock="Retraso de Bloqueo", + wait="Retraso de Spawneo", + fall="Retraso de Línea", - bg="Fondo", - bgm="Música", + bg="Fondo", + bgm="Música", - copy="Copiar Campo+Sec.+Mis.", - paste="Pegar Campo+Sec.+Mis.", - clear="Inicio-Fin", - puzzle="Inicio-Puzzle", + copy="Copiar Campo+Sec.+Mis.", + paste="Pegar Campo+Sec.+Mis.", + clear="Inicio-Fin", + puzzle="Inicio-Puzzle", - reset="Reiniciar (Supr)", - advance="Más opciones (A)", - mod="Mods (F1)", - field="Editar Tablero (F)", - sequence="Editar Secuencia (S)", - mission="Editar Misiones (M)", + reset="Reiniciar (Supr)", + advance="Más opciones (A)", + mod="Mods (F1)", + field="Editar Tablero (F)", + sequence="Editar Secuencia (S)", + mission="Editar Misiones (M)", - nextCount="Siguiente", - holdCount="Reserva", - infHold="Reserva Inft.", - phyHold="Reserva Limit.", + nextCount="Siguiente", + holdCount="Reserva", + infHold="Reserva Inft.", + phyHold="Reserva Limit.", - fieldH="Altura del tablero", - visible="Visibilidad", - freshLimit="Límite de Reinicio LD", - opponent="Oponente", - life="Vida", - pushSpeed="Velocidad de Subida", - garbageSpeed="Velocidad de Basura", + fieldH="Altura del tablero", + visible="Visibilidad", + freshLimit="Límite de Reinicio LD", + opponent="Oponente", + life="Vida", + pushSpeed="Velocidad de Subida", + garbageSpeed="Velocidad de Basura", - bufferLimit="Búfer Límite", - heightLimit="Altura Límite", - ospin="O-Spin", - fineKill="100% Finesse", - b2bKill="No Romper B2B ", - easyFresh="Reinicio de Bloqueo Normal", - deepDrop="Deep Drop", - bone="Bone Block", - }, - custom_field={ - title="Juego Personalizado", + bufferLimit="Búfer Límite", + heightLimit="Altura Límite", + ospin="O-Spin", + fineKill="100% Finesse", + b2bKill="No Romper B2B ", + easyFresh="Reinicio de Bloqueo Normal", + deepDrop="Deep Drop", + bone="Bone Block", + }, + custom_field={ + title="Juego Personalizado", - subTitle="Tablero", + subTitle="Tablero", - any="Borrar", - space="×", - pushLine="Añadir Línea (K)", - delLine="Borrar Línea (L)", + any="Borrar", + space="×", + pushLine="Añadir Línea (K)", + delLine="Borrar Línea (L)", - copy="Copiar", - paste="Pegar", - clear="Limpiar", - demo="No Mostrar X", + copy="Copiar", + paste="Pegar", + clear="Limpiar", + demo="No Mostrar X", - newPage="Nueva pág. (N)", - delPage="Borrar pág. (M)", - prevPage="Pág. Anterior", - nextPage="Pág. Siguiente", - }, - custom_sequence={ - title="Juego Personalizado", - subTitle="Secuencia", - sequence="Secuencia", - reset="Reiniciar", - rnd="Al azar", - copy="Copiar", - paste="Pegar", - }, - custom_mission={ - title="Juego Personalizado", - subTitle="Misiones", + newPage="Nueva pág. (N)", + delPage="Borrar pág. (M)", + prevPage="Pág. Anterior", + nextPage="Pág. Siguiente", + }, + custom_sequence={ + title="Juego Personalizado", + subTitle="Secuencia", + sequence="Secuencia", + reset="Reiniciar", + rnd="Al azar", + copy="Copiar", + paste="Pegar", + }, + custom_mission={ + title="Juego Personalizado", + subTitle="Misiones", - copy="Copiar", - paste="Pegar", - mission="Forzar misión", - }, - about={ - staff="Staff", - his="Hist. de Acts.", - qq="QQ del Autor", - }, - dict={ - title="TetroDictionary", - link="Abrir URL", - }, - stat={ - path="Abrir carpeta del juego", - save="Manejo de Datos", - }, - music={ - title="Sala de Música", - arrow="→", - now="Reproduciendo:", + copy="Copiar", + paste="Pegar", + mission="Forzar misión", + }, + about={ + staff="Staff", + his="Hist. de Acts.", + qq="QQ del Autor", + }, + dict={ + title="TetroDictionary", + link="Abrir URL", + }, + stat={ + path="Abrir carpeta del juego", + save="Manejo de Datos", + }, + music={ + title="Sala de Música", + arrow="→", + now="Reproduciendo:", - bgm="BGM", - up="↑", - play="Reprod.", - down="↓", - sound="SFXs", - }, - sound={ - title="Sala de SFX", - sfx="SFX", - voc="Voces", + bgm="BGM", + up="↑", + play="Reprod.", + down="↓", + sound="SFXs", + }, + sound={ + title="Sala de SFX", + sfx="SFX", + voc="Voces", - move="Mover", - lock="Traba", - drop="Drop", - fall="Caída", - rotate="Rotación", - rotatekick="Rot. con Kickeo", - hold="Reserva", - prerotate="Rot. Inicial", - prehold="Resv. Inicial", + move="Mover", + lock="Traba", + drop="Drop", + fall="Caída", + rotate="Rotación", + rotatekick="Rot. con Kickeo", + hold="Reserva", + prerotate="Rot. Inicial", + prehold="Resv. Inicial", - _1="Single", - _2="Doble", - _3="Triple", - _4="Techrash", - music="BGMs", - }, - login={ - title="Entrar", - register="Registrarse", - email="Correo Elec.", - password="Contraseña", - keepPW="Recordar credenciales", - login="Entrar", - }, - register={ - title="Registrarse", - login="Entrar", - username="Nombre de Usuario", - email="Correo Elec.", - password="Contraseña", - password2="Repetir Contr.", - register="Registrarse", - -- registering="Waiting for response...", - }, - account={ - title="Cuenta", - }, - app_15p={ - reset="Mezclar", - color="Color", - blind="A ciegas", - slide="Mover", - pathVis="Mostrar Movs.", - revKB="Deshacer", - }, - app_schulteG={ - reset="Reiniciar", - rank="Tamaño", - blind="A ciegas", - disappear="No mostrar", - tapFX="Sonido al pulsar", - }, - app_pong={ - reset="Reiniciar", - }, - app_AtoZ={ - level="Nivel", - keyboard="Teclado", - reset="Reiniciar", - }, - app_2048={ - reset="Reiniciar", - blind="A ciegas", - tapControl="Control táctil", - skip="Saltar ronda", - }, - app_ten={ - reset="Reiniciar", - next="Siguiente", - blind="A ciegas", - fast="Rápido", - }, - app_dtw={ - reset="Reiniciar", - color="Color", - mode="Modo", - bgm="BGM", - arcade="Arcade", - }, - savedata={ - export="Exportar al portapapeles", - import="Importar de portapapeles", - unlock="Progreso", - data="Estads.", - setting="Ajustes", - vk="Diseño de Tecl. Virtual", + _1="Single", + _2="Doble", + _3="Triple", + _4="Techrash", + music="BGMs", + }, + login={ + title="Entrar", + register="Registrarse", + email="Correo Elec.", + password="Contraseña", + keepPW="Recordar credenciales", + login="Entrar", + }, + register={ + title="Registrarse", + login="Entrar", + username="Nombre de Usuario", + email="Correo Elec.", + password="Contraseña", + password2="Repetir Contr.", + register="Registrarse", + -- registering="Waiting for response...", + }, + account={ + title="Cuenta", + }, + app_15p={ + reset="Mezclar", + color="Color", + blind="A ciegas", + slide="Mover", + pathVis="Mostrar Movs.", + revKB="Deshacer", + }, + app_schulteG={ + reset="Reiniciar", + rank="Tamaño", + blind="A ciegas", + disappear="No mostrar", + tapFX="Sonido al pulsar", + }, + app_pong={ + reset="Reiniciar", + }, + app_AtoZ={ + level="Nivel", + keyboard="Teclado", + reset="Reiniciar", + }, + app_2048={ + reset="Reiniciar", + blind="A ciegas", + tapControl="Control táctil", + skip="Saltar ronda", + }, + app_ten={ + reset="Reiniciar", + next="Siguiente", + blind="A ciegas", + fast="Rápido", + }, + app_dtw={ + reset="Reiniciar", + color="Color", + mode="Modo", + bgm="BGM", + arcade="Arcade", + }, + savedata={ + export="Exportar al portapapeles", + import="Importar de portapapeles", + unlock="Progreso", + data="Estads.", + setting="Ajustes", + vk="Diseño de Tecl. Virtual", - couldSave="Guardado en la nube (requiere iniciar sesión) (PRECAUCIÓN: EN TESTEO)", - notLogin="[Inicia sesión para acceder al guardado en la nube]", - upload="Subir a la nube", - download="Descargar de la nube", - }, - error={ - console="Consola", - quit="Salir", - }, - }, - modes={ - ['sprint_10l']= {"Sprint", "10L", "¡Limpia 10 líneas!"}, - ['sprint_20l']= {"Sprint", "20L", "¡Limpia 20 líneas!"}, - ['sprint_40l']= {"Sprint", "40L", "¡Limpia 40 líneas!"}, - ['sprint_100l']= {"Sprint", "100L", "¡Limpia 100 líneas!"}, - ['sprint_400l']= {"Sprint", "400L", "¡Limpia 400 líneas!"}, - ['sprint_1000l']= {"Sprint", "1000L", "¡Limpia 1000 líneas!"}, - ['sprintPenta']= {"Sprint", "Pentominos", "¡Limpia 40 líneas con los 18 pentominos distintos!"}, - ['sprintMPH']= {"Sprint", "MPH", "Memoryless (sin memoria)\nPreviewless (sin pzas. siguientes)\nHoldless (sin reserva)."}, - ['dig_10l']= {"Queso", "10L", "Limpia 10 líneas de queso."}, - ['dig_40l']= {"Queso", "40L", "Limpia 40 líneas de queso."}, - ['dig_100l']= {"Queso", "100L", "Limpia 100 líneas de queso."}, - ['dig_400l']= {"Queso", "400L", "Limpia 400 líneas de queso."}, - ['dig_1000l']= {"Queso", "1000L", "Limpia 1000 líneas de queso."}, - ['drought_n']= {"Sequía", "100L", "¡Sin piezas I!"}, - ['drought_l']= {"Sequía+", "100L", "Guat de foc..."}, - -- ['stack_e']= {"Stack", "Fácil", "Pack them!"}, - -- ['stack_h']= {"Stack", "Difícil", "Pack them!"}, - -- ['stack_u']= {"Stack", "Supremo", "Pack them!"}, - ['marathon_n']= {"Maratón", "Normal", "Maratón de 200 líneas con velocidad en aumento."}, - ['marathon_h']= {"Maratón", "Difícil", "Maratón de 200 líneas a velocidad máxima."}, - ['solo_e']= {"VS.", "Fácil", "¡Derrota a la CPU!"}, - ['solo_n']= {"VS.", "Normal", "¡Derrota a la CPU!"}, - ['solo_h']= {"VS.", "Difícil", "¡Derrota a la CPU!"}, - ['solo_l']= {"VS.", "Lunático", "¡Derrota a la CPU!"}, - ['solo_u']= {"VS.", "Supremo", "¡Derrota a la CPU!"}, - ['techmino49_e']= {"Tech 49", "Fácil", "Batalla de 49 jugadores. ¡El último en pie gana!"}, - ['techmino49_h']= {"Tech 49", "Difícil", "Batalla de 49 jugadores. ¡El último en pie gana!"}, - ['techmino49_u']= {"Tech 49", "Supremo", "Batalla de 49 jugadores. ¡El último en pie gana!"}, - ['techmino99_e']= {"Tech 99", "Fácil", "Batalla de 99 jugadores. ¡El último en pie gana!"}, - ['techmino99_h']= {"Tech 99", "Difícil", "Batalla de 99 jugadores. ¡El último en pie gana!"}, - ['techmino99_u']= {"Tech 99", "Supremo", "Batalla de 99 jugadores. ¡El último en pie gana!"}, - ['round_e']= {"Por Turnos", "Fácil", "Modo ajedrez."}, - ['round_n']= {"Por Turnos", "Normal", "Modo ajedrez."}, - ['round_h']= {"Por Turnos", "Difícil", "Modo ajedrez."}, - ['round_l']= {"Por Turnos", "Lunático", "Modo ajedrez."}, - ['round_u']= {"Por Turnos", "Supremo", "Modo ajedrez."}, - ['master_n']= {"Master", "Normal", "Para principiantes en 20G"}, - ['master_h']= {"Master", "Difícil", "¡Desafío profesional de 20G!"}, - ['master_final']= {"Master", "FINAL", "El verdadero 20G Supremo: el final es inalcanzable."}, - ['master_ex']= {"GrandMaster", "EXTRA", "Para ser un gran maestro, acepta este desafío"}, - ['rhythm_e']= {"Al Ritmo", "Fácil", "Maratón rítmica de 200 líneas con bajo bpm."}, - ['rhythm_h']= {"Al Ritmo", "Difícil", "Maratón rítmica de 200 líneas con bpm moderado."}, - ['rhythm_u']= {"Al Ritmo", "Supremo", "Maratón rítmica de 200 líneas con bpm elevado."}, - ['blind_e']= {"A Ciegas", "Parcial", "Para novatos."}, - ['blind_n']= {"A Ciegas", "Total", "Para jugadores intermedios."}, - ['blind_h']= {"A Ciegas", "Inmediato", "Para jugadores experimentados"}, - ['blind_l']= {"A Ciegas", "Inmediato+", "Para profesionales."}, - ['blind_u']= {"A Ciegas", "?", "¿Estás preparado?"}, - ['blind_wtf']= {"A Ciegas", "ELFUF", "No, no lo estás."}, - ['classic_fast']= {"Clásico", "CTWC", "Modo clásico con alta velocidad."}, - ['survivor_e']= {"Supervivencia", "Fácil", "¿Cuánto tiempo podrás sobrevivir?"}, - ['survivor_n']= {"Supervivencia", "Normal", "¿Cuánto tiempo podrás sobrevivir?"}, - ['survivor_h']= {"Supervivencia", "Difícil", "¿Cuánto tiempo podrás sobrevivir?"}, - ['survivor_l']= {"Supervivencia", "Lunático", "¿Cuánto tiempo podrás sobrevivir?"}, - ['survivor_u']= {"Supervivencia", "Supremo", "¿Cuánto tiempo podrás sobrevivir?"}, - ['attacker_h']= {"Atacante", "Difícil", "¡Practica la ofensiva!"}, - ['attacker_u']= {"Atacante", "Supremo", "¡Practica la ofensiva!"}, - ['defender_n']= {"Defensor", "Normal", "¡Practica la defensa!"}, - ['defender_l']= {"Defensor", "Lunático", "¡Practica la defensa!"}, - ['dig_h']= {"Downstack", "Difícil", "¡Practica el downstackeo!"}, - ['dig_u']= {"Downstack", "Supremo", "¡Practica el downstackeo!"}, - ['bigbang']= {"Big Bang", "Fácil", "¡Tutorial de All-spins!\n[No finalizado]"}, - ['c4wtrain_n']= {"Entrenar C4W", "Normal", "Combos infinitos."}, - ['c4wtrain_l']= {"Entrenar C4W", "Lunático", "Combos infinitos."}, - ['pctrain_n']= {"Entrenar PC", "Normal", "Modo sencillo para practicar Perfect Clears."}, - ['pctrain_l']= {"Entrenar PC", "Lunático", "Modo duro para practicar Perfect Clears."}, - ['pc_n']= {"Desafío de PCs", "Normal", "¡Consigue los PCs que puedas en 100 líneas!"}, - ['pc_h']= {"Desafío de PCs", "Difícil", "¡Consigue los PCs que puedas en 100 líneas!"}, - ['pc_l']= {"Desafío de PCs", "Lunático", "¡Consigue los PCs que puedas en 100 líneas!"}, - ['pc_inf']= {"Desafío de PCs Infinito","", "Consigue todos los PCs que puedas."}, - ['tech_n']= {"Tech", "Normal", "¡Mantén el B2B!"}, - ['tech_n_plus']= {"Tech", "Normal+", "¡Sólo se permiten Spins y PCs!"}, - ['tech_h']= {"Tech", "Difícil", "¡Mantén el B2B!"}, - ['tech_h_plus']= {"Tech", "Difícil+", "¡Sólo se permiten Spins y PCs!"}, - ['tech_l']= {"Tech", "Lunático", "¡Mantén el B2B!"}, - ['tech_l_plus']= {"Tech", "Lunático+", "¡Sólo se permiten Spins y PCs!"}, - ['tech_finesse']= {"Tech", "Finesse", "¡No cometas errores de Finesse!"}, - ['tech_finesse_f']= {"Tech", "Finesse+", "Sin errores de finesse, ¡pero tampoco clears normales!"}, - ['tsd_e']= {"Desafío de TSD", "Fácil", "¡Sólo se permiten T-Spin Dobles!"}, - ['tsd_h']= {"Desafío de TSD", "Difícil", "¡Sólo se permiten T-Spin Dobles!"}, - ['tsd_u']= {"Desafío de TSD", "Supremo", "¡Sólo se permiten T-Spin Dobles!"}, - ['backfire_n']= {"Retorno", "Normal", "Lidia con tus propias líneas basura."}, - ['backfire_h']= {"Retorno", "Difícil", "Lidia con tus propias líneas basura."}, - ['backfire_l']= {"Retorno", "Lunático", "Lidia con tus propias líneas basura."}, - ['backfire_u']= {"Retorno", "Supremo", "Lidia con tus propias líneas basura."}, - -- ['sprintAtk']= {"Sprint", "100 Attack", "Send 100 lines!"}, - ['zen']= {'Zen', "200L", "200 líneas sin límite de tiempo."}, - ['ultra']= {'Ultra', "Extra", "¡Consigue el mayor puntaje posible en 2 minutos!"}, - ['infinite']= {"Infinito", "", "Modo Sandbox."}, - ['infinite_dig']= {"Infinito: Queso", "", "Limpia, limpia, más limpia que tú."}, + couldSave="Guardado en la nube (requiere iniciar sesión) (PRECAUCIÓN: EN TESTEO)", + notLogin="[Inicia sesión para acceder al guardado en la nube]", + upload="Subir a la nube", + download="Descargar de la nube", + }, + error={ + console="Consola", + quit="Salir", + }, + }, + modes={ + ['sprint_10l']= {"Sprint", "10L", "¡Limpia 10 líneas!"}, + ['sprint_20l']= {"Sprint", "20L", "¡Limpia 20 líneas!"}, + ['sprint_40l']= {"Sprint", "40L", "¡Limpia 40 líneas!"}, + ['sprint_100l']= {"Sprint", "100L", "¡Limpia 100 líneas!"}, + ['sprint_400l']= {"Sprint", "400L", "¡Limpia 400 líneas!"}, + ['sprint_1000l']= {"Sprint", "1000L", "¡Limpia 1000 líneas!"}, + ['sprintPenta']= {"Sprint", "Pentominos", "¡Limpia 40 líneas con los 18 pentominos distintos!"}, + ['sprintMPH']= {"Sprint", "MPH", "Memoryless (sin memoria)\nPreviewless (sin pzas. siguientes)\nHoldless (sin reserva)."}, + ['dig_10l']= {"Queso", "10L", "Limpia 10 líneas de queso."}, + ['dig_40l']= {"Queso", "40L", "Limpia 40 líneas de queso."}, + ['dig_100l']= {"Queso", "100L", "Limpia 100 líneas de queso."}, + ['dig_400l']= {"Queso", "400L", "Limpia 400 líneas de queso."}, + ['dig_1000l']= {"Queso", "1000L", "Limpia 1000 líneas de queso."}, + ['drought_n']= {"Sequía", "100L", "¡Sin piezas I!"}, + ['drought_l']= {"Sequía+", "100L", "Guat de foc..."}, + -- ['stack_e']= {"Stack", "Fácil", "Pack them!"}, + -- ['stack_h']= {"Stack", "Difícil", "Pack them!"}, + -- ['stack_u']= {"Stack", "Supremo", "Pack them!"}, + ['marathon_n']= {"Maratón", "Normal", "Maratón de 200 líneas con velocidad en aumento."}, + ['marathon_h']= {"Maratón", "Difícil", "Maratón de 200 líneas a velocidad máxima."}, + ['solo_e']= {"VS.", "Fácil", "¡Derrota a la CPU!"}, + ['solo_n']= {"VS.", "Normal", "¡Derrota a la CPU!"}, + ['solo_h']= {"VS.", "Difícil", "¡Derrota a la CPU!"}, + ['solo_l']= {"VS.", "Lunático", "¡Derrota a la CPU!"}, + ['solo_u']= {"VS.", "Supremo", "¡Derrota a la CPU!"}, + ['techmino49_e']= {"Tech 49", "Fácil", "Batalla de 49 jugadores. ¡El último en pie gana!"}, + ['techmino49_h']= {"Tech 49", "Difícil", "Batalla de 49 jugadores. ¡El último en pie gana!"}, + ['techmino49_u']= {"Tech 49", "Supremo", "Batalla de 49 jugadores. ¡El último en pie gana!"}, + ['techmino99_e']= {"Tech 99", "Fácil", "Batalla de 99 jugadores. ¡El último en pie gana!"}, + ['techmino99_h']= {"Tech 99", "Difícil", "Batalla de 99 jugadores. ¡El último en pie gana!"}, + ['techmino99_u']= {"Tech 99", "Supremo", "Batalla de 99 jugadores. ¡El último en pie gana!"}, + ['round_e']= {"Por Turnos", "Fácil", "Modo ajedrez."}, + ['round_n']= {"Por Turnos", "Normal", "Modo ajedrez."}, + ['round_h']= {"Por Turnos", "Difícil", "Modo ajedrez."}, + ['round_l']= {"Por Turnos", "Lunático", "Modo ajedrez."}, + ['round_u']= {"Por Turnos", "Supremo", "Modo ajedrez."}, + ['master_n']= {"Master", "Normal", "Para principiantes en 20G"}, + ['master_h']= {"Master", "Difícil", "¡Desafío profesional de 20G!"}, + ['master_final']= {"Master", "FINAL", "El verdadero 20G Supremo: el final es inalcanzable."}, + ['master_ex']= {"GrandMaster", "EXTRA", "Para ser un gran maestro, acepta este desafío"}, + ['rhythm_e']= {"Al Ritmo", "Fácil", "Maratón rítmica de 200 líneas con bajo bpm."}, + ['rhythm_h']= {"Al Ritmo", "Difícil", "Maratón rítmica de 200 líneas con bpm moderado."}, + ['rhythm_u']= {"Al Ritmo", "Supremo", "Maratón rítmica de 200 líneas con bpm elevado."}, + ['blind_e']= {"A Ciegas", "Parcial", "Para novatos."}, + ['blind_n']= {"A Ciegas", "Total", "Para jugadores intermedios."}, + ['blind_h']= {"A Ciegas", "Inmediato", "Para jugadores experimentados"}, + ['blind_l']= {"A Ciegas", "Inmediato+", "Para profesionales."}, + ['blind_u']= {"A Ciegas", "?", "¿Estás preparado?"}, + ['blind_wtf']= {"A Ciegas", "ELFUF", "No, no lo estás."}, + ['classic_fast']= {"Clásico", "CTWC", "Modo clásico con alta velocidad."}, + ['survivor_e']= {"Supervivencia", "Fácil", "¿Cuánto tiempo podrás sobrevivir?"}, + ['survivor_n']= {"Supervivencia", "Normal", "¿Cuánto tiempo podrás sobrevivir?"}, + ['survivor_h']= {"Supervivencia", "Difícil", "¿Cuánto tiempo podrás sobrevivir?"}, + ['survivor_l']= {"Supervivencia", "Lunático", "¿Cuánto tiempo podrás sobrevivir?"}, + ['survivor_u']= {"Supervivencia", "Supremo", "¿Cuánto tiempo podrás sobrevivir?"}, + ['attacker_h']= {"Atacante", "Difícil", "¡Practica la ofensiva!"}, + ['attacker_u']= {"Atacante", "Supremo", "¡Practica la ofensiva!"}, + ['defender_n']= {"Defensor", "Normal", "¡Practica la defensa!"}, + ['defender_l']= {"Defensor", "Lunático", "¡Practica la defensa!"}, + ['dig_h']= {"Downstack", "Difícil", "¡Practica el downstackeo!"}, + ['dig_u']= {"Downstack", "Supremo", "¡Practica el downstackeo!"}, + ['bigbang']= {"Big Bang", "Fácil", "¡Tutorial de All-spins!\n[No finalizado]"}, + ['c4wtrain_n']= {"Entrenar C4W", "Normal", "Combos infinitos."}, + ['c4wtrain_l']= {"Entrenar C4W", "Lunático", "Combos infinitos."}, + ['pctrain_n']= {"Entrenar PC", "Normal", "Modo sencillo para practicar Perfect Clears."}, + ['pctrain_l']= {"Entrenar PC", "Lunático", "Modo duro para practicar Perfect Clears."}, + ['pc_n']= {"Desafío de PCs", "Normal", "¡Consigue los PCs que puedas en 100 líneas!"}, + ['pc_h']= {"Desafío de PCs", "Difícil", "¡Consigue los PCs que puedas en 100 líneas!"}, + ['pc_l']= {"Desafío de PCs", "Lunático", "¡Consigue los PCs que puedas en 100 líneas!"}, + ['pc_inf']= {"Desafío de PCs Infinito", "", "Consigue todos los PCs que puedas."}, + ['tech_n']= {"Tech", "Normal", "¡Mantén el B2B!"}, + ['tech_n_plus']= {"Tech", "Normal+", "¡Sólo se permiten Spins y PCs!"}, + ['tech_h']= {"Tech", "Difícil", "¡Mantén el B2B!"}, + ['tech_h_plus']= {"Tech", "Difícil+", "¡Sólo se permiten Spins y PCs!"}, + ['tech_l']= {"Tech", "Lunático", "¡Mantén el B2B!"}, + ['tech_l_plus']= {"Tech", "Lunático+", "¡Sólo se permiten Spins y PCs!"}, + ['tech_finesse']= {"Tech", "Finesse", "¡No cometas errores de Finesse!"}, + ['tech_finesse_f']= {"Tech", "Finesse+", "Sin errores de finesse, ¡pero tampoco clears normales!"}, + ['tsd_e']= {"Desafío de TSD", "Fácil", "¡Sólo se permiten T-Spin Dobles!"}, + ['tsd_h']= {"Desafío de TSD", "Difícil", "¡Sólo se permiten T-Spin Dobles!"}, + ['tsd_u']= {"Desafío de TSD", "Supremo", "¡Sólo se permiten T-Spin Dobles!"}, + ['backfire_n']= {"Retorno", "Normal", "Lidia con tus propias líneas basura."}, + ['backfire_h']= {"Retorno", "Difícil", "Lidia con tus propias líneas basura."}, + ['backfire_l']= {"Retorno", "Lunático", "Lidia con tus propias líneas basura."}, + ['backfire_u']= {"Retorno", "Supremo", "Lidia con tus propias líneas basura."}, + -- ['sprintAtk']= {"Sprint", "100 Attack", "Send 100 lines!"}, + ['zen']= {'Zen', "200L", "200 líneas sin límite de tiempo."}, + ['ultra']= {'Ultra', "Extra", "¡Consigue el mayor puntaje posible en 2 minutos!"}, + ['infinite']= {"Infinito", "", "Modo Sandbox."}, + ['infinite_dig']= {"Infinito: Queso", "", "Limpia, limpia, más limpia que tú."}, - ['sprintFix']= {"Sprint", "Sin mover a Izq./Der."}, - ['sprintLock']= {"Sprint", "Sin rotar"}, - ['sprintSmooth']= {"Sprint", "SIN FRICCIÓN"}, - ['marathon_bfmax']= {"Maratón", "Supremo"}, + ['sprintFix']= {"Sprint", "Sin mover a Izq./Der."}, + ['sprintLock']= {"Sprint", "Sin rotar"}, + ['sprintSmooth']= {"Sprint", "SIN FRICCIÓN"}, + ['marathon_bfmax']= {"Maratón", "Supremo"}, - ['master_l']= {"Master", "Lunático"}, - ['master_u']= {"Master", "Supremo"}, + ['master_l']= {"Master", "Lunático"}, + ['master_u']= {"Master", "Supremo"}, - ['custom_clear']= {"Personalizado", "Normal"}, - ['custom_puzzle']= {"Personalizado", "Puzzle"}, - }, + ['custom_clear']= {"Personalizado", "Normal"}, + ['custom_puzzle']= {"Personalizado", "Puzzle"}, + }, } \ No newline at end of file diff --git a/parts/language/lang_fr.lua b/parts/language/lang_fr.lua index 7f4255d9..3660875f 100644 --- a/parts/language/lang_fr.lua +++ b/parts/language/lang_fr.lua @@ -1,738 +1,738 @@ return{ - fallback=4, - sureQuit="Appuyez à nouveau pour sortir", - newDay="[Anti-addiction] Nouveau jour, nouveau commencement !", - playedLong="[Anti-addiction] Vous avez joué pendant un bon bout de temps aujourd'hui. Faites des pauses.", - playedTooMuch="[Anti-addiction] Vous avez joué trop longtemps ! Vous ne pouvez plus jouer.", + fallback=4, + sureQuit="Appuyez à nouveau pour sortir", + newDay="[Anti-addiction] Nouveau jour, nouveau commencement !", + playedLong="[Anti-addiction] Vous avez joué pendant un bon bout de temps aujourd'hui. Faites des pauses.", + playedTooMuch="[Anti-addiction] Vous avez joué trop longtemps ! Vous ne pouvez plus jouer.", - atkModeName={"Aléatoire","Badges","K.O.s faciles","Attaquants"}, - royale_remain="$1 Joueurs restants", - cmb={nil,"1 Combo","2 Combo","3 Combo","4 Combo","5 Combo","6 Combo","7 Combo","8 Combo","9 Combo","10 Combo!","11 Combo!","12 Combo!","13 Combo!","14 Combo!!","15 Combo!!","16 Combo!!","17 Combo!!!","18 Combo!!!","19 Combo!!!","MEGACMB"}, - spin="-Spin ", - clear={"Simple","Double","Triple","Techrash","Pentacrash","Hexacrash"}, - mini="Mini",b2b="B2B ",b3b="B2B2B ", - PC="Perfect Clear",HPC="Clear", - replaying="[Replay]", - -- tasUsing="[TAS]", + atkModeName={"Aléatoire","Badges","K.O.s faciles","Attaquants"}, + royale_remain="$1 Joueurs restants", + cmb={nil,"1 Combo","2 Combo","3 Combo","4 Combo","5 Combo","6 Combo","7 Combo","8 Combo","9 Combo","10 Combo!","11 Combo!","12 Combo!","13 Combo!","14 Combo!!","15 Combo!!","16 Combo!!","17 Combo!!!","18 Combo!!!","19 Combo!!!","MEGACMB"}, + spin="-Spin ", + clear={"Simple","Double","Triple","Techrash","Pentacrash","Hexacrash"}, + mini="Mini",b2b="B2B ",b3b="B2B2B ", + PC="Perfect Clear",HPC="Clear", + replaying="[Replay]", + -- tasUsing="[TAS]", - stage="Etape $1", - great="Bien !", - awesome="Génial !", - almost="Presque !", - continue="Continuez !", - maxspeed="Vitesse maximale !", - speedup="Speed up !", - missionFailed="Mission échouée", + stage="Etape $1", + great="Bien !", + awesome="Génial !", + almost="Presque !", + continue="Continuez !", + maxspeed="Vitesse maximale !", + speedup="Speed up !", + missionFailed="Mission échouée", - speedLV="niveau de vitesse", - piece="Pièce",line="Lignes",atk="Attaque",eff="Efficacité", - rpm="RPM",tsd="TSD", - grade="Grade",techrash="Techrash", - wave="Vague",nextWave="Prochain", - combo="Combo",maxcmb="Combo Max", - pc="Perfect Clear",ko="KO", + speedLV="niveau de vitesse", + piece="Pièce",line="Lignes",atk="Attaque",eff="Efficacité", + rpm="RPM",tsd="TSD", + grade="Grade",techrash="Techrash", + wave="Vague",nextWave="Prochain", + combo="Combo",maxcmb="Combo Max", + pc="Perfect Clear",ko="KO", - -- win="Win", - -- lose="Lose", + -- win="Win", + -- lose="Lose", - finish="Terminé", - gamewin="Gagné !", - gameover="Fin du jeu", + finish="Terminé", + gamewin="Gagné !", + gameover="Fin du jeu", - pause="Pause", - pauseCount="Pauses", - finesse_ap="Parfait", - finesse_fc="Combo Entier", + pause="Pause", + pauseCount="Pauses", + finesse_ap="Parfait", + finesse_fc="Combo Entier", - page="Page:", + page="Page:", - ai_fixed="L'IA est incompatible avec les séquences fixes.", - --ai_prebag="The AI is incompatible with custom sequences which have nontetromino.",'IA est incompatible avec les séquences personnalisées.", - ai_mission="L'IA est incompatible avec les missions personnalisées.", - switchSpawnSFX="Activez les effets sonores d'apparition des pièces pour jouer", - needRestart="Fonctionnera dès la prochaine partie", + ai_fixed="L'IA est incompatible avec les séquences fixes.", + --ai_prebag="The AI is incompatible with custom sequences which have nontetromino.",'IA est incompatible avec les séquences personnalisées.", + ai_mission="L'IA est incompatible avec les missions personnalisées.", + switchSpawnSFX="Activez les effets sonores d'apparition des pièces pour jouer", + needRestart="Fonctionnera dès la prochaine partie", - saveDone="Données sauvegardées", - saveError="Sauvegarde échouée : ", - -- saveError_duplicate="Duplicate filename", - loadError="Lecture échouée : ", - exportSuccess="Exporté avec succès", - importSuccess="Importé avec succès", - dataCorrupted="Données corrompues", - -- pasteWrongPlace="Paste at wrong place?", - -- noFile="File not found", + saveDone="Données sauvegardées", + saveError="Sauvegarde échouée : ", + -- saveError_duplicate="Duplicate filename", + loadError="Lecture échouée : ", + exportSuccess="Exporté avec succès", + importSuccess="Importé avec succès", + dataCorrupted="Données corrompues", + -- pasteWrongPlace="Paste at wrong place?", + -- noFile="File not found", - VKTchW="Poids du toucher", - VKOrgW="Poids d'origine", - VKCurW="Poids de la pos. du cur.", + VKTchW="Poids du toucher", + VKOrgW="Poids d'origine", + VKCurW="Poids de la pos. du cur.", - noScore="Aucun score", - -- modeLocked="Locked", - -- unlockHint="Achieve Rank D or above in prerequisite modes to unlock.", - highScore="Records personnels", - newRecord="Nouveau record !", + noScore="Aucun score", + -- modeLocked="Locked", + -- unlockHint="Achieve Rank D or above in prerequisite modes to unlock.", + highScore="Records personnels", + newRecord="Nouveau record !", - -- replayBroken="Cannot load replay", + -- replayBroken="Cannot load replay", - getNoticeFail="Echec de l'obtention de la notice", - oldVersion="La version $1 est disponible !", - -- versionNotMatch="Version do not match!", - -- needUpdate="Newer version required!", - -- notFinished="Coming soon!", + getNoticeFail="Echec de l'obtention de la notice", + oldVersion="La version $1 est disponible !", + -- versionNotMatch="Version do not match!", + -- needUpdate="Newer version required!", + -- notFinished="Coming soon!", - jsonError="Erreur json", + jsonError="Erreur json", - noUsername="Entrez votre nom d'utilisateur", - wrongEmail="Mauvaise adresse email", - noPassword="Entrez votre mot de passe", - diffPassword="Les mots de passe ne se correspondent pas", - -- registerRequestSent="Registration request sent", - registerSuccessed="Enregistré avec succès !", - loginSuccessed="Connecté avec succès !", - accessSuccessed="Autorisé avec succès !", + noUsername="Entrez votre nom d'utilisateur", + wrongEmail="Mauvaise adresse email", + noPassword="Entrez votre mot de passe", + diffPassword="Les mots de passe ne se correspondent pas", + -- registerRequestSent="Registration request sent", + registerSuccessed="Enregistré avec succès !", + loginSuccessed="Connecté avec succès !", + accessSuccessed="Autorisé avec succès !", - -- wsConnecting="Websocket Connecting", - wsFailed="WebSocket connection échouée", - -- wsClose="WebSocket Closed:", - -- netTimeout="Network connection timeout", + -- wsConnecting="Websocket Connecting", + wsFailed="WebSocket connection échouée", + -- wsClose="WebSocket Closed:", + -- netTimeout="Network connection timeout", - -- onlinePlayerCount="Online", - createRoomSuccessed="Salon créé avec succès !", - -- started="Playing", - joinRoom="a rejoint le salon.", - leaveRoom="a quitté le salon.", - -- ready="READY", - -- connStream="CONNECTING", - -- waitStream="WAITING", - -- spectating="Spectating", - chatRemain="En ligne : ", - chatStart="--------Début des logs--------", - chatHistory="-Nouveaux messages en dessous-", + -- onlinePlayerCount="Online", + createRoomSuccessed="Salon créé avec succès !", + -- started="Playing", + joinRoom="a rejoint le salon.", + leaveRoom="a quitté le salon.", + -- ready="READY", + -- connStream="CONNECTING", + -- waitStream="WAITING", + -- spectating="Spectating", + chatRemain="En ligne : ", + chatStart="--------Début des logs--------", + chatHistory="-Nouveaux messages en dessous-", - errorMsg="Une erreur est survenue et Techmino doit redémarrer.\nDes informations concernant l'erreur ont été créées, et vous pouvez les envoyer au créateur.", + errorMsg="Une erreur est survenue et Techmino doit redémarrer.\nDes informations concernant l'erreur ont été créées, et vous pouvez les envoyer au créateur.", - modInstruction="", - modInfo={},-- See lang_en.lua - pauseStat={ - "Temps :", - "Touche/Rot./Réserve :", - "Pièce :", - "Lignes/Creuser :", - "Attaque/Attaque de creusage :", - "Reçu :", - "Nettoyages :", - "Spins :", - "B2B/B3B/PC/HPC : ", - "Finesse :", - }, + modInstruction="", + modInfo={},-- See lang_en.lua + pauseStat={ + "Temps :", + "Touche/Rot./Réserve :", + "Pièce :", + "Lignes/Creuser :", + "Attaque/Attaque de creusage :", + "Reçu :", + "Nettoyages :", + "Spins :", + "B2B/B3B/PC/HPC : ", + "Finesse :", + }, radar={"DEF","OFF","ATQ","ENVOYER","SPD","DIG"}, - radarData={"D'PM","ADPM","APM","SPM","L'PM","DPM"}, - stat={ - "Nombre de fois lancé :", - "Nombre de parties :", - "Temps de jeu :", - "Touche/Rot./Réserve :", - "Bloc/Ligne/Atq. :", - "Reçu/Res./Asc. :", - "Attaque/Attaque de creusage :", - "Eff./Eff. de creusage :", - "B2B/B3B :", - "PC/HPC :", - "Errs. Finesse/Finesse :", - }, - aboutTexts={ - "Ceci est un simple jeu de blocs.", - "On y joue comme sur C2/IO/JS/WWC/KOS et autres.", - "", - "Vous pouvez envoyer des rapports de bogues ou des suggastions via le groupe de test ou l'email du créateur ~", - "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,", - "et vous n'avez besoin que des permissions de vibration et de communication réseau pour les versions mobiles !", - "Le créateur n'est pas responsable pour n'importe quel type de perte de données suite à une modification du jeu.", - }, - staff={ - "Author: MrZ E-mail: 1046101471@qq.com", - "Powered by LÖVE", - "", - "Programme : MrZ, Particle_G, [FinnTenzor]", - "Art : MrZ, Gnyar, ScF, [旋律星萤, T0722]", - "Musique : MrZ, ERM, [T0722, Aether]", - "Voix & Sons: Miya, Xiaoya, Naki, MrZ", - "Performance: 模电, HBM", - "Traduction: User670, MattMayuga, Mizu, Mr.Faq, ScF", - "", - "Merci à:", - "User670, Flyz, Big_True, Trebor, NOT-A-ROBOT, 思竣, scdhh", - "yuhao7370, Farter, Teatube, 蕴空之灵, T9972, [All test staff]", - }, - used=[[ - Outils utilisés: - Beepbox - Goldwave - GFIE - FL Mobile - Libs utilisées: - Cold_Clear [MinusKelvin] - json.lua [rxi] - profile.lua [itraykov] - simple-love-lights [dylhunn] - ]], - support="Aider le créateur", - group="Groupe QQ officiel : 913154753", - WidgetText={ - main={ - -- offline="Solo", - -- qplay="Last Play", - -- online="Multi", - -- custom="Mode perso.", - setting="Paramètres", - stat="Statistiques", - -- music="Music & SE", - dict="Zictionary", - -- replays="Replays", - }, - mode={ - mod="Mods (F1)", - start="Démarrer", - }, - mod={ - title="Mods", - reset="Réinitialiser (tab)", - unranked="Unranked", - }, - pause={ - setting="Paramètres (S)", - replay="Replay (P)", - -- save="Save (O)", - resume="Continuer (esc)", - restart="Réessayer (R)", - quit="Quitter (Q)", - -- tas="TAS (T)", - }, - net_menu={ - -- league="Tech League", - ffa="FFA", - rooms="Salons", - -- logout="Log out", - }, - net_league={ - -- match="Find Match", - }, - net_rooms={ - password="Mot de passe", - -- refreshing="Refreshing Rooms", - noRoom="Aucun salon actuellement", - -- refresh="Refresh", - -- new="New Room", - join="Rejoindre", - }, - net_newRoom={ - -- title="Room config", - -- roomName="Room name(default to username's room)", - password="Mot de passe", - -- description="Room description", + radarData={"D'PM","ADPM","APM","SPM","L'PM","DPM"}, + stat={ + "Nombre de fois lancé :", + "Nombre de parties :", + "Temps de jeu :", + "Touche/Rot./Réserve :", + "Bloc/Ligne/Atq. :", + "Reçu/Res./Asc. :", + "Attaque/Attaque de creusage :", + "Eff./Eff. de creusage :", + "B2B/B3B :", + "PC/HPC :", + "Errs. Finesse/Finesse :", + }, + aboutTexts={ + "Ceci est un simple jeu de blocs.", + "On y joue comme sur C2/IO/JS/WWC/KOS et autres.", + "", + "Vous pouvez envoyer des rapports de bogues ou des suggastions via le groupe de test ou l'email du créateur ~", + "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,", + "et vous n'avez besoin que des permissions de vibration et de communication réseau pour les versions mobiles !", + "Le créateur n'est pas responsable pour n'importe quel type de perte de données suite à une modification du jeu.", + }, + staff={ + "Author: MrZ E-mail: 1046101471@qq.com", + "Powered by LÖVE", + "", + "Programme : MrZ, Particle_G, [FinnTenzor]", + "Art : MrZ, Gnyar, ScF, [旋律星萤, T0722]", + "Musique : MrZ, ERM, [T0722, Aether]", + "Voix & Sons: Miya, Xiaoya, Naki, MrZ", + "Performance: 模电, HBM", + "Traduction: User670, MattMayuga, Mizu, Mr.Faq, ScF", + "", + "Merci à:", + "User670, Flyz, Big_True, Trebor, NOT-A-ROBOT, 思竣, scdhh", + "yuhao7370, Farter, Teatube, 蕴空之灵, T9972, [All test staff]", + }, + used=[[ + Outils utilisés: + Beepbox + Goldwave + GFIE + FL Mobile + Libs utilisées: + Cold_Clear [MinusKelvin] + json.lua [rxi] + profile.lua [itraykov] + simple-love-lights [dylhunn] + ]], + support="Aider le créateur", + group="Groupe QQ officiel : 913154753", + WidgetText={ + main={ + -- offline="Solo", + -- qplay="Last Play", + -- online="Multi", + -- custom="Mode perso.", + setting="Paramètres", + stat="Statistiques", + -- music="Music & SE", + dict="Zictionary", + -- replays="Replays", + }, + mode={ + mod="Mods (F1)", + start="Démarrer", + }, + mod={ + title="Mods", + reset="Réinitialiser (tab)", + unranked="Unranked", + }, + pause={ + setting="Paramètres (S)", + replay="Replay (P)", + -- save="Save (O)", + resume="Continuer (esc)", + restart="Réessayer (R)", + quit="Quitter (Q)", + -- tas="TAS (T)", + }, + net_menu={ + -- league="Tech League", + ffa="FFA", + rooms="Salons", + -- logout="Log out", + }, + net_league={ + -- match="Find Match", + }, + net_rooms={ + password="Mot de passe", + -- refreshing="Refreshing Rooms", + noRoom="Aucun salon actuellement", + -- refresh="Refresh", + -- new="New Room", + join="Rejoindre", + }, + net_newRoom={ + -- title="Room config", + -- roomName="Room name(default to username's room)", + password="Mot de passe", + -- description="Room description", - life="Vie", - -- pushSpeed="Push Speed", - garbageSpeed="Vitesse des lignes indésirables", - visible="Visibilité", - freshLimit="Limite de réinit. du délai de verrouillage", + life="Vie", + -- pushSpeed="Push Speed", + garbageSpeed="Vitesse des lignes indésirables", + visible="Visibilité", + freshLimit="Limite de réinit. du délai de verrouillage", - -- fieldH="Field height", - -- bufferLimit="Buffer Limit", - -- heightLimit="Height Limit", + -- fieldH="Field height", + -- bufferLimit="Buffer Limit", + -- heightLimit="Height Limit", - drop="Délai de chute", - lock="Délai de verrouillage", - wait="Délai d'apparition", - fall="Délai de ligne", + drop="Délai de chute", + lock="Délai de verrouillage", + wait="Délai d'apparition", + fall="Délai de ligne", - -- capacity="Capacity", - -- create="Create", + -- capacity="Capacity", + -- create="Create", - ospin="O-spin", - fineKill="100% Finesse", - b2bKill="Sans perte de B2B", - easyFresh="Réinit. de verrouillage normale", - -- deepDrop="Deep Drop", - bone="Crochets", + ospin="O-spin", + fineKill="100% Finesse", + b2bKill="Sans perte de B2B", + easyFresh="Réinit. de verrouillage normale", + -- deepDrop="Deep Drop", + bone="Crochets", - nextCount="Prévisualisations de pièces", - holdCount="Réserve", - infHold="Réserver une fois", - -- phyHold="Physical Hold", - }, - net_game={ - -- ready="Ready", - -- spectate="Spectate", - -- cancel="Cancel", - }, - setting_game={ - title="Paramètres du jeu", + nextCount="Prévisualisations de pièces", + holdCount="Réserve", + infHold="Réserver une fois", + -- phyHold="Physical Hold", + }, + net_game={ + -- ready="Ready", + -- spectate="Spectate", + -- cancel="Cancel", + }, + setting_game={ + title="Paramètres du jeu", - graphic="←Vidéo", - sound="Son→", + graphic="←Vidéo", + sound="Son→", - ctrl="Paramètres de contrôle", - key="Touches", - touch="Boutons virtuels", - reTime="Délai de démarrage", - RS="Système de rotation", - layout="Disposition", - autoPause="Mettre en pause en cas de perte de focus", - -- menuPos="Menu button pos.", - swap="Combinaison de touches (changer le mode d'attaque)", - -- autoSave="Auto save new-best", - -- simpMode="Simple mode", - }, - setting_video={ - title="Paramètres vidéo", + ctrl="Paramètres de contrôle", + key="Touches", + touch="Boutons virtuels", + reTime="Délai de démarrage", + RS="Système de rotation", + layout="Disposition", + autoPause="Mettre en pause en cas de perte de focus", + -- menuPos="Menu button pos.", + swap="Combinaison de touches (changer le mode d'attaque)", + -- autoSave="Auto save new-best", + -- simpMode="Simple mode", + }, + setting_video={ + title="Paramètres vidéo", - sound="←Son", - game="Jeu→", + sound="←Son", + game="Jeu→", - block="Dessiner le bloc", - smooth="Chute fluide", - upEdge="Bloc 3D", - bagLine="Ligne du Sac", + block="Dessiner le bloc", + smooth="Chute fluide", + upEdge="Bloc 3D", + bagLine="Ligne du Sac", - -- ghostType="Ghost Type", - ghost="Pièce fantôme", - center="Centre", - grid="Grille", - -- lineNum="line No.", + -- ghostType="Ghost Type", + ghost="Pièce fantôme", + center="Centre", + grid="Grille", + -- lineNum="line No.", - lockFX="Effets de verrouillage", - dropFX="Effets de chute", - moveFX="Effets de déplacement", - clearFX="Effets de nettoyage", - splashFX="Effets splash", - shakeFX="Tremblements de l'écran", - atkFX="Effets d'attaque", - frame="Montrer les FPS(%)", + lockFX="Effets de verrouillage", + dropFX="Effets de chute", + moveFX="Effets de déplacement", + clearFX="Effets de nettoyage", + splashFX="Effets splash", + shakeFX="Tremblements de l'écran", + atkFX="Effets d'attaque", + frame="Montrer les FPS(%)", - text="Texte d'action", - score="Pop-up de score", - -- bufferWarn="Buffer Alert", - -- showSpike="Spike Counter", - nextPos="Prévisualisation de position", - highCam="Vue d'oiseau", - warn="Alerte de danger", + text="Texte d'action", + score="Pop-up de score", + -- bufferWarn="Buffer Alert", + -- showSpike="Spike Counter", + nextPos="Prévisualisation de position", + highCam="Vue d'oiseau", + warn="Alerte de danger", - -- clickFX="Click FX", - power="Infos d'alimentation", - -- clean="Fast Draw", - fullscreen="Plein écran", - bg="Arrière-plan", + -- clickFX="Click FX", + power="Infos d'alimentation", + -- clean="Fast Draw", + fullscreen="Plein écran", + bg="Arrière-plan", - -- blockSatur="Block Saturation", - -- fieldSatur="Field Saturation", - }, - setting_sound={ - title="Paramètres du son", + -- blockSatur="Block Saturation", + -- fieldSatur="Field Saturation", + }, + setting_sound={ + title="Paramètres du son", - game="←Jeu", - graphic="Vidéo→", + game="←Jeu", + graphic="Vidéo→", - bgm="Musique", - sfx="Sons", - stereo="Stéréo", - spawn="Apparition", - warn="Alerte de danger", - vib="Vibration", - voc="Voix", + bgm="Musique", + sfx="Sons", + stereo="Stéréo", + spawn="Apparition", + warn="Alerte de danger", + vib="Vibration", + voc="Voix", - fine="Son d'erreur de Finesse", - -- cv="Voice Pack", - -- apply="Apply", - }, - setting_control={ - title="Paramètres de contrôle", - preview="Aperçu", + fine="Son d'erreur de Finesse", + -- cv="Voice Pack", + -- apply="Apply", + }, + setting_control={ + title="Paramètres de contrôle", + preview="Aperçu", - das="DAS",arr="ARR", - dascut="DAS cut", - -- dropcut="Auto-lock cut", - sddas="DAS de chute rapide",sdarr="ARR de chute rapide", - ihs="Réserve Initiale", - irs="Rotation Initiale", - ims="Mouvement Initial", - reset="Réinitialisation", - }, - setting_key={ - a1="Déplacement vers la gauche", - a2="Déplacement vers la droite", - a3="Rotation droite", - a4="Rotation gauche", - a5="180°", - a6="Chute instantanée", - a7="Chute rapide", - a8="Réserve", - a9="Fonction1", - a10="Fonction2", - a11="Déplacement instantané vers la gauche", - a12="Déplacement instantané vers la droite", - a13="Chute sonique", - a14="Descendre de 1", - a15="Descendre de 4", - a16="Descendre de 10", - a17="Chute à gauche", - a18="Chute à droite", - a19="Zangi gauche", - a20="Zangi droite", - restart="Réessayer", - }, - setting_skin={ - -- skinSet="Block Skin", - title="Disposition", - spin1="R",spin2="R",spin3="R",spin4="R",spin5="R",spin6="R",spin7="R", - skinR="Réinit. Couleur", - faceR="Réinit. Orient.", - }, - setting_touch={ - default="Par défaut", - snap="Snap", - -- save1="Save1", - -- load1="Load1", - -- save2="Save2", - -- load2="Load2", - size="Taille", - -- shape="Shape", - }, - setting_touchSwitch={ - b1= "Déplacement vers la gauche :",b2="Déplacement vers la droite:", - b3="Rotation vers la droite :",b4="Rotation vers la gauche :", - b5= "180° :",b6="Chute instantanée :",b7="Chute rapide :",b8="Réserve :", - b9= "Fonction1 :",b10="Fonction2 :", - b11="Déplacement instantané vers la gauche :",b12="Déplacement instantané vers la droite :", - b13="Chute sonique :",b14="Descendre de 1 :",b15="Descendre de 4 :",b16="Descendre de 10:", - b17="Chute à gauche :",b18="Chute à droite :",b19="Zangi Gauche :",b20="Zangi Droite :", + das="DAS",arr="ARR", + dascut="DAS cut", + -- dropcut="Auto-lock cut", + sddas="DAS de chute rapide",sdarr="ARR de chute rapide", + ihs="Réserve Initiale", + irs="Rotation Initiale", + ims="Mouvement Initial", + reset="Réinitialisation", + }, + setting_key={ + a1="Déplacement vers la gauche", + a2="Déplacement vers la droite", + a3="Rotation droite", + a4="Rotation gauche", + a5="180°", + a6="Chute instantanée", + a7="Chute rapide", + a8="Réserve", + a9="Fonction1", + a10="Fonction2", + a11="Déplacement instantané vers la gauche", + a12="Déplacement instantané vers la droite", + a13="Chute sonique", + a14="Descendre de 1", + a15="Descendre de 4", + a16="Descendre de 10", + a17="Chute à gauche", + a18="Chute à droite", + a19="Zangi gauche", + a20="Zangi droite", + restart="Réessayer", + }, + setting_skin={ + -- skinSet="Block Skin", + title="Disposition", + spin1="R",spin2="R",spin3="R",spin4="R",spin5="R",spin6="R",spin7="R", + skinR="Réinit. Couleur", + faceR="Réinit. Orient.", + }, + setting_touch={ + default="Par défaut", + snap="Snap", + -- save1="Save1", + -- load1="Load1", + -- save2="Save2", + -- load2="Load2", + size="Taille", + -- shape="Shape", + }, + setting_touchSwitch={ + b1="Déplacement vers la gauche :",b2="Déplacement vers la droite:", + b3="Rotation vers la droite :",b4="Rotation vers la gauche :", + b5="180° :",b6="Chute instantanée :",b7="Chute rapide :",b8="Réserve :", + b9="Fonction1 :",b10="Fonction2 :", + b11="Déplacement instantané vers la gauche :",b12="Déplacement instantané vers la droite :", + b13="Chute sonique :",b14="Descendre de 1 :",b15="Descendre de 4 :",b16="Descendre de 10:", + b17="Chute à gauche :",b18="Chute à droite :",b19="Zangi Gauche :",b20="Zangi Droite :", - norm="Normal", - pro="Professionel", - hide="Montrer les touches virtuelles", - icon="Icône", - sfx="Sons", - vib="Vib.", - alpha="Alpha", + norm="Normal", + pro="Professionel", + hide="Montrer les touches virtuelles", + icon="Icône", + sfx="Sons", + vib="Vib.", + alpha="Alpha", - track="Auto Track", - dodge="Auto-esquive", - }, - customGame={ - title="Mode personnalisé", - subTitle="Basique", - defSeq="Séquence par défaut", - noMsn="Pas de mission", + track="Auto Track", + dodge="Auto-esquive", + }, + customGame={ + title="Mode personnalisé", + subTitle="Basique", + defSeq="Séquence par défaut", + noMsn="Pas de mission", - drop="Délai de chute", - lock="Délai de verrouillage", - wait="Délai d'apparition", - fall="Délai de ligne", + drop="Délai de chute", + lock="Délai de verrouillage", + wait="Délai d'apparition", + fall="Délai de ligne", - bg="Arrière-plan", - bgm="Musique", + bg="Arrière-plan", + bgm="Musique", - copy="Copier Mtrc+Seq+Missn", - paste="Coller Mtrc+Seq+Missn", - clear="Démarrer Clear", - puzzle="Démarrer Puzzle", + copy="Copier Mtrc+Seq+Missn", + paste="Coller Mtrc+Seq+Missn", + clear="Démarrer Clear", + puzzle="Démarrer Puzzle", - -- reset="Reset (Del)", - advance="Plus (A)", - mod="Mods (F1)", - field="Modifier la matrice (F)", - sequence="Modifier la séquence (S)", - mission="Modifier la mission(M)", + -- reset="Reset (Del)", + advance="Plus (A)", + mod="Mods (F1)", + field="Modifier la matrice (F)", + sequence="Modifier la séquence (S)", + mission="Modifier la mission(M)", - nextCount="Prévisualisations de pièces", - holdCount="Réserve", - infHold="Réserver une fois", - -- phyHold="Physical Hold", + nextCount="Prévisualisations de pièces", + holdCount="Réserve", + infHold="Réserver une fois", + -- phyHold="Physical Hold", - -- fieldH="Field height", - visible="Visibilité", - freshLimit="Limite de réinit. du délai de verrouillage", - opponent="Adversaire", - life="Vie", - -- pushSpeed="Push Speed", - garbageSpeed="Vitesse des lignes indésirables", + -- fieldH="Field height", + visible="Visibilité", + freshLimit="Limite de réinit. du délai de verrouillage", + opponent="Adversaire", + life="Vie", + -- pushSpeed="Push Speed", + garbageSpeed="Vitesse des lignes indésirables", - -- bufferLimit="Buffer Limit", - -- heightLimit="Height Limit", - ospin="O-spin", - fineKill="100% Finesse", - b2bKill="Sans perte de B2B", - easyFresh="Réinit. de verrouillage normale", - -- deepDrop="Deep Drop", - bone="Crochets", - }, - custom_field={ - title="Mode personnalisé", - subTitle="Matrice", + -- bufferLimit="Buffer Limit", + -- heightLimit="Height Limit", + ospin="O-spin", + fineKill="100% Finesse", + b2bKill="Sans perte de B2B", + easyFresh="Réinit. de verrouillage normale", + -- deepDrop="Deep Drop", + bone="Crochets", + }, + custom_field={ + title="Mode personnalisé", + subTitle="Matrice", - any="Effacer", - space="×", - -- smart="Smart", + any="Effacer", + space="×", + -- smart="Smart", - push="Ajouter ligne (K)", - del="Supprimer ligne (L)", + push="Ajouter ligne (K)", + del="Supprimer ligne (L)", - copy="Copier", - paste="Coller", - clear="Nettoyer", - demo="Masquer les ×", + copy="Copier", + paste="Coller", + clear="Nettoyer", + demo="Masquer les ×", - newPg="Nouvelle Page(N)", - delPg="Supp. Page(M)", - prevPg="Page Préc.", - nextPg="Page Suiv.", - }, - custom_sequence={ - title="Mode personnalisée", - subTitle="Séquence", + newPg="Nouvelle Page(N)", + delPg="Supp. Page(M)", + prevPg="Page Préc.", + nextPg="Page Suiv.", + }, + custom_sequence={ + title="Mode personnalisée", + subTitle="Séquence", - sequence="Séquence", - reset="Réinitialiser", - rnd="Aléatoire", - copy="Copier", - paste="Coller", - }, - custom_mission={ - title="Mode personnalisé", - subTitle="Mission", + sequence="Séquence", + reset="Réinitialiser", + rnd="Aléatoire", + copy="Copier", + paste="Coller", + }, + custom_mission={ + title="Mode personnalisé", + subTitle="Mission", - copy="Copier", - paste="Coller", - mission="Dorcer la mission", - }, - dict={ - title="TetroDictionary", - link="Ouvrir URL", - }, - stat={ - path="Ouvrir dossier des données", - save="Gestion des données", - }, - music={ - title="Salon musical", - arrow="→", - now="En train de jouer :", + copy="Copier", + paste="Coller", + mission="Dorcer la mission", + }, + dict={ + title="TetroDictionary", + link="Ouvrir URL", + }, + stat={ + path="Ouvrir dossier des données", + save="Gestion des données", + }, + music={ + title="Salon musical", + arrow="→", + now="En train de jouer :", - bgm="Musique", - -- sound="SFXs", - }, - sound={ - title="Salon SE", - sfx="Sons", - voc="Voix", + bgm="Musique", + -- sound="SFXs", + }, + sound={ + title="Salon SE", + sfx="Sons", + voc="Voix", - move="Déplacement", - lock="Verrouillage", - drop="Chute", - fall="Tombée", - rotate="Rotation", - rotatekick="Rot+kick", - hold="Réserve", - prerotate="Prérotation", - prehold="Préréserve", - _pc="PC", + move="Déplacement", + lock="Verrouillage", + drop="Chute", + fall="Tombée", + rotate="Rotation", + rotatekick="Rot+kick", + hold="Réserve", + prerotate="Prérotation", + prehold="Préréserve", + _pc="PC", - _1="Simple", - _2="Double", - _3="Triple", - _4="Techrash", - music="Musique", - }, - login={ - title="Connexion", - register="Enregistrement", - email="E-mail", - password="Mot de passe", - -- keepPW="Remember me", - login="Connexion", - }, - register={ - title="Enregistrement", - login="Connexion", - username="Nom d'utilisateur", - email="E-mail", - password="Mot de passe", - password2="Confirmer le mot de passe", - register="Enregistrement", - -- registering="Waiting for response...", - }, - account={ - title="Compte", - }, - app_15p={ - reset="Réinitialiser", - color="Couleur", - blind="Aveugler", - slide="Glisser", - pathVis="Montrer le tracé", - revKB="Inverser", - }, - app_schulteG={ - reset="Réinitialiser", + _1="Simple", + _2="Double", + _3="Triple", + _4="Techrash", + music="Musique", + }, + login={ + title="Connexion", + register="Enregistrement", + email="E-mail", + password="Mot de passe", + -- keepPW="Remember me", + login="Connexion", + }, + register={ + title="Enregistrement", + login="Connexion", + username="Nom d'utilisateur", + email="E-mail", + password="Mot de passe", + password2="Confirmer le mot de passe", + register="Enregistrement", + -- registering="Waiting for response...", + }, + account={ + title="Compte", + }, + app_15p={ + reset="Réinitialiser", + color="Couleur", + blind="Aveugler", + slide="Glisser", + pathVis="Montrer le tracé", + revKB="Inverser", + }, + app_schulteG={ + reset="Réinitialiser", rank="Taille", - blind="Aveugler", - disappear="Cacher", - tapFX="Effet quand tapé", - }, - app_pong={ - reset="Redémarrer", - }, - app_AtoZ={ - level="niveau", - keyboard="Clavier", - reset="Redémarrer", - }, - app_2048={ - reset="Réinitialiser", - blind="Aveugler", - tapControl="Contrôle par toucher", - skip="Passer Round", - }, - app_ten={ - reset="Réinitialiser", - next="Prévisualisations", - blind="Aveugler", - -- fast="Fast", - }, - app_dtw={ - reset="Réinitialiser", - color="Couleur", - mode="Mode", - bgm="Musique", - -- arcade="Arcade", - }, - about={ - staff="Staff", - his="History", - qq="QQ du créateur", - }, - savedata={ - -- export="Export to clipboard", - -- import="Import from clipboard", - -- unlock="Progress", - -- data="Stats", - -- setting="Settings", - -- vk="Virtual Key Layout", + blind="Aveugler", + disappear="Cacher", + tapFX="Effet quand tapé", + }, + app_pong={ + reset="Redémarrer", + }, + app_AtoZ={ + level="niveau", + keyboard="Clavier", + reset="Redémarrer", + }, + app_2048={ + reset="Réinitialiser", + blind="Aveugler", + tapControl="Contrôle par toucher", + skip="Passer Round", + }, + app_ten={ + reset="Réinitialiser", + next="Prévisualisations", + blind="Aveugler", + -- fast="Fast", + }, + app_dtw={ + reset="Réinitialiser", + color="Couleur", + mode="Mode", + bgm="Musique", + -- arcade="Arcade", + }, + about={ + staff="Staff", + his="History", + qq="QQ du créateur", + }, + savedata={ + -- export="Export to clipboard", + -- import="Import from clipboard", + -- unlock="Progress", + -- data="Stats", + -- setting="Settings", + -- vk="Virtual Key Layout", - -- couldSave="Cloud Save (need login) (CAUTION: TESTING)", - -- notLogin="[Login to access cloud save]", - -- upload="Upload to cloud", - -- download="Download from cloud", - }, - error={ - console="Console", - quit="Quit", - }, - }, - modes={ - ['sprint_10l']= {"Sprint", "10L", "Nettoyez 10 lignes !"}, - ['sprint_20l']= {"Sprint", "20L", "Nettoyez 20 lignes !"}, - ['sprint_40l']= {"Sprint", "40L", "Nettoyez 40 lignes !"}, - ['sprint_100l']= {"Sprint", "100L", "Nettoyez 100 lignes !"}, - ['sprint_400l']= {"Sprint", "400L", "Nettoyez 400 lignes !"}, - ['sprint_1000l']= {"Sprint", "1000L", "Nettoyez 1000 lignes !"}, - ['sprintPenta']= {"Sprint", "Pentomino", "40 lignes avec 18 pentominos."}, - ['sprintMPH']= {"Sprint", "MPH", "Memoryless\nPreviewless\nHoldless"}, - ['dig_10l']= {"Dig", "10L", "Creusez 10 lines"}, - ['dig_40l']= {"Dig", "40L", "Creusez 40 lines"}, - ['dig_100l']= {"Dig", "100L", "Creusez 100 lines"}, - ['dig_400l']= {"Dig", "400L", "Creusez 400 lines"}, - ['dig_1000l']= {"Dig", "1000L", "Creusez 1000 lines"}, - ['drought_n']= {"Drought", "100L", "Pas de pièce I !"}, - ['drought_l']= {"Drought+", "100L", "WTF ??!!"}, - -- ['stack_e']= {"Stack", "FACILE", "Pack them!"}, - -- ['stack_h']= {"Stack", "DIFFICILE", "Pack them!"}, - -- ['stack_u']= {"Stack", "ULTIME", "Pack them!"}, - ['marathon_n']= {"Marathon", "NORMAL", "Marathon de 200 lignes."}, - ['marathon_h']= {"Marathon", "DIFFICILE", "Marathon de 200 lignes à très haute vitesse"}, - ['solo_e']= {"Battle", "FACILE", "Battez l'IA !"}, - ['solo_n']= {"Battle", "NORMAL", "Battez l'IA !"}, - ['solo_h']= {"Battle", "DIFFICILE", "Battez l'IA !"}, - ['solo_l']= {"Battle", "LUNATIQUE", "Battez l'IA !"}, - ['solo_u']= {"Battle", "ULTIME", "Battez l'IA !"}, - ['techmino49_e']= {"Tech 49", "FACILE", "Bataille de 49 joueurs.\nLe dernier en vie gagne."}, - ['techmino49_h']= {"Tech 49", "DIFFICILE", "Bataille de 49 joueurs.\nLe dernier en vie gagne."}, - ['techmino49_u']= {"Tech 49", "ULTIME", "Bataille de 49 joueurs.\nLe dernier en vie gagne."}, - ['techmino99_e']= {"Tech 99", "FACILE", "Bataille de 99 joueurs.\nLe dernier en vie gagne."}, - ['techmino99_h']= {"Tech 99", "DIFFICILE", "Bataille de 99 joueurs.\nLe dernier en vie gagne."}, - ['techmino99_u']= {"Tech 99", "ULTIMe", "Bataille de 99 joueurs.\nLe dernier en vie gagne."}, - ['round_e']= {"Tour à tour", "FACILE", "Mode échecs"}, - ['round_n']= {"Tour à tour", "NORMAL", "Mode échecs"}, - ['round_h']= {"Tour à tour", "DIFFICILE", "Mode échecs"}, - ['round_l']= {"Tour à tour", "LUNATIQUE", "Mode échecs"}, - ['round_u']= {"Tour à tour", "ULTIME", "Mode échecs"}, - ['master_n']= {"Master", "NORMAL", "Pour les débutants en 20G."}, - ['master_h']= {"Master", "DIFFICILE", "Challenge 20G pro !"}, - ['master_final']= {"Master", "FINAL", "20G : Un point final impossible à atteindre !"}, - -- ['master_ph']= {"Mester", "FANTASMA", "20G: ???"}, - ['master_ex']= {"GrandMaster", "EXTRA", "Tentez de devenir un Grandmaster."}, - -- ['rhythm_e']= {"Rhythm", "EASY", "200-line low-bpm rhythm marathon."}, - -- ['rhythm_h']= {"Rhythm", "HARD", "200-line medium-bpm rhythm marathon"}, - -- ['rhythm_u']= {"Rhythm", "ULTIMATE", "200-line high-bpm rhythm marathon."}, - ['blind_e']= {"Aveugle", "MOITIE", "Pour les novices."}, - ['blind_n']= {"Aveugle", "TOUT", "Pour les joueurs intermédiaires."}, - ['blind_h']= {"Aveugle", "SOUDAIN", "Pour les bons jooeurs."}, - ['blind_l']= {"Aveugle", "SOUDAIN+", "Pour les pros."}, - ['blind_u']= {"Aveugle", "?", "Êtes-vous prêt ?"}, - ['blind_wtf']= {"Aveugle", "WTF", "Vous n'êtes pas prêt."}, - ['classic_fast']= {"Classic", "CTWC", "Un mode classique rapide."}, - ['survivor_e']= {"Survivor", "FACILE", "Pendant combien de temps survivrez-vous ?"}, - ['survivor_n']= {"Survivor", "NORMAL", "Pendant combien de temps survivrez-vous ?"}, - ['survivor_h']= {"Survivor", "DIFFICILE", "Pendant combien de temps survivrez-vous ?"}, - ['survivor_l']= {"Survivor", "LUNATIQUE", "Pendant combien de temps survivrez-vous ?"}, - ['survivor_u']= {"Survivor", "ULTIME", "Pendant combien de temps survivrez-vous ?"}, - ['attacker_h']= {"Attaquant", "DIFFICILE", "Soyez offensifs !"}, - ['attacker_u']= {"Attaquant", "ULTIME", "Soyez offensifs !"}, - ['defender_n']= {"Défendant", "NORMAL", "Soyez défensifs !"}, - ['defender_l']= {"Défendant", "LUNATIQUE", "Soyez défensifs !"}, - ['dig_h']= {"Perceuse", "DIFFICILE", "Essayez de creuser !"}, - ['dig_u']= {"Perceuse", "ULTIME", "Essayez de creuser !"}, - ['bigbang']= {"Big Bang", "FACILE", "Tutoriel All-Spin\nEn construction..."}, - ['c4wtrain_n']= {"Mode essai C4W", "NORMAL", "Combos infinis."}, - ['c4wtrain_l']= {"Mode essai C4W", "LUNATIQUE", "Combos infinis."}, - ['pctrain_n']= {"Mode essai PC", "NORMAL", "Mode Perfect Clear simple"}, - ['pctrain_l']= {"Mode essai PC", "LUNATIQUE", "Mode Perfect Clear dur"}, - ['pc_n']= {"PC Challenge", "NORMAL", "Obtenez un PC dans les prochaines 100 lignes !"}, - ['pc_h']= {"PC Challenge", "DIFFICILE", "Obtenez un PC dans les prochaines 100 lignes !"}, - ['pc_l']= {"PC Challenge", "LUNATIQUE", "Obtenez un PC dans les prochaines 100 lignes !"}, - -- ['pc_inf']= {"Inf. PC Challenge","", "Get PCs as much as you can"}, - ['tech_n']= {"Tech", "NORMAL", "Gardez le B2B !"}, - ['tech_n_plus']= {"Tech", "NORMAL+", "Spin & PC uniquement"}, - ['tech_h']= {"Tech", "DIFFICILE", "Gardez le B2B !"}, - ['tech_h_plus']= {"Tech", "HARD+", "Spin & PC uniquement"}, - ['tech_l']= {"Tech", "LUNATIQUE", "Gardez le B2B !"}, - ['tech_l_plus']= {"Tech", "LUNATIQUE+", "Spin & PC uniquement"}, - ['tech_finesse']= {"Tech", "FINESSE", "Pas d'erreurs de finesse !"}, - ['tech_finesse_f']= {"Tech", "FINESSE+", "Pas de nettoyages normaux, Pas d'erreurs de finesse !"}, - ['tsd_e']= {"TSD Challenge", "FACILE", "T-spin doubles uniquement !"}, - ['tsd_h']= {"TSD Challenge", "DIFFICILE", "T-spin doubles uniquement !"}, - ['tsd_u']= {"TSD Challenge", "ULTIME", "T-spin doubles uniquement !"}, - -- ['backfire_n']= {"Backfire", "NORMAL", "Self-send garbages"}, - -- ['backfire_h']= {"Backfire", "HARD", "Self-send garbages"}, - -- ['backfire_l']= {"Backfire", "LUNATIC", "Self-send garbages"}, - -- ['backfire_u']= {"Backfire", "ULTIMATE", "Self-send garbages"}, - -- ['sprintAtk']= {"Sprint", "100 Attack", "Send 100 lines!"}, - ['zen']= {'Zen', "200", "200 lignes sans limites de temps."}, - ['ultra']= {'Ultra', "EXTRA", "2 minutes pour avoir le meilleur score."}, - ['infinite']= {"Infini", "", "Mode tranquile."}, - ['infinite_dig']= {"Infini : Dig", "", "Creuser, creuser, creuser."}, + -- couldSave="Cloud Save (need login) (CAUTION: TESTING)", + -- notLogin="[Login to access cloud save]", + -- upload="Upload to cloud", + -- download="Download from cloud", + }, + error={ + console="Console", + quit="Quit", + }, + }, + modes={ + ['sprint_10l']= {"Sprint", "10L", "Nettoyez 10 lignes !"}, + ['sprint_20l']= {"Sprint", "20L", "Nettoyez 20 lignes !"}, + ['sprint_40l']= {"Sprint", "40L", "Nettoyez 40 lignes !"}, + ['sprint_100l']= {"Sprint", "100L", "Nettoyez 100 lignes !"}, + ['sprint_400l']= {"Sprint", "400L", "Nettoyez 400 lignes !"}, + ['sprint_1000l']= {"Sprint", "1000L", "Nettoyez 1000 lignes !"}, + ['sprintPenta']= {"Sprint", "Pentomino", "40 lignes avec 18 pentominos."}, + ['sprintMPH']= {"Sprint", "MPH", "Memoryless\nPreviewless\nHoldless"}, + ['dig_10l']= {"Dig", "10L", "Creusez 10 lines"}, + ['dig_40l']= {"Dig", "40L", "Creusez 40 lines"}, + ['dig_100l']= {"Dig", "100L", "Creusez 100 lines"}, + ['dig_400l']= {"Dig", "400L", "Creusez 400 lines"}, + ['dig_1000l']= {"Dig", "1000L", "Creusez 1000 lines"}, + ['drought_n']= {"Drought", "100L", "Pas de pièce I !"}, + ['drought_l']= {"Drought+", "100L", "WTF ??!!"}, + -- ['stack_e']= {"Stack", "FACILE", "Pack them!"}, + -- ['stack_h']= {"Stack", "DIFFICILE", "Pack them!"}, + -- ['stack_u']= {"Stack", "ULTIME", "Pack them!"}, + ['marathon_n']= {"Marathon", "NORMAL", "Marathon de 200 lignes."}, + ['marathon_h']= {"Marathon", "DIFFICILE", "Marathon de 200 lignes à très haute vitesse"}, + ['solo_e']= {"Battle", "FACILE", "Battez l'IA !"}, + ['solo_n']= {"Battle", "NORMAL", "Battez l'IA !"}, + ['solo_h']= {"Battle", "DIFFICILE", "Battez l'IA !"}, + ['solo_l']= {"Battle", "LUNATIQUE", "Battez l'IA !"}, + ['solo_u']= {"Battle", "ULTIME", "Battez l'IA !"}, + ['techmino49_e']= {"Tech 49", "FACILE", "Bataille de 49 joueurs.\nLe dernier en vie gagne."}, + ['techmino49_h']= {"Tech 49", "DIFFICILE", "Bataille de 49 joueurs.\nLe dernier en vie gagne."}, + ['techmino49_u']= {"Tech 49", "ULTIME", "Bataille de 49 joueurs.\nLe dernier en vie gagne."}, + ['techmino99_e']= {"Tech 99", "FACILE", "Bataille de 99 joueurs.\nLe dernier en vie gagne."}, + ['techmino99_h']= {"Tech 99", "DIFFICILE", "Bataille de 99 joueurs.\nLe dernier en vie gagne."}, + ['techmino99_u']= {"Tech 99", "ULTIMe", "Bataille de 99 joueurs.\nLe dernier en vie gagne."}, + ['round_e']= {"Tour à tour", "FACILE", "Mode échecs"}, + ['round_n']= {"Tour à tour", "NORMAL", "Mode échecs"}, + ['round_h']= {"Tour à tour", "DIFFICILE", "Mode échecs"}, + ['round_l']= {"Tour à tour", "LUNATIQUE", "Mode échecs"}, + ['round_u']= {"Tour à tour", "ULTIME", "Mode échecs"}, + ['master_n']= {"Master", "NORMAL", "Pour les débutants en 20G."}, + ['master_h']= {"Master", "DIFFICILE", "Challenge 20G pro !"}, + ['master_final']= {"Master", "FINAL", "20G : Un point final impossible à atteindre !"}, + -- ['master_ph']= {"Mester", "FANTASMA", "20G: ???"}, + ['master_ex']= {"GrandMaster", "EXTRA", "Tentez de devenir un Grandmaster."}, + -- ['rhythm_e']= {"Rhythm", "EASY", "200-line low-bpm rhythm marathon."}, + -- ['rhythm_h']= {"Rhythm", "HARD", "200-line medium-bpm rhythm marathon"}, + -- ['rhythm_u']= {"Rhythm", "ULTIMATE", "200-line high-bpm rhythm marathon."}, + ['blind_e']= {"Aveugle", "MOITIE", "Pour les novices."}, + ['blind_n']= {"Aveugle", "TOUT", "Pour les joueurs intermédiaires."}, + ['blind_h']= {"Aveugle", "SOUDAIN", "Pour les bons jooeurs."}, + ['blind_l']= {"Aveugle", "SOUDAIN+", "Pour les pros."}, + ['blind_u']= {"Aveugle", "?", "Êtes-vous prêt ?"}, + ['blind_wtf']= {"Aveugle", "WTF", "Vous n'êtes pas prêt."}, + ['classic_fast']= {"Classic", "CTWC", "Un mode classique rapide."}, + ['survivor_e']= {"Survivor", "FACILE", "Pendant combien de temps survivrez-vous ?"}, + ['survivor_n']= {"Survivor", "NORMAL", "Pendant combien de temps survivrez-vous ?"}, + ['survivor_h']= {"Survivor", "DIFFICILE", "Pendant combien de temps survivrez-vous ?"}, + ['survivor_l']= {"Survivor", "LUNATIQUE", "Pendant combien de temps survivrez-vous ?"}, + ['survivor_u']= {"Survivor", "ULTIME", "Pendant combien de temps survivrez-vous ?"}, + ['attacker_h']= {"Attaquant", "DIFFICILE", "Soyez offensifs !"}, + ['attacker_u']= {"Attaquant", "ULTIME", "Soyez offensifs !"}, + ['defender_n']= {"Défendant", "NORMAL", "Soyez défensifs !"}, + ['defender_l']= {"Défendant", "LUNATIQUE", "Soyez défensifs !"}, + ['dig_h']= {"Perceuse", "DIFFICILE", "Essayez de creuser !"}, + ['dig_u']= {"Perceuse", "ULTIME", "Essayez de creuser !"}, + ['bigbang']= {"Big Bang", "FACILE", "Tutoriel All-Spin\nEn construction..."}, + ['c4wtrain_n']= {"Mode essai C4W", "NORMAL", "Combos infinis."}, + ['c4wtrain_l']= {"Mode essai C4W", "LUNATIQUE", "Combos infinis."}, + ['pctrain_n']= {"Mode essai PC", "NORMAL", "Mode Perfect Clear simple"}, + ['pctrain_l']= {"Mode essai PC", "LUNATIQUE", "Mode Perfect Clear dur"}, + ['pc_n']= {"PC Challenge", "NORMAL", "Obtenez un PC dans les prochaines 100 lignes !"}, + ['pc_h']= {"PC Challenge", "DIFFICILE", "Obtenez un PC dans les prochaines 100 lignes !"}, + ['pc_l']= {"PC Challenge", "LUNATIQUE", "Obtenez un PC dans les prochaines 100 lignes !"}, + -- ['pc_inf']= {"Inf. PC Challenge","", "Get PCs as much as you can"}, + ['tech_n']= {"Tech", "NORMAL", "Gardez le B2B !"}, + ['tech_n_plus']= {"Tech", "NORMAL+", "Spin & PC uniquement"}, + ['tech_h']= {"Tech", "DIFFICILE", "Gardez le B2B !"}, + ['tech_h_plus']= {"Tech", "HARD+", "Spin & PC uniquement"}, + ['tech_l']= {"Tech", "LUNATIQUE", "Gardez le B2B !"}, + ['tech_l_plus']= {"Tech", "LUNATIQUE+", "Spin & PC uniquement"}, + ['tech_finesse']= {"Tech", "FINESSE", "Pas d'erreurs de finesse !"}, + ['tech_finesse_f']={"Tech", "FINESSE+", "Pas de nettoyages normaux, Pas d'erreurs de finesse !"}, + ['tsd_e']= {"TSD Challenge", "FACILE", "T-spin doubles uniquement !"}, + ['tsd_h']= {"TSD Challenge", "DIFFICILE", "T-spin doubles uniquement !"}, + ['tsd_u']= {"TSD Challenge", "ULTIME", "T-spin doubles uniquement !"}, + -- ['backfire_n']= {"Backfire", "NORMAL", "Self-send garbages"}, + -- ['backfire_h']= {"Backfire", "HARD", "Self-send garbages"}, + -- ['backfire_l']= {"Backfire", "LUNATIC", "Self-send garbages"}, + -- ['backfire_u']= {"Backfire", "ULTIMATE", "Self-send garbages"}, + -- ['sprintAtk']= {"Sprint", "100 Attack", "Send 100 lines!"}, + ['zen']= {'Zen', "200", "200 lignes sans limites de temps."}, + ['ultra']= {'Ultra', "EXTRA", "2 minutes pour avoir le meilleur score."}, + ['infinite']= {"Infini", "", "Mode tranquile."}, + ['infinite_dig']= {"Infini : Dig", "", "Creuser, creuser, creuser."}, - ['sprintFix']= {"Sprint", "Sans gauche/droite"}, - ['sprintLock']= {"Sprint", "Sans rotation"}, - -- ['sprintSmooth']= {"Sprint", "NO FRICTION"}, - ['marathon_bfmax']= {"Marathon", "ULTIME"}, + ['sprintFix']= {"Sprint", "Sans gauche/droite"}, + ['sprintLock']= {"Sprint", "Sans rotation"}, + -- ['sprintSmooth']= {"Sprint", "NO FRICTION"}, + ['marathon_bfmax']={"Marathon", "ULTIME"}, - ['master_l']= {"Master", "LUNATIQUE"}, - ['master_u']= {"Master", "ULTIME"}, + ['master_l']= {"Master", "LUNATIQUE"}, + ['master_u']= {"Master", "ULTIME"}, - ['custom_clear']= {"Perso.", "NORMAL"}, - ['custom_puzzle']= {"Perso.", "PUZZLE"}, - }, + ['custom_clear']= {"Perso.", "NORMAL"}, + ['custom_puzzle']= {"Perso.", "PUZZLE"}, + }, } \ No newline at end of file diff --git a/parts/language/lang_pt.lua b/parts/language/lang_pt.lua index c6871dff..cfed8fd6 100644 --- a/parts/language/lang_pt.lua +++ b/parts/language/lang_pt.lua @@ -1,937 +1,937 @@ local C=COLOR return{ - fallback=4, - sureQuit="Aparte novamente para sair", - newDay="[Anti-vício] Novo dia, um começo novo!", - playedLong="[Anti-vício] Você andou jogando bastante hoje. Certifique-se de fazer pausas.", - playedTooMuch="[Anti-vício] Você esteve jogando demais hoje! Você não pode jogar mais.", + fallback=4, + sureQuit="Aparte novamente para sair", + newDay="[Anti-vício] Novo dia, um começo novo!", + playedLong="[Anti-vício] Você andou jogando bastante hoje. Certifique-se de fazer pausas.", + playedTooMuch="[Anti-vício] Você esteve jogando demais hoje! Você não pode jogar mais.", - atkModeName={"Aleatório","Emblemas","K.O.s","Atacantes"}, - royale_remain="$1 Jogadores restantes", - cmb={nil,"1 Combo","2 Combo","3 Combo","4 Combo","5 Combo","6 Combo","7 Combo","8 Combo","9 Combo","10 Combo!","11 Combo!","12 Combo!","13 Combo!","14 Combo!!","15 Combo!!","16 Combo!!","17 Combo!!!","18 Combo!!!","19 Combo!!!","MEGACMB"}, - spin="-Spin ", - clear={"Single","Double","Triple","Techrash","Pentacrash","Hexacrash"}, - mini="Mini",b2b="B2B ",b3b="B2B2B ", - PC="Perfect Clear",HPC="Clear", - replaying="[Replay]", - -- tasUsing="[TAS]", + atkModeName={"Aleatório","Emblemas","K.O.s","Atacantes"}, + royale_remain="$1 Jogadores restantes", + cmb={nil,"1 Combo","2 Combo","3 Combo","4 Combo","5 Combo","6 Combo","7 Combo","8 Combo","9 Combo","10 Combo!","11 Combo!","12 Combo!","13 Combo!","14 Combo!!","15 Combo!!","16 Combo!!","17 Combo!!!","18 Combo!!!","19 Combo!!!","MEGACMB"}, + spin="-Spin ", + clear={"Single","Double","Triple","Techrash","Pentacrash","Hexacrash"}, + mini="Mini",b2b="B2B ",b3b="B2B2B ", + PC="Perfect Clear",HPC="Clear", + replaying="[Replay]", + -- tasUsing="[TAS]", - stage="Fase $1", - great="Ótimo!", - awesome="Incrível!", - almost="Quase!", - continue="Continue!", - maxspeed="Velocidade máxima!", - speedup="Mais rápido!", - missionFailed="Missão falha", + stage="Fase $1", + great="Ótimo!", + awesome="Incrível!", + almost="Quase!", + continue="Continue!", + maxspeed="Velocidade máxima!", + speedup="Mais rápido!", + missionFailed="Missão falha", - speedLV="Nível de velocidade", - piece="Peça",line="Linhas",atk="Ataque",eff="Eficiência", - rpm="RPM",tsd="TSD", - grade="Grade",techrash="Techrash", - wave="Onda",nextWave="Próxima", - combo="Combo",maxcmb="Combo máximo", - pc="Tudo limpo",ko="KO", + speedLV="Nível de velocidade", + piece="Peça",line="Linhas",atk="Ataque",eff="Eficiência", + rpm="RPM",tsd="TSD", + grade="Grade",techrash="Techrash", + wave="Onda",nextWave="Próxima", + combo="Combo",maxcmb="Combo máximo", + pc="Tudo limpo",ko="KO", - -- win="Win", - -- lose="Lose", + -- win="Win", + -- lose="Lose", - finish="Terminou", - gamewin="Você venceu!", - gameover="Fim de jogo", + finish="Terminou", + gamewin="Você venceu!", + gameover="Fim de jogo", - pause="Pausa", - pauseCount="Pausas", - finesse_ap="Tudo perfeito", - finesse_fc="Combo completo", + pause="Pausa", + pauseCount="Pausas", + finesse_ap="Tudo perfeito", + finesse_fc="Combo completo", - page="Página:", + page="Página:", - ai_fixed="A inteligência é incompatível com sequências fixas.", - --ai_prebag="The AI is incompatible with custom sequences which have nontetromino.", inteligência é incompatível com sequências fixas.", - ai_mission="A inteligência é incompatível com missões costumizadas.", - switchSpawnSFX="Switch on spawn SFX to play", - needRestart="Funciona após reiniciar", + ai_fixed="A inteligência é incompatível com sequências fixas.", + --ai_prebag="The AI is incompatible with custom sequences which have nontetromino.", inteligência é incompatível com sequências fixas.", + ai_mission="A inteligência é incompatível com missões costumizadas.", + switchSpawnSFX="Switch on spawn SFX to play", + needRestart="Funciona após reiniciar", - saveDone="Data Salva", - saveError="Falha ao salvar:", - -- saveError_duplicate="Duplicate filename", - loadError="Falha ao ler:", - exportSuccess="Exportado com sucesso", - importSuccess="Importado com sucesso", - dataCorrupted="Data corrompida", - -- pasteWrongPlace="Paste at wrong place?", - -- noFile="File not found", + saveDone="Data Salva", + saveError="Falha ao salvar:", + -- saveError_duplicate="Duplicate filename", + loadError="Falha ao ler:", + exportSuccess="Exportado com sucesso", + importSuccess="Importado com sucesso", + dataCorrupted="Data corrompida", + -- pasteWrongPlace="Paste at wrong place?", + -- noFile="File not found", - VKTchW="Peso de toque", - VKOrgW="Peso da origem", - VKCurW="Peso da pos atual", + VKTchW="Peso de toque", + VKOrgW="Peso da origem", + VKCurW="Peso da pos atual", - noScore="Sem pontuação ainda", - -- modeLocked="Locked", - -- unlockHint="Achieve Rank D or above in prerequisite modes to unlock.", - highScore="Melhor pessoal", - newRecord="Novo recorde", + noScore="Sem pontuação ainda", + -- modeLocked="Locked", + -- unlockHint="Achieve Rank D or above in prerequisite modes to unlock.", + highScore="Melhor pessoal", + newRecord="Novo recorde", - -- replayBroken="Cannot load replay", + -- replayBroken="Cannot load replay", - getNoticeFail="Não conseguiu ter anúncios", - oldVersion="Versão $1 esta disponível agora!", - -- versionNotMatch="Version do not match!", - -- needUpdate="Newer version required!", - -- notFinished="Coming soon!", + getNoticeFail="Não conseguiu ter anúncios", + oldVersion="Versão $1 esta disponível agora!", + -- versionNotMatch="Version do not match!", + -- needUpdate="Newer version required!", + -- notFinished="Coming soon!", - jsonError="Json error", + jsonError="Json error", - noUsername="Insira seu nome de usuário", - wrongEmail="Endereço de email errado", - noPassword="Insira sua senha ", - diffPassword="Senhas não combinam", - -- registerRequestSent="Registration request sent", - registerSuccessed="Registrado com sucesso!", - loginSuccessed="Logado com sucesso!", - accessSuccessed="Autorizado com sucesso!", + noUsername="Insira seu nome de usuário", + wrongEmail="Endereço de email errado", + noPassword="Insira sua senha ", + diffPassword="Senhas não combinam", + -- registerRequestSent="Registration request sent", + registerSuccessed="Registrado com sucesso!", + loginSuccessed="Logado com sucesso!", + accessSuccessed="Autorizado com sucesso!", - -- wsConnecting="Websocket Connecting", - wsFailed="WebSocket falha na conexão", - wsClose="WebSocket closed:", - -- netTimeout="Network connection timeout", + -- wsConnecting="Websocket Connecting", + wsFailed="WebSocket falha na conexão", + wsClose="WebSocket closed:", + -- netTimeout="Network connection timeout", - -- onlinePlayerCount="Online", - -- createRoomSuccessed="Room successfully created!", - -- started="Playing", - joinRoom="Entrou a sala.", - leaveRoom="Saiu da sala.", - -- ready="READY", - -- connStream="CONNECTING", - -- waitStream="WAITING", - -- spectating="Spectating", - chatRemain="Online", - chatStart="------Começo do log------", - chatHistory="------Novas mensagens abaixo------", + -- onlinePlayerCount="Online", + -- createRoomSuccessed="Room successfully created!", + -- started="Playing", + joinRoom="Entrou a sala.", + leaveRoom="Saiu da sala.", + -- ready="READY", + -- connStream="CONNECTING", + -- waitStream="WAITING", + -- spectating="Spectating", + chatRemain="Online", + chatStart="------Começo do log------", + chatHistory="------Novas mensagens abaixo------", - errorMsg="Um erro ocorreu e Techmino precisa reiniciar.\nInformação do erro foi criada, e você pode mandar ao autor.", + errorMsg="Um erro ocorreu e Techmino precisa reiniciar.\nInformação do erro foi criada, e você pode mandar ao autor.", - modInstruction="Selecione mods (modificadores) para usar!\nMods irão modificar o jogo em formas diferentes\n(e possivelmente quebrar o jogo de formas estranhas).\nAlguns mods irão fazer seu jogo unranked.", - modInfo={ - next="Próximo\nSobrepõe a largura da fila de próximos", - hold="Segure\nSobrepõe a largura da fila de segurar", - hideNext="Esconde próximos\nEsconde algumas das próximas peças", - infHold="Segure infinito\nVocê pode usar a função de segurar infinitamente.", - hideBlock="Esconder o bloco atual:\nFaça a peça que você esta controlando invisível", - hideGhost="Esconder o fantasma\nFaça o fantasma invisível", - hidden="Esconda blocos largados\nPeças desaparecem depois de cair(pode escolher a demora)", - hideBoard="Esconda o tabuleiro\nEsconda parte do tabuleiro, ou o tabuleiro inteiro", - flipBoard="Gire o tabuleiro\nGire o tabuleiro.", - dropDelay="Velocidade de queda \nSobrepõe a velocidade de queda (unidade: frames/bloco)", - lockDelay="Demora de trava\nSobrepõe a demora de trava (unidade: frames)", - waitDelay="Demora de nascer\nSobrepõe a demora de blocos nascer (unidade: frames)", - fallDelay="Demora de linhas\nSobrepõe demora de linhas depois de limpar-las (unidade: frames)", - life="Vidas\nSobrepõe o número de vidas jogadores tem", - forceB2B="Apenas B2B\nO jogo termina quando o calibre de B2B cai abaixo a linha do começo", - forceFinesse="Só Destreza\nO jogo termina quando erra a destreza", - tele="Teleporte\nForçar movimento 0 DAS e 0 ARR", - noRotation="Sem rotação \nBotões de rotação estao desativados", - noMove="Sem movimentos\nBotões de movimento esquerda e direita estão desativados", - customSeq="Randomizador\nSobrepõe o randomizador do jogo", - pushSpeed="Velocidade de lixo\nSobrepõe a velocidade que o lixo cresce (unidade: blocos/frame)", - boneBlock="Bone\nJogue com blocos bone", - }, - pauseStat={ - "Tempo:", - "Tecla/Rot./Segurar:", - "Peça:", - "Linha/Dig:", - "Ataque/DigAtk:", - "Recebido:", - "Limpas:", - "Giros:", - "B2B/B3B/PC/HPC:", - "Destreza:", - }, - radar={"DEF","OFF","ATK","SEND","SPD","DIG"}, - radarData={"D'PM","ADPM","APM","SPM","L'PM","DPM"}, - stat={ - "Vezes iniciadas:", - "Jogos:", - "Tempo jogado:", - "Tecla/Rot./Segurar:", - "Blocos/Linhas/Ataque:", - "Recv./Res./Asc.:", - "Dig/Dig Atk.:", - "Eff./Dig Eff.:", - "B2B/B3B:", - "PC/HPC:", - "FalhaDestreza/TaxaDestreza:", - }, - aboutTexts={ - "Isso é apenas um jogo de blocos, nada de especial.", - "Joga como C2/IO/JS/WWC/KOS e outros.", - "", - "Feito na Love 2D Engine", - "Por favor mande bugs ou sugestões para o autor.", - "certifique-se de pegar o jogo de fontes oficiais;", - "binários obtidos em outros lugares pode conter malware.", - "O autor não é responsável por qualquer binários modificados", - "O jogo é gratis, mas doações são apreciadas." - }, - staff={ - "Author: MrZ E-mail: 1046101471@qq.com", - "Powered by LÖVE", - "", - "Programa: MrZ, Particle_G, [FinnTenzor]", - "Art: MrZ, Gnyar, ScF, [旋律星萤, T0722]", - "Music: MrZ, ERM, [T0722, Aether]", - "Voice & Sound: Miya, Xiaoya, Naki, MrZ", - "Performance: 模电, HBM", - "Traduzir: User670, MattMayuga, Mizu, Mr.Faq, ScF", - "", - "Special Thanks:", - "User670, Flyz, Big_True, Trebor, NOT-A-ROBOT, 思竣, scdhh", - "yuhao7370, Farter, Teatube, 蕴空之灵, T9972, [All test staff]", - }, - used=[[ - Ferramentas usadas: - Beepbox - Goldwave - GFIE - FL Mobile - Libs used: - Cold_Clear [MinusKelvin] - json.lua [rxi] - profile.lua [itraykov] - simple-love-lights [dylhunn] - ]], - support="Support author", - group="Junte-se ao nosso Discord: discord.gg/f9pUvkh", - WidgetText={ - main={ - offline="Solo", - -- qplay="Last Play", - online="Multi", - custom="Custom", - setting="Config.", - stat="Stats", - -- music="Music & SE", - dict="Zictionary", - -- replays="Replays", - }, - main_simple={ - sprint="Sprint", - marathon="Maratona", - }, - mode={ - mod="Mods (F1)", - start="Começar", - }, - mod={ - title="Mods", - reset="Reset (tab)", - unranked="Unranked", - }, - pause={ - setting="Config. (S)", - replay="Replay (P)", - save="Salvar (O)", - resume="Resumir (esc)", - restart="Reiniciar (R)", - quit="Sair (Q)", - -- tas="TAS (T)", - }, - net_menu={ - -- league="Tech League", - ffa="FFA", - rooms="Salas", - -- logout="Log out", - }, - net_league={ - -- match="Find Match", - }, - net_rooms={ - password="Senha", - -- refreshing="Refreshing Rooms", - noRoom="Nenhuma sala agora", - -- refresh="Refresh", - -- new="New Room", - -- join="Join", - }, - net_newRoom={ - -- title="Room config", - -- roomName="Room name(default to username's room)", - password="Senha", - -- description="Room description", + modInstruction="Selecione mods (modificadores) para usar!\nMods irão modificar o jogo em formas diferentes\n(e possivelmente quebrar o jogo de formas estranhas).\nAlguns mods irão fazer seu jogo unranked.", + modInfo={ + next="Próximo\nSobrepõe a largura da fila de próximos", + hold="Segure\nSobrepõe a largura da fila de segurar", + hideNext="Esconde próximos\nEsconde algumas das próximas peças", + infHold="Segure infinito\nVocê pode usar a função de segurar infinitamente.", + hideBlock="Esconder o bloco atual:\nFaça a peça que você esta controlando invisível", + hideGhost="Esconder o fantasma\nFaça o fantasma invisível", + hidden="Esconda blocos largados\nPeças desaparecem depois de cair(pode escolher a demora)", + hideBoard="Esconda o tabuleiro\nEsconda parte do tabuleiro, ou o tabuleiro inteiro", + flipBoard="Gire o tabuleiro\nGire o tabuleiro.", + dropDelay="Velocidade de queda \nSobrepõe a velocidade de queda (unidade: frames/bloco)", + lockDelay="Demora de trava\nSobrepõe a demora de trava (unidade: frames)", + waitDelay="Demora de nascer\nSobrepõe a demora de blocos nascer (unidade: frames)", + fallDelay="Demora de linhas\nSobrepõe demora de linhas depois de limpar-las (unidade: frames)", + life="Vidas\nSobrepõe o número de vidas jogadores tem", + forceB2B="Apenas B2B\nO jogo termina quando o calibre de B2B cai abaixo a linha do começo", + forceFinesse="Só Destreza\nO jogo termina quando erra a destreza", + tele="Teleporte\nForçar movimento 0 DAS e 0 ARR", + noRotation="Sem rotação \nBotões de rotação estao desativados", + noMove="Sem movimentos\nBotões de movimento esquerda e direita estão desativados", + customSeq="Randomizador\nSobrepõe o randomizador do jogo", + pushSpeed="Velocidade de lixo\nSobrepõe a velocidade que o lixo cresce (unidade: blocos/frame)", + boneBlock="Bone\nJogue com blocos bone", + }, + pauseStat={ + "Tempo:", + "Tecla/Rot./Segurar:", + "Peça:", + "Linha/Dig:", + "Ataque/DigAtk:", + "Recebido:", + "Limpas:", + "Giros:", + "B2B/B3B/PC/HPC:", + "Destreza:", + }, + radar={"DEF","OFF","ATK","SEND","SPD","DIG"}, + radarData={"D'PM","ADPM","APM","SPM","L'PM","DPM"}, + stat={ + "Vezes iniciadas:", + "Jogos:", + "Tempo jogado:", + "Tecla/Rot./Segurar:", + "Blocos/Linhas/Ataque:", + "Recv./Res./Asc.:", + "Dig/Dig Atk.:", + "Eff./Dig Eff.:", + "B2B/B3B:", + "PC/HPC:", + "FalhaDestreza/TaxaDestreza:", + }, + aboutTexts={ + "Isso é apenas um jogo de blocos, nada de especial.", + "Joga como C2/IO/JS/WWC/KOS e outros.", + "", + "Feito na Love 2D Engine", + "Por favor mande bugs ou sugestões para o autor.", + "certifique-se de pegar o jogo de fontes oficiais;", + "binários obtidos em outros lugares pode conter malware.", + "O autor não é responsável por qualquer binários modificados", + "O jogo é gratis, mas doações são apreciadas." + }, + staff={ + "Author: MrZ E-mail: 1046101471@qq.com", + "Powered by LÖVE", + "", + "Programa: MrZ, Particle_G, [FinnTenzor]", + "Art: MrZ, Gnyar, ScF, [旋律星萤, T0722]", + "Music: MrZ, ERM, [T0722, Aether]", + "Voice & Sound: Miya, Xiaoya, Naki, MrZ", + "Performance: 模电, HBM", + "Traduzir: User670, MattMayuga, Mizu, Mr.Faq, ScF", + "", + "Special Thanks:", + "User670, Flyz, Big_True, Trebor, NOT-A-ROBOT, 思竣, scdhh", + "yuhao7370, Farter, Teatube, 蕴空之灵, T9972, [All test staff]", + }, + used=[[ + Ferramentas usadas: + Beepbox + Goldwave + GFIE + FL Mobile + Libs used: + Cold_Clear [MinusKelvin] + json.lua [rxi] + profile.lua [itraykov] + simple-love-lights [dylhunn] + ]], + support="Support author", + group="Junte-se ao nosso Discord: discord.gg/f9pUvkh", + WidgetText={ + main={ + offline="Solo", + -- qplay="Last Play", + online="Multi", + custom="Custom", + setting="Config.", + stat="Stats", + -- music="Music & SE", + dict="Zictionary", + -- replays="Replays", + }, + main_simple={ + sprint="Sprint", + marathon="Maratona", + }, + mode={ + mod="Mods (F1)", + start="Começar", + }, + mod={ + title="Mods", + reset="Reset (tab)", + unranked="Unranked", + }, + pause={ + setting="Config. (S)", + replay="Replay (P)", + save="Salvar (O)", + resume="Resumir (esc)", + restart="Reiniciar (R)", + quit="Sair (Q)", + -- tas="TAS (T)", + }, + net_menu={ + -- league="Tech League", + ffa="FFA", + rooms="Salas", + -- logout="Log out", + }, + net_league={ + -- match="Find Match", + }, + net_rooms={ + password="Senha", + -- refreshing="Refreshing Rooms", + noRoom="Nenhuma sala agora", + -- refresh="Refresh", + -- new="New Room", + -- join="Join", + }, + net_newRoom={ + -- title="Room config", + -- roomName="Room name(default to username's room)", + password="Senha", + -- description="Room description", - life="Vidas", - pushSpeed="Garbage Speed", - -- garbageSpeed="Velocidade De Lixo", - visible="Visibilidade", - freshLimit="Limite Reset de Trava", + life="Vidas", + pushSpeed="Garbage Speed", + -- garbageSpeed="Velocidade De Lixo", + visible="Visibilidade", + freshLimit="Limite Reset de Trava", - -- fieldH="Field height", - -- bufferLimit="Buffer Limit", - -- heightLimit="Height Limit", + -- fieldH="Field height", + -- bufferLimit="Buffer Limit", + -- heightLimit="Height Limit", - drop="Delay Queda", - lock="Delay Trava", - wait="Delay Entrada", - fall="Delay Linha", + drop="Delay Queda", + lock="Delay Trava", + wait="Delay Entrada", + fall="Delay Linha", - -- capacity="Capacity", - -- create="Create", + -- capacity="Capacity", + -- create="Create", - ospin="O-Spin", - fineKill="100% Finesse", - b2bKill="Sem Quebrar B2B", - easyFresh="Reset De Trava Normal", - -- deepDrop="Deep Drop", - bone="Bone Blocks", + ospin="O-Spin", + fineKill="100% Finesse", + b2bKill="Sem Quebrar B2B", + easyFresh="Reset De Trava Normal", + -- deepDrop="Deep Drop", + bone="Bone Blocks", - nextCount="Prox.", - holdCount="Segurar", - infHold="Segurar Infinito", - -- phyHold="Physical Hold", - }, - net_game={ - -- ready="Ready", - -- spectate="Spectate", - -- cancel="Cancel", - }, - setting_game={ - title="Config. de jogo", - graphic="←Video", - sound="Som→", + nextCount="Prox.", + holdCount="Segurar", + infHold="Segurar Infinito", + -- phyHold="Physical Hold", + }, + net_game={ + -- ready="Ready", + -- spectate="Spectate", + -- cancel="Cancel", + }, + setting_game={ + title="Config. de jogo", + graphic="←Video", + sound="Som→", - ctrl="Config. controle", - key="Map. teclas", - touch="Config. toque", - reTime="Demora iniciação", - RS="Sistema de rotação", - layout="Layout", - autoPause="Pausar quando foco for perco", - -- menuPos="Menu button pos.", - swap="Combinação de tecla(Mudar modo de atk)", - -- autoSave="Auto save new-best", - -- simpMode="Simple mode", - }, - setting_video={ - title="Config. de vídeo", - sound="←Som", - game="Jogo→", + ctrl="Config. controle", + key="Map. teclas", + touch="Config. toque", + reTime="Demora iniciação", + RS="Sistema de rotação", + layout="Layout", + autoPause="Pausar quando foco for perco", + -- menuPos="Menu button pos.", + swap="Combinação de tecla(Mudar modo de atk)", + -- autoSave="Auto save new-best", + -- simpMode="Simple mode", + }, + setting_video={ + title="Config. de vídeo", + sound="←Som", + game="Jogo→", - block="Mostrar bloco", - smooth="Queda suave", - upEdge="3D bloco", - bagLine="Linha da bolsa", + block="Mostrar bloco", + smooth="Queda suave", + upEdge="3D bloco", + bagLine="Linha da bolsa", - -- ghostType="Ghost Type", - ghost="Fantasma", - center="Centro", - grid="Rede", - -- lineNum="line No.", + -- ghostType="Ghost Type", + ghost="Fantasma", + center="Centro", + grid="Rede", + -- lineNum="line No.", - lockFX="Nível FX Trava", - dropFX="Nível FX Queda", - moveFX="Nível FX Mover", - clearFX="Nível FX Limpar", - splashFX="Nível FX Splash", - shakeFX="Nível Tremida Tabuleiro", - atkFX="Nível FX Atk.", - frame="Render Frame Rate(%)", + lockFX="Nível FX Trava", + dropFX="Nível FX Queda", + moveFX="Nível FX Mover", + clearFX="Nível FX Limpar", + splashFX="Nível FX Splash", + shakeFX="Nível Tremida Tabuleiro", + atkFX="Nível FX Atk.", + frame="Render Frame Rate(%)", - text="Texto de ação", - score="Pop-up de pontos", - -- bufferWarn="Buffer Alert", - -- showSpike="Spike Counter", - nextPos="Próxima Pos.", - highCam="Vista Olho-de-pássaro", - warn="Alerta de perigo", + text="Texto de ação", + score="Pop-up de pontos", + -- bufferWarn="Buffer Alert", + -- showSpike="Spike Counter", + nextPos="Próxima Pos.", + highCam="Vista Olho-de-pássaro", + warn="Alerta de perigo", - -- clickFX="Click FX", - power="Informação bateria", - -- clean="Fast Draw", - fullscreen="Tela cheia", - bg="Fundo", + -- clickFX="Click FX", + power="Informação bateria", + -- clean="Fast Draw", + fullscreen="Tela cheia", + bg="Fundo", - -- blockSatur="Block Saturation", - -- fieldSatur="Field Saturation", - }, - setting_sound={ - title="Config. de sons", + -- blockSatur="Block Saturation", + -- fieldSatur="Field Saturation", + }, + setting_sound={ + title="Config. de sons", - game="←Jogo", - graphic="Vídeo→", + game="←Jogo", + graphic="Vídeo→", - bgm="BGM", - sfx="SFX", - stereo="Stereo", - spawn="Nascida", - warn="Alerta de perigo", - vib="Vibração", - voc="Voz", + bgm="BGM", + sfx="SFX", + stereo="Stereo", + spawn="Nascida", + warn="Alerta de perigo", + vib="Vibração", + voc="Voz", - fine="Som Falha de destreza", - cv="Pacote de voz", - apply="Aplicar", - }, - setting_control={ - title="Config. controles", - preview="Preview", + fine="Som Falha de destreza", + cv="Pacote de voz", + apply="Aplicar", + }, + setting_control={ + title="Config. controles", + preview="Preview", - das="DAS",arr="ARR", - dascut="DAS cut", - -- dropcut="Auto-lock cut", - sddas="Soft Drop DAS",sdarr="Soft Drop ARR", - ihs="Segurar Inicial", - irs="Rotação Inicial", - ims="Movimentação Inicial", - reset="Resetar", - }, - setting_key={ - a1="Esquerda", - a2="Direita", - a3="Gira direita", - a4="Gira esquerda", - a5="Gire 180°", - a6="Queda dura", - a7="Queda leve", - a8="Segurar", - a9="Função1", - a10="Função2", - a11="Esquerda imediata", - a12="Direita imediata", - a13="Queda sonic", - a14="Queda 1", - a15="Queda 4", - a16="Queda 10", - a17="Queda esquerda", - a18="Queda direita", - a19=" Zangi esquerda", - a20="Zangi direita", - restart="Reiniciar", - }, - setting_skin={ - -- skinSet="Block Skin", - title="Config. Layout", - spin1="R",spin2="R",spin3="R",spin4="R",spin5="R",spin6="R",spin7="R", - skinR="Reset Cor", - faceR="Reset Dir.", - }, - setting_touch={ - default="Default", - snap="Encaixo", - -- save1="Save1", - -- load1="Load1", - -- save2="Save2", - -- load2="Load2", - size="Tamanho", - -- shape="Shape", - }, - setting_touchSwitch={ - b1= "Esquerda:", b2="Direita:", b3="Giro Dir.:", b4="Giro Esq.:", - b5= "Giro 180°:", b6="Queda Dura:", b7="Queda Leve:", b8="Segurar:", - b9= "Função:", b10="Reiniciar Jogo:", b11="Esq. Imediata:",b12="Dir. Imediata:", - b13="Queda Sonic:", b14="Queda 1:", b15="Queda 4:", b16="Queda 10:", - b17="Queda Esq.:", b18="Queda Dir.:", b19="Zangi Esq.:", b20="Zangi Dir.:", + das="DAS",arr="ARR", + dascut="DAS cut", + -- dropcut="Auto-lock cut", + sddas="Soft Drop DAS",sdarr="Soft Drop ARR", + ihs="Segurar Inicial", + irs="Rotação Inicial", + ims="Movimentação Inicial", + reset="Resetar", + }, + setting_key={ + a1="Esquerda", + a2="Direita", + a3="Gira direita", + a4="Gira esquerda", + a5="Gire 180°", + a6="Queda dura", + a7="Queda leve", + a8="Segurar", + a9="Função1", + a10="Função2", + a11="Esquerda imediata", + a12="Direita imediata", + a13="Queda sonic", + a14="Queda 1", + a15="Queda 4", + a16="Queda 10", + a17="Queda esquerda", + a18="Queda direita", + a19=" Zangi esquerda", + a20="Zangi direita", + restart="Reiniciar", + }, + setting_skin={ + -- skinSet="Block Skin", + title="Config. Layout", + spin1="R",spin2="R",spin3="R",spin4="R",spin5="R",spin6="R",spin7="R", + skinR="Reset Cor", + faceR="Reset Dir.", + }, + setting_touch={ + default="Default", + snap="Encaixo", + -- save1="Save1", + -- load1="Load1", + -- save2="Save2", + -- load2="Load2", + size="Tamanho", + -- shape="Shape", + }, + setting_touchSwitch={ + b1= "Esquerda:", b2="Direita:", b3="Giro Dir.:", b4="Giro Esq.:", + b5= "Giro 180°:", b6="Queda Dura:", b7="Queda Leve:", b8="Segurar:", + b9= "Função:", b10="Reiniciar Jogo:", b11="Esq. Imediata:",b12="Dir. Imediata:", + b13="Queda Sonic:", b14="Queda 1:", b15="Queda 4:", b16="Queda 10:", + b17="Queda Esq.:", b18="Queda Dir.:", b19="Zangi Esq.:", b20="Zangi Dir.:", - norm="Normal", - pro="Professional", - hide="Mostrar tecla virtual", - icon="Icone", - sfx="SFX", - vib="VIB", - alpha="Transparência", + norm="Normal", + pro="Professional", + hide="Mostrar tecla virtual", + icon="Icone", + sfx="SFX", + vib="VIB", + alpha="Transparência", - track="Localizar Auto", - dodge="Auto Dodge", - }, - customGame={ - title="Jogo person.", - subTitle="Básico", - defSeq="Seq. Padrão", - noMsn="Sem missões", + track="Localizar Auto", + dodge="Auto Dodge", + }, + customGame={ + title="Jogo person.", + subTitle="Básico", + defSeq="Seq. Padrão", + noMsn="Sem missões", - drop="Delay Queda", - lock="Delay Trava", - wait="Delay Entrada", - fall="Delay Linha", + drop="Delay Queda", + lock="Delay Trava", + wait="Delay Entrada", + fall="Delay Linha", - bg="Fundo", - bgm="Música", + bg="Fundo", + bgm="Música", - copy="Copiar Tab.+Seq+Misn", - paste="Colar Tab.+Seq+Misn", - clear="Iniciar-Limpar", - puzzle="Iniciar-Puzzle", + copy="Copiar Tab.+Seq+Misn", + paste="Colar Tab.+Seq+Misn", + clear="Iniciar-Limpar", + puzzle="Iniciar-Puzzle", - -- reset="Reset (Del)", - advance="Mais (A)", - mod="Mods (F1)", - field="Editar Tab. (F)", - sequence="Editar Sequência (S)", - mission="Editar Missão (M)", + -- reset="Reset (Del)", + advance="Mais (A)", + mod="Mods (F1)", + field="Editar Tab. (F)", + sequence="Editar Sequência (S)", + mission="Editar Missão (M)", - nextCount="Prox.", - holdCount="Segurar", - infHold="Segurar Infinito", - -- phyHold="Physical Hold", + nextCount="Prox.", + holdCount="Segurar", + infHold="Segurar Infinito", + -- phyHold="Physical Hold", - -- fieldH="Field height", - visible="Visibilidade", - freshLimit="Limite Reset de Trava", - opponent="Oponente", - life="Vidas", - pushSpeed="Garbage Speed", - -- garbageSpeed="Velocidade De Lixo", + -- fieldH="Field height", + visible="Visibilidade", + freshLimit="Limite Reset de Trava", + opponent="Oponente", + life="Vidas", + pushSpeed="Garbage Speed", + -- garbageSpeed="Velocidade De Lixo", - -- bufferLimit="Buffer Limit", - -- heightLimit="Height Limit", - ospin="O-Spin", - fineKill="100% Finesse", - b2bKill="Sem Quebrar B2B", - easyFresh="Reset De Trava Normal", - -- deepDrop="Deep Drop", - bone="Bone Blocks", - }, - custom_field={ - title="Jogo Costumizado", - subTitle="Tabuleiro", + -- bufferLimit="Buffer Limit", + -- heightLimit="Height Limit", + ospin="O-Spin", + fineKill="100% Finesse", + b2bKill="Sem Quebrar B2B", + easyFresh="Reset De Trava Normal", + -- deepDrop="Deep Drop", + bone="Bone Blocks", + }, + custom_field={ + title="Jogo Costumizado", + subTitle="Tabuleiro", - any="Apagar", - space="×", - -- smart="Smart", + any="Apagar", + space="×", + -- smart="Smart", - push="Add Linha(K)", - del="Del Linha(L)", + push="Add Linha(K)", + del="Del Linha(L)", - copy="Copiar", - paste="Colar", - clear="Limpar", - demo="Não mostrar ×", + copy="Copiar", + paste="Colar", + clear="Limpar", + demo="Não mostrar ×", - newPg="Nova Página(N)", - delPg="Del Página(M)", - prevPg="Página Ant.", - nextPg="Prox. Página", - }, - custom_sequence={ - title="Jogo Custom", - subTitle="Sequência", + newPg="Nova Página(N)", + delPg="Del Página(M)", + prevPg="Página Ant.", + nextPg="Prox. Página", + }, + custom_sequence={ + title="Jogo Custom", + subTitle="Sequência", - sequence="Sequência", + sequence="Sequência", - Z="Z",S="S",J="J",L="L",T="T",O="O",I="I",left="←",right="→",ten="→→",backsp="", - "0next 0hold.", - "1next 0hold", - "1next 1hold!", - "1next 6hold!", - "Na verdade 20G é uma regra de jogo nova.", - "40-lines Sprint WR: 14.915s by Reset_", - "6next 1hold!", - "6next 6hold?!", - "ALL SPIN!", - "Am G F G", - "B2B2B???", - "B2B2B2B não existe..", - "B2B2B2B existe?", - "Back to Back 10 Combo Techrash PC!", - "Bridge clear em breve!", - "Log de mudanças pode ser encontrado em ingles no Discord.", - "UI e músicas legais", - "LEGAL!!", - "Diminuir DAS and ARR: Mais rapido mas difícil de controlar.", - "Não deixe um pequeno glitch arruinar seu dia inteiro!", - "Não olhe diretamente aos bugs!", - "e^(pi*i)=-1", - "e^(pi*i/2)=i", - "e^(pi*i/4)=(1+i)/√2", - "Aproveite o sistema de rotação do Techmino!", - "Encontre o que esta nas configurações!", - "Tem alguma sugestão? Posta elas em nosso Discord!", - "Fones recomendados para uma melhor experiência.", - "Olá mundo!", - "if a==true", - "Aumente sua frame rate para uma experiência melhor.", - "O sistema de [ação] inicial pode salvar sua vida.", - "Será B2B2B2B possível?", - "É possível terminar 40 Linhas sem botões esquerda/direita.", - "Realmente ta carregando! Não so uma cutscene!", - "Junte-se ao nosso discord!", - "l-=-1", - "Let-The-Bass-Kick!", - "LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF", - "Lua No.1", - "Música te distraindo? Você pode a desligar.", - "Músicas feita com beepbox", - "O-Spin Triple!", - "OHHHHHHHHHHHHHH", - "Modo online está planejado - por favor seja paciente.", - "Apenas 2 triminoes", - "Pirataria não é legal!", - "Jogue com uma mão!", - "Powered by LÖVE", - "pps-0.01", - "REGRET!!", - "Número secreto: 626", - "Split clear em breve!", - "Techmino = Technique + Tetromino", - "Techmino tem uma edição Nspire-CX!", - "Techmino é legal!", - "TetroDictionary está disponível em Inglês.", - "Tem 4 modos escondidos no jogo.", - "Tem um total de 18 pentominoes diferentes.", - "Tem um total de 7 diferentes tetrominoes.", - "Tente usar dois botões de rotação. Todos três é melhor.", - "Aviso: Arte de programador", - "Que tal 20 PCs?", - "Que tal 23 PCs em 100 linhas?", - "Que tal 26 TSDs?", - "while(false)", - "Você e um Grand Master!", - "Pode conectar um teclado ao seu celular!", - "Você pode fazer spins com 28 de 29 minoes!", - "Você pode abrir o diretório de save na pagina de Stats.", - "Você pode escolher uma orientação pra cada blococan.", - "ZS JL T O I", - {C.C,"Tente também 15puzzle"}, - {C.C,"Tente também Minecraft"}, - {C.C,"Tente também Minesweeper"}, - {C.C,"Tente também osu!"}, - {C.C,"Tente também Phigros"}, - {C.C,"Tente também Cubo de Rubik"}, - {C.C,"Tente também Terraria"}, - {C.C,"Tente também VVVVVV"}, - {C.F,"Tente também Cultris II"}, - {C.F,"Tente também Jstris"}, - {C.F,"Tente também Nullpomino"}, - {C.F,"Tente também Tetr.io"}, - {C.F,"Tente também Tetr.js"}, - {C.F,"Tente também Tetralegends"}, - {C.H,"暫定段位:9"}, - {C.H,"REGRET!!"}, - {C.lR,"Z ",C.lG,"S ",C.lS,"J ",C.lO,"L ",C.lP,"T ",C.lY,"O ",C.lC,"I"}, - {C.lY,"LEGAL!!"}, - {C.N,"Lua",C.Z," No.1"}, - {C.P,"T-spin!"}, - {C.R,"\"DMCA abusing\""}, - {C.R,"\"Intellectual property law\""}, - {C.R,"DT",C.Z," Cannon=",C.P,"TS",C.R,"D",C.Z,"+",C.P,"TS",C.R,"T",C.Z," Cannon"}, - {C.R,"LrL ",C.G,"RlR ",C.B,"LLr ",C.O,"RRl ",C.P,"RRR ",C.P,"LLL ",C.C,"FFF ",C.Y,"RfR ",C.Y,"RRf ",C.Y,"rFF"}, - {C.Z,"What is ",C.lC,"Xspin"}, - {C.Y,"暫定段位:GM"}, - {C.Y,"暫定段位:M"}, - {C.Y,"暫定段位:MK"}, - {C.Y,"暫定段位:MM"}, - {C.Y,"暫定段位:MO"}, - {C.Y,"暫定段位:MV"}, - {C.Y,"O-spin Triple!"}, - } + ['custom_clear']= {"Custom", "NORMAL"}, + ['custom_puzzle']= {"Custom", "PUZZLE"}, + }, + getTip={refuseCopy=true, + 'Jogo de blocos gratis com um modo Battle Royale!', + 'Ja viu o que "girar" faz com um bloco?', + ":pog:", + "(RUR'U')R'FR2U'R'U'(RUR'F')", + "\\jezevec/\\jezevec/\\jezevec/", + "\\osk/\\osk/\\osk/", + "#FreeTetraOnline", + "↑↑↓↓←→←→BA", + "$include", + "0next 0hold.", + "1next 0hold", + "1next 1hold!", + "1next 6hold!", + "Na verdade 20G é uma regra de jogo nova.", + "40-lines Sprint WR: 14.915s by Reset_", + "6next 1hold!", + "6next 6hold?!", + "ALL SPIN!", + "Am G F G", + "B2B2B???", + "B2B2B2B não existe..", + "B2B2B2B existe?", + "Back to Back 10 Combo Techrash PC!", + "Bridge clear em breve!", + "Log de mudanças pode ser encontrado em ingles no Discord.", + "UI e músicas legais", + "LEGAL!!", + "Diminuir DAS and ARR: Mais rapido mas difícil de controlar.", + "Não deixe um pequeno glitch arruinar seu dia inteiro!", + "Não olhe diretamente aos bugs!", + "e^(pi*i)=-1", + "e^(pi*i/2)=i", + "e^(pi*i/4)=(1+i)/√2", + "Aproveite o sistema de rotação do Techmino!", + "Encontre o que esta nas configurações!", + "Tem alguma sugestão? Posta elas em nosso Discord!", + "Fones recomendados para uma melhor experiência.", + "Olá mundo!", + "if a==true", + "Aumente sua frame rate para uma experiência melhor.", + "O sistema de [ação] inicial pode salvar sua vida.", + "Será B2B2B2B possível?", + "É possível terminar 40 Linhas sem botões esquerda/direita.", + "Realmente ta carregando! Não so uma cutscene!", + "Junte-se ao nosso discord!", + "l-=-1", + "Let-The-Bass-Kick!", + "LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF", + "Lua No.1", + "Música te distraindo? Você pode a desligar.", + "Músicas feita com beepbox", + "O-Spin Triple!", + "OHHHHHHHHHHHHHH", + "Modo online está planejado - por favor seja paciente.", + "Apenas 2 triminoes", + "Pirataria não é legal!", + "Jogue com uma mão!", + "Powered by LÖVE", + "pps-0.01", + "REGRET!!", + "Número secreto: 626", + "Split clear em breve!", + "Techmino = Technique + Tetromino", + "Techmino tem uma edição Nspire-CX!", + "Techmino é legal!", + "TetroDictionary está disponível em Inglês.", + "Tem 4 modos escondidos no jogo.", + "Tem um total de 18 pentominoes diferentes.", + "Tem um total de 7 diferentes tetrominoes.", + "Tente usar dois botões de rotação. Todos três é melhor.", + "Aviso: Arte de programador", + "Que tal 20 PCs?", + "Que tal 23 PCs em 100 linhas?", + "Que tal 26 TSDs?", + "while(false)", + "Você e um Grand Master!", + "Pode conectar um teclado ao seu celular!", + "Você pode fazer spins com 28 de 29 minoes!", + "Você pode abrir o diretório de save na pagina de Stats.", + "Você pode escolher uma orientação pra cada blococan.", + "ZS JL T O I", + {C.C,"Tente também 15puzzle"}, + {C.C,"Tente também Minecraft"}, + {C.C,"Tente também Minesweeper"}, + {C.C,"Tente também osu!"}, + {C.C,"Tente também Phigros"}, + {C.C,"Tente também Cubo de Rubik"}, + {C.C,"Tente também Terraria"}, + {C.C,"Tente também VVVVVV"}, + {C.F,"Tente também Cultris II"}, + {C.F,"Tente também Jstris"}, + {C.F,"Tente também Nullpomino"}, + {C.F,"Tente também Tetr.io"}, + {C.F,"Tente também Tetr.js"}, + {C.F,"Tente também Tetralegends"}, + {C.H,"暫定段位:9"}, + {C.H,"REGRET!!"}, + {C.lR,"Z ",C.lG,"S ",C.lS,"J ",C.lO,"L ",C.lP,"T ",C.lY,"O ",C.lC,"I"}, + {C.lY,"LEGAL!!"}, + {C.N,"Lua",C.Z," No.1"}, + {C.P,"T-spin!"}, + {C.R,"\"DMCA abusing\""}, + {C.R,"\"Intellectual property law\""}, + {C.R,"DT",C.Z," Cannon=",C.P,"TS",C.R,"D",C.Z,"+",C.P,"TS",C.R,"T",C.Z," Cannon"}, + {C.R,"LrL ",C.G,"RlR ",C.B,"LLr ",C.O,"RRl ",C.P,"RRR ",C.P,"LLL ",C.C,"FFF ",C.Y,"RfR ",C.Y,"RRf ",C.Y,"rFF"}, + {C.Z,"What is ",C.lC,"Xspin"}, + {C.Y,"暫定段位:GM"}, + {C.Y,"暫定段位:M"}, + {C.Y,"暫定段位:MK"}, + {C.Y,"暫定段位:MM"}, + {C.Y,"暫定段位:MO"}, + {C.Y,"暫定段位:MV"}, + {C.Y,"O-spin Triple!"}, + } } \ No newline at end of file diff --git a/parts/language/lang_symbol.lua b/parts/language/lang_symbol.lua index 3bdb0ccd..1cd0b862 100644 --- a/parts/language/lang_symbol.lua +++ b/parts/language/lang_symbol.lua @@ -1,527 +1,527 @@ return{ - fallback=4, + fallback=4, - atkModeName={"?","( )","!","←→"}, - royale_remain="$1 ~", - cmb={nil,"!","!!","!!!","!!!!","!!!!!","!!!!!!","!!!!!!!","!!!!!!!!","!!!!!!!!!","!!!!!!!!!!","!!!!!!!!!!!","!!!!!!!!!!!!","!!!!!!!!!!!!!","!!!!!!!!!!!!!!","!!!!!!!!!!!!!!!","!!!!!!!!!!!!!!!!","!!!!!!!!!!!!!!!!!","!!!!!!!!!!!!!!!!!!","!!!!!!!!!!!!!!!!!!!","!!!!!!!!!!!!!!!!!!!!",}, - spin=" ~", - clear={"1","2","3","4","5","6"}, - mini="v",b2b="^ ",b3b="^^ ", - PC="#<>#",HPC="<>", - replaying="[R]", - tasUsing="[TAS]", + atkModeName={"?","( )","!","←→"}, + royale_remain="$1 ~", + cmb={nil,"!","!!","!!!","!!!!","!!!!!","!!!!!!","!!!!!!!","!!!!!!!!","!!!!!!!!!","!!!!!!!!!!","!!!!!!!!!!!","!!!!!!!!!!!!","!!!!!!!!!!!!!","!!!!!!!!!!!!!!","!!!!!!!!!!!!!!!","!!!!!!!!!!!!!!!!","!!!!!!!!!!!!!!!!!","!!!!!!!!!!!!!!!!!!","!!!!!!!!!!!!!!!!!!!","!!!!!!!!!!!!!!!!!!!!",}, + spin=" ~", + clear={"1","2","3","4","5","6"}, + mini="v",b2b="^ ",b3b="^^ ", + PC="#<>#",HPC="<>", + replaying="[R]", + tasUsing="[TAS]", - stage="::$1::", - great="!~", - awesome="!!~", - almost="...!", - continue="~~", - maxspeed="!!!", - speedup="~!~", - missionFailed="-X_X-", + stage="::$1::", + great="!~", + awesome="!!~", + almost="...!", + continue="~~", + maxspeed="!!!", + speedup="~!~", + missionFailed="-X_X-", - win=": )", - lose=": (", + win=": )", + lose=": (", - finish="&", - gamewin=">>", - gameover="x", + finish="&", + gamewin=">>", + gameover="x", - pause="=", - pauseCount="==", - finesse_ap="AP", - finesse_fc="FC", + pause="=", + pauseCount="==", + finesse_ap="AP", + finesse_fc="FC", - page=":", + page=":", - ai_fixed="X!!!", - ai_prebag="X!!!", - ai_mission="X!!!", - needRestart="!!*#R#*!!", + ai_fixed="X!!!", + ai_prebag="X!!!", + ai_mission="X!!!", + needRestart="!!*#R#*!!", - saveDone="~~~", - saveError="x!:", - saveError_duplicate="X←→X ?", - loadError="x!:", - exportSuccess="~Out~", - importSuccess="~In~", - dataCorrupted="XXXXX", - pasteWrongPlace="_?X.", - -- noFile="File not found", + saveDone="~~~", + saveError="x!:", + saveError_duplicate="X←→X ?", + loadError="x!:", + exportSuccess="~Out~", + importSuccess="~In~", + dataCorrupted="XXXXX", + pasteWrongPlace="_?X.", + -- noFile="File not found", - VKTchW="Tch↓", - VKOrgW="Org↓", - VKCurW="Cur↓", + VKTchW="Tch↓", + VKOrgW="Org↓", + VKCurW="Cur↓", - noScore="?_____?", - modeLocked="XXXXX", - unlockHint="\\D/!", - highScore="__&:", - newRecord="^!!!^", + noScore="?_____?", + modeLocked="XXXXX", + unlockHint="\\D/!", + highScore="__&:", + newRecord="^!!!^", - replayBroken=">x.", + replayBroken=">x.", - errorMsg="T&chm1n0 ^@n 1nt0 @ p^0bl&m @nd n&&d$ t0 ^&$t@^t.\nY0u c@n $&nd th& &^^0^ l0g t0 th& d&v$.", + errorMsg="T&chm1n0 ^@n 1nt0 @ p^0bl&m @nd n&&d$ t0 ^&$t@^t.\nY0u c@n $&nd th& &^^0^ l0g t0 th& d&v$.", - pauseStat={ - "~:", - "=/''/[ ]:", - "□:", - "-/↓:", - "→/↓→:", - "←:", - "□↓:", - "~↓:", - "^^/^^^/#<>#/<>:", - "!#!X:", - }, - stat={ - "@:", - "##:", - "~:", - "=/''/[ ]:", - "□/-/→.:", - "←/-↓/↑:", - "↓/↓→.:", - "^%/↓^%:", - "^/^^:", - "#<>#/<>:", - "!#!X/%:", - }, - aboutTexts={ - "□!!~~~,□□□□X", - "□!!==*/*/*/*/*~", - "", - "Powered by LÖVE", - "Any suggestions or bug reports are appreciated!", - "Make sure to only obtain the game from official sources;", - "We can't make sure you're safe if you got it elsewhere.", - "The author is not responsible for any modified binaries.", - "While the game is free, donations are appreciated." - }, - WidgetText={ - main={ - offline="!", - qplay="(!)", - online="!!!", - custom="_?!", - setting="_?_", - stat="=___", - music="~~~ & =><=", - dict="z", - replays="=~~~", - }, - mode={ - mod="?!?!?!(F1)", - start="!!!", - }, - mod={ - title="?!?!?!", - reset="R", - unranked="X!!!", - }, - pause={ - setting="_?_ (S)", - replay="## (P)", - save="0101 (O)", - resume="!! (esc)", - restart="_→_ (R)", - quit="X (Q)", - tas="#&; (T)", - }, - setting_game={ - title="%~~%", + pauseStat={ + "~:", + "=/''/[ ]:", + "□:", + "-/↓:", + "→/↓→:", + "←:", + "□↓:", + "~↓:", + "^^/^^^/#<>#/<>:", + "!#!X:", + }, + stat={ + "@:", + "##:", + "~:", + "=/''/[ ]:", + "□/-/→.:", + "←/-↓/↑:", + "↓/↓→.:", + "^%/↓^%:", + "^/^^:", + "#<>#/<>:", + "!#!X/%:", + }, + aboutTexts={ + "□!!~~~,□□□□X", + "□!!==*/*/*/*/*~", + "", + "Powered by LÖVE", + "Any suggestions or bug reports are appreciated!", + "Make sure to only obtain the game from official sources;", + "We can't make sure you're safe if you got it elsewhere.", + "The author is not responsible for any modified binaries.", + "While the game is free, donations are appreciated." + }, + WidgetText={ + main={ + offline="!", + qplay="(!)", + online="!!!", + custom="_?!", + setting="_?_", + stat="=___", + music="~~~ & =><=", + dict="z", + replays="=~~~", + }, + mode={ + mod="?!?!?!(F1)", + start="!!!", + }, + mod={ + title="?!?!?!", + reset="R", + unranked="X!!!", + }, + pause={ + setting="_?_ (S)", + replay="## (P)", + save="0101 (O)", + resume="!! (esc)", + restart="_→_ (R)", + quit="X (Q)", + tas="#&; (T)", + }, + setting_game={ + title="%~~%", - graphic="←Video", - sound="Sound→", + graphic="←Video", + sound="Sound→", - ctrl="=?=", - key="=?", - touch="_?", - reTime="3-2-1", - RS="''?", - layout="=-=-=", - autoPause="A||", - menuPos="←M→?", - swap="=+=+=", - autoSave="!!!>%", - simpMode=".", - }, - setting_video={ - title="{~~}", - sound="←Sound", - game="Game→", + ctrl="=?=", + key="=?", + touch="_?", + reTime="3-2-1", + RS="''?", + layout="=-=-=", + autoPause="A||", + menuPos="←M→?", + swap="=+=+=", + autoSave="!!!>%", + simpMode=".", + }, + setting_video={ + title="{~~}", + sound="←Sound", + game="Game→", - block="==↓==", - smooth="~~↓~~", - upEdge="[]`", - bagLine="123|123", + block="==↓==", + smooth="~~↓~~", + upEdge="[]`", + bagLine="123|123", - ghostType="__↓?__", - ghost="__↓__", - center="+", - grid="#", - lineNum="--No.", + ghostType="__↓?__", + ghost="__↓__", + center="+", + grid="#", + lineNum="--No.", - lockFX="↓_~", - dropFX="↓~", - moveFX="←→~", - clearFX="↓↓↓~", - splashFX="↑↑↑~", - shakeFX="~|~|~", - atkFX="→→~", - frame="|=|%", + lockFX="↓_~", + dropFX="↓~", + moveFX="←→~", + clearFX="↓↓↓~", + splashFX="↑↑↑~", + shakeFX="~|~|~", + atkFX="→→~", + frame="|=|%", - text="ABC", - score="+123", - bufferWarn="^+", - showSpike="→→+", - nextPos="???←", - highCam="↑__↑", - warn="!↑↑↑!", + text="ABC", + score="+123", + bufferWarn="^+", + showSpike="→→+", + nextPos="???←", + highCam="↑__↑", + warn="!↑↑↑!", - clickFX="_.~", - power="+.", - clean="[]→→O", - fullscreen="|←→|", - bg="__?__", + clickFX="_.~", + power="+.", + clean="[]→→O", + fullscreen="|←→|", + bg="__?__", - blockSatur="==#0x", - fieldSatur="[]#0x", - }, - setting_sound={ - title="(~~)", + blockSatur="==#0x", + fieldSatur="[]#0x", + }, + setting_sound={ + title="(~~)", - game="←Game", - graphic="Video→", + game="←Game", + graphic="Video→", - bgm="#~#", - sfx="#!#", - stereo="←~→", - spawn="#[]#", - warn="!↑↑↑!", - vib="=~=", + bgm="#~#", + sfx="#!#", + stereo="←~→", + spawn="#[]#", + warn="!↑↑↑!", + vib="=~=", - fine="12 X 21", - voc="~~~", - apply="!", - }, - setting_control={ - title="[~~]", - preview="?:", + fine="12 X 21", + voc="~~~", + apply="!", + }, + setting_control={ + title="[~~]", + preview="?:", - das="x---x x x",arr="x x-x-x", - dascut="x x ↓___x x", - dropcut="↓_ !↓↓x", - sddas="↓---↓ ↓ ↓",sdarr="↓ ↓-↓-↓", - ihs="![ ]", - irs="!''", - ims="!←→", - reset="R", - }, - setting_key={ - a1="←", - a2="→", - a3="R→", - a4="←R", - a5="R↑↓", - a6="↓↓", - a7="↓", - a8="□←", - a9="F1", - a10="F2", - a11="|←", - a12="→|", - a13="↓_", - a14="↓1", - a15="↓4", - a16="↓10", - a17="←↓→↓", - a18="→↓↓", - a19="←↓→↓", - a20="→↓←↓", - restart="_→_", - }, - setting_skin={ - skinSet="[x]?", - title="%{~~}", - skinR="R @%&", - faceR="R ↑↓←→.", - }, - setting_touch={ - default="$0", - snap="_ _", - save1=">1", - load1="1>", - save2=">2", - load2="2>", - size="←→", - shape="@?", - }, - setting_touchSwitch={ - b1="←:", b2="→:", b3="R→:", b4="←R:", - b5="R↑↓:", b6="↓↓:", b7="↓:", b8="□←:", - b9="F1:", b10="F2:", b11="←←:", b12="→→:", - b13="↓_:", b14="↓1:", b15="↓4:", b16="↓10:", - b17="←↓→↓:", b18="→↓↓:", b19="←↓→↓:",b20="→↓←↓:", + das="x---x x x",arr="x x-x-x", + dascut="x x ↓___x x", + dropcut="↓_ !↓↓x", + sddas="↓---↓ ↓ ↓",sdarr="↓ ↓-↓-↓", + ihs="![ ]", + irs="!''", + ims="!←→", + reset="R", + }, + setting_key={ + a1="←", + a2="→", + a3="R→", + a4="←R", + a5="R↑↓", + a6="↓↓", + a7="↓", + a8="□←", + a9="F1", + a10="F2", + a11="|←", + a12="→|", + a13="↓_", + a14="↓1", + a15="↓4", + a16="↓10", + a17="←↓→↓", + a18="→↓↓", + a19="←↓→↓", + a20="→↓←↓", + restart="_→_", + }, + setting_skin={ + skinSet="[x]?", + title="%{~~}", + skinR="R @%&", + faceR="R ↑↓←→.", + }, + setting_touch={ + default="$0", + snap="_ _", + save1=">1", + load1="1>", + save2=">2", + load2="2>", + size="←→", + shape="@?", + }, + setting_touchSwitch={ + b1="←:", b2="→:", b3="R→:", b4="←R:", + b5="R↑↓:", b6="↓↓:", b7="↓:", b8="□←:", + b9="F1:", b10="F2:", b11="←←:", b12="→→:", + b13="↓_:", b14="↓1:", b15="↓4:", b16="↓10:", + b17="←↓→↓:", b18="→↓↓:", b19="←↓→↓:",b20="→↓←↓:", - norm="-", - pro="+", - hide="--?", - icon="@?", - sfx="#!#", - vib="=~=", - alpha="+?", + norm="-", + pro="+", + hide="--?", + icon="@?", + sfx="#!#", + vib="=~=", + alpha="+?", - track="~=?", - dodge="←_→", - }, - customGame={ - title="!@#$%^&*", - subTitle="!!", - defSeq="0-[123]", - noMsn="-x-", + track="~=?", + dodge="←_→", + }, + customGame={ + title="!@#$%^&*", + subTitle="!!", + defSeq="0-[123]", + noMsn="-x-", - drop="↓", - lock="↓_", - wait="→=", - fall="↓=", + drop="↓", + lock="↓_", + wait="→=", + fall="↓=", - bg="{~}", - bgm="(~)", + bg="{~}", + bgm="(~)", - copy="Field+Seq+Misn→__", - paste="__→Field+Seq+Misn", - clear="Start-Clear", - puzzle="Start-Puzzle", + copy="Field+Seq+Misn→__", + paste="__→Field+Seq+Misn", + clear="Start-Clear", + puzzle="Start-Puzzle", - reset="Reset (Del)", - advance="More (A)", - mod="?!?!?! (F1)", - field="Edit Field (F)", - sequence="Edit Sequence (S)", - mission="Edit Mission (M)", + reset="Reset (Del)", + advance="More (A)", + mod="?!?!?! (F1)", + field="Edit Field (F)", + sequence="Edit Sequence (S)", + mission="Edit Mission (M)", - nextCount="→", - holdCount="[ ]", - infHold="∞*[ ]", - phyHold="P-[ ]", + nextCount="→", + holdCount="[ ]", + infHold="∞*[ ]", + phyHold="P-[ ]", - fieldH="↑[]↓", - visible="?=", - freshLimit="@", - opponent="^_^", - life="", - pushSpeed="_↑__", - garbageSpeed="#↑↑", + fieldH="↑[]↓", + visible="?=", + freshLimit="@", + opponent="^_^", + life="", + pushSpeed="_↑__", + garbageSpeed="#↑↑", - bufferLimit="^↑", - heightLimit="#↑", - ospin="O→Any", - fineKill="12 XX 21", - b2bKill="_1 XX", - easyFresh="↓_↓_↓_", - deepDrop="\\↓↓/", - bone="[]", - }, - custom_field={ - title="!@#$%^&*", - subTitle="!@#$%^&* [##]", + bufferLimit="^↑", + heightLimit="#↑", + ospin="O→Any", + fineKill="12 XX 21", + b2bKill="_1 XX", + easyFresh="↓_↓_↓_", + deepDrop="\\↓↓/", + bone="[]", + }, + custom_field={ + title="!@#$%^&*", + subTitle="!@#$%^&* [##]", - any="_", - space="×", - smart="~", + any="_", + space="×", + smart="~", - push="↑↑↑↑↑(K)", - del="==X==(L)", + push="↑↑↑↑↑(K)", + del="==X==(L)", - copy="→__", - paste="__→", - clear="XXX", - demo="X ×", + copy="→__", + paste="__→", + clear="XXX", + demo="X ×", - newPg="+[_](N)", - delPg="x[_](M)", - prevPg="←[_]", - nextPg="[_]→", - }, - custom_sequence={ - title="!@#$%^&*", - subTitle="Sequence", + newPg="+[_](N)", + delPg="x[_](M)", + prevPg="←[_]", + nextPg="[_]→", + }, + custom_sequence={ + title="!@#$%^&*", + subTitle="Sequence", - sequence="$=", - reset="R", - rnd="R", - copy="→__", - paste="__→", - }, - custom_mission={ - title="!@#$%^&*", - subTitle="(!)", + sequence="$=", + reset="R", + rnd="R", + copy="→__", + paste="__→", + }, + custom_mission={ + title="!@#$%^&*", + subTitle="(!)", - copy="→__", - paste="__→", - mission="Force mission", - }, - about={ - staff="Orz", - his="_&_", - qq="_@_", - }, - dict={ - title="TetroDictionary", - link="~~e>>", - }, - stat={ - path="%$%", - save="%0123%", - }, - music={ - title="(~~~~)", - arrow="→", - now="~:", + copy="→__", + paste="__→", + mission="Force mission", + }, + about={ + staff="Orz", + his="_&_", + qq="_@_", + }, + dict={ + title="TetroDictionary", + link="~~e>>", + }, + stat={ + path="%$%", + save="%0123%", + }, + music={ + title="(~~~~)", + arrow="→", + now="~:", - bgm="#~#", - sound="=><=", - }, - sound={ - title="SE Room", - sfx="#!#", - voc="~~~", + bgm="#~#", + sound="=><=", + }, + sound={ + title="SE Room", + sfx="#!#", + voc="~~~", - move="←→", - lock="Lock", - drop="Drop", - fall="Fall", - rotate="''", - rotatekick="''_", - hold="[ ]", - prerotate="!''", - prehold="![ ]", - _pc="#<>#", + move="←→", + lock="Lock", + drop="Drop", + fall="Fall", + rotate="''", + rotatekick="''_", + hold="[ ]", + prerotate="!''", + prehold="![ ]", + _pc="#<>#", - clear1="1", - clear2="2", - clear3="3", - clear4="4", - spin0="~0", - spin1="~1", - spin2="~2", - spin3="~3", + clear1="1", + clear2="2", + clear3="3", + clear4="4", + spin0="~0", + spin1="~1", + spin2="~2", + spin3="~3", - _1="1", - _2="2", - _3="3", - _4="4", - z0="Z ~", - z1="Z ~ 1", - z2="Z ~ 2", - z3="Z ~ 3", - s0="S ~", - s1="S ~ 1", - s2="S ~ 2", - s3="S ~ 3", + _1="1", + _2="2", + _3="3", + _4="4", + z0="Z ~", + z1="Z ~ 1", + z2="Z ~ 2", + z3="Z ~ 3", + s0="S ~", + s1="S ~ 1", + s2="S ~ 2", + s3="S ~ 3", - j0="J ~", - j1="J ~ 1", - j2="J ~ 2", - j3="J ~ 3", - l0="L ~", - l1="L ~ 1", - l2="L ~ 2", - l3="L ~ 3", + j0="J ~", + j1="J ~ 1", + j2="J ~ 2", + j3="J ~ 3", + l0="L ~", + l1="L ~ 1", + l2="L ~ 2", + l3="L ~ 3", - t0="T ~", - t1="T ~ 1", - t2="T ~ 2", - t3="T ~ 3", - o0="O ~", - o1="O ~ 1", - o2="O ~ 2", - o3="O ~ 3", + t0="T ~", + t1="T ~ 1", + t2="T ~ 2", + t3="T ~ 3", + o0="O ~", + o1="O ~ 1", + o2="O ~ 2", + o3="O ~ 3", - i0="I ~", - i1="I ~ 1", - i2="I ~ 2", - i3="I ~ 3", + i0="I ~", + i1="I ~ 1", + i2="I ~ 2", + i3="I ~ 3", - mini="v", - b2b="^", - b3b="^^", - pc="#<>#", - music="~~~", - }, - login={ - title="Log in", - register="Sign up", - email="@", - password="*", - -- keepPW="I", - login="Log in", - }, - register={ - title="Sign up", - login="Log in", - username="#", - email="@", - password="*", - password2="*", - register="Sign up", - registering="......", - }, - account={ - title="@_@", - }, - app_15p={ - reset="!@#$%", - color="~~~", - blind="???", - slide="~_~", - pathVis="--==>", - revKB="Reverse", - }, - app_schulteG={ - reset="!@#$%", - rank="←?→", - blind="???", - disappear="=X=", - tapFX="↓ !", - }, - app_pong={ - reset="R", - }, - app_AtoZ={ - level="_ _ _", - keyboard="[##]", - reset="R", - }, - app_2048={ - reset="R", - blind="???", - tapControl="_↓", - skip=">>", - }, - app_ten={ - reset="R", - next="→", - blind="???", - fast="~~→", - }, - app_dtw={ - reset="R", - color="~~~", - mode="?", - bgm="#~#", - arcade="↓↓", - }, - }, - getTip=function() - local L="!@#$%^&*()-=_+[]{}\\|;:\'\",<.>/?" - local s="" - for _=1,math.random(16,26)do - local p=math.random(#L) - s=s..L:sub(p,p) - end - return s - end, + mini="v", + b2b="^", + b3b="^^", + pc="#<>#", + music="~~~", + }, + login={ + title="Log in", + register="Sign up", + email="@", + password="*", + -- keepPW="I", + login="Log in", + }, + register={ + title="Sign up", + login="Log in", + username="#", + email="@", + password="*", + password2="*", + register="Sign up", + registering="......", + }, + account={ + title="@_@", + }, + app_15p={ + reset="!@#$%", + color="~~~", + blind="???", + slide="~_~", + pathVis="--==>", + revKB="Reverse", + }, + app_schulteG={ + reset="!@#$%", + rank="←?→", + blind="???", + disappear="=X=", + tapFX="↓ !", + }, + app_pong={ + reset="R", + }, + app_AtoZ={ + level="_ _ _", + keyboard="[##]", + reset="R", + }, + app_2048={ + reset="R", + blind="???", + tapControl="_↓", + skip=">>", + }, + app_ten={ + reset="R", + next="→", + blind="???", + fast="~~→", + }, + app_dtw={ + reset="R", + color="~~~", + mode="?", + bgm="#~#", + arcade="↓↓", + }, + }, + getTip=function() + local L="!@#$%^&*()-=_+[]{}\\|;:\'\",<.>/?" + local s="" + for _=1,math.random(16,26)do + local p=math.random(#L) + s=s..L:sub(p,p) + end + return s + end, } \ No newline at end of file diff --git a/parts/language/lang_yygq.lua b/parts/language/lang_yygq.lua index 19b56fd0..903c8d0b 100644 --- a/parts/language/lang_yygq.lua +++ b/parts/language/lang_yygq.lua @@ -1,314 +1,314 @@ return{ - loadText={ - loadSFX="音效", - loadVoice="语音", - loadFont="字体", - loadModeIcon="模式图标", - loadMode="模式", - loadOther="其他", - finish="走你", - }, - playedLong="今天玩很久了,给我注意点", - playedTooMuch="特么再玩小心眼睛瞎掉,爬", + loadText={ + loadSFX="音效", + loadVoice="语音", + loadFont="字体", + loadModeIcon="模式图标", + loadMode="模式", + loadOther="其他", + finish="走你", + }, + playedLong="今天玩很久了,给我注意点", + playedTooMuch="特么再玩小心眼睛瞎掉,爬", - royale_remain="剩 $1 人", - cmb={nil,"1连","2连","3连","4连","5连","6连","7连","8连","9连","10连!","11连!","12连!","13连!","14连!","15连!","16连!","17连!","18连!","19连!","MEGACMB"}, - spin="旋", - clear={"消一","消二","消三","消四","卧槽","离谱"}, - mini="矬",b2b="牛逼",b3b="很牛逼", - PC="消干净了",HPC="消挺干净", + royale_remain="剩 $1 人", + cmb={nil,"1连","2连","3连","4连","5连","6连","7连","8连","9连","10连!","11连!","12连!","13连!","14连!","15连!","16连!","17连!","18连!","19连!","MEGACMB"}, + spin="旋", + clear={"消一","消二","消三","消四","卧槽","离谱"}, + mini="矬",b2b="牛逼",b3b="很牛逼", + PC="消干净了",HPC="消挺干净", - great="不错的", - awesome="您很强", - almost="太舒服了", - continue="您继续", - maxspeed="速度封顶", + great="不错的", + awesome="您很强", + almost="太舒服了", + continue="您继续", + maxspeed="速度封顶", - speedLV="速度等级", - piece="块数",line="行数",atk="攻",eff="效", - rpm="收每分",tsd="T2", - grade="段位",techrash="消四", - wave="波数",nextWave="下一波", - combo="连击",maxcmb="最大连", - pc="消干净了",ko="淘汰", + speedLV="速度等级", + piece="块数",line="行数",atk="攻",eff="效", + rpm="收每分",tsd="T2", + grade="段位",techrash="消四", + wave="波数",nextWave="下一波", + combo="连击",maxcmb="最大连", + pc="消干净了",ko="淘汰", - win="好了", - lose="挂了", + win="好了", + lose="挂了", - finish="好厉害呀 真帅气呢", - gamewin="成了", - gameover="没了", + finish="好厉害呀 真帅气呢", + gamewin="成了", + gameover="没了", - pause="歇会", - pauseCount="歇多久了", - finesse_ap="您", - finesse_fc="全连", + pause="歇会", + pauseCount="歇多久了", + finesse_ap="您", + finesse_fc="全连", - noUsername="别闹。", - wrongEmail="别乱输。", - noPassword="注册会不会?", - diffPassword="字不认识?", + noUsername="别闹。", + wrongEmail="别乱输。", + noPassword="注册会不会?", + diffPassword="字不认识?", - ranks={"菜","可","好","强","您"}, + ranks={"菜","可","好","强","您"}, - createRoomSuccessed="创好了", - started="开了", - spectating="看戏中", + createRoomSuccessed="创好了", + started="开了", + spectating="看戏中", - stat={ - "开了几次:", - "玩了几把:", - "玩了多久:", - "按键/旋转/暂存:", - "方块/消行/攻击:", - "接收/抵消/上涨:", - "挖掘/挖掘攻击:", - "效率/挖掘效率:", - "牛逼/很牛逼:", - "消光/消半截:", - "多余操作/极简率:", - }, - WidgetText={ - setting_game={ - title="游戏设置", + stat={ + "开了几次:", + "玩了几把:", + "玩了多久:", + "按键/旋转/暂存:", + "方块/消行/攻击:", + "接收/抵消/上涨:", + "挖掘/挖掘攻击:", + "效率/挖掘效率:", + "牛逼/很牛逼:", + "消光/消半截:", + "多余操作/极简率:", + }, + WidgetText={ + setting_game={ + title="游戏设置", - graphic="←改画面", - sound="改声音→", + graphic="←改画面", + sound="改声音→", - ctrl="改控制", - key="改键位", - touch="改触屏", - }, - setting_video={ - title="改画面", - sound="←改声音", - game="游戏设置→", + ctrl="改控制", + key="改键位", + touch="改触屏", + }, + setting_video={ + title="改画面", + sound="←改声音", + game="游戏设置→", - block="方块可见", - ghost="阴影", - center="中心", - lineNum="行号", + block="方块可见", + ghost="阴影", + center="中心", + lineNum="行号", - text="招式名", - score="跳分", - warn="要死", - highCam="拉镜", - }, - setting_sound={ - title="改声音", + text="招式名", + score="跳分", + warn="要死", + highCam="拉镜", + }, + setting_sound={ + title="改声音", - game="←游戏设置", - graphic="改画面→", + game="←游戏设置", + graphic="改画面→", - bgm="曲", - spawn="出块", - warn="警告", - vib="嗡嗡", - cv="谁", - }, - setting_control={ - title="改控制", - reset="重设", - }, - setting_skin={ - skinSet="皮肤", - title="改外观", - }, - setting_touchSwitch={ - basic="阳间", - pro="阴间", - }, - about={ - staff="游戏谁写的", - his="黑历史", - qq="QQ对线", - }, - register={ - password2="你懂的", - registering="等", - }, - sound={ - title="音效室", - sfx="音效", - voc="语音", + bgm="曲", + spawn="出块", + warn="警告", + vib="嗡嗡", + cv="谁", + }, + setting_control={ + title="改控制", + reset="重设", + }, + setting_skin={ + skinSet="皮肤", + title="改外观", + }, + setting_touchSwitch={ + basic="阳间", + pro="阴间", + }, + about={ + staff="游戏谁写的", + his="黑历史", + qq="QQ对线", + }, + register={ + password2="你懂的", + registering="等", + }, + sound={ + title="音效室", + sfx="音效", + voc="语音", - hold="暂存", - prehold="提前暂存", - _pc="消干净了", + hold="暂存", + prehold="提前暂存", + _pc="消干净了", - spin0="空旋转", - spin1="旋转消一", - spin2="旋转消二", - spin3="旋转消三", + spin0="空旋转", + spin1="旋转消一", + spin2="旋转消二", + spin3="旋转消三", - z0="Z旋", - z1="Z旋消一", - z2="Z旋消二", - z3="Z旋消三", - s0="S旋", - s1="S旋消一", - s2="S旋消二", - s3="S旋消三", + z0="Z旋", + z1="Z旋消一", + z2="Z旋消二", + z3="Z旋消三", + s0="S旋", + s1="S旋消一", + s2="S旋消二", + s3="S旋消三", - j0="J旋", - j1="J旋消一", - j2="J旋消二", - j3="J旋消三", - l0="L旋", - l1="L旋消一", - l2="L旋消二", - l3="L旋消三", + j0="J旋", + j1="J旋消一", + j2="J旋消二", + j3="J旋消三", + l0="L旋", + l1="L旋消一", + l2="L旋消二", + l3="L旋消三", - t0="T旋", - t1="T旋消一", - t2="T旋消二", - t3="T旋消三", - o0="O旋", - o1="O旋消一", - o2="O旋消二", - o3="O旋消三", + t0="T旋", + t1="T旋消一", + t2="T旋消二", + t3="T旋消三", + o0="O旋", + o1="O旋消一", + o2="O旋消二", + o3="O旋消三", - i0="I旋", - i1="I旋消一", - i2="I旋消二", - i3="I旋消三", + i0="I旋", + i1="I旋消一", + i2="I旋消二", + i3="I旋消三", - mini="矬", - b2b="牛逼", - b3b="很牛逼", - pc="消干净了", - }, - app_15p={ - reset="打乱", - color="彩", - blind="盲", - slide="滑动", - pathVis="路径显示", - revKB="键盘反向", - }, - app_schulteG={ - reset="重开", - rank="尺寸", - blind="盲", - disappear="消失", - tapFX="动画", - }, - savedata={ - export="复制走", - import="粘贴到", - unlock="地图", - data="统计", - setting="设置", - vk="虚拟按键", + mini="矬", + b2b="牛逼", + b3b="很牛逼", + pc="消干净了", + }, + app_15p={ + reset="打乱", + color="彩", + blind="盲", + slide="滑动", + pathVis="路径显示", + revKB="键盘反向", + }, + app_schulteG={ + reset="重开", + rank="尺寸", + blind="盲", + disappear="消失", + tapFX="动画", + }, + savedata={ + export="复制走", + import="粘贴到", + unlock="地图", + data="统计", + setting="设置", + vk="虚拟按键", - couldSave="云存档(测试,炸了别怪我)", - notLogin="[不登录存个锤子]", - upload="上传", - download="下载", - }, - }, - modes={ - ['sprint_10l']= {"竞速", "10L", "消10行"}, - ['sprint_20l']= {"竞速", "20L", "消20行"}, - ['sprint_40l']= {"竞速", "40L", "消40行"}, - ['sprint_100l']= {"竞速", "100L", "消100行"}, - ['sprint_400l']= {"竞速", "400L", "消400行"}, - ['sprint_1000l']= {"竞速", "1000L", "消1000行"}, - ['sprintPenta']= {"竞速", "五连块", "离谱"}, - ['sprintMPH']= {"竞速", "纯净", "听说你反应很快?"}, - ['dig_10l']= {"挖掘", "10L", "挖10行"}, - ['dig_40l']= {"挖掘", "40L", "挖40行"}, - ['dig_100l']= {"挖掘", "100L", "挖100行"}, - ['dig_400l']= {"挖掘", "400L", "挖400行"}, - ['dig_1000l']= {"挖掘", "1000L", "挖1000行"}, - ['drought_n']= {"干旱", "100L", "放轻松,简单得很"}, - ['drought_l']= {"干旱+", "100L", "有趣的要来了"}, - ['stack_e']= {"堆叠", "简单", "智力启蒙玩具(确信"}, - ['stack_h']= {"堆叠", "困难", "智力启蒙玩具(确信"}, - ['stack_u']= {"堆叠", "极限", "智力启蒙玩具(确信"}, - ['marathon_n']= {"马拉松", "普通", "休闲模式"}, - ['marathon_h']= {"马拉松", "困难", "休闲模式"}, - ['solo_e']= {"单挑", "简单", "鲨AI"}, - ['solo_n']= {"单挑", "普通", "鲨AI"}, - ['solo_h']= {"单挑", "困难", "鲨AI"}, - ['solo_l']= {"单挑", "疯狂", "鲨AI"}, - ['solo_u']= {"单挑", "极限", "鲨AI"}, - ['techmino49_e']= {"49人混战", "简单", "这我岂不是乱鲨"}, - ['techmino49_h']= {"49人混战", "困难", "这我岂不是乱鲨"}, - ['techmino49_u']= {"49人混战", "极限", "你吃鸡率多少?"}, - ['techmino99_e']= {"99人混战", "简单", "这我岂不是乱鲨"}, - ['techmino99_h']= {"99人混战", "困难", "这我岂不是乱鲨"}, - ['techmino99_u']= {"99人混战", "极限", "你吃鸡率多少?"}, - ['round_e']= {"回合制", "简单", "下棋"}, - ['round_n']= {"回合制", "普通", "下棋"}, - ['round_h']= {"回合制", "困难", "下棋"}, - ['round_l']= {"回合制", "疯狂", "下棋"}, - ['round_u']= {"回合制", "极限", "下棋"}, - ['master_n']= {"大师", "普通", "无脑20G"}, - ['master_h']= {"大师", "困难", "简单20G"}, - ['master_final']= {"大师", "终点", "究极20G:真正的游戏"}, - ['master_ph']= {"大师", "虚幻", "虚幻20G:好玩"}, - ['master_ex']= {"宗师", "EX", "你行你上"}, - ['rhythm_e']= {"节奏", "简单", "很无聊的"}, - ['rhythm_h']= {"节奏", "困难", "好玩么?"}, - ['rhythm_u']= {"节奏", "极限", "真男人不玩低难度"}, - ['blind_e']= {"隐形", "半隐", "谁都能玩"}, - ['blind_n']= {"隐形", "全隐", "稍加练习即可"}, - ['blind_h']= {"隐形", "瞬隐", "和上一个一样"}, - ['blind_l']= {"隐形", "瞬隐+", "这个确实挺难的"}, - ['blind_u']= {"隐形", "啊这", "你准备好了吗"}, - ['blind_wtf']= {"隐形", "不会吧", "还没准备好"}, - ['classic_fast']= {"高速经典", "CTWC", "就这?简单"}, - ['survivor_e']= {"生存", "简单", "这都玩不下去?不会吧"}, - ['survivor_n']= {"生存", "普通", "呵,这都玩不过?"}, - ['survivor_h']= {"生存", "困难", "所以呢?"}, - ['survivor_l']= {"生存", "疯狂", "然后呢?"}, - ['survivor_u']= {"生存", "极限", "舒服了"}, - ['attacker_h']= {"进攻", "困难", "进攻练习"}, - ['attacker_u']= {"进攻", "极限", "进攻练习"}, - ['defender_n']= {"防守", "普通", "防守练习"}, - ['defender_l']= {"防守", "疯狂", "防守练习"}, - ['dig_h']= {"挖掘", "困难", "挖掘练习"}, - ['dig_u']= {"挖掘", "极限", "挖掘练习"}, - ['bigbang']= {"大爆炸", "简单", "All-spin 入门教程\n施工中"}, - ['c4wtrain_n']= {"C4W练习", "普通", "无 限 连 击"}, - ['c4wtrain_l']= {"C4W练习", "疯狂", "无 限 连 击"}, - ['pctrain_n']= {"全清训练", "普通", "随便打打"}, - ['pctrain_l']= {"全清训练", "疯狂", "建议不打"}, - ['pc_n']= {"全清挑战", "普通", "100行内刷PC"}, - ['pc_h']= {"全清挑战", "困难", "100行内刷PC"}, - ['pc_l']= {"全清挑战", "疯狂", "100行内刷PC"}, - ['pc_inf']= {"无尽全清挑战", "", "你这水平还是先别玩了"}, - ['tech_n']= {"科研", "普通", "禁止断B2B"}, - ['tech_n_plus']= {"科研", "普通+", "仅允许spin与PC"}, - ['tech_h']= {"科研", "困难", "禁止断B2B"}, - ['tech_h_plus']= {"科研", "困难+", "仅允许spin与PC"}, - ['tech_l']= {"科研", "疯狂", "禁止断B2B"}, - ['tech_l_plus']= {"科研", "疯狂+", "仅允许spin与PC"}, - ['tech_finesse']= {"科研", "极简", "强制最简操作"}, - ['tech_finesse_f']= {"科研", "极简+", "禁止普通消除,强制最简操作"}, - ['tsd_e']= {"TSD挑战", "简单", "刷T2"}, - ['tsd_h']= {"TSD挑战", "困难", "刷T2"}, - ['tsd_u']= {"TSD挑战", "极限", "刷T2"}, - ['backfire_n']= {"自攻自受", "普通", "100攻击很少的,冲冲冲"}, - ['backfire_h']= {"自攻自受", "困难", "你在害怕什么"}, - ['backfire_l']= {"自攻自受", "疯狂", "别怂啊,打攻击呀"}, - ['backfire_u']= {"自攻自受", "极限", "能把自己玩死,不会吧"}, - ['sprintAtk']= {"竞速", "100攻击", "送100行"}, - ['zen']= {"禅", "200", "不限时200行"}, - ['ultra']= {"限时打分", "挑战", "2分钟刷分"}, - ['infinite']= {"无尽", "", "真的有人会玩这个?"}, - ['infinite_dig']= {"无尽:挖掘", "", "闲得慌就来挖"}, + couldSave="云存档(测试,炸了别怪我)", + notLogin="[不登录存个锤子]", + upload="上传", + download="下载", + }, + }, + modes={ + ['sprint_10l']= {"竞速", "10L", "消10行"}, + ['sprint_20l']= {"竞速", "20L", "消20行"}, + ['sprint_40l']= {"竞速", "40L", "消40行"}, + ['sprint_100l']= {"竞速", "100L", "消100行"}, + ['sprint_400l']= {"竞速", "400L", "消400行"}, + ['sprint_1000l']= {"竞速", "1000L", "消1000行"}, + ['sprintPenta']= {"竞速", "五连块", "离谱"}, + ['sprintMPH']= {"竞速", "纯净", "听说你反应很快?"}, + ['dig_10l']= {"挖掘", "10L", "挖10行"}, + ['dig_40l']= {"挖掘", "40L", "挖40行"}, + ['dig_100l']= {"挖掘", "100L", "挖100行"}, + ['dig_400l']= {"挖掘", "400L", "挖400行"}, + ['dig_1000l']= {"挖掘", "1000L", "挖1000行"}, + ['drought_n']= {"干旱", "100L", "放轻松,简单得很"}, + ['drought_l']= {"干旱+", "100L", "有趣的要来了"}, + ['stack_e']= {"堆叠", "简单", "智力启蒙玩具(确信"}, + ['stack_h']= {"堆叠", "困难", "智力启蒙玩具(确信"}, + ['stack_u']= {"堆叠", "极限", "智力启蒙玩具(确信"}, + ['marathon_n']= {"马拉松", "普通", "休闲模式"}, + ['marathon_h']= {"马拉松", "困难", "休闲模式"}, + ['solo_e']= {"单挑", "简单", "鲨AI"}, + ['solo_n']= {"单挑", "普通", "鲨AI"}, + ['solo_h']= {"单挑", "困难", "鲨AI"}, + ['solo_l']= {"单挑", "疯狂", "鲨AI"}, + ['solo_u']= {"单挑", "极限", "鲨AI"}, + ['techmino49_e']= {"49人混战", "简单", "这我岂不是乱鲨"}, + ['techmino49_h']= {"49人混战", "困难", "这我岂不是乱鲨"}, + ['techmino49_u']= {"49人混战", "极限", "你吃鸡率多少?"}, + ['techmino99_e']= {"99人混战", "简单", "这我岂不是乱鲨"}, + ['techmino99_h']= {"99人混战", "困难", "这我岂不是乱鲨"}, + ['techmino99_u']= {"99人混战", "极限", "你吃鸡率多少?"}, + ['round_e']= {"回合制", "简单", "下棋"}, + ['round_n']= {"回合制", "普通", "下棋"}, + ['round_h']= {"回合制", "困难", "下棋"}, + ['round_l']= {"回合制", "疯狂", "下棋"}, + ['round_u']= {"回合制", "极限", "下棋"}, + ['master_n']= {"大师", "普通", "无脑20G"}, + ['master_h']= {"大师", "困难", "简单20G"}, + ['master_final']= {"大师", "终点", "究极20G:真正的游戏"}, + ['master_ph']= {"大师", "虚幻", "虚幻20G:好玩"}, + ['master_ex']= {"宗师", "EX", "你行你上"}, + ['rhythm_e']= {"节奏", "简单", "很无聊的"}, + ['rhythm_h']= {"节奏", "困难", "好玩么?"}, + ['rhythm_u']= {"节奏", "极限", "真男人不玩低难度"}, + ['blind_e']= {"隐形", "半隐", "谁都能玩"}, + ['blind_n']= {"隐形", "全隐", "稍加练习即可"}, + ['blind_h']= {"隐形", "瞬隐", "和上一个一样"}, + ['blind_l']= {"隐形", "瞬隐+", "这个确实挺难的"}, + ['blind_u']= {"隐形", "啊这", "你准备好了吗"}, + ['blind_wtf']= {"隐形", "不会吧", "还没准备好"}, + ['classic_fast']= {"高速经典", "CTWC", "就这?简单"}, + ['survivor_e']= {"生存", "简单", "这都玩不下去?不会吧"}, + ['survivor_n']= {"生存", "普通", "呵,这都玩不过?"}, + ['survivor_h']= {"生存", "困难", "所以呢?"}, + ['survivor_l']= {"生存", "疯狂", "然后呢?"}, + ['survivor_u']= {"生存", "极限", "舒服了"}, + ['attacker_h']= {"进攻", "困难", "进攻练习"}, + ['attacker_u']= {"进攻", "极限", "进攻练习"}, + ['defender_n']= {"防守", "普通", "防守练习"}, + ['defender_l']= {"防守", "疯狂", "防守练习"}, + ['dig_h']= {"挖掘", "困难", "挖掘练习"}, + ['dig_u']= {"挖掘", "极限", "挖掘练习"}, + ['bigbang']= {"大爆炸", "简单", "All-spin 入门教程\n施工中"}, + ['c4wtrain_n']= {"C4W练习", "普通", "无 限 连 击"}, + ['c4wtrain_l']= {"C4W练习", "疯狂", "无 限 连 击"}, + ['pctrain_n']= {"全清训练", "普通", "随便打打"}, + ['pctrain_l']= {"全清训练", "疯狂", "建议不打"}, + ['pc_n']= {"全清挑战", "普通", "100行内刷PC"}, + ['pc_h']= {"全清挑战", "困难", "100行内刷PC"}, + ['pc_l']= {"全清挑战", "疯狂", "100行内刷PC"}, + ['pc_inf']= {"无尽全清挑战", "", "你这水平还是先别玩了"}, + ['tech_n']= {"科研", "普通", "禁止断B2B"}, + ['tech_n_plus']= {"科研", "普通+", "仅允许spin与PC"}, + ['tech_h']= {"科研", "困难", "禁止断B2B"}, + ['tech_h_plus']= {"科研", "困难+", "仅允许spin与PC"}, + ['tech_l']= {"科研", "疯狂", "禁止断B2B"}, + ['tech_l_plus']= {"科研", "疯狂+", "仅允许spin与PC"}, + ['tech_finesse']= {"科研", "极简", "强制最简操作"}, + ['tech_finesse_f']= {"科研", "极简+", "禁止普通消除,强制最简操作"}, + ['tsd_e']= {"TSD挑战", "简单", "刷T2"}, + ['tsd_h']= {"TSD挑战", "困难", "刷T2"}, + ['tsd_u']= {"TSD挑战", "极限", "刷T2"}, + ['backfire_n']= {"自攻自受", "普通", "100攻击很少的,冲冲冲"}, + ['backfire_h']= {"自攻自受", "困难", "你在害怕什么"}, + ['backfire_l']= {"自攻自受", "疯狂", "别怂啊,打攻击呀"}, + ['backfire_u']= {"自攻自受", "极限", "能把自己玩死,不会吧"}, + ['sprintAtk']= {"竞速", "100攻击", "送100行"}, + ['zen']= {"禅", "200", "不限时200行"}, + ['ultra']= {"限时打分", "挑战", "2分钟刷分"}, + ['infinite']= {"无尽", "", "真的有人会玩这个?"}, + ['infinite_dig']= {"无尽:挖掘", "", "闲得慌就来挖"}, - ['sprintFix']= {"竞速", "无移动"}, - ['sprintLock']= {"竞速", "无旋转"}, - ['sprintSmooth']= {"竞速", "无摩擦"}, - ['marathon_bfmax']= {"马拉松", "极限"}, + ['sprintFix']= {"竞速", "无移动"}, + ['sprintLock']= {"竞速", "无旋转"}, + ['sprintSmooth']= {"竞速", "无摩擦"}, + ['marathon_bfmax']= {"马拉松", "极限"}, - ['master_l']= {"大师", "疯狂"}, - ['master_u']= {"大师", "极限"}, + ['master_l']= {"大师", "疯狂"}, + ['master_u']= {"大师", "极限"}, - ['custom_clear']= {"自定义", "普通"}, - ['custom_puzzle']= {"自定义", "拼图"}, - }, + ['custom_clear']= {"自定义", "普通"}, + ['custom_puzzle']= {"自定义", "拼图"}, + }, } \ No newline at end of file diff --git a/parts/language/lang_zh.lua b/parts/language/lang_zh.lua index ec37fa8f..7c0319c8 100644 --- a/parts/language/lang_zh.lua +++ b/parts/language/lang_zh.lua @@ -1,1206 +1,1206 @@ local C=COLOR return{ - loadText={ - loadSFX="加载音效资源", - loadVoice="加载语音资源", - loadFont="缓存字体资源", - loadModeIcon="加载模式图标", - loadMode="加载模式", - loadOther="加载杂项", - finish="按任意键继续", - }, - sureQuit="再按一次退出", - newDay="新的一天,新的开始~", - playedLong="已经玩很久了!注意休息!", - playedTooMuch="今天玩太久啦!打块好玩但也要适可而止哦~", + loadText={ + loadSFX="加载音效资源", + loadVoice="加载语音资源", + loadFont="缓存字体资源", + loadModeIcon="加载模式图标", + loadMode="加载模式", + loadOther="加载杂项", + finish="按任意键继续", + }, + sureQuit="再按一次退出", + newDay="新的一天,新的开始~", + playedLong="已经玩很久了!注意休息!", + playedTooMuch="今天玩太久啦!打块好玩但也要适可而止哦~", - atkModeName={"随机","徽章","击杀","反击"}, - royale_remain="剩余 $1 名玩家", - powerUp={[0]="000%UP","025%UP","050%UP","075%UP","100%UP"}, - cmb={nil,"1 Combo","2 Combo","3 Combo","4 Combo","5 Combo","6 Combo","7 Combo","8 Combo","9 Combo","10 Combo!","11 Combo!","12 Combo!","13 Combo!","14 Combo!","15 Combo!","16 Combo!","17 Combo!","18 Combo!","19 Combo!","MEGACMB"}, - spin="-spin ", - clear={"single","double","triple","Techrash","Pentcrash","Hexcrash"}, - mini="Mini",b2b="B2B ",b3b="B2B2B ", - PC="Perfect Clear",HPC="Half Clear", - replaying="[回放]", - tasUsing="[TAS]", + atkModeName={"随机","徽章","击杀","反击"}, + royale_remain="剩余 $1 名玩家", + powerUp={[0]="000%UP","025%UP","050%UP","075%UP","100%UP"}, + cmb={nil,"1 Combo","2 Combo","3 Combo","4 Combo","5 Combo","6 Combo","7 Combo","8 Combo","9 Combo","10 Combo!","11 Combo!","12 Combo!","13 Combo!","14 Combo!","15 Combo!","16 Combo!","17 Combo!","18 Combo!","19 Combo!","MEGACMB"}, + spin="-spin ", + clear={"single","double","triple","Techrash","Pentcrash","Hexcrash"}, + mini="Mini",b2b="B2B ",b3b="B2B2B ", + PC="Perfect Clear",HPC="Half Clear", + replaying="[回放]", + tasUsing="[TAS]", - stage="关卡 $1", - great="Great!", - awesome="Awesome.", - almost="Almost!", - continue="Continue.", - maxspeed="最高速度", - speedup="速度加快", - missionFailed="非任务消除", + stage="关卡 $1", + great="Great!", + awesome="Awesome.", + almost="Almost!", + continue="Continue.", + maxspeed="最高速度", + speedup="速度加快", + missionFailed="非任务消除", - speedLV="速度等级", - piece="块数",line="行数",atk="攻击",eff="效率", - rpm="RPM",tsd="T2", - grade="段位",techrash="Techrash", - wave="波数",nextWave="下一波", - combo="Combo",maxcmb="Max Combo", - pc="Perfect Clear",ko="KO", + speedLV="速度等级", + piece="块数",line="行数",atk="攻击",eff="效率", + rpm="RPM",tsd="T2", + grade="段位",techrash="Techrash", + wave="波数",nextWave="下一波", + combo="Combo",maxcmb="Max Combo", + pc="Perfect Clear",ko="KO", - win="胜利", - lose="失败", + win="胜利", + lose="失败", - finish="完成", - gamewin="胜利", - gameover="游戏结束", + finish="完成", + gamewin="胜利", + gameover="游戏结束", - pause="暂停", - pauseCount="暂停统计", - finesse_ap="All Perfect", - finesse_fc="Full Combo", + pause="暂停", + pauseCount="暂停统计", + finesse_ap="All Perfect", + finesse_fc="Full Combo", - page="页面:", + page="页面:", - ai_fixed="不能同时开启AI和固定序列", - ai_prebag="不能同时开启AI和含有非四连块的自定义序列", - ai_mission="不能同时开启AI和自定义任务", - switchSpawnSFX="请开启方块出生音效", - ranks={"D","C","B","A","S"}, - needRestart="重新开始以生效", + ai_fixed="不能同时开启AI和固定序列", + ai_prebag="不能同时开启AI和含有非四连块的自定义序列", + ai_mission="不能同时开启AI和自定义任务", + switchSpawnSFX="请开启方块出生音效", + ranks={"D","C","B","A","S"}, + needRestart="重新开始以生效", - saveDone="保存成功!", - saveError="保存失败:", - saveError_duplicate="文件名重复", - loadError="读取失败:", - exportSuccess="导出成功", - importSuccess="导入成功", - dataCorrupted="数据损坏", - pasteWrongPlace="提醒:可能粘贴错地方了", - noFile="找不到文件", + saveDone="保存成功!", + saveError="保存失败:", + saveError_duplicate="文件名重复", + loadError="读取失败:", + exportSuccess="导出成功", + importSuccess="导入成功", + dataCorrupted="数据损坏", + pasteWrongPlace="提醒:可能粘贴错地方了", + noFile="找不到文件", - VKTchW="触摸点权重", - VKOrgW="原始点权重", - VKCurW="当前点权重", + VKTchW="触摸点权重", + VKOrgW="原始点权重", + VKCurW="当前点权重", - noScore="暂无成绩", - modeLocked="暂未解锁", - unlockHint="前一模式达到成绩D或以上即可解锁", - highScore="最佳成绩", - newRecord="打破纪录", + noScore="暂无成绩", + modeLocked="暂未解锁", + unlockHint="前一模式达到成绩D或以上即可解锁", + highScore="最佳成绩", + newRecord="打破纪录", - replayBroken="无法加载该录像", + replayBroken="无法加载该录像", - getNoticeFail="拉取公告失败", - oldVersion="最新版本$1可以下载了!", - needUpdate="请更新游戏!", - versionNotMatch="版本不一致!", - notFinished="暂未完成,敬请期待!", + getNoticeFail="拉取公告失败", + oldVersion="最新版本$1可以下载了!", + needUpdate="请更新游戏!", + versionNotMatch="版本不一致!", + notFinished="暂未完成,敬请期待!", - jsonError="json错误", + jsonError="json错误", - noUsername="请填写用户名", - wrongEmail="邮箱格式错误", - noPassword="请填写密码", - diffPassword="两次密码不一致", - registerRequestSent="注册请求已发送", - registerSuccessed="注册成功!", - loginSuccessed="登录成功", - accessSuccessed="身份验证成功", + noUsername="请填写用户名", + wrongEmail="邮箱格式错误", + noPassword="请填写密码", + diffPassword="两次密码不一致", + registerRequestSent="注册请求已发送", + registerSuccessed="注册成功!", + loginSuccessed="登录成功", + accessSuccessed="身份验证成功", - wsConnecting="正在连接", - wsFailed="连接失败", - wsClose="连接被断开:", - netTimeout="连接超时", + wsConnecting="正在连接", + wsFailed="连接失败", + wsClose="连接被断开:", + netTimeout="连接超时", - onlinePlayerCount="在线人数", - createRoomSuccessed="创建房间成功!", - started="游戏中", - joinRoom="进入房间", - leaveRoom="离开房间", - ready="各就各位!", - connStream="正在连接", - waitStream="等待其他人连接", - spectating="观战中", - chatRemain="人数:", - chatStart="------消息的开头------", - chatHistory="------以上是历史消息------", + onlinePlayerCount="在线人数", + createRoomSuccessed="创建房间成功!", + started="游戏中", + joinRoom="进入房间", + leaveRoom="离开房间", + ready="各就各位!", + connStream="正在连接", + waitStream="等待其他人连接", + spectating="观战中", + chatRemain="人数:", + chatStart="------消息的开头------", + chatHistory="------以上是历史消息------", - errorMsg="Techmino遭受了雷击,需要重新启动.\n我们已收集了一些错误信息,你可以向作者进行反馈.", + errorMsg="Techmino遭受了雷击,需要重新启动.\n我们已收集了一些错误信息,你可以向作者进行反馈.", - modInstruction="选择你要使用的Mod!\n不同Mod会用不同的方式改变初始游戏规则(可能导致不能正常游玩)\n来开发新玩法或者挑战自我吧!\n提醒:开启一些Mod会让成绩无效,你也可以用键盘开关Mod,按住shift反向", - modInfo={ - next="Next数量:\n强制使用Next的个数", - hold="Hold数量:\n强制使用Hold的个数", - hideNext="隐藏Next:\n隐藏前几个Next", - infHold="无限Hold:\n可以无限制使用Hold", - hideBlock="隐藏方块:\n使当前方块不可见", - hideGhost="隐藏阴影:\n使提示阴影不可见", - hidden="隐形:\n方块将会在锁定之后隐形", - hideBoard="遮挡:\n遮挡部分或者全部场地", - flipBoard="翻转:\n将场地以一定方式翻转显示", - dropDelay="重力:\n强制使用下落速度(单位:帧/格)", - lockDelay="锁延:\n强制使用锁定延迟(单位:帧)", - waitDelay="出块等待:\n出块后的等待时间(单位:帧)", - fallDelay="消行等待:\n消行后的等待时间(单位:帧)", - life="生命数:\n修改初始生命数量", - forceB2B="强制B2B:\nB2B条掉到启动线以下就会结束游戏", - forceFinesse="强制极简:\n非极简操作将强制结束游戏", - tele="瞬移:\n强制启用0移动延迟", - noRotation="无旋转:\n禁用旋转按键", - noMove="无移动:\n禁用移动按键", - customSeq="指定序列:\n强制使用某种序列", - pushSpeed="涨行速度:\n改变垃圾行升起的速度(单位:格/帧)", - boneBlock="骨块:\n使用骨块进行游戏", - }, - pauseStat={ - "时间:", - "按键/旋转/暂存:", - "落块:", - "消行/挖掘:", - "攻击/挖掘攻击:", - "上涨/接收/抵消:", - "消除:", - "Spin:", - "B2B/B3B/PC/HPC:", - "Finesse:", - }, - radar={"DEF","OFF","ATK","SEND","SPD","DIG"}, - radarData={"D'PM","ADPM","APM","SPM","L'PM","DPM"}, - stat={ - "游戏运行次数:", - "游戏局数:", - "游戏时间:", - "按键/旋转/暂存:", - "方块/消行/攻击:", - "接收/抵消/上涨:", - "挖掘/挖掘攻击:", - "效率/挖掘效率:", - "满贯/大满贯:", - "全/半清:", - "多余操作/极简率:", - }, - aboutTexts={ - "这只是一个普通的方块游戏,请勿将此与某带国家名的事物强行联系", - "从C2/IO/JS/WWC/KOS等方块获得过灵感", - "", - "使用LÖVE引擎", - "错误或者建议请附带截图发送到内测群或者作者邮箱~", - "仅通过内测qq群/discord群进行免费下载/更新", - "其他渠道获得游戏皆有被修改/加广告/植入病毒的风险,程序只申请了振动&联网权限!", - "若由于被修改的本游戏产生的各种损失作者不负责(我怎么负责啊跟我有啥关系)", - "请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~记得备注id,方便记录!", - }, - staff={ - "作者:MrZ 邮箱:1046101471@qq.com", - "使用LÖVE引擎", - "", - "程序: MrZ, Particle_G, [FinnTenzor]", - "美术: MrZ, Gnyar, ScF, [旋律星萤, T0722]", - "音乐: MrZ, ERM, [T0722, Aether]", - "音效/语音: Miya, Xiaoya, Naki, MrZ", - "演出: 模电, HBM", - "翻译: User670, MattMayuga, Mizu, Mr.Faq, ScF", - "", - "特别感谢:", - "User670, Flyz, Big_True, Trebor, NOT-A-ROBOT, 思竣, scdhh", - "yuhao7370, Farter, Teatube, 蕴空之灵, T9972, [All test staff]", - }, - used=[[ - 使用工具: - Beepbox - Goldwave - GFIE - FL Mobile - 使用库: - Cold_Clear [MinusKelvin] - json.lua [rxi] - profile.lua [itraykov] - simple-love-lights [dylhunn] - ]], - support="支持作者", - group="官方QQ群:913154753", - WidgetText={ - main={ - offline="单机游戏", - qplay="快速开始", - online="联网游戏", - custom="自定义", - setting="设置", - stat="统计信息", - music="音乐&音效", - dict="小Z词典", - replays="录像回放", - }, - main_simple={ - sprint="40行", - marathon="马拉松", - }, - mode={ - mod="Mods (F1)", - start="开始", - }, - mod={ - title="Mods", - reset="重置(tab)", - unranked="成绩无效", - }, - pause={ - setting="设置(S)", - replay="回放(P)", - save="保存(O)", - resume="继续(esc)", - restart="重新开始(R)", - quit="退出(Q)", - tas="TAS (T)", - }, - net_menu={ - league="Tech League", - ffa="FFA", - rooms="房间列表", - logout="退出登录", - }, - net_league={ - match="匹配对手", - }, - net_rooms={ - password="密码", - refreshing="刷新房间列表中", - noRoom="一个房间都没有哎...", - refresh="刷新", - new="创建房间", - join="加入", - }, - net_newRoom={ - title="房间参数", - roomName="房间名 (留空默认 用户名's room)", - password="密码", - description="房间描述", + modInstruction="选择你要使用的Mod!\n不同Mod会用不同的方式改变初始游戏规则(可能导致不能正常游玩)\n来开发新玩法或者挑战自我吧!\n提醒:开启一些Mod会让成绩无效,你也可以用键盘开关Mod,按住shift反向", + modInfo={ + next="Next数量:\n强制使用Next的个数", + hold="Hold数量:\n强制使用Hold的个数", + hideNext="隐藏Next:\n隐藏前几个Next", + infHold="无限Hold:\n可以无限制使用Hold", + hideBlock="隐藏方块:\n使当前方块不可见", + hideGhost="隐藏阴影:\n使提示阴影不可见", + hidden="隐形:\n方块将会在锁定之后隐形", + hideBoard="遮挡:\n遮挡部分或者全部场地", + flipBoard="翻转:\n将场地以一定方式翻转显示", + dropDelay="重力:\n强制使用下落速度(单位:帧/格)", + lockDelay="锁延:\n强制使用锁定延迟(单位:帧)", + waitDelay="出块等待:\n出块后的等待时间(单位:帧)", + fallDelay="消行等待:\n消行后的等待时间(单位:帧)", + life="生命数:\n修改初始生命数量", + forceB2B="强制B2B:\nB2B条掉到启动线以下就会结束游戏", + forceFinesse="强制极简:\n非极简操作将强制结束游戏", + tele="瞬移:\n强制启用0移动延迟", + noRotation="无旋转:\n禁用旋转按键", + noMove="无移动:\n禁用移动按键", + customSeq="指定序列:\n强制使用某种序列", + pushSpeed="涨行速度:\n改变垃圾行升起的速度(单位:格/帧)", + boneBlock="骨块:\n使用骨块进行游戏", + }, + pauseStat={ + "时间:", + "按键/旋转/暂存:", + "落块:", + "消行/挖掘:", + "攻击/挖掘攻击:", + "上涨/接收/抵消:", + "消除:", + "Spin:", + "B2B/B3B/PC/HPC:", + "Finesse:", + }, + radar={"DEF","OFF","ATK","SEND","SPD","DIG"}, + radarData={"D'PM","ADPM","APM","SPM","L'PM","DPM"}, + stat={ + "游戏运行次数:", + "游戏局数:", + "游戏时间:", + "按键/旋转/暂存:", + "方块/消行/攻击:", + "接收/抵消/上涨:", + "挖掘/挖掘攻击:", + "效率/挖掘效率:", + "满贯/大满贯:", + "全/半清:", + "多余操作/极简率:", + }, + aboutTexts={ + "这只是一个普通的方块游戏,请勿将此与某带国家名的事物强行联系", + "从C2/IO/JS/WWC/KOS等方块获得过灵感", + "", + "使用LÖVE引擎", + "错误或者建议请附带截图发送到内测群或者作者邮箱~", + "仅通过内测qq群/discord群进行免费下载/更新", + "其他渠道获得游戏皆有被修改/加广告/植入病毒的风险,程序只申请了振动&联网权限!", + "若由于被修改的本游戏产生的各种损失作者不负责(我怎么负责啊跟我有啥关系)", + "请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~记得备注id,方便记录!", + }, + staff={ + "作者:MrZ 邮箱:1046101471@qq.com", + "使用LÖVE引擎", + "", + "程序: MrZ, Particle_G, [FinnTenzor]", + "美术: MrZ, Gnyar, ScF, [旋律星萤, T0722]", + "音乐: MrZ, ERM, [T0722, Aether]", + "音效/语音: Miya, Xiaoya, Naki, MrZ", + "演出: 模电, HBM", + "翻译: User670, MattMayuga, Mizu, Mr.Faq, ScF", + "", + "特别感谢:", + "User670, Flyz, Big_True, Trebor, NOT-A-ROBOT, 思竣, scdhh", + "yuhao7370, Farter, Teatube, 蕴空之灵, T9972, [All test staff]", + }, + used=[[ + 使用工具: + Beepbox + Goldwave + GFIE + FL Mobile + 使用库: + Cold_Clear [MinusKelvin] + json.lua [rxi] + profile.lua [itraykov] + simple-love-lights [dylhunn] + ]], + support="支持作者", + group="官方QQ群:913154753", + WidgetText={ + main={ + offline="单机游戏", + qplay="快速开始", + online="联网游戏", + custom="自定义", + setting="设置", + stat="统计信息", + music="音乐&音效", + dict="小Z词典", + replays="录像回放", + }, + main_simple={ + sprint="40行", + marathon="马拉松", + }, + mode={ + mod="Mods (F1)", + start="开始", + }, + mod={ + title="Mods", + reset="重置(tab)", + unranked="成绩无效", + }, + pause={ + setting="设置(S)", + replay="回放(P)", + save="保存(O)", + resume="继续(esc)", + restart="重新开始(R)", + quit="退出(Q)", + tas="TAS (T)", + }, + net_menu={ + league="Tech League", + ffa="FFA", + rooms="房间列表", + logout="退出登录", + }, + net_league={ + match="匹配对手", + }, + net_rooms={ + password="密码", + refreshing="刷新房间列表中", + noRoom="一个房间都没有哎...", + refresh="刷新", + new="创建房间", + join="加入", + }, + net_newRoom={ + title="房间参数", + roomName="房间名 (留空默认 用户名's room)", + password="密码", + description="房间描述", - life="命数", - pushSpeed="上涨速度", - garbageSpeed="垃圾行速度", - visible="能见度", - freshLimit="锁延刷新限制", + life="命数", + pushSpeed="上涨速度", + garbageSpeed="垃圾行速度", + visible="能见度", + freshLimit="锁延刷新限制", - fieldH="场地高度", - bufferLimit="缓冲上限", - heightLimit="高度上限", + fieldH="场地高度", + bufferLimit="缓冲上限", + heightLimit="高度上限", - drop="下落延迟", - lock="锁定延迟", - wait="出块等待", - fall="消行延迟", + drop="下落延迟", + lock="锁定延迟", + wait="出块等待", + fall="消行延迟", - capacity="房间容量", - create="创建", + capacity="房间容量", + create="创建", - ospin="O-spin", - fineKill="强制极简", - b2bKill="强制B2B", - easyFresh="普通刷新锁延", - deepDrop="深降", - bone="骨块", + ospin="O-spin", + fineKill="强制极简", + b2bKill="强制B2B", + easyFresh="普通刷新锁延", + deepDrop="深降", + bone="骨块", - nextCount="Next", - holdCount="Hold", - infHold="无限Hold", - phyHold="物理Hold", - }, - net_game={ - ready="准备", - spectate="观战", - cancel="取消", - }, - setting_game={ - title="游戏设置", - graphic="←画面设置", - sound="声音设置→", + nextCount="Next", + holdCount="Hold", + infHold="无限Hold", + phyHold="物理Hold", + }, + net_game={ + ready="准备", + spectate="观战", + cancel="取消", + }, + setting_game={ + title="游戏设置", + graphic="←画面设置", + sound="声音设置→", - ctrl="控制设置", - key="键位设置", - touch="触屏设置", - reTime="开局等待时间", - RS="旋转系统", - layout="外观", - autoPause="失去焦点自动暂停", - menuPos="菜单按钮位置", - swap="组合键切换攻击模式", - autoSave="破纪录自动保存", - simpMode="简洁模式", - }, - setting_video={ - title="画面设置", - sound="←声音设置", - game="游戏设置→", + ctrl="控制设置", + key="键位设置", + touch="触屏设置", + reTime="开局等待时间", + RS="旋转系统", + layout="外观", + autoPause="失去焦点自动暂停", + menuPos="菜单按钮位置", + swap="组合键切换攻击模式", + autoSave="破纪录自动保存", + simpMode="简洁模式", + }, + setting_video={ + title="画面设置", + sound="←声音设置", + game="游戏设置→", - block="方块可见", - smooth="平滑下落", - upEdge="3D方块", - bagLine="包分界线", + block="方块可见", + smooth="平滑下落", + upEdge="3D方块", + bagLine="包分界线", - ghostType="阴影样式", - ghost="阴影不透明度", - center="旋转中心不透明度", - grid="网格不透明度", - lineNum="行号透明度", + ghostType="阴影样式", + ghost="阴影不透明度", + center="旋转中心不透明度", + grid="网格不透明度", + lineNum="行号透明度", - lockFX="锁定特效", - dropFX="下落特效", - moveFX="移动特效", - clearFX="消除特效", - splashFX="溅射特效", - shakeFX="晃动特效", - atkFX="攻击特效", - frame="绘制帧率(%)", + lockFX="锁定特效", + dropFX="下落特效", + moveFX="移动特效", + clearFX="消除特效", + splashFX="溅射特效", + shakeFX="晃动特效", + atkFX="攻击特效", + frame="绘制帧率(%)", - text="消行文本", - score="分数动画", - bufferWarn="缓冲预警", - showSpike="爆发累计", - nextPos="生成预览", - highCam="超屏视野", - warn="死亡预警", + text="消行文本", + score="分数动画", + bufferWarn="缓冲预警", + showSpike="爆发累计", + nextPos="生成预览", + highCam="超屏视野", + warn="死亡预警", - clickFX="点按特效", - power="电量显示", - clean="绘制优化", - fullscreen="全屏", - bg="背景", + clickFX="点按特效", + power="电量显示", + clean="绘制优化", + fullscreen="全屏", + bg="背景", - blockSatur="方块饱和度", - fieldSatur="场地饱和度", - }, - setting_sound={ - title="声音设置", - game="←游戏设置", - graphic="画面设置→", + blockSatur="方块饱和度", + fieldSatur="场地饱和度", + }, + setting_sound={ + title="声音设置", + game="←游戏设置", + graphic="画面设置→", - bgm="音乐", - sfx="音效", - stereo="立体声", - spawn="方块生成", - warn="危险警告", - vib="振动", - voc="语音", + bgm="音乐", + sfx="音效", + stereo="立体声", + spawn="方块生成", + warn="危险警告", + vib="振动", + voc="语音", - fine="极简操作提示音", - cv="语音包", - apply="应用", - }, - setting_control={ - title="控制设置", - preview="预览", + fine="极简操作提示音", + cv="语音包", + apply="应用", + }, + setting_control={ + title="控制设置", + preview="预览", - das="DAS",arr="ARR", - dascut="DAS打断", - dropcut="误硬降打断", - sddas="软降DAS",sdarr="软降ARR", - ihs="提前Hold", - irs="提前旋转", - ims="提前移动", - reset="重置", - }, - setting_key={ - a1="左移", - a2="右移", - a3="顺时针旋转", - a4="逆时针旋转", - a5="180°旋转", - a6="硬降", - a7="软降", - a8="暂存", - a9="功能键1", - a10="功能键2", - a11="左瞬移", - a12="右瞬移", - a13="软降到底", - a14="软降一格", - a15="软降四格", - a16="软降十格", - a17="落在最左", - a18="落在最右", - a19="列在最左", - a20="列在最右", - restart="重新开始", - }, - setting_skin={ - skinSet="方块皮肤", - title="外观设置", - spin1="R",spin2="R",spin3="R",spin4="R",spin5="R",spin6="R",spin7="R", - skinR="重置配色", - faceR="重置方向", - }, - setting_touch={ - default="默认组合", - snap="吸附", - save1="保存1", - load1="读取1", - save2="保存2", - load2="读取2", - size="大小", - shape="形状", - }, - setting_touchSwitch={ - b1= "左移:", b2="右移:", b3="顺时针旋转:", b4="逆时针旋转:", - b5= "180°旋转:",b6="硬降:", b7="软降:", b8="暂存:", - b9= "功能键1:", b10="功能键2:",b11="左瞬移:", b12="右瞬移:", - b13="软降到底:",b14="软降一格:",b15="软降四格:", b16="软降十格:", - b17="落在最左:",b18="落在最右:",b19="列在最左:", b20="列在最右:", + das="DAS",arr="ARR", + dascut="DAS打断", + dropcut="误硬降打断", + sddas="软降DAS",sdarr="软降ARR", + ihs="提前Hold", + irs="提前旋转", + ims="提前移动", + reset="重置", + }, + setting_key={ + a1="左移", + a2="右移", + a3="顺时针旋转", + a4="逆时针旋转", + a5="180°旋转", + a6="硬降", + a7="软降", + a8="暂存", + a9="功能键1", + a10="功能键2", + a11="左瞬移", + a12="右瞬移", + a13="软降到底", + a14="软降一格", + a15="软降四格", + a16="软降十格", + a17="落在最左", + a18="落在最右", + a19="列在最左", + a20="列在最右", + restart="重新开始", + }, + setting_skin={ + skinSet="方块皮肤", + title="外观设置", + spin1="R",spin2="R",spin3="R",spin4="R",spin5="R",spin6="R",spin7="R", + skinR="重置配色", + faceR="重置方向", + }, + setting_touch={ + default="默认组合", + snap="吸附", + save1="保存1", + load1="读取1", + save2="保存2", + load2="读取2", + size="大小", + shape="形状", + }, + setting_touchSwitch={ + b1="左移:", b2="右移:", b3="顺时针旋转:", b4="逆时针旋转:", + b5="180°旋转:",b6="硬降:", b7="软降:", b8="暂存:", + b9="功能键1:", b10="功能键2:",b11="左瞬移:", b12="右瞬移:", + b13="软降到底:",b14="软降一格:",b15="软降四格:", b16="软降十格:", + b17="落在最左:",b18="落在最右:",b19="列在最左:", b20="列在最右:", - norm="标准", - pro="专业", - hide="显示虚拟按键", - icon="图标", - sfx="按键音效", - vib="按键振动", - alpha="不透明度", + norm="标准", + pro="专业", + hide="显示虚拟按键", + icon="图标", + sfx="按键音效", + vib="按键振动", + alpha="不透明度", - track="按键自动跟踪", - dodge="自动避让", - }, - customGame={ - title="自定义游戏", - subTitle="基本", - defSeq="默认序列", - noMsn="无任务", + track="按键自动跟踪", + dodge="自动避让", + }, + customGame={ + title="自定义游戏", + subTitle="基本", + defSeq="默认序列", + noMsn="无任务", - drop="下落延迟", - lock="锁定延迟", - wait="出块等待", - fall="消行延迟", + drop="下落延迟", + lock="锁定延迟", + wait="出块等待", + fall="消行延迟", - bg="背景", - bgm="音乐", + bg="背景", + bgm="音乐", - copy="复制场地+序列+任务", - paste="粘贴场地+序列+任务", - clear="开始-消除", - puzzle="开始-拼图", + copy="复制场地+序列+任务", + paste="粘贴场地+序列+任务", + clear="开始-消除", + puzzle="开始-拼图", - reset="重置所有(Del)", - advance="更多设置(A)", - mod="Mods (F1)", - field="场地编辑(F)", - sequence="序列编辑(S)", - mission="任务编辑(M)", + reset="重置所有(Del)", + advance="更多设置(A)", + mod="Mods (F1)", + field="场地编辑(F)", + sequence="序列编辑(S)", + mission="任务编辑(M)", - nextCount="Next", - holdCount="Hold", - infHold="无限Hold", - phyHold="物理Hold", + nextCount="Next", + holdCount="Hold", + infHold="无限Hold", + phyHold="物理Hold", - fieldH="场地高度", - visible="能见度", - freshLimit="锁延刷新限制", - opponent="对手", - life="命数", - pushSpeed="上涨速度", - garbageSpeed="垃圾行速度", + fieldH="场地高度", + visible="能见度", + freshLimit="锁延刷新限制", + opponent="对手", + life="命数", + pushSpeed="上涨速度", + garbageSpeed="垃圾行速度", - bufferLimit="缓冲上限", - heightLimit="高度上限", - ospin="O-spin", - fineKill="强制极简", - b2bKill="强制B2B", - easyFresh="普通刷新锁延", - deepDrop="深降", - bone="骨块", - }, - custom_field={ - title="自定义游戏", - subTitle="场地", + bufferLimit="缓冲上限", + heightLimit="高度上限", + ospin="O-spin", + fineKill="强制极简", + b2bKill="强制B2B", + easyFresh="普通刷新锁延", + deepDrop="深降", + bone="骨块", + }, + custom_field={ + title="自定义游戏", + subTitle="场地", - any="不定", - space="×", - smart="智能", + any="不定", + space="×", + smart="智能", - push="增加一行(K)", - del="消除行(L)", + push="增加一行(K)", + del="消除行(L)", - copy="复制", - paste="粘贴", - clear="清除", - demo="不显示×", + copy="复制", + paste="粘贴", + clear="清除", + demo="不显示×", - newPg="新页面(N)", - delPg="删除页面(M)", - prevPg="上一页面", - nextPg="下一页面", - }, - custom_sequence={ - title="自定义游戏", - subTitle="序列", + newPg="新页面(N)", + delPg="删除页面(M)", + prevPg="上一页面", + nextPg="下一页面", + }, + custom_sequence={ + title="自定义游戏", + subTitle="序列", - sequence="序列", + sequence="序列", - Z="Z",S="S",J="J",L="L",T="T",O="O",I="I",left="←",right="→",ten="→→",backsp="", - "0next 0hold.", - "11renPC!", - "1next 0hold", - "1next 1hold!", - "1next 6hold!", - "2.182818284590452353", - "2021年是Techmino联机元年", - "20G本质是一个全新的游戏规则!", - "29种块里28个都能spin你敢信?", - "3.1415926535897932384 ? ? ?", - "3next 1hold?", - "40行世界纪录:14.915s by Reset_", - "6236326236327175", - "626in1", - "6next 1hold!", - "6next 6hold?!", - "7宽三SZ架空捐了解一下", - "把手机调到特殊的日期也许会发生什么", - "报时机器人:新的一天开始了", - "背景影响游玩?可以去设置关闭", - "本游戏不叫Teachmino", - "本游戏的一部分内容是国际合作的!", - "本游戏的B2B是气槽机制,和传统的开关机制不一样哦", - "本游戏还在测试中,出各种问题都是有可能的哦", - "本游戏内置了几个休(ying)闲(he)小游戏哦~", - "本游戏在设计的时候受到了大量其他块游甚至一些音游的启发", - "必须要软降才能到达的位置都会判定为极简操作", - "别看攻击效率不高,其实消四还是很强的", - "别问游戏名怎么取的,问就是随便想的", - "不同人打40行最合适的方式不一样,s1w/63/散消/s2w...", - "不同游戏(甚至不同模式)中不同战术的能力都不一样,并没有绝对的强弱之分", - "不希望激烈的零和竞争充斥整个游戏", - "不要悲伤,不要心急", - "不要大力拍打或滑动哦", - "不要卖弱不要卖弱不要卖弱", - "不知道有多少人玩游戏的时候会关心游戏是谁做的", - "部分手机系统开启震动会导致严重卡顿", - "彩色消除即将到来!", - "草(日本语)", - "成就系统在做了!", - "吃键?真的吗?建议回放看看到底按没按到,按了多久", - "除了雨宫太阳还有很多高手玩家,甚至强出很多很多", - "触发游戏报错后日志文件会越来越大(不过顶多几百K)", - "触摸板打osu也很好!", - "凑数tip什么时候能站起来!", - "打对战前请确认自己有一定的水平,不然会毫无游戏体验的", - "打好块跟学习一样没有捷径,多练。", - "大概还是有人会看tip的", - "大量使用开局定式的数据是不准的", - "大陆的方块社区起步晚,所以世界级高手很少…下一个会是你吗?", - "大满贯10连击消四全清!", - "戴上耳机以获得最佳体验", - "单手也能玩!", - "低帧率会降低游戏体验", - "点击添加标题", - "点击添加副标题", - "电脑游玩自带按键显示~", - "对编程有真·兴趣推荐Lua,安装无脑 语法简单 执行速度快 远离枯燥学校编程(雾", - "对战游戏不是单机游戏,所以timing在对战里也非常重要!", - "多年小游戏玩家表示痛恨假加载,启动动画主要是在加载资源", - "多hold现代块又回来了!", - "俄罗斯方块完全可以作为电竞游戏", - "发现有个\"隐形\"皮肤了吗", - "方块不能吃", - "方块不是你生活的全部,适当走出去看看", - "方块教会我们,合群了就会消失,...", - "方块默认出现的方向都是重心在下哦", - "方块能吃吗", - "分数只是好看的,建议只看关卡要求", - "服务器随时爆炸", - "感觉明明按键了但是没反应?你真的按到了吗?", - "感觉自己速度到上限了?试着把das调低一点", - "感谢群友帮忙想tip", - "感谢Orzmic为这个tip显示框提出意见", - "感谢Phigros提供部分tip模板(", - "刚接触方块的话多玩玩就行,40行两分钟以外没啥好针对性练习的", - "刚开始练全隐形可以尽量堆平,留一列消四", - "隔壁不在乎玩家意见但是我们在乎,没人提过的合理建议一定会回应", - "隔断消除即将到来!", - "各种画面细节选项都可以在设置里找到哦", - "更换方块皮肤也许能帮助提升成绩?不懂,玄学", - "更小的DAS和ARR拥有更高的操作上限(能控制得了的话)", - "更新内容在游戏里和群公告都有写!", - "攻击生效速度(从快到慢):消二/三,消四,spin,高连击", - "还能写些什么tip呢", - "好像还没人能用脚打块打到一定水平", - "好像可以把手机倒过来打场地旋转180...那还是不建议违反规则", - "很有精神!", - "混合消除即将到来!", - "基础堆叠和挖掘能力非常重要,忽视这两项的人都后悔了(确信)", - "即使被顶到天上了也不要放弃,每一行垃圾都有可能成为你的武器", - "极简率决定了你大概的速度上限和相等手速下的放块速度", - "假如生活欺骗了你,不要悲伤,不要心急,还有块陪着你", - "架空消除即将到来!", - "建议使用双手游玩", - "健康小贴士:不要熬夜,真的会猝死", - "健康小贴士:玩游戏多眨眼,不然会干眼病", - "键位是可以自定义的", - "键位有可能决定了上限,可能的话还是尽量考虑一下自己的键位是否利于超高速操作", - "尽早学双旋吧,单旋没前途的", - "经典块的水也很深,不要小看经典块玩家", - "经典块跟现代块是两个游戏,一个厉害不代表另一个也厉害,得从头练起", - "经典块和渣方块不是一回事", - "觉得移动速度太慢或太快,手感不好?快去设置调整DAS/ARR", - "开启省流模式后将不会加载用户头像(应该能省不少流吧)", - "快去打一把100%极简看看会怎样", - "来学编程,好玩的", - "连续pc有大量知识要背,不过背出来后随手10连pc不是问题", - "六连块总共有…?那不重要,不会做的", - "卖弱和谦虚不是一回事,发言前三思呀", - "卖弱禁言警告", - "没学过编曲,音乐都是自己瞎写的,如果真的觉得好听就太好了!", - "没有量化就没有对比,...", - "每个块的出现方向可以自定义", - "每个块的颜色可以自定义", - "每个虚拟按键都可以隐藏/显示,尺寸也可调", - "免费吃鸡方块", - "喵!", - "魔方也是方块(确信", - "能导致吃键的问题有很多,建议说清楚具体发生了什么并且录视频说明", - "能玩到Techmino不是你有优越感的理由", - "你的双手是为了你的一生服务的,而不是Techmino", - "你今天的人品值是:"..math.random(100), - "你可以从统计页面打开游戏存档目录", - "你们考虑过Z酱的感受吗?没有!你们只考虑你自己。", - "你说彩蛋?嗯…算是有,可以找找", - "你有一个好", - "你知道吗:看主页机器人玩可能比较费电", - "你知道吗:全程不使用任何旋转键完成40行模式是有可能的", - "你知道吗:全程不使用左右移动键完成40行模式是有可能的", - "你知道吗:停留在模式地图界面很费电", - "你知道吗:在其他(方块)游戏相关场合提及本游戏是很不礼貌的", - "你准备好了吗?", - "其实很多时候\"吃键\"是玩家对游戏机制不了解或者自己的操作问题导致的", - "其实S和Z有四个方向(状态),虽然看起来只有两个", - "请谨慎向没有方块经验的玩家推荐,会对本游戏的生存环境造成影响,感谢配合。", - "请勿大力敲打设备!敲坏了就没有Techmino玩了", - "请勿使用三只手游玩", - "去玩别的方块的时候记得没有Ospin!", - "全球应该没人能全S评价(大爆炸不算)", - "群友翻译的中文方块百科全书! tetris.huijiwiki.com", - "让他三尺又何妨", - "如何O-spin: 一秒转626圈(误", - "三连块只有2种", - "三岁通关困难马拉松", - "上面这个不是录像,是机器人实时在玩", - "少女祈祷中", - "少玩点游戏,多注意眨眼和休息", - "使用固定堆叠方法达成20TSD难度很低", - "试试用跳舞毯打块", - "适度游戏益脑,沉迷游戏伤身,合理安排时间,享受健康生活", - "手机玩也可以外接键盘哦", - "术语不认识?去右边那个词典里查查吧", - "水平是随着时间一点点提升的,不是几天几星期就能玩好的哦", - "四连块总共7种", - "虽然极简连击和极简率计算看着很怪,但以后你会发现还挺科学!", - "所有大道理tip都是亲眼目睹后加的,如果觉得多余说明就不是给你看的呀!消消气", - "提前旋转等功能可以用来救命", - "天哪,我竟然是一条凑数tip", - "退一步海阔天空", - "挖掘能力在对战里非常非常非常重要!!!!", - "玩到一半弹出消息框?快去设置禁止弹窗", - "玩得开心的话游戏作者也会很开心哦", - "为了保护玩家们的健康,本游戏有一个临时的简易防沉迷系统!(不过估计你也触发不了/笑)", - "为什么关卡那么少!因为前一模式成绩连D都没达到,再加把劲吧~", - "为数不多走向世界的国产方块游戏", - "我曾经在极度愤怒的时候15秒消了40行", - "我们联合!", - "我们是不是第一个在方块游戏做tip的?", - "我是一条凑数tip", - "我也是一条凑数tip", - "我一个滑铲就挖了个11renPC", - "我永远喜…", - "无聊翻翻设置是好习惯", - "五连块总共18种", - "物理hold了解一下", - "希望极简率没事", - "希望你们都能喜欢Z…哦不是,喜欢Techmino", - "喜欢本游戏的话可以到应用商…好像没上架呢还", - "享受Tech的特色旋转系统!", - "向其他人询问练习方法最好提供自己的详细水平,最好录些视频,不然很难给出合适的建议", - "小心腱鞘炎", - "写不出那种很酷的音乐(哭", - "旋转不是变形!请尽量灵活利用顺逆时针两个旋转键", - "学会使用两个旋转键,三个更好", - "学习能力很重要,无论是玩游戏还是学知识", - "要盯着bug不放", - "音乐风格是什么,能吃吗", - "音乐使用beepbox制作", - "音游方块是一家(暴论", - "隐形真的不难,只要花几个小时耐心练下去", - "游戏确实可以是艺术,而不一定是纯\"玩具\"", - "游戏使用LÖVE引擎制作", - "游戏使用un...LÖVE引擎制作", - "游戏也是一种艺术形式", - "游戏中左下角三个信息分别是分数/时间/极简连击数", - "有建议的话可以把信息反馈给作者~", - "有四个隐藏模式不能从地图进入,到处找找看吧", - "有疑问? 先看设置有没有你想要的", - "右下角那个问号按钮是游戏说明书", - "长期睡眠不足会引起不可逆的脑损伤(变傻)", - "这不是休闲游戏…别怪关卡要求太高,多练吧", - "这个菜单可以用纯键盘控制", - "这里的极简判定不松不严,放心软降,小心hold!", - "震惊,我只是一条凑数tip吗", - "众所周知俄罗斯方块是经典编程练手游戏(?", - "注意到方块\"旋转\"的时候到底发生了些什么吗?", - "自定义场地可以画图实现逐页演示", - "自己不确定的问题尽量不要教别人哦", - "总共有将近400条tip哦", - "作业都没做完别玩手机(", - "作者40行sub26了", - "作者电脑上装了11个方块", - "作者浏览器收藏夹里有6个方块", - "做,做碌鸠啊做,打块先啦!", - "ALLSPIN!", - "Am G F G", - "B2B2B???", - "B2B2B2B并不存在..", - "B2B2B2B存在吗?", - "BT炮=beta炮=TCM-β炮", - "c4w可不是在所有游戏里都很强哦", - "c4w人竟是我自己", - "c4w人竟在我身边", - "cos(α+β)=CαCβ-SβSα", - "cos²α-cos²β=-S(α+β)S(α-β)", - "cos²α-sin²β=C(α+β)C(α-β)", - "cos2α=C²α-S²α", - "e^(pi*i)=-1", - "e^(pi*i/2)=i", - "e^(pi*i/4)=(1+i)/√2", - "Farter:\"成天被夸赞'好玩'的\"", - "Farter:\"可以形成方块圈子小中心话题,同作者一起衍生一些概念与梗的\"", - "Farter:\"论方块的软工意义(就算这么小个范围内,各种取舍蒙混翻车现象都总会以很易懂的方式出现(\"", - "Farter:\"民间微创新\"", - "Farter:\"民间音le与图案\"", - "Farter:\"民间游戏设计\"", - "Farter:\"是方块爱好者研究平台\"", - "Farter:\"是方块萌新入坑接收器\"", - "Farter:\"是居家旅行装逼必备\"", - "Farter:\"是民间UI动效艺术作品\"", - "Farter:\"是一滩散乱的代码组成的蜜汁结构\"", - "Farter:\"它是现在的techmino已发布版本\"", - "fin neo iso 是满足tspin条件的特殊t2的名字", - "git commit", - "hello world", - "if a==true", - "l-=-1", - "Let-The-Bass-Kick!", - "pps-0.01", - "rm -rf /*", - "shutdown -h now", - "sin(α+β)=SαCβ+SβCα", - "sin²α-cos²β=-C(α+β)C(α-β)", - "sin²α-sin²β=S(α+β)S(α-β)", - "sin2α=2SαCα", - "sofunhowtoget", - "Staff名单里飘过的是赞助榜单,喜欢本游戏的话可以给我们打赞助支持开发哦~", - "STSD必死", - "SΔABC=√(h(h-a)(h-b)(h-c)), h=(a+b+c)/2", - "Techmino = Technique + tetromino", - "Techmino 好玩!", - "Techmino 濂界帺锛", - "Techmino console了解一下", - "Techmino n.铁壳米诺(游戏名)", - "Techmino安卓下载", - "Techmino不是工业产品也不是练手程序,是游戏作品(至少目前是,嗯…)", - "Techmino好玩!", - "Techmino没有抽卡没有氪金没有逼肝,良不良心~", - "Techmino生日不太清楚,那就定在2019.6.26吧", - "Techmino也有节日主题了哦", - "Techmino有一个Nspire-CX版本!", - "Techmino在哪里下载", - "Techmino怎么念啊", - "techminohaowan", - "techminoisfun", - "viod main[]", - "while(false)", - "Z酱竟是我自己", - "Z酱累了,Z酱不想更新", - "Z酱只是个写代码的,懂什么方块", - "Z块等身抱枕来一个(x", - {C.A,"AQUA"}, - {C.B,"BLUE"}, - {C.C,""}, - {C.C,"15puzzle好玩!"}, - {C.C,"魔方好玩!"}, - {C.C,"噗哟噗哟好玩!"}, - {C.C,"扫雷好玩!"}, - {C.C,"Celeste好玩!"}, - {C.C,"CYAN"}, - {C.C,"Minecraft好玩!"}, - {C.C,"Orzmic好玩!"}, - {C.C,"Osu!好玩!"}, - {C.C,"Phigros好玩!"}, - {C.C,"Terraria好玩!"}, - {C.C,"VVVVVV好玩!"}, - {C.G,"快捷键: Alt+F4=关闭当前窗口"}, - {C.G,"快捷键: Alt+Tab=切换窗口"}, - {C.G,"快捷键: backspace=返回上一个文件目录"}, - {C.G,"快捷键: Ctrl+鼠标滚轮=缩放"}, - {C.G,"快捷键: Ctrl+A=全选"}, - {C.G,"快捷键: Ctrl+Alt+Z=查看所有qq消息"}, - {C.G,"快捷键: Ctrl+D=复制一份"}, - {C.G,"快捷键: Ctrl+F=查找"}, - {C.G,"快捷键: Ctrl+Tab=切换标签页"}, - {C.G,"快捷键: Ctrl+W=关闭当前标签页"}, - {C.G,"快捷键: shift+del=永久删除文件 (技术人员别杠)"}, - {C.G,"GREEN"}, - {C.H,"暂定段位:9"}, - {C.H,"REGRET!!"}, - {C.J,"JADE"}, - {C.L,"LIME"}, - {C.lC,"Xspin",C.Z,"是啥"}, - {C.lP,"秘密数字:626"}, - {C.lP,"Naki",C.Z," 可爱!"}, - {C.lR,"Z ",C.lG,"S ",C.lS,"J ",C.lO,"L ",C.lP,"T ",C.lY,"O ",C.lC,"I"}, - {C.lS,"茶娘",C.Z," 可爱!"}, - {C.lY,"COOL!!"}, - {C.M,"MAGENTA"}, - {C.N,"Lua",C.Z,"天下第一"}, - {C.N,"NAVY"}, - {C.O,"ORANGE"}, - {C.P,"PURPLE"}, - {C.P,"T-spin!"}, - {C.R,"《滥用DMCA》"}, - {C.R,"《知识产权法》"}, - {C.R,"本游戏难度上限很高,做好心理准备。"}, - {C.R,"不要向不感兴趣的路人推荐!!!!!!!!"}, - {C.R,"不要在上课时玩游戏!"}, - {C.R,"光敏性癫痫警告"}, - {C.R,"请在有一定游戏基础之后再学Tspin!不然副作用非常大!"}, - {C.R,"新人请千万记住,打好基础,不要太早学那些花里胡哨的。"}, - {C.R,"长时间游戏状态会越来越差!玩久了记得放松一下~"}, - {C.R,"DD",C.Z,"炮=",C.P,"TS",C.R,"D",C.Z,"+",C.P,"TS",C.R,"D",C.Z,"炮"}, - {C.R,"DT",C.Z,"炮=",C.P,"TS",C.R,"D",C.Z,"+",C.P,"TS",C.R,"T",C.Z,"炮"}, - {C.R,"LrL ",C.G,"RlR ",C.B,"LLr ",C.O,"RRl ",C.P,"RRR LLL ",C.C,"FFF ",C.Y,"RfR RRf rFF"}, - {C.R,"RED"}, - {C.S,"SEA"}, - {C.V,"VIOLET"}, - {C.W,"uid:225238922"}, - {C.W,"WINE"}, - {C.Y,"暂定段位:GM"}, - {C.Y,"暂定段位:M"}, - {C.Y,"暂定段位:MK"}, - {C.Y,"暂定段位:MM"}, - {C.Y,"暂定段位:MO"}, - {C.Y,"暂定段位:MV"}, - {C.Y,"Miya",C.Z," 可爱!"}, - {C.Y,"O-spin Triple!"}, - {C.Y,"YELLOW"}, - {C.Z,"1, 2, ",C.C,"⑨",C.Z,"!!!!!"}, - {C.Z,"效率药水",C.H," 效率提升 (8:00)"}, - {C.Z,"协调药水",C.H," MD减少 II(1:30)"}, - -- "Z酱 可爱!", - } + ['custom_clear']= {"自定义", "普通"}, + ['custom_puzzle']= {"自定义", "拼图"}, + }, + getTip={refuseCopy=true, + "...,合群了就会消失,不合群世界毁灭(指game over", + "...,合群了就会消失,但消失不代表没有意义", + "...,没有对比就没有伤害", + "(a+b)³=a³+3a²b+3ab²+b³", + "(RUR'U')R'FR2U'R'U'(RUR'F')", + "《按钮风格进化史》", + "《加载动画进化史》", + "《教育的力量》", + "《练习的力量》", + "《梦想的意义》", + "《天赋的力量》", + "《游戏的意义》", + "《知识的力量》", + "《主题曲进化史》", + "\"TechminOS\"", + "↑↑↓↓←→←→BA", + "$include", + "0next 0hold.", + "11renPC!", + "1next 0hold", + "1next 1hold!", + "1next 6hold!", + "2.182818284590452353", + "2021年是Techmino联机元年", + "20G本质是一个全新的游戏规则!", + "29种块里28个都能spin你敢信?", + "3.1415926535897932384 ? ? ?", + "3next 1hold?", + "40行世界纪录:14.915s by Reset_", + "6236326236327175", + "626in1", + "6next 1hold!", + "6next 6hold?!", + "7宽三SZ架空捐了解一下", + "把手机调到特殊的日期也许会发生什么", + "报时机器人:新的一天开始了", + "背景影响游玩?可以去设置关闭", + "本游戏不叫Teachmino", + "本游戏的一部分内容是国际合作的!", + "本游戏的B2B是气槽机制,和传统的开关机制不一样哦", + "本游戏还在测试中,出各种问题都是有可能的哦", + "本游戏内置了几个休(ying)闲(he)小游戏哦~", + "本游戏在设计的时候受到了大量其他块游甚至一些音游的启发", + "必须要软降才能到达的位置都会判定为极简操作", + "别看攻击效率不高,其实消四还是很强的", + "别问游戏名怎么取的,问就是随便想的", + "不同人打40行最合适的方式不一样,s1w/63/散消/s2w...", + "不同游戏(甚至不同模式)中不同战术的能力都不一样,并没有绝对的强弱之分", + "不希望激烈的零和竞争充斥整个游戏", + "不要悲伤,不要心急", + "不要大力拍打或滑动哦", + "不要卖弱不要卖弱不要卖弱", + "不知道有多少人玩游戏的时候会关心游戏是谁做的", + "部分手机系统开启震动会导致严重卡顿", + "彩色消除即将到来!", + "草(日本语)", + "成就系统在做了!", + "吃键?真的吗?建议回放看看到底按没按到,按了多久", + "除了雨宫太阳还有很多高手玩家,甚至强出很多很多", + "触发游戏报错后日志文件会越来越大(不过顶多几百K)", + "触摸板打osu也很好!", + "凑数tip什么时候能站起来!", + "打对战前请确认自己有一定的水平,不然会毫无游戏体验的", + "打好块跟学习一样没有捷径,多练。", + "大概还是有人会看tip的", + "大量使用开局定式的数据是不准的", + "大陆的方块社区起步晚,所以世界级高手很少…下一个会是你吗?", + "大满贯10连击消四全清!", + "戴上耳机以获得最佳体验", + "单手也能玩!", + "低帧率会降低游戏体验", + "点击添加标题", + "点击添加副标题", + "电脑游玩自带按键显示~", + "对编程有真·兴趣推荐Lua,安装无脑 语法简单 执行速度快 远离枯燥学校编程(雾", + "对战游戏不是单机游戏,所以timing在对战里也非常重要!", + "多年小游戏玩家表示痛恨假加载,启动动画主要是在加载资源", + "多hold现代块又回来了!", + "俄罗斯方块完全可以作为电竞游戏", + "发现有个\"隐形\"皮肤了吗", + "方块不能吃", + "方块不是你生活的全部,适当走出去看看", + "方块教会我们,合群了就会消失,...", + "方块默认出现的方向都是重心在下哦", + "方块能吃吗", + "分数只是好看的,建议只看关卡要求", + "服务器随时爆炸", + "感觉明明按键了但是没反应?你真的按到了吗?", + "感觉自己速度到上限了?试着把das调低一点", + "感谢群友帮忙想tip", + "感谢Orzmic为这个tip显示框提出意见", + "感谢Phigros提供部分tip模板(", + "刚接触方块的话多玩玩就行,40行两分钟以外没啥好针对性练习的", + "刚开始练全隐形可以尽量堆平,留一列消四", + "隔壁不在乎玩家意见但是我们在乎,没人提过的合理建议一定会回应", + "隔断消除即将到来!", + "各种画面细节选项都可以在设置里找到哦", + "更换方块皮肤也许能帮助提升成绩?不懂,玄学", + "更小的DAS和ARR拥有更高的操作上限(能控制得了的话)", + "更新内容在游戏里和群公告都有写!", + "攻击生效速度(从快到慢):消二/三,消四,spin,高连击", + "还能写些什么tip呢", + "好像还没人能用脚打块打到一定水平", + "好像可以把手机倒过来打场地旋转180...那还是不建议违反规则", + "很有精神!", + "混合消除即将到来!", + "基础堆叠和挖掘能力非常重要,忽视这两项的人都后悔了(确信)", + "即使被顶到天上了也不要放弃,每一行垃圾都有可能成为你的武器", + "极简率决定了你大概的速度上限和相等手速下的放块速度", + "假如生活欺骗了你,不要悲伤,不要心急,还有块陪着你", + "架空消除即将到来!", + "建议使用双手游玩", + "健康小贴士:不要熬夜,真的会猝死", + "健康小贴士:玩游戏多眨眼,不然会干眼病", + "键位是可以自定义的", + "键位有可能决定了上限,可能的话还是尽量考虑一下自己的键位是否利于超高速操作", + "尽早学双旋吧,单旋没前途的", + "经典块的水也很深,不要小看经典块玩家", + "经典块跟现代块是两个游戏,一个厉害不代表另一个也厉害,得从头练起", + "经典块和渣方块不是一回事", + "觉得移动速度太慢或太快,手感不好?快去设置调整DAS/ARR", + "开启省流模式后将不会加载用户头像(应该能省不少流吧)", + "快去打一把100%极简看看会怎样", + "来学编程,好玩的", + "连续pc有大量知识要背,不过背出来后随手10连pc不是问题", + "六连块总共有…?那不重要,不会做的", + "卖弱和谦虚不是一回事,发言前三思呀", + "卖弱禁言警告", + "没学过编曲,音乐都是自己瞎写的,如果真的觉得好听就太好了!", + "没有量化就没有对比,...", + "每个块的出现方向可以自定义", + "每个块的颜色可以自定义", + "每个虚拟按键都可以隐藏/显示,尺寸也可调", + "免费吃鸡方块", + "喵!", + "魔方也是方块(确信", + "能导致吃键的问题有很多,建议说清楚具体发生了什么并且录视频说明", + "能玩到Techmino不是你有优越感的理由", + "你的双手是为了你的一生服务的,而不是Techmino", + "你今天的人品值是:"..math.random(100), + "你可以从统计页面打开游戏存档目录", + "你们考虑过Z酱的感受吗?没有!你们只考虑你自己。", + "你说彩蛋?嗯…算是有,可以找找", + "你有一个好", + "你知道吗:看主页机器人玩可能比较费电", + "你知道吗:全程不使用任何旋转键完成40行模式是有可能的", + "你知道吗:全程不使用左右移动键完成40行模式是有可能的", + "你知道吗:停留在模式地图界面很费电", + "你知道吗:在其他(方块)游戏相关场合提及本游戏是很不礼貌的", + "你准备好了吗?", + "其实很多时候\"吃键\"是玩家对游戏机制不了解或者自己的操作问题导致的", + "其实S和Z有四个方向(状态),虽然看起来只有两个", + "请谨慎向没有方块经验的玩家推荐,会对本游戏的生存环境造成影响,感谢配合。", + "请勿大力敲打设备!敲坏了就没有Techmino玩了", + "请勿使用三只手游玩", + "去玩别的方块的时候记得没有Ospin!", + "全球应该没人能全S评价(大爆炸不算)", + "群友翻译的中文方块百科全书! tetris.huijiwiki.com", + "让他三尺又何妨", + "如何O-spin: 一秒转626圈(误", + "三连块只有2种", + "三岁通关困难马拉松", + "上面这个不是录像,是机器人实时在玩", + "少女祈祷中", + "少玩点游戏,多注意眨眼和休息", + "使用固定堆叠方法达成20TSD难度很低", + "试试用跳舞毯打块", + "适度游戏益脑,沉迷游戏伤身,合理安排时间,享受健康生活", + "手机玩也可以外接键盘哦", + "术语不认识?去右边那个词典里查查吧", + "水平是随着时间一点点提升的,不是几天几星期就能玩好的哦", + "四连块总共7种", + "虽然极简连击和极简率计算看着很怪,但以后你会发现还挺科学!", + "所有大道理tip都是亲眼目睹后加的,如果觉得多余说明就不是给你看的呀!消消气", + "提前旋转等功能可以用来救命", + "天哪,我竟然是一条凑数tip", + "退一步海阔天空", + "挖掘能力在对战里非常非常非常重要!!!!", + "玩到一半弹出消息框?快去设置禁止弹窗", + "玩得开心的话游戏作者也会很开心哦", + "为了保护玩家们的健康,本游戏有一个临时的简易防沉迷系统!(不过估计你也触发不了/笑)", + "为什么关卡那么少!因为前一模式成绩连D都没达到,再加把劲吧~", + "为数不多走向世界的国产方块游戏", + "我曾经在极度愤怒的时候15秒消了40行", + "我们联合!", + "我们是不是第一个在方块游戏做tip的?", + "我是一条凑数tip", + "我也是一条凑数tip", + "我一个滑铲就挖了个11renPC", + "我永远喜…", + "无聊翻翻设置是好习惯", + "五连块总共18种", + "物理hold了解一下", + "希望极简率没事", + "希望你们都能喜欢Z…哦不是,喜欢Techmino", + "喜欢本游戏的话可以到应用商…好像没上架呢还", + "享受Tech的特色旋转系统!", + "向其他人询问练习方法最好提供自己的详细水平,最好录些视频,不然很难给出合适的建议", + "小心腱鞘炎", + "写不出那种很酷的音乐(哭", + "旋转不是变形!请尽量灵活利用顺逆时针两个旋转键", + "学会使用两个旋转键,三个更好", + "学习能力很重要,无论是玩游戏还是学知识", + "要盯着bug不放", + "音乐风格是什么,能吃吗", + "音乐使用beepbox制作", + "音游方块是一家(暴论", + "隐形真的不难,只要花几个小时耐心练下去", + "游戏确实可以是艺术,而不一定是纯\"玩具\"", + "游戏使用LÖVE引擎制作", + "游戏使用un...LÖVE引擎制作", + "游戏也是一种艺术形式", + "游戏中左下角三个信息分别是分数/时间/极简连击数", + "有建议的话可以把信息反馈给作者~", + "有四个隐藏模式不能从地图进入,到处找找看吧", + "有疑问? 先看设置有没有你想要的", + "右下角那个问号按钮是游戏说明书", + "长期睡眠不足会引起不可逆的脑损伤(变傻)", + "这不是休闲游戏…别怪关卡要求太高,多练吧", + "这个菜单可以用纯键盘控制", + "这里的极简判定不松不严,放心软降,小心hold!", + "震惊,我只是一条凑数tip吗", + "众所周知俄罗斯方块是经典编程练手游戏(?", + "注意到方块\"旋转\"的时候到底发生了些什么吗?", + "自定义场地可以画图实现逐页演示", + "自己不确定的问题尽量不要教别人哦", + "总共有将近400条tip哦", + "作业都没做完别玩手机(", + "作者40行sub26了", + "作者电脑上装了11个方块", + "作者浏览器收藏夹里有6个方块", + "做,做碌鸠啊做,打块先啦!", + "ALLSPIN!", + "Am G F G", + "B2B2B???", + "B2B2B2B并不存在..", + "B2B2B2B存在吗?", + "BT炮=beta炮=TCM-β炮", + "c4w可不是在所有游戏里都很强哦", + "c4w人竟是我自己", + "c4w人竟在我身边", + "cos(α+β)=CαCβ-SβSα", + "cos²α-cos²β=-S(α+β)S(α-β)", + "cos²α-sin²β=C(α+β)C(α-β)", + "cos2α=C²α-S²α", + "e^(pi*i)=-1", + "e^(pi*i/2)=i", + "e^(pi*i/4)=(1+i)/√2", + "Farter:\"成天被夸赞'好玩'的\"", + "Farter:\"可以形成方块圈子小中心话题,同作者一起衍生一些概念与梗的\"", + "Farter:\"论方块的软工意义(就算这么小个范围内,各种取舍蒙混翻车现象都总会以很易懂的方式出现(\"", + "Farter:\"民间微创新\"", + "Farter:\"民间音le与图案\"", + "Farter:\"民间游戏设计\"", + "Farter:\"是方块爱好者研究平台\"", + "Farter:\"是方块萌新入坑接收器\"", + "Farter:\"是居家旅行装逼必备\"", + "Farter:\"是民间UI动效艺术作品\"", + "Farter:\"是一滩散乱的代码组成的蜜汁结构\"", + "Farter:\"它是现在的techmino已发布版本\"", + "fin neo iso 是满足tspin条件的特殊t2的名字", + "git commit", + "hello world", + "if a==true", + "l-=-1", + "Let-The-Bass-Kick!", + "pps-0.01", + "rm -rf /*", + "shutdown -h now", + "sin(α+β)=SαCβ+SβCα", + "sin²α-cos²β=-C(α+β)C(α-β)", + "sin²α-sin²β=S(α+β)S(α-β)", + "sin2α=2SαCα", + "sofunhowtoget", + "Staff名单里飘过的是赞助榜单,喜欢本游戏的话可以给我们打赞助支持开发哦~", + "STSD必死", + "SΔABC=√(h(h-a)(h-b)(h-c)), h=(a+b+c)/2", + "Techmino = Technique + tetromino", + "Techmino 好玩!", + "Techmino 濂界帺锛", + "Techmino console了解一下", + "Techmino n.铁壳米诺(游戏名)", + "Techmino安卓下载", + "Techmino不是工业产品也不是练手程序,是游戏作品(至少目前是,嗯…)", + "Techmino好玩!", + "Techmino没有抽卡没有氪金没有逼肝,良不良心~", + "Techmino生日不太清楚,那就定在2019.6.26吧", + "Techmino也有节日主题了哦", + "Techmino有一个Nspire-CX版本!", + "Techmino在哪里下载", + "Techmino怎么念啊", + "techminohaowan", + "techminoisfun", + "viod main[]", + "while(false)", + "Z酱竟是我自己", + "Z酱累了,Z酱不想更新", + "Z酱只是个写代码的,懂什么方块", + "Z块等身抱枕来一个(x", + {C.A,"AQUA"}, + {C.B,"BLUE"}, + {C.C,""}, + {C.C,"15puzzle好玩!"}, + {C.C,"魔方好玩!"}, + {C.C,"噗哟噗哟好玩!"}, + {C.C,"扫雷好玩!"}, + {C.C,"Celeste好玩!"}, + {C.C,"CYAN"}, + {C.C,"Minecraft好玩!"}, + {C.C,"Orzmic好玩!"}, + {C.C,"Osu!好玩!"}, + {C.C,"Phigros好玩!"}, + {C.C,"Terraria好玩!"}, + {C.C,"VVVVVV好玩!"}, + {C.G,"快捷键: Alt+F4=关闭当前窗口"}, + {C.G,"快捷键: Alt+Tab=切换窗口"}, + {C.G,"快捷键: backspace=返回上一个文件目录"}, + {C.G,"快捷键: Ctrl+鼠标滚轮=缩放"}, + {C.G,"快捷键: Ctrl+A=全选"}, + {C.G,"快捷键: Ctrl+Alt+Z=查看所有qq消息"}, + {C.G,"快捷键: Ctrl+D=复制一份"}, + {C.G,"快捷键: Ctrl+F=查找"}, + {C.G,"快捷键: Ctrl+Tab=切换标签页"}, + {C.G,"快捷键: Ctrl+W=关闭当前标签页"}, + {C.G,"快捷键: shift+del=永久删除文件 (技术人员别杠)"}, + {C.G,"GREEN"}, + {C.H,"暂定段位:9"}, + {C.H,"REGRET!!"}, + {C.J,"JADE"}, + {C.L,"LIME"}, + {C.lC,"Xspin",C.Z,"是啥"}, + {C.lP,"秘密数字:626"}, + {C.lP,"Naki",C.Z," 可爱!"}, + {C.lR,"Z ",C.lG,"S ",C.lS,"J ",C.lO,"L ",C.lP,"T ",C.lY,"O ",C.lC,"I"}, + {C.lS,"茶娘",C.Z," 可爱!"}, + {C.lY,"COOL!!"}, + {C.M,"MAGENTA"}, + {C.N,"Lua",C.Z,"天下第一"}, + {C.N,"NAVY"}, + {C.O,"ORANGE"}, + {C.P,"PURPLE"}, + {C.P,"T-spin!"}, + {C.R,"《滥用DMCA》"}, + {C.R,"《知识产权法》"}, + {C.R,"本游戏难度上限很高,做好心理准备。"}, + {C.R,"不要向不感兴趣的路人推荐!!!!!!!!"}, + {C.R,"不要在上课时玩游戏!"}, + {C.R,"光敏性癫痫警告"}, + {C.R,"请在有一定游戏基础之后再学Tspin!不然副作用非常大!"}, + {C.R,"新人请千万记住,打好基础,不要太早学那些花里胡哨的。"}, + {C.R,"长时间游戏状态会越来越差!玩久了记得放松一下~"}, + {C.R,"DD",C.Z,"炮=",C.P,"TS",C.R,"D",C.Z,"+",C.P,"TS",C.R,"D",C.Z,"炮"}, + {C.R,"DT",C.Z,"炮=",C.P,"TS",C.R,"D",C.Z,"+",C.P,"TS",C.R,"T",C.Z,"炮"}, + {C.R,"LrL ",C.G,"RlR ",C.B,"LLr ",C.O,"RRl ",C.P,"RRR LLL ",C.C,"FFF ",C.Y,"RfR RRf rFF"}, + {C.R,"RED"}, + {C.S,"SEA"}, + {C.V,"VIOLET"}, + {C.W,"uid:225238922"}, + {C.W,"WINE"}, + {C.Y,"暂定段位:GM"}, + {C.Y,"暂定段位:M"}, + {C.Y,"暂定段位:MK"}, + {C.Y,"暂定段位:MM"}, + {C.Y,"暂定段位:MO"}, + {C.Y,"暂定段位:MV"}, + {C.Y,"Miya",C.Z," 可爱!"}, + {C.Y,"O-spin Triple!"}, + {C.Y,"YELLOW"}, + {C.Z,"1, 2, ",C.C,"⑨",C.Z,"!!!!!"}, + {C.Z,"效率药水",C.H," 效率提升 (8:00)"}, + {C.Z,"协调药水",C.H," MD减少 II(1:30)"}, + -- "Z酱 可爱!", + } } \ No newline at end of file diff --git a/parts/language/lang_zh2.lua b/parts/language/lang_zh2.lua index f3fbe43c..34684578 100644 --- a/parts/language/lang_zh2.lua +++ b/parts/language/lang_zh2.lua @@ -1,230 +1,230 @@ return{ - cmb={nil,"1连击","2连击","3连击","4连击","5连击","6连击","7连击","8连击","9连击","10连击!","11连击!","12连击!","13连击!","14连击!","15连击!","16连击!","17连击!","18连击!","19连击!","巨型连击"}, - spin="型回旋", - clear={"单清","双清","三清","四清","五清","六清"}, - mini="迷你",b2b="满贯",b3b="大满贯", - PC="场地全清",HPC="场地半清", + cmb={nil,"1连击","2连击","3连击","4连击","5连击","6连击","7连击","8连击","9连击","10连击!","11连击!","12连击!","13连击!","14连击!","15连击!","16连击!","17连击!","18连击!","19连击!","巨型连击"}, + spin="型回旋", + clear={"单清","双清","三清","四清","五清","六清"}, + mini="迷你",b2b="满贯",b3b="大满贯", + PC="场地全清",HPC="场地半清", - great="不错!", - awesome="精彩。", - almost="差一点!", - continue="继续。", + great="不错!", + awesome="精彩。", + almost="差一点!", + continue="继续。", - speedLV="速度等级", - piece="块数",line="行数",atk="攻击",eff="效率", - rpm="收每分",tsd="T2", - grade="段位",techrash="消四", - wave="波数",nextWave="下一波", - combo="连击",maxcmb="最大连击", - pc="全清",ko="淘汰", + speedLV="速度等级", + piece="块数",line="行数",atk="攻击",eff="效率", + rpm="收每分",tsd="T2", + grade="段位",techrash="消四", + wave="波数",nextWave="下一波", + combo="连击",maxcmb="最大连击", + pc="全清",ko="淘汰", - finesse_ap="完美极简", - finesse_fc="全连击", + finesse_ap="完美极简", + finesse_fc="全连击", - ai_fixed="不能同时开启电脑玩家和固定序列", - ai_prebag="不能同时开启电脑玩家和含有非四连块的自定义序列", - ai_mission="不能同时开启电脑玩家和自定义任务", + ai_fixed="不能同时开启电脑玩家和固定序列", + ai_prebag="不能同时开启电脑玩家和含有非四连块的自定义序列", + ai_mission="不能同时开启电脑玩家和自定义任务", - ranks={"差","可","中","良","优"}, + ranks={"差","可","中","良","优"}, - modInstruction="选择你要使用的模组!\n不同的模组会用不同的方式改变游戏规则,来开发新玩法挑战自我吧!\n提醒:开启一些模组会让成绩无效 你可以用键盘开关模组,按tab重置", - modInfo={ - next="预览数量:\n强制使用预览的个数", - hold="暂存数量:\n强制使用暂存的个数", - hideNext="隐藏预览:\n隐藏前几个预览", - infHold="无限暂存:\n可以无限制使用暂存", - forceB2B="强制满贯:\n满贯点数条掉到启动线以下就会结束游戏", - }, - pauseStat={ - "时间:", - "按键/旋转/暂存:", - "落块:", - "消行/挖掘:", - "攻击/挖掘攻击:", - "上涨/接收/抵消:", - "消除:", - "回旋:", - "(大)满贯/全(半)清:", - "非极简操作:", - }, - radar={"防","守","攻","送","速","挖"}, - radarData={"防/分","守/分","攻/分","送/分","行/分","挖/分"}, - WidgetText={ - mode={ - mod="模组(F1)", - }, - mod={ - title="模组", - }, - setting_control={ - das="首次移动延迟",arr="移动重复延迟", - sddas="首次软降延迟",sdarr="软降重复延迟", - ihs="提前暂存", - }, - setting_skin={ - spin1="转",spin2="转",spin3="转",spin4="转",spin5="转",spin6="转",spin7="转", - }, - customGame={ - mod="模组(F1)", + modInstruction="选择你要使用的模组!\n不同的模组会用不同的方式改变游戏规则,来开发新玩法挑战自我吧!\n提醒:开启一些模组会让成绩无效 你可以用键盘开关模组,按tab重置", + modInfo={ + next="预览数量:\n强制使用预览的个数", + hold="暂存数量:\n强制使用暂存的个数", + hideNext="隐藏预览:\n隐藏前几个预览", + infHold="无限暂存:\n可以无限制使用暂存", + forceB2B="强制满贯:\n满贯点数条掉到启动线以下就会结束游戏", + }, + pauseStat={ + "时间:", + "按键/旋转/暂存:", + "落块:", + "消行/挖掘:", + "攻击/挖掘攻击:", + "上涨/接收/抵消:", + "消除:", + "回旋:", + "(大)满贯/全(半)清:", + "非极简操作:", + }, + radar={"防","守","攻","送","速","挖"}, + radarData={"防/分","守/分","攻/分","送/分","行/分","挖/分"}, + WidgetText={ + mode={ + mod="模组(F1)", + }, + mod={ + title="模组", + }, + setting_control={ + das="首次移动延迟",arr="移动重复延迟", + sddas="首次软降延迟",sdarr="软降重复延迟", + ihs="提前暂存", + }, + setting_skin={ + spin1="转",spin2="转",spin3="转",spin4="转",spin5="转",spin6="转",spin7="转", + }, + customGame={ + mod="模组(F1)", - nextCount="预览个数", - holdCount="暂存个数", - infHold="无限暂存", - phyHold="物理暂存", - }, - sound={ - clear1="消一", - clear2="消二", - clear3="消三", - clear4="消四", - spin0="空旋转", - spin1="旋转消一", - spin2="旋转消二", - spin3="旋转消三", + nextCount="预览个数", + holdCount="暂存个数", + infHold="无限暂存", + phyHold="物理暂存", + }, + sound={ + clear1="消一", + clear2="消二", + clear3="消三", + clear4="消四", + spin0="空旋转", + spin1="旋转消一", + spin2="旋转消二", + spin3="旋转消三", - _1="消一", - _2="消二", - _3="消三", - _4="消四", - z0="Z旋", - z1="Z旋消一", - z2="Z旋消二", - z3="Z旋消三", - s0="S旋", - s1="S旋消一", - s2="S旋消二", - s3="S旋消三", + _1="消一", + _2="消二", + _3="消三", + _4="消四", + z0="Z旋", + z1="Z旋消一", + z2="Z旋消二", + z3="Z旋消三", + s0="S旋", + s1="S旋消一", + s2="S旋消二", + s3="S旋消三", - j0="J旋", - j1="J旋消一", - j2="J旋消二", - j3="J旋消三", - l0="L旋", - l1="L旋消一", - l2="L旋消二", - l3="L旋消三", + j0="J旋", + j1="J旋消一", + j2="J旋消二", + j3="J旋消三", + l0="L旋", + l1="L旋消一", + l2="L旋消二", + l3="L旋消三", - t0="T旋", - t1="T旋消一", - t2="T旋消二", - t3="T旋消三", - o0="O旋", - o1="O旋消一", - o2="O旋消二", - o3="O旋消三", + t0="T旋", + t1="T旋消一", + t2="T旋消二", + t3="T旋消三", + o0="O旋", + o1="O旋消一", + o2="O旋消二", + o3="O旋消三", - i0="I旋", - i1="I旋消一", - i2="I旋消二", - i3="I旋消三", + i0="I旋", + i1="I旋消一", + i2="I旋消二", + i3="I旋消三", - mini="迷你", - b2b="满贯", - b3b="大满贯", - pc="全清", - }, - }, - modes={ - ['sprint_10l']= {"竞速", "10行", "消除10行"}, - ['sprint_20l']= {"竞速", "20行", "消除20行"}, - ['sprint_40l']= {"竞速", "40行", "消除40行"}, - ['sprint_100l']= {"竞速", "100行", "消除100行"}, - ['sprint_400l']= {"竞速", "400行", "消除400行"}, - ['sprint_1000l']= {"竞速", "1000行", "消除1000行"}, - ['sprintPenta']= {"竞速", "五连块", "伤脑筋十八块"}, - ['sprintMPH']= {"竞速", "纯净", "纯随机\n无预览\n无暂存"}, - ['dig_10l']= {"挖掘", "10L", "挖掘10行"}, - ['dig_40l']= {"挖掘", "40L", "挖掘40行"}, - ['dig_100l']= {"挖掘", "100L", "挖掘100行"}, - ['dig_400l']= {"挖掘", "400L", "挖掘400行"}, - ['dig_1000l']= {"挖掘", "1000L", "挖掘1000行"}, - ['drought_n']= {"干旱", "100行", "你I没了"}, - ['drought_l']= {"干旱+", "100行", "后 妈 发 牌"}, - ['stack_e']= {"堆积", "简单", "搭积木"}, - ['stack_h']= {"堆积", "困难", "搭积木"}, - ['stack_u']= {"堆积", "极限", "搭积木"}, - ['marathon_n']= {"马拉松", "普通", "200行加速马拉松"}, - ['marathon_h']= {"马拉松", "困难", "200行高速马拉松"}, - ['solo_e']= {"单挑", "简单", "打败机器人"}, - ['solo_n']= {"单挑", "普通", "打败机器人"}, - ['solo_h']= {"单挑", "困难", "打败机器人"}, - ['solo_l']= {"单挑", "疯狂", "打败机器人"}, - ['solo_u']= {"单挑", "极限", "打败机器人"}, - ['techmino49_e']= {"49人混战", "简单", "49人混战,活到最后"}, - ['techmino49_h']= {"49人混战", "困难", "49人混战,活到最后"}, - ['techmino49_u']= {"49人混战", "极限", "49人混战,活到最后"}, - ['techmino99_e']= {"99人混战", "简单", "99人混战,活到最后"}, - ['techmino99_h']= {"99人混战", "困难", "99人混战,活到最后"}, - ['techmino99_u']= {"99人混战", "极限", "99人混战,活到最后"}, - ['round_e']= {"回合制", "简单", "下棋模式"}, - ['round_n']= {"回合制", "普通", "下棋模式"}, - ['round_h']= {"回合制", "困难", "下棋模式"}, - ['round_l']= {"回合制", "疯狂", "下棋模式"}, - ['round_u']= {"回合制", "极限", "下棋模式"}, - ['master_n']= {"大师", "普通", "20G初心者练习"}, - ['master_h']= {"大师", "困难", "上级者20G挑战"}, - ['master_final']= {"大师", "终点", "究极20G:无法触及的终点"}, - ['master_ph']= {"大师", "虚幻", "虚幻20G:???"}, - ['master_ex']= {"宗师", "EX", "成为方块大师"}, - ['rhythm_e']= {"节奏", "简单", "200行低速节奏马拉松"}, - ['rhythm_h']= {"节奏", "困难", "200行中速节奏马拉松"}, - ['rhythm_u']= {"节奏", "极限", "200行高速节奏马拉松"}, - ['blind_e']= {"隐形", "半隐", "不强大脑"}, - ['blind_n']= {"隐形", "全隐", "挺强大脑"}, - ['blind_h']= {"隐形", "瞬隐", "很强大脑"}, - ['blind_l']= {"隐形", "瞬隐+", "超强大脑"}, - ['blind_u']= {"隐形", "啊这", "你准备好了吗"}, - ['blind_wtf']= {"隐形", "不会吧", "还没准备好"}, - ['classic_fast']= {"高速经典", "CTWC", "高速经典"}, - ['survivor_e']= {"生存", "简单", "你能存活多久?"}, - ['survivor_n']= {"生存", "普通", "你能存活多久?"}, - ['survivor_h']= {"生存", "困难", "你能存活多久?"}, - ['survivor_l']= {"生存", "疯狂", "你能存活多久?"}, - ['survivor_u']= {"生存", "极限", "你能存活多久?"}, - ['attacker_h']= {"进攻", "困难", "进攻练习"}, - ['attacker_u']= {"进攻", "极限", "进攻练习"}, - ['defender_n']= {"防守", "普通", "防守练习"}, - ['defender_l']= {"防守", "疯狂", "防守练习"}, - ['dig_h']= {"挖掘", "困难", "挖掘练习"}, - ['dig_u']= {"挖掘", "极限", "挖掘练习"}, - ['bigbang']= {"大爆炸", "简单", "All-spin 入门教程\n施工中"}, - ['c4wtrain_n']= {"中四宽练习", "普通", "无 限 连 击"}, - ['c4wtrain_l']= {"中四宽练习", "疯狂", "无 限 连 击"}, - ['pctrain_n']= {"全清训练", "普通", "简易全清题库,熟悉全清定式的组合"}, - ['pctrain_l']= {"全清训练", "疯狂", "困难PC题库,强算力者进"}, - ['pc_n']= {"全清挑战", "普通", "100行内刷全清"}, - ['pc_h']= {"全清挑战", "困难", "100行内刷全清"}, - ['pc_l']= {"全清挑战", "疯狂", "100行内刷全清"}, - ['pc_inf']= {"无尽全清挑战", "", "你能连续做多少PC?"}, - ['tech_n']= {"科研", "普通", "禁止断B2B"}, - ['tech_n_plus']= {"科研", "普通+", "仅允许回旋与全清"}, - ['tech_h']= {"科研", "困难", "禁止断B2B"}, - ['tech_h_plus']= {"科研", "困难+", "仅允许回旋与全清"}, - ['tech_l']= {"科研", "疯狂", "禁止断B2B"}, - ['tech_l_plus']= {"科研", "疯狂+", "仅允许spin与PC"}, - ['tech_finesse']= {"科研", "极简", "强制最简操作"}, - ['tech_finesse_f']= {"科研", "极简+", "禁止普通消除,强制最简操作"}, - ['tsd_e']= {"T2挑战", "简单", "你能连续做几个T旋双清?"}, - ['tsd_h']= {"T2挑战", "困难", "你能连续做几个T旋双清?"}, - ['tsd_u']= {"T2挑战", "极限", "你能连续做几个T旋双清?"}, - ['backfire_n']= {"自攻自防", "普通", "打出100攻击"}, - ['backfire_h']= {"自攻自防", "困难", "打出100攻击"}, - ['backfire_l']= {"自攻自防", "疯狂", "打出100攻击"}, - ['backfire_u']= {"自攻自防", "极限", "打出100攻击"}, - ['sprintAtk']= {"竞速", "100攻击", "打出100攻击"}, - ['zen']= {"禅", "200", "不限时200行"}, - ['ultra']= {"限时打分", "挑战", "在两分钟内尽可能拿到最多的分数"}, - ['infinite']= {"无尽", "", "沙盒"}, - ['infinite_dig']= {"无尽:挖掘", "", "挖呀挖呀挖"}, + mini="迷你", + b2b="满贯", + b3b="大满贯", + pc="全清", + }, + }, + modes={ + ['sprint_10l']= {"竞速", "10行", "消除10行"}, + ['sprint_20l']= {"竞速", "20行", "消除20行"}, + ['sprint_40l']= {"竞速", "40行", "消除40行"}, + ['sprint_100l']= {"竞速", "100行", "消除100行"}, + ['sprint_400l']= {"竞速", "400行", "消除400行"}, + ['sprint_1000l']= {"竞速", "1000行", "消除1000行"}, + ['sprintPenta']= {"竞速", "五连块", "伤脑筋十八块"}, + ['sprintMPH']= {"竞速", "纯净", "纯随机\n无预览\n无暂存"}, + ['dig_10l']= {"挖掘", "10L", "挖掘10行"}, + ['dig_40l']= {"挖掘", "40L", "挖掘40行"}, + ['dig_100l']= {"挖掘", "100L", "挖掘100行"}, + ['dig_400l']= {"挖掘", "400L", "挖掘400行"}, + ['dig_1000l']= {"挖掘", "1000L", "挖掘1000行"}, + ['drought_n']= {"干旱", "100行", "你I没了"}, + ['drought_l']= {"干旱+", "100行", "后 妈 发 牌"}, + ['stack_e']= {"堆积", "简单", "搭积木"}, + ['stack_h']= {"堆积", "困难", "搭积木"}, + ['stack_u']= {"堆积", "极限", "搭积木"}, + ['marathon_n']= {"马拉松", "普通", "200行加速马拉松"}, + ['marathon_h']= {"马拉松", "困难", "200行高速马拉松"}, + ['solo_e']= {"单挑", "简单", "打败机器人"}, + ['solo_n']= {"单挑", "普通", "打败机器人"}, + ['solo_h']= {"单挑", "困难", "打败机器人"}, + ['solo_l']= {"单挑", "疯狂", "打败机器人"}, + ['solo_u']= {"单挑", "极限", "打败机器人"}, + ['techmino49_e']= {"49人混战", "简单", "49人混战,活到最后"}, + ['techmino49_h']= {"49人混战", "困难", "49人混战,活到最后"}, + ['techmino49_u']= {"49人混战", "极限", "49人混战,活到最后"}, + ['techmino99_e']= {"99人混战", "简单", "99人混战,活到最后"}, + ['techmino99_h']= {"99人混战", "困难", "99人混战,活到最后"}, + ['techmino99_u']= {"99人混战", "极限", "99人混战,活到最后"}, + ['round_e']= {"回合制", "简单", "下棋模式"}, + ['round_n']= {"回合制", "普通", "下棋模式"}, + ['round_h']= {"回合制", "困难", "下棋模式"}, + ['round_l']= {"回合制", "疯狂", "下棋模式"}, + ['round_u']= {"回合制", "极限", "下棋模式"}, + ['master_n']= {"大师", "普通", "20G初心者练习"}, + ['master_h']= {"大师", "困难", "上级者20G挑战"}, + ['master_final']= {"大师", "终点", "究极20G:无法触及的终点"}, + ['master_ph']= {"大师", "虚幻", "虚幻20G:???"}, + ['master_ex']= {"宗师", "EX", "成为方块大师"}, + ['rhythm_e']= {"节奏", "简单", "200行低速节奏马拉松"}, + ['rhythm_h']= {"节奏", "困难", "200行中速节奏马拉松"}, + ['rhythm_u']= {"节奏", "极限", "200行高速节奏马拉松"}, + ['blind_e']= {"隐形", "半隐", "不强大脑"}, + ['blind_n']= {"隐形", "全隐", "挺强大脑"}, + ['blind_h']= {"隐形", "瞬隐", "很强大脑"}, + ['blind_l']= {"隐形", "瞬隐+", "超强大脑"}, + ['blind_u']= {"隐形", "啊这", "你准备好了吗"}, + ['blind_wtf']= {"隐形", "不会吧", "还没准备好"}, + ['classic_fast']= {"高速经典", "CTWC", "高速经典"}, + ['survivor_e']= {"生存", "简单", "你能存活多久?"}, + ['survivor_n']= {"生存", "普通", "你能存活多久?"}, + ['survivor_h']= {"生存", "困难", "你能存活多久?"}, + ['survivor_l']= {"生存", "疯狂", "你能存活多久?"}, + ['survivor_u']= {"生存", "极限", "你能存活多久?"}, + ['attacker_h']= {"进攻", "困难", "进攻练习"}, + ['attacker_u']= {"进攻", "极限", "进攻练习"}, + ['defender_n']= {"防守", "普通", "防守练习"}, + ['defender_l']= {"防守", "疯狂", "防守练习"}, + ['dig_h']= {"挖掘", "困难", "挖掘练习"}, + ['dig_u']= {"挖掘", "极限", "挖掘练习"}, + ['bigbang']= {"大爆炸", "简单", "All-spin 入门教程\n施工中"}, + ['c4wtrain_n']= {"中四宽练习", "普通", "无 限 连 击"}, + ['c4wtrain_l']= {"中四宽练习", "疯狂", "无 限 连 击"}, + ['pctrain_n']= {"全清训练", "普通", "简易全清题库,熟悉全清定式的组合"}, + ['pctrain_l']= {"全清训练", "疯狂", "困难PC题库,强算力者进"}, + ['pc_n']= {"全清挑战", "普通", "100行内刷全清"}, + ['pc_h']= {"全清挑战", "困难", "100行内刷全清"}, + ['pc_l']= {"全清挑战", "疯狂", "100行内刷全清"}, + ['pc_inf']= {"无尽全清挑战", "", "你能连续做多少PC?"}, + ['tech_n']= {"科研", "普通", "禁止断B2B"}, + ['tech_n_plus']= {"科研", "普通+", "仅允许回旋与全清"}, + ['tech_h']= {"科研", "困难", "禁止断B2B"}, + ['tech_h_plus']= {"科研", "困难+", "仅允许回旋与全清"}, + ['tech_l']= {"科研", "疯狂", "禁止断B2B"}, + ['tech_l_plus']= {"科研", "疯狂+", "仅允许spin与PC"}, + ['tech_finesse']= {"科研", "极简", "强制最简操作"}, + ['tech_finesse_f']= {"科研", "极简+", "禁止普通消除,强制最简操作"}, + ['tsd_e']= {"T2挑战", "简单", "你能连续做几个T旋双清?"}, + ['tsd_h']= {"T2挑战", "困难", "你能连续做几个T旋双清?"}, + ['tsd_u']= {"T2挑战", "极限", "你能连续做几个T旋双清?"}, + ['backfire_n']= {"自攻自防", "普通", "打出100攻击"}, + ['backfire_h']= {"自攻自防", "困难", "打出100攻击"}, + ['backfire_l']= {"自攻自防", "疯狂", "打出100攻击"}, + ['backfire_u']= {"自攻自防", "极限", "打出100攻击"}, + ['sprintAtk']= {"竞速", "100攻击", "打出100攻击"}, + ['zen']= {"禅", "200", "不限时200行"}, + ['ultra']= {"限时打分", "挑战", "在两分钟内尽可能拿到最多的分数"}, + ['infinite']= {"无尽", "", "沙盒"}, + ['infinite_dig']= {"无尽:挖掘", "", "挖呀挖呀挖"}, - ['sprintFix']= {"竞速", "无移动"}, - ['sprintLock']= {"竞速", "无旋转"}, - ['sprintSmooth']= {"竞速", "无摩擦"}, - ['marathon_bfmax']= {"马拉松", "极限"}, + ['sprintFix']= {"竞速", "无移动"}, + ['sprintLock']= {"竞速", "无旋转"}, + ['sprintSmooth']= {"竞速", "无摩擦"}, + ['marathon_bfmax']= {"马拉松", "极限"}, - ['master_l']= {"大师", "疯狂"}, - ['master_u']= {"大师", "极限"}, - ['custom_clear']= {"自定义", "普通"}, - ['custom_puzzle']= {"自定义", "拼图"}, - }, + ['master_l']= {"大师", "疯狂"}, + ['master_u']= {"大师", "极限"}, + ['custom_clear']= {"自定义", "普通"}, + ['custom_puzzle']= {"自定义", "拼图"}, + }, } \ No newline at end of file diff --git a/parts/language/manual_en.lua b/parts/language/manual_en.lua index 1850175b..38b87005 100644 --- a/parts/language/manual_en.lua +++ b/parts/language/manual_en.lua @@ -1,92 +1,92 @@ return STRING.split([=[ Gameplay: - The system will provide you with tetrominoes (4-block pieces), - with a total of 7 types, and the player needs to control them - (move left and right, rotate 90, 180 or 270 degrees). - each row filled with the field will be cleared. - If there is an opponent, an attack will be sent depending on the line clear type - Play until the end or achieve the level's goal to win. + The system will provide you with tetrominoes (4-block pieces), + with a total of 7 types, and the player needs to control them + (move left and right, rotate 90, 180 or 270 degrees). + each row filled with the field will be cleared. + If there is an opponent, an attack will be sent depending on the line clear type + Play until the end or achieve the level's goal to win. Rotation system: - Uses Techmino's custom rotation system. Too lazy to write the details + Uses Techmino's custom rotation system. Too lazy to write the details Spin detection: - Satisfies "3 corner" rule +2 points - Satisfies "immobile" rule +2 points - - As long as one of the above is true, it is a Spin + Satisfies "3 corner" rule +2 points + Satisfies "immobile" rule +2 points + - As long as one of the above is true, it is a Spin - If the rotation was not using the second check in the kick table, +1 point - - The Spin is a Mini if it only has 2 points; the piece is one of S, Z, J, L, T; AND the line clear did not clear the entire piece. + If the rotation was not using the second check in the kick table, +1 point + - The Spin is a Mini if it only has 2 points; the piece is one of S, Z, J, L, T; AND the line clear did not clear the entire piece. Attack system: - Normal line clears (1 to 3 lines): - Sends (lines cleared -0.5) attack - Special line clears: - Spin sends (lines cleared x2) attack, - - B2B sends extra 1/1/2/4/8 for Spin Single/Double/Triple/Techrash/Techrash+ - - B2B2B sends (lines cleared x0.5), and +1 extra blocking - - Minis reduces the attack to 25% (x0.25 multiplier) - Non-Spin Techrash/Techrash+ sends (lines cleared) attack, - - B2B sends 1 additional line - - B2B2B will have an attack boost of 50% and +1 extra blocking + Normal line clears (1 to 3 lines): + Sends (lines cleared -0.5) attack + Special line clears: + Spin sends (lines cleared x2) attack, + - B2B sends extra 1/1/2/4/8 for Spin Single/Double/Triple/Techrash/Techrash+ + - B2B2B sends (lines cleared x0.5), and +1 extra blocking + - Minis reduces the attack to 25% (x0.25 multiplier) + Non-Spin Techrash/Techrash+ sends (lines cleared) attack, + - B2B sends 1 additional line + - B2B2B will have an attack boost of 50% and +1 extra blocking - Special line clears will the increase B2B gauge, making later special line clears have either a B2B or B2B2B bonus (see below) + Special line clears will the increase B2B gauge, making later special line clears have either a B2B or B2B2B bonus (see below) - Hemi Perfect Clear (a P.C. "with blocks left below". If it's an I clearing 1 line, the remaining blocks must not be player-placed): - Attack +4, Extra Blocking +2 + Hemi Perfect Clear (a P.C. "with blocks left below". If it's an I clearing 1 line, the remaining blocks must not be player-placed): + Attack +4, Extra Blocking +2 - Perfect Clear (aka All Clear): - Sends 8 to 16 (increments within a game by 2 for every PC) OR every other damage above, whichever is higher, - and +2 extra blocking. + Perfect Clear (aka All Clear): + Sends 8 to 16 (increments within a game by 2 for every PC) OR every other damage above, whichever is higher, + and +2 extra blocking. - Combos: All damage above will be given a (combo x25%) bonus, or (combo x15%) for Single clear (capped at 12 combo), - +1 more attack for 3 Combo or more. - After calculating all above, the damage value will be rounded down then sent + Combos: All damage above will be given a (combo x25%) bonus, or (combo x15%) for Single clear (capped at 12 combo), + +1 more attack for 3 Combo or more. + After calculating all above, the damage value will be rounded down then sent Score system: - The better you play, the higher the score. + The better you play, the higher the score. Attack delay: - Attacks from Doubles/Triples take effect the fastest; - Followed by Techrash, Spins, which send slower attacks; - High combos are the slowest; - For B2B or B2B2B, they also increase the attack delay while they increase lines sent; - Minis will greatly increase the delay. + Attacks from Doubles/Triples take effect the fastest; + Followed by Techrash, Spins, which send slower attacks; + High combos are the slowest; + For B2B or B2B2B, they also increase the attack delay while they increase lines sent; + Minis will greatly increase the delay. Countering: - When you send attacks, if there is garbage in queue, - extra blocking will be used first, then attack, countering the earliest attack at a 1:1 ratio. - Any extra blocking you didn't use will be discarded, and finally the remaining attack power will be sent to your opponent. + When you send attacks, if there is garbage in queue, + extra blocking will be used first, then attack, countering the earliest attack at a 1:1 ratio. + Any extra blocking you didn't use will be discarded, and finally the remaining attack power will be sent to your opponent. Back to Back (B2B) gauge: - The B2B gauge ranges from 0 to 1,000. Special line clears are B2B if the gauge is >=50, B2B2B if >800. - A regular line clear -250 - Spin Single/Double/Triple/Techrash/Techrash+ + 50/100/180/800/1000 (x50% if Mini) - Techrash/Techrash+ + 150/200/... - PC when lines cleared in this round >4, +800 - Hemi-PC, +100 - Spin (0 lines) +20. Do note that the B2B gauge cannot exceed 800 using this method. - When gauge is above 800, a drop without clearing lines decreases it by 40, but cannot drop below 800 + The B2B gauge ranges from 0 to 1,000. Special line clears are B2B if the gauge is >=50, B2B2B if >800. + A regular line clear -250 + Spin Single/Double/Triple/Techrash/Techrash+ + 50/100/180/800/1000 (x50% if Mini) + Techrash/Techrash+ + 150/200/... + PC when lines cleared in this round >4, +800 + Hemi-PC, +100 + Spin (0 lines) +20. Do note that the B2B gauge cannot exceed 800 using this method. + When gauge is above 800, a drop without clearing lines decreases it by 40, but cannot drop below 800 Battle Royale modes: - Many players play a game at the same time (against AI bots, not real players). - As players get eliminated, blocks fall faster, and garbage take effect faster, as well as rise faster. - Eliminate other players to gain a badge and the player's badge to increase your attack power. - Players can choose between four attack modes: - 1. Random: Every time you attack, 10% chance to lock onto a random player. - 2. Badges: After you attack or when your target dies, lock onto the player with the most badges. - 3. KOs: After you attack or when your target dies, lock onto the player with the highest field. (Refreshes every second) - 4. Attackers: attack all players locking onto yourself. - Your attack will be sent to all of them. If you are not targetted, you attack a random player (not locking). - When all opponents have been eliminated, the last player in the match is the winner. + Many players play a game at the same time (against AI bots, not real players). + As players get eliminated, blocks fall faster, and garbage take effect faster, as well as rise faster. + Eliminate other players to gain a badge and the player's badge to increase your attack power. + Players can choose between four attack modes: + 1. Random: Every time you attack, 10% chance to lock onto a random player. + 2. Badges: After you attack or when your target dies, lock onto the player with the most badges. + 3. KOs: After you attack or when your target dies, lock onto the player with the highest field. (Refreshes every second) + 4. Attackers: attack all players locking onto yourself. + Your attack will be sent to all of them. If you are not targetted, you attack a random player (not locking). + When all opponents have been eliminated, the last player in the match is the winner. Custom mode: - You can freely adjust most parameters (not including special effects of other game modes). - You can also draw a field to clear or make a template to build. - In build (puzzle) mode, you can toggle template display with Function key: - Cells with a X cannot have blocks; - empty cells can be in any state; - regular colored cells have to be made of the corresponding block; - garbage-colored cells can be any block but not air. - Once you make the shape, you will win. + You can freely adjust most parameters (not including special effects of other game modes). + You can also draw a field to clear or make a template to build. + In build (puzzle) mode, you can toggle template display with Function key: + Cells with a X cannot have blocks; + empty cells can be in any state; + regular colored cells have to be made of the corresponding block; + garbage-colored cells can be any block but not air. + Once you make the shape, you will win. ]=],"\n") diff --git a/parts/language/manual_zh.lua b/parts/language/manual_zh.lua index a8715d26..d8fdadda 100644 --- a/parts/language/manual_zh.lua +++ b/parts/language/manual_zh.lua @@ -1,76 +1,76 @@ return STRING.split([=[ 游戏方法: - 系统会提供的一个个四连骨牌("方块",总共7种) - 玩家需要控制(左右移动和旋转90,180,270度)这些骨牌直到下落到场地底部,锁定 - 每填满场地的一行就会将其消除(如果有对手的话根据消除方式会给对手攻击) - 尝试存活更久,或者完成目标即胜利. + 系统会提供的一个个四连骨牌("方块",总共7种) + 玩家需要控制(左右移动和旋转90,180,270度)这些骨牌直到下落到场地底部,锁定 + 每填满场地的一行就会将其消除(如果有对手的话根据消除方式会给对手攻击) + 尝试存活更久,或者完成目标即胜利. 旋转系统: - 使用Techmino专属旋转系统,具体太复杂并且随时可能更改所以不写在这里,可以去parts/kicklist.lua看 + 使用Techmino专属旋转系统,具体太复杂并且随时可能更改所以不写在这里,可以去parts/kicklist.lua看 spin判定: - 满足三角判定+2分 - 满足不可移动判定+2分 - --满足以上之一就算是spin - 满足非第二个test+1分 - --如果分数只有2,方块是SZJLT之一,并且没有把当前方块整个消除那么就是mini + 满足三角判定+2分 + 满足不可移动判定+2分 + --满足以上之一就算是spin + 满足非第二个test+1分 + --如果分数只有2,方块是SZJLT之一,并且没有把当前方块整个消除那么就是mini 攻击系统: - 普通消除: - 消<4行打出[消行数-0.5]攻击 - 特殊消除: - 如果是spin,打出[2*消行数]攻击, - B2B攻击+[1/1/2/4/8(spin1~5)] - B3B攻击在B2B基础上+消行数*0.5,+1额外抵挡 - mini减至25% - 不是spin但是单次消>=4行,打出[消行数]攻击, - B2B攻击+1 - B3B攻击+50%,+1额外抵挡 - 特殊消除会增加B2B点数,让之后的特殊消除获得B2B(B3B)增益(详细说明见下文) - 半全消("下方有剩余方块"的全消,如果是I消1行则必须不剩余玩家放置的方块):伤害+4,额外抵挡+2 - 全消:全消伤害为8~16(本局内递增2),和上述其他伤害取大,然后+2额外抵挡 - 连击:每次连击给予上述攻击[连击数*25%(上限12连)(如果只消一行就是15%)]的加成,>=3次时再额外加1攻击 - 根据上述规则计算后,向下取整,攻击打出 + 普通消除: + 消<4行打出[消行数-0.5]攻击 + 特殊消除: + 如果是spin,打出[2*消行数]攻击, + B2B攻击+[1/1/2/4/8(spin1~5)] + B3B攻击在B2B基础上+消行数*0.5,+1额外抵挡 + mini减至25% + 不是spin但是单次消>=4行,打出[消行数]攻击, + B2B攻击+1 + B3B攻击+50%,+1额外抵挡 + 特殊消除会增加B2B点数,让之后的特殊消除获得B2B(B3B)增益(详细说明见下文) + 半全消("下方有剩余方块"的全消,如果是I消1行则必须不剩余玩家放置的方块):伤害+4,额外抵挡+2 + 全消:全消伤害为8~16(本局内递增2),和上述其他伤害取大,然后+2额外抵挡 + 连击:每次连击给予上述攻击[连击数*25%(上限12连)(如果只消一行就是15%)]的加成,>=3次时再额外加1攻击 + 根据上述规则计算后,向下取整,攻击打出 分数系统: - 分数计算系统非常复杂,而且随时可能更改所以不写在这里,并且计算只跟消除方式等信息有关,和模式设定无关 + 分数计算系统非常复杂,而且随时可能更改所以不写在这里,并且计算只跟消除方式等信息有关,和模式设定无关 攻击延迟: - 消2/3的攻击生效最快,消四其次,spin攻击生效较慢,高连击生效最慢 - B2B或者B3B增加攻击力的同时也会减缓一点生效速度,mini大幅减缓生效速度 + 消2/3的攻击生效最快,消四其次,spin攻击生效较慢,高连击生效最慢 + B2B或者B3B增加攻击力的同时也会减缓一点生效速度,mini大幅减缓生效速度 抵消逻辑: - 发动攻击时,若缓冲条有攻击则先用额外抵挡再用攻击力1:1抵消最先受到的攻击 - 没有用上的额外抵挡会被丢弃,最后剩下的攻击力会发送给对手 + 发动攻击时,若缓冲条有攻击则先用额外抵挡再用攻击力1:1抵消最先受到的攻击 + 没有用上的额外抵挡会被丢弃,最后剩下的攻击力会发送给对手 back to back(B2B)点数说明: - B2B点数的范围在0~1000,在点数>=50时进行特殊消除为B2B,>800时特殊消除为B3B - 普通消除:-250 - spin1~5:+[50/100/180/800/1000](mini变为原来50%) - 消四/五/六:+[150/200/...] - 本局内消行数>4时全消:+800 - 半全消:+100 - 空spin:+20,此法得到的点数不能超过800 - 当点数在800以上时空放一块-40(不低于800) + B2B点数的范围在0~1000,在点数>=50时进行特殊消除为B2B,>800时特殊消除为B3B + 普通消除:-250 + spin1~5:+[50/100/180/800/1000](mini变为原来50%) + 消四/五/六:+[150/200/...] + 本局内消行数>4时全消:+800 + 半全消:+100 + 空spin:+20,此法得到的点数不能超过800 + 当点数在800以上时空放一块-40(不低于800) 混战模式说明: - 许多玩家同时进行一局游戏(对手都是AI,不是真人). - 随着玩家数量的减少,方块下落/垃圾生效速度/垃圾升起速度都会增加. - 淘汰其它玩家后可以获得一个徽章和该玩家持有的徽章,增强自己的攻击力. - 玩家可选四个攻击模式: - 1.随机:每次攻击后10%随机挑选一个玩家锁定 - 2.最多徽章:攻击后或者锁定玩家死亡时锁定徽章最多的玩家 - 3.最高:攻击后或者锁定玩家死亡时锁定场地最高的玩家(每秒刷新) - 4.反击:攻击所有锁定自己的玩家(攻击AOE),若未被任何人锁定则攻击随机玩家(不锁定) - 坚持到最后的玩家就是胜利者. + 许多玩家同时进行一局游戏(对手都是AI,不是真人). + 随着玩家数量的减少,方块下落/垃圾生效速度/垃圾升起速度都会增加. + 淘汰其它玩家后可以获得一个徽章和该玩家持有的徽章,增强自己的攻击力. + 玩家可选四个攻击模式: + 1.随机:每次攻击后10%随机挑选一个玩家锁定 + 2.最多徽章:攻击后或者锁定玩家死亡时锁定徽章最多的玩家 + 3.最高:攻击后或者锁定玩家死亡时锁定场地最高的玩家(每秒刷新) + 4.反击:攻击所有锁定自己的玩家(攻击AOE),若未被任何人锁定则攻击随机玩家(不锁定) + 坚持到最后的玩家就是胜利者. 自定义模式说明: - 玩家可以自由调整大多数参数(不包括上述各种游戏模式的特殊效果), - 也可以画一个场地去消除或者是作为提示模板来进行拼图模式. - 在拼图模式下可以按功能键切换是否展示提示,其中: - 打"X"的格子不允许有方块; - 空的格子可以是任何状态; - 普通的七种彩色方块必须颜色对应; - 垃圾行方块的位置只要有方块就可以,但是不能是空气. - 玩家拼出画的图后就会判定胜利. + 玩家可以自由调整大多数参数(不包括上述各种游戏模式的特殊效果), + 也可以画一个场地去消除或者是作为提示模板来进行拼图模式. + 在拼图模式下可以按功能键切换是否展示提示,其中: + 打"X"的格子不允许有方块; + 空的格子可以是任何状态; + 普通的七种彩色方块必须颜色对应; + 垃圾行方块的位置只要有方块就可以,但是不能是空气. + 玩家拼出画的图后就会判定胜利. ]=],"\n") \ No newline at end of file diff --git a/parts/list.lua b/parts/list.lua index 0096910e..9bd2db8a 100644 --- a/parts/list.lua +++ b/parts/list.lua @@ -1,324 +1,324 @@ do--title - title={ - { - 53, 60, - 1035, 0, - 964, 218, - 660, 218, - 391, 1300, - 231, 1154, - 415, 218, - 0, 218, - }, - { - 716, 290, - 1429, 290, - 1312, 462, - 875, 489, - 821, 695, - 1148, 712, - 1017, 902, - 761, 924, - 707, 1127, - 1106, 1101, - 1198, 1300, - 465, 1300, - }, - { - 1516, 287, - 2102, 290, - 2036, 464, - 1598, 465, - 1322, 905, - 1395, 1102, - 1819, 1064, - 1743, 1280, - 1286, 1310, - 1106, 902, - }, - { - 2179, 290, - 2411, 290, - 2272, 688, - 2674, 666, - 2801, 290, - 3041, 290, - 2693, 1280, - 2464, 1280, - 2601, 879, - 2199, 897, - 2056, 1280, - 1828, 1280, - }, - { - 3123, 290, - 3480, 290, - 3496, 480, - 3664, 290, - 4017, 294, - 3682, 1280, - 3453, 1280, - 3697, 578, - 3458, 843, - 3304, 842, - 3251, 561, - 3001, 1280, - 2779, 1280, - }, - { - 4088, 290, - 4677, 290, - 4599, 501, - 4426, 502, - 4219, 1069, - 4388, 1070, - 4317, 1280, - 3753, 1280, - 3822, 1068, - 3978, 1068, - 4194, 504, - 4016, 504, - }, - { - 4747, 290, - 4978, 295, - 4921, 464, - 5186, 850, - 5366, 290, - 5599, 295, - 5288, 1280, - 5051, 1280, - 5106, 1102, - 4836, 709, - 4641, 1280, - 4406, 1280, - }, - { - 5814, 290, - 6370, 295, - 6471, 415, - 6238, 1156, - 6058, 1280, - 5507, 1280, - 5404, 1154, - 5635, 416, - -- 5814, 290, - -- 5878, 463, - 5770, 542, - 5617, 1030, - 5676, 1105, - 5995, 1106, - 6100, 1029, - 6255, 541, - 6199, 465, - 5878, 463, - }, - } - for _,C in next,title do - for i=1,#C do - C[i]=C[i]*.1626 - end - end + title={ + { + 53, 60, + 1035, 0, + 964, 218, + 660, 218, + 391, 1300, + 231, 1154, + 415, 218, + 0, 218, + }, + { + 716, 290, + 1429, 290, + 1312, 462, + 875, 489, + 821, 695, + 1148, 712, + 1017, 902, + 761, 924, + 707, 1127, + 1106, 1101, + 1198, 1300, + 465, 1300, + }, + { + 1516, 287, + 2102, 290, + 2036, 464, + 1598, 465, + 1322, 905, + 1395, 1102, + 1819, 1064, + 1743, 1280, + 1286, 1310, + 1106, 902, + }, + { + 2179, 290, + 2411, 290, + 2272, 688, + 2674, 666, + 2801, 290, + 3041, 290, + 2693, 1280, + 2464, 1280, + 2601, 879, + 2199, 897, + 2056, 1280, + 1828, 1280, + }, + { + 3123, 290, + 3480, 290, + 3496, 480, + 3664, 290, + 4017, 294, + 3682, 1280, + 3453, 1280, + 3697, 578, + 3458, 843, + 3304, 842, + 3251, 561, + 3001, 1280, + 2779, 1280, + }, + { + 4088, 290, + 4677, 290, + 4599, 501, + 4426, 502, + 4219, 1069, + 4388, 1070, + 4317, 1280, + 3753, 1280, + 3822, 1068, + 3978, 1068, + 4194, 504, + 4016, 504, + }, + { + 4747, 290, + 4978, 295, + 4921, 464, + 5186, 850, + 5366, 290, + 5599, 295, + 5288, 1280, + 5051, 1280, + 5106, 1102, + 4836, 709, + 4641, 1280, + 4406, 1280, + }, + { + 5814, 290, + 6370, 295, + 6471, 415, + 6238, 1156, + 6058, 1280, + 5507, 1280, + 5404, 1154, + 5635, 416, + -- 5814, 290, + -- 5878, 463, + 5770, 542, + 5617, 1030, + 5676, 1105, + 5995, 1106, + 6100, 1029, + 6255, 541, + 6199, 465, + 5878, 463, + }, + } + for _,C in next,title do + for i=1,#C do + C[i]=C[i]*.1626 + end + end end do--title_fan - title_fan={} - local sin,cos=math.sin,math.cos - for i=1,8 do - local L={} - title_fan[i]=L - for j=1,#title[i]do - L[j]=title[i][j] - end - for j=1,#L,2 do - local x,y=L[j],L[j+1]--0)(without i) - { - { - {4,4,4,3,3,3,0,0,0,0}, - {4,1,6,6,2,3,0,0,0,0}, - {1,1,6,6,2,2,0,0,0,0}, - {1,7,7,7,7,2,0,0,0,0}, - }, - { - {2,7,7,7,7,1,0,0,0,0}, - {2,2,6,6,1,1,0,0,0,0}, - {3,2,6,6,1,4,0,0,0,0}, - {3,3,3,4,4,4,0,0,0,0}, - }, - },--6 piece opener - { - { - {0,0,0,0,0,1,3,5,6,7}, - {0,0,0,0,0,1,3,5,6,7}, - {0,0,0,0,0,1,3,5,6,7}, - {0,0,0,0,0,1,3,5,6,7}, - }, - { - {1,0,0,0,0,0,3,5,6,7}, - {1,0,0,0,0,0,3,5,6,7}, - {1,0,0,0,0,0,3,5,6,7}, - {1,0,0,0,0,0,3,5,6,7}, - }, - { - {1,3,0,0,0,0,0,5,6,7}, - {1,3,0,0,0,0,0,5,6,7}, - {1,3,0,0,0,0,0,5,6,7}, - {1,3,0,0,0,0,0,5,6,7}, - }, - },--4*5 - { - { - {0,0,0,0,0,0,1,3,5,7}, - {0,0,0,0,0,0,7,1,3,5}, - {0,0,0,0,0,0,5,7,1,3}, - {0,0,0,0,0,0,3,5,7,1}, - }, - { - {7,0,0,0,0,0,0,5,3,1}, - {7,0,0,0,0,0,0,5,3,1}, - {7,0,0,0,0,0,0,5,3,1}, - {7,0,0,0,0,0,0,5,3,1}, - }, - { - {1,3,0,0,0,0,0,0,6,5}, - {5,6,0,0,0,0,0,0,3,1}, - {5,7,0,0,0,0,0,0,3,1}, - {1,3,0,0,0,0,0,0,7,5}, - }, - },--4*6 + { + { + {4,4,4,3,3,3,7,0,0,0}, + {4,1,6,6,2,3,7,0,0,0}, + {1,1,6,6,2,2,7,0,0,0}, + {1,7,7,7,7,2,7,0,0,0}, + }, + { + {4,4,4,3,3,3,0,0,0,7}, + {4,1,6,6,2,3,0,0,0,7}, + {1,1,6,6,2,2,0,0,0,7}, + {1,7,7,7,7,2,0,0,0,7}, + }, + { + {2,7,7,7,7,1,7,0,0,0}, + {2,2,6,6,1,1,7,0,0,0}, + {3,2,6,6,1,4,7,0,0,0}, + {3,3,3,4,4,4,7,0,0,0}, + }, + { + {2,7,7,7,7,1,0,0,0,7}, + {2,2,6,6,1,1,0,0,0,7}, + {3,2,6,6,1,4,0,0,0,7}, + {3,3,3,4,4,4,0,0,0,7}, + }, + },--3*4 shape + { + { + {1,1,0,0,0,0,0,3,3,3}, + {5,1,1,0,0,0,0,6,6,3}, + {5,5,2,2,0,0,0,6,6,4}, + {5,2,2,0,0,0,0,4,4,4}, + }, + { + {1,1,0,0,0,0,0,4,4,4}, + {5,1,1,0,0,0,0,4,6,6}, + {5,5,2,2,0,0,0,3,6,6}, + {5,2,2,0,0,0,0,3,3,3}, + }, + { + {3,3,3,1,1,0,0,0,0,0}, + {6,6,3,5,1,1,0,0,0,0}, + {6,6,4,5,5,2,2,0,0,0}, + {4,4,4,5,2,2,0,0,0,0}, + }, + { + {4,4,4,1,1,0,0,0,0,0}, + {4,6,6,5,1,1,0,0,0,0}, + {3,6,6,5,5,2,2,0,0,0}, + {3,3,3,5,2,2,0,0,0,0}, + }, + },--7 piece opener(right>)(without i) + { + { + {4,4,4,3,3,3,0,0,0,0}, + {4,1,6,6,2,3,0,0,0,0}, + {1,1,6,6,2,2,0,0,0,0}, + {1,7,7,7,7,2,0,0,0,0}, + }, + { + {2,7,7,7,7,1,0,0,0,0}, + {2,2,6,6,1,1,0,0,0,0}, + {3,2,6,6,1,4,0,0,0,0}, + {3,3,3,4,4,4,0,0,0,0}, + }, + },--6 piece opener + { + { + {0,0,0,0,0,1,3,5,6,7}, + {0,0,0,0,0,1,3,5,6,7}, + {0,0,0,0,0,1,3,5,6,7}, + {0,0,0,0,0,1,3,5,6,7}, + }, + { + {1,0,0,0,0,0,3,5,6,7}, + {1,0,0,0,0,0,3,5,6,7}, + {1,0,0,0,0,0,3,5,6,7}, + {1,0,0,0,0,0,3,5,6,7}, + }, + { + {1,3,0,0,0,0,0,5,6,7}, + {1,3,0,0,0,0,0,5,6,7}, + {1,3,0,0,0,0,0,5,6,7}, + {1,3,0,0,0,0,0,5,6,7}, + }, + },--4*5 + { + { + {0,0,0,0,0,0,1,3,5,7}, + {0,0,0,0,0,0,7,1,3,5}, + {0,0,0,0,0,0,5,7,1,3}, + {0,0,0,0,0,0,3,5,7,1}, + }, + { + {7,0,0,0,0,0,0,5,3,1}, + {7,0,0,0,0,0,0,5,3,1}, + {7,0,0,0,0,0,0,5,3,1}, + {7,0,0,0,0,0,0,5,3,1}, + }, + { + {1,3,0,0,0,0,0,0,6,5}, + {5,6,0,0,0,0,0,0,3,1}, + {5,7,0,0,0,0,0,0,3,1}, + {1,3,0,0,0,0,0,0,7,5}, + }, + },--4*6 } \ No newline at end of file diff --git a/parts/modes/PClist.lua b/parts/modes/PClist.lua index 1d791b5c..22275292 100644 --- a/parts/modes/PClist.lua +++ b/parts/modes/PClist.lua @@ -1,16 +1,16 @@ return{ - --3*4 shape - {{1,3,3},{1,3,4},{1,5,3},{3,1,3},{3,1,4},{3,2,4},{3,3,2},{3,3,5},{3,3,6},{3,3,7},{3,4,1},{3,4,5},{3,4,6},{3,5,3},{3,5,4},{3,5,5},{3,6,3},{3,6,4},{3,7,3},{3,7,4},{5,3,4},{5,3,5},{5,5,1},{5,5,3},{5,7,3},{6,3,3},{6,3,4},{6,6,7},{6,7,6},{7,3,3},{7,3,4},{7,5,3},{7,6,6},{7,7,7}}, + --3*4 shape + {{1,3,3},{1,3,4},{1,5,3},{3,1,3},{3,1,4},{3,2,4},{3,3,2},{3,3,5},{3,3,6},{3,3,7},{3,4,1},{3,4,5},{3,4,6},{3,5,3},{3,5,4},{3,5,5},{3,6,3},{3,6,4},{3,7,3},{3,7,4},{5,3,4},{5,3,5},{5,5,1},{5,5,3},{5,7,3},{6,3,3},{6,3,4},{6,6,7},{6,7,6},{7,3,3},{7,3,4},{7,5,3},{7,6,6},{7,7,7}}, - --7 piece opener (right>) - {{5,3,4,4},{5,3,7,7},{5,7,4,4},{4,2,4,4},{3,5,4,4},{3,4,5,4},{3,3,7,4},{7,5,4,4},{1,5,1,1},{1,5,5,5},{1,5,7,4},{1,2,4,5},{1,4,5,5},{1,4,5,2},{1,4,2,5},{1,4,4,4},{5,1,4,5},{5,5,4,1},{5,5,4,2},{5,5,4,4},{5,4,5,4},{5,4,4,5},{5,4,4,3},{5,7,4,6},{5,7,4,3},{2,5,4,4},{6,4,4,4},{6,7,4,6},{4,1,2,5},{4,1,4,4},{4,5,4,5},{4,5,7,7},{4,6,4,4},{4,4,6,4},{4,4,3,5},{4,4,3,6},{4,3,4,5},{4,3,4,6},{4,7,3,4},{4,7,7,5},{3,1,4,4},{3,1,4,3},{3,1,3,4},{3,5,5,4},{3,5,4,5},{3,5,7,7},{3,2,5,2},{3,2,4,4},{3,6,4,4},{3,6,3,3},{3,4,1,3},{3,4,4,5},{3,4,4,6},{3,4,3,7},{3,3,6,3},{3,7,5,7},{3,7,4,3},{3,7,3,4},{7,5,4,6},{7,5,4,3},{7,5,3,4},{7,5,7,1},{7,6,4,6},{7,4,1,5},{7,4,5,6},{7,4,3,4},{7,4,7,5},{7,3,1,5},{7,3,5,7},{7,3,4,4},{7,3,3,4},{7,3,7,5},{7,7,4,5},{7,7,7,4},{1,1,5,2},{1,1,7,4},{1,5,1,2},{1,5,1,3},{1,5,5,2},{1,5,2,1},{1,5,2,3},{1,5,6,3},{1,5,6,7},{1,5,4,1},{1,5,4,5},{1,5,4,2},{1,5,4,3},{1,5,4,7},{1,5,3,1},{1,5,3,4},{1,5,7,2},{1,5,7,6},{1,5,7,7},{1,2,5,1},{1,2,5,4},{1,2,7,4},{1,4,1,5},{1,4,5,1},{1,4,5,4},{1,4,6,5},{1,4,4,3},{1,4,3,3},{1,3,1,2},{1,3,5,2},{1,3,4,4},{1,3,4,3},{1,3,3,4},{1,7,1,4},{1,7,5,6},{1,7,5,4},{1,7,5,3},{1,7,5,7},{1,7,2,3},{1,7,6,4},{1,7,4,1},{1,7,4,5},{1,7,4,7},{1,7,3,1},{1,7,7,4},{5,1,5,5},{5,1,5,2},{5,1,5,4},{5,1,2,3},{5,1,6,3},{5,1,4,1},{5,1,4,2},{5,1,4,7},{5,1,7,2},{5,1,7,4},{5,5,1,5},{5,5,1,2},{5,5,1,4},{5,5,5,1},{5,5,5,2},{5,5,5,4},{5,5,5,7},{5,5,2,1},{5,5,2,5},{5,5,6,7},{5,5,4,5},{5,5,4,3},{5,5,3,1},{5,5,3,4},{5,5,7,5},{5,5,7,6},{5,2,1,3},{5,2,5,4},{5,2,4,5},{5,2,3,1},{5,2,3,6},{5,2,7,1},{5,6,1,3},{5,6,5,7},{5,6,6,1},{5,4,1,5},{5,4,1,7},{5,4,5,1},{5,4,5,5},{5,4,5,2},{5,4,5,3},{5,4,2,5},{5,4,4,1},{5,4,4,4},{5,4,3,1},{5,4,3,5},{5,4,3,4},{5,4,7,1},{5,3,5,4},{5,3,5,3},{5,3,2,2},{5,3,6,6},{5,3,4,1},{5,3,4,5},{5,3,4,3},{5,3,3,1},{5,3,3,4},{5,3,3,3},{5,7,1,2},{5,7,1,4},{5,7,1,3},{5,7,5,5},{5,7,5,7},{5,7,2,1},{5,7,6,4},{5,7,6,7},{5,7,4,1},{5,7,4,2},{5,7,4,7},{5,7,3,1},{5,7,3,2},{5,7,3,6},{5,7,3,4},{5,7,3,7},{5,7,7,1},{5,7,7,6},{5,7,7,4},{5,7,7,3},{2,1,5,1},{2,1,4,5},{2,1,7,4},{2,5,1,1},{2,5,4,5},{2,5,3,6},{2,4,1,5},{2,4,4,4},{2,4,4,3},{2,3,5,6},{2,7,1,4},{2,7,5,5},{2,7,4,1},{2,7,3,7},{2,7,7,3},{6,5,6,1},{6,5,3,1},{6,6,5,1},{6,6,4,5},{6,6,7,4},{6,4,6,5},{6,4,7,5},{6,3,4,3},{6,3,3,4},{6,7,6,4},{6,7,4,1},{6,7,4,5},{6,7,4,7},{6,7,7,4},{4,1,1,5},{4,1,5,1},{4,1,5,5},{4,1,5,2},{4,1,5,7},{4,1,6,5},{4,1,4,3},{4,1,3,4},{4,1,3,3},{4,1,7,5},{4,5,5,4},{4,5,4,1},{4,5,4,4},{4,5,4,3},{4,5,3,1},{4,5,3,5},{4,2,1,5},{4,2,4,3},{4,2,3,4},{4,6,6,5},{4,6,4,3},{4,6,3,4},{4,4,1,4},{4,4,1,3},{4,4,5,1},{4,4,5,4},{4,4,5,3},{4,4,2,4},{4,4,4,1},{4,4,4,5},{4,4,4,6},{4,4,7,4},{4,4,7,3},{4,3,6,4},{4,3,4,7},{4,3,3,5},{4,3,7,4},{4,7,1,5},{4,7,5,6},{4,7,5,7},{4,7,2,1},{4,7,2,5},{4,7,6,5},{4,7,4,4},{4,7,4,3},{3,1,1,2},{3,1,5,1},{3,1,5,2},{3,1,2,1},{3,1,6,5},{3,1,6,7},{3,1,7,6},{3,5,1,2},{3,5,5,1},{3,5,5,6},{3,5,5,3},{3,5,2,1},{3,5,2,2},{3,5,6,5},{3,5,6,6},{3,5,4,1},{3,5,4,3},{3,5,3,1},{3,5,3,5},{3,5,3,4},{3,5,3,3},{3,2,1,5},{3,2,5,1},{3,2,2,5},{3,6,1,5},{3,6,1,7},{3,6,5,5},{3,6,5,6},{3,6,6,5},{3,6,4,3},{3,6,3,4},{3,4,5,3},{3,4,2,4},{3,4,6,4},{3,4,6,3},{3,4,3,1},{3,4,3,5},{3,4,3,2},{3,4,3,6},{3,4,7,3},{3,3,1,4},{3,3,5,1},{3,3,5,4},{3,3,5,3},{3,3,6,4},{3,3,4,1},{3,3,4,5},{3,3,4,2},{3,3,4,6},{3,3,4,7},{3,3,3,1},{3,3,3,5},{3,3,3,6},{3,7,1,5},{3,7,5,1},{3,7,5,2},{3,7,2,5},{3,7,6,5},{3,7,7,5},{7,1,1,4},{7,1,5,6},{7,1,5,4},{7,1,5,3},{7,1,5,7},{7,1,2,3},{7,1,6,4},{7,1,4,1},{7,1,4,5},{7,1,4,7},{7,1,3,1},{7,1,7,4},{7,5,1,2},{7,5,1,6},{7,5,1,4},{7,5,1,3},{7,5,1,7},{7,5,5,5},{7,5,5,7},{7,5,2,1},{7,5,6,4},{7,5,6,7},{7,5,4,1},{7,5,4,2},{7,5,4,7},{7,5,3,1},{7,5,3,2},{7,5,3,6},{7,5,3,7},{7,5,7,6},{7,5,7,4},{7,5,7,3},{7,2,1,4},{7,2,1,3},{7,2,5,5},{7,2,4,1},{7,2,3,7},{7,2,7,3},{7,6,1,4},{7,6,5,4},{7,6,6,4},{7,6,4,1},{7,6,4,5},{7,6,4,7},{7,6,7,4},{7,4,5,1},{7,4,5,2},{7,4,5,7},{7,4,2,1},{7,4,2,5},{7,4,6,5},{7,4,4,4},{7,4,4,3},{7,3,5,1},{7,3,5,2},{7,3,5,6},{7,3,5,4},{7,3,2,5},{7,3,2,7},{7,3,6,1},{7,3,6,5},{7,3,4,3},{7,3,7,2},{7,3,7,6},{7,7,1,4},{7,7,5,1},{7,7,5,6},{7,7,5,4},{7,7,5,3},{7,7,2,3},{7,7,6,4},{7,7,6,3},{7,7,4,7},{7,7,3,6}}, + --7 piece opener (right>) + {{5,3,4,4},{5,3,7,7},{5,7,4,4},{4,2,4,4},{3,5,4,4},{3,4,5,4},{3,3,7,4},{7,5,4,4},{1,5,1,1},{1,5,5,5},{1,5,7,4},{1,2,4,5},{1,4,5,5},{1,4,5,2},{1,4,2,5},{1,4,4,4},{5,1,4,5},{5,5,4,1},{5,5,4,2},{5,5,4,4},{5,4,5,4},{5,4,4,5},{5,4,4,3},{5,7,4,6},{5,7,4,3},{2,5,4,4},{6,4,4,4},{6,7,4,6},{4,1,2,5},{4,1,4,4},{4,5,4,5},{4,5,7,7},{4,6,4,4},{4,4,6,4},{4,4,3,5},{4,4,3,6},{4,3,4,5},{4,3,4,6},{4,7,3,4},{4,7,7,5},{3,1,4,4},{3,1,4,3},{3,1,3,4},{3,5,5,4},{3,5,4,5},{3,5,7,7},{3,2,5,2},{3,2,4,4},{3,6,4,4},{3,6,3,3},{3,4,1,3},{3,4,4,5},{3,4,4,6},{3,4,3,7},{3,3,6,3},{3,7,5,7},{3,7,4,3},{3,7,3,4},{7,5,4,6},{7,5,4,3},{7,5,3,4},{7,5,7,1},{7,6,4,6},{7,4,1,5},{7,4,5,6},{7,4,3,4},{7,4,7,5},{7,3,1,5},{7,3,5,7},{7,3,4,4},{7,3,3,4},{7,3,7,5},{7,7,4,5},{7,7,7,4},{1,1,5,2},{1,1,7,4},{1,5,1,2},{1,5,1,3},{1,5,5,2},{1,5,2,1},{1,5,2,3},{1,5,6,3},{1,5,6,7},{1,5,4,1},{1,5,4,5},{1,5,4,2},{1,5,4,3},{1,5,4,7},{1,5,3,1},{1,5,3,4},{1,5,7,2},{1,5,7,6},{1,5,7,7},{1,2,5,1},{1,2,5,4},{1,2,7,4},{1,4,1,5},{1,4,5,1},{1,4,5,4},{1,4,6,5},{1,4,4,3},{1,4,3,3},{1,3,1,2},{1,3,5,2},{1,3,4,4},{1,3,4,3},{1,3,3,4},{1,7,1,4},{1,7,5,6},{1,7,5,4},{1,7,5,3},{1,7,5,7},{1,7,2,3},{1,7,6,4},{1,7,4,1},{1,7,4,5},{1,7,4,7},{1,7,3,1},{1,7,7,4},{5,1,5,5},{5,1,5,2},{5,1,5,4},{5,1,2,3},{5,1,6,3},{5,1,4,1},{5,1,4,2},{5,1,4,7},{5,1,7,2},{5,1,7,4},{5,5,1,5},{5,5,1,2},{5,5,1,4},{5,5,5,1},{5,5,5,2},{5,5,5,4},{5,5,5,7},{5,5,2,1},{5,5,2,5},{5,5,6,7},{5,5,4,5},{5,5,4,3},{5,5,3,1},{5,5,3,4},{5,5,7,5},{5,5,7,6},{5,2,1,3},{5,2,5,4},{5,2,4,5},{5,2,3,1},{5,2,3,6},{5,2,7,1},{5,6,1,3},{5,6,5,7},{5,6,6,1},{5,4,1,5},{5,4,1,7},{5,4,5,1},{5,4,5,5},{5,4,5,2},{5,4,5,3},{5,4,2,5},{5,4,4,1},{5,4,4,4},{5,4,3,1},{5,4,3,5},{5,4,3,4},{5,4,7,1},{5,3,5,4},{5,3,5,3},{5,3,2,2},{5,3,6,6},{5,3,4,1},{5,3,4,5},{5,3,4,3},{5,3,3,1},{5,3,3,4},{5,3,3,3},{5,7,1,2},{5,7,1,4},{5,7,1,3},{5,7,5,5},{5,7,5,7},{5,7,2,1},{5,7,6,4},{5,7,6,7},{5,7,4,1},{5,7,4,2},{5,7,4,7},{5,7,3,1},{5,7,3,2},{5,7,3,6},{5,7,3,4},{5,7,3,7},{5,7,7,1},{5,7,7,6},{5,7,7,4},{5,7,7,3},{2,1,5,1},{2,1,4,5},{2,1,7,4},{2,5,1,1},{2,5,4,5},{2,5,3,6},{2,4,1,5},{2,4,4,4},{2,4,4,3},{2,3,5,6},{2,7,1,4},{2,7,5,5},{2,7,4,1},{2,7,3,7},{2,7,7,3},{6,5,6,1},{6,5,3,1},{6,6,5,1},{6,6,4,5},{6,6,7,4},{6,4,6,5},{6,4,7,5},{6,3,4,3},{6,3,3,4},{6,7,6,4},{6,7,4,1},{6,7,4,5},{6,7,4,7},{6,7,7,4},{4,1,1,5},{4,1,5,1},{4,1,5,5},{4,1,5,2},{4,1,5,7},{4,1,6,5},{4,1,4,3},{4,1,3,4},{4,1,3,3},{4,1,7,5},{4,5,5,4},{4,5,4,1},{4,5,4,4},{4,5,4,3},{4,5,3,1},{4,5,3,5},{4,2,1,5},{4,2,4,3},{4,2,3,4},{4,6,6,5},{4,6,4,3},{4,6,3,4},{4,4,1,4},{4,4,1,3},{4,4,5,1},{4,4,5,4},{4,4,5,3},{4,4,2,4},{4,4,4,1},{4,4,4,5},{4,4,4,6},{4,4,7,4},{4,4,7,3},{4,3,6,4},{4,3,4,7},{4,3,3,5},{4,3,7,4},{4,7,1,5},{4,7,5,6},{4,7,5,7},{4,7,2,1},{4,7,2,5},{4,7,6,5},{4,7,4,4},{4,7,4,3},{3,1,1,2},{3,1,5,1},{3,1,5,2},{3,1,2,1},{3,1,6,5},{3,1,6,7},{3,1,7,6},{3,5,1,2},{3,5,5,1},{3,5,5,6},{3,5,5,3},{3,5,2,1},{3,5,2,2},{3,5,6,5},{3,5,6,6},{3,5,4,1},{3,5,4,3},{3,5,3,1},{3,5,3,5},{3,5,3,4},{3,5,3,3},{3,2,1,5},{3,2,5,1},{3,2,2,5},{3,6,1,5},{3,6,1,7},{3,6,5,5},{3,6,5,6},{3,6,6,5},{3,6,4,3},{3,6,3,4},{3,4,5,3},{3,4,2,4},{3,4,6,4},{3,4,6,3},{3,4,3,1},{3,4,3,5},{3,4,3,2},{3,4,3,6},{3,4,7,3},{3,3,1,4},{3,3,5,1},{3,3,5,4},{3,3,5,3},{3,3,6,4},{3,3,4,1},{3,3,4,5},{3,3,4,2},{3,3,4,6},{3,3,4,7},{3,3,3,1},{3,3,3,5},{3,3,3,6},{3,7,1,5},{3,7,5,1},{3,7,5,2},{3,7,2,5},{3,7,6,5},{3,7,7,5},{7,1,1,4},{7,1,5,6},{7,1,5,4},{7,1,5,3},{7,1,5,7},{7,1,2,3},{7,1,6,4},{7,1,4,1},{7,1,4,5},{7,1,4,7},{7,1,3,1},{7,1,7,4},{7,5,1,2},{7,5,1,6},{7,5,1,4},{7,5,1,3},{7,5,1,7},{7,5,5,5},{7,5,5,7},{7,5,2,1},{7,5,6,4},{7,5,6,7},{7,5,4,1},{7,5,4,2},{7,5,4,7},{7,5,3,1},{7,5,3,2},{7,5,3,6},{7,5,3,7},{7,5,7,6},{7,5,7,4},{7,5,7,3},{7,2,1,4},{7,2,1,3},{7,2,5,5},{7,2,4,1},{7,2,3,7},{7,2,7,3},{7,6,1,4},{7,6,5,4},{7,6,6,4},{7,6,4,1},{7,6,4,5},{7,6,4,7},{7,6,7,4},{7,4,5,1},{7,4,5,2},{7,4,5,7},{7,4,2,1},{7,4,2,5},{7,4,6,5},{7,4,4,4},{7,4,4,3},{7,3,5,1},{7,3,5,2},{7,3,5,6},{7,3,5,4},{7,3,2,5},{7,3,2,7},{7,3,6,1},{7,3,6,5},{7,3,4,3},{7,3,7,2},{7,3,7,6},{7,7,1,4},{7,7,5,1},{7,7,5,6},{7,7,5,4},{7,7,5,3},{7,7,2,3},{7,7,6,4},{7,7,6,3},{7,7,4,7},{7,7,3,6}}, - --6 piece opener - {{1,1,3,4},{1,1,4,3},{1,2,5,3},{1,2,5,4},{1,3,4,7},{1,3,5,5},{1,3,7,3},{1,3,7,4},{1,4,1,4},{1,4,4,6},{1,5,2,3},{1,5,3,2},{1,5,3,5},{1,5,4,7},{1,5,5,2},{1,5,5,4},{1,5,5,5},{1,5,7,3},{1,5,7,4},{1,6,3,3},{1,6,5,3},{1,7,3,3},{1,7,3,4},{1,7,5,3},{1,7,5,4},{3,1,3,7},{3,1,4,7},{3,1,5,5},{3,1,6,3},{3,1,7,3},{3,1,7,4},{3,2,2,3},{3,2,3,2},{3,2,3,6},{3,2,4,5},{3,2,4,7},{3,2,5,5},{3,2,6,3},{3,2,6,4},{3,2,7,4},{3,3,1,5},{3,3,2,6},{3,3,2,7},{3,3,3,3},{3,3,3,4},{3,3,4,3},{3,3,4,4},{3,3,5,3},{3,3,5,4},{3,3,6,1},{3,3,6,6},{3,3,6,7},{3,3,7,2},{3,3,7,5},{3,3,7,6},{3,3,7,7},{3,4,1,2},{3,4,1,5},{3,4,1,7},{3,4,2,1},{3,4,2,5},{3,4,2,7},{3,4,3,3},{3,4,3,4},{3,4,4,3},{3,4,4,4},{3,4,5,3},{3,4,5,4},{3,4,5,7},{3,4,6,1},{3,4,6,2},{3,4,6,7},{3,4,7,1},{3,4,7,2},{3,4,7,5},{3,4,7,6},{3,5,1,2},{3,5,2,3},{3,5,2,5},{3,5,3,2},{3,5,3,3},{3,5,3,4},{3,5,4,3},{3,5,4,6},{3,5,4,7},{3,5,5,5},{3,5,5,7},{3,5,6,4},{3,5,7,3},{3,5,7,4},{3,5,7,5},{3,6,1,3},{3,6,2,3},{3,6,2,4},{3,6,3,1},{3,6,3,5},{3,6,3,6},{3,6,3,7},{3,6,4,2},{3,6,4,7},{3,6,5,4},{3,6,6,3},{3,6,6,4},{3,6,7,3},{3,6,7,4},{3,7,1,3},{3,7,1,4},{3,7,2,4},{3,7,3,2},{3,7,3,5},{3,7,3,6},{3,7,3,7},{3,7,4,1},{3,7,4,2},{3,7,4,5},{3,7,4,6},{3,7,5,3},{3,7,5,4},{3,7,5,5},{3,7,6,3},{3,7,6,4},{3,7,7,3},{3,7,7,4},{5,1,2,3},{5,1,3,2},{5,1,3,4},{5,1,4,1},{5,1,4,7},{5,1,5,4},{5,1,5,5},{5,1,7,4},{5,3,1,2},{5,3,1,4},{5,3,2,5},{5,3,3,3},{5,3,3,4},{5,3,3,6},{5,3,4,3},{5,3,5,2},{5,3,5,4},{5,3,5,5},{5,3,5,7},{5,3,7,4},{5,3,7,5},{5,5,1,2},{5,5,1,4},{5,5,3,2},{5,5,3,3},{5,5,3,4},{5,5,3,5},{5,5,3,7},{5,5,5,1},{5,5,5,5},{5,5,6,3},{5,5,6,7},{5,5,7,1},{5,5,7,3},{5,5,7,6},{5,6,3,5},{5,6,3,6},{5,6,3,7},{5,6,5,3},{5,6,6,3},{5,6,7,3},{5,7,1,4},{5,7,3,4},{5,7,3,5},{5,7,5,1},{5,7,5,3},{5,7,5,6},{5,7,6,3},{5,7,7,3},{6,1,3,3},{6,3,3,5},{6,3,3,6},{6,3,3,7},{6,3,4,7},{6,3,6,3},{6,3,6,4},{6,3,7,3},{6,3,7,4},{6,5,3,5},{6,5,3,6},{6,5,3,7},{6,5,6,3},{6,5,7,3},{6,6,3,3},{6,6,3,4},{6,6,5,3},{6,6,6,6},{6,6,7,7},{6,7,3,3},{6,7,3,4},{6,7,5,3},{6,7,6,7},{6,7,7,6},{7,1,3,3},{7,1,3,4},{7,1,5,3},{7,1,5,4},{7,3,1,3},{7,3,1,4},{7,3,2,4},{7,3,3,2},{7,3,3,5},{7,3,3,6},{7,3,3,7},{7,3,4,1},{7,3,4,2},{7,3,4,5},{7,3,4,6},{7,3,5,3},{7,3,5,4},{7,3,5,5},{7,3,6,3},{7,3,6,4},{7,3,7,3},{7,3,7,4},{7,5,1,4},{7,5,3,4},{7,5,3,5},{7,5,5,1},{7,5,5,3},{7,5,5,6},{7,5,6,3},{7,5,7,3},{7,6,3,3},{7,6,3,4},{7,6,5,3},{7,6,6,7},{7,6,7,6},{7,7,3,3},{7,7,3,4},{7,7,5,3},{7,7,6,6},{7,7,7,7}}, + --6 piece opener + {{1,1,3,4},{1,1,4,3},{1,2,5,3},{1,2,5,4},{1,3,4,7},{1,3,5,5},{1,3,7,3},{1,3,7,4},{1,4,1,4},{1,4,4,6},{1,5,2,3},{1,5,3,2},{1,5,3,5},{1,5,4,7},{1,5,5,2},{1,5,5,4},{1,5,5,5},{1,5,7,3},{1,5,7,4},{1,6,3,3},{1,6,5,3},{1,7,3,3},{1,7,3,4},{1,7,5,3},{1,7,5,4},{3,1,3,7},{3,1,4,7},{3,1,5,5},{3,1,6,3},{3,1,7,3},{3,1,7,4},{3,2,2,3},{3,2,3,2},{3,2,3,6},{3,2,4,5},{3,2,4,7},{3,2,5,5},{3,2,6,3},{3,2,6,4},{3,2,7,4},{3,3,1,5},{3,3,2,6},{3,3,2,7},{3,3,3,3},{3,3,3,4},{3,3,4,3},{3,3,4,4},{3,3,5,3},{3,3,5,4},{3,3,6,1},{3,3,6,6},{3,3,6,7},{3,3,7,2},{3,3,7,5},{3,3,7,6},{3,3,7,7},{3,4,1,2},{3,4,1,5},{3,4,1,7},{3,4,2,1},{3,4,2,5},{3,4,2,7},{3,4,3,3},{3,4,3,4},{3,4,4,3},{3,4,4,4},{3,4,5,3},{3,4,5,4},{3,4,5,7},{3,4,6,1},{3,4,6,2},{3,4,6,7},{3,4,7,1},{3,4,7,2},{3,4,7,5},{3,4,7,6},{3,5,1,2},{3,5,2,3},{3,5,2,5},{3,5,3,2},{3,5,3,3},{3,5,3,4},{3,5,4,3},{3,5,4,6},{3,5,4,7},{3,5,5,5},{3,5,5,7},{3,5,6,4},{3,5,7,3},{3,5,7,4},{3,5,7,5},{3,6,1,3},{3,6,2,3},{3,6,2,4},{3,6,3,1},{3,6,3,5},{3,6,3,6},{3,6,3,7},{3,6,4,2},{3,6,4,7},{3,6,5,4},{3,6,6,3},{3,6,6,4},{3,6,7,3},{3,6,7,4},{3,7,1,3},{3,7,1,4},{3,7,2,4},{3,7,3,2},{3,7,3,5},{3,7,3,6},{3,7,3,7},{3,7,4,1},{3,7,4,2},{3,7,4,5},{3,7,4,6},{3,7,5,3},{3,7,5,4},{3,7,5,5},{3,7,6,3},{3,7,6,4},{3,7,7,3},{3,7,7,4},{5,1,2,3},{5,1,3,2},{5,1,3,4},{5,1,4,1},{5,1,4,7},{5,1,5,4},{5,1,5,5},{5,1,7,4},{5,3,1,2},{5,3,1,4},{5,3,2,5},{5,3,3,3},{5,3,3,4},{5,3,3,6},{5,3,4,3},{5,3,5,2},{5,3,5,4},{5,3,5,5},{5,3,5,7},{5,3,7,4},{5,3,7,5},{5,5,1,2},{5,5,1,4},{5,5,3,2},{5,5,3,3},{5,5,3,4},{5,5,3,5},{5,5,3,7},{5,5,5,1},{5,5,5,5},{5,5,6,3},{5,5,6,7},{5,5,7,1},{5,5,7,3},{5,5,7,6},{5,6,3,5},{5,6,3,6},{5,6,3,7},{5,6,5,3},{5,6,6,3},{5,6,7,3},{5,7,1,4},{5,7,3,4},{5,7,3,5},{5,7,5,1},{5,7,5,3},{5,7,5,6},{5,7,6,3},{5,7,7,3},{6,1,3,3},{6,3,3,5},{6,3,3,6},{6,3,3,7},{6,3,4,7},{6,3,6,3},{6,3,6,4},{6,3,7,3},{6,3,7,4},{6,5,3,5},{6,5,3,6},{6,5,3,7},{6,5,6,3},{6,5,7,3},{6,6,3,3},{6,6,3,4},{6,6,5,3},{6,6,6,6},{6,6,7,7},{6,7,3,3},{6,7,3,4},{6,7,5,3},{6,7,6,7},{6,7,7,6},{7,1,3,3},{7,1,3,4},{7,1,5,3},{7,1,5,4},{7,3,1,3},{7,3,1,4},{7,3,2,4},{7,3,3,2},{7,3,3,5},{7,3,3,6},{7,3,3,7},{7,3,4,1},{7,3,4,2},{7,3,4,5},{7,3,4,6},{7,3,5,3},{7,3,5,4},{7,3,5,5},{7,3,6,3},{7,3,6,4},{7,3,7,3},{7,3,7,4},{7,5,1,4},{7,5,3,4},{7,5,3,5},{7,5,5,1},{7,5,5,3},{7,5,5,6},{7,5,6,3},{7,5,7,3},{7,6,3,3},{7,6,3,4},{7,6,5,3},{7,6,6,7},{7,6,7,6},{7,7,3,3},{7,7,3,4},{7,7,5,3},{7,7,6,6},{7,7,7,7}}, - --4*5 - {{7,3,5,1,2},{7,3,1,5,5},{7,3,1,5,4},{7,3,1,5,3},{2,3,7,6,4},{2,3,7,6,3},{3,2,7,6,4},{3,2,7,6,3},{3,2,6,7,4},{3,2,6,7,3},{7,1,3,5,5},{7,1,3,5,4},{7,1,3,5,3},{5,7,1,2,4},{5,7,1,2,3},{1,7,3,5,5},{5,1,7,2,3},{1,7,5,3,5},{1,7,5,3,2},{1,5,7,2,3},{7,1,5,3,5},{7,1,5,3,4},{7,1,5,3,3},{7,1,5,3,2},{1,5,2,7,3},{7,5,1,3,4},{5,1,2,7,4},{7,5,1,3,3},{5,1,2,7,3},{7,5,1,3,2},{7,5,3,1,5},{7,5,3,1,4},{7,5,3,1,3},{7,5,3,1,2},{5,7,3,2,5},{5,7,3,2,7},{5,7,3,2,4},{5,7,2,3,5},{5,7,2,3,7},{5,7,2,3,2},{5,2,7,3,5},{5,2,7,3,7},{5,2,7,3,3},{5,2,7,3,2},{2,1,5,7,4},{2,5,7,3,7},{2,5,7,3,3},{3,6,2,7,4},{3,6,2,7,3},{6,3,2,7,4},{6,3,2,7,3},{6,3,7,2,3},{3,6,7,2,4},{3,6,7,2,3},{3,7,6,2,4},{3,7,6,2,3},{1,2,7,5,4},{1,2,7,5,3},{2,7,1,5,4},{2,7,1,5,3},{2,7,5,1,4},{7,2,5,1,4},{7,2,5,1,3},{7,2,1,5,4},{7,2,1,5,3},{3,7,2,6,4},{3,7,2,6,3},{7,5,1,2,4},{7,3,2,1,3},{7,5,1,2,3},{7,3,1,2,4},{7,3,1,2,3},{7,1,3,2,4},{2,5,3,7,5},{2,5,3,7,3},{5,2,3,7,3},{5,3,2,7,5},{5,3,2,7,3},{5,3,7,2,5},{5,3,7,2,4},{5,3,7,2,3},{3,5,7,2,5},{3,5,7,2,4},{3,5,7,2,3},{3,5,2,7,5},{3,5,2,7,3},{3,2,5,7,5},{3,2,5,7,3},{2,3,5,7,5},{2,3,5,7,3},{2,3,5,7,2},{2,3,7,5,5},{2,3,7,5,4},{2,3,7,5,3},{2,3,7,5,6},{3,2,7,5,5},{3,2,7,5,7},{3,2,7,5,4},{3,2,7,5,3},{3,2,7,5,6},{3,7,2,5,5},{3,7,2,5,7},{3,7,2,5,4},{3,7,2,5,3},{3,7,2,5,6},{3,7,5,2,5},{3,7,5,2,7},{3,7,5,2,4},{3,7,5,2,3},{3,7,5,2,6},{7,3,5,2,5},{7,3,5,2,3},{7,3,2,5,5},{2,7,3,5,4},{2,7,3,5,3},{2,7,3,5,6},{2,7,5,3,7},{7,2,5,3,7},{7,2,5,3,3},{7,5,2,3,5},{7,5,2,3,7},{7,5,2,3,4},{7,5,2,3,3},{7,5,2,3,2},{7,5,3,2,5},{7,5,3,2,3},{5,7,4,6,5},{5,7,4,6,3},{5,7,4,6,2},{5,7,6,4,5},{5,7,6,4,7},{5,7,6,4,1},{5,7,6,4,6},{5,6,7,4,5},{5,6,7,4,7},{5,6,7,4,3},{5,6,7,4,1},{5,6,7,4,6},{6,5,7,4,5},{6,5,7,4,7},{6,5,7,4,3},{6,5,7,4,1},{6,5,7,4,6},{6,5,4,7,5},{6,5,4,7,3},{5,6,4,7,5},{5,6,4,7,3},{5,4,6,7,3},{5,4,7,6,5},{5,4,7,6,3},{4,5,7,6,5},{4,5,7,6,4},{4,5,7,6,3},{4,5,6,7,3},{4,6,5,7,3},{6,4,5,7,5},{6,4,7,5,4},{4,6,7,5,4},{4,6,7,5,3},{4,7,6,5,4},{4,7,6,5,3},{4,7,5,6,4},{4,7,5,6,3},{7,4,5,6,5},{7,4,5,6,4},{7,4,5,6,3},{7,4,6,5,5},{7,4,6,5,7},{7,4,6,5,4},{7,4,6,5,3},{7,6,4,5,5},{7,6,4,5,7},{7,6,4,5,3},{6,7,5,4,5},{6,7,5,4,7},{6,7,5,4,6},{7,6,5,4,5},{7,6,5,4,7},{7,6,5,4,3},{7,6,5,4,6},{7,5,6,4,5},{7,5,6,4,7},{7,5,6,4,3},{7,5,6,4,6},{7,5,4,6,5},{7,5,4,6,4},{7,5,4,6,3},{5,3,1,6,5},{5,3,1,6,7},{5,3,6,1,5},{5,3,6,1,7},{1,5,6,3,5},{1,5,6,3,7},{1,5,6,3,6},{1,6,5,3,5},{1,6,5,3,7},{1,6,5,3,3},{1,6,5,3,6},{6,1,5,3,5},{6,1,5,3,7},{6,1,5,3,3},{6,1,5,3,6},{6,1,3,5,5},{1,6,3,5,5},{1,3,6,5,7},{1,3,5,6,7},{3,1,6,5,7},{3,6,1,5,7},{6,3,1,5,5},{3,6,5,1,5},{3,5,6,1,5},{3,5,6,1,7},{3,5,1,6,5},{3,5,1,6,7},{5,3,2,6,5},{5,6,2,3,3},{5,2,6,3,3},{5,2,3,6,5},{6,2,3,5,7},{6,2,3,5,3},{6,2,3,5,6},{2,6,3,5,7},{2,6,3,5,3},{2,6,3,5,6},{2,3,6,5,3},{2,3,6,5,6},{7,1,2,3,4},{5,7,3,1,5},{6,3,2,5,7},{5,7,3,1,4},{5,7,3,1,3},{5,7,3,1,2},{5,7,1,3,4},{5,7,1,3,2},{5,7,1,3,1},{5,1,7,3,4},{5,1,7,3,3},{5,1,7,3,2},{5,1,7,3,1},{3,5,2,6,5},{1,5,7,3,5},{1,5,7,3,3},{1,5,7,3,2},{5,3,2,1,5},{1,5,7,3,1},{5,3,2,1,4},{1,5,3,7,5},{1,5,3,7,3},{5,3,1,2,5},{5,3,1,2,1},{5,1,3,7,4},{5,1,3,7,3},{5,1,3,2,5},{5,3,1,7,4},{1,5,3,2,5},{5,3,1,7,3},{5,3,1,7,6},{5,3,7,1,5},{5,3,7,1,4},{1,5,2,3,5},{5,3,7,1,3},{1,5,2,3,7},{5,3,7,1,2},{1,5,2,3,2},{3,5,7,1,5},{5,1,2,3,5},{3,5,7,1,2},{5,2,1,3,5},{5,2,1,3,3},{3,5,1,7,6},{4,3,1,7,7},{4,3,1,7,2},{4,3,1,7,6},{4,1,3,7,5},{4,1,3,7,7},{4,1,3,7,2},{4,1,3,7,6},{1,4,3,7,5},{1,4,3,7,7},{3,1,5,7,5},{1,4,7,3,5},{1,4,7,3,7},{1,3,5,7,5},{1,4,7,3,2},{1,4,7,3,1},{1,3,5,7,6},{1,3,7,5,5},{3,1,7,5,5},{1,4,7,3,6},{4,1,7,3,5},{4,1,7,3,7},{3,7,1,5,5},{4,1,7,3,2},{4,1,7,3,1},{4,1,7,3,6},{4,7,1,3,5},{4,7,1,3,7},{3,7,5,1,3},{3,7,5,1,2},{7,3,5,1,5},{7,3,5,1,4},{7,3,5,1,3},{3,5,2,4,4},{7,2,1,3,4},{3,5,2,4,3},{3,5,2,4,1},{3,2,5,4,4},{3,2,5,4,3},{3,2,5,4,1},{7,2,3,1,3},{2,3,5,4,6},{2,3,4,5,4},{2,3,4,5,3},{2,3,4,5,6},{3,2,4,5,5},{2,7,3,1,4},{2,7,3,1,3},{3,2,4,5,4},{3,2,4,5,3},{3,4,2,5,5},{3,4,2,5,3},{3,4,5,2,5},{4,3,5,2,5},{4,3,2,5,5},{4,3,2,5,4},{4,2,3,5,4},{4,2,3,5,3},{2,4,3,5,4},{2,4,3,5,3},{2,4,5,3,5},{2,4,5,3,4},{2,4,5,3,3},{4,2,5,3,5},{4,2,5,3,4},{4,2,5,3,3},{4,5,2,3,4},{4,5,2,3,3},{4,5,3,2,5},{4,5,3,2,7},{4,5,3,2,4},{5,7,1,6,4},{5,7,6,1,4},{5,1,7,6,4},{1,5,7,6,3},{1,5,6,7,3},{1,6,5,7,3},{6,1,5,7,3},{1,6,7,5,3},{1,7,6,5,3},{7,1,6,5,3},{7,6,5,1,4},{7,5,6,1,4},{7,5,1,6,4},{2,3,7,1,4},{3,2,7,1,4},{3,2,7,1,3},{3,2,1,7,3},{3,1,2,7,3},{1,3,2,7,3},{1,3,7,2,4},{3,1,7,2,4},{3,7,1,2,4},{3,7,2,1,4},{7,4,1,6,4},{7,4,1,6,3},{7,4,6,1,4},{7,4,6,1,3},{7,6,4,1,4},{7,6,4,1,3},{7,6,3,1,4},{7,6,3,1,3},{6,7,1,3,3},{7,6,1,3,3},{7,1,6,3,3},{7,1,3,6,4},{7,1,3,6,3},{1,7,3,6,4},{1,7,3,6,3},{1,7,6,3,3},{1,6,7,3,3},{6,1,7,3,3},{6,1,3,7,3},{1,6,3,7,3},{1,3,7,6,3},{3,1,7,6,3},{3,1,6,7,4},{3,1,6,7,3},{3,6,1,7,4},{3,6,1,7,3},{6,3,1,7,4},{6,3,1,7,3},{3,6,7,1,3},{3,7,6,1,3},{3,7,1,6,3},{7,6,2,3,4},{7,6,2,3,3},{7,2,6,3,4},{7,2,6,3,3},{7,2,3,6,4},{7,2,3,6,3},{2,7,3,6,4},{2,7,3,6,3},{2,7,6,3,3},{2,6,7,3,4},{6,2,7,3,4},{6,2,3,7,4},{2,6,3,7,4},{2,3,6,7,4},{5,7,4,3,4},{5,7,4,3,3},{5,7,4,3,2},{5,7,4,3,6},{5,3,7,4,7},{5,3,7,4,3},{5,3,7,4,2},{5,3,7,4,1},{5,3,7,4,6},{3,5,7,4,7},{3,5,7,4,4},{3,5,7,4,3},{3,5,7,4,2},{3,5,7,4,1},{3,5,7,4,6},{3,5,4,7,4},{3,5,4,7,3},{5,3,4,7,3},{4,3,5,7,4},{4,3,5,7,3},{4,7,1,3,2},{4,7,1,3,6},{4,7,3,1,5},{4,7,3,1,7},{3,4,7,5,7},{4,7,3,1,2},{3,4,7,5,4},{3,4,7,5,3},{3,4,7,5,2},{3,4,7,5,1},{3,4,7,5,6},{7,4,3,2,5},{7,4,3,2,7},{7,4,3,2,1},{7,4,2,3,5},{4,7,3,5,7},{4,7,3,5,4},{7,4,2,3,7},{4,7,3,5,3},{4,7,3,5,2},{4,7,3,5,6},{7,4,2,3,1},{4,7,5,3,7},{7,4,2,3,6},{4,7,5,3,4},{7,2,4,3,5},{4,7,5,3,3},{4,7,5,3,2},{7,2,4,3,7},{4,7,5,3,1},{4,7,5,3,6},{7,4,5,3,7},{7,2,4,3,1},{7,4,5,3,4},{7,2,4,3,6},{7,4,5,3,3},{2,7,4,3,7},{7,4,5,3,6},{7,4,3,5,7},{7,4,3,5,4},{2,7,4,3,1},{7,4,3,5,3},{2,7,4,3,6},{2,7,3,4,5},{7,4,3,5,6},{2,7,3,4,2},{2,7,3,4,1},{2,7,3,4,6},{7,2,3,4,7},{7,2,3,4,2},{7,2,3,4,1},{7,2,3,4,6},{7,3,2,4,5},{7,3,2,4,7},{7,3,2,4,1},{7,3,2,4,6},{7,3,4,2,5},{7,3,4,2,7},{7,5,3,4,4},{7,5,3,4,3},{7,3,4,2,1},{4,6,3,2,7},{4,6,3,2,1},{4,6,3,2,6},{6,4,3,2,5},{6,4,3,2,7},{6,4,3,2,1},{6,4,3,2,6},{6,4,2,3,7},{6,4,2,3,6},{4,6,2,3,7},{3,4,2,7,5},{4,6,2,3,6},{4,2,6,3,7},{4,2,6,3,6},{3,4,7,2,5},{3,4,7,2,7},{4,2,3,6,6},{3,4,7,2,1},{4,3,7,2,5},{4,3,7,2,7},{2,4,3,6,6},{4,3,7,2,1},{4,3,2,7,5},{4,3,2,7,7},{4,3,2,7,1},{2,4,6,3,6},{4,2,3,7,5},{4,2,3,7,7},{4,2,3,7,6},{2,4,3,7,5},{2,4,3,7,7},{2,4,7,3,5},{2,4,7,3,7},{4,2,7,3,5},{2,6,3,4,6},{4,2,7,3,7},{4,2,7,3,6},{2,3,6,4,6},{4,7,2,3,7},{2,3,4,6,6},{3,2,4,6,7},{4,7,3,2,5},{4,7,3,2,7},{3,2,4,6,6},{3,2,6,4,5},{3,2,6,4,7},{4,7,3,2,1},{3,2,6,4,6},{3,6,2,4,5},{3,6,2,4,7},{3,6,2,4,6},{6,3,2,4,5},{6,3,2,4,7},{6,3,2,4,6},{6,3,4,2,5},{6,3,4,2,7},{6,3,4,2,1},{6,3,4,2,6},{3,6,4,2,5},{3,6,4,2,7},{3,6,4,2,1},{3,4,2,6,7},{6,7,3,4,1},{4,3,1,2,7},{6,7,3,4,6},{7,6,3,4,5},{7,6,3,4,7},{7,6,3,4,2},{7,6,3,4,1},{7,3,6,4,5},{7,3,6,4,7},{7,3,6,4,2},{4,3,1,2,6},{7,3,6,4,1},{7,3,6,4,6},{4,1,3,2,7},{7,3,4,6,5},{7,3,4,6,7},{7,3,4,6,2},{7,3,4,6,1},{4,1,3,2,6},{7,3,4,6,6},{3,7,4,6,5},{3,7,4,6,7},{3,7,4,6,2},{3,7,4,6,1},{3,7,4,6,6},{3,7,6,4,5},{3,7,6,4,7},{3,7,6,4,2},{3,7,6,4,1},{3,7,6,4,6},{3,6,7,4,5},{3,6,7,4,7},{3,6,7,4,2},{3,6,7,4,1},{3,6,7,4,6},{6,3,7,4,7},{6,3,7,4,2},{6,3,7,4,1},{6,3,7,4,6},{6,3,4,7,7},{6,3,4,7,2},{6,3,4,7,1},{6,3,4,7,6},{3,6,4,7,7},{3,6,4,7,2},{3,6,4,7,1},{3,6,4,7,6},{3,4,6,7,7},{3,4,6,7,2},{3,4,6,7,1},{3,4,6,7,6},{3,4,7,6,5},{3,4,7,6,7},{3,4,7,6,2},{3,4,7,6,1},{2,1,5,4,7},{2,1,5,4,1},{1,2,4,5,7},{1,2,4,5,4},{2,1,4,5,7},{2,1,4,5,4},{2,4,1,5,5},{2,4,1,5,7},{2,4,5,1,5},{4,2,5,1,5},{4,2,1,5,5},{4,2,1,5,7},{4,1,2,5,5},{1,4,2,5,4},{1,4,5,2,5},{4,1,5,2,5},{4,1,5,2,3},{4,5,1,2,5},{4,5,1,2,3},{4,5,2,1,5},{4,5,2,1,2},{5,4,3,6,4},{5,4,3,6,3},{7,4,2,6,4},{7,4,2,6,3},{5,4,6,3,4},{5,4,6,3,3},{7,4,6,2,4},{7,4,6,2,3},{5,6,4,3,4},{6,5,4,3,4},{3,5,4,6,5},{3,5,4,6,4},{3,5,4,6,3},{3,5,6,4,5},{3,5,6,4,7},{3,5,6,4,4},{3,5,6,4,3},{3,6,5,4,5},{3,6,5,4,7},{3,6,5,4,4},{3,6,5,4,3},{6,3,5,4,4},{6,3,5,4,3},{2,1,4,6,4},{6,7,4,3,7},{3,2,1,6,4},{2,4,1,6,4},{6,3,2,1,3},{3,1,2,6,3},{6,2,1,3,3},{6,2,3,1,3},{2,3,1,6,4},{2,1,3,4,6},{2,3,1,4,6},{2,3,4,1,2},{2,3,4,1,1},{3,2,1,4,2},{3,2,1,4,1},{3,2,1,4,6},{3,1,2,4,2},{3,1,2,4,1},{1,3,2,4,2},{1,3,2,4,1},{1,3,4,2,2},{1,3,4,2,1},{3,1,4,2,2},{3,1,4,2,1},{5,1,4,2,5},{5,1,4,2,4},{1,5,4,2,5},{1,5,4,2,4},{1,5,2,4,4},{2,1,4,3,6},{5,4,3,1,5},{5,4,3,1,7},{5,4,3,1,3},{5,4,1,3,5},{5,4,1,3,4},{5,4,1,3,3},{5,4,1,3,2},{5,1,4,3,5},{5,1,4,3,3},{1,5,4,3,6},{1,5,3,4,5},{1,5,3,4,4},{1,5,3,4,3},{5,1,3,4,5},{5,1,3,4,4},{5,1,3,4,3},{5,3,1,4,5},{5,3,1,4,4},{5,3,1,4,3},{5,3,4,1,5},{5,3,4,1,7},{5,3,4,1,3},{4,5,1,3,5},{4,5,3,1,5},{4,5,3,1,3},{6,3,4,5,4},{6,3,4,5,3},{3,6,4,5,7},{3,6,4,5,4},{3,6,4,5,3},{3,4,6,5,7},{3,4,6,5,4},{3,4,6,5,3}}, + --4*5 + {{7,3,5,1,2},{7,3,1,5,5},{7,3,1,5,4},{7,3,1,5,3},{2,3,7,6,4},{2,3,7,6,3},{3,2,7,6,4},{3,2,7,6,3},{3,2,6,7,4},{3,2,6,7,3},{7,1,3,5,5},{7,1,3,5,4},{7,1,3,5,3},{5,7,1,2,4},{5,7,1,2,3},{1,7,3,5,5},{5,1,7,2,3},{1,7,5,3,5},{1,7,5,3,2},{1,5,7,2,3},{7,1,5,3,5},{7,1,5,3,4},{7,1,5,3,3},{7,1,5,3,2},{1,5,2,7,3},{7,5,1,3,4},{5,1,2,7,4},{7,5,1,3,3},{5,1,2,7,3},{7,5,1,3,2},{7,5,3,1,5},{7,5,3,1,4},{7,5,3,1,3},{7,5,3,1,2},{5,7,3,2,5},{5,7,3,2,7},{5,7,3,2,4},{5,7,2,3,5},{5,7,2,3,7},{5,7,2,3,2},{5,2,7,3,5},{5,2,7,3,7},{5,2,7,3,3},{5,2,7,3,2},{2,1,5,7,4},{2,5,7,3,7},{2,5,7,3,3},{3,6,2,7,4},{3,6,2,7,3},{6,3,2,7,4},{6,3,2,7,3},{6,3,7,2,3},{3,6,7,2,4},{3,6,7,2,3},{3,7,6,2,4},{3,7,6,2,3},{1,2,7,5,4},{1,2,7,5,3},{2,7,1,5,4},{2,7,1,5,3},{2,7,5,1,4},{7,2,5,1,4},{7,2,5,1,3},{7,2,1,5,4},{7,2,1,5,3},{3,7,2,6,4},{3,7,2,6,3},{7,5,1,2,4},{7,3,2,1,3},{7,5,1,2,3},{7,3,1,2,4},{7,3,1,2,3},{7,1,3,2,4},{2,5,3,7,5},{2,5,3,7,3},{5,2,3,7,3},{5,3,2,7,5},{5,3,2,7,3},{5,3,7,2,5},{5,3,7,2,4},{5,3,7,2,3},{3,5,7,2,5},{3,5,7,2,4},{3,5,7,2,3},{3,5,2,7,5},{3,5,2,7,3},{3,2,5,7,5},{3,2,5,7,3},{2,3,5,7,5},{2,3,5,7,3},{2,3,5,7,2},{2,3,7,5,5},{2,3,7,5,4},{2,3,7,5,3},{2,3,7,5,6},{3,2,7,5,5},{3,2,7,5,7},{3,2,7,5,4},{3,2,7,5,3},{3,2,7,5,6},{3,7,2,5,5},{3,7,2,5,7},{3,7,2,5,4},{3,7,2,5,3},{3,7,2,5,6},{3,7,5,2,5},{3,7,5,2,7},{3,7,5,2,4},{3,7,5,2,3},{3,7,5,2,6},{7,3,5,2,5},{7,3,5,2,3},{7,3,2,5,5},{2,7,3,5,4},{2,7,3,5,3},{2,7,3,5,6},{2,7,5,3,7},{7,2,5,3,7},{7,2,5,3,3},{7,5,2,3,5},{7,5,2,3,7},{7,5,2,3,4},{7,5,2,3,3},{7,5,2,3,2},{7,5,3,2,5},{7,5,3,2,3},{5,7,4,6,5},{5,7,4,6,3},{5,7,4,6,2},{5,7,6,4,5},{5,7,6,4,7},{5,7,6,4,1},{5,7,6,4,6},{5,6,7,4,5},{5,6,7,4,7},{5,6,7,4,3},{5,6,7,4,1},{5,6,7,4,6},{6,5,7,4,5},{6,5,7,4,7},{6,5,7,4,3},{6,5,7,4,1},{6,5,7,4,6},{6,5,4,7,5},{6,5,4,7,3},{5,6,4,7,5},{5,6,4,7,3},{5,4,6,7,3},{5,4,7,6,5},{5,4,7,6,3},{4,5,7,6,5},{4,5,7,6,4},{4,5,7,6,3},{4,5,6,7,3},{4,6,5,7,3},{6,4,5,7,5},{6,4,7,5,4},{4,6,7,5,4},{4,6,7,5,3},{4,7,6,5,4},{4,7,6,5,3},{4,7,5,6,4},{4,7,5,6,3},{7,4,5,6,5},{7,4,5,6,4},{7,4,5,6,3},{7,4,6,5,5},{7,4,6,5,7},{7,4,6,5,4},{7,4,6,5,3},{7,6,4,5,5},{7,6,4,5,7},{7,6,4,5,3},{6,7,5,4,5},{6,7,5,4,7},{6,7,5,4,6},{7,6,5,4,5},{7,6,5,4,7},{7,6,5,4,3},{7,6,5,4,6},{7,5,6,4,5},{7,5,6,4,7},{7,5,6,4,3},{7,5,6,4,6},{7,5,4,6,5},{7,5,4,6,4},{7,5,4,6,3},{5,3,1,6,5},{5,3,1,6,7},{5,3,6,1,5},{5,3,6,1,7},{1,5,6,3,5},{1,5,6,3,7},{1,5,6,3,6},{1,6,5,3,5},{1,6,5,3,7},{1,6,5,3,3},{1,6,5,3,6},{6,1,5,3,5},{6,1,5,3,7},{6,1,5,3,3},{6,1,5,3,6},{6,1,3,5,5},{1,6,3,5,5},{1,3,6,5,7},{1,3,5,6,7},{3,1,6,5,7},{3,6,1,5,7},{6,3,1,5,5},{3,6,5,1,5},{3,5,6,1,5},{3,5,6,1,7},{3,5,1,6,5},{3,5,1,6,7},{5,3,2,6,5},{5,6,2,3,3},{5,2,6,3,3},{5,2,3,6,5},{6,2,3,5,7},{6,2,3,5,3},{6,2,3,5,6},{2,6,3,5,7},{2,6,3,5,3},{2,6,3,5,6},{2,3,6,5,3},{2,3,6,5,6},{7,1,2,3,4},{5,7,3,1,5},{6,3,2,5,7},{5,7,3,1,4},{5,7,3,1,3},{5,7,3,1,2},{5,7,1,3,4},{5,7,1,3,2},{5,7,1,3,1},{5,1,7,3,4},{5,1,7,3,3},{5,1,7,3,2},{5,1,7,3,1},{3,5,2,6,5},{1,5,7,3,5},{1,5,7,3,3},{1,5,7,3,2},{5,3,2,1,5},{1,5,7,3,1},{5,3,2,1,4},{1,5,3,7,5},{1,5,3,7,3},{5,3,1,2,5},{5,3,1,2,1},{5,1,3,7,4},{5,1,3,7,3},{5,1,3,2,5},{5,3,1,7,4},{1,5,3,2,5},{5,3,1,7,3},{5,3,1,7,6},{5,3,7,1,5},{5,3,7,1,4},{1,5,2,3,5},{5,3,7,1,3},{1,5,2,3,7},{5,3,7,1,2},{1,5,2,3,2},{3,5,7,1,5},{5,1,2,3,5},{3,5,7,1,2},{5,2,1,3,5},{5,2,1,3,3},{3,5,1,7,6},{4,3,1,7,7},{4,3,1,7,2},{4,3,1,7,6},{4,1,3,7,5},{4,1,3,7,7},{4,1,3,7,2},{4,1,3,7,6},{1,4,3,7,5},{1,4,3,7,7},{3,1,5,7,5},{1,4,7,3,5},{1,4,7,3,7},{1,3,5,7,5},{1,4,7,3,2},{1,4,7,3,1},{1,3,5,7,6},{1,3,7,5,5},{3,1,7,5,5},{1,4,7,3,6},{4,1,7,3,5},{4,1,7,3,7},{3,7,1,5,5},{4,1,7,3,2},{4,1,7,3,1},{4,1,7,3,6},{4,7,1,3,5},{4,7,1,3,7},{3,7,5,1,3},{3,7,5,1,2},{7,3,5,1,5},{7,3,5,1,4},{7,3,5,1,3},{3,5,2,4,4},{7,2,1,3,4},{3,5,2,4,3},{3,5,2,4,1},{3,2,5,4,4},{3,2,5,4,3},{3,2,5,4,1},{7,2,3,1,3},{2,3,5,4,6},{2,3,4,5,4},{2,3,4,5,3},{2,3,4,5,6},{3,2,4,5,5},{2,7,3,1,4},{2,7,3,1,3},{3,2,4,5,4},{3,2,4,5,3},{3,4,2,5,5},{3,4,2,5,3},{3,4,5,2,5},{4,3,5,2,5},{4,3,2,5,5},{4,3,2,5,4},{4,2,3,5,4},{4,2,3,5,3},{2,4,3,5,4},{2,4,3,5,3},{2,4,5,3,5},{2,4,5,3,4},{2,4,5,3,3},{4,2,5,3,5},{4,2,5,3,4},{4,2,5,3,3},{4,5,2,3,4},{4,5,2,3,3},{4,5,3,2,5},{4,5,3,2,7},{4,5,3,2,4},{5,7,1,6,4},{5,7,6,1,4},{5,1,7,6,4},{1,5,7,6,3},{1,5,6,7,3},{1,6,5,7,3},{6,1,5,7,3},{1,6,7,5,3},{1,7,6,5,3},{7,1,6,5,3},{7,6,5,1,4},{7,5,6,1,4},{7,5,1,6,4},{2,3,7,1,4},{3,2,7,1,4},{3,2,7,1,3},{3,2,1,7,3},{3,1,2,7,3},{1,3,2,7,3},{1,3,7,2,4},{3,1,7,2,4},{3,7,1,2,4},{3,7,2,1,4},{7,4,1,6,4},{7,4,1,6,3},{7,4,6,1,4},{7,4,6,1,3},{7,6,4,1,4},{7,6,4,1,3},{7,6,3,1,4},{7,6,3,1,3},{6,7,1,3,3},{7,6,1,3,3},{7,1,6,3,3},{7,1,3,6,4},{7,1,3,6,3},{1,7,3,6,4},{1,7,3,6,3},{1,7,6,3,3},{1,6,7,3,3},{6,1,7,3,3},{6,1,3,7,3},{1,6,3,7,3},{1,3,7,6,3},{3,1,7,6,3},{3,1,6,7,4},{3,1,6,7,3},{3,6,1,7,4},{3,6,1,7,3},{6,3,1,7,4},{6,3,1,7,3},{3,6,7,1,3},{3,7,6,1,3},{3,7,1,6,3},{7,6,2,3,4},{7,6,2,3,3},{7,2,6,3,4},{7,2,6,3,3},{7,2,3,6,4},{7,2,3,6,3},{2,7,3,6,4},{2,7,3,6,3},{2,7,6,3,3},{2,6,7,3,4},{6,2,7,3,4},{6,2,3,7,4},{2,6,3,7,4},{2,3,6,7,4},{5,7,4,3,4},{5,7,4,3,3},{5,7,4,3,2},{5,7,4,3,6},{5,3,7,4,7},{5,3,7,4,3},{5,3,7,4,2},{5,3,7,4,1},{5,3,7,4,6},{3,5,7,4,7},{3,5,7,4,4},{3,5,7,4,3},{3,5,7,4,2},{3,5,7,4,1},{3,5,7,4,6},{3,5,4,7,4},{3,5,4,7,3},{5,3,4,7,3},{4,3,5,7,4},{4,3,5,7,3},{4,7,1,3,2},{4,7,1,3,6},{4,7,3,1,5},{4,7,3,1,7},{3,4,7,5,7},{4,7,3,1,2},{3,4,7,5,4},{3,4,7,5,3},{3,4,7,5,2},{3,4,7,5,1},{3,4,7,5,6},{7,4,3,2,5},{7,4,3,2,7},{7,4,3,2,1},{7,4,2,3,5},{4,7,3,5,7},{4,7,3,5,4},{7,4,2,3,7},{4,7,3,5,3},{4,7,3,5,2},{4,7,3,5,6},{7,4,2,3,1},{4,7,5,3,7},{7,4,2,3,6},{4,7,5,3,4},{7,2,4,3,5},{4,7,5,3,3},{4,7,5,3,2},{7,2,4,3,7},{4,7,5,3,1},{4,7,5,3,6},{7,4,5,3,7},{7,2,4,3,1},{7,4,5,3,4},{7,2,4,3,6},{7,4,5,3,3},{2,7,4,3,7},{7,4,5,3,6},{7,4,3,5,7},{7,4,3,5,4},{2,7,4,3,1},{7,4,3,5,3},{2,7,4,3,6},{2,7,3,4,5},{7,4,3,5,6},{2,7,3,4,2},{2,7,3,4,1},{2,7,3,4,6},{7,2,3,4,7},{7,2,3,4,2},{7,2,3,4,1},{7,2,3,4,6},{7,3,2,4,5},{7,3,2,4,7},{7,3,2,4,1},{7,3,2,4,6},{7,3,4,2,5},{7,3,4,2,7},{7,5,3,4,4},{7,5,3,4,3},{7,3,4,2,1},{4,6,3,2,7},{4,6,3,2,1},{4,6,3,2,6},{6,4,3,2,5},{6,4,3,2,7},{6,4,3,2,1},{6,4,3,2,6},{6,4,2,3,7},{6,4,2,3,6},{4,6,2,3,7},{3,4,2,7,5},{4,6,2,3,6},{4,2,6,3,7},{4,2,6,3,6},{3,4,7,2,5},{3,4,7,2,7},{4,2,3,6,6},{3,4,7,2,1},{4,3,7,2,5},{4,3,7,2,7},{2,4,3,6,6},{4,3,7,2,1},{4,3,2,7,5},{4,3,2,7,7},{4,3,2,7,1},{2,4,6,3,6},{4,2,3,7,5},{4,2,3,7,7},{4,2,3,7,6},{2,4,3,7,5},{2,4,3,7,7},{2,4,7,3,5},{2,4,7,3,7},{4,2,7,3,5},{2,6,3,4,6},{4,2,7,3,7},{4,2,7,3,6},{2,3,6,4,6},{4,7,2,3,7},{2,3,4,6,6},{3,2,4,6,7},{4,7,3,2,5},{4,7,3,2,7},{3,2,4,6,6},{3,2,6,4,5},{3,2,6,4,7},{4,7,3,2,1},{3,2,6,4,6},{3,6,2,4,5},{3,6,2,4,7},{3,6,2,4,6},{6,3,2,4,5},{6,3,2,4,7},{6,3,2,4,6},{6,3,4,2,5},{6,3,4,2,7},{6,3,4,2,1},{6,3,4,2,6},{3,6,4,2,5},{3,6,4,2,7},{3,6,4,2,1},{3,4,2,6,7},{6,7,3,4,1},{4,3,1,2,7},{6,7,3,4,6},{7,6,3,4,5},{7,6,3,4,7},{7,6,3,4,2},{7,6,3,4,1},{7,3,6,4,5},{7,3,6,4,7},{7,3,6,4,2},{4,3,1,2,6},{7,3,6,4,1},{7,3,6,4,6},{4,1,3,2,7},{7,3,4,6,5},{7,3,4,6,7},{7,3,4,6,2},{7,3,4,6,1},{4,1,3,2,6},{7,3,4,6,6},{3,7,4,6,5},{3,7,4,6,7},{3,7,4,6,2},{3,7,4,6,1},{3,7,4,6,6},{3,7,6,4,5},{3,7,6,4,7},{3,7,6,4,2},{3,7,6,4,1},{3,7,6,4,6},{3,6,7,4,5},{3,6,7,4,7},{3,6,7,4,2},{3,6,7,4,1},{3,6,7,4,6},{6,3,7,4,7},{6,3,7,4,2},{6,3,7,4,1},{6,3,7,4,6},{6,3,4,7,7},{6,3,4,7,2},{6,3,4,7,1},{6,3,4,7,6},{3,6,4,7,7},{3,6,4,7,2},{3,6,4,7,1},{3,6,4,7,6},{3,4,6,7,7},{3,4,6,7,2},{3,4,6,7,1},{3,4,6,7,6},{3,4,7,6,5},{3,4,7,6,7},{3,4,7,6,2},{3,4,7,6,1},{2,1,5,4,7},{2,1,5,4,1},{1,2,4,5,7},{1,2,4,5,4},{2,1,4,5,7},{2,1,4,5,4},{2,4,1,5,5},{2,4,1,5,7},{2,4,5,1,5},{4,2,5,1,5},{4,2,1,5,5},{4,2,1,5,7},{4,1,2,5,5},{1,4,2,5,4},{1,4,5,2,5},{4,1,5,2,5},{4,1,5,2,3},{4,5,1,2,5},{4,5,1,2,3},{4,5,2,1,5},{4,5,2,1,2},{5,4,3,6,4},{5,4,3,6,3},{7,4,2,6,4},{7,4,2,6,3},{5,4,6,3,4},{5,4,6,3,3},{7,4,6,2,4},{7,4,6,2,3},{5,6,4,3,4},{6,5,4,3,4},{3,5,4,6,5},{3,5,4,6,4},{3,5,4,6,3},{3,5,6,4,5},{3,5,6,4,7},{3,5,6,4,4},{3,5,6,4,3},{3,6,5,4,5},{3,6,5,4,7},{3,6,5,4,4},{3,6,5,4,3},{6,3,5,4,4},{6,3,5,4,3},{2,1,4,6,4},{6,7,4,3,7},{3,2,1,6,4},{2,4,1,6,4},{6,3,2,1,3},{3,1,2,6,3},{6,2,1,3,3},{6,2,3,1,3},{2,3,1,6,4},{2,1,3,4,6},{2,3,1,4,6},{2,3,4,1,2},{2,3,4,1,1},{3,2,1,4,2},{3,2,1,4,1},{3,2,1,4,6},{3,1,2,4,2},{3,1,2,4,1},{1,3,2,4,2},{1,3,2,4,1},{1,3,4,2,2},{1,3,4,2,1},{3,1,4,2,2},{3,1,4,2,1},{5,1,4,2,5},{5,1,4,2,4},{1,5,4,2,5},{1,5,4,2,4},{1,5,2,4,4},{2,1,4,3,6},{5,4,3,1,5},{5,4,3,1,7},{5,4,3,1,3},{5,4,1,3,5},{5,4,1,3,4},{5,4,1,3,3},{5,4,1,3,2},{5,1,4,3,5},{5,1,4,3,3},{1,5,4,3,6},{1,5,3,4,5},{1,5,3,4,4},{1,5,3,4,3},{5,1,3,4,5},{5,1,3,4,4},{5,1,3,4,3},{5,3,1,4,5},{5,3,1,4,4},{5,3,1,4,3},{5,3,4,1,5},{5,3,4,1,7},{5,3,4,1,3},{4,5,1,3,5},{4,5,3,1,5},{4,5,3,1,3},{6,3,4,5,4},{6,3,4,5,3},{3,6,4,5,7},{3,6,4,5,4},{3,6,4,5,3},{3,4,6,5,7},{3,4,6,5,4},{3,4,6,5,3}}, - --4*6 - {{1,6,5,3,7,5},{1,6,5,3,7,3},{1,6,5,3,7,2},{5,1,6,3,2,5},{5,1,6,3,2,7},{5,1,6,3,2,6},{5,6,1,3,2,5},{5,6,1,3,2,7},{5,6,1,3,2,6},{6,5,1,3,2,5},{6,1,5,3,7,5},{6,5,1,3,2,7},{6,1,5,3,7,3},{6,1,5,3,7,2},{6,5,1,3,2,6},{6,1,5,3,2,5},{3,4,7,1,5,5},{6,1,5,3,2,7},{5,7,2,1,4,5},{3,4,7,1,5,3},{3,4,7,1,5,2},{3,4,7,1,5,1},{3,4,7,1,5,6},{3,4,1,7,5,5},{3,4,1,7,5,4},{3,4,1,7,5,3},{6,1,5,3,2,6},{1,6,5,3,2,5},{1,6,5,3,2,7},{3,4,1,7,5,2},{3,4,1,7,5,1},{5,7,2,1,4,3},{1,6,5,3,2,6},{1,5,6,3,2,5},{5,7,2,4,1,5},{1,5,6,3,2,7},{1,5,6,3,2,6},{5,2,7,4,1,5},{3,4,1,7,5,6},{3,1,4,7,5,5},{1,5,3,2,6,5},{5,2,7,4,1,4},{1,5,2,3,6,5},{3,1,4,7,5,4},{5,2,7,1,4,5},{5,2,7,1,4,3},{5,2,7,1,4,2},{5,2,1,7,4,5},{3,1,4,7,5,3},{5,2,1,7,4,4},{1,3,4,7,5,5},{5,2,1,7,4,3},{1,3,4,7,5,4},{1,3,4,7,5,3},{1,5,2,6,3,5},{1,5,2,6,3,7},{5,1,2,7,4,5},{5,1,2,7,4,4},{1,5,2,7,4,4},{6,5,1,3,7,4},{1,5,2,7,4,2},{6,5,1,3,7,3},{1,2,5,7,4,3},{6,5,1,3,7,2},{1,2,5,7,4,2},{2,1,5,7,4,7},{2,1,5,7,4,3},{2,1,5,7,4,2},{2,1,5,7,4,1},{5,6,1,3,7,4},{2,5,1,7,4,5},{2,5,1,7,4,7},{2,5,1,7,4,4},{2,5,1,7,4,3},{2,5,1,7,4,1},{2,5,7,1,4,5},{2,5,7,1,4,7},{5,6,1,3,7,2},{2,5,7,1,4,4},{2,5,7,1,4,3},{2,5,7,1,4,2},{2,5,7,1,4,1},{2,5,7,4,1,5},{2,5,7,4,1,4},{5,1,6,3,7,4},{5,1,6,3,7,2},{5,1,3,6,7,4},{5,1,3,7,6,5},{2,5,7,4,1,6},{5,1,3,7,6,4},{2,5,4,7,1,5},{2,5,4,7,1,4},{2,5,4,1,7,5},{5,3,1,7,6,5},{2,5,4,1,7,4},{2,5,4,1,7,3},{5,3,1,7,6,4},{5,3,1,6,7,5},{5,3,1,6,7,4},{5,3,6,1,7,5},{5,3,6,1,7,4},{5,3,6,1,7,3},{5,6,3,1,7,4},{2,5,1,4,7,5},{2,5,1,4,7,4},{2,5,1,4,7,3},{6,5,3,1,7,4},{6,5,3,1,7,3},{2,5,1,4,7,1},{6,5,3,7,1,4},{2,1,5,4,7,3},{2,1,5,4,7,1},{1,2,5,4,7,3},{1,5,2,4,7,5},{5,6,3,7,1,4},{1,5,2,4,7,4},{1,5,2,4,7,3},{1,5,2,4,7,2},{5,1,2,4,7,5},{5,1,2,4,7,4},{5,1,2,4,7,2},{5,3,6,7,1,5},{5,3,7,6,1,5},{5,3,7,6,1,7},{5,3,7,1,6,5},{5,3,7,1,6,7},{1,4,3,7,5,5},{1,4,3,7,5,4},{3,5,7,1,6,5},{1,4,3,7,5,3},{3,5,7,1,6,7},{3,5,7,1,6,3},{3,5,7,6,1,5},{3,5,7,6,1,7},{3,5,7,6,1,4},{3,5,6,7,1,5},{3,5,6,7,1,4},{3,6,5,7,1,5},{3,6,5,7,1,4},{4,1,3,7,5,5},{1,5,2,6,3,6},{1,5,6,2,3,5},{4,1,3,7,5,4},{4,1,3,7,5,3},{1,5,6,2,3,7},{4,1,3,7,5,2},{4,1,3,7,5,1},{4,1,3,7,5,6},{4,3,1,7,5,5},{1,5,6,2,3,6},{4,3,1,7,5,4},{4,3,1,7,5,3},{4,3,1,7,5,2},{5,2,1,4,7,5},{4,3,1,7,5,1},{4,3,1,7,5,6},{4,3,7,1,5,5},{4,3,7,1,5,4},{4,3,7,1,5,3},{4,3,7,1,5,2},{4,3,7,1,5,1},{5,2,1,4,7,4},{4,3,7,1,5,6},{5,2,1,4,7,3},{4,3,7,5,1,5},{5,2,1,4,7,2},{5,2,1,4,7,1},{4,3,7,5,1,4},{4,3,7,5,1,3},{5,2,4,1,7,5},{4,7,3,5,1,5},{5,2,4,1,7,4},{5,2,4,1,7,3},{4,7,3,5,1,4},{4,7,3,5,1,3},{4,7,3,1,5,5},{4,7,3,1,5,7},{4,7,3,1,5,4},{4,7,3,1,5,3},{4,7,3,1,5,2},{4,7,3,1,5,1},{5,2,4,7,1,5},{4,7,1,3,5,5},{5,2,4,7,1,4},{4,7,1,3,5,4},{4,7,1,3,5,3},{4,7,1,3,5,2},{4,7,1,3,5,1},{5,4,2,7,1,5},{4,7,1,3,5,6},{4,1,7,3,5,5},{5,4,2,7,1,4},{4,1,7,3,5,4},{4,1,7,3,5,3},{4,1,7,3,5,2},{4,1,7,3,5,1},{4,1,7,3,5,6},{1,4,7,3,5,5},{5,4,2,7,1,3},{1,4,7,3,5,4},{1,4,7,3,5,3},{1,4,7,3,5,6},{1,4,7,5,3,5},{1,4,7,5,3,4},{1,4,7,5,3,1},{5,4,2,1,7,5},{1,4,7,5,3,6},{4,1,7,5,3,5},{5,4,2,1,7,4},{5,4,2,1,7,3},{4,1,7,5,3,4},{4,1,7,5,3,3},{4,1,7,5,3,2},{4,1,7,5,3,1},{4,1,7,5,3,6},{4,7,1,5,3,5},{4,7,1,5,3,7},{4,7,1,5,3,4},{4,7,1,5,3,3},{4,7,1,5,3,2},{4,7,1,5,3,1},{4,7,1,5,3,6},{1,6,5,2,3,5},{4,7,5,1,3,5},{1,6,5,2,3,7},{4,7,5,1,3,7},{4,7,5,1,3,4},{4,7,5,1,3,3},{4,7,5,1,3,2},{4,7,5,3,1,5},{4,7,5,3,1,7},{4,7,5,3,1,4},{4,7,5,3,1,3},{7,4,5,3,1,5},{7,4,5,3,1,7},{7,4,5,3,1,4},{7,4,5,3,1,3},{5,4,1,2,7,5},{7,4,5,1,3,5},{7,4,5,1,3,7},{5,4,1,2,7,4},{7,4,5,1,3,4},{7,4,5,1,3,3},{7,4,5,1,3,2},{7,4,1,5,3,5},{7,4,1,5,3,7},{7,4,1,5,3,4},{7,4,1,5,3,3},{7,4,1,5,3,2},{7,1,4,5,3,5},{7,1,4,5,3,7},{7,1,4,5,3,4},{7,1,4,5,3,3},{7,1,4,5,3,6},{1,7,4,5,3,5},{1,7,4,5,3,4},{1,7,4,5,3,1},{1,7,4,5,3,6},{1,7,4,3,5,5},{1,7,4,3,5,4},{1,7,4,3,5,3},{5,4,1,2,7,3},{1,7,4,3,5,6},{7,1,4,3,5,5},{7,1,4,3,5,4},{5,1,4,2,7,5},{7,1,4,3,5,3},{5,1,4,2,7,7},{7,1,4,3,5,2},{5,1,4,2,7,4},{7,1,4,3,5,6},{7,4,1,3,5,5},{7,4,1,3,5,4},{7,4,1,3,5,3},{7,4,1,3,5,2},{1,5,4,2,7,5},{7,4,1,3,5,6},{7,4,3,1,5,5},{1,5,4,2,7,4},{7,4,3,1,5,7},{7,4,3,1,5,4},{7,4,3,1,5,3},{7,4,3,1,5,2},{1,5,4,2,7,3},{7,4,3,1,5,6},{1,6,5,2,3,6},{1,5,4,2,7,6},{6,1,5,2,3,5},{6,1,5,2,3,7},{1,5,4,7,2,5},{1,5,4,7,2,4},{6,1,5,2,3,6},{1,5,4,7,2,3},{6,5,1,2,3,5},{6,5,1,2,3,7},{6,5,1,2,3,6},{5,6,1,2,3,5},{5,6,1,2,3,7},{5,1,4,7,2,5},{5,6,1,2,3,6},{5,1,4,7,2,4},{5,1,6,2,3,5},{5,1,6,2,3,7},{5,1,6,2,3,6},{5,1,2,6,3,5},{5,1,2,6,3,7},{5,1,2,6,3,6},{5,4,1,7,2,5},{5,4,1,7,2,4},{5,2,1,6,3,5},{5,4,1,7,2,3},{5,2,1,6,3,7},{5,4,7,1,2,5},{5,4,7,1,2,4},{5,4,7,1,2,3},{5,2,1,6,3,6},{5,6,2,1,3,5},{5,4,7,2,1,5},{5,4,7,2,1,3},{5,4,7,2,1,2},{6,5,2,1,3,5},{4,5,7,2,1,5},{4,5,7,2,1,4},{4,5,7,2,1,3},{4,5,7,2,1,2},{6,5,2,3,1,5},{4,5,7,1,2,5},{6,3,5,7,1,4},{4,5,7,1,2,4},{4,5,7,1,2,3},{6,3,5,1,7,4},{4,5,1,7,2,5},{6,3,5,1,7,3},{4,5,1,7,2,4},{4,5,1,7,2,3},{3,6,5,1,7,5},{3,6,5,1,7,4},{3,6,5,1,7,3},{4,1,5,7,2,5},{4,1,5,7,2,7},{4,1,5,7,2,4},{3,5,6,1,7,5},{3,5,6,1,7,4},{3,5,6,1,7,3},{4,1,5,7,2,3},{3,5,1,6,7,5},{1,4,5,7,2,5},{3,5,1,6,7,4},{1,4,5,7,2,4},{1,4,5,7,2,3},{3,5,1,7,6,5},{1,4,5,2,7,5},{3,5,1,7,6,4},{1,4,5,2,7,4},{3,5,1,7,6,3},{1,4,5,2,7,3},{1,4,5,2,7,6},{4,1,5,2,7,5},{4,1,5,2,7,7},{4,1,5,2,7,3},{4,1,5,2,7,6},{4,5,1,2,7,5},{4,5,1,2,7,3},{4,5,2,1,7,5},{4,5,2,1,7,4},{4,5,2,1,7,3},{4,5,2,7,1,5},{4,5,2,7,1,4},{4,5,2,7,1,3},{4,2,5,7,1,5},{4,2,5,7,1,4},{4,2,5,1,7,5},{4,2,5,1,7,4},{4,2,5,1,7,3},{3,1,5,7,6,5},{4,2,1,5,7,5},{4,2,1,5,7,4},{4,2,1,5,7,3},{5,6,2,3,1,5},{3,1,5,7,6,3},{4,1,2,5,7,5},{3,1,5,6,7,5},{4,1,2,5,7,3},{3,1,5,6,7,3},{1,4,2,5,7,3},{3,1,6,5,7,5},{3,1,6,5,7,3},{1,2,4,5,7,3},{3,6,1,5,7,5},{3,6,1,5,7,3},{2,1,4,5,7,3},{2,4,1,5,7,5},{6,3,1,5,7,5},{2,4,5,1,7,5},{6,1,3,5,7,5},{5,2,6,3,1,5},{1,6,3,5,7,5},{1,3,6,5,7,3},{2,5,3,1,6,5},{1,3,5,6,7,3},{2,5,3,1,6,7},{2,5,3,1,6,4},{1,3,5,7,6,5},{2,5,3,6,1,5},{2,5,3,6,1,7},{2,5,3,6,1,4},{1,3,7,5,6,5},{1,3,7,5,6,7},{1,3,7,6,5,7},{7,4,3,5,1,5},{1,3,7,6,5,3},{7,4,3,5,1,7},{7,4,3,5,1,4},{7,4,3,5,1,3},{1,3,6,7,5,7},{1,3,6,7,5,3},{1,6,3,7,5,5},{7,3,4,5,1,5},{1,6,3,7,5,7},{7,3,4,5,1,7},{1,6,3,7,5,3},{7,3,4,5,1,4},{6,1,3,7,5,5},{7,3,4,5,1,3},{7,3,4,1,5,5},{6,3,1,7,5,5},{7,3,4,1,5,7},{7,3,4,1,5,4},{7,3,4,1,5,3},{7,3,4,1,5,2},{7,3,4,1,5,6},{3,6,1,7,5,5},{3,6,1,7,5,7},{7,3,1,4,5,5},{7,3,1,4,5,7},{7,3,1,4,5,4},{7,3,1,4,5,3},{7,3,1,4,5,2},{3,1,6,7,5,5},{3,1,6,7,5,7},{3,1,6,7,5,3},{3,1,7,6,5,5},{3,1,7,6,5,7},{3,1,7,6,5,3},{3,1,7,5,6,5},{3,1,7,5,6,3},{3,7,1,5,6,5},{3,7,1,5,6,3},{7,3,1,4,5,6},{3,7,1,6,5,5},{3,7,1,6,5,7},{7,1,3,4,5,5},{3,7,1,6,5,3},{7,1,3,4,5,4},{7,1,3,4,5,3},{3,7,6,1,5,5},{7,1,3,4,5,2},{3,7,6,1,5,7},{7,1,3,4,5,6},{3,7,6,1,5,3},{1,7,3,4,5,5},{1,7,3,4,5,4},{3,6,7,1,5,5},{3,6,7,1,5,7},{1,7,3,4,5,3},{1,7,3,4,5,1},{1,3,7,4,5,5},{6,3,7,1,5,5},{1,3,7,4,5,4},{1,3,7,4,5,3},{1,3,7,4,5,1},{6,3,7,5,1,4},{3,1,7,4,5,5},{6,3,7,5,1,3},{3,1,7,4,5,4},{3,1,7,4,5,3},{3,6,7,5,1,5},{3,1,7,4,5,1},{3,7,1,4,5,5},{3,7,6,5,1,5},{3,7,1,4,5,4},{3,7,1,4,5,3},{3,7,1,4,5,2},{3,7,5,6,1,5},{3,7,5,6,1,7},{3,7,4,1,5,5},{3,7,4,1,5,3},{3,7,4,1,5,2},{3,7,5,1,6,5},{3,7,4,1,5,1},{3,7,5,1,6,7},{3,7,4,1,5,6},{3,7,4,5,1,5},{3,7,5,1,6,3},{3,7,4,5,1,7},{3,7,4,5,1,4},{7,3,5,1,6,5},{7,3,5,1,6,7},{7,3,5,1,6,3},{3,7,5,4,1,5},{3,7,5,4,1,7},{3,7,5,4,1,4},{3,7,5,4,1,3},{7,3,5,6,1,5},{7,3,5,6,1,7},{3,7,5,4,1,2},{7,3,6,5,1,5},{7,3,6,5,1,4},{3,7,5,1,4,5},{3,7,5,1,4,7},{3,7,5,1,4,4},{3,7,5,1,4,3},{3,7,5,1,4,2},{3,7,1,5,4,5},{3,7,1,5,4,4},{3,7,1,5,4,3},{3,7,1,5,4,2},{6,2,5,3,1,5},{3,1,7,5,4,5},{3,1,7,5,4,4},{3,1,7,5,4,3},{6,2,5,1,3,5},{3,1,7,5,4,2},{1,3,7,5,4,5},{1,3,7,5,4,4},{1,3,7,5,4,3},{1,3,7,5,4,2},{1,7,3,5,4,5},{1,7,3,5,4,4},{1,7,3,5,4,3},{7,1,3,5,4,5},{7,1,3,5,4,4},{7,1,3,5,4,3},{2,5,1,3,6,4},{7,1,3,5,4,2},{7,3,1,5,4,5},{7,3,1,5,4,7},{7,3,1,5,4,4},{2,1,5,3,6,4},{7,3,1,5,4,3},{7,3,1,5,4,2},{7,3,1,5,4,1},{7,3,5,1,4,5},{7,3,5,1,4,7},{7,3,5,1,4,4},{7,3,5,1,4,3},{7,3,5,1,4,2},{2,1,6,5,3,7},{7,3,5,1,4,1},{7,3,5,1,4,6},{2,1,6,5,3,4},{7,3,5,4,1,5},{7,3,5,4,1,7},{7,3,5,4,1,4},{2,1,6,5,3,6},{7,3,5,4,1,3},{7,3,5,4,1,2},{7,3,5,4,1,1},{2,6,1,5,3,7},{2,6,1,5,3,4},{7,5,3,4,1,5},{7,5,3,4,1,7},{7,5,3,4,1,4},{7,5,3,4,1,3},{2,6,1,5,3,6},{7,5,3,4,1,2},{7,5,3,4,1,1},{6,2,1,5,3,7},{6,2,1,5,3,4},{7,5,3,1,4,5},{7,5,3,1,4,7},{7,5,3,1,4,4},{7,5,3,1,4,3},{6,2,1,5,3,6},{7,5,3,1,4,2},{7,5,3,1,4,1},{2,4,5,1,7,4},{7,5,3,1,4,6},{6,1,2,5,3,7},{6,1,2,5,3,4},{2,4,5,1,7,3},{7,5,1,3,4,5},{7,5,1,3,4,7},{7,5,1,3,4,4},{7,5,1,3,4,3},{7,5,1,3,4,1},{2,4,5,7,1,5},{7,5,1,3,4,6},{7,1,5,3,4,5},{7,1,5,3,4,7},{2,4,5,7,1,4},{7,1,5,3,4,4},{7,1,5,3,4,3},{7,1,5,3,4,6},{1,7,5,3,4,5},{2,4,7,5,1,5},{1,7,5,3,4,4},{2,4,7,5,1,4},{1,7,5,3,4,3},{1,7,5,4,3,5},{2,4,7,1,5,5},{1,7,5,4,3,4},{2,4,7,1,5,7},{1,7,5,4,3,3},{1,7,5,4,3,6},{7,1,5,4,3,5},{7,1,5,4,3,7},{7,1,5,4,3,4},{2,4,1,7,5,5},{2,4,1,7,5,7},{7,1,5,4,3,6},{7,5,1,4,3,5},{7,5,1,4,3,7},{7,5,1,4,3,4},{7,5,1,4,3,3},{7,5,1,4,3,6},{2,1,4,7,5,7},{7,5,4,1,3,5},{2,1,4,7,5,4},{7,5,4,1,3,7},{7,5,4,1,3,4},{7,5,4,1,3,3},{2,1,4,7,5,3},{7,5,4,1,3,2},{2,1,4,7,5,6},{7,5,4,3,1,5},{7,5,4,3,1,7},{7,5,4,3,1,4},{7,5,4,3,1,3},{7,5,4,3,1,2},{1,2,4,7,5,7},{1,2,4,7,5,4},{5,7,4,3,2,5},{1,2,4,7,5,3},{5,7,4,3,2,7},{5,7,4,3,2,4},{1,2,4,7,5,6},{5,7,4,3,2,3},{5,7,4,3,2,2},{1,4,2,7,5,4},{5,7,4,2,3,5},{1,4,2,7,5,3},{5,7,4,2,3,7},{5,7,4,2,3,4},{5,7,4,2,3,3},{5,7,4,2,3,2},{1,4,2,7,5,6},{5,7,4,2,3,1},{4,1,2,7,5,5},{5,7,2,4,3,5},{4,1,2,7,5,7},{4,1,2,7,5,4},{5,7,2,4,3,4},{4,1,2,7,5,3},{5,7,2,4,3,3},{5,7,2,4,3,2},{4,1,2,7,5,6},{5,2,7,4,3,5},{4,2,1,7,5,5},{4,2,1,7,5,7},{5,2,7,4,3,4},{5,2,7,4,3,3},{5,2,7,4,3,2},{2,5,7,4,3,5},{4,2,7,1,5,5},{2,5,7,4,3,4},{2,5,7,4,3,3},{4,2,7,1,5,7},{4,2,7,1,5,4},{2,5,7,3,4,5},{2,5,7,3,4,4},{2,5,7,3,4,3},{4,2,7,5,1,5},{2,5,7,3,4,1},{4,2,7,5,1,4},{2,5,7,3,4,6},{5,2,7,3,4,5},{5,2,7,3,4,4},{5,2,7,3,4,3},{5,2,7,3,4,2},{5,2,7,3,4,1},{5,2,7,3,4,6},{4,7,2,5,1,5},{5,7,2,3,4,5},{4,7,2,5,1,4},{5,7,2,3,4,4},{4,7,2,5,1,3},{5,7,2,3,4,2},{6,1,2,5,3,6},{1,6,2,5,3,7},{1,6,2,5,3,4},{4,7,2,1,5,5},{4,7,2,1,5,7},{4,7,2,1,5,4},{4,7,2,1,5,3},{7,6,3,5,1,4},{7,6,3,5,1,3},{4,7,1,2,5,5},{4,7,1,2,5,7},{4,7,1,2,5,4},{4,7,1,2,5,3},{4,7,1,2,5,6},{6,7,3,5,1,4},{4,1,7,2,5,5},{4,1,7,2,5,7},{6,7,3,5,1,3},{4,1,7,2,5,4},{4,1,7,2,5,3},{4,1,7,2,5,6},{6,7,3,1,5,5},{1,4,7,2,5,4},{1,4,7,2,5,3},{1,4,7,5,2,5},{7,6,3,1,5,5},{1,4,7,5,2,4},{1,4,7,5,2,3},{7,6,3,1,5,3},{4,1,7,5,2,5},{4,1,7,5,2,7},{4,1,7,5,2,4},{4,1,7,5,2,3},{7,3,6,1,5,5},{7,3,6,1,5,7},{4,1,7,5,2,6},{4,7,1,5,2,5},{7,3,6,1,5,3},{4,7,1,5,2,7},{4,7,1,5,2,4},{4,7,1,5,2,3},{7,3,1,6,5,5},{7,3,1,6,5,7},{7,3,1,6,5,3},{4,7,1,5,2,6},{4,7,5,1,2,5},{4,7,5,1,2,7},{7,3,1,5,6,5},{7,3,1,5,6,3},{4,7,5,1,2,3},{7,1,3,5,6,5},{7,1,3,5,6,7},{4,7,5,2,1,5},{4,7,5,2,1,4},{7,1,3,6,5,5},{4,7,5,2,1,3},{4,7,5,2,1,2},{7,1,3,6,5,7},{7,4,5,2,1,5},{7,4,5,2,1,4},{7,1,6,3,5,5},{7,4,5,2,1,3},{7,4,5,2,1,2},{7,4,5,1,2,5},{7,6,1,3,5,5},{7,4,5,1,2,7},{7,4,5,1,2,3},{7,4,1,5,2,5},{6,7,1,3,5,5},{7,4,1,5,2,7},{7,4,1,5,2,3},{6,1,7,3,5,5},{7,1,4,5,2,5},{7,1,4,5,2,7},{7,1,4,5,2,3},{1,6,7,3,5,5},{1,6,7,3,5,3},{1,7,4,5,2,5},{1,7,4,5,2,4},{1,7,6,3,5,5},{1,7,4,5,2,3},{1,7,6,3,5,4},{1,7,6,3,5,3},{1,7,4,2,5,5},{1,7,3,6,5,5},{1,7,4,2,5,4},{1,7,3,6,5,7},{1,7,3,6,5,4},{1,7,4,2,5,3},{1,7,3,5,6,5},{7,1,4,2,5,5},{1,7,3,5,6,7},{1,7,3,5,6,4},{7,1,4,2,5,4},{7,1,4,2,5,3},{1,7,5,3,6,5},{1,7,5,3,6,4},{7,4,1,2,5,5},{1,7,5,3,6,2},{1,7,5,6,3,5},{7,4,1,2,5,3},{1,7,5,6,3,7},{1,7,5,6,3,4},{1,7,5,6,3,3},{1,7,5,6,3,2},{7,4,2,1,5,5},{7,4,2,1,5,7},{1,7,5,6,3,6},{7,4,2,1,5,4},{1,7,6,5,3,5},{7,4,2,1,5,3},{1,7,6,5,3,7},{1,7,6,5,3,4},{1,7,6,5,3,3},{7,4,2,5,1,5},{1,7,6,5,3,6},{1,6,7,5,3,5},{7,4,2,5,1,4},{1,6,7,5,3,7},{7,4,2,5,1,3},{1,6,7,5,3,3},{1,6,7,5,3,2},{1,6,7,5,3,6},{7,2,4,5,1,5},{6,1,7,5,3,5},{6,1,7,5,3,7},{7,2,4,5,1,3},{6,1,7,5,3,3},{6,1,7,5,3,2},{6,1,7,5,3,6},{7,2,4,1,5,5},{6,7,1,5,3,5},{7,2,4,1,5,7},{6,7,1,5,3,7},{6,7,1,5,3,4},{6,7,1,5,3,3},{7,2,4,1,5,3},{6,7,1,5,3,2},{6,7,1,5,3,6},{7,6,1,5,3,5},{7,6,1,5,3,7},{7,2,1,4,5,7},{7,6,1,5,3,4},{7,6,1,5,3,3},{7,2,1,4,5,4},{7,2,1,4,5,3},{7,6,1,5,3,1},{7,6,1,5,3,6},{7,1,6,5,3,5},{7,1,6,5,3,7},{7,1,2,4,5,7},{7,1,6,5,3,4},{7,1,2,4,5,4},{7,1,6,5,3,3},{7,1,2,4,5,3},{7,1,6,5,3,1},{7,1,6,5,3,6},{7,1,5,6,3,5},{7,1,5,6,3,7},{7,1,5,6,3,3},{1,7,2,4,5,7},{7,1,5,6,3,1},{1,7,2,4,5,4},{7,1,5,6,3,6},{1,7,2,4,5,3},{7,1,5,3,6,5},{1,2,7,4,5,7},{1,2,7,4,5,4},{7,5,1,3,6,5},{1,2,7,4,5,3},{1,2,7,4,5,6},{2,1,7,4,5,7},{2,1,7,4,5,4},{7,5,1,6,3,4},{2,1,7,4,5,3},{2,1,7,4,5,6},{2,7,1,4,5,7},{2,7,1,4,5,4},{7,5,6,1,3,4},{2,7,1,4,5,3},{2,7,1,4,5,6},{2,7,4,1,5,5},{7,6,5,1,3,4},{2,7,4,1,5,7},{6,7,5,1,3,4},{2,7,4,5,1,5},{2,7,4,5,1,4},{6,7,5,3,1,4},{6,7,5,3,1,3},{2,7,5,4,1,5},{7,6,5,3,1,4},{5,7,2,3,4,1},{7,6,5,3,1,3},{5,7,2,3,4,6},{5,7,3,2,4,5},{5,7,3,2,4,4},{7,5,6,3,1,4},{5,7,3,2,4,3},{7,5,6,3,1,3},{5,7,3,2,4,2},{7,5,3,6,1,5},{7,5,3,6,1,7},{5,7,3,2,4,1},{7,5,3,1,6,5},{7,5,3,1,6,7},{5,7,3,2,4,6},{5,7,3,4,2,5},{1,6,2,5,3,6},{1,2,6,5,3,7},{5,7,3,4,2,7},{5,7,3,2,6,5},{5,7,3,4,2,4},{5,7,3,2,6,4},{5,7,3,2,6,3},{5,7,3,4,2,3},{5,7,3,4,2,2},{5,7,3,4,2,6},{5,7,3,6,2,4},{5,3,7,4,2,5},{5,7,3,6,2,3},{5,3,7,4,2,7},{5,3,7,4,2,4},{5,3,7,4,2,2},{5,7,6,3,2,3},{5,3,7,4,2,6},{5,3,7,2,4,5},{1,2,6,5,3,4},{5,6,7,3,2,3},{5,6,7,3,2,1},{1,2,6,5,3,6},{6,5,7,3,2,3},{6,5,7,3,2,1},{1,2,5,6,3,6},{1,2,5,3,6,5},{6,5,7,2,3,3},{1,2,3,5,6,5},{5,6,7,2,3,3},{5,3,7,2,4,4},{5,3,7,2,4,3},{5,3,7,2,4,2},{5,3,7,2,4,1},{5,3,7,2,4,6},{5,3,2,7,4,5},{1,2,3,6,5,5},{5,3,2,7,4,4},{1,2,3,6,5,4},{5,3,2,7,4,3},{5,3,2,7,4,2},{5,3,2,7,4,1},{5,3,2,7,4,6},{1,2,3,6,5,6},{5,2,3,7,4,5},{1,2,6,3,5,7},{5,2,3,7,4,4},{1,2,6,3,5,4},{5,2,3,7,4,3},{5,2,3,7,4,2},{5,2,3,7,4,1},{1,2,6,3,5,6},{5,2,3,7,4,6},{1,6,2,3,5,7},{2,5,3,7,4,5},{1,6,2,3,5,4},{2,5,3,7,4,4},{2,5,3,7,4,3},{1,6,2,3,5,6},{6,1,2,3,5,7},{2,5,3,7,4,1},{6,1,2,3,5,4},{2,5,3,7,4,6},{2,3,5,7,4,5},{6,1,2,3,5,6},{2,3,5,7,4,4},{2,3,5,7,4,3},{2,3,5,7,4,2},{6,2,1,3,5,7},{2,3,5,7,4,1},{6,2,1,3,5,4},{2,3,5,7,4,6},{3,2,5,7,4,5},{3,2,5,7,4,4},{6,2,1,3,5,6},{3,2,5,7,4,3},{3,2,5,7,4,2},{2,6,1,3,5,7},{3,2,5,7,4,1},{3,2,5,7,4,6},{2,6,1,3,5,4},{3,5,2,7,4,5},{3,5,2,7,4,4},{2,6,1,3,5,6},{3,5,2,7,4,3},{3,5,2,7,4,2},{3,5,2,7,4,1},{2,1,6,3,5,7},{3,5,2,7,4,6},{2,1,6,3,5,4},{3,5,7,2,4,5},{3,5,7,2,4,4},{3,5,7,2,4,3},{2,1,6,3,5,6},{3,5,7,2,4,1},{3,5,7,4,2,5},{2,1,3,6,5,4},{3,5,7,4,2,7},{3,5,7,4,2,4},{3,5,7,4,2,3},{2,1,3,6,5,6},{3,5,4,7,2,5},{3,5,4,7,2,3},{3,5,4,2,7,5},{3,5,4,2,7,4},{3,5,4,2,7,3},{3,5,2,4,7,5},{2,3,1,6,5,4},{3,5,2,4,7,4},{3,5,2,4,7,3},{2,3,1,6,5,6},{3,5,2,4,7,2},{2,3,6,1,5,4},{3,2,5,4,7,5},{2,3,6,1,5,6},{3,2,5,4,7,4},{3,2,5,4,7,3},{3,2,5,4,7,2},{2,6,3,1,5,4},{3,2,5,4,7,6},{2,3,5,4,7,5},{2,6,3,1,5,6},{2,3,5,4,7,4},{6,2,3,1,5,4},{2,3,5,4,7,3},{2,3,5,4,7,6},{6,2,3,1,5,6},{2,5,3,4,7,5},{6,2,3,5,1,5},{2,5,3,4,7,4},{2,5,3,4,7,3},{2,5,3,4,7,6},{5,2,3,4,7,5},{5,2,3,4,7,4},{5,2,3,4,7,6},{5,3,2,4,7,5},{2,3,6,5,1,5},{5,3,2,4,7,4},{5,3,2,4,7,3},{5,3,2,4,7,2},{2,3,5,6,1,5},{2,3,5,6,1,7},{5,3,4,2,7,5},{2,3,5,6,1,4},{5,3,4,2,7,4},{5,3,4,2,7,3},{2,3,5,1,6,5},{2,3,5,1,6,7},{2,3,5,1,6,4},{5,3,4,7,2,5},{5,3,4,7,2,7},{3,2,5,1,6,5},{3,2,5,1,6,7},{3,2,5,1,6,4},{3,2,5,6,1,5},{3,2,5,6,1,7},{3,2,5,6,1,4},{5,3,4,7,2,3},{3,2,6,5,1,5},{5,4,3,7,2,5},{5,4,3,7,2,7},{5,4,3,7,2,3},{5,4,3,2,7,5},{5,4,3,2,7,4},{5,4,3,2,7,3},{3,6,2,5,1,5},{5,4,2,3,7,5},{5,4,2,3,7,4},{5,4,2,3,7,3},{5,4,2,3,7,1},{6,3,2,5,1,5},{5,4,2,3,7,6},{5,2,4,3,7,5},{5,2,4,3,7,4},{5,2,4,3,7,3},{5,2,4,3,7,1},{5,2,4,3,7,6},{2,5,4,3,7,5},{3,6,2,1,5,5},{2,5,4,3,7,4},{2,5,4,3,7,3},{2,5,4,3,7,1},{2,5,4,3,7,6},{3,2,6,1,5,5},{2,5,4,7,3,5},{2,5,4,7,3,4},{2,5,4,7,3,3},{3,2,1,6,5,5},{2,5,4,7,3,1},{5,2,4,7,3,5},{5,2,4,7,3,4},{3,2,1,5,6,5},{5,2,4,7,3,3},{5,2,4,7,3,1},{5,4,2,7,3,5},{5,4,2,7,3,4},{3,1,2,5,6,5},{5,4,2,7,3,3},{5,4,2,7,3,1},{5,4,7,2,3,5},{3,1,2,6,5,5},{5,4,7,2,3,4},{5,4,7,2,3,3},{5,4,7,2,3,1},{5,4,7,3,2,5},{5,4,7,3,2,7},{5,4,7,3,2,4},{4,5,7,3,2,5},{4,5,7,3,2,7},{4,5,7,3,2,4},{6,3,1,2,5,7},{4,5,7,2,3,5},{4,5,7,2,3,4},{4,5,7,2,3,3},{4,5,7,2,3,1},{6,1,3,2,5,7},{4,5,2,7,3,5},{4,5,2,7,3,4},{4,5,2,7,3,3},{4,5,2,7,3,1},{1,6,3,2,5,7},{4,2,5,7,3,5},{4,2,5,7,3,4},{4,2,5,7,3,3},{4,2,5,7,3,1},{2,4,5,7,3,5},{2,4,5,7,3,4},{2,4,5,7,3,3},{1,3,2,6,5,5},{2,4,5,7,3,1},{2,4,5,3,7,4},{2,4,5,3,7,3},{1,3,2,5,6,5},{2,4,5,3,7,1},{4,2,5,3,7,5},{4,2,5,3,7,4},{4,2,5,3,7,3},{1,3,5,2,6,5},{4,2,5,3,7,1},{4,5,2,3,7,5},{4,5,2,3,7,4},{4,5,2,3,7,3},{4,5,2,3,7,1},{4,5,2,3,7,6},{2,7,5,4,1,4},{2,7,5,4,1,6},{2,7,5,1,4,5},{2,7,5,1,4,7},{2,7,5,1,4,4},{2,7,5,1,4,1},{5,7,6,2,3,5},{2,7,1,5,4,7},{2,7,1,5,4,4},{5,7,6,2,3,3},{2,7,1,5,4,2},{2,7,1,5,4,1},{5,7,2,6,3,5},{2,1,7,5,4,7},{2,1,7,5,4,2},{2,1,7,5,4,1},{5,7,2,6,3,4},{1,2,7,5,4,3},{5,7,2,6,3,3},{1,2,7,5,4,2},{5,7,2,3,6,5},{5,7,2,3,6,4},{5,7,2,3,6,3},{1,7,2,5,4,3},{5,2,7,3,6,5},{5,2,7,3,6,4},{7,1,2,5,4,3},{5,2,7,3,6,3},{5,2,7,6,3,5},{7,2,1,5,4,7},{5,2,7,6,3,4},{5,2,7,6,3,3},{7,2,1,5,4,2},{7,2,1,5,4,1},{7,2,5,1,4,5},{7,2,5,1,4,7},{7,2,5,1,4,4},{5,2,6,7,3,4},{5,2,6,7,3,3},{7,2,5,1,4,2},{7,2,5,1,4,1},{5,6,2,7,3,3},{6,5,2,7,3,3},{7,2,5,4,1,5},{6,2,5,7,3,3},{6,2,5,7,3,1},{7,5,2,4,1,5},{2,6,5,7,3,4},{2,6,5,7,3,3},{2,6,5,7,3,1},{7,5,2,1,4,5},{2,5,6,7,3,4},{2,5,6,7,3,3},{2,5,6,7,3,1},{7,5,1,2,4,5},{2,5,7,6,3,4},{7,5,1,2,4,4},{7,5,1,2,4,3},{2,5,7,6,3,1},{2,5,7,3,6,5},{2,5,7,3,6,4},{2,5,7,3,6,3},{7,1,5,2,4,4},{7,1,5,2,4,3},{2,5,7,3,6,1},{2,5,3,7,6,5},{2,5,3,7,6,4},{2,5,3,7,6,3},{1,7,5,2,4,4},{1,7,5,2,4,3},{1,7,5,2,4,2},{2,5,3,6,7,4},{1,7,5,4,2,5},{2,5,3,6,7,3},{1,7,5,4,2,4},{1,7,5,4,2,3},{1,7,5,4,2,1},{2,5,6,3,7,4},{7,1,5,4,2,5},{2,5,6,3,7,3},{7,1,5,4,2,7},{7,1,5,4,2,4},{7,1,5,4,2,3},{2,5,6,3,7,6},{2,6,5,3,7,4},{7,5,1,4,2,5},{2,6,5,3,7,3},{7,5,1,4,2,7},{7,5,1,4,2,4},{2,6,5,3,7,6},{6,2,5,3,7,4},{7,5,4,1,2,5},{6,2,5,3,7,3},{7,5,4,1,2,7},{7,5,4,1,2,3},{7,5,4,2,1,5},{7,5,4,2,1,4},{7,5,4,2,1,3},{7,5,4,2,1,2},{5,7,4,3,6,7},{5,7,4,3,6,4},{5,7,4,3,6,3},{6,2,5,3,7,6},{5,7,4,6,3,5},{5,7,4,6,3,7},{6,5,2,3,7,3},{6,5,2,3,7,2},{5,7,4,6,3,4},{5,7,4,6,3,3},{6,5,2,3,7,6},{5,7,4,6,3,1},{5,7,6,4,3,5},{5,6,2,3,7,3},{5,6,2,3,7,2},{5,7,6,4,3,4},{5,6,2,3,7,6},{5,7,6,4,3,3},{5,7,6,4,3,2},{5,2,6,3,7,3},{5,7,6,4,3,6},{5,2,6,3,7,2},{5,6,7,4,3,5},{5,2,6,3,7,6},{5,2,3,6,7,5},{5,2,3,6,7,3},{5,6,7,4,3,4},{5,2,3,7,6,5},{5,6,7,4,3,6},{6,5,7,4,3,5},{5,2,3,7,6,4},{5,2,3,7,6,3},{6,5,7,4,3,4},{5,3,2,7,6,5},{5,3,2,7,6,4},{5,3,2,6,7,5},{5,3,2,6,7,3},{5,3,6,2,7,3},{5,6,3,2,7,4},{5,3,7,4,6,7},{6,5,3,2,7,4},{6,5,3,2,7,3},{5,3,7,4,6,4},{5,3,7,4,6,3},{5,3,7,6,4,5},{6,5,3,7,2,3},{5,3,7,6,4,4},{5,3,7,6,4,3},{6,5,3,7,2,1},{5,3,7,6,4,2},{5,3,6,7,4,5},{5,3,6,7,4,4},{5,6,3,7,2,1},{5,3,6,7,4,3},{5,6,3,7,4,5},{5,3,6,7,2,3},{5,6,3,7,4,4},{5,6,3,7,4,3},{5,6,3,7,4,2},{5,3,7,6,2,4},{6,5,3,7,4,5},{5,3,7,2,6,5},{5,3,7,2,6,4},{6,5,3,7,4,4},{3,5,7,2,6,5},{6,5,3,7,4,3},{6,5,3,7,4,2},{6,3,5,7,4,5},{6,3,5,7,4,7},{6,3,5,7,4,4},{6,3,5,7,4,3},{6,3,5,7,4,2},{3,5,7,6,2,3},{3,6,5,7,4,5},{3,6,5,7,4,7},{3,6,5,7,4,4},{3,6,5,7,4,3},{3,5,6,7,2,3},{3,5,6,7,4,5},{3,5,6,7,4,7},{3,5,6,7,4,4},{3,5,6,7,4,3},{3,6,5,7,2,3},{6,3,5,7,2,3},{6,3,5,7,2,1},{3,5,7,6,4,5},{3,5,7,6,4,7},{3,5,7,6,4,4},{6,3,5,2,7,4},{6,3,5,2,7,3},{3,5,7,6,4,3},{3,5,7,4,6,5},{3,5,7,4,6,7},{3,5,7,4,6,4},{3,6,5,2,7,3},{3,5,7,4,6,3},{3,5,4,7,6,5},{3,5,4,7,6,3},{3,5,4,6,7,5},{3,5,4,6,7,4},{3,5,6,2,7,3},{3,5,2,6,7,5},{3,5,2,6,7,3},{3,5,2,7,6,5},{4,5,3,2,7,5},{4,5,3,2,7,4},{4,5,3,2,7,3},{4,5,3,7,2,5},{4,5,3,7,2,7},{4,5,3,7,2,3},{1,6,3,5,2,5},{4,3,5,7,2,5},{4,3,5,7,2,3},{6,1,3,5,2,5},{4,3,5,2,7,5},{4,3,5,2,7,4},{4,3,5,2,7,3},{6,3,1,5,2,5},{4,3,2,5,7,5},{4,3,2,5,7,4},{4,3,2,5,7,3},{4,3,2,5,7,2},{4,2,3,5,7,4},{4,2,3,5,7,3},{4,2,3,5,7,6},{3,1,5,2,6,5},{2,4,3,5,7,4},{2,4,3,5,7,3},{2,4,3,5,7,6},{2,3,4,5,7,4},{2,3,4,5,7,3},{2,3,4,5,7,6},{3,2,4,5,7,5},{3,2,4,5,7,4},{3,2,4,5,7,3},{3,2,4,5,7,2},{3,4,2,5,7,5},{3,5,6,1,2,4},{3,4,2,5,7,4},{3,4,2,5,7,3},{3,4,2,5,7,2},{3,4,5,2,7,5},{6,3,5,1,2,5},{3,4,5,2,7,4},{6,3,5,2,1,5},{3,4,5,2,7,3},{3,4,5,7,2,5},{3,6,5,2,1,4},{3,4,5,7,2,3},{3,5,6,2,1,4},{3,5,2,6,1,4},{3,5,2,1,6,4},{5,4,6,2,1,3},{5,6,4,2,1,5},{5,6,4,2,1,3},{6,5,4,2,1,5},{6,5,4,1,2,5},{5,6,4,1,2,5},{4,3,7,5,2,5},{4,3,7,5,2,4},{4,3,7,5,2,3},{3,5,4,6,7,3},{3,5,6,4,7,5},{3,5,6,4,7,7},{3,5,6,4,7,4},{3,5,2,7,6,3},{3,5,6,4,7,3},{3,5,6,4,7,6},{3,2,5,7,6,5},{3,6,5,4,7,5},{3,6,5,4,7,7},{3,2,5,7,6,4},{3,2,5,7,6,3},{3,6,5,4,7,4},{3,6,5,4,7,3},{3,6,5,4,7,6},{3,2,5,6,7,5},{6,3,5,4,7,5},{6,3,5,4,7,7},{3,2,5,6,7,4},{3,2,5,6,7,3},{6,3,5,4,7,4},{6,3,5,4,7,3},{6,3,5,4,7,2},{6,3,5,4,7,6},{6,5,3,4,7,5},{6,5,3,4,7,4},{6,5,3,4,7,3},{6,5,3,4,7,2},{5,6,3,4,7,5},{5,6,3,4,7,4},{5,6,3,4,7,3},{5,6,3,4,7,2},{3,2,6,5,7,5},{5,3,6,4,7,5},{3,2,6,5,7,3},{3,6,2,5,7,5},{3,6,2,5,7,4},{3,6,2,5,7,3},{5,3,6,4,7,4},{6,3,2,5,7,4},{5,3,6,4,7,3},{6,3,2,5,7,3},{5,3,6,4,7,6},{5,3,4,6,7,5},{5,3,4,6,7,4},{6,2,3,5,7,4},{5,3,4,6,7,3},{6,2,3,5,7,3},{2,6,3,5,7,4},{2,6,3,5,7,3},{2,3,6,5,7,3},{2,3,5,6,7,4},{2,3,5,6,7,3},{2,3,5,7,6,5},{2,3,5,7,6,4},{2,3,5,7,6,3},{2,3,7,5,6,5},{2,3,7,5,6,4},{2,3,7,6,5,5},{2,3,7,6,5,4},{2,3,7,6,5,3},{2,3,7,6,5,6},{2,3,6,7,5,4},{2,3,6,7,5,3},{2,3,6,7,5,6},{2,6,3,7,5,7},{2,6,3,7,5,4},{2,6,3,7,5,3},{2,6,3,7,5,6},{6,2,3,7,5,7},{6,2,3,7,5,4},{6,2,3,7,5,3},{6,2,3,7,5,6},{6,3,2,7,5,7},{6,3,2,7,5,4},{6,3,2,7,5,3},{3,6,2,7,5,4},{3,6,2,7,5,3},{3,2,6,7,5,4},{3,2,6,7,5,3},{3,2,7,6,5,4},{3,2,7,5,6,5},{3,2,7,5,6,4},{3,2,7,5,6,3},{3,7,2,5,6,5},{3,7,2,5,6,4},{3,7,2,6,5,4},{3,7,6,2,5,3},{3,6,7,2,5,4},{6,3,7,2,5,7},{6,3,7,2,5,4},{6,3,7,5,2,3},{3,6,7,5,2,3},{4,3,5,7,6,5},{3,6,7,5,2,1},{4,3,5,7,6,4},{4,3,5,7,6,3},{3,7,6,5,2,3},{4,3,5,6,7,5},{3,7,6,5,2,1},{4,3,5,6,7,4},{4,3,5,6,7,3},{3,7,5,6,2,1},{4,3,6,5,7,5},{3,7,5,2,6,5},{4,3,6,5,7,4},{4,3,6,5,7,3},{4,3,6,5,7,6},{3,7,5,2,6,1},{4,6,3,5,7,5},{7,3,5,2,6,5},{4,6,3,5,7,4},{4,6,3,5,7,3},{7,3,5,2,6,3},{4,6,3,5,7,6},{6,4,3,5,7,4},{6,4,3,5,7,3},{6,4,3,5,7,6},{7,3,5,6,2,3},{7,3,6,5,2,3},{7,6,3,5,2,3},{6,7,3,5,2,3},{6,7,3,2,5,7},{6,7,3,2,5,4},{7,6,3,2,5,7},{7,6,3,2,5,4},{7,3,6,2,5,5},{7,3,2,6,5,5},{7,3,2,5,6,5},{6,4,2,7,3,7},{6,4,2,7,3,1},{6,4,2,7,3,6},{4,6,2,7,3,5},{4,6,2,7,3,7},{4,6,2,7,3,1},{4,6,2,7,3,6},{4,2,6,7,3,5},{4,2,6,7,3,7},{4,2,6,7,3,6},{4,2,7,6,3,5},{4,2,7,6,3,7},{4,2,7,6,3,6},{4,2,7,3,6,7},{4,2,7,3,6,2},{4,2,7,3,6,1},{4,2,7,3,6,6},{4,7,2,3,6,1},{4,7,2,3,6,6},{4,7,2,6,3,7},{4,7,2,6,3,6},{4,7,6,2,3,5},{4,7,6,2,3,7},{4,7,6,2,3,1},{4,7,6,2,3,6},{4,6,7,2,3,5},{4,6,7,2,3,7},{4,6,7,2,3,1},{4,6,7,2,3,6},{6,4,7,2,3,5},{6,4,7,2,3,7},{6,4,7,2,3,1},{6,4,7,2,3,6},{6,4,7,3,2,5},{6,4,7,3,2,7},{6,4,7,3,2,1},{6,4,7,3,2,6},{4,6,7,3,2,5},{4,6,7,3,2,7},{4,6,7,3,2,2},{4,6,7,3,2,1},{4,6,7,3,2,6},{4,7,6,3,2,7},{4,7,6,3,2,2},{4,7,6,3,2,1},{4,7,6,3,2,6},{4,7,3,6,2,5},{4,7,3,6,2,7},{4,7,3,6,2,2},{4,7,3,6,2,1},{4,7,3,6,2,6},{4,7,3,2,6,5},{4,7,3,2,6,7},{4,7,3,2,6,2},{4,7,3,2,6,1},{4,7,3,2,6,6},{7,4,3,2,1,5},{7,4,3,2,1,2},{7,4,3,2,1,1},{7,4,3,1,2,5},{7,4,3,1,2,7},{7,4,3,1,2,2},{7,4,3,1,2,1},{7,4,3,1,2,6},{7,4,1,3,2,5},{7,4,1,3,2,7},{7,4,1,3,2,2},{7,4,1,3,2,6},{7,1,4,3,2,5},{7,1,4,3,2,7},{7,1,4,3,2,2},{7,1,4,3,2,1},{1,7,4,3,2,7},{1,7,4,3,2,2},{2,6,1,7,4,4},{2,6,1,7,4,3},{6,2,1,7,4,4},{1,7,4,3,2,1},{6,2,1,7,4,3},{1,7,4,3,2,6},{1,7,4,2,3,7},{1,7,4,2,3,2},{6,1,2,7,4,4},{1,7,4,2,3,6},{6,1,2,7,4,3},{7,1,4,2,3,5},{7,1,4,2,3,7},{1,6,2,7,4,4},{1,6,2,7,4,3},{7,1,4,2,3,6},{7,4,1,2,3,5},{7,4,1,2,3,7},{7,4,1,2,3,2},{7,4,1,2,3,1},{7,4,1,2,3,6},{7,4,2,1,3,5},{7,4,2,1,3,7},{7,4,2,1,3,2},{7,4,2,1,3,1},{7,4,2,3,1,5},{7,4,2,3,1,2},{7,4,2,3,1,1},{7,2,4,3,1,5},{7,2,4,3,1,7},{7,2,3,5,6,5},{3,4,7,5,6,4},{7,2,3,5,6,4},{3,4,7,5,6,3},{3,4,7,6,5,5},{7,2,3,6,5,5},{3,4,7,6,5,7},{3,4,7,6,5,4},{7,2,3,6,5,4},{3,4,7,6,5,3},{7,2,3,6,5,3},{7,2,3,6,5,6},{3,4,6,7,5,5},{7,2,6,3,5,5},{3,4,6,7,5,7},{7,2,6,3,5,7},{3,4,6,7,5,4},{7,2,6,3,5,4},{3,4,6,7,5,3},{7,2,6,3,5,3},{3,6,4,7,5,5},{7,2,6,3,5,6},{3,6,4,7,5,7},{7,6,2,3,5,5},{7,6,2,3,5,7},{3,6,4,7,5,4},{7,6,2,3,5,4},{3,6,4,7,5,3},{7,6,2,3,5,3},{7,6,2,3,5,6},{6,7,2,3,5,7},{3,6,4,7,5,6},{6,3,4,7,5,5},{6,7,2,3,5,4},{6,7,2,3,5,3},{6,3,4,7,5,4},{6,3,4,7,5,3},{6,7,2,3,5,6},{6,2,7,3,5,7},{6,3,4,7,5,6},{6,2,7,3,5,4},{6,2,7,3,5,3},{6,2,7,3,5,6},{2,6,7,3,5,7},{2,6,7,3,5,4},{2,6,7,3,5,3},{2,6,7,3,5,6},{2,7,6,3,5,5},{2,7,6,3,5,7},{2,7,6,3,5,4},{2,7,6,3,5,3},{2,7,6,3,5,6},{2,7,3,6,5,5},{2,7,3,6,5,4},{2,7,3,6,5,3},{2,7,3,6,5,6},{2,7,3,5,6,5},{2,7,3,5,6,4},{2,7,5,3,6,5},{2,7,5,3,6,4},{4,7,3,5,6,5},{4,7,3,5,6,7},{2,7,5,3,6,1},{4,7,3,5,6,4},{4,7,3,5,6,3},{2,7,5,6,3,5},{2,7,5,6,3,4},{4,7,3,6,5,5},{4,7,3,6,5,7},{2,7,5,6,3,1},{4,7,3,6,5,4},{4,7,3,6,5,3},{2,7,6,5,3,5},{2,7,6,5,3,4},{4,7,6,3,5,5},{4,7,6,3,5,7},{4,7,6,3,5,4},{4,7,6,3,5,3},{2,6,7,5,3,4},{4,6,7,3,5,5},{2,6,7,5,3,1},{4,6,7,3,5,7},{4,6,7,3,5,4},{4,6,7,3,5,3},{6,2,7,5,3,4},{4,6,7,3,5,6},{6,2,7,5,3,1},{6,4,7,3,5,5},{6,4,7,3,5,4},{6,7,2,5,3,4},{6,4,7,3,5,3},{6,7,2,5,3,1},{6,4,7,3,5,6},{6,4,7,5,3,5},{7,6,2,5,3,5},{6,4,7,5,3,7},{6,4,7,5,3,4},{7,6,2,5,3,4},{6,4,7,5,3,3},{7,6,2,5,3,3},{6,4,7,5,3,1},{4,6,7,5,3,5},{7,2,6,5,3,5},{4,6,7,5,3,7},{4,6,7,5,3,4},{7,2,6,5,3,4},{4,6,7,5,3,3},{7,2,6,5,3,3},{4,7,6,5,3,5},{7,2,5,6,3,5},{4,7,6,5,3,7},{7,2,5,6,3,4},{4,7,6,5,3,4},{7,2,5,6,3,3},{4,7,6,5,3,3},{7,2,5,3,6,5},{4,7,5,6,3,5},{7,2,5,3,6,4},{4,7,5,6,3,7},{4,7,5,6,3,4},{4,7,5,6,3,3},{7,5,2,3,6,5},{4,7,5,3,6,5},{4,7,5,3,6,7},{7,5,2,3,6,3},{4,7,5,3,6,4},{4,7,5,3,6,3},{7,5,2,6,3,5},{7,4,5,3,6,5},{7,4,5,3,6,7},{7,5,2,6,3,3},{7,4,5,3,6,4},{7,5,6,2,3,5},{7,5,6,2,3,4},{7,5,6,2,3,3},{7,6,5,2,3,5},{7,6,5,2,3,4},{7,6,5,2,3,3},{6,7,5,2,3,4},{7,4,5,3,6,3},{6,7,5,2,3,3},{7,4,5,6,3,5},{7,4,5,6,3,7},{7,4,5,6,3,4},{7,4,5,6,3,3},{6,7,5,3,2,3},{7,4,5,6,3,6},{7,4,6,5,3,5},{7,4,6,5,3,7},{7,4,6,5,3,4},{7,6,5,3,2,3},{7,4,6,5,3,3},{7,4,6,5,3,2},{7,4,6,5,3,6},{7,6,4,5,3,5},{7,6,4,5,3,4},{7,6,4,5,3,3},{7,6,4,5,3,2},{7,6,4,5,3,6},{6,7,4,5,3,5},{6,7,4,5,3,7},{6,7,4,5,3,4},{6,7,4,5,3,3},{7,5,3,6,2,3},{6,7,4,3,5,5},{7,5,3,2,6,5},{6,7,4,3,5,4},{6,7,4,3,5,3},{7,5,3,2,6,3},{6,7,4,3,5,6},{7,6,4,3,5,5},{5,7,3,2,1,5},{7,6,4,3,5,4},{7,6,4,3,5,3},{5,7,3,2,1,4},{5,7,3,2,1,3},{7,6,4,3,5,6},{7,4,6,3,5,5},{7,4,6,3,5,7},{5,7,3,1,2,5},{7,4,6,3,5,4},{5,7,3,1,2,4},{7,4,6,3,5,3},{5,7,3,1,2,3},{5,7,3,1,2,1},{7,4,6,3,5,6},{7,4,3,6,5,5},{7,4,3,6,5,7},{7,4,3,6,5,4},{7,4,3,6,5,3},{7,4,3,5,6,5},{7,4,3,5,6,7},{7,4,3,5,6,4},{7,4,3,5,6,3},{5,7,2,1,3,5},{5,7,2,1,3,3},{5,7,2,3,1,5},{5,7,2,3,1,3},{5,2,7,3,1,5},{5,2,7,3,1,3},{5,2,7,1,3,5},{5,2,7,1,3,3},{1,2,6,7,4,4},{1,2,6,7,4,3},{1,2,7,6,4,3},{1,2,7,4,6,4},{1,2,7,4,6,3},{1,2,4,7,6,4},{1,2,4,7,6,3},{1,2,4,6,7,4},{7,2,4,3,1,2},{7,2,4,3,1,1},{1,2,6,4,7,4},{7,2,4,1,3,5},{7,2,4,1,3,2},{7,2,4,1,3,1},{1,6,2,4,7,4},{7,2,1,4,3,5},{7,2,1,4,3,6},{6,1,2,4,7,4},{7,1,2,4,3,5},{6,2,1,4,7,4},{7,1,2,4,3,6},{6,2,1,4,7,3},{1,7,2,4,3,2},{2,6,1,4,7,4},{1,7,2,4,3,6},{2,1,6,4,7,4},{1,2,7,4,3,2},{1,2,7,4,3,6},{2,1,4,6,7,4},{2,1,7,4,3,1},{2,1,7,4,3,6},{2,1,4,7,6,4},{2,7,1,4,3,1},{2,7,1,4,3,6},{2,7,4,1,3,5},{2,7,4,1,3,2},{2,7,4,1,3,1},{2,7,4,1,3,6},{2,7,4,3,1,7},{2,7,4,3,1,2},{2,4,1,7,6,4},{2,7,4,3,1,1},{2,7,4,3,1,6},{2,4,1,6,7,4},{6,2,4,1,7,3},{6,2,4,7,1,3},{2,4,7,1,6,4},{4,2,7,1,6,4},{4,6,2,7,1,3},{6,4,2,7,1,3},{6,4,2,1,7,3},{4,6,2,1,7,3},{4,2,1,6,7,4},{4,2,1,6,7,3},{4,2,1,7,6,4},{4,1,2,7,6,4},{4,1,2,7,6,3},{3,7,4,2,1,5},{3,7,4,2,1,7},{3,7,4,2,1,2},{4,1,2,6,7,4},{3,7,4,2,1,1},{3,7,4,2,1,6},{3,7,4,1,2,5},{3,7,4,1,2,7},{4,1,6,2,7,4},{3,7,4,1,2,1},{3,7,4,1,2,6},{3,7,1,4,2,5},{3,7,1,4,2,2},{4,6,1,2,7,4},{3,7,1,4,2,1},{3,7,1,4,2,6},{3,1,7,4,2,7},{3,1,7,4,2,2},{3,1,7,4,2,1},{6,4,1,2,7,4},{3,1,7,4,2,6},{1,3,7,4,2,7},{1,3,7,4,2,2},{1,3,7,4,2,1},{6,1,4,2,7,4},{1,3,7,2,4,5},{1,3,7,2,4,2},{1,6,4,2,7,4},{1,3,7,2,4,1},{3,1,7,2,4,5},{3,1,7,2,4,2},{1,4,6,2,7,4},{3,1,7,2,4,1},{3,7,1,2,4,5},{3,7,1,2,4,2},{1,4,2,6,7,4},{3,7,1,2,4,1},{3,7,2,1,4,5},{3,7,2,1,4,2},{1,4,2,7,6,4},{3,7,2,1,4,1},{3,7,2,1,4,6},{3,7,2,4,1,5},{3,7,2,4,1,7},{1,4,7,2,6,3},{3,7,2,4,1,1},{3,7,2,4,1,6},{3,2,7,4,1,5},{3,2,7,4,1,7},{3,2,7,4,1,1},{3,2,7,4,1,6},{3,2,7,1,4,5},{3,2,7,1,4,2},{2,5,7,1,3,4},{2,5,7,1,3,3},{2,5,7,1,3,1},{2,5,7,3,1,5},{2,5,7,3,1,4},{2,5,7,3,1,3},{2,5,7,3,1,2},{7,5,3,4,6,7},{7,5,3,4,6,4},{7,5,3,4,6,3},{7,5,3,6,4,5},{7,5,3,6,4,7},{7,5,3,6,4,4},{7,5,3,6,4,3},{7,5,6,3,4,5},{7,5,6,3,4,4},{7,5,6,3,4,3},{7,5,6,3,4,1},{7,6,5,3,4,5},{7,6,5,3,4,4},{7,6,5,3,4,3},{7,6,5,3,4,1},{6,7,5,3,4,5},{6,7,5,3,4,3},{3,2,7,1,4,1},{3,2,7,1,4,6},{1,4,7,6,2,3},{3,2,1,7,4,5},{3,2,1,7,4,2},{3,2,1,7,4,1},{3,2,1,7,4,6},{3,1,2,7,4,2},{3,1,2,7,4,1},{1,3,2,7,4,2},{1,3,2,7,4,1},{6,1,4,7,2,4},{1,2,3,7,4,2},{1,2,3,7,4,6},{6,4,1,7,2,4},{6,4,1,7,2,3},{2,1,3,7,4,2},{4,6,1,7,2,4},{4,6,1,7,2,3},{2,1,3,7,4,6},{4,1,6,7,2,4},{4,1,6,7,2,3},{2,3,1,7,4,2},{2,3,1,7,4,6},{2,3,7,1,4,2},{4,1,7,6,2,3},{2,3,7,1,4,6},{2,3,7,4,1,7},{4,1,7,2,6,3},{2,3,7,4,1,2},{2,3,7,4,1,1},{4,7,1,2,6,3},{2,3,4,7,1,2},{2,3,4,7,1,1},{4,7,1,6,2,4},{2,3,4,1,7,2},{4,7,1,6,2,3},{2,3,4,1,7,1},{4,7,6,1,2,4},{2,3,1,4,7,2},{2,3,1,4,7,1},{2,3,1,4,7,6},{2,1,3,4,7,2},{4,6,7,1,2,4},{2,1,3,4,7,1},{4,6,7,1,2,3},{2,1,3,4,7,6},{6,4,7,1,2,4},{1,2,3,4,7,2},{6,4,7,1,2,3},{1,2,3,4,7,1},{1,2,3,4,7,6},{1,3,2,4,7,2},{6,4,7,2,1,3},{1,3,2,4,7,1},{3,1,2,4,7,2},{4,6,7,2,1,3},{3,1,2,4,7,1},{4,7,6,2,1,3},{3,2,1,4,7,2},{3,2,1,4,7,1},{3,2,1,4,7,6},{3,2,4,1,7,6},{3,2,4,7,1,5},{4,7,2,1,6,4},{3,2,4,7,1,7},{7,4,3,1,6,5},{7,4,3,1,6,7},{3,2,4,7,1,6},{3,4,2,7,1,5},{3,4,2,7,1,7},{3,4,2,7,1,6},{7,4,3,1,6,2},{7,4,3,1,6,6},{7,4,3,6,1,5},{7,4,3,6,1,7},{3,4,2,1,7,6},{7,4,3,6,1,2},{7,4,3,6,1,6},{7,4,6,3,1,5},{7,4,6,3,1,7},{3,4,1,2,7,6},{7,4,6,3,1,2},{7,4,6,3,1,6},{7,6,4,3,1,5},{7,6,4,3,1,7},{3,1,4,2,7,2},{3,1,4,2,7,1},{7,6,4,3,1,2},{3,1,4,2,7,6},{7,6,4,3,1,6},{6,7,4,3,1,5},{6,7,4,3,1,7},{1,3,4,2,7,2},{6,7,4,3,1,2},{1,3,4,2,7,1},{6,7,4,3,1,6},{6,7,4,1,3,5},{6,7,4,1,3,7},{6,7,4,1,3,2},{1,3,4,7,2,2},{6,7,4,1,3,1},{1,3,4,7,2,1},{6,7,4,1,3,6},{7,6,4,1,3,5},{7,6,4,1,3,7},{3,1,4,7,2,7},{7,6,4,1,3,2},{7,6,4,1,3,1},{3,1,4,7,2,2},{7,6,4,1,3,6},{3,1,4,7,2,1},{3,1,4,7,2,6},{7,4,6,1,3,5},{3,4,1,7,2,5},{7,4,6,1,3,7},{3,4,1,7,2,7},{3,4,1,7,2,6},{7,4,6,1,3,6},{3,4,7,1,2,5},{7,4,1,6,3,5},{3,4,7,1,2,7},{7,4,1,6,3,7},{3,4,7,1,2,2},{3,4,7,1,2,1},{7,4,1,6,3,2},{3,4,7,1,2,6},{3,4,7,2,1,5},{7,4,1,6,3,6},{3,4,7,2,1,7},{7,4,1,3,6,5},{3,4,7,2,1,2},{7,4,1,3,6,7},{3,4,7,2,1,1},{3,4,7,2,1,6},{7,4,1,3,6,2},{7,4,1,3,6,6},{7,1,4,3,6,7},{7,1,4,3,6,6},{7,1,4,6,3,5},{7,1,4,6,3,7},{7,1,4,6,3,2},{7,1,4,6,3,1},{7,1,4,6,3,6},{7,1,6,4,3,5},{7,1,6,4,3,7},{7,1,6,4,3,2},{7,1,6,4,3,1},{7,1,6,4,3,6},{7,6,1,4,3,5},{7,6,1,4,3,7},{7,6,1,4,3,2},{7,6,1,4,3,1},{7,6,1,4,3,6},{6,7,1,4,3,5},{6,7,1,4,3,2},{6,7,1,4,3,1},{6,7,1,4,3,6},{6,1,7,4,3,5},{6,1,7,4,3,6},{1,6,7,4,3,6},{1,7,6,4,3,7},{1,7,6,4,3,2},{1,7,6,4,3,1},{1,7,6,4,3,6},{1,7,4,6,3,7},{1,7,4,6,3,1},{1,7,4,6,3,6},{1,7,4,3,6,7},{1,7,4,3,6,6},{1,7,3,4,6,7},{1,7,3,4,6,6},{1,7,3,6,4,5},{1,7,3,6,4,7},{1,7,3,6,4,2},{1,7,3,6,4,6},{1,7,6,3,4,7},{1,7,6,3,4,2},{1,7,6,3,4,1},{1,6,7,3,4,5},{6,1,7,3,4,5},{4,1,5,3,2,2},{4,1,5,3,2,6},{4,5,1,3,2,5},{4,5,1,3,2,6},{4,5,3,1,2,5},{4,5,3,2,1,5},{5,1,7,2,6,4},{1,5,7,6,2,3},{1,5,7,2,6,3},{1,5,2,7,6,3},{1,5,2,6,7,3},{1,5,6,2,7,3},{1,6,5,2,7,3},{6,1,5,2,7,3},{6,5,1,2,7,3},{6,1,7,3,4,6},{6,7,1,3,4,5},{6,7,1,3,4,2},{6,7,1,3,4,1},{6,7,1,3,4,6},{7,6,1,3,4,5},{7,6,1,3,4,7},{7,6,1,3,4,2},{7,6,1,3,4,1},{7,6,1,3,4,6},{7,1,6,3,4,7},{7,1,6,3,4,2},{7,1,6,3,4,1},{7,1,3,6,4,7},{7,1,3,6,4,2},{7,1,3,6,4,1},{7,1,3,6,4,6},{7,1,3,4,6,7},{7,1,3,4,6,6},{7,3,1,4,6,7},{7,3,1,4,6,1},{7,3,1,4,6,6},{7,3,1,6,4,5},{7,3,1,6,4,7},{7,3,1,6,4,2},{7,3,1,6,4,6},{7,3,6,1,4,5},{7,3,6,1,4,7},{7,3,6,1,4,2},{7,3,6,1,4,1},{7,3,6,1,4,6},{7,6,3,1,4,5},{7,6,3,1,4,7},{7,6,3,1,4,2},{7,6,3,1,4,1},{7,6,3,1,4,6},{6,7,3,1,4,5},{6,7,3,1,4,7},{6,7,3,1,4,2},{6,7,3,1,4,6},{6,7,3,4,1,5},{6,7,3,4,1,7},{6,7,3,4,1,2},{6,7,3,4,1,6},{7,6,3,4,1,5},{7,6,3,4,1,7},{7,6,3,4,1,2},{7,6,3,4,1,6},{7,3,6,4,1,5},{7,3,6,4,1,7},{7,3,6,4,1,2},{7,3,6,4,1,6},{7,3,4,6,1,5},{7,3,4,6,1,7},{7,3,4,6,1,2},{7,3,4,6,1,6},{7,3,4,1,6,5},{7,3,4,1,6,7},{7,3,4,1,6,2},{7,3,4,1,6,6},{6,3,1,7,4,5},{6,1,3,7,4,5},{6,1,3,7,4,2},{6,1,3,7,4,6},{6,1,3,4,5,5},{1,6,3,7,4,5},{6,1,3,4,5,7},{6,1,3,4,5,4},{6,1,3,4,5,3},{1,6,3,7,4,2},{1,6,3,7,4,6},{1,3,6,7,4,5},{6,3,1,4,5,5},{6,3,1,4,5,7},{6,3,1,4,5,3},{1,3,6,7,4,6},{1,3,7,6,4,5},{3,6,1,4,5,7},{1,3,7,6,4,7},{3,6,1,4,5,3},{1,3,7,6,4,6},{1,3,7,4,6,7},{3,1,6,4,5,3},{1,3,7,4,6,6},{3,1,4,6,5,7},{3,1,4,6,5,4},{3,1,4,6,5,3},{1,3,4,7,6,6},{1,3,4,6,7,5},{3,1,4,5,6,5},{3,1,4,5,6,7},{3,1,4,5,6,4},{3,1,4,5,6,3},{1,3,4,6,7,6},{3,4,1,5,6,5},{3,4,1,5,6,4},{1,3,6,4,7,6},{1,6,3,4,7,5},{3,4,1,6,5,5},{3,4,1,6,5,4},{1,6,3,4,7,2},{1,6,3,4,7,6},{6,1,3,4,7,5},{3,4,6,1,5,5},{3,4,6,1,5,3},{6,1,3,4,7,2},{6,1,3,4,7,6},{3,4,6,1,5,6},{6,3,1,4,7,5},{3,6,4,1,5,5},{6,3,1,4,7,7},{3,6,4,1,5,3},{6,3,1,4,7,2},{6,3,1,4,7,6},{6,3,4,1,5,5},{3,6,1,4,7,5},{3,6,1,4,7,7},{3,6,1,4,7,2},{3,6,1,4,7,6},{6,3,4,5,1,5},{3,1,6,4,7,7},{3,6,4,5,1,5},{3,1,6,4,7,6},{3,1,4,6,7,5},{3,1,4,6,7,2},{3,1,4,6,7,1},{3,4,6,5,1,5},{3,1,4,6,7,6},{3,1,4,7,6,7},{3,1,4,7,6,2},{3,1,4,7,6,1},{3,4,5,6,1,5},{3,1,4,7,6,6},{3,4,1,7,6,7},{3,4,1,7,6,2},{3,4,5,1,6,5},{3,4,1,7,6,1},{3,4,1,7,6,6},{3,4,1,6,7,2},{4,3,5,1,6,5},{3,4,1,6,7,1},{3,4,1,6,7,6},{3,4,6,1,7,2},{3,4,6,1,7,1},{3,4,6,1,7,6},{3,6,4,1,7,7},{3,6,4,1,7,2},{3,6,4,1,7,1},{3,6,4,1,7,6},{6,3,4,1,7,5},{6,3,4,1,7,7},{6,3,4,1,7,2},{5,6,1,2,7,3},{5,1,6,2,7,3},{5,1,2,6,7,4},{5,1,2,6,7,3},{5,1,2,7,6,4},{5,1,2,7,6,3},{5,7,4,2,6,5},{5,7,4,2,6,7},{5,7,4,6,2,5},{5,7,4,6,2,7},{5,7,6,4,2,3},{6,5,7,4,2,3},{6,5,7,2,4,3},{5,6,7,2,4,4},{5,6,7,2,4,3},{5,7,6,2,4,4},{5,7,6,2,4,3},{5,7,2,6,4,3},{5,7,2,4,6,5},{5,2,7,4,6,5},{5,2,7,4,6,3},{5,2,7,6,4,5},{5,2,7,6,4,3},{5,2,6,7,4,5},{5,2,6,7,4,3},{5,6,2,7,4,5},{5,6,2,7,4,3},{6,5,2,7,4,5},{6,5,2,7,4,4},{6,5,2,7,4,3},{6,2,5,7,4,5},{6,2,5,7,4,7},{6,2,5,7,4,4},{6,2,5,7,4,1},{6,2,5,7,4,6},{2,6,5,7,4,5},{2,1,6,5,7,4},{2,6,5,7,4,7},{2,1,6,5,7,3},{2,6,5,7,4,4},{2,6,5,7,4,1},{2,6,5,7,4,6},{2,5,6,7,4,5},{2,6,1,5,7,4},{2,5,6,7,4,7},{2,6,1,5,7,3},{2,5,6,7,4,4},{2,5,6,7,4,3},{2,5,6,7,4,1},{2,5,6,7,4,6},{2,5,7,6,4,5},{6,2,1,5,7,4},{2,5,7,6,4,7},{6,2,1,5,7,3},{2,5,7,6,4,4},{2,5,7,6,4,3},{2,5,7,6,4,1},{2,5,7,6,4,6},{2,5,7,4,6,5},{2,5,7,4,6,3},{2,5,7,4,6,1},{2,5,4,7,6,5},{2,5,4,6,7,4},{2,5,6,4,7,5},{2,5,6,4,7,4},{2,5,6,4,7,1},{4,3,5,6,1,5},{6,3,4,1,7,6},{6,3,4,7,1,5},{6,3,4,7,1,7},{4,3,6,5,1,5},{6,3,4,7,1,2},{6,3,4,7,1,6},{4,6,3,5,1,5},{3,6,4,7,1,7},{3,6,4,7,1,2},{3,6,4,7,1,1},{3,6,4,7,1,6},{3,4,6,7,1,5},{6,4,3,5,1,5},{3,4,6,7,1,7},{3,4,6,7,1,2},{3,4,6,7,1,1},{3,4,6,7,1,6},{6,4,3,1,5,5},{3,4,7,6,1,5},{3,4,7,6,1,7},{3,4,7,6,1,2},{6,4,3,1,5,6},{3,4,7,6,1,1},{4,6,3,1,5,5},{3,4,7,6,1,6},{3,4,7,1,6,5},{3,4,7,1,6,7},{4,6,3,1,5,3},{3,4,7,1,6,2},{4,6,3,1,5,6},{4,3,6,1,5,5},{3,4,7,1,6,1},{3,4,7,1,6,6},{4,3,7,1,6,5},{4,3,6,1,5,3},{4,3,7,1,6,7},{4,3,6,1,5,6},{4,3,1,6,5,5},{4,3,7,1,6,2},{4,3,7,1,6,1},{4,3,1,6,5,4},{4,3,7,1,6,6},{4,3,1,6,5,3},{4,3,7,6,1,5},{4,3,7,6,1,7},{4,3,1,5,6,5},{4,3,7,6,1,2},{4,3,1,5,6,4},{4,3,7,6,1,1},{4,3,7,6,1,6},{4,3,1,5,6,3},{4,3,6,7,1,5},{4,3,6,7,1,7},{4,1,3,5,6,5},{4,1,3,5,6,4},{4,3,6,7,1,2},{4,1,3,5,6,3},{4,3,6,7,1,1},{4,3,6,7,1,6},{4,6,3,7,1,5},{4,6,3,7,1,7},{4,1,3,6,5,5},{4,1,3,6,5,4},{4,1,3,6,5,3},{4,6,3,7,1,2},{4,6,3,7,1,1},{4,6,3,7,1,6},{4,1,6,3,5,5},{6,4,3,7,1,5},{6,4,3,7,1,7},{4,1,6,3,5,4},{4,1,6,3,5,3},{6,4,3,7,1,2},{6,4,3,7,1,6},{6,4,3,1,7,5},{4,6,1,3,5,5},{6,4,3,1,7,7},{4,6,1,3,5,4},{6,4,3,1,7,2},{4,6,1,3,5,3},{6,4,3,1,7,6},{4,6,3,1,7,5},{6,4,1,3,5,5},{4,6,3,1,7,7},{6,4,1,3,5,7},{6,4,1,3,5,4},{4,6,3,1,7,2},{4,6,3,1,7,1},{4,6,3,1,7,6},{6,1,4,3,5,5},{6,1,4,3,5,7},{6,1,4,3,5,4},{6,1,4,3,5,3},{4,3,6,1,7,2},{4,3,6,1,7,1},{1,6,4,3,5,5},{4,3,6,1,7,6},{1,6,4,3,5,7},{1,6,4,3,5,3},{4,3,1,6,7,2},{1,4,6,3,5,5},{4,3,1,6,7,1},{1,4,6,3,5,7},{4,3,1,6,7,6},{1,4,6,3,5,3},{4,3,1,7,6,7},{4,3,1,7,6,2},{1,4,3,6,5,7},{4,3,1,7,6,1},{1,4,3,6,5,3},{4,3,1,7,6,6},{4,1,3,7,6,7},{1,4,3,5,6,5},{1,4,3,5,6,7},{1,4,3,5,6,3},{4,1,3,7,6,1},{4,1,3,7,6,6},{1,4,5,3,6,5},{1,4,5,3,6,7},{4,1,3,6,7,7},{1,4,5,3,6,4},{1,4,5,3,6,3},{1,4,5,3,6,2},{4,1,3,6,7,1},{4,1,3,6,7,6},{4,1,6,3,7,5},{1,4,5,6,3,5},{4,1,6,3,7,7},{1,4,5,6,3,7},{1,4,5,6,3,4},{1,4,5,6,3,3},{4,1,6,3,7,1},{1,4,5,6,3,2},{4,1,6,3,7,6},{4,6,1,3,7,5},{4,6,1,3,7,7},{1,4,6,5,3,5},{4,6,1,3,7,2},{4,6,1,3,7,1},{1,4,6,5,3,3},{4,6,1,3,7,6},{6,4,1,3,7,5},{6,4,1,3,7,7},{1,6,4,5,3,5},{1,6,4,5,3,7},{6,4,1,3,7,2},{1,6,4,5,3,4},{6,4,1,3,7,6},{6,1,4,3,7,5},{6,1,4,5,3,5},{6,1,4,3,7,2},{6,1,4,5,3,7},{6,1,4,5,3,4},{6,1,4,3,7,6},{6,1,4,5,3,3},{1,6,4,3,7,5},{6,4,1,5,3,5},{1,6,4,3,7,2},{6,4,1,5,3,7},{1,6,4,3,7,6},{6,4,1,5,3,4},{1,4,6,3,7,5},{6,4,1,5,3,3},{1,4,6,3,7,2},{4,6,1,5,3,5},{1,4,6,3,7,6},{4,6,1,5,3,7},{1,4,3,6,7,5},{4,6,1,5,3,4},{4,6,1,5,3,3},{4,1,6,5,3,5},{1,4,3,6,7,6},{4,1,6,5,3,4},{4,1,6,5,3,3},{4,1,5,6,3,5},{1,4,3,7,6,6},{4,1,5,6,3,7},{1,4,7,3,6,7},{4,1,5,6,3,4},{4,1,5,6,3,3},{4,1,5,6,3,2},{4,1,5,3,6,5},{1,4,7,3,6,6},{4,1,5,3,6,7},{4,1,5,3,6,4},{4,1,5,3,6,3},{4,1,5,3,6,2},{1,4,7,6,3,1},{1,4,7,6,3,6},{4,5,1,3,6,5},{4,5,1,3,6,2},{1,4,6,7,3,6},{4,5,1,6,3,5},{4,5,1,6,3,4},{4,5,1,6,3,2},{1,6,4,7,3,6},{6,1,4,7,3,5},{4,5,6,1,3,5},{4,5,6,1,3,4},{4,5,6,1,3,2},{6,1,4,7,3,6},{6,4,1,7,3,5},{4,6,5,1,3,5},{6,4,1,7,3,7},{4,6,5,1,3,4},{4,6,5,1,3,2},{6,4,1,7,3,6},{4,6,1,7,3,5},{4,6,1,7,3,7},{6,4,5,1,3,5},{6,4,5,1,3,7},{6,4,5,1,3,3},{4,6,1,7,3,1},{4,6,1,7,3,6},{4,1,6,7,3,5},{4,1,6,7,3,7},{6,4,5,3,1,5},{6,4,5,3,1,7},{4,1,6,7,3,1},{4,1,6,7,3,6},{6,4,5,3,1,2},{4,1,7,6,3,5},{4,1,7,6,3,7},{4,6,5,3,1,5},{4,1,7,6,3,1},{4,6,5,3,1,2},{4,1,7,6,3,6},{4,1,7,3,6,7},{4,5,6,3,1,5},{4,1,7,3,6,2},{4,5,6,3,1,2},{4,1,7,3,6,1},{4,1,7,3,6,6},{4,7,1,3,6,5},{4,5,3,6,1,5},{4,7,1,3,6,7},{4,5,3,6,1,2},{4,7,1,3,6,2},{4,5,3,1,6,5},{4,7,1,3,6,6},{4,7,1,6,3,5},{4,7,1,6,3,7},{4,7,1,6,3,2},{4,7,1,6,3,6},{4,7,6,1,3,5},{4,7,6,1,3,7},{4,7,6,1,3,6},{4,6,7,1,3,5},{4,6,7,1,3,7},{5,4,6,3,2,5},{4,6,7,1,3,2},{4,6,7,1,3,6},{6,4,7,1,3,5},{6,4,7,1,3,7},{6,4,7,1,3,2},{5,6,4,3,2,5},{6,4,7,1,3,1},{6,4,7,1,3,6},{6,4,7,3,1,5},{6,4,7,3,1,7},{6,5,4,3,2,5},{6,4,7,3,1,2},{6,4,7,3,1,6},{4,6,7,3,1,5},{6,5,4,3,2,1},{4,6,7,3,1,7},{6,5,4,2,3,5},{6,5,4,2,3,7},{4,6,7,3,1,2},{4,6,7,3,1,6},{6,5,4,2,3,1},{6,5,4,2,3,6},{4,7,6,3,1,5},{5,6,4,2,3,5},{4,7,6,3,1,7},{5,6,4,2,3,7},{4,7,6,3,1,2},{5,6,4,2,3,6},{4,7,3,6,1,5},{5,4,6,2,3,5},{4,7,3,6,1,7},{5,4,6,2,3,7},{5,4,6,2,3,4},{4,7,3,6,1,2},{4,7,3,6,1,1},{4,7,3,1,6,5},{4,7,3,1,6,7},{4,7,3,1,6,2},{5,4,6,2,3,6},{4,7,3,1,6,6},{5,4,2,6,3,5},{5,4,2,6,3,7},{5,4,2,6,3,4},{5,4,2,6,3,6},{5,4,2,3,6,7},{5,4,2,3,6,4},{5,2,4,3,6,7},{5,2,4,6,3,5},{5,2,4,6,3,7},{5,2,4,6,3,6},{5,2,6,4,3,5},{5,2,6,4,3,7},{5,2,6,4,3,4},{5,2,6,4,3,6},{5,6,2,4,3,5},{5,6,2,4,3,7},{5,6,2,4,3,4},{2,7,6,5,1,4},{2,7,5,6,1,4},{2,7,5,1,6,4},{7,2,5,1,6,4},{7,2,5,6,1,4},{7,2,6,5,1,4},{7,6,2,5,1,4},{5,6,2,4,3,6},{6,5,2,4,3,5},{6,5,2,4,3,7},{6,5,2,4,3,4},{6,5,2,4,3,6},{6,2,5,4,3,5},{6,2,5,4,3,4},{2,6,5,4,3,5},{2,6,5,4,3,4},{2,5,6,4,3,5},{2,5,6,4,3,4},{2,5,4,6,3,4},{2,5,4,3,6,5},{2,5,4,3,6,7},{2,5,4,3,6,4},{2,5,3,4,6,5},{2,5,3,4,6,7},{2,5,3,4,6,4},{2,5,3,4,6,3},{2,5,3,4,6,1},{2,5,3,6,4,5},{2,5,3,6,4,7},{2,5,3,6,4,4},{2,5,3,6,4,3},{2,5,3,6,4,1},{2,5,6,3,4,5},{2,5,6,3,4,7},{2,5,6,3,4,4},{2,5,6,3,4,3},{2,6,5,3,4,5},{2,6,5,3,4,7},{2,6,5,3,4,4},{2,6,5,3,4,3},{6,2,5,3,4,5},{6,2,5,3,4,7},{6,2,5,3,4,4},{6,2,5,3,4,3},{6,5,2,3,4,5},{6,5,2,3,4,4},{5,6,2,3,4,5},{5,6,2,3,4,4},{5,2,6,3,4,5},{5,2,6,3,4,4},{5,2,3,6,4,5},{5,2,3,4,6,7},{5,3,2,6,4,3},{5,3,6,2,4,3},{5,6,3,2,4,5},{5,6,3,2,4,7},{5,6,3,2,4,4},{6,5,3,2,4,5},{6,5,3,2,4,7},{6,5,3,2,4,4},{6,5,3,4,2,5},{6,5,3,4,2,7},{6,5,3,4,2,1},{5,6,3,4,2,5},{5,6,3,4,2,7},{2,6,4,3,5,5},{2,6,4,3,5,7},{2,6,4,3,5,4},{2,4,6,3,5,4},{2,4,3,6,5,7},{2,4,3,6,5,4},{2,4,3,5,6,5},{2,4,3,5,6,7},{2,4,3,5,6,4},{2,4,5,3,6,5},{2,4,5,3,6,4},{2,4,5,6,3,4},{2,4,6,5,3,4},{2,6,4,5,3,5},{2,6,4,5,3,4},{6,2,4,5,3,5},{6,2,4,5,3,4},{6,4,2,5,3,5},{6,4,2,5,3,4},{4,6,2,5,3,4},{4,2,6,5,3,4},{4,2,5,6,3,4},{4,2,5,3,6,5},{4,2,5,3,6,4},{4,5,2,3,6,7},{4,5,2,3,6,4},{4,5,2,3,6,2},{4,5,2,6,3,7},{4,5,2,6,3,4},{4,5,2,6,3,2},{4,5,6,2,3,5},{4,5,6,2,3,7},{4,5,6,2,3,4},{4,5,6,2,3,2},{4,6,5,2,3,5},{4,6,5,2,3,7},{4,6,5,2,3,4},{4,6,5,2,3,2},{4,6,5,2,3,1},{6,4,5,2,3,5},{6,4,5,2,3,7},{6,4,5,2,3,1},{6,4,5,3,2,1},{4,6,5,3,2,5},{4,6,5,3,2,1},{4,5,6,3,2,5},{4,5,3,6,2,5},{4,5,3,2,6,5},{5,4,3,2,1,5},{5,4,3,1,2,5},{5,4,1,3,2,5},{5,1,4,3,2,2},{5,1,4,3,2,1},{1,5,4,3,2,4},{1,5,4,3,2,3},{1,5,4,3,2,2},{1,5,4,3,2,6},{1,5,4,2,3,7},{1,5,4,2,3,4},{1,5,4,2,3,3},{1,5,4,2,3,2},{1,5,4,2,3,1},{1,5,4,2,3,6},{5,1,4,2,3,4},{5,1,4,2,3,2},{5,1,4,2,3,1},{5,4,1,2,3,5},{5,4,1,2,3,2},{5,4,1,2,3,6},{5,4,2,1,3,7},{5,4,2,1,3,2},{5,4,2,1,3,6},{5,4,2,3,1,7},{5,4,2,3,1,2},{5,4,2,3,1,6},{5,2,4,3,1,7},{5,2,4,3,1,2},{5,2,4,3,1,6},{5,2,4,1,3,7},{5,2,4,1,3,4},{5,2,4,1,3,2},{5,2,4,1,3,6},{5,2,1,4,3,4},{5,2,1,4,3,3},{5,2,1,4,3,2},{5,2,1,4,3,1},{5,2,1,4,3,6},{5,1,2,4,3,4},{5,1,2,4,3,3},{5,1,2,4,3,2},{5,1,2,4,3,1},{1,5,2,4,3,4},{1,5,2,4,3,3},{1,5,2,4,3,2},{1,5,2,4,3,1},{1,5,2,4,3,6},{1,2,5,4,3,7},{1,2,5,4,3,4},{1,2,5,4,3,3},{1,2,5,4,3,2},{1,2,5,4,3,6},{2,1,5,4,3,4},{2,1,5,4,3,3},{2,5,1,4,3,4},{2,5,1,4,3,3},{2,5,4,1,3,7},{2,5,4,1,3,4},{2,5,4,1,3,3},{2,5,4,3,1,7},{3,5,1,4,2,7},{3,5,1,4,2,3},{3,5,1,4,2,1},{3,1,5,4,2,7},{3,1,5,4,2,3},{7,6,1,2,3,4},{3,1,5,4,2,1},{7,6,1,2,3,3},{1,3,5,4,2,7},{1,3,5,4,2,3},{7,1,6,2,3,4},{7,1,6,2,3,3},{1,3,5,2,4,5},{1,3,5,2,4,7},{1,3,5,2,4,4},{1,3,5,2,4,3},{7,1,2,6,3,4},{7,1,2,6,3,3},{3,1,5,2,4,5},{3,1,5,2,4,7},{3,1,5,2,4,4},{3,1,5,2,4,3},{7,1,2,3,6,3},{3,5,1,2,4,5},{3,5,1,2,4,7},{7,2,1,3,6,4},{3,5,2,1,4,5},{3,5,2,1,4,7},{7,2,1,6,3,4},{3,5,2,1,4,6},{7,2,1,6,3,3},{3,2,5,4,1,5},{7,2,6,1,3,4},{7,2,6,1,3,3},{7,6,2,1,3,4},{7,6,2,1,3,3},{6,7,2,1,3,3},{6,7,2,3,1,3},{7,6,2,3,1,4},{7,6,2,3,1,3},{7,2,6,3,1,4},{7,2,6,3,1,3},{7,2,3,6,1,4},{7,2,3,6,1,3},{7,2,3,1,6,4},{2,7,3,1,6,4},{2,7,3,6,1,4},{2,7,6,3,1,4},{6,2,7,3,1,3},{6,2,7,1,3,3},{2,7,6,1,3,4},{2,7,1,6,3,4},{2,7,1,3,6,4},{1,2,6,7,3,4},{1,2,6,7,3,3},{1,2,7,6,3,4},{1,2,7,6,3,3},{1,2,7,3,6,4},{1,2,7,3,6,3},{3,2,5,4,1,3},{3,2,5,1,4,5},{3,2,5,1,4,7},{3,2,5,1,4,4},{3,2,5,1,4,3},{3,2,5,1,4,2},{3,2,5,1,4,1},{3,2,5,1,4,6},{3,2,1,5,4,5},{3,2,1,5,4,7},{3,2,1,5,4,4},{3,2,1,5,4,3},{3,1,2,5,4,7},{3,1,2,5,4,4},{3,1,2,5,4,3},{1,3,2,5,4,4},{1,3,2,5,4,3},{1,2,3,5,4,4},{1,2,3,5,4,3},{2,1,3,5,4,7},{2,1,3,5,4,4},{2,1,3,5,4,3},{2,3,1,5,4,7},{2,3,1,5,4,4},{2,3,1,5,4,3},{2,3,5,1,4,7},{2,3,5,1,4,4},{2,3,5,1,4,3},{2,3,5,1,4,2},{2,3,5,1,4,1},{2,3,5,1,4,6},{2,3,5,4,1,4},{2,3,5,4,1,3},{2,3,5,4,1,1},{2,3,5,4,1,6},{2,3,4,5,1,3},{2,3,4,1,5,3},{2,3,1,4,5,4},{1,3,2,4,5,4},{1,3,2,4,5,3},{3,1,2,4,5,4},{3,1,2,4,5,3},{3,2,1,4,5,5},{3,2,1,4,5,4},{3,2,1,4,5,3},{3,2,1,4,5,2},{3,2,1,4,5,1},{3,2,4,1,5,5},{3,2,4,1,5,3},{3,2,4,1,5,2},{3,2,4,1,5,1},{3,2,4,5,1,5},{3,4,2,5,1,5},{3,4,2,5,1,3},{3,4,2,5,1,2},{3,4,2,1,5,5},{3,4,2,1,5,3},{3,4,2,1,5,2},{3,4,2,1,5,1},{3,4,1,2,5,5},{3,4,1,2,5,4},{3,4,1,2,5,2},{3,4,1,2,5,1},{3,1,4,2,5,4},{3,1,4,2,5,1},{1,3,4,2,5,4},{1,3,4,5,2,4},{3,1,4,5,2,4},{3,1,4,5,2,1},{3,4,1,5,2,5},{3,4,1,5,2,4},{3,4,1,5,2,1},{3,4,5,1,2,5},{3,4,5,2,1,5},{7,4,2,1,6,4},{4,3,2,1,6,5},{4,3,2,1,6,7},{4,3,2,6,1,5},{4,3,2,6,1,7},{4,3,2,6,1,2},{4,3,6,2,1,5},{4,3,6,2,1,7},{4,3,6,2,1,2},{4,6,3,2,1,5},{4,6,3,2,1,7},{6,4,3,2,1,7},{6,4,3,1,2,7},{4,6,3,1,2,5},{4,6,3,1,2,7},{4,6,3,1,2,1},{4,3,6,1,2,5},{4,3,6,1,2,7},{4,3,6,1,2,1},{4,3,1,6,2,5},{4,3,1,6,2,7},{4,3,1,6,2,1},{4,3,1,2,6,5},{4,3,1,2,6,7},{6,7,4,1,2,4},{6,7,4,1,2,3},{4,1,3,2,6,5},{4,1,3,2,6,7},{7,6,4,1,2,4},{4,1,3,6,2,5},{4,1,3,6,2,7},{4,1,3,6,2,1},{7,4,6,1,2,4},{4,1,6,3,2,5},{4,1,6,3,2,7},{4,1,6,3,2,1},{4,6,1,3,2,5},{4,6,1,3,2,7},{7,4,1,6,2,4},{7,4,1,6,2,3},{4,6,1,3,2,1},{6,4,1,3,2,7},{7,4,1,2,6,3},{6,1,4,3,2,5},{6,1,4,3,2,7},{1,6,4,3,2,5},{1,6,4,3,2,7},{1,4,6,3,2,5},{1,4,6,3,2,7},{1,4,2,6,3,5},{1,4,6,2,3,5},{1,6,4,2,3,5},{6,1,4,2,3,5},{6,4,1,2,3,5},{6,7,2,1,4,4},{7,2,4,1,6,4},{2,7,4,1,6,4},{2,7,4,1,6,3},{2,7,4,6,1,4},{2,7,4,6,1,3},{2,7,6,4,1,3},{4,2,1,6,3,7},{4,6,2,1,3,7},{6,4,2,1,3,7},{6,2,7,1,4,4},{6,4,2,3,1,5},{6,4,2,3,1,7},{2,6,7,1,4,4},{4,6,2,3,1,7},{2,7,6,1,4,4},{2,7,6,1,4,3},{2,7,1,6,4,4},{2,7,1,6,4,3},{4,2,3,6,1,7},{2,7,1,4,6,4},{2,7,1,4,6,3},{4,2,3,1,6,7},{2,6,4,3,1,5},{2,6,4,3,1,7},{6,2,4,3,1,5},{6,2,4,3,1,7},{6,2,4,1,3,7},{2,1,4,6,3,5},{2,1,6,4,3,5},{2,6,1,4,3,5},{6,2,1,4,3,5},{6,2,1,4,3,7},{6,1,2,4,3,5},{1,6,2,4,3,5},{1,2,6,4,3,5},{1,2,4,6,3,5}}, + --4*6 + {{1,6,5,3,7,5},{1,6,5,3,7,3},{1,6,5,3,7,2},{5,1,6,3,2,5},{5,1,6,3,2,7},{5,1,6,3,2,6},{5,6,1,3,2,5},{5,6,1,3,2,7},{5,6,1,3,2,6},{6,5,1,3,2,5},{6,1,5,3,7,5},{6,5,1,3,2,7},{6,1,5,3,7,3},{6,1,5,3,7,2},{6,5,1,3,2,6},{6,1,5,3,2,5},{3,4,7,1,5,5},{6,1,5,3,2,7},{5,7,2,1,4,5},{3,4,7,1,5,3},{3,4,7,1,5,2},{3,4,7,1,5,1},{3,4,7,1,5,6},{3,4,1,7,5,5},{3,4,1,7,5,4},{3,4,1,7,5,3},{6,1,5,3,2,6},{1,6,5,3,2,5},{1,6,5,3,2,7},{3,4,1,7,5,2},{3,4,1,7,5,1},{5,7,2,1,4,3},{1,6,5,3,2,6},{1,5,6,3,2,5},{5,7,2,4,1,5},{1,5,6,3,2,7},{1,5,6,3,2,6},{5,2,7,4,1,5},{3,4,1,7,5,6},{3,1,4,7,5,5},{1,5,3,2,6,5},{5,2,7,4,1,4},{1,5,2,3,6,5},{3,1,4,7,5,4},{5,2,7,1,4,5},{5,2,7,1,4,3},{5,2,7,1,4,2},{5,2,1,7,4,5},{3,1,4,7,5,3},{5,2,1,7,4,4},{1,3,4,7,5,5},{5,2,1,7,4,3},{1,3,4,7,5,4},{1,3,4,7,5,3},{1,5,2,6,3,5},{1,5,2,6,3,7},{5,1,2,7,4,5},{5,1,2,7,4,4},{1,5,2,7,4,4},{6,5,1,3,7,4},{1,5,2,7,4,2},{6,5,1,3,7,3},{1,2,5,7,4,3},{6,5,1,3,7,2},{1,2,5,7,4,2},{2,1,5,7,4,7},{2,1,5,7,4,3},{2,1,5,7,4,2},{2,1,5,7,4,1},{5,6,1,3,7,4},{2,5,1,7,4,5},{2,5,1,7,4,7},{2,5,1,7,4,4},{2,5,1,7,4,3},{2,5,1,7,4,1},{2,5,7,1,4,5},{2,5,7,1,4,7},{5,6,1,3,7,2},{2,5,7,1,4,4},{2,5,7,1,4,3},{2,5,7,1,4,2},{2,5,7,1,4,1},{2,5,7,4,1,5},{2,5,7,4,1,4},{5,1,6,3,7,4},{5,1,6,3,7,2},{5,1,3,6,7,4},{5,1,3,7,6,5},{2,5,7,4,1,6},{5,1,3,7,6,4},{2,5,4,7,1,5},{2,5,4,7,1,4},{2,5,4,1,7,5},{5,3,1,7,6,5},{2,5,4,1,7,4},{2,5,4,1,7,3},{5,3,1,7,6,4},{5,3,1,6,7,5},{5,3,1,6,7,4},{5,3,6,1,7,5},{5,3,6,1,7,4},{5,3,6,1,7,3},{5,6,3,1,7,4},{2,5,1,4,7,5},{2,5,1,4,7,4},{2,5,1,4,7,3},{6,5,3,1,7,4},{6,5,3,1,7,3},{2,5,1,4,7,1},{6,5,3,7,1,4},{2,1,5,4,7,3},{2,1,5,4,7,1},{1,2,5,4,7,3},{1,5,2,4,7,5},{5,6,3,7,1,4},{1,5,2,4,7,4},{1,5,2,4,7,3},{1,5,2,4,7,2},{5,1,2,4,7,5},{5,1,2,4,7,4},{5,1,2,4,7,2},{5,3,6,7,1,5},{5,3,7,6,1,5},{5,3,7,6,1,7},{5,3,7,1,6,5},{5,3,7,1,6,7},{1,4,3,7,5,5},{1,4,3,7,5,4},{3,5,7,1,6,5},{1,4,3,7,5,3},{3,5,7,1,6,7},{3,5,7,1,6,3},{3,5,7,6,1,5},{3,5,7,6,1,7},{3,5,7,6,1,4},{3,5,6,7,1,5},{3,5,6,7,1,4},{3,6,5,7,1,5},{3,6,5,7,1,4},{4,1,3,7,5,5},{1,5,2,6,3,6},{1,5,6,2,3,5},{4,1,3,7,5,4},{4,1,3,7,5,3},{1,5,6,2,3,7},{4,1,3,7,5,2},{4,1,3,7,5,1},{4,1,3,7,5,6},{4,3,1,7,5,5},{1,5,6,2,3,6},{4,3,1,7,5,4},{4,3,1,7,5,3},{4,3,1,7,5,2},{5,2,1,4,7,5},{4,3,1,7,5,1},{4,3,1,7,5,6},{4,3,7,1,5,5},{4,3,7,1,5,4},{4,3,7,1,5,3},{4,3,7,1,5,2},{4,3,7,1,5,1},{5,2,1,4,7,4},{4,3,7,1,5,6},{5,2,1,4,7,3},{4,3,7,5,1,5},{5,2,1,4,7,2},{5,2,1,4,7,1},{4,3,7,5,1,4},{4,3,7,5,1,3},{5,2,4,1,7,5},{4,7,3,5,1,5},{5,2,4,1,7,4},{5,2,4,1,7,3},{4,7,3,5,1,4},{4,7,3,5,1,3},{4,7,3,1,5,5},{4,7,3,1,5,7},{4,7,3,1,5,4},{4,7,3,1,5,3},{4,7,3,1,5,2},{4,7,3,1,5,1},{5,2,4,7,1,5},{4,7,1,3,5,5},{5,2,4,7,1,4},{4,7,1,3,5,4},{4,7,1,3,5,3},{4,7,1,3,5,2},{4,7,1,3,5,1},{5,4,2,7,1,5},{4,7,1,3,5,6},{4,1,7,3,5,5},{5,4,2,7,1,4},{4,1,7,3,5,4},{4,1,7,3,5,3},{4,1,7,3,5,2},{4,1,7,3,5,1},{4,1,7,3,5,6},{1,4,7,3,5,5},{5,4,2,7,1,3},{1,4,7,3,5,4},{1,4,7,3,5,3},{1,4,7,3,5,6},{1,4,7,5,3,5},{1,4,7,5,3,4},{1,4,7,5,3,1},{5,4,2,1,7,5},{1,4,7,5,3,6},{4,1,7,5,3,5},{5,4,2,1,7,4},{5,4,2,1,7,3},{4,1,7,5,3,4},{4,1,7,5,3,3},{4,1,7,5,3,2},{4,1,7,5,3,1},{4,1,7,5,3,6},{4,7,1,5,3,5},{4,7,1,5,3,7},{4,7,1,5,3,4},{4,7,1,5,3,3},{4,7,1,5,3,2},{4,7,1,5,3,1},{4,7,1,5,3,6},{1,6,5,2,3,5},{4,7,5,1,3,5},{1,6,5,2,3,7},{4,7,5,1,3,7},{4,7,5,1,3,4},{4,7,5,1,3,3},{4,7,5,1,3,2},{4,7,5,3,1,5},{4,7,5,3,1,7},{4,7,5,3,1,4},{4,7,5,3,1,3},{7,4,5,3,1,5},{7,4,5,3,1,7},{7,4,5,3,1,4},{7,4,5,3,1,3},{5,4,1,2,7,5},{7,4,5,1,3,5},{7,4,5,1,3,7},{5,4,1,2,7,4},{7,4,5,1,3,4},{7,4,5,1,3,3},{7,4,5,1,3,2},{7,4,1,5,3,5},{7,4,1,5,3,7},{7,4,1,5,3,4},{7,4,1,5,3,3},{7,4,1,5,3,2},{7,1,4,5,3,5},{7,1,4,5,3,7},{7,1,4,5,3,4},{7,1,4,5,3,3},{7,1,4,5,3,6},{1,7,4,5,3,5},{1,7,4,5,3,4},{1,7,4,5,3,1},{1,7,4,5,3,6},{1,7,4,3,5,5},{1,7,4,3,5,4},{1,7,4,3,5,3},{5,4,1,2,7,3},{1,7,4,3,5,6},{7,1,4,3,5,5},{7,1,4,3,5,4},{5,1,4,2,7,5},{7,1,4,3,5,3},{5,1,4,2,7,7},{7,1,4,3,5,2},{5,1,4,2,7,4},{7,1,4,3,5,6},{7,4,1,3,5,5},{7,4,1,3,5,4},{7,4,1,3,5,3},{7,4,1,3,5,2},{1,5,4,2,7,5},{7,4,1,3,5,6},{7,4,3,1,5,5},{1,5,4,2,7,4},{7,4,3,1,5,7},{7,4,3,1,5,4},{7,4,3,1,5,3},{7,4,3,1,5,2},{1,5,4,2,7,3},{7,4,3,1,5,6},{1,6,5,2,3,6},{1,5,4,2,7,6},{6,1,5,2,3,5},{6,1,5,2,3,7},{1,5,4,7,2,5},{1,5,4,7,2,4},{6,1,5,2,3,6},{1,5,4,7,2,3},{6,5,1,2,3,5},{6,5,1,2,3,7},{6,5,1,2,3,6},{5,6,1,2,3,5},{5,6,1,2,3,7},{5,1,4,7,2,5},{5,6,1,2,3,6},{5,1,4,7,2,4},{5,1,6,2,3,5},{5,1,6,2,3,7},{5,1,6,2,3,6},{5,1,2,6,3,5},{5,1,2,6,3,7},{5,1,2,6,3,6},{5,4,1,7,2,5},{5,4,1,7,2,4},{5,2,1,6,3,5},{5,4,1,7,2,3},{5,2,1,6,3,7},{5,4,7,1,2,5},{5,4,7,1,2,4},{5,4,7,1,2,3},{5,2,1,6,3,6},{5,6,2,1,3,5},{5,4,7,2,1,5},{5,4,7,2,1,3},{5,4,7,2,1,2},{6,5,2,1,3,5},{4,5,7,2,1,5},{4,5,7,2,1,4},{4,5,7,2,1,3},{4,5,7,2,1,2},{6,5,2,3,1,5},{4,5,7,1,2,5},{6,3,5,7,1,4},{4,5,7,1,2,4},{4,5,7,1,2,3},{6,3,5,1,7,4},{4,5,1,7,2,5},{6,3,5,1,7,3},{4,5,1,7,2,4},{4,5,1,7,2,3},{3,6,5,1,7,5},{3,6,5,1,7,4},{3,6,5,1,7,3},{4,1,5,7,2,5},{4,1,5,7,2,7},{4,1,5,7,2,4},{3,5,6,1,7,5},{3,5,6,1,7,4},{3,5,6,1,7,3},{4,1,5,7,2,3},{3,5,1,6,7,5},{1,4,5,7,2,5},{3,5,1,6,7,4},{1,4,5,7,2,4},{1,4,5,7,2,3},{3,5,1,7,6,5},{1,4,5,2,7,5},{3,5,1,7,6,4},{1,4,5,2,7,4},{3,5,1,7,6,3},{1,4,5,2,7,3},{1,4,5,2,7,6},{4,1,5,2,7,5},{4,1,5,2,7,7},{4,1,5,2,7,3},{4,1,5,2,7,6},{4,5,1,2,7,5},{4,5,1,2,7,3},{4,5,2,1,7,5},{4,5,2,1,7,4},{4,5,2,1,7,3},{4,5,2,7,1,5},{4,5,2,7,1,4},{4,5,2,7,1,3},{4,2,5,7,1,5},{4,2,5,7,1,4},{4,2,5,1,7,5},{4,2,5,1,7,4},{4,2,5,1,7,3},{3,1,5,7,6,5},{4,2,1,5,7,5},{4,2,1,5,7,4},{4,2,1,5,7,3},{5,6,2,3,1,5},{3,1,5,7,6,3},{4,1,2,5,7,5},{3,1,5,6,7,5},{4,1,2,5,7,3},{3,1,5,6,7,3},{1,4,2,5,7,3},{3,1,6,5,7,5},{3,1,6,5,7,3},{1,2,4,5,7,3},{3,6,1,5,7,5},{3,6,1,5,7,3},{2,1,4,5,7,3},{2,4,1,5,7,5},{6,3,1,5,7,5},{2,4,5,1,7,5},{6,1,3,5,7,5},{5,2,6,3,1,5},{1,6,3,5,7,5},{1,3,6,5,7,3},{2,5,3,1,6,5},{1,3,5,6,7,3},{2,5,3,1,6,7},{2,5,3,1,6,4},{1,3,5,7,6,5},{2,5,3,6,1,5},{2,5,3,6,1,7},{2,5,3,6,1,4},{1,3,7,5,6,5},{1,3,7,5,6,7},{1,3,7,6,5,7},{7,4,3,5,1,5},{1,3,7,6,5,3},{7,4,3,5,1,7},{7,4,3,5,1,4},{7,4,3,5,1,3},{1,3,6,7,5,7},{1,3,6,7,5,3},{1,6,3,7,5,5},{7,3,4,5,1,5},{1,6,3,7,5,7},{7,3,4,5,1,7},{1,6,3,7,5,3},{7,3,4,5,1,4},{6,1,3,7,5,5},{7,3,4,5,1,3},{7,3,4,1,5,5},{6,3,1,7,5,5},{7,3,4,1,5,7},{7,3,4,1,5,4},{7,3,4,1,5,3},{7,3,4,1,5,2},{7,3,4,1,5,6},{3,6,1,7,5,5},{3,6,1,7,5,7},{7,3,1,4,5,5},{7,3,1,4,5,7},{7,3,1,4,5,4},{7,3,1,4,5,3},{7,3,1,4,5,2},{3,1,6,7,5,5},{3,1,6,7,5,7},{3,1,6,7,5,3},{3,1,7,6,5,5},{3,1,7,6,5,7},{3,1,7,6,5,3},{3,1,7,5,6,5},{3,1,7,5,6,3},{3,7,1,5,6,5},{3,7,1,5,6,3},{7,3,1,4,5,6},{3,7,1,6,5,5},{3,7,1,6,5,7},{7,1,3,4,5,5},{3,7,1,6,5,3},{7,1,3,4,5,4},{7,1,3,4,5,3},{3,7,6,1,5,5},{7,1,3,4,5,2},{3,7,6,1,5,7},{7,1,3,4,5,6},{3,7,6,1,5,3},{1,7,3,4,5,5},{1,7,3,4,5,4},{3,6,7,1,5,5},{3,6,7,1,5,7},{1,7,3,4,5,3},{1,7,3,4,5,1},{1,3,7,4,5,5},{6,3,7,1,5,5},{1,3,7,4,5,4},{1,3,7,4,5,3},{1,3,7,4,5,1},{6,3,7,5,1,4},{3,1,7,4,5,5},{6,3,7,5,1,3},{3,1,7,4,5,4},{3,1,7,4,5,3},{3,6,7,5,1,5},{3,1,7,4,5,1},{3,7,1,4,5,5},{3,7,6,5,1,5},{3,7,1,4,5,4},{3,7,1,4,5,3},{3,7,1,4,5,2},{3,7,5,6,1,5},{3,7,5,6,1,7},{3,7,4,1,5,5},{3,7,4,1,5,3},{3,7,4,1,5,2},{3,7,5,1,6,5},{3,7,4,1,5,1},{3,7,5,1,6,7},{3,7,4,1,5,6},{3,7,4,5,1,5},{3,7,5,1,6,3},{3,7,4,5,1,7},{3,7,4,5,1,4},{7,3,5,1,6,5},{7,3,5,1,6,7},{7,3,5,1,6,3},{3,7,5,4,1,5},{3,7,5,4,1,7},{3,7,5,4,1,4},{3,7,5,4,1,3},{7,3,5,6,1,5},{7,3,5,6,1,7},{3,7,5,4,1,2},{7,3,6,5,1,5},{7,3,6,5,1,4},{3,7,5,1,4,5},{3,7,5,1,4,7},{3,7,5,1,4,4},{3,7,5,1,4,3},{3,7,5,1,4,2},{3,7,1,5,4,5},{3,7,1,5,4,4},{3,7,1,5,4,3},{3,7,1,5,4,2},{6,2,5,3,1,5},{3,1,7,5,4,5},{3,1,7,5,4,4},{3,1,7,5,4,3},{6,2,5,1,3,5},{3,1,7,5,4,2},{1,3,7,5,4,5},{1,3,7,5,4,4},{1,3,7,5,4,3},{1,3,7,5,4,2},{1,7,3,5,4,5},{1,7,3,5,4,4},{1,7,3,5,4,3},{7,1,3,5,4,5},{7,1,3,5,4,4},{7,1,3,5,4,3},{2,5,1,3,6,4},{7,1,3,5,4,2},{7,3,1,5,4,5},{7,3,1,5,4,7},{7,3,1,5,4,4},{2,1,5,3,6,4},{7,3,1,5,4,3},{7,3,1,5,4,2},{7,3,1,5,4,1},{7,3,5,1,4,5},{7,3,5,1,4,7},{7,3,5,1,4,4},{7,3,5,1,4,3},{7,3,5,1,4,2},{2,1,6,5,3,7},{7,3,5,1,4,1},{7,3,5,1,4,6},{2,1,6,5,3,4},{7,3,5,4,1,5},{7,3,5,4,1,7},{7,3,5,4,1,4},{2,1,6,5,3,6},{7,3,5,4,1,3},{7,3,5,4,1,2},{7,3,5,4,1,1},{2,6,1,5,3,7},{2,6,1,5,3,4},{7,5,3,4,1,5},{7,5,3,4,1,7},{7,5,3,4,1,4},{7,5,3,4,1,3},{2,6,1,5,3,6},{7,5,3,4,1,2},{7,5,3,4,1,1},{6,2,1,5,3,7},{6,2,1,5,3,4},{7,5,3,1,4,5},{7,5,3,1,4,7},{7,5,3,1,4,4},{7,5,3,1,4,3},{6,2,1,5,3,6},{7,5,3,1,4,2},{7,5,3,1,4,1},{2,4,5,1,7,4},{7,5,3,1,4,6},{6,1,2,5,3,7},{6,1,2,5,3,4},{2,4,5,1,7,3},{7,5,1,3,4,5},{7,5,1,3,4,7},{7,5,1,3,4,4},{7,5,1,3,4,3},{7,5,1,3,4,1},{2,4,5,7,1,5},{7,5,1,3,4,6},{7,1,5,3,4,5},{7,1,5,3,4,7},{2,4,5,7,1,4},{7,1,5,3,4,4},{7,1,5,3,4,3},{7,1,5,3,4,6},{1,7,5,3,4,5},{2,4,7,5,1,5},{1,7,5,3,4,4},{2,4,7,5,1,4},{1,7,5,3,4,3},{1,7,5,4,3,5},{2,4,7,1,5,5},{1,7,5,4,3,4},{2,4,7,1,5,7},{1,7,5,4,3,3},{1,7,5,4,3,6},{7,1,5,4,3,5},{7,1,5,4,3,7},{7,1,5,4,3,4},{2,4,1,7,5,5},{2,4,1,7,5,7},{7,1,5,4,3,6},{7,5,1,4,3,5},{7,5,1,4,3,7},{7,5,1,4,3,4},{7,5,1,4,3,3},{7,5,1,4,3,6},{2,1,4,7,5,7},{7,5,4,1,3,5},{2,1,4,7,5,4},{7,5,4,1,3,7},{7,5,4,1,3,4},{7,5,4,1,3,3},{2,1,4,7,5,3},{7,5,4,1,3,2},{2,1,4,7,5,6},{7,5,4,3,1,5},{7,5,4,3,1,7},{7,5,4,3,1,4},{7,5,4,3,1,3},{7,5,4,3,1,2},{1,2,4,7,5,7},{1,2,4,7,5,4},{5,7,4,3,2,5},{1,2,4,7,5,3},{5,7,4,3,2,7},{5,7,4,3,2,4},{1,2,4,7,5,6},{5,7,4,3,2,3},{5,7,4,3,2,2},{1,4,2,7,5,4},{5,7,4,2,3,5},{1,4,2,7,5,3},{5,7,4,2,3,7},{5,7,4,2,3,4},{5,7,4,2,3,3},{5,7,4,2,3,2},{1,4,2,7,5,6},{5,7,4,2,3,1},{4,1,2,7,5,5},{5,7,2,4,3,5},{4,1,2,7,5,7},{4,1,2,7,5,4},{5,7,2,4,3,4},{4,1,2,7,5,3},{5,7,2,4,3,3},{5,7,2,4,3,2},{4,1,2,7,5,6},{5,2,7,4,3,5},{4,2,1,7,5,5},{4,2,1,7,5,7},{5,2,7,4,3,4},{5,2,7,4,3,3},{5,2,7,4,3,2},{2,5,7,4,3,5},{4,2,7,1,5,5},{2,5,7,4,3,4},{2,5,7,4,3,3},{4,2,7,1,5,7},{4,2,7,1,5,4},{2,5,7,3,4,5},{2,5,7,3,4,4},{2,5,7,3,4,3},{4,2,7,5,1,5},{2,5,7,3,4,1},{4,2,7,5,1,4},{2,5,7,3,4,6},{5,2,7,3,4,5},{5,2,7,3,4,4},{5,2,7,3,4,3},{5,2,7,3,4,2},{5,2,7,3,4,1},{5,2,7,3,4,6},{4,7,2,5,1,5},{5,7,2,3,4,5},{4,7,2,5,1,4},{5,7,2,3,4,4},{4,7,2,5,1,3},{5,7,2,3,4,2},{6,1,2,5,3,6},{1,6,2,5,3,7},{1,6,2,5,3,4},{4,7,2,1,5,5},{4,7,2,1,5,7},{4,7,2,1,5,4},{4,7,2,1,5,3},{7,6,3,5,1,4},{7,6,3,5,1,3},{4,7,1,2,5,5},{4,7,1,2,5,7},{4,7,1,2,5,4},{4,7,1,2,5,3},{4,7,1,2,5,6},{6,7,3,5,1,4},{4,1,7,2,5,5},{4,1,7,2,5,7},{6,7,3,5,1,3},{4,1,7,2,5,4},{4,1,7,2,5,3},{4,1,7,2,5,6},{6,7,3,1,5,5},{1,4,7,2,5,4},{1,4,7,2,5,3},{1,4,7,5,2,5},{7,6,3,1,5,5},{1,4,7,5,2,4},{1,4,7,5,2,3},{7,6,3,1,5,3},{4,1,7,5,2,5},{4,1,7,5,2,7},{4,1,7,5,2,4},{4,1,7,5,2,3},{7,3,6,1,5,5},{7,3,6,1,5,7},{4,1,7,5,2,6},{4,7,1,5,2,5},{7,3,6,1,5,3},{4,7,1,5,2,7},{4,7,1,5,2,4},{4,7,1,5,2,3},{7,3,1,6,5,5},{7,3,1,6,5,7},{7,3,1,6,5,3},{4,7,1,5,2,6},{4,7,5,1,2,5},{4,7,5,1,2,7},{7,3,1,5,6,5},{7,3,1,5,6,3},{4,7,5,1,2,3},{7,1,3,5,6,5},{7,1,3,5,6,7},{4,7,5,2,1,5},{4,7,5,2,1,4},{7,1,3,6,5,5},{4,7,5,2,1,3},{4,7,5,2,1,2},{7,1,3,6,5,7},{7,4,5,2,1,5},{7,4,5,2,1,4},{7,1,6,3,5,5},{7,4,5,2,1,3},{7,4,5,2,1,2},{7,4,5,1,2,5},{7,6,1,3,5,5},{7,4,5,1,2,7},{7,4,5,1,2,3},{7,4,1,5,2,5},{6,7,1,3,5,5},{7,4,1,5,2,7},{7,4,1,5,2,3},{6,1,7,3,5,5},{7,1,4,5,2,5},{7,1,4,5,2,7},{7,1,4,5,2,3},{1,6,7,3,5,5},{1,6,7,3,5,3},{1,7,4,5,2,5},{1,7,4,5,2,4},{1,7,6,3,5,5},{1,7,4,5,2,3},{1,7,6,3,5,4},{1,7,6,3,5,3},{1,7,4,2,5,5},{1,7,3,6,5,5},{1,7,4,2,5,4},{1,7,3,6,5,7},{1,7,3,6,5,4},{1,7,4,2,5,3},{1,7,3,5,6,5},{7,1,4,2,5,5},{1,7,3,5,6,7},{1,7,3,5,6,4},{7,1,4,2,5,4},{7,1,4,2,5,3},{1,7,5,3,6,5},{1,7,5,3,6,4},{7,4,1,2,5,5},{1,7,5,3,6,2},{1,7,5,6,3,5},{7,4,1,2,5,3},{1,7,5,6,3,7},{1,7,5,6,3,4},{1,7,5,6,3,3},{1,7,5,6,3,2},{7,4,2,1,5,5},{7,4,2,1,5,7},{1,7,5,6,3,6},{7,4,2,1,5,4},{1,7,6,5,3,5},{7,4,2,1,5,3},{1,7,6,5,3,7},{1,7,6,5,3,4},{1,7,6,5,3,3},{7,4,2,5,1,5},{1,7,6,5,3,6},{1,6,7,5,3,5},{7,4,2,5,1,4},{1,6,7,5,3,7},{7,4,2,5,1,3},{1,6,7,5,3,3},{1,6,7,5,3,2},{1,6,7,5,3,6},{7,2,4,5,1,5},{6,1,7,5,3,5},{6,1,7,5,3,7},{7,2,4,5,1,3},{6,1,7,5,3,3},{6,1,7,5,3,2},{6,1,7,5,3,6},{7,2,4,1,5,5},{6,7,1,5,3,5},{7,2,4,1,5,7},{6,7,1,5,3,7},{6,7,1,5,3,4},{6,7,1,5,3,3},{7,2,4,1,5,3},{6,7,1,5,3,2},{6,7,1,5,3,6},{7,6,1,5,3,5},{7,6,1,5,3,7},{7,2,1,4,5,7},{7,6,1,5,3,4},{7,6,1,5,3,3},{7,2,1,4,5,4},{7,2,1,4,5,3},{7,6,1,5,3,1},{7,6,1,5,3,6},{7,1,6,5,3,5},{7,1,6,5,3,7},{7,1,2,4,5,7},{7,1,6,5,3,4},{7,1,2,4,5,4},{7,1,6,5,3,3},{7,1,2,4,5,3},{7,1,6,5,3,1},{7,1,6,5,3,6},{7,1,5,6,3,5},{7,1,5,6,3,7},{7,1,5,6,3,3},{1,7,2,4,5,7},{7,1,5,6,3,1},{1,7,2,4,5,4},{7,1,5,6,3,6},{1,7,2,4,5,3},{7,1,5,3,6,5},{1,2,7,4,5,7},{1,2,7,4,5,4},{7,5,1,3,6,5},{1,2,7,4,5,3},{1,2,7,4,5,6},{2,1,7,4,5,7},{2,1,7,4,5,4},{7,5,1,6,3,4},{2,1,7,4,5,3},{2,1,7,4,5,6},{2,7,1,4,5,7},{2,7,1,4,5,4},{7,5,6,1,3,4},{2,7,1,4,5,3},{2,7,1,4,5,6},{2,7,4,1,5,5},{7,6,5,1,3,4},{2,7,4,1,5,7},{6,7,5,1,3,4},{2,7,4,5,1,5},{2,7,4,5,1,4},{6,7,5,3,1,4},{6,7,5,3,1,3},{2,7,5,4,1,5},{7,6,5,3,1,4},{5,7,2,3,4,1},{7,6,5,3,1,3},{5,7,2,3,4,6},{5,7,3,2,4,5},{5,7,3,2,4,4},{7,5,6,3,1,4},{5,7,3,2,4,3},{7,5,6,3,1,3},{5,7,3,2,4,2},{7,5,3,6,1,5},{7,5,3,6,1,7},{5,7,3,2,4,1},{7,5,3,1,6,5},{7,5,3,1,6,7},{5,7,3,2,4,6},{5,7,3,4,2,5},{1,6,2,5,3,6},{1,2,6,5,3,7},{5,7,3,4,2,7},{5,7,3,2,6,5},{5,7,3,4,2,4},{5,7,3,2,6,4},{5,7,3,2,6,3},{5,7,3,4,2,3},{5,7,3,4,2,2},{5,7,3,4,2,6},{5,7,3,6,2,4},{5,3,7,4,2,5},{5,7,3,6,2,3},{5,3,7,4,2,7},{5,3,7,4,2,4},{5,3,7,4,2,2},{5,7,6,3,2,3},{5,3,7,4,2,6},{5,3,7,2,4,5},{1,2,6,5,3,4},{5,6,7,3,2,3},{5,6,7,3,2,1},{1,2,6,5,3,6},{6,5,7,3,2,3},{6,5,7,3,2,1},{1,2,5,6,3,6},{1,2,5,3,6,5},{6,5,7,2,3,3},{1,2,3,5,6,5},{5,6,7,2,3,3},{5,3,7,2,4,4},{5,3,7,2,4,3},{5,3,7,2,4,2},{5,3,7,2,4,1},{5,3,7,2,4,6},{5,3,2,7,4,5},{1,2,3,6,5,5},{5,3,2,7,4,4},{1,2,3,6,5,4},{5,3,2,7,4,3},{5,3,2,7,4,2},{5,3,2,7,4,1},{5,3,2,7,4,6},{1,2,3,6,5,6},{5,2,3,7,4,5},{1,2,6,3,5,7},{5,2,3,7,4,4},{1,2,6,3,5,4},{5,2,3,7,4,3},{5,2,3,7,4,2},{5,2,3,7,4,1},{1,2,6,3,5,6},{5,2,3,7,4,6},{1,6,2,3,5,7},{2,5,3,7,4,5},{1,6,2,3,5,4},{2,5,3,7,4,4},{2,5,3,7,4,3},{1,6,2,3,5,6},{6,1,2,3,5,7},{2,5,3,7,4,1},{6,1,2,3,5,4},{2,5,3,7,4,6},{2,3,5,7,4,5},{6,1,2,3,5,6},{2,3,5,7,4,4},{2,3,5,7,4,3},{2,3,5,7,4,2},{6,2,1,3,5,7},{2,3,5,7,4,1},{6,2,1,3,5,4},{2,3,5,7,4,6},{3,2,5,7,4,5},{3,2,5,7,4,4},{6,2,1,3,5,6},{3,2,5,7,4,3},{3,2,5,7,4,2},{2,6,1,3,5,7},{3,2,5,7,4,1},{3,2,5,7,4,6},{2,6,1,3,5,4},{3,5,2,7,4,5},{3,5,2,7,4,4},{2,6,1,3,5,6},{3,5,2,7,4,3},{3,5,2,7,4,2},{3,5,2,7,4,1},{2,1,6,3,5,7},{3,5,2,7,4,6},{2,1,6,3,5,4},{3,5,7,2,4,5},{3,5,7,2,4,4},{3,5,7,2,4,3},{2,1,6,3,5,6},{3,5,7,2,4,1},{3,5,7,4,2,5},{2,1,3,6,5,4},{3,5,7,4,2,7},{3,5,7,4,2,4},{3,5,7,4,2,3},{2,1,3,6,5,6},{3,5,4,7,2,5},{3,5,4,7,2,3},{3,5,4,2,7,5},{3,5,4,2,7,4},{3,5,4,2,7,3},{3,5,2,4,7,5},{2,3,1,6,5,4},{3,5,2,4,7,4},{3,5,2,4,7,3},{2,3,1,6,5,6},{3,5,2,4,7,2},{2,3,6,1,5,4},{3,2,5,4,7,5},{2,3,6,1,5,6},{3,2,5,4,7,4},{3,2,5,4,7,3},{3,2,5,4,7,2},{2,6,3,1,5,4},{3,2,5,4,7,6},{2,3,5,4,7,5},{2,6,3,1,5,6},{2,3,5,4,7,4},{6,2,3,1,5,4},{2,3,5,4,7,3},{2,3,5,4,7,6},{6,2,3,1,5,6},{2,5,3,4,7,5},{6,2,3,5,1,5},{2,5,3,4,7,4},{2,5,3,4,7,3},{2,5,3,4,7,6},{5,2,3,4,7,5},{5,2,3,4,7,4},{5,2,3,4,7,6},{5,3,2,4,7,5},{2,3,6,5,1,5},{5,3,2,4,7,4},{5,3,2,4,7,3},{5,3,2,4,7,2},{2,3,5,6,1,5},{2,3,5,6,1,7},{5,3,4,2,7,5},{2,3,5,6,1,4},{5,3,4,2,7,4},{5,3,4,2,7,3},{2,3,5,1,6,5},{2,3,5,1,6,7},{2,3,5,1,6,4},{5,3,4,7,2,5},{5,3,4,7,2,7},{3,2,5,1,6,5},{3,2,5,1,6,7},{3,2,5,1,6,4},{3,2,5,6,1,5},{3,2,5,6,1,7},{3,2,5,6,1,4},{5,3,4,7,2,3},{3,2,6,5,1,5},{5,4,3,7,2,5},{5,4,3,7,2,7},{5,4,3,7,2,3},{5,4,3,2,7,5},{5,4,3,2,7,4},{5,4,3,2,7,3},{3,6,2,5,1,5},{5,4,2,3,7,5},{5,4,2,3,7,4},{5,4,2,3,7,3},{5,4,2,3,7,1},{6,3,2,5,1,5},{5,4,2,3,7,6},{5,2,4,3,7,5},{5,2,4,3,7,4},{5,2,4,3,7,3},{5,2,4,3,7,1},{5,2,4,3,7,6},{2,5,4,3,7,5},{3,6,2,1,5,5},{2,5,4,3,7,4},{2,5,4,3,7,3},{2,5,4,3,7,1},{2,5,4,3,7,6},{3,2,6,1,5,5},{2,5,4,7,3,5},{2,5,4,7,3,4},{2,5,4,7,3,3},{3,2,1,6,5,5},{2,5,4,7,3,1},{5,2,4,7,3,5},{5,2,4,7,3,4},{3,2,1,5,6,5},{5,2,4,7,3,3},{5,2,4,7,3,1},{5,4,2,7,3,5},{5,4,2,7,3,4},{3,1,2,5,6,5},{5,4,2,7,3,3},{5,4,2,7,3,1},{5,4,7,2,3,5},{3,1,2,6,5,5},{5,4,7,2,3,4},{5,4,7,2,3,3},{5,4,7,2,3,1},{5,4,7,3,2,5},{5,4,7,3,2,7},{5,4,7,3,2,4},{4,5,7,3,2,5},{4,5,7,3,2,7},{4,5,7,3,2,4},{6,3,1,2,5,7},{4,5,7,2,3,5},{4,5,7,2,3,4},{4,5,7,2,3,3},{4,5,7,2,3,1},{6,1,3,2,5,7},{4,5,2,7,3,5},{4,5,2,7,3,4},{4,5,2,7,3,3},{4,5,2,7,3,1},{1,6,3,2,5,7},{4,2,5,7,3,5},{4,2,5,7,3,4},{4,2,5,7,3,3},{4,2,5,7,3,1},{2,4,5,7,3,5},{2,4,5,7,3,4},{2,4,5,7,3,3},{1,3,2,6,5,5},{2,4,5,7,3,1},{2,4,5,3,7,4},{2,4,5,3,7,3},{1,3,2,5,6,5},{2,4,5,3,7,1},{4,2,5,3,7,5},{4,2,5,3,7,4},{4,2,5,3,7,3},{1,3,5,2,6,5},{4,2,5,3,7,1},{4,5,2,3,7,5},{4,5,2,3,7,4},{4,5,2,3,7,3},{4,5,2,3,7,1},{4,5,2,3,7,6},{2,7,5,4,1,4},{2,7,5,4,1,6},{2,7,5,1,4,5},{2,7,5,1,4,7},{2,7,5,1,4,4},{2,7,5,1,4,1},{5,7,6,2,3,5},{2,7,1,5,4,7},{2,7,1,5,4,4},{5,7,6,2,3,3},{2,7,1,5,4,2},{2,7,1,5,4,1},{5,7,2,6,3,5},{2,1,7,5,4,7},{2,1,7,5,4,2},{2,1,7,5,4,1},{5,7,2,6,3,4},{1,2,7,5,4,3},{5,7,2,6,3,3},{1,2,7,5,4,2},{5,7,2,3,6,5},{5,7,2,3,6,4},{5,7,2,3,6,3},{1,7,2,5,4,3},{5,2,7,3,6,5},{5,2,7,3,6,4},{7,1,2,5,4,3},{5,2,7,3,6,3},{5,2,7,6,3,5},{7,2,1,5,4,7},{5,2,7,6,3,4},{5,2,7,6,3,3},{7,2,1,5,4,2},{7,2,1,5,4,1},{7,2,5,1,4,5},{7,2,5,1,4,7},{7,2,5,1,4,4},{5,2,6,7,3,4},{5,2,6,7,3,3},{7,2,5,1,4,2},{7,2,5,1,4,1},{5,6,2,7,3,3},{6,5,2,7,3,3},{7,2,5,4,1,5},{6,2,5,7,3,3},{6,2,5,7,3,1},{7,5,2,4,1,5},{2,6,5,7,3,4},{2,6,5,7,3,3},{2,6,5,7,3,1},{7,5,2,1,4,5},{2,5,6,7,3,4},{2,5,6,7,3,3},{2,5,6,7,3,1},{7,5,1,2,4,5},{2,5,7,6,3,4},{7,5,1,2,4,4},{7,5,1,2,4,3},{2,5,7,6,3,1},{2,5,7,3,6,5},{2,5,7,3,6,4},{2,5,7,3,6,3},{7,1,5,2,4,4},{7,1,5,2,4,3},{2,5,7,3,6,1},{2,5,3,7,6,5},{2,5,3,7,6,4},{2,5,3,7,6,3},{1,7,5,2,4,4},{1,7,5,2,4,3},{1,7,5,2,4,2},{2,5,3,6,7,4},{1,7,5,4,2,5},{2,5,3,6,7,3},{1,7,5,4,2,4},{1,7,5,4,2,3},{1,7,5,4,2,1},{2,5,6,3,7,4},{7,1,5,4,2,5},{2,5,6,3,7,3},{7,1,5,4,2,7},{7,1,5,4,2,4},{7,1,5,4,2,3},{2,5,6,3,7,6},{2,6,5,3,7,4},{7,5,1,4,2,5},{2,6,5,3,7,3},{7,5,1,4,2,7},{7,5,1,4,2,4},{2,6,5,3,7,6},{6,2,5,3,7,4},{7,5,4,1,2,5},{6,2,5,3,7,3},{7,5,4,1,2,7},{7,5,4,1,2,3},{7,5,4,2,1,5},{7,5,4,2,1,4},{7,5,4,2,1,3},{7,5,4,2,1,2},{5,7,4,3,6,7},{5,7,4,3,6,4},{5,7,4,3,6,3},{6,2,5,3,7,6},{5,7,4,6,3,5},{5,7,4,6,3,7},{6,5,2,3,7,3},{6,5,2,3,7,2},{5,7,4,6,3,4},{5,7,4,6,3,3},{6,5,2,3,7,6},{5,7,4,6,3,1},{5,7,6,4,3,5},{5,6,2,3,7,3},{5,6,2,3,7,2},{5,7,6,4,3,4},{5,6,2,3,7,6},{5,7,6,4,3,3},{5,7,6,4,3,2},{5,2,6,3,7,3},{5,7,6,4,3,6},{5,2,6,3,7,2},{5,6,7,4,3,5},{5,2,6,3,7,6},{5,2,3,6,7,5},{5,2,3,6,7,3},{5,6,7,4,3,4},{5,2,3,7,6,5},{5,6,7,4,3,6},{6,5,7,4,3,5},{5,2,3,7,6,4},{5,2,3,7,6,3},{6,5,7,4,3,4},{5,3,2,7,6,5},{5,3,2,7,6,4},{5,3,2,6,7,5},{5,3,2,6,7,3},{5,3,6,2,7,3},{5,6,3,2,7,4},{5,3,7,4,6,7},{6,5,3,2,7,4},{6,5,3,2,7,3},{5,3,7,4,6,4},{5,3,7,4,6,3},{5,3,7,6,4,5},{6,5,3,7,2,3},{5,3,7,6,4,4},{5,3,7,6,4,3},{6,5,3,7,2,1},{5,3,7,6,4,2},{5,3,6,7,4,5},{5,3,6,7,4,4},{5,6,3,7,2,1},{5,3,6,7,4,3},{5,6,3,7,4,5},{5,3,6,7,2,3},{5,6,3,7,4,4},{5,6,3,7,4,3},{5,6,3,7,4,2},{5,3,7,6,2,4},{6,5,3,7,4,5},{5,3,7,2,6,5},{5,3,7,2,6,4},{6,5,3,7,4,4},{3,5,7,2,6,5},{6,5,3,7,4,3},{6,5,3,7,4,2},{6,3,5,7,4,5},{6,3,5,7,4,7},{6,3,5,7,4,4},{6,3,5,7,4,3},{6,3,5,7,4,2},{3,5,7,6,2,3},{3,6,5,7,4,5},{3,6,5,7,4,7},{3,6,5,7,4,4},{3,6,5,7,4,3},{3,5,6,7,2,3},{3,5,6,7,4,5},{3,5,6,7,4,7},{3,5,6,7,4,4},{3,5,6,7,4,3},{3,6,5,7,2,3},{6,3,5,7,2,3},{6,3,5,7,2,1},{3,5,7,6,4,5},{3,5,7,6,4,7},{3,5,7,6,4,4},{6,3,5,2,7,4},{6,3,5,2,7,3},{3,5,7,6,4,3},{3,5,7,4,6,5},{3,5,7,4,6,7},{3,5,7,4,6,4},{3,6,5,2,7,3},{3,5,7,4,6,3},{3,5,4,7,6,5},{3,5,4,7,6,3},{3,5,4,6,7,5},{3,5,4,6,7,4},{3,5,6,2,7,3},{3,5,2,6,7,5},{3,5,2,6,7,3},{3,5,2,7,6,5},{4,5,3,2,7,5},{4,5,3,2,7,4},{4,5,3,2,7,3},{4,5,3,7,2,5},{4,5,3,7,2,7},{4,5,3,7,2,3},{1,6,3,5,2,5},{4,3,5,7,2,5},{4,3,5,7,2,3},{6,1,3,5,2,5},{4,3,5,2,7,5},{4,3,5,2,7,4},{4,3,5,2,7,3},{6,3,1,5,2,5},{4,3,2,5,7,5},{4,3,2,5,7,4},{4,3,2,5,7,3},{4,3,2,5,7,2},{4,2,3,5,7,4},{4,2,3,5,7,3},{4,2,3,5,7,6},{3,1,5,2,6,5},{2,4,3,5,7,4},{2,4,3,5,7,3},{2,4,3,5,7,6},{2,3,4,5,7,4},{2,3,4,5,7,3},{2,3,4,5,7,6},{3,2,4,5,7,5},{3,2,4,5,7,4},{3,2,4,5,7,3},{3,2,4,5,7,2},{3,4,2,5,7,5},{3,5,6,1,2,4},{3,4,2,5,7,4},{3,4,2,5,7,3},{3,4,2,5,7,2},{3,4,5,2,7,5},{6,3,5,1,2,5},{3,4,5,2,7,4},{6,3,5,2,1,5},{3,4,5,2,7,3},{3,4,5,7,2,5},{3,6,5,2,1,4},{3,4,5,7,2,3},{3,5,6,2,1,4},{3,5,2,6,1,4},{3,5,2,1,6,4},{5,4,6,2,1,3},{5,6,4,2,1,5},{5,6,4,2,1,3},{6,5,4,2,1,5},{6,5,4,1,2,5},{5,6,4,1,2,5},{4,3,7,5,2,5},{4,3,7,5,2,4},{4,3,7,5,2,3},{3,5,4,6,7,3},{3,5,6,4,7,5},{3,5,6,4,7,7},{3,5,6,4,7,4},{3,5,2,7,6,3},{3,5,6,4,7,3},{3,5,6,4,7,6},{3,2,5,7,6,5},{3,6,5,4,7,5},{3,6,5,4,7,7},{3,2,5,7,6,4},{3,2,5,7,6,3},{3,6,5,4,7,4},{3,6,5,4,7,3},{3,6,5,4,7,6},{3,2,5,6,7,5},{6,3,5,4,7,5},{6,3,5,4,7,7},{3,2,5,6,7,4},{3,2,5,6,7,3},{6,3,5,4,7,4},{6,3,5,4,7,3},{6,3,5,4,7,2},{6,3,5,4,7,6},{6,5,3,4,7,5},{6,5,3,4,7,4},{6,5,3,4,7,3},{6,5,3,4,7,2},{5,6,3,4,7,5},{5,6,3,4,7,4},{5,6,3,4,7,3},{5,6,3,4,7,2},{3,2,6,5,7,5},{5,3,6,4,7,5},{3,2,6,5,7,3},{3,6,2,5,7,5},{3,6,2,5,7,4},{3,6,2,5,7,3},{5,3,6,4,7,4},{6,3,2,5,7,4},{5,3,6,4,7,3},{6,3,2,5,7,3},{5,3,6,4,7,6},{5,3,4,6,7,5},{5,3,4,6,7,4},{6,2,3,5,7,4},{5,3,4,6,7,3},{6,2,3,5,7,3},{2,6,3,5,7,4},{2,6,3,5,7,3},{2,3,6,5,7,3},{2,3,5,6,7,4},{2,3,5,6,7,3},{2,3,5,7,6,5},{2,3,5,7,6,4},{2,3,5,7,6,3},{2,3,7,5,6,5},{2,3,7,5,6,4},{2,3,7,6,5,5},{2,3,7,6,5,4},{2,3,7,6,5,3},{2,3,7,6,5,6},{2,3,6,7,5,4},{2,3,6,7,5,3},{2,3,6,7,5,6},{2,6,3,7,5,7},{2,6,3,7,5,4},{2,6,3,7,5,3},{2,6,3,7,5,6},{6,2,3,7,5,7},{6,2,3,7,5,4},{6,2,3,7,5,3},{6,2,3,7,5,6},{6,3,2,7,5,7},{6,3,2,7,5,4},{6,3,2,7,5,3},{3,6,2,7,5,4},{3,6,2,7,5,3},{3,2,6,7,5,4},{3,2,6,7,5,3},{3,2,7,6,5,4},{3,2,7,5,6,5},{3,2,7,5,6,4},{3,2,7,5,6,3},{3,7,2,5,6,5},{3,7,2,5,6,4},{3,7,2,6,5,4},{3,7,6,2,5,3},{3,6,7,2,5,4},{6,3,7,2,5,7},{6,3,7,2,5,4},{6,3,7,5,2,3},{3,6,7,5,2,3},{4,3,5,7,6,5},{3,6,7,5,2,1},{4,3,5,7,6,4},{4,3,5,7,6,3},{3,7,6,5,2,3},{4,3,5,6,7,5},{3,7,6,5,2,1},{4,3,5,6,7,4},{4,3,5,6,7,3},{3,7,5,6,2,1},{4,3,6,5,7,5},{3,7,5,2,6,5},{4,3,6,5,7,4},{4,3,6,5,7,3},{4,3,6,5,7,6},{3,7,5,2,6,1},{4,6,3,5,7,5},{7,3,5,2,6,5},{4,6,3,5,7,4},{4,6,3,5,7,3},{7,3,5,2,6,3},{4,6,3,5,7,6},{6,4,3,5,7,4},{6,4,3,5,7,3},{6,4,3,5,7,6},{7,3,5,6,2,3},{7,3,6,5,2,3},{7,6,3,5,2,3},{6,7,3,5,2,3},{6,7,3,2,5,7},{6,7,3,2,5,4},{7,6,3,2,5,7},{7,6,3,2,5,4},{7,3,6,2,5,5},{7,3,2,6,5,5},{7,3,2,5,6,5},{6,4,2,7,3,7},{6,4,2,7,3,1},{6,4,2,7,3,6},{4,6,2,7,3,5},{4,6,2,7,3,7},{4,6,2,7,3,1},{4,6,2,7,3,6},{4,2,6,7,3,5},{4,2,6,7,3,7},{4,2,6,7,3,6},{4,2,7,6,3,5},{4,2,7,6,3,7},{4,2,7,6,3,6},{4,2,7,3,6,7},{4,2,7,3,6,2},{4,2,7,3,6,1},{4,2,7,3,6,6},{4,7,2,3,6,1},{4,7,2,3,6,6},{4,7,2,6,3,7},{4,7,2,6,3,6},{4,7,6,2,3,5},{4,7,6,2,3,7},{4,7,6,2,3,1},{4,7,6,2,3,6},{4,6,7,2,3,5},{4,6,7,2,3,7},{4,6,7,2,3,1},{4,6,7,2,3,6},{6,4,7,2,3,5},{6,4,7,2,3,7},{6,4,7,2,3,1},{6,4,7,2,3,6},{6,4,7,3,2,5},{6,4,7,3,2,7},{6,4,7,3,2,1},{6,4,7,3,2,6},{4,6,7,3,2,5},{4,6,7,3,2,7},{4,6,7,3,2,2},{4,6,7,3,2,1},{4,6,7,3,2,6},{4,7,6,3,2,7},{4,7,6,3,2,2},{4,7,6,3,2,1},{4,7,6,3,2,6},{4,7,3,6,2,5},{4,7,3,6,2,7},{4,7,3,6,2,2},{4,7,3,6,2,1},{4,7,3,6,2,6},{4,7,3,2,6,5},{4,7,3,2,6,7},{4,7,3,2,6,2},{4,7,3,2,6,1},{4,7,3,2,6,6},{7,4,3,2,1,5},{7,4,3,2,1,2},{7,4,3,2,1,1},{7,4,3,1,2,5},{7,4,3,1,2,7},{7,4,3,1,2,2},{7,4,3,1,2,1},{7,4,3,1,2,6},{7,4,1,3,2,5},{7,4,1,3,2,7},{7,4,1,3,2,2},{7,4,1,3,2,6},{7,1,4,3,2,5},{7,1,4,3,2,7},{7,1,4,3,2,2},{7,1,4,3,2,1},{1,7,4,3,2,7},{1,7,4,3,2,2},{2,6,1,7,4,4},{2,6,1,7,4,3},{6,2,1,7,4,4},{1,7,4,3,2,1},{6,2,1,7,4,3},{1,7,4,3,2,6},{1,7,4,2,3,7},{1,7,4,2,3,2},{6,1,2,7,4,4},{1,7,4,2,3,6},{6,1,2,7,4,3},{7,1,4,2,3,5},{7,1,4,2,3,7},{1,6,2,7,4,4},{1,6,2,7,4,3},{7,1,4,2,3,6},{7,4,1,2,3,5},{7,4,1,2,3,7},{7,4,1,2,3,2},{7,4,1,2,3,1},{7,4,1,2,3,6},{7,4,2,1,3,5},{7,4,2,1,3,7},{7,4,2,1,3,2},{7,4,2,1,3,1},{7,4,2,3,1,5},{7,4,2,3,1,2},{7,4,2,3,1,1},{7,2,4,3,1,5},{7,2,4,3,1,7},{7,2,3,5,6,5},{3,4,7,5,6,4},{7,2,3,5,6,4},{3,4,7,5,6,3},{3,4,7,6,5,5},{7,2,3,6,5,5},{3,4,7,6,5,7},{3,4,7,6,5,4},{7,2,3,6,5,4},{3,4,7,6,5,3},{7,2,3,6,5,3},{7,2,3,6,5,6},{3,4,6,7,5,5},{7,2,6,3,5,5},{3,4,6,7,5,7},{7,2,6,3,5,7},{3,4,6,7,5,4},{7,2,6,3,5,4},{3,4,6,7,5,3},{7,2,6,3,5,3},{3,6,4,7,5,5},{7,2,6,3,5,6},{3,6,4,7,5,7},{7,6,2,3,5,5},{7,6,2,3,5,7},{3,6,4,7,5,4},{7,6,2,3,5,4},{3,6,4,7,5,3},{7,6,2,3,5,3},{7,6,2,3,5,6},{6,7,2,3,5,7},{3,6,4,7,5,6},{6,3,4,7,5,5},{6,7,2,3,5,4},{6,7,2,3,5,3},{6,3,4,7,5,4},{6,3,4,7,5,3},{6,7,2,3,5,6},{6,2,7,3,5,7},{6,3,4,7,5,6},{6,2,7,3,5,4},{6,2,7,3,5,3},{6,2,7,3,5,6},{2,6,7,3,5,7},{2,6,7,3,5,4},{2,6,7,3,5,3},{2,6,7,3,5,6},{2,7,6,3,5,5},{2,7,6,3,5,7},{2,7,6,3,5,4},{2,7,6,3,5,3},{2,7,6,3,5,6},{2,7,3,6,5,5},{2,7,3,6,5,4},{2,7,3,6,5,3},{2,7,3,6,5,6},{2,7,3,5,6,5},{2,7,3,5,6,4},{2,7,5,3,6,5},{2,7,5,3,6,4},{4,7,3,5,6,5},{4,7,3,5,6,7},{2,7,5,3,6,1},{4,7,3,5,6,4},{4,7,3,5,6,3},{2,7,5,6,3,5},{2,7,5,6,3,4},{4,7,3,6,5,5},{4,7,3,6,5,7},{2,7,5,6,3,1},{4,7,3,6,5,4},{4,7,3,6,5,3},{2,7,6,5,3,5},{2,7,6,5,3,4},{4,7,6,3,5,5},{4,7,6,3,5,7},{4,7,6,3,5,4},{4,7,6,3,5,3},{2,6,7,5,3,4},{4,6,7,3,5,5},{2,6,7,5,3,1},{4,6,7,3,5,7},{4,6,7,3,5,4},{4,6,7,3,5,3},{6,2,7,5,3,4},{4,6,7,3,5,6},{6,2,7,5,3,1},{6,4,7,3,5,5},{6,4,7,3,5,4},{6,7,2,5,3,4},{6,4,7,3,5,3},{6,7,2,5,3,1},{6,4,7,3,5,6},{6,4,7,5,3,5},{7,6,2,5,3,5},{6,4,7,5,3,7},{6,4,7,5,3,4},{7,6,2,5,3,4},{6,4,7,5,3,3},{7,6,2,5,3,3},{6,4,7,5,3,1},{4,6,7,5,3,5},{7,2,6,5,3,5},{4,6,7,5,3,7},{4,6,7,5,3,4},{7,2,6,5,3,4},{4,6,7,5,3,3},{7,2,6,5,3,3},{4,7,6,5,3,5},{7,2,5,6,3,5},{4,7,6,5,3,7},{7,2,5,6,3,4},{4,7,6,5,3,4},{7,2,5,6,3,3},{4,7,6,5,3,3},{7,2,5,3,6,5},{4,7,5,6,3,5},{7,2,5,3,6,4},{4,7,5,6,3,7},{4,7,5,6,3,4},{4,7,5,6,3,3},{7,5,2,3,6,5},{4,7,5,3,6,5},{4,7,5,3,6,7},{7,5,2,3,6,3},{4,7,5,3,6,4},{4,7,5,3,6,3},{7,5,2,6,3,5},{7,4,5,3,6,5},{7,4,5,3,6,7},{7,5,2,6,3,3},{7,4,5,3,6,4},{7,5,6,2,3,5},{7,5,6,2,3,4},{7,5,6,2,3,3},{7,6,5,2,3,5},{7,6,5,2,3,4},{7,6,5,2,3,3},{6,7,5,2,3,4},{7,4,5,3,6,3},{6,7,5,2,3,3},{7,4,5,6,3,5},{7,4,5,6,3,7},{7,4,5,6,3,4},{7,4,5,6,3,3},{6,7,5,3,2,3},{7,4,5,6,3,6},{7,4,6,5,3,5},{7,4,6,5,3,7},{7,4,6,5,3,4},{7,6,5,3,2,3},{7,4,6,5,3,3},{7,4,6,5,3,2},{7,4,6,5,3,6},{7,6,4,5,3,5},{7,6,4,5,3,4},{7,6,4,5,3,3},{7,6,4,5,3,2},{7,6,4,5,3,6},{6,7,4,5,3,5},{6,7,4,5,3,7},{6,7,4,5,3,4},{6,7,4,5,3,3},{7,5,3,6,2,3},{6,7,4,3,5,5},{7,5,3,2,6,5},{6,7,4,3,5,4},{6,7,4,3,5,3},{7,5,3,2,6,3},{6,7,4,3,5,6},{7,6,4,3,5,5},{5,7,3,2,1,5},{7,6,4,3,5,4},{7,6,4,3,5,3},{5,7,3,2,1,4},{5,7,3,2,1,3},{7,6,4,3,5,6},{7,4,6,3,5,5},{7,4,6,3,5,7},{5,7,3,1,2,5},{7,4,6,3,5,4},{5,7,3,1,2,4},{7,4,6,3,5,3},{5,7,3,1,2,3},{5,7,3,1,2,1},{7,4,6,3,5,6},{7,4,3,6,5,5},{7,4,3,6,5,7},{7,4,3,6,5,4},{7,4,3,6,5,3},{7,4,3,5,6,5},{7,4,3,5,6,7},{7,4,3,5,6,4},{7,4,3,5,6,3},{5,7,2,1,3,5},{5,7,2,1,3,3},{5,7,2,3,1,5},{5,7,2,3,1,3},{5,2,7,3,1,5},{5,2,7,3,1,3},{5,2,7,1,3,5},{5,2,7,1,3,3},{1,2,6,7,4,4},{1,2,6,7,4,3},{1,2,7,6,4,3},{1,2,7,4,6,4},{1,2,7,4,6,3},{1,2,4,7,6,4},{1,2,4,7,6,3},{1,2,4,6,7,4},{7,2,4,3,1,2},{7,2,4,3,1,1},{1,2,6,4,7,4},{7,2,4,1,3,5},{7,2,4,1,3,2},{7,2,4,1,3,1},{1,6,2,4,7,4},{7,2,1,4,3,5},{7,2,1,4,3,6},{6,1,2,4,7,4},{7,1,2,4,3,5},{6,2,1,4,7,4},{7,1,2,4,3,6},{6,2,1,4,7,3},{1,7,2,4,3,2},{2,6,1,4,7,4},{1,7,2,4,3,6},{2,1,6,4,7,4},{1,2,7,4,3,2},{1,2,7,4,3,6},{2,1,4,6,7,4},{2,1,7,4,3,1},{2,1,7,4,3,6},{2,1,4,7,6,4},{2,7,1,4,3,1},{2,7,1,4,3,6},{2,7,4,1,3,5},{2,7,4,1,3,2},{2,7,4,1,3,1},{2,7,4,1,3,6},{2,7,4,3,1,7},{2,7,4,3,1,2},{2,4,1,7,6,4},{2,7,4,3,1,1},{2,7,4,3,1,6},{2,4,1,6,7,4},{6,2,4,1,7,3},{6,2,4,7,1,3},{2,4,7,1,6,4},{4,2,7,1,6,4},{4,6,2,7,1,3},{6,4,2,7,1,3},{6,4,2,1,7,3},{4,6,2,1,7,3},{4,2,1,6,7,4},{4,2,1,6,7,3},{4,2,1,7,6,4},{4,1,2,7,6,4},{4,1,2,7,6,3},{3,7,4,2,1,5},{3,7,4,2,1,7},{3,7,4,2,1,2},{4,1,2,6,7,4},{3,7,4,2,1,1},{3,7,4,2,1,6},{3,7,4,1,2,5},{3,7,4,1,2,7},{4,1,6,2,7,4},{3,7,4,1,2,1},{3,7,4,1,2,6},{3,7,1,4,2,5},{3,7,1,4,2,2},{4,6,1,2,7,4},{3,7,1,4,2,1},{3,7,1,4,2,6},{3,1,7,4,2,7},{3,1,7,4,2,2},{3,1,7,4,2,1},{6,4,1,2,7,4},{3,1,7,4,2,6},{1,3,7,4,2,7},{1,3,7,4,2,2},{1,3,7,4,2,1},{6,1,4,2,7,4},{1,3,7,2,4,5},{1,3,7,2,4,2},{1,6,4,2,7,4},{1,3,7,2,4,1},{3,1,7,2,4,5},{3,1,7,2,4,2},{1,4,6,2,7,4},{3,1,7,2,4,1},{3,7,1,2,4,5},{3,7,1,2,4,2},{1,4,2,6,7,4},{3,7,1,2,4,1},{3,7,2,1,4,5},{3,7,2,1,4,2},{1,4,2,7,6,4},{3,7,2,1,4,1},{3,7,2,1,4,6},{3,7,2,4,1,5},{3,7,2,4,1,7},{1,4,7,2,6,3},{3,7,2,4,1,1},{3,7,2,4,1,6},{3,2,7,4,1,5},{3,2,7,4,1,7},{3,2,7,4,1,1},{3,2,7,4,1,6},{3,2,7,1,4,5},{3,2,7,1,4,2},{2,5,7,1,3,4},{2,5,7,1,3,3},{2,5,7,1,3,1},{2,5,7,3,1,5},{2,5,7,3,1,4},{2,5,7,3,1,3},{2,5,7,3,1,2},{7,5,3,4,6,7},{7,5,3,4,6,4},{7,5,3,4,6,3},{7,5,3,6,4,5},{7,5,3,6,4,7},{7,5,3,6,4,4},{7,5,3,6,4,3},{7,5,6,3,4,5},{7,5,6,3,4,4},{7,5,6,3,4,3},{7,5,6,3,4,1},{7,6,5,3,4,5},{7,6,5,3,4,4},{7,6,5,3,4,3},{7,6,5,3,4,1},{6,7,5,3,4,5},{6,7,5,3,4,3},{3,2,7,1,4,1},{3,2,7,1,4,6},{1,4,7,6,2,3},{3,2,1,7,4,5},{3,2,1,7,4,2},{3,2,1,7,4,1},{3,2,1,7,4,6},{3,1,2,7,4,2},{3,1,2,7,4,1},{1,3,2,7,4,2},{1,3,2,7,4,1},{6,1,4,7,2,4},{1,2,3,7,4,2},{1,2,3,7,4,6},{6,4,1,7,2,4},{6,4,1,7,2,3},{2,1,3,7,4,2},{4,6,1,7,2,4},{4,6,1,7,2,3},{2,1,3,7,4,6},{4,1,6,7,2,4},{4,1,6,7,2,3},{2,3,1,7,4,2},{2,3,1,7,4,6},{2,3,7,1,4,2},{4,1,7,6,2,3},{2,3,7,1,4,6},{2,3,7,4,1,7},{4,1,7,2,6,3},{2,3,7,4,1,2},{2,3,7,4,1,1},{4,7,1,2,6,3},{2,3,4,7,1,2},{2,3,4,7,1,1},{4,7,1,6,2,4},{2,3,4,1,7,2},{4,7,1,6,2,3},{2,3,4,1,7,1},{4,7,6,1,2,4},{2,3,1,4,7,2},{2,3,1,4,7,1},{2,3,1,4,7,6},{2,1,3,4,7,2},{4,6,7,1,2,4},{2,1,3,4,7,1},{4,6,7,1,2,3},{2,1,3,4,7,6},{6,4,7,1,2,4},{1,2,3,4,7,2},{6,4,7,1,2,3},{1,2,3,4,7,1},{1,2,3,4,7,6},{1,3,2,4,7,2},{6,4,7,2,1,3},{1,3,2,4,7,1},{3,1,2,4,7,2},{4,6,7,2,1,3},{3,1,2,4,7,1},{4,7,6,2,1,3},{3,2,1,4,7,2},{3,2,1,4,7,1},{3,2,1,4,7,6},{3,2,4,1,7,6},{3,2,4,7,1,5},{4,7,2,1,6,4},{3,2,4,7,1,7},{7,4,3,1,6,5},{7,4,3,1,6,7},{3,2,4,7,1,6},{3,4,2,7,1,5},{3,4,2,7,1,7},{3,4,2,7,1,6},{7,4,3,1,6,2},{7,4,3,1,6,6},{7,4,3,6,1,5},{7,4,3,6,1,7},{3,4,2,1,7,6},{7,4,3,6,1,2},{7,4,3,6,1,6},{7,4,6,3,1,5},{7,4,6,3,1,7},{3,4,1,2,7,6},{7,4,6,3,1,2},{7,4,6,3,1,6},{7,6,4,3,1,5},{7,6,4,3,1,7},{3,1,4,2,7,2},{3,1,4,2,7,1},{7,6,4,3,1,2},{3,1,4,2,7,6},{7,6,4,3,1,6},{6,7,4,3,1,5},{6,7,4,3,1,7},{1,3,4,2,7,2},{6,7,4,3,1,2},{1,3,4,2,7,1},{6,7,4,3,1,6},{6,7,4,1,3,5},{6,7,4,1,3,7},{6,7,4,1,3,2},{1,3,4,7,2,2},{6,7,4,1,3,1},{1,3,4,7,2,1},{6,7,4,1,3,6},{7,6,4,1,3,5},{7,6,4,1,3,7},{3,1,4,7,2,7},{7,6,4,1,3,2},{7,6,4,1,3,1},{3,1,4,7,2,2},{7,6,4,1,3,6},{3,1,4,7,2,1},{3,1,4,7,2,6},{7,4,6,1,3,5},{3,4,1,7,2,5},{7,4,6,1,3,7},{3,4,1,7,2,7},{3,4,1,7,2,6},{7,4,6,1,3,6},{3,4,7,1,2,5},{7,4,1,6,3,5},{3,4,7,1,2,7},{7,4,1,6,3,7},{3,4,7,1,2,2},{3,4,7,1,2,1},{7,4,1,6,3,2},{3,4,7,1,2,6},{3,4,7,2,1,5},{7,4,1,6,3,6},{3,4,7,2,1,7},{7,4,1,3,6,5},{3,4,7,2,1,2},{7,4,1,3,6,7},{3,4,7,2,1,1},{3,4,7,2,1,6},{7,4,1,3,6,2},{7,4,1,3,6,6},{7,1,4,3,6,7},{7,1,4,3,6,6},{7,1,4,6,3,5},{7,1,4,6,3,7},{7,1,4,6,3,2},{7,1,4,6,3,1},{7,1,4,6,3,6},{7,1,6,4,3,5},{7,1,6,4,3,7},{7,1,6,4,3,2},{7,1,6,4,3,1},{7,1,6,4,3,6},{7,6,1,4,3,5},{7,6,1,4,3,7},{7,6,1,4,3,2},{7,6,1,4,3,1},{7,6,1,4,3,6},{6,7,1,4,3,5},{6,7,1,4,3,2},{6,7,1,4,3,1},{6,7,1,4,3,6},{6,1,7,4,3,5},{6,1,7,4,3,6},{1,6,7,4,3,6},{1,7,6,4,3,7},{1,7,6,4,3,2},{1,7,6,4,3,1},{1,7,6,4,3,6},{1,7,4,6,3,7},{1,7,4,6,3,1},{1,7,4,6,3,6},{1,7,4,3,6,7},{1,7,4,3,6,6},{1,7,3,4,6,7},{1,7,3,4,6,6},{1,7,3,6,4,5},{1,7,3,6,4,7},{1,7,3,6,4,2},{1,7,3,6,4,6},{1,7,6,3,4,7},{1,7,6,3,4,2},{1,7,6,3,4,1},{1,6,7,3,4,5},{6,1,7,3,4,5},{4,1,5,3,2,2},{4,1,5,3,2,6},{4,5,1,3,2,5},{4,5,1,3,2,6},{4,5,3,1,2,5},{4,5,3,2,1,5},{5,1,7,2,6,4},{1,5,7,6,2,3},{1,5,7,2,6,3},{1,5,2,7,6,3},{1,5,2,6,7,3},{1,5,6,2,7,3},{1,6,5,2,7,3},{6,1,5,2,7,3},{6,5,1,2,7,3},{6,1,7,3,4,6},{6,7,1,3,4,5},{6,7,1,3,4,2},{6,7,1,3,4,1},{6,7,1,3,4,6},{7,6,1,3,4,5},{7,6,1,3,4,7},{7,6,1,3,4,2},{7,6,1,3,4,1},{7,6,1,3,4,6},{7,1,6,3,4,7},{7,1,6,3,4,2},{7,1,6,3,4,1},{7,1,3,6,4,7},{7,1,3,6,4,2},{7,1,3,6,4,1},{7,1,3,6,4,6},{7,1,3,4,6,7},{7,1,3,4,6,6},{7,3,1,4,6,7},{7,3,1,4,6,1},{7,3,1,4,6,6},{7,3,1,6,4,5},{7,3,1,6,4,7},{7,3,1,6,4,2},{7,3,1,6,4,6},{7,3,6,1,4,5},{7,3,6,1,4,7},{7,3,6,1,4,2},{7,3,6,1,4,1},{7,3,6,1,4,6},{7,6,3,1,4,5},{7,6,3,1,4,7},{7,6,3,1,4,2},{7,6,3,1,4,1},{7,6,3,1,4,6},{6,7,3,1,4,5},{6,7,3,1,4,7},{6,7,3,1,4,2},{6,7,3,1,4,6},{6,7,3,4,1,5},{6,7,3,4,1,7},{6,7,3,4,1,2},{6,7,3,4,1,6},{7,6,3,4,1,5},{7,6,3,4,1,7},{7,6,3,4,1,2},{7,6,3,4,1,6},{7,3,6,4,1,5},{7,3,6,4,1,7},{7,3,6,4,1,2},{7,3,6,4,1,6},{7,3,4,6,1,5},{7,3,4,6,1,7},{7,3,4,6,1,2},{7,3,4,6,1,6},{7,3,4,1,6,5},{7,3,4,1,6,7},{7,3,4,1,6,2},{7,3,4,1,6,6},{6,3,1,7,4,5},{6,1,3,7,4,5},{6,1,3,7,4,2},{6,1,3,7,4,6},{6,1,3,4,5,5},{1,6,3,7,4,5},{6,1,3,4,5,7},{6,1,3,4,5,4},{6,1,3,4,5,3},{1,6,3,7,4,2},{1,6,3,7,4,6},{1,3,6,7,4,5},{6,3,1,4,5,5},{6,3,1,4,5,7},{6,3,1,4,5,3},{1,3,6,7,4,6},{1,3,7,6,4,5},{3,6,1,4,5,7},{1,3,7,6,4,7},{3,6,1,4,5,3},{1,3,7,6,4,6},{1,3,7,4,6,7},{3,1,6,4,5,3},{1,3,7,4,6,6},{3,1,4,6,5,7},{3,1,4,6,5,4},{3,1,4,6,5,3},{1,3,4,7,6,6},{1,3,4,6,7,5},{3,1,4,5,6,5},{3,1,4,5,6,7},{3,1,4,5,6,4},{3,1,4,5,6,3},{1,3,4,6,7,6},{3,4,1,5,6,5},{3,4,1,5,6,4},{1,3,6,4,7,6},{1,6,3,4,7,5},{3,4,1,6,5,5},{3,4,1,6,5,4},{1,6,3,4,7,2},{1,6,3,4,7,6},{6,1,3,4,7,5},{3,4,6,1,5,5},{3,4,6,1,5,3},{6,1,3,4,7,2},{6,1,3,4,7,6},{3,4,6,1,5,6},{6,3,1,4,7,5},{3,6,4,1,5,5},{6,3,1,4,7,7},{3,6,4,1,5,3},{6,3,1,4,7,2},{6,3,1,4,7,6},{6,3,4,1,5,5},{3,6,1,4,7,5},{3,6,1,4,7,7},{3,6,1,4,7,2},{3,6,1,4,7,6},{6,3,4,5,1,5},{3,1,6,4,7,7},{3,6,4,5,1,5},{3,1,6,4,7,6},{3,1,4,6,7,5},{3,1,4,6,7,2},{3,1,4,6,7,1},{3,4,6,5,1,5},{3,1,4,6,7,6},{3,1,4,7,6,7},{3,1,4,7,6,2},{3,1,4,7,6,1},{3,4,5,6,1,5},{3,1,4,7,6,6},{3,4,1,7,6,7},{3,4,1,7,6,2},{3,4,5,1,6,5},{3,4,1,7,6,1},{3,4,1,7,6,6},{3,4,1,6,7,2},{4,3,5,1,6,5},{3,4,1,6,7,1},{3,4,1,6,7,6},{3,4,6,1,7,2},{3,4,6,1,7,1},{3,4,6,1,7,6},{3,6,4,1,7,7},{3,6,4,1,7,2},{3,6,4,1,7,1},{3,6,4,1,7,6},{6,3,4,1,7,5},{6,3,4,1,7,7},{6,3,4,1,7,2},{5,6,1,2,7,3},{5,1,6,2,7,3},{5,1,2,6,7,4},{5,1,2,6,7,3},{5,1,2,7,6,4},{5,1,2,7,6,3},{5,7,4,2,6,5},{5,7,4,2,6,7},{5,7,4,6,2,5},{5,7,4,6,2,7},{5,7,6,4,2,3},{6,5,7,4,2,3},{6,5,7,2,4,3},{5,6,7,2,4,4},{5,6,7,2,4,3},{5,7,6,2,4,4},{5,7,6,2,4,3},{5,7,2,6,4,3},{5,7,2,4,6,5},{5,2,7,4,6,5},{5,2,7,4,6,3},{5,2,7,6,4,5},{5,2,7,6,4,3},{5,2,6,7,4,5},{5,2,6,7,4,3},{5,6,2,7,4,5},{5,6,2,7,4,3},{6,5,2,7,4,5},{6,5,2,7,4,4},{6,5,2,7,4,3},{6,2,5,7,4,5},{6,2,5,7,4,7},{6,2,5,7,4,4},{6,2,5,7,4,1},{6,2,5,7,4,6},{2,6,5,7,4,5},{2,1,6,5,7,4},{2,6,5,7,4,7},{2,1,6,5,7,3},{2,6,5,7,4,4},{2,6,5,7,4,1},{2,6,5,7,4,6},{2,5,6,7,4,5},{2,6,1,5,7,4},{2,5,6,7,4,7},{2,6,1,5,7,3},{2,5,6,7,4,4},{2,5,6,7,4,3},{2,5,6,7,4,1},{2,5,6,7,4,6},{2,5,7,6,4,5},{6,2,1,5,7,4},{2,5,7,6,4,7},{6,2,1,5,7,3},{2,5,7,6,4,4},{2,5,7,6,4,3},{2,5,7,6,4,1},{2,5,7,6,4,6},{2,5,7,4,6,5},{2,5,7,4,6,3},{2,5,7,4,6,1},{2,5,4,7,6,5},{2,5,4,6,7,4},{2,5,6,4,7,5},{2,5,6,4,7,4},{2,5,6,4,7,1},{4,3,5,6,1,5},{6,3,4,1,7,6},{6,3,4,7,1,5},{6,3,4,7,1,7},{4,3,6,5,1,5},{6,3,4,7,1,2},{6,3,4,7,1,6},{4,6,3,5,1,5},{3,6,4,7,1,7},{3,6,4,7,1,2},{3,6,4,7,1,1},{3,6,4,7,1,6},{3,4,6,7,1,5},{6,4,3,5,1,5},{3,4,6,7,1,7},{3,4,6,7,1,2},{3,4,6,7,1,1},{3,4,6,7,1,6},{6,4,3,1,5,5},{3,4,7,6,1,5},{3,4,7,6,1,7},{3,4,7,6,1,2},{6,4,3,1,5,6},{3,4,7,6,1,1},{4,6,3,1,5,5},{3,4,7,6,1,6},{3,4,7,1,6,5},{3,4,7,1,6,7},{4,6,3,1,5,3},{3,4,7,1,6,2},{4,6,3,1,5,6},{4,3,6,1,5,5},{3,4,7,1,6,1},{3,4,7,1,6,6},{4,3,7,1,6,5},{4,3,6,1,5,3},{4,3,7,1,6,7},{4,3,6,1,5,6},{4,3,1,6,5,5},{4,3,7,1,6,2},{4,3,7,1,6,1},{4,3,1,6,5,4},{4,3,7,1,6,6},{4,3,1,6,5,3},{4,3,7,6,1,5},{4,3,7,6,1,7},{4,3,1,5,6,5},{4,3,7,6,1,2},{4,3,1,5,6,4},{4,3,7,6,1,1},{4,3,7,6,1,6},{4,3,1,5,6,3},{4,3,6,7,1,5},{4,3,6,7,1,7},{4,1,3,5,6,5},{4,1,3,5,6,4},{4,3,6,7,1,2},{4,1,3,5,6,3},{4,3,6,7,1,1},{4,3,6,7,1,6},{4,6,3,7,1,5},{4,6,3,7,1,7},{4,1,3,6,5,5},{4,1,3,6,5,4},{4,1,3,6,5,3},{4,6,3,7,1,2},{4,6,3,7,1,1},{4,6,3,7,1,6},{4,1,6,3,5,5},{6,4,3,7,1,5},{6,4,3,7,1,7},{4,1,6,3,5,4},{4,1,6,3,5,3},{6,4,3,7,1,2},{6,4,3,7,1,6},{6,4,3,1,7,5},{4,6,1,3,5,5},{6,4,3,1,7,7},{4,6,1,3,5,4},{6,4,3,1,7,2},{4,6,1,3,5,3},{6,4,3,1,7,6},{4,6,3,1,7,5},{6,4,1,3,5,5},{4,6,3,1,7,7},{6,4,1,3,5,7},{6,4,1,3,5,4},{4,6,3,1,7,2},{4,6,3,1,7,1},{4,6,3,1,7,6},{6,1,4,3,5,5},{6,1,4,3,5,7},{6,1,4,3,5,4},{6,1,4,3,5,3},{4,3,6,1,7,2},{4,3,6,1,7,1},{1,6,4,3,5,5},{4,3,6,1,7,6},{1,6,4,3,5,7},{1,6,4,3,5,3},{4,3,1,6,7,2},{1,4,6,3,5,5},{4,3,1,6,7,1},{1,4,6,3,5,7},{4,3,1,6,7,6},{1,4,6,3,5,3},{4,3,1,7,6,7},{4,3,1,7,6,2},{1,4,3,6,5,7},{4,3,1,7,6,1},{1,4,3,6,5,3},{4,3,1,7,6,6},{4,1,3,7,6,7},{1,4,3,5,6,5},{1,4,3,5,6,7},{1,4,3,5,6,3},{4,1,3,7,6,1},{4,1,3,7,6,6},{1,4,5,3,6,5},{1,4,5,3,6,7},{4,1,3,6,7,7},{1,4,5,3,6,4},{1,4,5,3,6,3},{1,4,5,3,6,2},{4,1,3,6,7,1},{4,1,3,6,7,6},{4,1,6,3,7,5},{1,4,5,6,3,5},{4,1,6,3,7,7},{1,4,5,6,3,7},{1,4,5,6,3,4},{1,4,5,6,3,3},{4,1,6,3,7,1},{1,4,5,6,3,2},{4,1,6,3,7,6},{4,6,1,3,7,5},{4,6,1,3,7,7},{1,4,6,5,3,5},{4,6,1,3,7,2},{4,6,1,3,7,1},{1,4,6,5,3,3},{4,6,1,3,7,6},{6,4,1,3,7,5},{6,4,1,3,7,7},{1,6,4,5,3,5},{1,6,4,5,3,7},{6,4,1,3,7,2},{1,6,4,5,3,4},{6,4,1,3,7,6},{6,1,4,3,7,5},{6,1,4,5,3,5},{6,1,4,3,7,2},{6,1,4,5,3,7},{6,1,4,5,3,4},{6,1,4,3,7,6},{6,1,4,5,3,3},{1,6,4,3,7,5},{6,4,1,5,3,5},{1,6,4,3,7,2},{6,4,1,5,3,7},{1,6,4,3,7,6},{6,4,1,5,3,4},{1,4,6,3,7,5},{6,4,1,5,3,3},{1,4,6,3,7,2},{4,6,1,5,3,5},{1,4,6,3,7,6},{4,6,1,5,3,7},{1,4,3,6,7,5},{4,6,1,5,3,4},{4,6,1,5,3,3},{4,1,6,5,3,5},{1,4,3,6,7,6},{4,1,6,5,3,4},{4,1,6,5,3,3},{4,1,5,6,3,5},{1,4,3,7,6,6},{4,1,5,6,3,7},{1,4,7,3,6,7},{4,1,5,6,3,4},{4,1,5,6,3,3},{4,1,5,6,3,2},{4,1,5,3,6,5},{1,4,7,3,6,6},{4,1,5,3,6,7},{4,1,5,3,6,4},{4,1,5,3,6,3},{4,1,5,3,6,2},{1,4,7,6,3,1},{1,4,7,6,3,6},{4,5,1,3,6,5},{4,5,1,3,6,2},{1,4,6,7,3,6},{4,5,1,6,3,5},{4,5,1,6,3,4},{4,5,1,6,3,2},{1,6,4,7,3,6},{6,1,4,7,3,5},{4,5,6,1,3,5},{4,5,6,1,3,4},{4,5,6,1,3,2},{6,1,4,7,3,6},{6,4,1,7,3,5},{4,6,5,1,3,5},{6,4,1,7,3,7},{4,6,5,1,3,4},{4,6,5,1,3,2},{6,4,1,7,3,6},{4,6,1,7,3,5},{4,6,1,7,3,7},{6,4,5,1,3,5},{6,4,5,1,3,7},{6,4,5,1,3,3},{4,6,1,7,3,1},{4,6,1,7,3,6},{4,1,6,7,3,5},{4,1,6,7,3,7},{6,4,5,3,1,5},{6,4,5,3,1,7},{4,1,6,7,3,1},{4,1,6,7,3,6},{6,4,5,3,1,2},{4,1,7,6,3,5},{4,1,7,6,3,7},{4,6,5,3,1,5},{4,1,7,6,3,1},{4,6,5,3,1,2},{4,1,7,6,3,6},{4,1,7,3,6,7},{4,5,6,3,1,5},{4,1,7,3,6,2},{4,5,6,3,1,2},{4,1,7,3,6,1},{4,1,7,3,6,6},{4,7,1,3,6,5},{4,5,3,6,1,5},{4,7,1,3,6,7},{4,5,3,6,1,2},{4,7,1,3,6,2},{4,5,3,1,6,5},{4,7,1,3,6,6},{4,7,1,6,3,5},{4,7,1,6,3,7},{4,7,1,6,3,2},{4,7,1,6,3,6},{4,7,6,1,3,5},{4,7,6,1,3,7},{4,7,6,1,3,6},{4,6,7,1,3,5},{4,6,7,1,3,7},{5,4,6,3,2,5},{4,6,7,1,3,2},{4,6,7,1,3,6},{6,4,7,1,3,5},{6,4,7,1,3,7},{6,4,7,1,3,2},{5,6,4,3,2,5},{6,4,7,1,3,1},{6,4,7,1,3,6},{6,4,7,3,1,5},{6,4,7,3,1,7},{6,5,4,3,2,5},{6,4,7,3,1,2},{6,4,7,3,1,6},{4,6,7,3,1,5},{6,5,4,3,2,1},{4,6,7,3,1,7},{6,5,4,2,3,5},{6,5,4,2,3,7},{4,6,7,3,1,2},{4,6,7,3,1,6},{6,5,4,2,3,1},{6,5,4,2,3,6},{4,7,6,3,1,5},{5,6,4,2,3,5},{4,7,6,3,1,7},{5,6,4,2,3,7},{4,7,6,3,1,2},{5,6,4,2,3,6},{4,7,3,6,1,5},{5,4,6,2,3,5},{4,7,3,6,1,7},{5,4,6,2,3,7},{5,4,6,2,3,4},{4,7,3,6,1,2},{4,7,3,6,1,1},{4,7,3,1,6,5},{4,7,3,1,6,7},{4,7,3,1,6,2},{5,4,6,2,3,6},{4,7,3,1,6,6},{5,4,2,6,3,5},{5,4,2,6,3,7},{5,4,2,6,3,4},{5,4,2,6,3,6},{5,4,2,3,6,7},{5,4,2,3,6,4},{5,2,4,3,6,7},{5,2,4,6,3,5},{5,2,4,6,3,7},{5,2,4,6,3,6},{5,2,6,4,3,5},{5,2,6,4,3,7},{5,2,6,4,3,4},{5,2,6,4,3,6},{5,6,2,4,3,5},{5,6,2,4,3,7},{5,6,2,4,3,4},{2,7,6,5,1,4},{2,7,5,6,1,4},{2,7,5,1,6,4},{7,2,5,1,6,4},{7,2,5,6,1,4},{7,2,6,5,1,4},{7,6,2,5,1,4},{5,6,2,4,3,6},{6,5,2,4,3,5},{6,5,2,4,3,7},{6,5,2,4,3,4},{6,5,2,4,3,6},{6,2,5,4,3,5},{6,2,5,4,3,4},{2,6,5,4,3,5},{2,6,5,4,3,4},{2,5,6,4,3,5},{2,5,6,4,3,4},{2,5,4,6,3,4},{2,5,4,3,6,5},{2,5,4,3,6,7},{2,5,4,3,6,4},{2,5,3,4,6,5},{2,5,3,4,6,7},{2,5,3,4,6,4},{2,5,3,4,6,3},{2,5,3,4,6,1},{2,5,3,6,4,5},{2,5,3,6,4,7},{2,5,3,6,4,4},{2,5,3,6,4,3},{2,5,3,6,4,1},{2,5,6,3,4,5},{2,5,6,3,4,7},{2,5,6,3,4,4},{2,5,6,3,4,3},{2,6,5,3,4,5},{2,6,5,3,4,7},{2,6,5,3,4,4},{2,6,5,3,4,3},{6,2,5,3,4,5},{6,2,5,3,4,7},{6,2,5,3,4,4},{6,2,5,3,4,3},{6,5,2,3,4,5},{6,5,2,3,4,4},{5,6,2,3,4,5},{5,6,2,3,4,4},{5,2,6,3,4,5},{5,2,6,3,4,4},{5,2,3,6,4,5},{5,2,3,4,6,7},{5,3,2,6,4,3},{5,3,6,2,4,3},{5,6,3,2,4,5},{5,6,3,2,4,7},{5,6,3,2,4,4},{6,5,3,2,4,5},{6,5,3,2,4,7},{6,5,3,2,4,4},{6,5,3,4,2,5},{6,5,3,4,2,7},{6,5,3,4,2,1},{5,6,3,4,2,5},{5,6,3,4,2,7},{2,6,4,3,5,5},{2,6,4,3,5,7},{2,6,4,3,5,4},{2,4,6,3,5,4},{2,4,3,6,5,7},{2,4,3,6,5,4},{2,4,3,5,6,5},{2,4,3,5,6,7},{2,4,3,5,6,4},{2,4,5,3,6,5},{2,4,5,3,6,4},{2,4,5,6,3,4},{2,4,6,5,3,4},{2,6,4,5,3,5},{2,6,4,5,3,4},{6,2,4,5,3,5},{6,2,4,5,3,4},{6,4,2,5,3,5},{6,4,2,5,3,4},{4,6,2,5,3,4},{4,2,6,5,3,4},{4,2,5,6,3,4},{4,2,5,3,6,5},{4,2,5,3,6,4},{4,5,2,3,6,7},{4,5,2,3,6,4},{4,5,2,3,6,2},{4,5,2,6,3,7},{4,5,2,6,3,4},{4,5,2,6,3,2},{4,5,6,2,3,5},{4,5,6,2,3,7},{4,5,6,2,3,4},{4,5,6,2,3,2},{4,6,5,2,3,5},{4,6,5,2,3,7},{4,6,5,2,3,4},{4,6,5,2,3,2},{4,6,5,2,3,1},{6,4,5,2,3,5},{6,4,5,2,3,7},{6,4,5,2,3,1},{6,4,5,3,2,1},{4,6,5,3,2,5},{4,6,5,3,2,1},{4,5,6,3,2,5},{4,5,3,6,2,5},{4,5,3,2,6,5},{5,4,3,2,1,5},{5,4,3,1,2,5},{5,4,1,3,2,5},{5,1,4,3,2,2},{5,1,4,3,2,1},{1,5,4,3,2,4},{1,5,4,3,2,3},{1,5,4,3,2,2},{1,5,4,3,2,6},{1,5,4,2,3,7},{1,5,4,2,3,4},{1,5,4,2,3,3},{1,5,4,2,3,2},{1,5,4,2,3,1},{1,5,4,2,3,6},{5,1,4,2,3,4},{5,1,4,2,3,2},{5,1,4,2,3,1},{5,4,1,2,3,5},{5,4,1,2,3,2},{5,4,1,2,3,6},{5,4,2,1,3,7},{5,4,2,1,3,2},{5,4,2,1,3,6},{5,4,2,3,1,7},{5,4,2,3,1,2},{5,4,2,3,1,6},{5,2,4,3,1,7},{5,2,4,3,1,2},{5,2,4,3,1,6},{5,2,4,1,3,7},{5,2,4,1,3,4},{5,2,4,1,3,2},{5,2,4,1,3,6},{5,2,1,4,3,4},{5,2,1,4,3,3},{5,2,1,4,3,2},{5,2,1,4,3,1},{5,2,1,4,3,6},{5,1,2,4,3,4},{5,1,2,4,3,3},{5,1,2,4,3,2},{5,1,2,4,3,1},{1,5,2,4,3,4},{1,5,2,4,3,3},{1,5,2,4,3,2},{1,5,2,4,3,1},{1,5,2,4,3,6},{1,2,5,4,3,7},{1,2,5,4,3,4},{1,2,5,4,3,3},{1,2,5,4,3,2},{1,2,5,4,3,6},{2,1,5,4,3,4},{2,1,5,4,3,3},{2,5,1,4,3,4},{2,5,1,4,3,3},{2,5,4,1,3,7},{2,5,4,1,3,4},{2,5,4,1,3,3},{2,5,4,3,1,7},{3,5,1,4,2,7},{3,5,1,4,2,3},{3,5,1,4,2,1},{3,1,5,4,2,7},{3,1,5,4,2,3},{7,6,1,2,3,4},{3,1,5,4,2,1},{7,6,1,2,3,3},{1,3,5,4,2,7},{1,3,5,4,2,3},{7,1,6,2,3,4},{7,1,6,2,3,3},{1,3,5,2,4,5},{1,3,5,2,4,7},{1,3,5,2,4,4},{1,3,5,2,4,3},{7,1,2,6,3,4},{7,1,2,6,3,3},{3,1,5,2,4,5},{3,1,5,2,4,7},{3,1,5,2,4,4},{3,1,5,2,4,3},{7,1,2,3,6,3},{3,5,1,2,4,5},{3,5,1,2,4,7},{7,2,1,3,6,4},{3,5,2,1,4,5},{3,5,2,1,4,7},{7,2,1,6,3,4},{3,5,2,1,4,6},{7,2,1,6,3,3},{3,2,5,4,1,5},{7,2,6,1,3,4},{7,2,6,1,3,3},{7,6,2,1,3,4},{7,6,2,1,3,3},{6,7,2,1,3,3},{6,7,2,3,1,3},{7,6,2,3,1,4},{7,6,2,3,1,3},{7,2,6,3,1,4},{7,2,6,3,1,3},{7,2,3,6,1,4},{7,2,3,6,1,3},{7,2,3,1,6,4},{2,7,3,1,6,4},{2,7,3,6,1,4},{2,7,6,3,1,4},{6,2,7,3,1,3},{6,2,7,1,3,3},{2,7,6,1,3,4},{2,7,1,6,3,4},{2,7,1,3,6,4},{1,2,6,7,3,4},{1,2,6,7,3,3},{1,2,7,6,3,4},{1,2,7,6,3,3},{1,2,7,3,6,4},{1,2,7,3,6,3},{3,2,5,4,1,3},{3,2,5,1,4,5},{3,2,5,1,4,7},{3,2,5,1,4,4},{3,2,5,1,4,3},{3,2,5,1,4,2},{3,2,5,1,4,1},{3,2,5,1,4,6},{3,2,1,5,4,5},{3,2,1,5,4,7},{3,2,1,5,4,4},{3,2,1,5,4,3},{3,1,2,5,4,7},{3,1,2,5,4,4},{3,1,2,5,4,3},{1,3,2,5,4,4},{1,3,2,5,4,3},{1,2,3,5,4,4},{1,2,3,5,4,3},{2,1,3,5,4,7},{2,1,3,5,4,4},{2,1,3,5,4,3},{2,3,1,5,4,7},{2,3,1,5,4,4},{2,3,1,5,4,3},{2,3,5,1,4,7},{2,3,5,1,4,4},{2,3,5,1,4,3},{2,3,5,1,4,2},{2,3,5,1,4,1},{2,3,5,1,4,6},{2,3,5,4,1,4},{2,3,5,4,1,3},{2,3,5,4,1,1},{2,3,5,4,1,6},{2,3,4,5,1,3},{2,3,4,1,5,3},{2,3,1,4,5,4},{1,3,2,4,5,4},{1,3,2,4,5,3},{3,1,2,4,5,4},{3,1,2,4,5,3},{3,2,1,4,5,5},{3,2,1,4,5,4},{3,2,1,4,5,3},{3,2,1,4,5,2},{3,2,1,4,5,1},{3,2,4,1,5,5},{3,2,4,1,5,3},{3,2,4,1,5,2},{3,2,4,1,5,1},{3,2,4,5,1,5},{3,4,2,5,1,5},{3,4,2,5,1,3},{3,4,2,5,1,2},{3,4,2,1,5,5},{3,4,2,1,5,3},{3,4,2,1,5,2},{3,4,2,1,5,1},{3,4,1,2,5,5},{3,4,1,2,5,4},{3,4,1,2,5,2},{3,4,1,2,5,1},{3,1,4,2,5,4},{3,1,4,2,5,1},{1,3,4,2,5,4},{1,3,4,5,2,4},{3,1,4,5,2,4},{3,1,4,5,2,1},{3,4,1,5,2,5},{3,4,1,5,2,4},{3,4,1,5,2,1},{3,4,5,1,2,5},{3,4,5,2,1,5},{7,4,2,1,6,4},{4,3,2,1,6,5},{4,3,2,1,6,7},{4,3,2,6,1,5},{4,3,2,6,1,7},{4,3,2,6,1,2},{4,3,6,2,1,5},{4,3,6,2,1,7},{4,3,6,2,1,2},{4,6,3,2,1,5},{4,6,3,2,1,7},{6,4,3,2,1,7},{6,4,3,1,2,7},{4,6,3,1,2,5},{4,6,3,1,2,7},{4,6,3,1,2,1},{4,3,6,1,2,5},{4,3,6,1,2,7},{4,3,6,1,2,1},{4,3,1,6,2,5},{4,3,1,6,2,7},{4,3,1,6,2,1},{4,3,1,2,6,5},{4,3,1,2,6,7},{6,7,4,1,2,4},{6,7,4,1,2,3},{4,1,3,2,6,5},{4,1,3,2,6,7},{7,6,4,1,2,4},{4,1,3,6,2,5},{4,1,3,6,2,7},{4,1,3,6,2,1},{7,4,6,1,2,4},{4,1,6,3,2,5},{4,1,6,3,2,7},{4,1,6,3,2,1},{4,6,1,3,2,5},{4,6,1,3,2,7},{7,4,1,6,2,4},{7,4,1,6,2,3},{4,6,1,3,2,1},{6,4,1,3,2,7},{7,4,1,2,6,3},{6,1,4,3,2,5},{6,1,4,3,2,7},{1,6,4,3,2,5},{1,6,4,3,2,7},{1,4,6,3,2,5},{1,4,6,3,2,7},{1,4,2,6,3,5},{1,4,6,2,3,5},{1,6,4,2,3,5},{6,1,4,2,3,5},{6,4,1,2,3,5},{6,7,2,1,4,4},{7,2,4,1,6,4},{2,7,4,1,6,4},{2,7,4,1,6,3},{2,7,4,6,1,4},{2,7,4,6,1,3},{2,7,6,4,1,3},{4,2,1,6,3,7},{4,6,2,1,3,7},{6,4,2,1,3,7},{6,2,7,1,4,4},{6,4,2,3,1,5},{6,4,2,3,1,7},{2,6,7,1,4,4},{4,6,2,3,1,7},{2,7,6,1,4,4},{2,7,6,1,4,3},{2,7,1,6,4,4},{2,7,1,6,4,3},{4,2,3,6,1,7},{2,7,1,4,6,4},{2,7,1,4,6,3},{4,2,3,1,6,7},{2,6,4,3,1,5},{2,6,4,3,1,7},{6,2,4,3,1,5},{6,2,4,3,1,7},{6,2,4,1,3,7},{2,1,4,6,3,5},{2,1,6,4,3,5},{2,6,1,4,3,5},{6,2,1,4,3,5},{6,2,1,4,3,7},{6,1,2,4,3,5},{1,6,2,4,3,5},{1,2,6,4,3,5},{1,2,4,6,3,5}}, } \ No newline at end of file diff --git a/parts/modes/attacker_h.lua b/parts/modes/attacker_h.lua index 86dfc81a..91ca1af2 100644 --- a/parts/modes/attacker_h.lua +++ b/parts/modes/attacker_h.lua @@ -1,58 +1,58 @@ return{ - color=COLOR.magenta, - env={ - drop=30,lock=60, - fall=12, - freshLimit=15, - pushSpeed=2, - task=function(P) - while true do - YIELD() - if P.control and P.atkBufferSum==0 then - local D=P.modeData - if D.wave<20 then - local t=1500-30*D.wave--1500~900 - table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(4,7)),amount=12,countdown=t,cd0=t,time=0,sent=false,lv=3}) - table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(3,8)),amount=10,countdown=t,cd0=t,time=0,sent=false,lv=4}) - else - local t=900-10*(D.wave-20)--900~600 - table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=14,countdown=t,cd0=t,time=0,sent=false,lv=4}) - table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(4,7)),amount=8,countdown=t,cd0=t,time=0,sent=false,lv=5}) - end - P.atkBufferSum=P.atkBufferSum+22 - P.stat.recv=P.stat.recv+22 - D.wave=D.wave+1 - if D.wave%10==0 then - if D.wave==20 then - P:showTextF(text.great,0,-140,100,'appear',.6) - P.gameEnv.pushSpeed=3 - elseif D.wave==50 then - P:showTextF(text.maxspeed,0,-140,100,'appear',.6) - end - end - end - end - end, - bg='rainbow2',bgm='shining terminal', - }, - mesDisp=function(P) - setFont(55) - mStr(P.modeData.wave,63,200) - mStr("22",63,320) - mText(drawableText.wave,63,260) - mText(drawableText.nextWave,63,380) - end, - score=function(P)return{P.modeData.wave,P.stat.time}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]=50 and 5 or - W>=40 and 4 or - W>=30 and 3 or - W>=20 and 2 or - W>=10 and 1 or - W>=5 and 0 - end, + color=COLOR.magenta, + env={ + drop=30,lock=60, + fall=12, + freshLimit=15, + pushSpeed=2, + task=function(P) + while true do + YIELD() + if P.control and P.atkBufferSum==0 then + local D=P.modeData + if D.wave<20 then + local t=1500-30*D.wave--1500~900 + table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(4,7)),amount=12,countdown=t,cd0=t,time=0,sent=false,lv=3}) + table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(3,8)),amount=10,countdown=t,cd0=t,time=0,sent=false,lv=4}) + else + local t=900-10*(D.wave-20)--900~600 + table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=14,countdown=t,cd0=t,time=0,sent=false,lv=4}) + table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(4,7)),amount=8,countdown=t,cd0=t,time=0,sent=false,lv=5}) + end + P.atkBufferSum=P.atkBufferSum+22 + P.stat.recv=P.stat.recv+22 + D.wave=D.wave+1 + if D.wave%10==0 then + if D.wave==20 then + P:showTextF(text.great,0,-140,100,'appear',.6) + P.gameEnv.pushSpeed=3 + elseif D.wave==50 then + P:showTextF(text.maxspeed,0,-140,100,'appear',.6) + end + end + end + end + end, + bg='rainbow2',bgm='shining terminal', + }, + mesDisp=function(P) + setFont(55) + mStr(P.modeData.wave,63,200) + mStr("22",63,320) + mText(drawableText.wave,63,260) + mText(drawableText.nextWave,63,380) + end, + score=function(P)return{P.modeData.wave,P.stat.time}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]=50 and 5 or + W>=40 and 4 or + W>=30 and 3 or + W>=20 and 2 or + W>=10 and 1 or + W>=5 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/attacker_u.lua b/parts/modes/attacker_u.lua index eddc0e1c..66a74d16 100644 --- a/parts/modes/attacker_u.lua +++ b/parts/modes/attacker_u.lua @@ -1,66 +1,66 @@ return{ - color=COLOR.lYellow, - env={ - drop=5,lock=60, - fall=8, - freshLimit=15, - task=function(P) - while true do - YIELD() - if P.control and P.atkBufferSum<4 then - local D=P.modeData - local s - local t=800-10*D.wave--800~700~600~500 - if D.wave<10 then - table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(5,6)),amount=9,countdown=t,cd0=t,time=0,sent=false,lv=3}) - table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(4,7)),amount=11,countdown=t,cd0=t+62,time=0,sent=false,lv=4}) - s=20 - elseif D.wave<20 then - table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(3,8)),amount=11,countdown=t,cd0=t,time=0,sent=false,lv=4}) - table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(4,7)),amount=13,countdown=t,cd0=t+62,time=0,sent=false,lv=5}) - s=24 - else - table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(2)*9-8),amount=14,countdown=t,cd0=t,time=0,sent=false,lv=5}) - table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(3,8)),amount=14,countdown=t+62,cd0=t,time=0,sent=false,lv=5}) - s=28 - end - P.atkBufferSum=P.atkBufferSum+s - P.stat.recv=P.stat.recv+s - D.wave=D.wave+1 - if D.wave%10==0 then - if D.wave==10 then - P:showTextF(text.great,0,-140,100,'appear',.6) - P.gameEnv.pushSpeed=4 - elseif D.wave==20 then - P:showTextF(text.awesome,0,-140,100,'appear',.6) - P.gameEnv.pushSpeed=5 - elseif D.wave==30 then - P:showTextF(text.maxspeed,0,-140,100,'appear',.6) - end - end - end - end - end, - bg='rainbow2',bgm='shining terminal', - }, - mesDisp=function(P) - setFont(55) - mStr(P.modeData.wave,63,200) - mStr(20+4*math.min(math.floor(P.modeData.wave/10),2),63,320) - mText(drawableText.wave,63,260) - mText(drawableText.nextWave,63,380) - end, - score=function(P)return{P.modeData.wave,P.stat.time}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]=50 and 5 or - W>=40 and 4 or - W>=30 and 3 or - W>=20 and 2 or - W>=10 and 1 or - W>=5 and 0 - end, + color=COLOR.lYellow, + env={ + drop=5,lock=60, + fall=8, + freshLimit=15, + task=function(P) + while true do + YIELD() + if P.control and P.atkBufferSum<4 then + local D=P.modeData + local s + local t=800-10*D.wave--800~700~600~500 + if D.wave<10 then + table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(5,6)),amount=9,countdown=t,cd0=t,time=0,sent=false,lv=3}) + table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(4,7)),amount=11,countdown=t,cd0=t+62,time=0,sent=false,lv=4}) + s=20 + elseif D.wave<20 then + table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(3,8)),amount=11,countdown=t,cd0=t,time=0,sent=false,lv=4}) + table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(4,7)),amount=13,countdown=t,cd0=t+62,time=0,sent=false,lv=5}) + s=24 + else + table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(2)*9-8),amount=14,countdown=t,cd0=t,time=0,sent=false,lv=5}) + table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(3,8)),amount=14,countdown=t+62,cd0=t,time=0,sent=false,lv=5}) + s=28 + end + P.atkBufferSum=P.atkBufferSum+s + P.stat.recv=P.stat.recv+s + D.wave=D.wave+1 + if D.wave%10==0 then + if D.wave==10 then + P:showTextF(text.great,0,-140,100,'appear',.6) + P.gameEnv.pushSpeed=4 + elseif D.wave==20 then + P:showTextF(text.awesome,0,-140,100,'appear',.6) + P.gameEnv.pushSpeed=5 + elseif D.wave==30 then + P:showTextF(text.maxspeed,0,-140,100,'appear',.6) + end + end + end + end + end, + bg='rainbow2',bgm='shining terminal', + }, + mesDisp=function(P) + setFont(55) + mStr(P.modeData.wave,63,200) + mStr(20+4*math.min(math.floor(P.modeData.wave/10),2),63,320) + mText(drawableText.wave,63,260) + mText(drawableText.nextWave,63,380) + end, + score=function(P)return{P.modeData.wave,P.stat.time}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]=50 and 5 or + W>=40 and 4 or + W>=30 and 3 or + W>=20 and 2 or + W>=10 and 1 or + W>=5 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/backfire_h.lua b/parts/modes/backfire_h.lua index 633d3100..0d6fcbd7 100644 --- a/parts/modes/backfire_h.lua +++ b/parts/modes/backfire_h.lua @@ -1,39 +1,39 @@ return{ - color=COLOR.magenta, - env={ - drop=10,lock=60, - freshLimit=15, - dropPiece=function(P) - if P.lastPiece.atk>0 then - P:receive(nil,P.lastPiece.atk,60,generateLine(P.holeRND:random(10))) - end - if P.stat.atk>=100 then - P:win('finish') - end - end, - bg='tunnel',bgm='echo', - }, - mesDisp=function(P) - setFont(60) - mStr(P.stat.atk,63,280) - mText(drawableText.atk,63,350) - 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, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=100 then - local T=P.stat.time - return - T<50 and 5 or - T<65 and 4 or - T<100 and 3 or - T<130 and 2 or - 1 - else - return - L>=50 and 0 - end - end, + color=COLOR.magenta, + env={ + drop=10,lock=60, + freshLimit=15, + dropPiece=function(P) + if P.lastPiece.atk>0 then + P:receive(nil,P.lastPiece.atk,60,generateLine(P.holeRND:random(10))) + end + if P.stat.atk>=100 then + P:win('finish') + end + end, + bg='tunnel',bgm='echo', + }, + mesDisp=function(P) + setFont(60) + mStr(P.stat.atk,63,280) + mText(drawableText.atk,63,350) + 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, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=100 then + local T=P.stat.time + return + T<50 and 5 or + T<65 and 4 or + T<100 and 3 or + T<130 and 2 or + 1 + else + return + L>=50 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/backfire_l.lua b/parts/modes/backfire_l.lua index 7bda39c2..ac68360c 100644 --- a/parts/modes/backfire_l.lua +++ b/parts/modes/backfire_l.lua @@ -1,39 +1,39 @@ return{ - color=COLOR.red, - env={ - drop=5,lock=45, - freshLimit=15, - dropPiece=function(P) - if P.lastPiece.atk>0 then - P:receive(nil,P.lastPiece.atk,30,generateLine(P.holeRND:random(10))) - end - if P.stat.atk>=100 then - P:win('finish') - end - end, - bg='blackhole',bgm='echo', - }, - mesDisp=function(P) - setFont(60) - mStr(P.stat.atk,63,280) - mText(drawableText.atk,63,350) - 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, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=100 then - local T=P.stat.time - return - T<55 and 5 or - T<70 and 4 or - T<110 and 3 or - T<150 and 2 or - 1 - else - return - L>=50 and 0 - end - end, + color=COLOR.red, + env={ + drop=5,lock=45, + freshLimit=15, + dropPiece=function(P) + if P.lastPiece.atk>0 then + P:receive(nil,P.lastPiece.atk,30,generateLine(P.holeRND:random(10))) + end + if P.stat.atk>=100 then + P:win('finish') + end + end, + bg='blackhole',bgm='echo', + }, + mesDisp=function(P) + setFont(60) + mStr(P.stat.atk,63,280) + mText(drawableText.atk,63,350) + 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, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=100 then + local T=P.stat.time + return + T<55 and 5 or + T<70 and 4 or + T<110 and 3 or + T<150 and 2 or + 1 + else + return + L>=50 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/backfire_n.lua b/parts/modes/backfire_n.lua index 6f6aaddc..ee8bcc95 100644 --- a/parts/modes/backfire_n.lua +++ b/parts/modes/backfire_n.lua @@ -1,38 +1,38 @@ return{ - color=COLOR.green, - env={ - drop=30,lock=60, - dropPiece=function(P) - if P.lastPiece.atk>0 then - P:receive(nil,P.lastPiece.atk,120,generateLine(P.holeRND:random(10))) - end - if P.stat.atk>=100 then - P:win('finish') - end - end, - bg='tunnel',bgm='echo', - }, - mesDisp=function(P) - setFont(60) - mStr(P.stat.atk,63,280) - mText(drawableText.atk,63,350) - 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, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=100 then - local T=P.stat.time - return - T<45 and 5 or - T<60 and 4 or - T<90 and 3 or - T<120 and 2 or - 1 - else - return - L>=50 and 0 - end - end, + color=COLOR.green, + env={ + drop=30,lock=60, + dropPiece=function(P) + if P.lastPiece.atk>0 then + P:receive(nil,P.lastPiece.atk,120,generateLine(P.holeRND:random(10))) + end + if P.stat.atk>=100 then + P:win('finish') + end + end, + bg='tunnel',bgm='echo', + }, + mesDisp=function(P) + setFont(60) + mStr(P.stat.atk,63,280) + mText(drawableText.atk,63,350) + 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, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=100 then + local T=P.stat.time + return + T<45 and 5 or + T<60 and 4 or + T<90 and 3 or + T<120 and 2 or + 1 + else + return + L>=50 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/backfire_u.lua b/parts/modes/backfire_u.lua index fd00889c..9f1f0b29 100644 --- a/parts/modes/backfire_u.lua +++ b/parts/modes/backfire_u.lua @@ -1,39 +1,39 @@ return{ - color=COLOR.lYellow, - env={ - drop=2,lock=30, - freshLimit=10, - dropPiece=function(P) - if P.lastPiece.atk>0 then - P:receive(nil,P.lastPiece.atk,0,generateLine(P.holeRND:random(10))) - end - if P.stat.atk>=100 then - P:win('finish') - end - end, - bg='blackhole',bgm='echo', - }, - mesDisp=function(P) - setFont(60) - mStr(P.stat.atk,63,280) - mText(drawableText.atk,63,350) - 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, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=100 then - local T=P.stat.time - return - T<60 and 5 or - T<80 and 4 or - T<120 and 3 or - T<180 and 2 or - 1 - else - return - L>=50 and 0 - end - end, + color=COLOR.lYellow, + env={ + drop=2,lock=30, + freshLimit=10, + dropPiece=function(P) + if P.lastPiece.atk>0 then + P:receive(nil,P.lastPiece.atk,0,generateLine(P.holeRND:random(10))) + end + if P.stat.atk>=100 then + P:win('finish') + end + end, + bg='blackhole',bgm='echo', + }, + mesDisp=function(P) + setFont(60) + mStr(P.stat.atk,63,280) + mText(drawableText.atk,63,350) + 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, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=100 then + local T=P.stat.time + return + T<60 and 5 or + T<80 and 4 or + T<120 and 3 or + T<180 and 2 or + 1 + else + return + L>=50 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/bigbang.lua b/parts/modes/bigbang.lua index 728bd915..90fe3003 100644 --- a/parts/modes/bigbang.lua +++ b/parts/modes/bigbang.lua @@ -1,19 +1,19 @@ return{ - color=COLOR.lGray, - env={ - drop=1e99,lock=1e99, - holdCount=0, - task=function(P) - while not P.control do YIELD()end - P:pressKey(6) - P:lose() - end, - bg='bg1',bgm='new era', - }, - score=function(P)return{P.modeData.event,P.stat.finesseRate*.2/P.stat.piece}end, - scoreDisp=function(D)return("%d Stage %.2f%%"):format(D[1],D[2])end, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]>b[2]end, - getRank=function() - return 1 - end, + color=COLOR.lGray, + env={ + drop=1e99,lock=1e99, + holdCount=0, + task=function(P) + while not P.control do YIELD()end + P:pressKey(6) + P:lose() + end, + bg='bg1',bgm='new era', + }, + score=function(P)return{P.modeData.event,P.stat.finesseRate*.2/P.stat.piece}end, + scoreDisp=function(D)return("%d Stage %.2f%%"):format(D[1],D[2])end, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]>b[2]end, + getRank=function() + return 1 + end, } \ No newline at end of file diff --git a/parts/modes/blind_e.lua b/parts/modes/blind_e.lua index 3a73486c..c05d6978 100644 --- a/parts/modes/blind_e.lua +++ b/parts/modes/blind_e.lua @@ -1,37 +1,37 @@ local min=math.min return{ - color=COLOR.cyan, - env={ - drop=30,lock=45, - visible='easy', - dropPiece=function(P)if P.stat.row>=200 then P:win('finish')end end, - freshLimit=10, - bg='glow',bgm='push', - }, - mesDisp=function(P) - mText(drawableText.line,63,300) - mText(drawableText.techrash,63,420) - setFont(75) - mStr(P.stat.row,63,220) - mStr(P.stat.clears[4],63,340) - end, - score=function(P)return{min(P.stat.row,200),P.stat.time}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]=200 then - local T=P.stat.time - return - T<=140 and 5 or - T<=200 and 4 or - 3 - else - return - L>=150 and 3 or - L>=100 and 2 or - L>=40 and 1 or - L>=1 and 0 - end - end, + color=COLOR.cyan, + env={ + drop=30,lock=45, + visible='easy', + dropPiece=function(P)if P.stat.row>=200 then P:win('finish')end end, + freshLimit=10, + bg='glow',bgm='push', + }, + mesDisp=function(P) + mText(drawableText.line,63,300) + mText(drawableText.techrash,63,420) + setFont(75) + mStr(P.stat.row,63,220) + mStr(P.stat.clears[4],63,340) + end, + score=function(P)return{min(P.stat.row,200),P.stat.time}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]=200 then + local T=P.stat.time + return + T<=140 and 5 or + T<=200 and 4 or + 3 + else + return + L>=150 and 3 or + L>=100 and 2 or + L>=40 and 1 or + L>=1 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/blind_h.lua b/parts/modes/blind_h.lua index 805f625d..ca8e829a 100644 --- a/parts/modes/blind_h.lua +++ b/parts/modes/blind_h.lua @@ -1,45 +1,45 @@ local gc=love.graphics local min=math.min return{ - color=COLOR.magenta, - env={ - drop=15,lock=45, - fall=10, - dropFX=0,lockFX=0, - visible='none', - score=false, - dropPiece=function(P)if P.stat.row>=200 then P:win('finish')end end, - freshLimit=15, - bg='rgb',bgm='push', - }, - mesDisp=function(P) - mText(drawableText.line,63,300) - mText(drawableText.techrash,63,420) - setFont(75) - mStr(P.stat.row,63,220) - mStr(P.stat.clears[4],63,340) - PLY.draw.applyField(P) - gc.setColor(1,1,1,.1) - gc.draw(IMG.electric,0,106,0,2.6) - PLY.draw.cancelField(P) - end, - score=function(P)return{min(P.stat.row,200),P.stat.time}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]=200 then - local T=P.stat.time - return - T<=180 and 5 or - T<=240 and 4 or - 3 - else - return - L>=150 and 3 or - L>=90 and 2 or - L>=40 and 1 or - L>=1 and 0 - end - end, + color=COLOR.magenta, + env={ + drop=15,lock=45, + fall=10, + dropFX=0,lockFX=0, + visible='none', + score=false, + dropPiece=function(P)if P.stat.row>=200 then P:win('finish')end end, + freshLimit=15, + bg='rgb',bgm='push', + }, + mesDisp=function(P) + mText(drawableText.line,63,300) + mText(drawableText.techrash,63,420) + setFont(75) + mStr(P.stat.row,63,220) + mStr(P.stat.clears[4],63,340) + PLY.draw.applyField(P) + gc.setColor(1,1,1,.1) + gc.draw(IMG.electric,0,106,0,2.6) + PLY.draw.cancelField(P) + end, + score=function(P)return{min(P.stat.row,200),P.stat.time}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]=200 then + local T=P.stat.time + return + T<=180 and 5 or + T<=240 and 4 or + 3 + else + return + L>=150 and 3 or + L>=90 and 2 or + L>=40 and 1 or + L>=1 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/blind_l.lua b/parts/modes/blind_l.lua index 973b3bce..eaddfc00 100644 --- a/parts/modes/blind_l.lua +++ b/parts/modes/blind_l.lua @@ -1,46 +1,46 @@ local gc=love.graphics local min=math.min return{ - color=COLOR.red, - env={ - drop=10,lock=60, - fall=5, - ghost=0, - dropFX=0,lockFX=0, - visible='none', - score=false, - dropPiece=function(P)if P.stat.row>=200 then P:win('finish')end end, - freshLimit=15, - bg='rgb',bgm='push', - }, - mesDisp=function(P) - mText(drawableText.line,63,300) - mText(drawableText.techrash,63,420) - setFont(75) - mStr(P.stat.row,63,220) - mStr(P.stat.clears[4],63,340) - PLY.draw.applyField(P) - gc.setColor(1,1,1,.1) - gc.draw(IMG.electric,0,106,0,2.6) - PLY.draw.cancelField(P) - end, - score=function(P)return{min(P.stat.row,200),P.stat.time}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]=200 then - local T=P.stat.time - return - T<=200 and 5 or - T<=250 and 4 or - 3 - else - return - L>=150 and 3 or - L>=100 and 2 or - L>=40 and 1 or - L>=1 and 0 - end - end, + color=COLOR.red, + env={ + drop=10,lock=60, + fall=5, + ghost=0, + dropFX=0,lockFX=0, + visible='none', + score=false, + dropPiece=function(P)if P.stat.row>=200 then P:win('finish')end end, + freshLimit=15, + bg='rgb',bgm='push', + }, + mesDisp=function(P) + mText(drawableText.line,63,300) + mText(drawableText.techrash,63,420) + setFont(75) + mStr(P.stat.row,63,220) + mStr(P.stat.clears[4],63,340) + PLY.draw.applyField(P) + gc.setColor(1,1,1,.1) + gc.draw(IMG.electric,0,106,0,2.6) + PLY.draw.cancelField(P) + end, + score=function(P)return{min(P.stat.row,200),P.stat.time}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]=200 then + local T=P.stat.time + return + T<=200 and 5 or + T<=250 and 4 or + 3 + else + return + L>=150 and 3 or + L>=100 and 2 or + L>=40 and 1 or + L>=1 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/blind_n.lua b/parts/modes/blind_n.lua index cfa19fb5..16ff1b7d 100644 --- a/parts/modes/blind_n.lua +++ b/parts/modes/blind_n.lua @@ -1,42 +1,42 @@ local gc=love.graphics local min=math.min return{ - color=COLOR.green, - env={ - drop=15,lock=45, - freshLimit=10, - visible='fast', - dropPiece=function(P)if P.stat.row>=200 then P:win('finish')end end, - bg='glow',bgm='push', - }, - mesDisp=function(P) - mText(drawableText.line,63,300) - mText(drawableText.techrash,63,420) - setFont(75) - mStr(P.stat.row,63,220) - mStr(P.stat.clears[4],63,340) - PLY.draw.applyField(P) - gc.setColor(1,1,1,.1) - gc.draw(IMG.electric,0,106,0,2.6) - PLY.draw.cancelField(P) - end, - score=function(P)return{min(P.stat.row,200),P.stat.time}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]=200 then - local T=P.stat.time - return - T<=180 and 5 or - T<=220 and 4 or - 3 - else - return - L>=126 and 3 or - L>=80 and 2 or - L>=40 and 1 or - L>=1 and 0 - end - end, + color=COLOR.green, + env={ + drop=15,lock=45, + freshLimit=10, + visible='fast', + dropPiece=function(P)if P.stat.row>=200 then P:win('finish')end end, + bg='glow',bgm='push', + }, + mesDisp=function(P) + mText(drawableText.line,63,300) + mText(drawableText.techrash,63,420) + setFont(75) + mStr(P.stat.row,63,220) + mStr(P.stat.clears[4],63,340) + PLY.draw.applyField(P) + gc.setColor(1,1,1,.1) + gc.draw(IMG.electric,0,106,0,2.6) + PLY.draw.cancelField(P) + end, + score=function(P)return{min(P.stat.row,200),P.stat.time}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]=200 then + local T=P.stat.time + return + T<=180 and 5 or + T<=220 and 4 or + 3 + else + return + L>=126 and 3 or + L>=80 and 2 or + L>=40 and 1 or + L>=1 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/blind_u.lua b/parts/modes/blind_u.lua index 4a7adcbf..5aebdb64 100644 --- a/parts/modes/blind_u.lua +++ b/parts/modes/blind_u.lua @@ -1,39 +1,39 @@ local gc=love.graphics local min=math.min return{ - color=COLOR.red, - env={ - drop=30,lock=60, - block=false,center=0,ghost=0, - dropFX=0,lockFX=0, - visible='none', - score=false, - dropPiece=function(P)if P.stat.row>=100 then P:win('finish')end end, - freshLimit=15, - bg='rgb',bgm='far', - }, - mesDisp=function(P) - mText(drawableText.line,63,300) - mText(drawableText.techrash,63,420) - setFont(75) - mStr(P.stat.row,63,220) - mStr(P.stat.clears[4],63,340) - PLY.draw.applyField(P) - gc.setColor(1,1,1,.1) - gc.draw(IMG.electric,0,106,0,2.6) - PLY.draw.cancelField(P) - end, - score=function(P)return{min(P.stat.row,100),P.stat.time}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]=100 and 5 or - L>=75 and 4 or - L>=50 and 3 or - L>=26 and 2 or - L>=10 and 1 or - L>=1 and 0 - end, + color=COLOR.red, + env={ + drop=30,lock=60, + block=false,center=0,ghost=0, + dropFX=0,lockFX=0, + visible='none', + score=false, + dropPiece=function(P)if P.stat.row>=100 then P:win('finish')end end, + freshLimit=15, + bg='rgb',bgm='far', + }, + mesDisp=function(P) + mText(drawableText.line,63,300) + mText(drawableText.techrash,63,420) + setFont(75) + mStr(P.stat.row,63,220) + mStr(P.stat.clears[4],63,340) + PLY.draw.applyField(P) + gc.setColor(1,1,1,.1) + gc.draw(IMG.electric,0,106,0,2.6) + PLY.draw.cancelField(P) + end, + score=function(P)return{min(P.stat.row,100),P.stat.time}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]=100 and 5 or + L>=75 and 4 or + L>=50 and 3 or + L>=26 and 2 or + L>=10 and 1 or + L>=1 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/blind_wtf.lua b/parts/modes/blind_wtf.lua index 858b0ef8..37eaa572 100644 --- a/parts/modes/blind_wtf.lua +++ b/parts/modes/blind_wtf.lua @@ -9,65 +9,65 @@ local boarder=GC.DO{334,620, local gc=love.graphics local sin,min=math.sin,math.min return{ - color=COLOR.red, - env={ - drop=30,lock=60, - nextCount=1, - block=false,center=0,ghost=0, - dropFX=0,lockFX=0, - visible='none', - dropPiece=function(P)if P.stat.row>=40 then P:win('finish')end end, - freshLimit=15, - bg='none',bgm='far', - }, - load=function() - PLY.newPlayer(1) - if SETTING.sfx_spawn==0 then - MES.new('warn',text.switchSpawnSFX) - end - end, - mesDisp=function(P,repMode) - if not GAME.result then - gc.push('transform') - if repMode then - gc.origin() - gc.setColor(.3,.3,.3,.7) - gc.rectangle('fill',0,0,SCR.w,SCR.h) - else - gc.clear(.2,.2,.2) - gc.translate(150,0) - gc.setColor(.5,.5,.5) - --Frame - gc.draw(boarder,-17,-12) - end - gc.pop() - end + color=COLOR.red, + env={ + drop=30,lock=60, + nextCount=1, + block=false,center=0,ghost=0, + dropFX=0,lockFX=0, + visible='none', + dropPiece=function(P)if P.stat.row>=40 then P:win('finish')end end, + freshLimit=15, + bg='none',bgm='far', + }, + load=function() + PLY.newPlayer(1) + if SETTING.sfx_spawn==0 then + MES.new('warn',text.switchSpawnSFX) + end + end, + mesDisp=function(P,repMode) + if not GAME.result then + gc.push('transform') + if repMode then + gc.origin() + gc.setColor(.3,.3,.3,.7) + gc.rectangle('fill',0,0,SCR.w,SCR.h) + else + gc.clear(.2,.2,.2) + gc.translate(150,0) + gc.setColor(.5,.5,.5) + --Frame + gc.draw(boarder,-17,-12) + end + gc.pop() + end - --Figures - local t=TIME() - gc.setColor(1,1,1,.5+.2*sin(t)) - gc.draw(IMG.hbm,-276,-86,0,1.5) - gc.draw(IMG.electric,476,152,0,2.6) + --Figures + local t=TIME() + gc.setColor(1,1,1,.5+.2*sin(t)) + gc.draw(IMG.hbm,-276,-86,0,1.5) + gc.draw(IMG.electric,476,152,0,2.6) - --Texts - gc.setColor(.8,.8,.8) - mText(drawableText.line,63,300) - mText(drawableText.techrash,63,420) - setFont(75) - mStr(P.stat.row,63,220) - mStr(P.stat.clears[4],63,340) - 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, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=40 and 5 or - L>=30 and 4 or - L>=20 and 3 or - L>=10 and 2 or - L>=5 and 1 or - L>=2 and 0 - end, + --Texts + gc.setColor(.8,.8,.8) + mText(drawableText.line,63,300) + mText(drawableText.techrash,63,420) + setFont(75) + mStr(P.stat.row,63,220) + mStr(P.stat.clears[4],63,340) + 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, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=40 and 5 or + L>=30 and 4 or + L>=20 and 3 or + L>=10 and 2 or + L>=5 and 1 or + L>=2 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/c4wtrain_l.lua b/parts/modes/c4wtrain_l.lua index 7381c557..75408b2d 100644 --- a/parts/modes/c4wtrain_l.lua +++ b/parts/modes/c4wtrain_l.lua @@ -1,81 +1,81 @@ local rem=table.remove local function check_c4w(P) - if P.lastPiece.row==0 then - P:lose() - else - for _=1,P.lastPiece.row do - local h=#P.field - P.field[h+1]=FREEROW.get(20) - P.visTime[h+1]=FREEROW.get(20) - for i=4,7 do P.field[h+1][i]=0 end - end - if P.combo>P.modeData.maxCombo then - P.modeData.maxCombo=P.combo - end - if P.stat.row>=100 then - P:win('finish') - end - end + if P.lastPiece.row==0 then + P:lose() + else + for _=1,P.lastPiece.row do + local h=#P.field + P.field[h+1]=FREEROW.get(20) + P.visTime[h+1]=FREEROW.get(20) + for i=4,7 do P.field[h+1][i]=0 end + end + if P.combo>P.modeData.maxCombo then + P.modeData.maxCombo=P.combo + end + if P.stat.row>=100 then + P:win('finish') + end + end end return{ - color=COLOR.red, - env={ - drop=5,lock=30, - task=function(P)P.modeData.maxCombo=0 end, - dropPiece=check_c4w, - freshLimit=15,ospin=false, - bg='rgb',bgm='oxygen', - }, - load=function() - PLY.newPlayer(1) - local P=PLAYERS[1] - local F=P.field - for i=1,24 do - F[i]=FREEROW.get(20) - P.visTime[i]=FREEROW.get(20) - for x=4,7 do F[i][x]=0 end - end - if P.holeRND:random()<.6 then - local initCell={11,14,12,13,21,24} - for _=1,3 do - _=rem(initCell,P.holeRND:random(#initCell)) - F[math.floor(_/10)][3+_%10]=20 - end - else - local initCell={11,12,13,14,21,22,23,24} - rem(initCell,P.holeRND:random(5,8)) - rem(initCell,P.holeRND:random(1,4)) - for _=1,6 do - _=rem(initCell,P.holeRND:random(#initCell)) - F[math.floor(_/10)][3+_%10]=20 - end - end - end, - mesDisp=function(P) - setFont(45) - mStr(P.combo,63,310) - mStr(P.modeData.maxCombo,63,400) - mText(drawableText.combo,63,358) - mText(drawableText.maxcmb,63,450) - 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, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=70 and 3 or - L>=40 and 2 or - L>=20 and 1 or - L>=5 and 0 - end - end, + color=COLOR.red, + env={ + drop=5,lock=30, + task=function(P)P.modeData.maxCombo=0 end, + dropPiece=check_c4w, + freshLimit=15,ospin=false, + bg='rgb',bgm='oxygen', + }, + load=function() + PLY.newPlayer(1) + local P=PLAYERS[1] + local F=P.field + for i=1,24 do + F[i]=FREEROW.get(20) + P.visTime[i]=FREEROW.get(20) + for x=4,7 do F[i][x]=0 end + end + if P.holeRND:random()<.6 then + local initCell={11,14,12,13,21,24} + for _=1,3 do + _=rem(initCell,P.holeRND:random(#initCell)) + F[math.floor(_/10)][3+_%10]=20 + end + else + local initCell={11,12,13,14,21,22,23,24} + rem(initCell,P.holeRND:random(5,8)) + rem(initCell,P.holeRND:random(1,4)) + for _=1,6 do + _=rem(initCell,P.holeRND:random(#initCell)) + F[math.floor(_/10)][3+_%10]=20 + end + end + end, + mesDisp=function(P) + setFont(45) + mStr(P.combo,63,310) + mStr(P.modeData.maxCombo,63,400) + mText(drawableText.combo,63,358) + mText(drawableText.maxcmb,63,450) + 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, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=70 and 3 or + L>=40 and 2 or + L>=20 and 1 or + L>=5 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/c4wtrain_n.lua b/parts/modes/c4wtrain_n.lua index fc814f03..5e15f0bb 100644 --- a/parts/modes/c4wtrain_n.lua +++ b/parts/modes/c4wtrain_n.lua @@ -1,79 +1,79 @@ local rem=table.remove local function check_c4w(P) - if P.lastPiece.row>0 then - for _=1,#P.clearedRow do - local h=#P.field - P.field[h+1]=FREEROW.get(20) - P.visTime[h+1]=FREEROW.get(20) - for i=4,7 do P.field[h+1][i]=0 end - end - if P.combo>P.modeData.maxCombo then - P.modeData.maxCombo=P.combo - end - if P.stat.row>=100 then - P:win('finish') - end - end + if P.lastPiece.row>0 then + for _=1,#P.clearedRow do + local h=#P.field + P.field[h+1]=FREEROW.get(20) + P.visTime[h+1]=FREEROW.get(20) + for i=4,7 do P.field[h+1][i]=0 end + end + if P.combo>P.modeData.maxCombo then + P.modeData.maxCombo=P.combo + end + if P.stat.row>=100 then + P:win('finish') + end + end end return{ - color=COLOR.green, - env={ - drop=30,lock=60,infHold=true, - task=function(P)P.modeData.maxCombo=0 end, - dropPiece=check_c4w, - freshLimit=15,ospin=false, - bg='rgb',bgm='oxygen', - }, - load=function() - PLY.newPlayer(1) - local P=PLAYERS[1] - local F=P.field - for i=1,24 do - F[i]=FREEROW.get(20) - P.visTime[i]=FREEROW.get(20) - for x=4,7 do F[i][x]=0 end - end - if P.holeRND:random()<.6 then - local initCell={11,14,12,13,21,24} - for _=1,3 do - _=rem(initCell,P.holeRND:random(#initCell)) - F[math.floor(_/10)][3+_%10]=20 - end - else - local initCell={11,12,13,14,21,22,23,24} - rem(initCell,P.holeRND:random(5,8)) - rem(initCell,P.holeRND:random(1,4)) - for _=1,6 do - _=rem(initCell,P.holeRND:random(#initCell)) - F[math.floor(_/10)][3+_%10]=20 - end - end - end, - mesDisp=function(P) - setFont(45) - mStr(P.combo,63,310) - mStr(P.modeData.maxCombo,63,400) - mText(drawableText.combo,63,358) - mText(drawableText.maxcmb,63,450) - 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, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=60 and 2 or - L>=30 and 1 or - L>=10 and 0 - end - end, + color=COLOR.green, + env={ + drop=30,lock=60,infHold=true, + task=function(P)P.modeData.maxCombo=0 end, + dropPiece=check_c4w, + freshLimit=15,ospin=false, + bg='rgb',bgm='oxygen', + }, + load=function() + PLY.newPlayer(1) + local P=PLAYERS[1] + local F=P.field + for i=1,24 do + F[i]=FREEROW.get(20) + P.visTime[i]=FREEROW.get(20) + for x=4,7 do F[i][x]=0 end + end + if P.holeRND:random()<.6 then + local initCell={11,14,12,13,21,24} + for _=1,3 do + _=rem(initCell,P.holeRND:random(#initCell)) + F[math.floor(_/10)][3+_%10]=20 + end + else + local initCell={11,12,13,14,21,22,23,24} + rem(initCell,P.holeRND:random(5,8)) + rem(initCell,P.holeRND:random(1,4)) + for _=1,6 do + _=rem(initCell,P.holeRND:random(#initCell)) + F[math.floor(_/10)][3+_%10]=20 + end + end + end, + mesDisp=function(P) + setFont(45) + mStr(P.combo,63,310) + mStr(P.modeData.maxCombo,63,400) + mText(drawableText.combo,63,358) + mText(drawableText.maxcmb,63,450) + 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, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=60 and 2 or + L>=30 and 1 or + L>=10 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/classic_fast.lua b/parts/modes/classic_fast.lua index caa780eb..b41728cf 100644 --- a/parts/modes/classic_fast.lua +++ b/parts/modes/classic_fast.lua @@ -1,55 +1,55 @@ return{ - color=COLOR.lBlue, - env={ - das=16,arr=6,sddas=2,sdarr=2, - irs=false,ims=false, - center=0,ghost=0, - smooth=false, - drop=3,lock=3,wait=10,fall=25, - fieldH=19, - nextCount=1,holdCount=false, - RS='Classic', - sequence='rnd', - freshLimit=0, - face={0,0,2,2,2,0,0}, - noTele=true,keyCancel={5,6}, - task=function(P)P.modeData.target=10 end, - dropPiece=function(P) - local D=P.modeData - if P.stat.row>=D.target then - D.target=D.target+10 - if D.target==110 then - P.gameEnv.drop,P.gameEnv.lock=2,2 - SFX.play('blip_1') - elseif D.target==200 then - P.gameEnv.drop,P.gameEnv.lock=1,1 - SFX.play('blip_1') - else - SFX.play('reach') - end - end - end, - bg='rgb',bgm='magicblock', - }, - slowMark=true, - mesDisp=function(P) - setFont(75) - local r=P.modeData.target*.1 - mStr(r<11 and 18 or r<22 and r+8 or("%02x"):format(r*10-220),63,210) - mText(drawableText.speedLV,63,290) - PLY.draw.drawProgress(P.stat.row,P.modeData.target) - end, - score=function(P)return{P.stat.score,P.stat.row}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]=200 and 5 or - L>=191 and 4 or - L>=110 and 3 or - L>=50 and 2 or - L>=5 and 1 or - L>=1 and 0 - end, + color=COLOR.lBlue, + env={ + das=16,arr=6,sddas=2,sdarr=2, + irs=false,ims=false, + center=0,ghost=0, + smooth=false, + drop=3,lock=3,wait=10,fall=25, + fieldH=19, + nextCount=1,holdCount=false, + RS='Classic', + sequence='rnd', + freshLimit=0, + face={0,0,2,2,2,0,0}, + noTele=true,keyCancel={5,6}, + task=function(P)P.modeData.target=10 end, + dropPiece=function(P) + local D=P.modeData + if P.stat.row>=D.target then + D.target=D.target+10 + if D.target==110 then + P.gameEnv.drop,P.gameEnv.lock=2,2 + SFX.play('blip_1') + elseif D.target==200 then + P.gameEnv.drop,P.gameEnv.lock=1,1 + SFX.play('blip_1') + else + SFX.play('reach') + end + end + end, + bg='rgb',bgm='magicblock', + }, + slowMark=true, + mesDisp=function(P) + setFont(75) + local r=P.modeData.target*.1 + mStr(r<11 and 18 or r<22 and r+8 or("%02x"):format(r*10-220),63,210) + mText(drawableText.speedLV,63,290) + PLY.draw.drawProgress(P.stat.row,P.modeData.target) + end, + score=function(P)return{P.stat.score,P.stat.row}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]=200 and 5 or + L>=191 and 4 or + L>=110 and 3 or + L>=50 and 2 or + L>=5 and 1 or + L>=1 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/custom_clear.lua b/parts/modes/custom_clear.lua index d1e0deef..df71b78f 100644 --- a/parts/modes/custom_clear.lua +++ b/parts/modes/custom_clear.lua @@ -1,80 +1,80 @@ local function notAir(L) - for i=1,10 do - if L[i]>0 then return true end - end + for i=1,10 do + if L[i]>0 then return true end + end end local function setField(P,page) - local F=FIELD[page] - local height=0 - for y=20,1,-1 do - if notAir(F[y])then - height=y - break - end - end - local t=P.showTime*3 - for y=1,height do - local solid=notAir(F[y]) - P.field[y]=FREEROW.get(0,solid) - P.visTime[y]=FREEROW.get(t) - if solid then - for x=1,10 do - P.field[y][x]=F[y][x] - end - P.garbageBeneath=P.garbageBeneath+1 - end - end + local F=FIELD[page] + local height=0 + for y=20,1,-1 do + if notAir(F[y])then + height=y + break + end + end + local t=P.showTime*3 + for y=1,height do + local solid=notAir(F[y]) + P.field[y]=FREEROW.get(0,solid) + P.visTime[y]=FREEROW.get(t) + if solid then + for x=1,10 do + P.field[y][x]=F[y][x] + end + P.garbageBeneath=P.garbageBeneath+1 + end + end end local function checkClear(P) - if P.garbageBeneath==0 then - local D=P.modeData - D.finished=D.finished+1 - if FIELD[D.finished+1]then - P.waiting=26 - for i=#P.field,1,-1 do - FREEROW.discard(P.field[i]) - FREEROW.discard(P.visTime[i]) - P.field[i],P.visTime[i]=nil - end - setField(P,D.finished+1) - SYSFX.newShade(1.4,P.absFieldX,P.absFieldY,300*P.size,610*P.size,.6,.8,.6) - SFX.play('blip_1') - else - P:win('finish') - end - end + if P.garbageBeneath==0 then + local D=P.modeData + D.finished=D.finished+1 + if FIELD[D.finished+1]then + P.waiting=26 + for i=#P.field,1,-1 do + FREEROW.discard(P.field[i]) + FREEROW.discard(P.visTime[i]) + P.field[i],P.visTime[i]=nil + end + setField(P,D.finished+1) + SYSFX.newShade(1.4,P.absFieldX,P.absFieldY,300*P.size,610*P.size,.6,.8,.6) + SFX.play('blip_1') + else + P:win('finish') + end + end end return{ - color=COLOR.white, - env={}, - load=function() - applyCustomGame() + color=COLOR.white, + env={}, + load=function() + applyCustomGame() - for y=1,20 do - if notAir(FIELD[1][y])then - --Switch clear sprint mode on - GAME.modeEnv.dropPiece=checkClear - goto BREAK_clearMode - end - end - GAME.modeEnv.dropPiece=NULL - ::BREAK_clearMode:: - PLY.newPlayer(1) - local AItype=GAME.modeEnv.opponent:sub(1,2) - local AIlevel=tonumber(GAME.modeEnv.opponent:sub(-1)) - if AItype=='9S'then - PLY.newAIPlayer(2,BOT.template{type='9S',speedLV=2*AIlevel,hold=true}) - elseif AItype=='CC'then - PLY.newAIPlayer(2,BOT.template{type='CC',speedLV=2*AIlevel-1,next=math.floor(AIlevel*.5+1),hold=true,node=20000+5000*AIlevel}) - end + for y=1,20 do + if notAir(FIELD[1][y])then + --Switch clear sprint mode on + GAME.modeEnv.dropPiece=checkClear + goto BREAK_clearMode + end + end + GAME.modeEnv.dropPiece=NULL + ::BREAK_clearMode:: + PLY.newPlayer(1) + local AItype=GAME.modeEnv.opponent:sub(1,2) + local AIlevel=tonumber(GAME.modeEnv.opponent:sub(-1)) + if AItype=='9S'then + PLY.newAIPlayer(2,BOT.template{type='9S',speedLV=2*AIlevel,hold=true}) + elseif AItype=='CC'then + PLY.newAIPlayer(2,BOT.template{type='CC',speedLV=2*AIlevel-1,next=math.floor(AIlevel*.5+1),hold=true,node=20000+5000*AIlevel}) + end - for _,P in next,PLY_ALIVE do - setField(P,1) - end - end, - mesDisp=function(P) - setFont(55) - mStr(P.stat.row,63,225) - mText(drawableText.line,63,290) - end, + for _,P in next,PLY_ALIVE do + setField(P,1) + end + end, + mesDisp=function(P) + setFont(55) + mStr(P.stat.row,63,225) + mText(drawableText.line,63,290) + end, } \ No newline at end of file diff --git a/parts/modes/custom_puzzle.lua b/parts/modes/custom_puzzle.lua index 6d16da8a..36f340fd 100644 --- a/parts/modes/custom_puzzle.lua +++ b/parts/modes/custom_puzzle.lua @@ -1,70 +1,70 @@ local gc=love.graphics local gc_draw=gc.draw local function puzzleCheck(P) - local D=P.modeData - local F=FIELD[D.finished+1] - for y=1,20 do - local L=P.field[y] - for x=1,10 do - local a,b=F[y][x],L and L[x]or 0 - if a~=0 then - if a==-1 then if b>0 then return end - elseif a<12 then if a~=b then return end - elseif a>7 then if b==0 then return end - end - end - end - end - D.finished=D.finished+1 - if FIELD[D.finished+1]then - P.waiting=26 - for _=#P.field,1,-1 do - FREEROW.discard(P.field[_]) - FREEROW.discard(P.visTime[_]) - P.field[_],P.visTime[_]=nil - end - SYSFX.newShade(1.4,P.absFieldX,P.absFieldY,300*P.size,610*P.size,.3,1,.3) - SFX.play('reach') - D.showMark=0 - else - D.showMark=1 - P:win('finish') - end + local D=P.modeData + local F=FIELD[D.finished+1] + for y=1,20 do + local L=P.field[y] + for x=1,10 do + local a,b=F[y][x],L and L[x]or 0 + if a~=0 then + if a==-1 then if b>0 then return end + elseif a<12 then if a~=b then return end + elseif a>7 then if b==0 then return end + end + end + end + end + D.finished=D.finished+1 + if FIELD[D.finished+1]then + P.waiting=26 + for _=#P.field,1,-1 do + FREEROW.discard(P.field[_]) + FREEROW.discard(P.visTime[_]) + P.field[_],P.visTime[_]=nil + end + SYSFX.newShade(1.4,P.absFieldX,P.absFieldY,300*P.size,610*P.size,.3,1,.3) + SFX.play('reach') + D.showMark=0 + else + D.showMark=1 + P:win('finish') + end end return{ - color=COLOR.white, - env={ - fkey1=function(P)P.modeData.showMark=1-P.modeData.showMark end, - dropPiece=puzzleCheck, - }, - load=function() - applyCustomGame() - local AItype=GAME.modeEnv.opponent:sub(1,2) - local AIlevel=tonumber(GAME.modeEnv.opponent:sub(-1)) - PLY.newPlayer(1) - if AItype=='9S'then - PLY.newAIPlayer(2,BOT.template{type='9S',speedLV=2*AIlevel,hold=true}) - elseif AItype=='CC'then - PLY.newAIPlayer(2,BOT.template{type='CC',speedLV=2*AIlevel-1,next=math.floor(AIlevel*.5+1),hold=true,node=20000+5000*AIlevel}) - end - end, - mesDisp=function(P) - setFont(55) - mStr(P.stat.row,63,225) - mText(drawableText.line,63,290) - PLY.draw.applyField(P) - if P.modeData.showMark==0 then - local mark=TEXTURE.puzzleMark - local F=FIELD[P.modeData.finished+1] - gc.setColor(1,1,1) - for y=1,20 do for x=1,10 do - local T=F[y][x] - if T~=0 then - gc_draw(mark[T],30*x-30,600-30*y) - end - end end - end - PLY.draw.cancelField(P) - end, + color=COLOR.white, + env={ + fkey1=function(P)P.modeData.showMark=1-P.modeData.showMark end, + dropPiece=puzzleCheck, + }, + load=function() + applyCustomGame() + local AItype=GAME.modeEnv.opponent:sub(1,2) + local AIlevel=tonumber(GAME.modeEnv.opponent:sub(-1)) + PLY.newPlayer(1) + if AItype=='9S'then + PLY.newAIPlayer(2,BOT.template{type='9S',speedLV=2*AIlevel,hold=true}) + elseif AItype=='CC'then + PLY.newAIPlayer(2,BOT.template{type='CC',speedLV=2*AIlevel-1,next=math.floor(AIlevel*.5+1),hold=true,node=20000+5000*AIlevel}) + end + end, + mesDisp=function(P) + setFont(55) + mStr(P.stat.row,63,225) + mText(drawableText.line,63,290) + PLY.draw.applyField(P) + if P.modeData.showMark==0 then + local mark=TEXTURE.puzzleMark + local F=FIELD[P.modeData.finished+1] + gc.setColor(1,1,1) + for y=1,20 do for x=1,10 do + local T=F[y][x] + if T~=0 then + gc_draw(mark[T],30*x-30,600-30*y) + end + end end + end + PLY.draw.cancelField(P) + end, } \ No newline at end of file diff --git a/parts/modes/defender_l.lua b/parts/modes/defender_l.lua index 72873cbb..868773ed 100644 --- a/parts/modes/defender_l.lua +++ b/parts/modes/defender_l.lua @@ -1,65 +1,65 @@ return{ - color=COLOR.red, - env={ - drop=5,lock=60, - fall=6, - nextCount=3, - freshLimit=15, - pushSpeed=2, - task=function(P) - while true do - YIELD() - if P.control then - local D=P.modeData - D.counter=D.counter+1 - local t=math.max(240-2*D.wave,40) - if D.counter>=t then - D.counter=0 - for _=1,4 do - table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=1,countdown=5*t,cd0=5*t,time=0,sent=false,lv=2}) - end - P.atkBufferSum=P.atkBufferSum+4 - P.stat.recv=P.stat.recv+4 - D.wave=D.wave+1 - if D.wave<=75 then - D.rpm=math.floor(144e3/t)*.1 - if D.wave==25 then - P:showTextF(text.great,0,-140,100,'appear',.6) - P.gameEnv.pushSpeed=3 - P.dropDelay,P.gameEnv.drop=4,4 - elseif D.wave==50 then - P:showTextF(text.awesome,0,-140,100,'appear',.6) - P.gameEnv.pushSpeed=4 - P.dropDelay,P.gameEnv.drop=3,3 - elseif D.wave==75 then - P:showTextF(text.maxspeed,0,-140,100,'appear',.6) - P.dropDelay,P.gameEnv.drop=2,2 - end - end - end - end - end - end, - bg='rainbow2',bgm='storm', - }, - mesDisp=function(P) - setFont(55) - mStr(P.modeData.wave,63,200) - mStr(P.modeData.rpm,63,320) - mText(drawableText.wave,63,260) - mText(drawableText.rpm,63,380) - end, - score=function(P)return{P.modeData.wave,P.stat.time}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]=100 and 5 or - W>=80 and 4 or - W>=55 and 3 or - W>=30 and 2 or - W>=20 and 1 or - W>=5 and 0 - end, + color=COLOR.red, + env={ + drop=5,lock=60, + fall=6, + nextCount=3, + freshLimit=15, + pushSpeed=2, + task=function(P) + while true do + YIELD() + if P.control then + local D=P.modeData + D.counter=D.counter+1 + local t=math.max(240-2*D.wave,40) + if D.counter>=t then + D.counter=0 + for _=1,4 do + table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=1,countdown=5*t,cd0=5*t,time=0,sent=false,lv=2}) + end + P.atkBufferSum=P.atkBufferSum+4 + P.stat.recv=P.stat.recv+4 + D.wave=D.wave+1 + if D.wave<=75 then + D.rpm=math.floor(144e3/t)*.1 + if D.wave==25 then + P:showTextF(text.great,0,-140,100,'appear',.6) + P.gameEnv.pushSpeed=3 + P.dropDelay,P.gameEnv.drop=4,4 + elseif D.wave==50 then + P:showTextF(text.awesome,0,-140,100,'appear',.6) + P.gameEnv.pushSpeed=4 + P.dropDelay,P.gameEnv.drop=3,3 + elseif D.wave==75 then + P:showTextF(text.maxspeed,0,-140,100,'appear',.6) + P.dropDelay,P.gameEnv.drop=2,2 + end + end + end + end + end + end, + bg='rainbow2',bgm='storm', + }, + mesDisp=function(P) + setFont(55) + mStr(P.modeData.wave,63,200) + mStr(P.modeData.rpm,63,320) + mText(drawableText.wave,63,260) + mText(drawableText.rpm,63,380) + end, + score=function(P)return{P.modeData.wave,P.stat.time}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]=100 and 5 or + W>=80 and 4 or + W>=55 and 3 or + W>=30 and 2 or + W>=20 and 1 or + W>=5 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/defender_n.lua b/parts/modes/defender_n.lua index 1537075d..022e25bc 100644 --- a/parts/modes/defender_n.lua +++ b/parts/modes/defender_n.lua @@ -1,65 +1,65 @@ return{ - color=COLOR.green, - env={ - drop=30,lock=60, - fall=10, - nextCount=3, - freshLimit=15, - pushSpeed=1, - task=function(P) - while true do - YIELD() - if P.control then - local D=P.modeData - D.counter=D.counter+1 - local t=math.max(360-D.wave*2,60) - if D.counter>=t then - D.counter=0 - for _=1,3 do - table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=1,countdown=2*t,cd0=2*t,time=0,sent=false,lv=1}) - end - P.atkBufferSum=P.atkBufferSum+3 - P.stat.recv=P.stat.recv+3 - D.wave=D.wave+1 - if D.wave<=90 then - D.rpm=math.floor(108e3/t)*.1 - if D.wave==25 then - P:showTextF(text.great,0,-140,100,'appear',.6) - P.gameEnv.pushSpeed=2 - P.dropDelay,P.gameEnv.drop=20,20 - elseif D.wave==50 then - P:showTextF(text.awesome,0,-140,100,'appear',.6) - P.gameEnv.pushSpeed=3 - P.dropDelay,P.gameEnv.drop=10,10 - elseif D.wave==90 then - P.dropDelay,P.gameEnv.drop=5,5 - P:showTextF(text.maxspeed,0,-140,100,'appear',.6) - end - end - end - end - end - end, - bg='rainbow2',bgm='storm', - }, - mesDisp=function(P) - setFont(55) - mStr(P.modeData.wave,63,200) - mStr(P.modeData.rpm,63,320) - mText(drawableText.wave,63,260) - mText(drawableText.rpm,63,380) - end, - score=function(P)return{P.modeData.wave,P.stat.time}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]=120 and 5 or - W>=100 and 4 or - W>=70 and 3 or - W>=40 and 2 or - W>=10 and 1 or - W>=3 and 0 - end, + color=COLOR.green, + env={ + drop=30,lock=60, + fall=10, + nextCount=3, + freshLimit=15, + pushSpeed=1, + task=function(P) + while true do + YIELD() + if P.control then + local D=P.modeData + D.counter=D.counter+1 + local t=math.max(360-D.wave*2,60) + if D.counter>=t then + D.counter=0 + for _=1,3 do + table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=1,countdown=2*t,cd0=2*t,time=0,sent=false,lv=1}) + end + P.atkBufferSum=P.atkBufferSum+3 + P.stat.recv=P.stat.recv+3 + D.wave=D.wave+1 + if D.wave<=90 then + D.rpm=math.floor(108e3/t)*.1 + if D.wave==25 then + P:showTextF(text.great,0,-140,100,'appear',.6) + P.gameEnv.pushSpeed=2 + P.dropDelay,P.gameEnv.drop=20,20 + elseif D.wave==50 then + P:showTextF(text.awesome,0,-140,100,'appear',.6) + P.gameEnv.pushSpeed=3 + P.dropDelay,P.gameEnv.drop=10,10 + elseif D.wave==90 then + P.dropDelay,P.gameEnv.drop=5,5 + P:showTextF(text.maxspeed,0,-140,100,'appear',.6) + end + end + end + end + end + end, + bg='rainbow2',bgm='storm', + }, + mesDisp=function(P) + setFont(55) + mStr(P.modeData.wave,63,200) + mStr(P.modeData.rpm,63,320) + mText(drawableText.wave,63,260) + mText(drawableText.rpm,63,380) + end, + score=function(P)return{P.modeData.wave,P.stat.time}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]=120 and 5 or + W>=100 and 4 or + W>=70 and 3 or + W>=40 and 2 or + W>=10 and 1 or + W>=3 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/dig_100l.lua b/parts/modes/dig_100l.lua index 3947c1ac..d0ce2ee4 100644 --- a/parts/modes/dig_100l.lua +++ b/parts/modes/dig_100l.lua @@ -1,43 +1,43 @@ local function check_rise(P) - for _=1,math.min(8,100-P.stat.dig)-P.garbageBeneath do - P:garbageRise(21,1,P:getHolePos()) - end - if P.stat.dig==100 then - P:win('finish') - end + for _=1,math.min(8,100-P.stat.dig)-P.garbageBeneath do + P:garbageRise(21,1,P:getHolePos()) + end + if P.stat.dig==100 then + P:win('finish') + end end return{ - color=COLOR.green, - env={ - pushSpeed=6, - dropPiece=check_rise, - bg='bg2',bgm='way', - }, - load=function() - PLY.newPlayer(1) - local P=PLAYERS[1] - for _=1,10 do - P:garbageRise(21,1,P:getHolePos()) - end - P.fieldBeneath=0 - end, - mesDisp=function(P) - setFont(55) - mStr(100-P.stat.dig,63,265) - end, - score=function(P)return{P.stat.time,P.stat.piece}end, - scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, - comp=function(a,b)return a[1]=math.max(90,180-D.wave)then - P:garbageRise(21,1,P:getHolePos()) - P.stat.recv=P.stat.recv+1 - D.timer=0 - D.wave=D.wave+1 - end - end - end - end, - bg='bg2',bgm='shift', - }, - mesDisp=function(P) - setFont(60) - mStr(P.modeData.wave,63,310) - mText(drawableText.wave,63,375) - end, - score=function(P)return{P.modeData.wave,P.stat.row}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]=150 and 5 or - W>=110 and 4 or - W>=80 and 3 or - W>=50 and 2 or - W>=20 and 1 or - P.stat.row>=5 and 0 - end, + color=COLOR.magenta, + env={ + drop=60,lock=120, + fall=20, + freshLimit=15, + task=function(P) + while true do + YIELD() + if P.control then + local D=P.modeData + D.timer=D.timer+1 + if D.timer>=math.max(90,180-D.wave)then + P:garbageRise(21,1,P:getHolePos()) + P.stat.recv=P.stat.recv+1 + D.timer=0 + D.wave=D.wave+1 + end + end + end + end, + bg='bg2',bgm='shift', + }, + mesDisp=function(P) + setFont(60) + mStr(P.modeData.wave,63,310) + mText(drawableText.wave,63,375) + end, + score=function(P)return{P.modeData.wave,P.stat.row}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]=150 and 5 or + W>=110 and 4 or + W>=80 and 3 or + W>=50 and 2 or + W>=20 and 1 or + P.stat.row>=5 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/dig_u.lua b/parts/modes/dig_u.lua index 255da6c0..d20a36ee 100644 --- a/parts/modes/dig_u.lua +++ b/parts/modes/dig_u.lua @@ -1,41 +1,41 @@ return{ - color=COLOR.lYellow, - env={ - drop=10,lock=30, - freshLimit=15, - task=function(P) - while true do - YIELD() - if P.control then - local D=P.modeData - D.timer=D.timer+1 - if D.timer>=math.max(30,80-.3*D.wave)then - P:garbageRise(20+D.wave%5,1,P:getHolePos()) - P.stat.recv=P.stat.recv+1 - D.timer=0 - D.wave=D.wave+1 - end - end - end - end, - bg='bg2',bgm='shift', - }, - mesDisp=function(P) - setFont(60) - mStr(P.modeData.wave,63,310) - mText(drawableText.wave,63,375) - end, - score=function(P)return{P.modeData.wave,P.stat.row}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]=150 and 5 or - W>=110 and 4 or - W>=80 and 3 or - W>=50 and 2 or - W>=20 and 1 or - P.stat.row>=5 and 0 - end, + color=COLOR.lYellow, + env={ + drop=10,lock=30, + freshLimit=15, + task=function(P) + while true do + YIELD() + if P.control then + local D=P.modeData + D.timer=D.timer+1 + if D.timer>=math.max(30,80-.3*D.wave)then + P:garbageRise(20+D.wave%5,1,P:getHolePos()) + P.stat.recv=P.stat.recv+1 + D.timer=0 + D.wave=D.wave+1 + end + end + end + end, + bg='bg2',bgm='shift', + }, + mesDisp=function(P) + setFont(60) + mStr(P.modeData.wave,63,310) + mText(drawableText.wave,63,375) + end, + score=function(P)return{P.modeData.wave,P.stat.row}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]=150 and 5 or + W>=110 and 4 or + W>=80 and 3 or + W>=50 and 2 or + W>=20 and 1 or + P.stat.row>=5 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/drought_l.lua b/parts/modes/drought_l.lua index 7f5d4790..1a816faa 100644 --- a/parts/modes/drought_l.lua +++ b/parts/modes/drought_l.lua @@ -1,110 +1,110 @@ local ins=table.insert return{ - color=COLOR.red, - env={ - drop=20,lock=60, - sequence=function(P) - for _=1,3 do P:getNext(7)end - while true do - YIELD() - if not P.nextQueue[1]then - local height=FREEROW.get(0) - local max=#P.field - if max>0 then - --Get heights - for x=1,10 do - local h=max - while P.field[h][x]==0 and h>1 do - h=h-1 - end - height[x]=h - end - else - for x=1,10 do - height[x]=0 - end - end - height[11]=999 + color=COLOR.red, + env={ + drop=20,lock=60, + sequence=function(P) + for _=1,3 do P:getNext(7)end + while true do + YIELD() + if not P.nextQueue[1]then + local height=FREEROW.get(0) + local max=#P.field + if max>0 then + --Get heights + for x=1,10 do + local h=max + while P.field[h][x]==0 and h>1 do + h=h-1 + end + height[x]=h + end + else + for x=1,10 do + height[x]=0 + end + end + height[11]=999 - local wei={1,1,2,2,3,4} - local d=0 - for i=1,10 do - d=d+height[i] - end - if d<40 or P.stat.row>2*42 then--Low field or almost win, give SZO - for _=1,4 do - ins(wei,1) - ins(wei,2) - ins(wei,6) - end - else - --Give I when no hole - local tempDeltaHei=-999--Height difference - for x=2,11 do - local deltaHei=height[x]-height[x-1] - if tempDeltaHei<-2 and deltaHei>2 then - break - elseif x==11 then - for _=1,3 do ins(wei,7)end - else - tempDeltaHei=deltaHei - end - end + local wei={1,1,2,2,3,4} + local d=0 + for i=1,10 do + d=d+height[i] + end + if d<40 or P.stat.row>2*42 then--Low field or almost win, give SZO + for _=1,4 do + ins(wei,1) + ins(wei,2) + ins(wei,6) + end + else + --Give I when no hole + local tempDeltaHei=-999--Height difference + for x=2,11 do + local deltaHei=height[x]-height[x-1] + if tempDeltaHei<-2 and deltaHei>2 then + break + elseif x==11 then + for _=1,3 do ins(wei,7)end + else + tempDeltaHei=deltaHei + end + end - --Give O when no d=0/give T when no d=1 - local flatCount=0--d=0 count - local stairCount=0--d=1 count - for x=2,10 do - local _=height[x]-height[x-1] - if _==0 then - flatCount=flatCount+1 - elseif _==1 or _==-1 then - stairCount=stairCount+1 - end - end - if flatCount<3 then - for _=1,3 do ins(wei,6)end - end - if stairCount<3 then - for _=1,4 do ins(wei,5)end - end - end + --Give O when no d=0/give T when no d=1 + local flatCount=0--d=0 count + local stairCount=0--d=1 count + for x=2,10 do + local _=height[x]-height[x-1] + if _==0 then + flatCount=flatCount+1 + elseif _==1 or _==-1 then + stairCount=stairCount+1 + end + end + if flatCount<3 then + for _=1,3 do ins(wei,6)end + end + if stairCount<3 then + for _=1,4 do ins(wei,5)end + end + end - FREEROW.discard(height) - P:getNext(wei[P.seqRND:random(#wei)]) - end - end - end, - dropPiece=function(P)if P.stat.row>=100 then P:win('finish')end end, - nextCount=1,holdCount=0, - ospin=false, - freshLimit=15, - bg='blockfall',bgm='reason', - }, - mesDisp=function(P) - setFont(55) - local r=100-P.stat.row - if r<0 then r=0 end - mStr(r,63,265) - PLY.draw.drawTargetLine(P,r) - 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, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=100 then - local T=P.stat.time - return - T<=110 and 5 or - T<=126 and 4 or - T<=160 and 3 or - T<=240 and 2 or - 1 - else - return - L>=50 and 1 or - L>=10 and 0 - end - end, + FREEROW.discard(height) + P:getNext(wei[P.seqRND:random(#wei)]) + end + end + end, + dropPiece=function(P)if P.stat.row>=100 then P:win('finish')end end, + nextCount=1,holdCount=0, + ospin=false, + freshLimit=15, + bg='blockfall',bgm='reason', + }, + mesDisp=function(P) + setFont(55) + local r=100-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) + 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, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=100 then + local T=P.stat.time + return + T<=110 and 5 or + T<=126 and 4 or + T<=160 and 3 or + T<=240 and 2 or + 1 + else + return + L>=50 and 1 or + L>=10 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/drought_n.lua b/parts/modes/drought_n.lua index 242d5c7c..597f97ca 100644 --- a/parts/modes/drought_n.lua +++ b/parts/modes/drought_n.lua @@ -1,40 +1,40 @@ local min=math.min return{ - color=COLOR.green, - env={ - drop=20,lock=60, - sequence='bag', - seqData={1,1,2,2,3,3,4,4,5,5,6,6}, - dropPiece=function(P)if P.stat.row>=100 then P:win('finish')end end, - nextCount=3, - ospin=false, - freshLimit=15, - bg='blockfall',bgm='reason', - }, - mesDisp=function(P) - setFont(55) - local r=100-P.stat.row - if r<0 then r=0 end - mStr(r,63,265) - PLY.draw.drawTargetLine(P,r) - end, - score=function(P)return{min(P.stat.row,100),P.stat.time}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]=100 then - local T=P.stat.time - return - T<=80 and 5 or - T<=100 and 4 or - T<=150 and 3 or - T<=210 and 2 or - 1 - else - return - L>=50 and 1 or - L>=10 and 0 - end - end, + color=COLOR.green, + env={ + drop=20,lock=60, + sequence='bag', + seqData={1,1,2,2,3,3,4,4,5,5,6,6}, + dropPiece=function(P)if P.stat.row>=100 then P:win('finish')end end, + nextCount=3, + ospin=false, + freshLimit=15, + bg='blockfall',bgm='reason', + }, + mesDisp=function(P) + setFont(55) + local r=100-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) + end, + score=function(P)return{min(P.stat.row,100),P.stat.time}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]=100 then + local T=P.stat.time + return + T<=80 and 5 or + T<=100 and 4 or + T<=150 and 3 or + T<=210 and 2 or + 1 + else + return + L>=50 and 1 or + L>=10 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/infinite.lua b/parts/modes/infinite.lua index 2fecb62d..9b899c4d 100644 --- a/parts/modes/infinite.lua +++ b/parts/modes/infinite.lua @@ -1,15 +1,15 @@ return{ - color=COLOR.white, - env={ - drop=1e99,lock=1e99, - infHold=true, - bg='blockfall',bgm='infinite', - }, - mesDisp=function(P) - setFont(45) - mStr(("%.1f"):format(P.stat.atk),63,190) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) - mText(drawableText.atk,63,243) - mText(drawableText.eff,63,363) - end, + color=COLOR.white, + env={ + drop=1e99,lock=1e99, + infHold=true, + bg='blockfall',bgm='infinite', + }, + mesDisp=function(P) + setFont(45) + mStr(("%.1f"):format(P.stat.atk),63,190) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) + mText(drawableText.atk,63,243) + mText(drawableText.eff,63,363) + end, } \ No newline at end of file diff --git a/parts/modes/infinite_dig.lua b/parts/modes/infinite_dig.lua index be1d59e5..f19918b8 100644 --- a/parts/modes/infinite_dig.lua +++ b/parts/modes/infinite_dig.lua @@ -1,54 +1,54 @@ local function check_rise(P) - local L=P.garbageBeneath - if #P.clearedRow==0 then - if L>0 then - if L<3 then - P:showTextF(text.almost,0,-120,80,'beat',.8) - elseif L<5 then - P:showTextF(text.great,0,-120,80,'fly',.8) - end - end - for _=1,8-L do - P:garbageRise(13,1,generateLine(P.holeRND:random(10))) - end - else - if L==0 then - P:showTextF(text.awesome,0,-120,80,'beat',.6) - SFX.play('clear') - BG.send(26) - for _=1,8 do - P:garbageRise(13,1,generateLine(P.holeRND:random(10))) - end - else - BG.send(#P.clearedRow) - end - end + local L=P.garbageBeneath + if #P.clearedRow==0 then + if L>0 then + if L<3 then + P:showTextF(text.almost,0,-120,80,'beat',.8) + elseif L<5 then + P:showTextF(text.great,0,-120,80,'fly',.8) + end + end + for _=1,8-L do + P:garbageRise(13,1,generateLine(P.holeRND:random(10))) + end + else + if L==0 then + P:showTextF(text.awesome,0,-120,80,'beat',.6) + SFX.play('clear') + BG.send(26) + for _=1,8 do + P:garbageRise(13,1,generateLine(P.holeRND:random(10))) + end + else + BG.send(#P.clearedRow) + end + end end return{ - color=COLOR.white, - env={ - drop=1e99,lock=1e99, - infHold=true, - dropPiece=check_rise, - pushSpeed=1.2, - bg='wing',bgm='dream', - }, - load=function() - PLY.newPlayer(1) - local P=PLAYERS[1] - for _=1,8 do - P:garbageRise(13,1,generateLine(P.holeRND:random(10))) - end - P.fieldBeneath=0 - end, - mesDisp=function(P) - setFont(45) - mStr(P.stat.dig,63,190) - mStr(P.stat.atk,63,310) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,420) - mText(drawableText.line,63,243) - mText(drawableText.atk,63,363) - mText(drawableText.eff,63,475) - end, + color=COLOR.white, + env={ + drop=1e99,lock=1e99, + infHold=true, + dropPiece=check_rise, + pushSpeed=1.2, + bg='wing',bgm='dream', + }, + load=function() + PLY.newPlayer(1) + local P=PLAYERS[1] + for _=1,8 do + P:garbageRise(13,1,generateLine(P.holeRND:random(10))) + end + P.fieldBeneath=0 + end, + mesDisp=function(P) + setFont(45) + mStr(P.stat.dig,63,190) + mStr(P.stat.atk,63,310) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,420) + mText(drawableText.line,63,243) + mText(drawableText.atk,63,363) + mText(drawableText.eff,63,475) + end, } \ No newline at end of file diff --git a/parts/modes/marathon_bfmax.lua b/parts/modes/marathon_bfmax.lua index 2362983a..ffc81860 100644 --- a/parts/modes/marathon_bfmax.lua +++ b/parts/modes/marathon_bfmax.lua @@ -1,56 +1,56 @@ local dropSpeed={50,40,30,25,20,15,12,9,7,5,4,3,2,1,1,.5,.5,.25,.25} return{ - color=COLOR.yellow, - env={ - noTele=true, - drop=60,wait=8,fall=20, - task=function(P)P.modeData.target=10 end, - dropPiece=function(P) - local flag - local l=P.lastPiece - 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.row>1 then flag=true;P:showText("1+",0,-140,40,'flicker',.3)end - if l.pc then flag=true;P:showText("PC",0,-100,40,'flicker',.3)end - if l.hpc then flag=true;P:showText("HPC",0,-100,40,'flicker',.3)end - if flag then - P:lose() - else - local T=P.modeData.target - if P.stat.row>=T then - if T==200 then - P:win('finish') - else - T=T+10 - P.gameEnv.drop=dropSpeed[T/10] - P.modeData.target=T - SFX.play('reach') - end - end - end - end, - mindas=7,minarr=1,minsdarr=1, - bg='bg2',bgm='blank', - }, - slowMark=true, - mesDisp=function(P) - PLY.draw.drawProgress(P.stat.row,P.modeData.target) - PLY.draw.drawTargetLine(P,200-P.stat.row) - end, - getRank=function(P) - local L=P.stat.row - if L>=200 then - local T=P.stat.time - return - T<=400 and 5 or - T<=600 and 4 or - 3 - else - return - L>=150 and 2 or - L>=80 and 1 or - L>=20 and 0 - end - end, + color=COLOR.yellow, + env={ + noTele=true, + drop=60,wait=8,fall=20, + task=function(P)P.modeData.target=10 end, + dropPiece=function(P) + local flag + local l=P.lastPiece + 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.row>1 then flag=true;P:showText("1+",0,-140,40,'flicker',.3)end + if l.pc then flag=true;P:showText("PC",0,-100,40,'flicker',.3)end + if l.hpc then flag=true;P:showText("HPC",0,-100,40,'flicker',.3)end + if flag then + P:lose() + else + local T=P.modeData.target + if P.stat.row>=T then + if T==200 then + P:win('finish') + else + T=T+10 + P.gameEnv.drop=dropSpeed[T/10] + P.modeData.target=T + SFX.play('reach') + end + end + end + end, + mindas=7,minarr=1,minsdarr=1, + bg='bg2',bgm='blank', + }, + slowMark=true, + mesDisp=function(P) + PLY.draw.drawProgress(P.stat.row,P.modeData.target) + PLY.draw.drawTargetLine(P,200-P.stat.row) + end, + getRank=function(P) + local L=P.stat.row + if L>=200 then + local T=P.stat.time + return + T<=400 and 5 or + T<=600 and 4 or + 3 + else + return + L>=150 and 2 or + L>=80 and 1 or + L>=20 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/marathon_h.lua b/parts/modes/marathon_h.lua index 6c23fb86..fc27048e 100644 --- a/parts/modes/marathon_h.lua +++ b/parts/modes/marathon_h.lua @@ -1,49 +1,49 @@ return{ - color=COLOR.magenta, - env={ - noTele=true, - mindas=7,minarr=1,minsdarr=1, - drop=.5,wait=8,fall=20, - task=function(P)P.modeData.target=50 end, - dropPiece=function(P) - if P.stat.row>=P.modeData.target then - if P.modeData.target==50 then - P.gameEnv.drop=.25 - P.modeData.target=100 - SFX.play('reach') - elseif P.modeData.target==100 then - P:set20G(true) - P.modeData.target=200 - SFX.play('reach') - else - P:win('finish') - end - end - end, - noInitSZO=true, - bg='cubes',bgm='push', - }, - slowMark=true, - mesDisp=function(P) - PLY.draw.drawProgress(P.stat.row,P.modeData.target) - PLY.draw.drawTargetLine(P,200-P.stat.row) - 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, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=200 then - local T=P.stat.time - return - T<=240 and 5 or - T<=360 and 4 or - 3 - else - return - L>=100 and 2 or - L>=50 and 1 or - L>=10 and 0 - end - end, + color=COLOR.magenta, + env={ + noTele=true, + mindas=7,minarr=1,minsdarr=1, + drop=.5,wait=8,fall=20, + task=function(P)P.modeData.target=50 end, + dropPiece=function(P) + if P.stat.row>=P.modeData.target then + if P.modeData.target==50 then + P.gameEnv.drop=.25 + P.modeData.target=100 + SFX.play('reach') + elseif P.modeData.target==100 then + P:set20G(true) + P.modeData.target=200 + SFX.play('reach') + else + P:win('finish') + end + end + end, + noInitSZO=true, + bg='cubes',bgm='push', + }, + slowMark=true, + mesDisp=function(P) + PLY.draw.drawProgress(P.stat.row,P.modeData.target) + PLY.draw.drawTargetLine(P,200-P.stat.row) + 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, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=200 then + local T=P.stat.time + return + T<=240 and 5 or + T<=360 and 4 or + 3 + else + return + L>=100 and 2 or + L>=50 and 1 or + L>=10 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/marathon_n.lua b/parts/modes/marathon_n.lua index 4cce1bb3..0e30f7ff 100644 --- a/parts/modes/marathon_n.lua +++ b/parts/modes/marathon_n.lua @@ -1,47 +1,47 @@ local dropSpeed={50,40,30,24,18,14,10,8,6,5,4,3,2,1,1,.5,.5,.25,.25} return{ - color=COLOR.green, - env={ - noTele=true, - mindas=7,minarr=1,minsdarr=1, - drop=60,wait=8,fall=20, - task=function(P)P.modeData.target=10 end, - dropPiece=function(P) - if P.stat.row>=P.modeData.target then - if P.modeData.target==200 then - P:win('finish') - else - P.gameEnv.drop=dropSpeed[P.modeData.target/10] - P.modeData.target=P.modeData.target+10 - SFX.play('reach') - end - end - end, - noInitSZO=true, - bg='bg2',bgm='push', - }, - slowMark=true, - mesDisp=function(P) - PLY.draw.drawProgress(P.stat.row,P.modeData.target) - PLY.draw.drawTargetLine(P,200-P.stat.row) - 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, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=200 then - local T=P.stat.time - return - T<=240 and 5 or - T<=360 and 4 or - 3 - else - return - L>=150 and 2 or - L>=100 and 1 or - L>=20 and 0 - end - end, + color=COLOR.green, + env={ + noTele=true, + mindas=7,minarr=1,minsdarr=1, + drop=60,wait=8,fall=20, + task=function(P)P.modeData.target=10 end, + dropPiece=function(P) + if P.stat.row>=P.modeData.target then + if P.modeData.target==200 then + P:win('finish') + else + P.gameEnv.drop=dropSpeed[P.modeData.target/10] + P.modeData.target=P.modeData.target+10 + SFX.play('reach') + end + end + end, + noInitSZO=true, + bg='bg2',bgm='push', + }, + slowMark=true, + mesDisp=function(P) + PLY.draw.drawProgress(P.stat.row,P.modeData.target) + PLY.draw.drawTargetLine(P,200-P.stat.row) + 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, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=200 then + local T=P.stat.time + return + T<=240 and 5 or + T<=360 and 4 or + 3 + else + return + L>=150 and 2 or + L>=100 and 1 or + L>=20 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/master_ex.lua b/parts/modes/master_ex.lua index e7bd328e..700cbf3c 100644 --- a/parts/modes/master_ex.lua +++ b/parts/modes/master_ex.lua @@ -1,68 +1,68 @@ local sectionName={"D","C","B","A","A+","S-","S","S+","S+","SS","SS","U","U","X","X+"} local passPoint=16 local function score(P) - if P.modeData.rankPoint<140-passPoint then--If Less then X - local R=#P.clearedRow - if R>0 then - if R==4 then R=10 end--Techrash +10 - P.modeData.rankPoint=math.min(P.modeData.rankPoint+R,140-passPoint) - P.modeData.rankName=sectionName[math.floor(P.modeData.rankPoint/10)+1] - end - end + if P.modeData.rankPoint<140-passPoint then--If Less then X + local R=#P.clearedRow + if R>0 then + if R==4 then R=10 end--Techrash +10 + P.modeData.rankPoint=math.min(P.modeData.rankPoint+R,140-passPoint) + P.modeData.rankName=sectionName[math.floor(P.modeData.rankPoint/10)+1] + end + end end return{ - color=COLOR.lBlue, - env={ - noTele=true, - minarr=1, - drop=0,lock=15, - wait=15,fall=6, - nextCount=3, - sequence='hisPool', - visible='fast', - freshLimit=15, - dropPiece=score, - noInitSZO=true, - task=function(P) - P.modeData.rankPoint=0 - P.modeData.rankName=sectionName[1] - while true do - YIELD() - if P.stat.frame>=3600 then - P.modeData.rankPoint=math.min(P.modeData.rankPoint+passPoint,140) - P.modeData.rankName=sectionName[math.floor(P.modeData.rankPoint/10)+1] - P:win('finish') - return - end - end - end, - bg='blockspace',bgm='hope', - }, - slowMark=true, - mesDisp=function(P) - mText(drawableText.line,63,300) - mText(drawableText.techrash,63,420) - mText(drawableText.grade,63,170) - setFont(55) - mStr(P.modeData.rankName,63,110) - setFont(20) - mStr(("%.1f"):format(P.modeData.rankPoint/10),63,198) - setFont(75) - mStr(P.stat.row,63,220) - mStr(P.stat.clears[4],63,340) - 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, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]>b[2]end, - getRank=function(P) - P=P.modeData.rankPoint - return - P==140 and 5 or - P>=110 and 4 or - P>=80 and 3 or - P>=50 and 2 or - P>=30 and 1 or - P>=10 and 0 - end, + color=COLOR.lBlue, + env={ + noTele=true, + minarr=1, + drop=0,lock=15, + wait=15,fall=6, + nextCount=3, + sequence='hisPool', + visible='fast', + freshLimit=15, + dropPiece=score, + noInitSZO=true, + task=function(P) + P.modeData.rankPoint=0 + P.modeData.rankName=sectionName[1] + while true do + YIELD() + if P.stat.frame>=3600 then + P.modeData.rankPoint=math.min(P.modeData.rankPoint+passPoint,140) + P.modeData.rankName=sectionName[math.floor(P.modeData.rankPoint/10)+1] + P:win('finish') + return + end + end + end, + bg='blockspace',bgm='hope', + }, + slowMark=true, + mesDisp=function(P) + mText(drawableText.line,63,300) + mText(drawableText.techrash,63,420) + mText(drawableText.grade,63,170) + setFont(55) + mStr(P.modeData.rankName,63,110) + setFont(20) + mStr(("%.1f"):format(P.modeData.rankPoint/10),63,198) + setFont(75) + mStr(P.stat.row,63,220) + mStr(P.stat.clears[4],63,340) + 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, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]>b[2]end, + getRank=function(P) + P=P.modeData.rankPoint + return + P==140 and 5 or + P>=110 and 4 or + P>=80 and 3 or + P>=50 and 2 or + P>=30 and 1 or + P>=10 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/master_final.lua b/parts/modes/master_final.lua index 27422231..80b7af94 100644 --- a/parts/modes/master_final.lua +++ b/parts/modes/master_final.lua @@ -1,75 +1,75 @@ local function score(P) - local D=P.modeData + local D=P.modeData - local c=#P.clearedRow - if c==0 and D.pt%100==99 then return end - local s=c<3 and c+1 or c==3 and 5 or 7 - if P.combo>7 then s=s+2 - elseif P.combo>3 then s=s+1 - end - D.pt=D.pt+s + local c=#P.clearedRow + if c==0 and D.pt%100==99 then return end + local s=c<3 and c+1 or c==3 and 5 or 7 + if P.combo>7 then s=s+2 + elseif P.combo>3 then s=s+1 + end + D.pt=D.pt+s - if D.pt%100==99 then - SFX.play('blip_1') - elseif D.pt>=D.target then--Level up! - s=D.target/100--range from 1 to 9 - local E=P.gameEnv - if s<4 then - P:showTextF(text.stage:gsub("$1",s),0,-120,80,'fly') - --First 300 - if s~=1 then E.lock=E.lock-1 end - if s~=2 then E.wait=E.wait-1 end - if s~=3 then E.fall=E.fall-1 end - D.target=D.target+100 - elseif s<10 then - if s==5 then BGM.play('distortion')end - P:showTextF(text.stage:gsub("$1",s),0,-120,60,'fly',1.26) - if s==4 or s==7 then E.das=E.das-1 end - if s%3==0 then E.lock=E.lock-1 - elseif s%3==1 then E.wait=E.wait-1 - elseif s%3==2 then E.fall=E.fall-1 - end - D.target=D.target+100 - else - D.pt=1000 - P:win('finish') - end - SFX.play('reach') - end + if D.pt%100==99 then + SFX.play('blip_1') + elseif D.pt>=D.target then--Level up! + s=D.target/100--range from 1 to 9 + local E=P.gameEnv + if s<4 then + P:showTextF(text.stage:gsub("$1",s),0,-120,80,'fly') + --First 300 + if s~=1 then E.lock=E.lock-1 end + if s~=2 then E.wait=E.wait-1 end + if s~=3 then E.fall=E.fall-1 end + D.target=D.target+100 + elseif s<10 then + if s==5 then BGM.play('distortion')end + P:showTextF(text.stage:gsub("$1",s),0,-120,60,'fly',1.26) + if s==4 or s==7 then E.das=E.das-1 end + if s%3==0 then E.lock=E.lock-1 + elseif s%3==1 then E.wait=E.wait-1 + elseif s%3==2 then E.fall=E.fall-1 + end + D.target=D.target+100 + else + D.pt=1000 + P:win('finish') + end + SFX.play('reach') + end end return{ - color=COLOR.lGray, - env={ - noTele=true, - das=5,arr=1, - drop=0,lock=12, - wait=10,fall=10, - dropPiece=score, - task=function(P) - P.modeData.pt=0 - P.modeData.target=100 - end, - freshLimit=15, - easyFresh=false,bone=true, - noInitSZO=true, - bg='lightning',bgm='rectification', - }, - slowMark=true, - mesDisp=function(P) - PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) - end, - score=function(P)return{P.modeData.pt,P.stat.time}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]=1000 and 5 or - S>=800 and 4 or - S>=600 and 3 or - S>=400 and 2 or - S>=200 and 1 or - S>=50 and 0 - end, + color=COLOR.lGray, + env={ + noTele=true, + das=5,arr=1, + drop=0,lock=12, + wait=10,fall=10, + dropPiece=score, + task=function(P) + P.modeData.pt=0 + P.modeData.target=100 + end, + freshLimit=15, + easyFresh=false,bone=true, + noInitSZO=true, + bg='lightning',bgm='rectification', + }, + slowMark=true, + mesDisp=function(P) + PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) + end, + score=function(P)return{P.modeData.pt,P.stat.time}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]=1000 and 5 or + S>=800 and 4 or + S>=600 and 3 or + S>=400 and 2 or + S>=200 and 1 or + S>=50 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/master_h.lua b/parts/modes/master_h.lua index 4b40ee12..b5165621 100644 --- a/parts/modes/master_h.lua +++ b/parts/modes/master_h.lua @@ -1,93 +1,93 @@ -local death_lock={12,11,10,9,8, 7,7,7,7,6} -local death_wait={10,9, 8, 7,6, 6,6,5,5,4} -local death_fall={10,9, 8, 7,6, 6,5,5,4,4} +local death_lock={12,11,10,9,8, 7,7,7,7,6} +local death_wait={10,9, 8, 7,6, 6,6,5,5,4} +local death_fall={10,9, 8, 7,6, 6,5,5,4,4} local function score(P) - local D=P.modeData + local D=P.modeData - local c=#P.clearedRow - if c==0 and D.pt%100==99 then return end - local s=c<3 and c+1 or c==3 and 5 or 7 - if P.combo>7 then s=s+2 - elseif P.combo>3 then s=s+1 - end - D.pt=D.pt+s + local c=#P.clearedRow + if c==0 and D.pt%100==99 then return end + local s=c<3 and c+1 or c==3 and 5 or 7 + if P.combo>7 then s=s+2 + elseif P.combo>3 then s=s+1 + end + D.pt=D.pt+s - if D.pt%100==99 then - SFX.play('blip_1') - elseif D.pt>=D.target then--Level up! - s=D.target/100 - local E=P.gameEnv - E.lock=death_lock[s] - E.wait=death_wait[s] - E.fall=death_fall[s] - if s==2 then - E.das=5 - BG.set('rainbow') - elseif s==4 then - E.das=4 - BG.set('rainbow2') - elseif s==5 then - if P.stat.frame>183*60 then - D.pt=500 - P:win('finish') - return - else - E.bone=true - P.gameEnv.freshLimit=10 - BG.set('glow') - BGM.play('secret7th remix') - end - elseif s==6 then - E.das=3 - BG.set('lightning') - elseif s==7 then - E.bone=true - elseif s==10 then - D.pt=1000 - P:win('finish') - return - end - D.target=D.target+100 - P:showTextF(text.stage:gsub("$1",s),0,-120,80,'beat') - SFX.play('reach') - end + if D.pt%100==99 then + SFX.play('blip_1') + elseif D.pt>=D.target then--Level up! + s=D.target/100 + local E=P.gameEnv + E.lock=death_lock[s] + E.wait=death_wait[s] + E.fall=death_fall[s] + if s==2 then + E.das=5 + BG.set('rainbow') + elseif s==4 then + E.das=4 + BG.set('rainbow2') + elseif s==5 then + if P.stat.frame>183*60 then + D.pt=500 + P:win('finish') + return + else + E.bone=true + P.gameEnv.freshLimit=10 + BG.set('glow') + BGM.play('secret7th remix') + end + elseif s==6 then + E.das=3 + BG.set('lightning') + elseif s==7 then + E.bone=true + elseif s==10 then + D.pt=1000 + P:win('finish') + return + end + D.target=D.target+100 + P:showTextF(text.stage:gsub("$1",s),0,-120,80,'beat') + SFX.play('reach') + end end return{ - color=COLOR.red, - env={ - noTele=true, - das=6,arr=1, - drop=0, - lock=death_lock[1], - wait=death_wait[1], - fall=death_fall[1], - dropPiece=score, - task=function(P) - P.modeData.pt=0 - P.modeData.target=100 - end, - freshLimit=15, - noInitSZO=true, - bg='bg2',bgm='secret7th', - }, - slowMark=true, - mesDisp=function(P) - PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) - end, - score=function(P)return{P.modeData.pt,P.stat.time}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]=1000 and 5 or - S>=800 and 4 or - S>=500 and 3 or - S>=300 and 2 or - S>=100 and 1 or - S>=60 and 0 - end, + color=COLOR.red, + env={ + noTele=true, + das=6,arr=1, + drop=0, + lock=death_lock[1], + wait=death_wait[1], + fall=death_fall[1], + dropPiece=score, + task=function(P) + P.modeData.pt=0 + P.modeData.target=100 + end, + freshLimit=15, + noInitSZO=true, + bg='bg2',bgm='secret7th', + }, + slowMark=true, + mesDisp=function(P) + PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) + end, + score=function(P)return{P.modeData.pt,P.stat.time}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]=1000 and 5 or + S>=800 and 4 or + S>=500 and 3 or + S>=300 and 2 or + S>=100 and 1 or + S>=60 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/master_l.lua b/parts/modes/master_l.lua index 0895b134..75c14ff8 100644 --- a/parts/modes/master_l.lua +++ b/parts/modes/master_l.lua @@ -2,84 +2,84 @@ local rush_lock={20,18,16,15,14} local rush_wait={12,10, 9, 8, 7} local rush_fall={18,16,14,13,12} local function score(P) - local D=P.modeData + local D=P.modeData - local c=#P.clearedRow - if c==0 and D.pt%100==99 then return end - local s=c<3 and c+1 or c==3 and 5 or 7 - if P.combo>7 then s=s+2 - elseif P.combo>3 then s=s+1 - end - D.pt=D.pt+s + local c=#P.clearedRow + if c==0 and D.pt%100==99 then return end + local s=c<3 and c+1 or c==3 and 5 or 7 + if P.combo>7 then s=s+2 + elseif P.combo>3 then s=s+1 + end + D.pt=D.pt+s - if D.pt%100==99 then - SFX.play('blip_1') - elseif D.pt>=D.target then--Level up! - s=D.target/100 - local E=P.gameEnv - BG.set(s==1 and'bg1'or s==2 and'bg2'or s==3 and'rainbow'or 'rainbow2') - E.lock=rush_lock[s] - E.wait=rush_wait[s] - E.fall=rush_fall[s] - E.das=10-s - if s==2 then - E.arr=2 - elseif s==4 then - E.bone=true - end + if D.pt%100==99 then + SFX.play('blip_1') + elseif D.pt>=D.target then--Level up! + s=D.target/100 + local E=P.gameEnv + BG.set(s==1 and'bg1'or s==2 and'bg2'or s==3 and'rainbow'or 'rainbow2') + E.lock=rush_lock[s] + E.wait=rush_wait[s] + E.fall=rush_fall[s] + E.das=10-s + if s==2 then + E.arr=2 + elseif s==4 then + E.bone=true + end - if s==5 then - D.pt=500 - P:win('finish') - else - D.target=D.target+100 - P:showTextF(text.stage:gsub("$1",s),0,-120,80,'fly') - end - SFX.play('reach') - end + if s==5 then + D.pt=500 + P:win('finish') + else + D.target=D.target+100 + P:showTextF(text.stage:gsub("$1",s),0,-120,80,'fly') + end + SFX.play('reach') + end end return{ - color=COLOR.red, - env={ - noTele=true, - das=9,arr=3, - drop=0, - lock=rush_lock[1], - wait=rush_wait[1], - fall=rush_fall[1], - dropPiece=score, - noInitSZO=true, - task=function(P) - P.modeData.pt=0 - P.modeData.target=100 - end, - freshLimit=15, - bg='bg1',bgm='secret8th', - }, - slowMark=true, - mesDisp=function(P) - PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) - end, - score=function(P)return{P.modeData.pt,P.stat.time}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]=460 and 3 or - S>=350 and 2 or - S>=200 and 1 or - S>=50 and 0 - end - end, + color=COLOR.red, + env={ + noTele=true, + das=9,arr=3, + drop=0, + lock=rush_lock[1], + wait=rush_wait[1], + fall=rush_fall[1], + dropPiece=score, + noInitSZO=true, + task=function(P) + P.modeData.pt=0 + P.modeData.target=100 + end, + freshLimit=15, + bg='bg1',bgm='secret8th', + }, + slowMark=true, + mesDisp=function(P) + PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) + end, + score=function(P)return{P.modeData.pt,P.stat.time}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]=460 and 3 or + S>=350 and 2 or + S>=200 and 1 or + S>=50 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/master_n.lua b/parts/modes/master_n.lua index 0c27a229..143103b4 100644 --- a/parts/modes/master_n.lua +++ b/parts/modes/master_n.lua @@ -1,93 +1,93 @@ -local rush_lock={20,18,16,15,14, 14,13,12,11,11} -local rush_wait={12,11,11,10,10, 10,10, 9, 9, 9} -local rush_fall={18,16,14,13,12, 12,11,11,10,10} +local rush_lock={20,18,16,15,14, 14,13,12,11,11} +local rush_wait={12,11,11,10,10, 10,10, 9, 9, 9} +local rush_fall={18,16,14,13,12, 12,11,11,10,10} local function score(P) - local D=P.modeData + local D=P.modeData - local c=#P.clearedRow - if c==0 and D.pt%100==99 then return end - local s=c<3 and c+1 or c==3 and 5 or 7 - if P.combo>7 then s=s+2 - elseif P.combo>3 then s=s+1 - end - D.pt=D.pt+s + local c=#P.clearedRow + if c==0 and D.pt%100==99 then return end + local s=c<3 and c+1 or c==3 and 5 or 7 + if P.combo>7 then s=s+2 + elseif P.combo>3 then s=s+1 + end + D.pt=D.pt+s - if D.pt%100==99 then - SFX.play('blip_1') - elseif D.pt>=D.target then--Level up! - s=D.target/100 - local E=P.gameEnv - E.lock=rush_lock[s] - E.wait=rush_wait[s] - E.fall=rush_fall[s] + if D.pt%100==99 then + SFX.play('blip_1') + elseif D.pt>=D.target then--Level up! + s=D.target/100 + local E=P.gameEnv + E.lock=rush_lock[s] + E.wait=rush_wait[s] + E.fall=rush_fall[s] - if s==2 then - E.das=8 - BG.set('rainbow') - elseif s==4 then - BG.set('rainbow2') - elseif s==5 then - if P.stat.frame>260*60 then - D.pt=500 - P:win('finish') - return - else - P.gameEnv.freshLimit=10 - E.das=7 - BG.set('glow') - BGM.play('secret8th remix') - end - elseif s==7 then - E.das=6 - BG.set('lightning') - elseif s==9 then - E.bone=true - elseif s==10 then - D.pt=1000 - P:win('finish') - return - end - D.target=D.target+100 - P:showTextF(text.stage:gsub("$1",s),0,-120,80,'fly') - SFX.play('reach') - end + if s==2 then + E.das=8 + BG.set('rainbow') + elseif s==4 then + BG.set('rainbow2') + elseif s==5 then + if P.stat.frame>260*60 then + D.pt=500 + P:win('finish') + return + else + P.gameEnv.freshLimit=10 + E.das=7 + BG.set('glow') + BGM.play('secret8th remix') + end + elseif s==7 then + E.das=6 + BG.set('lightning') + elseif s==9 then + E.bone=true + elseif s==10 then + D.pt=1000 + P:win('finish') + return + end + D.target=D.target+100 + P:showTextF(text.stage:gsub("$1",s),0,-120,80,'fly') + SFX.play('reach') + end end return{ - color=COLOR.red, - env={ - noTele=true, - das=10,arr=3, - drop=0, - lock=rush_lock[1], - wait=rush_wait[1], - fall=rush_fall[1], - dropPiece=score, - noInitSZO=true, - task=function(P) - P.modeData.pt=0 - P.modeData.target=100 - end, - freshLimit=15, - bg='bg1',bgm='secret8th', - }, - slowMark=true, - mesDisp=function(P) - PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) - end, - score=function(P)return{P.modeData.pt,P.stat.time}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]=1000 and 5 or - S>=800 and 4 or - S>=500 and 3 or - S>=300 and 2 or - S>=100 and 1 or - S>=60 and 0 - end, + color=COLOR.red, + env={ + noTele=true, + das=10,arr=3, + drop=0, + lock=rush_lock[1], + wait=rush_wait[1], + fall=rush_fall[1], + dropPiece=score, + noInitSZO=true, + task=function(P) + P.modeData.pt=0 + P.modeData.target=100 + end, + freshLimit=15, + bg='bg1',bgm='secret8th', + }, + slowMark=true, + mesDisp=function(P) + PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) + end, + score=function(P)return{P.modeData.pt,P.stat.time}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]=1000 and 5 or + S>=800 and 4 or + S>=500 and 3 or + S>=300 and 2 or + S>=100 and 1 or + S>=60 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/master_ph.lua b/parts/modes/master_ph.lua index bd49d82b..6b188e68 100644 --- a/parts/modes/master_ph.lua +++ b/parts/modes/master_ph.lua @@ -1,163 +1,163 @@ return{ - color=COLOR.black, - env={ - noTele=true, - das=5,arr=1, - drop=0,lock=15, - wait=10,fall=10, - nextCount=2, - sequence='his', - task=function(P)P.modeData.target=12 end, - dropPiece=function(P) - local p=P.modeData.pt+P.lastPiece.row - if p>=P.modeData.target then - local ENV=P.gameEnv - local T=P.modeData.target - --Stage 1: clear 3 techrash - if T==12 then--Stage 2: swap color of S/Z & J/L - P.waiting=30 - P.curMission=false + color=COLOR.black, + env={ + noTele=true, + das=5,arr=1, + drop=0,lock=15, + wait=10,fall=10, + nextCount=2, + sequence='his', + task=function(P)P.modeData.target=12 end, + dropPiece=function(P) + local p=P.modeData.pt+P.lastPiece.row + if p>=P.modeData.target then + local ENV=P.gameEnv + local T=P.modeData.target + --Stage 1: clear 3 techrash + if T==12 then--Stage 2: swap color of S/Z & J/L + P.waiting=30 + P.curMission=false - ENV.skin[1],ENV.skin[2]=ENV.skin[2],ENV.skin[1] - ENV.skin[3],ENV.skin[4]=ENV.skin[4],ENV.skin[3] + ENV.skin[1],ENV.skin[2]=ENV.skin[2],ENV.skin[1] + ENV.skin[3],ENV.skin[4]=ENV.skin[4],ENV.skin[3] - ENV.lock=14 - ENV.wait=7 - ENV.fall=7 - P:setNext(4) + ENV.lock=14 + ENV.wait=7 + ENV.fall=7 + P:setNext(4) - P.modeData.target=26 - SFX.play('reach') - elseif T==26 then--Stage 3: dig to bottom - if not P.holdQueue[1]then P.life=P.life+1 end--1 up if ban hold - P.waiting=45 - ENV.skin[1],ENV.skin[2]=ENV.skin[2],ENV.skin[1] - ENV.skin[3],ENV.skin[4]=ENV.skin[4],ENV.skin[3] + P.modeData.target=26 + SFX.play('reach') + elseif T==26 then--Stage 3: dig to bottom + if not P.holdQueue[1]then P.life=P.life+1 end--1 up if ban hold + P.waiting=45 + ENV.skin[1],ENV.skin[2]=ENV.skin[2],ENV.skin[1] + ENV.skin[3],ENV.skin[4]=ENV.skin[4],ENV.skin[3] - for i=1,10 do - if P.field[i]then - for j=1,10 do - if P.field[i][j]>0 then - P.field[i][j]=17 - P.visTime[i][j]=15 - end - end - for _=1,5 do - P.field[i][P.holeRND:random(10)]=0 - end - else - P.field[i]=FREEROW.get(0) - P.visTime[i]=FREEROW.get(30) - for j=1,10 do - if P.holeRND:random()>.9 then - P.field[i][j]=P.holeRND:random(16) - end - end - P.field[i][P.holeRND:random(10)]=0 - end - P.field[i].garbage=true - end - P.garbageBeneath=10 - for i=1,10 do - P:createClearingFX(i,1.5) - end - SYSFX.newShade(2.5,P.absFieldX,P.y+300*P.size,300*P.size,300*P.size) + for i=1,10 do + if P.field[i]then + for j=1,10 do + if P.field[i][j]>0 then + P.field[i][j]=17 + P.visTime[i][j]=15 + end + end + for _=1,5 do + P.field[i][P.holeRND:random(10)]=0 + end + else + P.field[i]=FREEROW.get(0) + P.visTime[i]=FREEROW.get(30) + for j=1,10 do + if P.holeRND:random()>.9 then + P.field[i][j]=P.holeRND:random(16) + end + end + P.field[i][P.holeRND:random(10)]=0 + end + P.field[i].garbage=true + end + P.garbageBeneath=10 + for i=1,10 do + P:createClearingFX(i,1.5) + end + SYSFX.newShade(2.5,P.absFieldX,P.y+300*P.size,300*P.size,300*P.size) - ENV.lock=13 - ENV.wait=6 - ENV.fall=6 - P:setNext(5) + ENV.lock=13 + ENV.wait=6 + ENV.fall=6 + P:setNext(5) - P.modeData.target=42 - SFX.play('reach') - elseif T==42 then--Stage 4: survive in high speed - if P.garbageBeneath==0 then - P.waiting=30 - ENV.lock=11 - P:setNext(6) - P:setHold(false) - ENV.bone=true + P.modeData.target=42 + SFX.play('reach') + elseif T==42 then--Stage 4: survive in high speed + if P.garbageBeneath==0 then + P.waiting=30 + ENV.lock=11 + P:setNext(6) + P:setHold(false) + ENV.bone=true - P.modeData.target=62 - else - p=41 - end - elseif T==62 then--Stage 5: survive without easy-fresh rule - P.life=P.life+1 - ENV.lock=13 - ENV.wait=5 - ENV.fall=5 + P.modeData.target=62 + else + p=41 + end + elseif T==62 then--Stage 5: survive without easy-fresh rule + P.life=P.life+1 + ENV.lock=13 + ENV.wait=5 + ENV.fall=5 - ENV.easyFresh=false + ENV.easyFresh=false - P.modeData.target=126 - SFX.play('reach') - elseif T==126 then--Stage 6: speed up - P.life=P.life+1 + P.modeData.target=126 + SFX.play('reach') + elseif T==126 then--Stage 6: speed up + P.life=P.life+1 - ENV.lock=11 - ENV.wait=4 - ENV.fall=4 + ENV.lock=11 + ENV.wait=4 + ENV.fall=4 - P.modeData.target=162 - elseif T==162 then--Stage 7: speed up+++ - P.life=P.life+1 + P.modeData.target=162 + elseif T==162 then--Stage 7: speed up+++ + P.life=P.life+1 - ENV.lock=10 + ENV.lock=10 - P:setHold(true) - P:setInvisible(180) + P:setHold(true) + P:setInvisible(180) - P.modeData.target=226 - SFX.play('reach') - elseif T==226 then--Stage 8: final invisible - P.life=P.life+1 + P.modeData.target=226 + SFX.play('reach') + elseif T==226 then--Stage 8: final invisible + P.life=P.life+1 - ENV.bone=false - P:setInvisible(90) + ENV.bone=false + P:setInvisible(90) - P.modeData.target=259 - SFX.play('reach') - elseif T==259 then--Stage 9: ending - P.life=P.life+1 - for i=1,7 do ENV.skin[i]=P.holeRND:random(16)end + P.modeData.target=259 + SFX.play('reach') + elseif T==259 then--Stage 9: ending + P.life=P.life+1 + for i=1,7 do ENV.skin[i]=P.holeRND:random(16)end - P:setInvisible(40) - ENV.lock=15 - P.curMission=1 - ENV.mission={4,4,4,4,4,4,4,4} - ENV.missionKill=false + P:setInvisible(40) + ENV.lock=15 + P.curMission=1 + ENV.mission={4,4,4,4,4,4,4,4} + ENV.missionKill=false - P.modeData.target=260 - p=260 - SFX.play('blip_2') - else - p=260 - end - end - P.modeData.pt=p - end, - mission={4,4,4,64}, - missionKill=true, - freshLimit=12, - noInitSZO=true, - bg='blockspace',bgm='super7th', - }, - slowMark=true, - mesDisp=function(P) - PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) - end, - score=function(P)return{P.result=='win'and 260 or P.modeData.pt,P.stat.time}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]=226 and 4 or - p>=162 and 3 or - p>=62 and 2 or - p>=42 and 1 or - p>=26 and 0 - end, + P.modeData.target=260 + p=260 + SFX.play('blip_2') + else + p=260 + end + end + P.modeData.pt=p + end, + mission={4,4,4,64}, + missionKill=true, + freshLimit=12, + noInitSZO=true, + bg='blockspace',bgm='super7th', + }, + slowMark=true, + mesDisp=function(P) + PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) + end, + score=function(P)return{P.result=='win'and 260 or P.modeData.pt,P.stat.time}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]=226 and 4 or + p>=162 and 3 or + p>=62 and 2 or + p>=42 and 1 or + p>=26 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/master_u.lua b/parts/modes/master_u.lua index 89a8b013..5984ddb4 100644 --- a/parts/modes/master_u.lua +++ b/parts/modes/master_u.lua @@ -1,88 +1,88 @@ -local death_lock={12,11,10,9,8, 7,7,7,6,6} -local death_wait={10, 9, 8,7,6, 6,5,4,4,3} -local death_fall={10, 9, 8,7,6, 5,5,4,3,3} +local death_lock={12,11,10,9,8, 7,7,7,6,6} +local death_wait={10, 9, 8,7,6, 6,5,4,4,3} +local death_fall={10, 9, 8,7,6, 5,5,4,3,3} local function score(P) - local D=P.modeData + local D=P.modeData - local c=#P.clearedRow - if c==0 and D.pt%100==99 then return end - local s=c<3 and c+1 or c==3 and 5 or 7 - if P.combo>7 then s=s+2 - elseif P.combo>3 then s=s+1 - end - D.pt=D.pt+s + local c=#P.clearedRow + if c==0 and D.pt%100==99 then return end + local s=c<3 and c+1 or c==3 and 5 or 7 + if P.combo>7 then s=s+2 + elseif P.combo>3 then s=s+1 + end + D.pt=D.pt+s - if D.pt%100==99 then - SFX.play('blip_1') - elseif D.pt>=D.target then--Level up! - s=D.target/100 - local E=P.gameEnv - SFX.play('reach') - E.lock=death_lock[s] - E.wait=death_wait[s] - E.fall=death_fall[s] - E.das=math.floor(6.9-s*.4) - if s==1 then - BG.set('rainbow') - elseif s==2 then - BG.set('rainbow2') - elseif s==3 then - BG.set('glow') - elseif s==5 then - if P.stat.frame>183*60 then - D.pt=500 - P:win('finish') - return - else - P.gameEnv.freshLimit=10 - BG.set('lightning') - BGM.play('secret7th remix') - end - elseif s==10 then - D.pt=1000 - P:win('finish') - return - end - D.target=D.target+100 - P:showTextF(text.stage:gsub("$1",s),0,-120,80,'fly') - end + if D.pt%100==99 then + SFX.play('blip_1') + elseif D.pt>=D.target then--Level up! + s=D.target/100 + local E=P.gameEnv + SFX.play('reach') + E.lock=death_lock[s] + E.wait=death_wait[s] + E.fall=death_fall[s] + E.das=math.floor(6.9-s*.4) + if s==1 then + BG.set('rainbow') + elseif s==2 then + BG.set('rainbow2') + elseif s==3 then + BG.set('glow') + elseif s==5 then + if P.stat.frame>183*60 then + D.pt=500 + P:win('finish') + return + else + P.gameEnv.freshLimit=10 + BG.set('lightning') + BGM.play('secret7th remix') + end + elseif s==10 then + D.pt=1000 + P:win('finish') + return + end + D.target=D.target+100 + P:showTextF(text.stage:gsub("$1",s),0,-120,80,'fly') + end end return{ - color=COLOR.red, - env={ - noTele=true, - das=6,arr=1, - drop=0, - lock=death_lock[1], - wait=death_wait[1], - fall=death_fall[1], - dropPiece=score, - task=function(P) - P.modeData.pt=0 - P.modeData.target=100 - end, - freshLimit=15, - noInitSZO=true, - bg='bg2',bgm='secret7th', - }, - slowMark=true, - mesDisp=function(P) - PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) - end, - score=function(P)return{P.modeData.pt,P.stat.time}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]=1000 and 5 or - S>=800 and 4 or - S>=500 and 3 or - S>=300 and 2 or - S>=100 and 1 or - S>=50 and 0 - end, + color=COLOR.red, + env={ + noTele=true, + das=6,arr=1, + drop=0, + lock=death_lock[1], + wait=death_wait[1], + fall=death_fall[1], + dropPiece=score, + task=function(P) + P.modeData.pt=0 + P.modeData.target=100 + end, + freshLimit=15, + noInitSZO=true, + bg='bg2',bgm='secret7th', + }, + slowMark=true, + mesDisp=function(P) + PLY.draw.drawProgress(P.modeData.pt,P.modeData.target) + end, + score=function(P)return{P.modeData.pt,P.stat.time}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]=1000 and 5 or + S>=800 and 4 or + S>=500 and 3 or + S>=300 and 2 or + S>=100 and 1 or + S>=50 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/netBattle.lua b/parts/modes/netBattle.lua index 53522e4a..9126c730 100644 --- a/parts/modes/netBattle.lua +++ b/parts/modes/netBattle.lua @@ -1,42 +1,42 @@ local yield=YIELD local function marginTask(P) - local S=P.stat - while true do yield()if S.frame>90*60 then P.strength=1;P:setFrameColor(1)break end end - while true do yield()if S.frame>135*60 then P.strength=2;P:setFrameColor(2)break end end - while true do yield()if S.frame>180*60 then P.strength=3;P:setFrameColor(3)break end end - while true do yield()if S.frame>260*60 then P.strength=4;P:setFrameColor(4)break end end + local S=P.stat + while true do yield()if S.frame>90*60 then P.strength=1;P:setFrameColor(1)break end end + while true do yield()if S.frame>135*60 then P.strength=2;P:setFrameColor(2)break end end + while true do yield()if S.frame>180*60 then P.strength=3;P:setFrameColor(3)break end end + while true do yield()if S.frame>260*60 then P.strength=4;P:setFrameColor(4)break end end end return{ - color=COLOR.white, - env={ - bg={'bg1','bg2','blackhole','blockfall','blockrain','blockspace','cubes','fan','flink','glow','matrix','rainbow','rainbow2','tunnel'}, - bgm={'battle','beat5th','cruelty','distortion','echo','far','final','here','hope','memory','moonbeam','push','rectification','secret7th remix','secret7th','secret8th remix','secret8th','shift','shining terminal','storm','super7th','there','truth','vapor','waterfall'}, - }, - load=function() - for k,v in next,NET.roomState.roomData do - GAME.modeEnv[k]=v - end - GAME.modeEnv.allowMod=false - GAME.modeEnv.task=marginTask + color=COLOR.white, + env={ + bg={'bg1','bg2','blackhole','blockfall','blockrain','blockspace','cubes','fan','flink','glow','matrix','rainbow','rainbow2','tunnel'}, + bgm={'battle','beat5th','cruelty','distortion','echo','far','final','here','hope','memory','moonbeam','push','rectification','secret7th remix','secret7th','secret8th remix','secret8th','shift','shining terminal','storm','super7th','there','truth','vapor','waterfall'}, + }, + load=function() + for k,v in next,NET.roomState.roomData do + GAME.modeEnv[k]=v + end + GAME.modeEnv.allowMod=false + GAME.modeEnv.task=marginTask - local L=TABLE.copy(netPLY.list) - local N=1 - for i,p in next,L do - if p.uid==USER.uid then - if p.connected then - PLY.newPlayer(1) - PLAYERS[1].sid=netPLY.getSID(USER.uid) - N=2 - end - table.remove(L,i) - break - end - end - for _,p in next,L do - if p.connected then - PLY.newRemotePlayer(N,false,p) - N=N+1 - end - end - end, + local L=TABLE.copy(netPLY.list) + local N=1 + for i,p in next,L do + if p.uid==USER.uid then + if p.connected then + PLY.newPlayer(1) + PLAYERS[1].sid=netPLY.getSID(USER.uid) + N=2 + end + table.remove(L,i) + break + end + end + for _,p in next,L do + if p.connected then + PLY.newRemotePlayer(N,false,p) + N=N+1 + end + end + end, } \ No newline at end of file diff --git a/parts/modes/pc_h.lua b/parts/modes/pc_h.lua index dd97d5a3..5ce0195f 100644 --- a/parts/modes/pc_h.lua +++ b/parts/modes/pc_h.lua @@ -1,35 +1,35 @@ return{ - color=COLOR.magenta, - env={ - drop=60,lock=120, - fall=10, - dropPiece=function(P)if P.stat.row>=100 then P:win('finish')end end, - freshLimit=15, - ospin=false, - bg='rgb',bgm='truth', - }, - mesDisp=function(P) - setFont(55) - local r=100-P.stat.row - if r<0 then r=0 end - mStr(r,63,220) - PLY.draw.drawTargetLine(P,r) + color=COLOR.magenta, + env={ + drop=60,lock=120, + fall=10, + dropPiece=function(P)if P.stat.row>=100 then P:win('finish')end end, + freshLimit=15, + ospin=false, + bg='rgb',bgm='truth', + }, + mesDisp=function(P) + setFont(55) + local r=100-P.stat.row + if r<0 then r=0 end + mStr(r,63,220) + PLY.draw.drawTargetLine(P,r) - setFont(60) - mStr(P.stat.pc,63,300) - mText(drawableText.pc,63,370) - end, - score=function(P)return{P.stat.pc,P.stat.time}end, - scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=24 and 5 or - L>=20 and 4 or - L>=16 and 3 or - L>=12 and 2 or - L>=8 and 1 or - L>=1 and 0 - end, + setFont(60) + mStr(P.stat.pc,63,300) + mText(drawableText.pc,63,370) + end, + score=function(P)return{P.stat.pc,P.stat.time}end, + scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=24 and 5 or + L>=20 and 4 or + L>=16 and 3 or + L>=12 and 2 or + L>=8 and 1 or + L>=1 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/pc_inf.lua b/parts/modes/pc_inf.lua index 6c3eb81f..596cebcc 100644 --- a/parts/modes/pc_inf.lua +++ b/parts/modes/pc_inf.lua @@ -1,42 +1,42 @@ return{ - color=COLOR.red, - env={ - drop=20,lock=60, - fall=10, - dropPiece=function(P) - if P.lastPiece.pc then - P.gameEnv.heightLimit=4 - if P.stat.pc%5==0 then - P.gameEnv.drop=math.max(P.gameEnv.drop-1,1) - end - else - P.gameEnv.heightLimit=P.gameEnv.heightLimit-P.lastPiece.row - end - if #P.field>P.gameEnv.heightLimit then - P:lose() - end - end, - freshLimit=8, - heightLimit=4, - ospin=false, - bg='rgb',bgm='moonbeam', - }, - mesDisp=function(P) - setFont(60) - mStr(P.stat.pc,63,300) - mText(drawableText.pc,63,370) - end, - score=function(P)return{P.stat.pc,P.stat.time}end, - scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=50 and 5 or - L>=40 and 4 or - L>=30 and 3 or - L>=20 and 2 or - L>=10 and 1 or - L>=5 and 0 - end, + color=COLOR.red, + env={ + drop=20,lock=60, + fall=10, + dropPiece=function(P) + if P.lastPiece.pc then + P.gameEnv.heightLimit=4 + if P.stat.pc%5==0 then + P.gameEnv.drop=math.max(P.gameEnv.drop-1,1) + end + else + P.gameEnv.heightLimit=P.gameEnv.heightLimit-P.lastPiece.row + end + if #P.field>P.gameEnv.heightLimit then + P:lose() + end + end, + freshLimit=8, + heightLimit=4, + ospin=false, + bg='rgb',bgm='moonbeam', + }, + mesDisp=function(P) + setFont(60) + mStr(P.stat.pc,63,300) + mText(drawableText.pc,63,370) + end, + score=function(P)return{P.stat.pc,P.stat.time}end, + scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=50 and 5 or + L>=40 and 4 or + L>=30 and 3 or + L>=20 and 2 or + L>=10 and 1 or + L>=5 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/pc_l.lua b/parts/modes/pc_l.lua index 62033ad7..31e70eca 100644 --- a/parts/modes/pc_l.lua +++ b/parts/modes/pc_l.lua @@ -1,35 +1,35 @@ return{ - color=COLOR.red, - env={ - drop=20,lock=60, - fall=20, - dropPiece=function(P)if P.stat.row>=100 then P:win('finish')end end, - freshLimit=15, - ospin=false, - bg='rgb',bgm='moonbeam', - }, - mesDisp=function(P) - setFont(55) - local r=100-P.stat.row - if r<0 then r=0 end - mStr(r,63,220) - PLY.draw.drawTargetLine(P,r) + color=COLOR.red, + env={ + drop=20,lock=60, + fall=20, + dropPiece=function(P)if P.stat.row>=100 then P:win('finish')end end, + freshLimit=15, + ospin=false, + bg='rgb',bgm='moonbeam', + }, + mesDisp=function(P) + setFont(55) + local r=100-P.stat.row + if r<0 then r=0 end + mStr(r,63,220) + PLY.draw.drawTargetLine(P,r) - setFont(60) - mStr(P.stat.pc,63,300) - mText(drawableText.pc,63,370) - end, - score=function(P)return{P.stat.pc,P.stat.time}end, - scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=24 and 5 or - L>=20 and 4 or - L>=16 and 3 or - L>=12 and 2 or - L>=8 and 1 or - L>=1 and 0 - end, + setFont(60) + mStr(P.stat.pc,63,300) + mText(drawableText.pc,63,370) + end, + score=function(P)return{P.stat.pc,P.stat.time}end, + scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=24 and 5 or + L>=20 and 4 or + L>=16 and 3 or + L>=12 and 2 or + L>=8 and 1 or + L>=1 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/pc_n.lua b/parts/modes/pc_n.lua index 8ef6fb95..65934a8a 100644 --- a/parts/modes/pc_n.lua +++ b/parts/modes/pc_n.lua @@ -1,33 +1,33 @@ return{ - color=COLOR.green, - env={ - infHold=true, - drop=150,lock=1e99, - dropPiece=function(P)if P.stat.row>=100 then P:win('finish')end end, - bg='rgb',bgm='truth', - }, - mesDisp=function(P) - setFont(55) - local r=100-P.stat.row - if r<0 then r=0 end - mStr(r,63,220) - PLY.draw.drawTargetLine(P,r) + color=COLOR.green, + env={ + infHold=true, + drop=150,lock=1e99, + dropPiece=function(P)if P.stat.row>=100 then P:win('finish')end end, + bg='rgb',bgm='truth', + }, + mesDisp=function(P) + setFont(55) + local r=100-P.stat.row + if r<0 then r=0 end + mStr(r,63,220) + PLY.draw.drawTargetLine(P,r) - setFont(60) - mStr(P.stat.pc,63,300) - mText(drawableText.pc,63,370) - end, - score=function(P)return{P.stat.pc,P.stat.time}end, - scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=24 and 5 or - L>=20 and 4 or - L>=16 and 3 or - L>=12 and 2 or - L>=8 and 1 or - L>=1 and 0 - end, + setFont(60) + mStr(P.stat.pc,63,300) + mText(drawableText.pc,63,370) + end, + score=function(P)return{P.stat.pc,P.stat.time}end, + scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=24 and 5 or + L>=20 and 4 or + L>=16 and 3 or + L>=12 and 2 or + L>=8 and 1 or + L>=1 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/pctrain_l.lua b/parts/modes/pctrain_l.lua index 30c7913c..a1426023 100644 --- a/parts/modes/pctrain_l.lua +++ b/parts/modes/pctrain_l.lua @@ -5,73 +5,73 @@ local PCbase=require"parts.modes.PCbase" local PClist=require"parts.modes.PClist" local function task_PC(P) - P.control=false - for _=1,26 do YIELD()end - P.control=true - local base=PCbase[P.modeData.type] - P:pushLineList(base[P.holeRND:random(#base)],P.modeData.symmetry) + P.control=false + for _=1,26 do YIELD()end + P.control=true + local base=PCbase[P.modeData.type] + P:pushLineList(base[P.holeRND:random(#base)],P.modeData.symmetry) end local function check(P) - local f=P.field - if #f>0 then - if #f+P.stat.row%4>4 then - P:lose() - end - else - local type=P.stat.pc<10 and 4 or 5 - local L=PClist[type][P.holeRND:random(#PClist[type])] - local symmetry=P.holeRND:random()>.5 - P.modeData.type=type - P.modeData.symmetry=symmetry - P:pushNextList(L,symmetry) - P.modeData.counter=P.stat.piece==0 and 20 or 0 - P:newTask(task_PC) + local f=P.field + if #f>0 then + if #f+P.stat.row%4>4 then + P:lose() + end + else + local type=P.stat.pc<10 and 4 or 5 + local L=PClist[type][P.holeRND:random(#PClist[type])] + local symmetry=P.holeRND:random()>.5 + P.modeData.type=type + P.modeData.symmetry=symmetry + P:pushNextList(L,symmetry) + P.modeData.counter=P.stat.piece==0 and 20 or 0 + P:newTask(task_PC) - local s=P.stat.pc*.25 - if math.floor(s)==s and s>0 then - P.gameEnv.drop=pc_drop[s]or 10 - P.gameEnv.lock=pc_lock[s]or 25 - P.gameEnv.fall=pc_fall[s]or 4 - if s==10 then - P:showTextF(text.maxspeed,0,-140,100,'appear',.6) - end - end - end + local s=P.stat.pc*.25 + if math.floor(s)==s and s>0 then + P.gameEnv.drop=pc_drop[s]or 10 + P.gameEnv.lock=pc_lock[s]or 25 + P.gameEnv.fall=pc_fall[s]or 4 + if s==10 then + P:showTextF(text.maxspeed,0,-140,100,'appear',.6) + end + end + end end return{ - color=COLOR.red, - env={ - nextCount=5, - holdCount=0, - drop=60,lock=60, - fall=20, - sequence='none', - freshLimit=15, - dropPiece=check, - RS="SRS", - bg='rgb',bgm='oxygen', - }, - load=function() - PLY.newPlayer(1) - check(PLAYERS[1]) - end, - mesDisp=function(P) - setFont(60) - mStr(P.stat.pc,63,300) - mText(drawableText.pc,63,370) - end, - score=function(P)return{P.stat.pc,P.stat.time}end, - scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=50 and 5 or - L>=42 and 4 or - L>=26 and 3 or - L>=18 and 2 or - L>=10 and 1 or - L>=3 and 0 - end, + color=COLOR.red, + env={ + nextCount=5, + holdCount=0, + drop=60,lock=60, + fall=20, + sequence='none', + freshLimit=15, + dropPiece=check, + RS="SRS", + bg='rgb',bgm='oxygen', + }, + load=function() + PLY.newPlayer(1) + check(PLAYERS[1]) + end, + mesDisp=function(P) + setFont(60) + mStr(P.stat.pc,63,300) + mText(drawableText.pc,63,370) + end, + score=function(P)return{P.stat.pc,P.stat.time}end, + scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=50 and 5 or + L>=42 and 4 or + L>=26 and 3 or + L>=18 and 2 or + L>=10 and 1 or + L>=3 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/pctrain_n.lua b/parts/modes/pctrain_n.lua index 304cf376..44dfe02c 100644 --- a/parts/modes/pctrain_n.lua +++ b/parts/modes/pctrain_n.lua @@ -1,68 +1,68 @@ local PCbase=require"parts.modes.PCbase" local PClist=require"parts.modes.PClist" local PCtype={ - 1,1,1,1,2, - 1,1,1,1,3, - 1,1,1,2, - 1,2,1,3, - 1,2,3, + 1,1,1,1,2, + 1,1,1,1,3, + 1,1,1,2, + 1,2,1,3, + 1,2,3, } local function task_PC(P) - P.control=false - for _=1,26 do YIELD()end - P.control=true - local base=PCbase[P.modeData.type] - P:pushLineList(base[P.holeRND:random(#base)],P.modeData.symmetry) + P.control=false + for _=1,26 do YIELD()end + P.control=true + local base=PCbase[P.modeData.type] + P:pushLineList(base[P.holeRND:random(#base)],P.modeData.symmetry) end local function check(P) - local r=P.field - if #r>0 then - if #r+P.stat.row%4>4 then - P:lose() - end - else - local type=PCtype[P.stat.pc+1]or 3 - local L=PClist[type][P.holeRND:random(#PClist[type])] - local symmetry=P.holeRND:random()>.5 - P.modeData.type=type - P.modeData.symmetry=symmetry - P:pushNextList(L,symmetry) - P.modeData.counter=P.stat.piece==0 and 20 or 0 - P:newTask(task_PC) - end + local r=P.field + if #r>0 then + if #r+P.stat.row%4>4 then + P:lose() + end + else + local type=PCtype[P.stat.pc+1]or 3 + local L=PClist[type][P.holeRND:random(#PClist[type])] + local symmetry=P.holeRND:random()>.5 + P.modeData.type=type + P.modeData.symmetry=symmetry + P:pushNextList(L,symmetry) + P.modeData.counter=P.stat.piece==0 and 20 or 0 + P:newTask(task_PC) + end end return{ - color=COLOR.green, - env={ - nextCount=4, - holdCount=0, - drop=120,lock=180, - fall=20, - sequence='none', - dropPiece=check, - RS="SRS", - bg='rgb',bgm='oxygen', - }, - load=function() - PLY.newPlayer(1) - check(PLAYERS[1]) - end, - mesDisp=function(P) - setFont(60) - mStr(P.stat.pc,63,300) - mText(drawableText.pc,63,370) - end, - score=function(P)return{P.stat.pc,P.stat.time}end, - scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=62 and 5 or - L>=42 and 4 or - L>=26 and 3 or - L>=18 and 2 or - L>=10 and 1 or - L>=2 and 0 - end, + color=COLOR.green, + env={ + nextCount=4, + holdCount=0, + drop=120,lock=180, + fall=20, + sequence='none', + dropPiece=check, + RS="SRS", + bg='rgb',bgm='oxygen', + }, + load=function() + PLY.newPlayer(1) + check(PLAYERS[1]) + end, + mesDisp=function(P) + setFont(60) + mStr(P.stat.pc,63,300) + mText(drawableText.pc,63,370) + end, + score=function(P)return{P.stat.pc,P.stat.time}end, + scoreDisp=function(D)return D[1].." PCs "..STRING.time(D[2])end, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=62 and 5 or + L>=42 and 4 or + L>=26 and 3 or + L>=18 and 2 or + L>=10 and 1 or + L>=2 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/rhythm_e.lua b/parts/modes/rhythm_e.lua index bd766a9e..cce373ab 100644 --- a/parts/modes/rhythm_e.lua +++ b/parts/modes/rhythm_e.lua @@ -2,73 +2,73 @@ local gc=love.graphics local dropSpeed={[0]=40,33,27,20,16,12,11,10,9,8,7,6,5,4,3,3,2,2,1,1} return{ - color=COLOR.green, - env={ - noTele=true, - lock=1e99, - wait=20,fall=90, - mindas=7,minarr=1,minsdarr=1, - keyCancel={6}, - dropPiece=function(P) - if P.stat.row>=P.modeData.target then - if P.modeData.target==200 then - P:win('finish') - else - P.modeData.bpm=40+2*P.modeData.target/10 - P.modeData.beatFrame=math.floor(3600/P.modeData.bpm) - P.gameEnv.fall=P.modeData.beatFrame - P.gameEnv.wait=math.max(P.gameEnv.wait-2,0) - P.gameEnv.drop=dropSpeed[P.modeData.target/10] - P.modeData.target=P.modeData.target+10 - SFX.play('reach') - end - end - end, - task=function(P) - P.modeData.target=10 - P.modeData.bpm=40 - P.modeData.beatFrame=90 - P.modeData.counter=90 - while true do - YIELD() - P.modeData.counter=P.modeData.counter-1 - if P.modeData.counter==0 then - P.modeData.counter=P.modeData.beatFrame - SFX.play('click',.3) - P:switchKey(6,true) - P:pressKey(6) - P:switchKey(6,false) - end - end - end, - bg='bg2',bgm='push', - }, - slowMark=true, - mesDisp=function(P) - PLY.draw.drawProgress(P.stat.row,P.modeData.target) + color=COLOR.green, + env={ + noTele=true, + lock=1e99, + wait=20,fall=90, + mindas=7,minarr=1,minsdarr=1, + keyCancel={6}, + dropPiece=function(P) + if P.stat.row>=P.modeData.target then + if P.modeData.target==200 then + P:win('finish') + else + P.modeData.bpm=40+2*P.modeData.target/10 + P.modeData.beatFrame=math.floor(3600/P.modeData.bpm) + P.gameEnv.fall=P.modeData.beatFrame + P.gameEnv.wait=math.max(P.gameEnv.wait-2,0) + P.gameEnv.drop=dropSpeed[P.modeData.target/10] + P.modeData.target=P.modeData.target+10 + SFX.play('reach') + end + end + end, + task=function(P) + P.modeData.target=10 + P.modeData.bpm=40 + P.modeData.beatFrame=90 + P.modeData.counter=90 + while true do + YIELD() + P.modeData.counter=P.modeData.counter-1 + if P.modeData.counter==0 then + P.modeData.counter=P.modeData.beatFrame + SFX.play('click',.3) + P:switchKey(6,true) + P:pressKey(6) + P:switchKey(6,false) + end + end + end, + bg='bg2',bgm='push', + }, + slowMark=true, + mesDisp=function(P) + PLY.draw.drawProgress(P.stat.row,P.modeData.target) - setFont(30) - mStr(P.modeData.bpm,63,178) + setFont(30) + mStr(P.modeData.bpm,63,178) - gc.setLineWidth(4) - gc.circle('line',63,200,30) + gc.setLineWidth(4) + gc.circle('line',63,200,30) - local beat=P.modeData.counter/P.modeData.beatFrame - gc.setColor(1,1,1,1-beat) - gc.setLineWidth(3) - gc.circle('line',63,200,30+45*beat) - 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, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=200 and 5 or - L>=170 and 4 or - L>=140 and 3 or - L>=100 and 2 or - L>=50 and 1 or - L>=20 and 0 - end, + local beat=P.modeData.counter/P.modeData.beatFrame + gc.setColor(1,1,1,1-beat) + gc.setLineWidth(3) + gc.circle('line',63,200,30+45*beat) + 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, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=200 and 5 or + L>=170 and 4 or + L>=140 and 3 or + L>=100 and 2 or + L>=50 and 1 or + L>=20 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/rhythm_h.lua b/parts/modes/rhythm_h.lua index 078001b0..1d23afa7 100644 --- a/parts/modes/rhythm_h.lua +++ b/parts/modes/rhythm_h.lua @@ -2,73 +2,73 @@ local gc=love.graphics local dropSpeed={[0]=60,50,40,30,24,18,14,10,8,6,5,4,3,2,1,1,.5,.5,.25,.25} return{ - color=COLOR.magenta, - env={ - noTele=true, - lock=1e99, - wait=10,fall=60, - mindas=7,minarr=1,minsdarr=1, - keyCancel={6}, - dropPiece=function(P) - if P.stat.row>=P.modeData.target then - if P.modeData.target==200 then - P:win('finish') - else - P.modeData.bpm=60+3*P.modeData.target/10 - P.modeData.beatFrame=math.floor(3600/P.modeData.bpm) - P.gameEnv.fall=P.modeData.beatFrame - P.gameEnv.wait=math.max(P.gameEnv.wait-1,0) - P.gameEnv.drop=dropSpeed[P.modeData.target/10] - P.modeData.target=P.modeData.target+10 - SFX.play('reach') - end - end - end, - task=function(P) - P.modeData.target=10 - P.modeData.bpm=60 - P.modeData.beatFrame=60 - P.modeData.counter=60 - while true do - YIELD() - P.modeData.counter=P.modeData.counter-1 - if P.modeData.counter==0 then - P.modeData.counter=P.modeData.beatFrame - SFX.play('click',.3) - P:switchKey(6,true) - P:pressKey(6) - P:switchKey(6,false) - end - end - end, - bg='bg2',bgm='secret8th', - }, - slowMark=true, - mesDisp=function(P) - PLY.draw.drawProgress(P.stat.row,P.modeData.target) + color=COLOR.magenta, + env={ + noTele=true, + lock=1e99, + wait=10,fall=60, + mindas=7,minarr=1,minsdarr=1, + keyCancel={6}, + dropPiece=function(P) + if P.stat.row>=P.modeData.target then + if P.modeData.target==200 then + P:win('finish') + else + P.modeData.bpm=60+3*P.modeData.target/10 + P.modeData.beatFrame=math.floor(3600/P.modeData.bpm) + P.gameEnv.fall=P.modeData.beatFrame + P.gameEnv.wait=math.max(P.gameEnv.wait-1,0) + P.gameEnv.drop=dropSpeed[P.modeData.target/10] + P.modeData.target=P.modeData.target+10 + SFX.play('reach') + end + end + end, + task=function(P) + P.modeData.target=10 + P.modeData.bpm=60 + P.modeData.beatFrame=60 + P.modeData.counter=60 + while true do + YIELD() + P.modeData.counter=P.modeData.counter-1 + if P.modeData.counter==0 then + P.modeData.counter=P.modeData.beatFrame + SFX.play('click',.3) + P:switchKey(6,true) + P:pressKey(6) + P:switchKey(6,false) + end + end + end, + bg='bg2',bgm='secret8th', + }, + slowMark=true, + mesDisp=function(P) + PLY.draw.drawProgress(P.stat.row,P.modeData.target) - setFont(30) - mStr(P.modeData.bpm,63,178) + setFont(30) + mStr(P.modeData.bpm,63,178) - gc.setLineWidth(4) - gc.circle('line',63,200,30) + gc.setLineWidth(4) + gc.circle('line',63,200,30) - local beat=P.modeData.counter/P.modeData.beatFrame - gc.setColor(1,1,1,1-beat) - gc.setLineWidth(3) - gc.circle('line',63,200,30+45*beat) - 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, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=200 and 5 or - L>=170 and 4 or - L>=140 and 3 or - L>=100 and 2 or - L>=50 and 1 or - L>=20 and 0 - end, + local beat=P.modeData.counter/P.modeData.beatFrame + gc.setColor(1,1,1,1-beat) + gc.setLineWidth(3) + gc.circle('line',63,200,30+45*beat) + 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, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=200 and 5 or + L>=170 and 4 or + L>=140 and 3 or + L>=100 and 2 or + L>=50 and 1 or + L>=20 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/rhythm_u.lua b/parts/modes/rhythm_u.lua index eae0ae3d..1834a404 100644 --- a/parts/modes/rhythm_u.lua +++ b/parts/modes/rhythm_u.lua @@ -1,80 +1,80 @@ local gc=love.graphics return{ - color=COLOR.magenta, - env={ - noTele=true, - lock=1e99, - drop=.5, - wait=5,fall=30, - das=6,minarr=1,minsdarr=1, - keyCancel={6}, - dropPiece=function(P) - if P.stat.row>=P.modeData.target then - if P.modeData.target==200 then - P:win('finish') - else - P.modeData.bpm=120+2*P.modeData.target/10 - P.modeData.beatFrame=math.floor(3600/P.modeData.bpm) - P.gameEnv.fall=P.modeData.beatFrame - P.gameEnv.wait=math.max(P.gameEnv.wait-1,0) - if P.modeData.target==50 then - P.gameEnv.das=5 - P.gameEnv.drop=.25 - elseif P.modeData.target==100 then - P.gameEnv.das=4 - P:set20G(true) - end - P.modeData.target=P.modeData.target+10 - SFX.play('reach') - end - end - end, - task=function(P) - P.modeData.target=10 - P.modeData.bpm=120 - P.modeData.beatFrame=30 - P.modeData.counter=30 - while true do - YIELD() - P.modeData.counter=P.modeData.counter-1 - if P.modeData.counter==0 then - P.modeData.counter=P.modeData.beatFrame - SFX.play('click',.3) - P:switchKey(6,true) - P:pressKey(6) - P:switchKey(6,false) - end - end - end, - bg='bg2',bgm='secret7th', - }, - slowMark=true, - mesDisp=function(P) - PLY.draw.drawProgress(P.stat.row,P.modeData.target) + color=COLOR.magenta, + env={ + noTele=true, + lock=1e99, + drop=.5, + wait=5,fall=30, + das=6,minarr=1,minsdarr=1, + keyCancel={6}, + dropPiece=function(P) + if P.stat.row>=P.modeData.target then + if P.modeData.target==200 then + P:win('finish') + else + P.modeData.bpm=120+2*P.modeData.target/10 + P.modeData.beatFrame=math.floor(3600/P.modeData.bpm) + P.gameEnv.fall=P.modeData.beatFrame + P.gameEnv.wait=math.max(P.gameEnv.wait-1,0) + if P.modeData.target==50 then + P.gameEnv.das=5 + P.gameEnv.drop=.25 + elseif P.modeData.target==100 then + P.gameEnv.das=4 + P:set20G(true) + end + P.modeData.target=P.modeData.target+10 + SFX.play('reach') + end + end + end, + task=function(P) + P.modeData.target=10 + P.modeData.bpm=120 + P.modeData.beatFrame=30 + P.modeData.counter=30 + while true do + YIELD() + P.modeData.counter=P.modeData.counter-1 + if P.modeData.counter==0 then + P.modeData.counter=P.modeData.beatFrame + SFX.play('click',.3) + P:switchKey(6,true) + P:pressKey(6) + P:switchKey(6,false) + end + end + end, + bg='bg2',bgm='secret7th', + }, + slowMark=true, + mesDisp=function(P) + PLY.draw.drawProgress(P.stat.row,P.modeData.target) - setFont(30) - mStr(P.modeData.bpm,63,178) + setFont(30) + mStr(P.modeData.bpm,63,178) - gc.setLineWidth(4) - gc.circle('line',63,200,30) + gc.setLineWidth(4) + gc.circle('line',63,200,30) - local beat=P.modeData.counter/P.modeData.beatFrame - gc.setColor(1,1,1,1-beat) - gc.setLineWidth(3) - gc.circle('line',63,200,30+45*beat) - 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, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=200 and 5 or - L>=170 and 4 or - L>=140 and 3 or - L>=100 and 2 or - L>=50 and 1 or - L>=20 and 0 - end, + local beat=P.modeData.counter/P.modeData.beatFrame + gc.setColor(1,1,1,1-beat) + gc.setLineWidth(3) + gc.circle('line',63,200,30+45*beat) + 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, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=200 and 5 or + L>=170 and 4 or + L>=140 and 3 or + L>=100 and 2 or + L>=50 and 1 or + L>=20 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/round_e.lua b/parts/modes/round_e.lua index dcfb9f63..1a9e6162 100644 --- a/parts/modes/round_e.lua +++ b/parts/modes/round_e.lua @@ -1,42 +1,42 @@ local function update_round(P) - if P.stat.piece%7==0 and #PLY_ALIVE>1 then - P.control=false - local ID=P.id - repeat - ID=ID+1 - if not PLAYERS[ID]then ID=1 end - until PLAYERS[ID].alive or ID==P.id - PLAYERS[ID].control=true - end + if P.stat.piece%7==0 and #PLY_ALIVE>1 then + P.control=false + local ID=P.id + repeat + ID=ID+1 + if not PLAYERS[ID]then ID=1 end + until PLAYERS[ID].alive or ID==P.id + PLAYERS[ID].control=true + end end return{ - color=COLOR.cyan, - env={ - life=1, - drop=300,lock=300, - infHold=true, - dropPiece=update_round, - pushSpeed=15, - garbageSpeed=1e99, - bg='rainbow',bgm='push', - }, - load=function() - PLY.newPlayer(1) - PLY.newAIPlayer(2,BOT.template{type='CC',speedLV=8,next=1,hold=true,node=8000}) - end, - score=function(P)return{P.stat.piece,P.stat.time}end, - scoreDisp=function(D)return D[1].." Pieces "..STRING.time(D[2])end, - comp=function(a,b)return a[1]1 then - P.control=false - local ID=P.id - repeat - ID=ID+1 - if not PLAYERS[ID]then ID=1 end - until PLAYERS[ID].alive or ID==P.id - PLAYERS[ID].control=true - end + if P.stat.piece%7==0 and #PLY_ALIVE>1 then + P.control=false + local ID=P.id + repeat + ID=ID+1 + if not PLAYERS[ID]then ID=1 end + until PLAYERS[ID].alive or ID==P.id + PLAYERS[ID].control=true + end end return{ - color=COLOR.magenta, - env={ - life=1, - drop=300,lock=300, - infHold=true, - dropPiece=update_round, - pushSpeed=15, - garbageSpeed=1e99, - bg='rainbow',bgm='push', - }, - load=function() - PLY.newPlayer(1) - PLY.newAIPlayer(2,BOT.template{type='CC',speedLV=8,next=2,hold=true,node=16000}) - end, - score=function(P)return{P.stat.piece,P.stat.time}end, - scoreDisp=function(D)return D[1].." Pieces "..STRING.time(D[2])end, - comp=function(a,b)return a[1]1 then - P.control=false - local ID=P.id - repeat - ID=ID+1 - if not PLAYERS[ID]then ID=1 end - until PLAYERS[ID].alive or ID==P.id - PLAYERS[ID].control=true - end + if P.stat.piece%7==0 and #PLY_ALIVE>1 then + P.control=false + local ID=P.id + repeat + ID=ID+1 + if not PLAYERS[ID]then ID=1 end + until PLAYERS[ID].alive or ID==P.id + PLAYERS[ID].control=true + end end return{ - color=COLOR.red, - env={ - life=1, - drop=300,lock=300, - infHold=true, - dropPiece=update_round, - pushSpeed=15, - garbageSpeed=1e99, - bg='rainbow',bgm='push', - }, - load=function() - PLY.newPlayer(1) - PLY.newAIPlayer(2,BOT.template{type='CC',speedLV=8,next=3,hold=true,node=26000}) - end, - score=function(P)return{P.stat.piece,P.stat.time}end, - scoreDisp=function(D)return D[1].." Pieces "..STRING.time(D[2])end, - comp=function(a,b)return a[1]1 then - P.control=false - local ID=P.id - repeat - ID=ID+1 - if not PLAYERS[ID]then ID=1 end - until PLAYERS[ID].alive or ID==P.id - PLAYERS[ID].control=true - end + if P.stat.piece%7==0 and #PLY_ALIVE>1 then + P.control=false + local ID=P.id + repeat + ID=ID+1 + if not PLAYERS[ID]then ID=1 end + until PLAYERS[ID].alive or ID==P.id + PLAYERS[ID].control=true + end end return{ - color=COLOR.green, - env={ - life=1, - drop=300,lock=300, - infHold=true, - dropPiece=update_round, - pushSpeed=15, - garbageSpeed=1e99, - bg='rainbow',bgm='push', - }, - load=function() - PLY.newPlayer(1) - PLY.newAIPlayer(2,BOT.template{type='CC',speedLV=8,next=1,hold=true,node=13000}) - end, - score=function(P)return{P.stat.piece,P.stat.time}end, - scoreDisp=function(D)return D[1].." Pieces "..STRING.time(D[2])end, - comp=function(a,b)return a[1]1 then - P.control=false - local ID=P.id - repeat - ID=ID+1 - if not PLAYERS[ID]then ID=1 end - until PLAYERS[ID].alive or ID==P.id - PLAYERS[ID].control=true - end + if P.stat.piece%7==0 and #PLY_ALIVE>1 then + P.control=false + local ID=P.id + repeat + ID=ID+1 + if not PLAYERS[ID]then ID=1 end + until PLAYERS[ID].alive or ID==P.id + PLAYERS[ID].control=true + end end return{ - color=COLOR.lYellow, - env={ - life=1, - drop=300,lock=300, - infHold=true, - dropPiece=update_round, - pushSpeed=15, - garbageSpeed=1e99, - bg='rainbow',bgm='push', - }, - load=function() - PLY.newPlayer(1) - PLY.newAIPlayer(2,BOT.template{type='CC',speedLV=8,next=4,hold=true,node=40000}) - end, - score=function(P)return{P.stat.piece,P.stat.time}end, - scoreDisp=function(D)return D[1].." Pieces "..STRING.time(D[2])end, - comp=function(a,b)return a[1]=100 then P:win('finish')end end, - bg='matrix',bgm='new era', - }, - mesDisp=function(P) - setFont(45) - mStr(("%.1f"):format(P.stat.atk),63,190) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) - mText(drawableText.atk,63,243) - mText(drawableText.eff,63,363) - end, - score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}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]=100 then P:win('finish')end end, + bg='matrix',bgm='new era', + }, + mesDisp=function(P) + setFont(45) + mStr(("%.1f"):format(P.stat.atk),63,190) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) + mText(drawableText.atk,63,243) + mText(drawableText.eff,63,363) + end, + score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}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]=40 then P:win('finish')end end, - bg='aura',bgm='waterfall', - }, - mesDisp=function(P) - setFont(55) - local r=40-P.stat.row - if r<0 then r=0 end - mStr(r,63,265) - PLY.draw.drawTargetLine(P,r) - end, - getRank=function(P) - local L=P.stat.row - if L<40 then - return - L>25 and 2 or - L>10 and 1 or - L>5 and 0 - end - local T=P.stat.time - return - T<=260 and 5 or - T<=420 and 4 or - 3 - end, + color=COLOR.green, + env={ + drop=60,lock=180, + noTele=true, + keyCancel={1,2}, + dropPiece=function(P)if P.stat.row>=40 then P:win('finish')end end, + bg='aura',bgm='waterfall', + }, + mesDisp=function(P) + setFont(55) + local r=40-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) + end, + getRank=function(P) + local L=P.stat.row + if L<40 then + return + L>25 and 2 or + L>10 and 1 or + L>5 and 0 + end + local T=P.stat.time + return + T<=260 and 5 or + T<=420 and 4 or + 3 + end, } \ No newline at end of file diff --git a/parts/modes/sprintLock.lua b/parts/modes/sprintLock.lua index f9142fb8..3aec710b 100644 --- a/parts/modes/sprintLock.lua +++ b/parts/modes/sprintLock.lua @@ -1,30 +1,30 @@ return{ - color=COLOR.green, - env={ - drop=60,lock=180, - keyCancel={3,4,5}, - dropPiece=function(P)if P.stat.row>=40 then P:win('finish')end end, - bg='aura',bgm='waterfall', - }, - mesDisp=function(P) - setFont(55) - local r=40-P.stat.row - if r<0 then r=0 end - mStr(r,63,265) - PLY.draw.drawTargetLine(P,r) - end, - getRank=function(P) - local L=P.stat.row - if L<40 then - return - L>25 and 2 or - L>10 and 1 or - L>2 and 0 - end - local T=P.stat.time - return - T<=60 and 5 or - T<=100 and 4 or - 3 - end, + color=COLOR.green, + env={ + drop=60,lock=180, + keyCancel={3,4,5}, + dropPiece=function(P)if P.stat.row>=40 then P:win('finish')end end, + bg='aura',bgm='waterfall', + }, + mesDisp=function(P) + setFont(55) + local r=40-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) + end, + getRank=function(P) + local L=P.stat.row + if L<40 then + return + L>25 and 2 or + L>10 and 1 or + L>2 and 0 + end + local T=P.stat.time + return + T<=60 and 5 or + T<=100 and 4 or + 3 + end, } \ No newline at end of file diff --git a/parts/modes/sprintMPH.lua b/parts/modes/sprintMPH.lua index 1c1ee4aa..687d0841 100644 --- a/parts/modes/sprintMPH.lua +++ b/parts/modes/sprintMPH.lua @@ -1,31 +1,31 @@ return{ - color=COLOR.green, - env={ - drop=60,lock=60, - nextCount=0,holdCount=0, - sequence='rnd', - dropPiece=function(P)if P.stat.row>=40 then P:win('finish')end end, - bg='aura',bgm='waterfall', - }, - mesDisp=function(P) - setFont(55) - local r=40-P.stat.row - if r<0 then r=0 end - mStr(r,63,265) - PLY.draw.drawTargetLine(P,r) - end, - score=function(P)return{P.stat.time,P.stat.piece}end, - scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, - comp=function(a,b)return a[1]=40 then P:win('finish')end end, + bg='aura',bgm='waterfall', + }, + mesDisp=function(P) + setFont(55) + local r=40-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) + end, + score=function(P)return{P.stat.time,P.stat.piece}end, + scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, + comp=function(a,b)return a[1]=40 then P:win('finish')end end, - bg='aura',bgm='beat5th', - }, - mesDisp=function(P) - setFont(55) - local r=40-P.stat.row - if r<0 then r=0 end - mStr(r,63,265) - PLY.draw.drawTargetLine(P,r) - end, - score=function(P)return{P.stat.time,P.stat.piece}end, - scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, - comp=function(a,b)return a[1]=40 then P:win('finish')end end, + bg='aura',bgm='beat5th', + }, + mesDisp=function(P) + setFont(55) + local r=40-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) + end, + score=function(P)return{P.stat.time,P.stat.piece}end, + scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, + comp=function(a,b)return a[1]=40 then P:win('finish')end end, - bg='aura',bgm='waterfall', - }, - mesDisp=function(P) - setFont(55) - local r=40-P.stat.row - if r<0 then r=0 end - mStr(r,63,265) - PLY.draw.drawTargetLine(P,r) - end, - getRank=function(P) - if P.stat.row<40 then return end - local T=P.stat.time - return - T<=30 and 5 or - T<=45 and 4 or - T<=60 and 3 or - T<=90 and 2 or - T<=150 and 1 or - 0 - end, + color=COLOR.green, + env={ + drop=0,lock=120, + nextCount=3, + das=0,arr=0, + dropPiece=function(P)if P.stat.row>=40 then P:win('finish')end end, + bg='aura',bgm='waterfall', + }, + mesDisp=function(P) + setFont(55) + local r=40-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) + end, + getRank=function(P) + if P.stat.row<40 then return end + local T=P.stat.time + return + T<=30 and 5 or + T<=45 and 4 or + T<=60 and 3 or + T<=90 and 2 or + T<=150 and 1 or + 0 + end, } \ No newline at end of file diff --git a/parts/modes/sprint_1000l.lua b/parts/modes/sprint_1000l.lua index b75d3df3..ca708453 100644 --- a/parts/modes/sprint_1000l.lua +++ b/parts/modes/sprint_1000l.lua @@ -1,29 +1,29 @@ return{ - color=COLOR.lGray, - env={ - drop=60,lock=60, - dropPiece=function(P)if P.stat.row>=1000 then P:win('finish')end end, - bg='rainbow',bgm='push', - }, - mesDisp=function(P) - setFont(55) - local r=1000-P.stat.row - if r<0 then r=0 end - mStr(r,63,265) - PLY.draw.drawTargetLine(P,r) - end, - score=function(P)return{P.stat.time,P.stat.piece}end, - scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, - comp=function(a,b)return a[1]=1000 then P:win('finish')end end, + bg='rainbow',bgm='push', + }, + mesDisp=function(P) + setFont(55) + local r=1000-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) + end, + score=function(P)return{P.stat.time,P.stat.piece}end, + scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, + comp=function(a,b)return a[1]=100 then P:win('finish')end end, - bg='bg2',bgm='race', - }, - mesDisp=function(P) - setFont(55) - local r=100-P.stat.row - if r<0 then r=0 end - mStr(r,63,265) - PLY.draw.drawTargetLine(P,r) - end, - score=function(P)return{P.stat.time,P.stat.piece}end, - scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, - comp=function(a,b)return a[1]=100 then P:win('finish')end end, + bg='bg2',bgm='race', + }, + mesDisp=function(P) + setFont(55) + local r=100-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) + end, + score=function(P)return{P.stat.time,P.stat.piece}end, + scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, + comp=function(a,b)return a[1]=10 then P:win('finish')end end, - bg='bg2',bgm='race', - }, - mesDisp=function(P) - setFont(55) - local r=10-P.stat.row - if r<0 then r=0 end - mStr(r,63,265) - PLY.draw.drawTargetLine(P,r) - end, - score=function(P)return{P.stat.time,P.stat.piece}end, - scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, - comp=function(a,b)return a[1]=10 then P:win('finish')end end, + bg='bg2',bgm='race', + }, + mesDisp=function(P) + setFont(55) + local r=10-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) + end, + score=function(P)return{P.stat.time,P.stat.piece}end, + scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, + comp=function(a,b)return a[1]=20 then P:win('finish')end end, - bg='bg2',bgm='race', - }, - mesDisp=function(P) - setFont(55) - local r=20-P.stat.row - if r<0 then r=0 end - mStr(r,63,265) - PLY.draw.drawTargetLine(P,r) - end, - score=function(P)return{P.stat.time,P.stat.piece}end, - scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, - comp=function(a,b)return a[1]=20 then P:win('finish')end end, + bg='bg2',bgm='race', + }, + mesDisp=function(P) + setFont(55) + local r=20-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) + end, + score=function(P)return{P.stat.time,P.stat.piece}end, + scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, + comp=function(a,b)return a[1]=400 then P:win('finish')end end, - bg='rainbow',bgm='push', - }, - mesDisp=function(P) - setFont(55) - local r=400-P.stat.row - if r<0 then r=0 end - mStr(r,63,265) - PLY.draw.drawTargetLine(P,r) - end, - score=function(P)return{P.stat.time,P.stat.piece}end, - scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, - comp=function(a,b)return a[1]=400 then P:win('finish')end end, + bg='rainbow',bgm='push', + }, + mesDisp=function(P) + setFont(55) + local r=400-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) + end, + score=function(P)return{P.stat.time,P.stat.piece}end, + scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, + comp=function(a,b)return a[1]=40 then P:win('finish')end end, - bg='bg2',bgm='race', - }, - mesDisp=function(P) - setFont(55) - local r=40-P.stat.row - if r<0 then r=0 end - mStr(r,63,265) - PLY.draw.drawTargetLine(P,r) - end, - score=function(P)return{P.stat.time,P.stat.piece}end, - scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, - comp=function(a,b)return a[1]=40 then P:win('finish')end end, + bg='bg2',bgm='race', + }, + mesDisp=function(P) + setFont(55) + local r=40-P.stat.row + if r<0 then r=0 end + mStr(r,63,265) + PLY.draw.drawTargetLine(P,r) + end, + score=function(P)return{P.stat.time,P.stat.piece}end, + scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end, + comp=function(a,b)return a[1]=math.max(60,150-2*D.wave)and P.atkBufferSum<4 then - table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=1,countdown=30,cd0=30,time=0,sent=false,lv=1}) - P.atkBufferSum=P.atkBufferSum+1 - P.stat.recv=P.stat.recv+1 - if D.wave==45 then P:showTextF(text.maxspeed,0,-140,100,'appear',.6)end - D.timer=0 - D.wave=D.wave+1 - end - end - end - end, - bg='glow',bgm='new era', - }, - mesDisp=function(P) - setFont(60) - mStr(P.modeData.wave,63,310) - mText(drawableText.wave,63,375) - end, - score=function(P)return{P.modeData.wave,P.stat.time}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]=100 and 5 or - W>=60 and 4 or - W>=45 and 3 or - W>=30 and 2 or - W>=15 and 1 or - W>=5 and 0 - end, + color=COLOR.cyan, + env={ + drop=30,lock=45, + freshLimit=10, + task=function(P) + while true do + YIELD() + if P.control then + local D=P.modeData + D.timer=D.timer+1 + if D.timer>=math.max(60,150-2*D.wave)and P.atkBufferSum<4 then + table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=1,countdown=30,cd0=30,time=0,sent=false,lv=1}) + P.atkBufferSum=P.atkBufferSum+1 + P.stat.recv=P.stat.recv+1 + if D.wave==45 then P:showTextF(text.maxspeed,0,-140,100,'appear',.6)end + D.timer=0 + D.wave=D.wave+1 + end + end + end + end, + bg='glow',bgm='new era', + }, + mesDisp=function(P) + setFont(60) + mStr(P.modeData.wave,63,310) + mText(drawableText.wave,63,375) + end, + score=function(P)return{P.modeData.wave,P.stat.time}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]=100 and 5 or + W>=60 and 4 or + W>=45 and 3 or + W>=30 and 2 or + W>=15 and 1 or + W>=5 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/survivor_h.lua b/parts/modes/survivor_h.lua index 867c5809..4d152e27 100644 --- a/parts/modes/survivor_h.lua +++ b/parts/modes/survivor_h.lua @@ -1,50 +1,50 @@ return{ - color=COLOR.magenta, - env={ - drop=30,lock=60, - freshLimit=5, - task=function(P) - while true do - YIELD() - if P.control then - local D=P.modeData - D.timer=D.timer+1 - if D.timer>=math.max(60,180-2*D.wave)and P.atkBufferSum<15 then - local s - if D.wave%3<2 then - table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=1,countdown=0,cd0=0,time=0,sent=false,lv=1}) - s=1 - else - table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=3,countdown=60,cd0=60,time=0,sent=false,lv=2}) - s=3 - end - P.atkBufferSum=P.atkBufferSum+s - P.stat.recv=P.stat.recv+s - if D.wave==60 then P:showTextF(text.maxspeed,0,-140,100,'appear',.6)end - D.timer=0 - D.wave=D.wave+1 - end - end - end - end, - bg='glow',bgm='new era', - }, - mesDisp=function(P) - setFont(60) - mStr(P.modeData.wave,63,310) - mText(drawableText.wave,63,375) - end, - score=function(P)return{P.modeData.wave,P.stat.time}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]=90 and 5 or - W>=60 and 4 or - W>=45 and 3 or - W>=30 and 2 or - W>=15 and 1 or - W>=5 and 0 - end, + color=COLOR.magenta, + env={ + drop=30,lock=60, + freshLimit=5, + task=function(P) + while true do + YIELD() + if P.control then + local D=P.modeData + D.timer=D.timer+1 + if D.timer>=math.max(60,180-2*D.wave)and P.atkBufferSum<15 then + local s + if D.wave%3<2 then + table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=1,countdown=0,cd0=0,time=0,sent=false,lv=1}) + s=1 + else + table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=3,countdown=60,cd0=60,time=0,sent=false,lv=2}) + s=3 + end + P.atkBufferSum=P.atkBufferSum+s + P.stat.recv=P.stat.recv+s + if D.wave==60 then P:showTextF(text.maxspeed,0,-140,100,'appear',.6)end + D.timer=0 + D.wave=D.wave+1 + end + end + end + end, + bg='glow',bgm='new era', + }, + mesDisp=function(P) + setFont(60) + mStr(P.modeData.wave,63,310) + mText(drawableText.wave,63,375) + end, + score=function(P)return{P.modeData.wave,P.stat.time}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]=90 and 5 or + W>=60 and 4 or + W>=45 and 3 or + W>=30 and 2 or + W>=15 and 1 or + W>=5 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/survivor_l.lua b/parts/modes/survivor_l.lua index e3fabf07..e02ff5ea 100644 --- a/parts/modes/survivor_l.lua +++ b/parts/modes/survivor_l.lua @@ -1,44 +1,44 @@ return{ - color=COLOR.red, - env={ - drop=30,lock=60, - freshLimit=5, - task=function(P) - while true do - YIELD() - if P.control then - local D=P.modeData - D.timer=D.timer+1 - if D.timer>=math.max(60,150-D.wave)and P.atkBufferSum<20 then - local t=math.max(60,90-D.wave) - table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3}) - P.atkBufferSum=P.atkBufferSum+4 - P.stat.recv=P.stat.recv+4 - if D.wave==60 then P:showTextF(text.maxspeed,0,-140,100,'appear',.6)end - D.timer=0 - D.wave=D.wave+1 - end - end - end - end, - bg='glow',bgm='here', - }, - mesDisp=function(P) - setFont(60) - mStr(P.modeData.wave,63,310) - mText(drawableText.wave,63,375) - end, - score=function(P)return{P.modeData.wave,P.stat.time}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]=110 and 5 or - W>=80 and 4 or - W>=55 and 3 or - W>=30 and 2 or - W>=15 and 1 or - W>=5 and 0 - end, + color=COLOR.red, + env={ + drop=30,lock=60, + freshLimit=5, + task=function(P) + while true do + YIELD() + if P.control then + local D=P.modeData + D.timer=D.timer+1 + if D.timer>=math.max(60,150-D.wave)and P.atkBufferSum<20 then + local t=math.max(60,90-D.wave) + table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3}) + P.atkBufferSum=P.atkBufferSum+4 + P.stat.recv=P.stat.recv+4 + if D.wave==60 then P:showTextF(text.maxspeed,0,-140,100,'appear',.6)end + D.timer=0 + D.wave=D.wave+1 + end + end + end + end, + bg='glow',bgm='here', + }, + mesDisp=function(P) + setFont(60) + mStr(P.modeData.wave,63,310) + mText(drawableText.wave,63,375) + end, + score=function(P)return{P.modeData.wave,P.stat.time}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]=110 and 5 or + W>=80 and 4 or + W>=55 and 3 or + W>=30 and 2 or + W>=15 and 1 or + W>=5 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/survivor_n.lua b/parts/modes/survivor_n.lua index 55706983..1b535246 100644 --- a/parts/modes/survivor_n.lua +++ b/parts/modes/survivor_n.lua @@ -1,49 +1,49 @@ return{ - color=COLOR.green, - env={ - drop=30,lock=60, - freshLimit=10, - task=function(P) - while true do - YIELD() - if P.control then - local D=P.modeData - D.timer=D.timer+1 - if D.timer>=math.max(90,180-2*D.wave)and P.atkBufferSum<8 then - local d=D.wave+1 - 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==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==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.stat.recv=P.stat.recv+d%4+1 - if D.wave==45 then P:showTextF(text.maxspeed,0,-140,100,'appear',.6)end - D.timer=0 - D.wave=d - end - end - end - end, - bg='glow',bgm='new era', - }, - mesDisp=function(P) - setFont(60) - mStr(P.modeData.wave,63,310) - mText(drawableText.wave,63,375) - end, - score=function(P)return{P.modeData.wave,P.stat.time}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]=80 and 5 or - W>=55 and 4 or - W>=45 and 3 or - W>=30 and 2 or - W>=15 and 1 or - W>=5 and 0 - end, + color=COLOR.green, + env={ + drop=30,lock=60, + freshLimit=10, + task=function(P) + while true do + YIELD() + if P.control then + local D=P.modeData + D.timer=D.timer+1 + if D.timer>=math.max(90,180-2*D.wave)and P.atkBufferSum<8 then + local d=D.wave+1 + 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==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==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.stat.recv=P.stat.recv+d%4+1 + if D.wave==45 then P:showTextF(text.maxspeed,0,-140,100,'appear',.6)end + D.timer=0 + D.wave=d + end + end + end + end, + bg='glow',bgm='new era', + }, + mesDisp=function(P) + setFont(60) + mStr(P.modeData.wave,63,310) + mText(drawableText.wave,63,375) + end, + score=function(P)return{P.modeData.wave,P.stat.time}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]=80 and 5 or + W>=55 and 4 or + W>=45 and 3 or + W>=30 and 2 or + W>=15 and 1 or + W>=5 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/survivor_u.lua b/parts/modes/survivor_u.lua index 8517125a..1ba40111 100644 --- a/parts/modes/survivor_u.lua +++ b/parts/modes/survivor_u.lua @@ -1,49 +1,49 @@ return{ - color=COLOR.lYellow, - env={ - drop=5,lock=60, - fall=10, - freshLimit=15, - pushSpeed=2, - task=function(P) - while true do - YIELD() - if P.control then - local D=P.modeData - D.timer=D.timer+1 - if D.timer>=math.max(300,600-10*D.wave)and P.atkBufferSum<20 then - local t=math.max(300,480-12*D.wave) - table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=2}) - table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3}) - table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=6,countdown=1.2*t,cd0=1.2*t,time=0,sent=false,lv=4}) - table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=6,countdown=1.5*t,cd0=1.5*t,time=0,sent=false,lv=5}) - P.atkBufferSum=P.atkBufferSum+20 - P.stat.recv=P.stat.recv+20 - if D.wave==31 then P:showTextF(text.maxspeed,0,-140,100,'appear',.6)end - D.timer=0 - D.wave=D.wave+1 - end - end - end - end, - bg='welcome',bgm='here', - }, - mesDisp=function(P) - setFont(60) - mStr(P.modeData.wave,63,310) - mText(drawableText.wave,63,375) - end, - score=function(P)return{P.modeData.wave,P.stat.time}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]=35 and 5 or - W>=26 and 4 or - W>=20 and 3 or - W>=10 and 2 or - W>=5 and 1 or - W>=1 and 0 - end, + color=COLOR.lYellow, + env={ + drop=5,lock=60, + fall=10, + freshLimit=15, + pushSpeed=2, + task=function(P) + while true do + YIELD() + if P.control then + local D=P.modeData + D.timer=D.timer+1 + if D.timer>=math.max(300,600-10*D.wave)and P.atkBufferSum<20 then + local t=math.max(300,480-12*D.wave) + table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=2}) + table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3}) + table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=6,countdown=1.2*t,cd0=1.2*t,time=0,sent=false,lv=4}) + table.insert(P.atkBuffer,{line=generateLine(P.holeRND:random(10)),amount=6,countdown=1.5*t,cd0=1.5*t,time=0,sent=false,lv=5}) + P.atkBufferSum=P.atkBufferSum+20 + P.stat.recv=P.stat.recv+20 + if D.wave==31 then P:showTextF(text.maxspeed,0,-140,100,'appear',.6)end + D.timer=0 + D.wave=D.wave+1 + end + end + end + end, + bg='welcome',bgm='here', + }, + mesDisp=function(P) + setFont(60) + mStr(P.modeData.wave,63,310) + mText(drawableText.wave,63,375) + end, + score=function(P)return{P.modeData.wave,P.stat.time}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]=35 and 5 or + W>=26 and 4 or + W>=20 and 3 or + W>=10 and 2 or + W>=5 and 1 or + W>=1 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/tech_finesse.lua b/parts/modes/tech_finesse.lua index 57f918af..7a801be1 100644 --- a/parts/modes/tech_finesse.lua +++ b/parts/modes/tech_finesse.lua @@ -1,37 +1,37 @@ return{ - color=COLOR.lYellow, - env={ - arr=0, - drop=1e99,lock=60, - freshLimit=15, - dropPiece=function(P)if P.stat.atk>=100 then P:win('finish')end end, - fineKill=true, - bg='flink',bgm='infinite', - }, - slowMark=true, - mesDisp=function(P) - setFont(45) - mStr(("%.1f"):format(P.stat.atk),63,190) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) - mText(drawableText.atk,63,243) - mText(drawableText.eff,63,363) - end, - score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}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]=100 then - local T=P.stat.time - return - T<50 and 5 or - T<70 and 4 or - T<100 and 3 or - 2 - else - return - A>=60 and 1 or - A>=30 and 0 - end - end, + color=COLOR.lYellow, + env={ + arr=0, + drop=1e99,lock=60, + freshLimit=15, + dropPiece=function(P)if P.stat.atk>=100 then P:win('finish')end end, + fineKill=true, + bg='flink',bgm='infinite', + }, + slowMark=true, + mesDisp=function(P) + setFont(45) + mStr(("%.1f"):format(P.stat.atk),63,190) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) + mText(drawableText.atk,63,243) + mText(drawableText.eff,63,363) + end, + score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}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]=100 then + local T=P.stat.time + return + T<50 and 5 or + T<70 and 4 or + T<100 and 3 or + 2 + else + return + A>=60 and 1 or + A>=30 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/tech_finesse_f.lua b/parts/modes/tech_finesse_f.lua index 9c3cc051..abe9c491 100644 --- a/parts/modes/tech_finesse_f.lua +++ b/parts/modes/tech_finesse_f.lua @@ -1,50 +1,50 @@ local function tech_check_hard(P) - local C=P.lastPiece - if C.row>0 then - if not C.special then - P:lose() - return - end - end - if P.stat.atk>=100 then - P:win('finish') - end + local C=P.lastPiece + if C.row>0 then + if not C.special then + P:lose() + return + end + end + if P.stat.atk>=100 then + P:win('finish') + end end return{ - color=COLOR.gray, - env={ - arr=0, - drop=1e99,lock=60, - freshLimit=15, - fineKill=true, - dropPiece=tech_check_hard, - bg='flink',bgm='infinite', - }, - slowMark=true, - mesDisp=function(P) - setFont(45) - mStr(("%.1f"):format(P.stat.atk),63,190) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) - mText(drawableText.atk,63,243) - mText(drawableText.eff,63,363) - end, - score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}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]=100 then - local T=P.stat.time - return - T<50 and 5 or - T<70 and 4 or - T<100 and 3 or - 2 - else - return - A>=60 and 1 or - A>=30 and 0 - end - end, + color=COLOR.gray, + env={ + arr=0, + drop=1e99,lock=60, + freshLimit=15, + fineKill=true, + dropPiece=tech_check_hard, + bg='flink',bgm='infinite', + }, + slowMark=true, + mesDisp=function(P) + setFont(45) + mStr(("%.1f"):format(P.stat.atk),63,190) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) + mText(drawableText.atk,63,243) + mText(drawableText.eff,63,363) + end, + score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}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]=100 then + local T=P.stat.time + return + T<50 and 5 or + T<70 and 4 or + T<100 and 3 or + 2 + else + return + A>=60 and 1 or + A>=30 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/tech_h.lua b/parts/modes/tech_h.lua index ceaefb21..491cd955 100644 --- a/parts/modes/tech_h.lua +++ b/parts/modes/tech_h.lua @@ -1,35 +1,35 @@ return{ - color=COLOR.magenta, - env={ - drop=20,lock=60, - freshLimit=15, - b2bKill=true, - dropPiece=function(P)if P.stat.atk>=100 then P:win('finish')end end, - bg='matrix',bgm='down', - }, - mesDisp=function(P) - setFont(45) - mStr(("%.1f"):format(P.stat.atk),63,190) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) - mText(drawableText.atk,63,243) - mText(drawableText.eff,63,363) - end, - score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}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]=100 then - local T=P.stat.time - return - T<50 and 5 or - T<70 and 4 or - T<100 and 3 or - 2 - else - return - A>=60 and 1 or - A>=30 and 0 - end - end, + color=COLOR.magenta, + env={ + drop=20,lock=60, + freshLimit=15, + b2bKill=true, + dropPiece=function(P)if P.stat.atk>=100 then P:win('finish')end end, + bg='matrix',bgm='down', + }, + mesDisp=function(P) + setFont(45) + mStr(("%.1f"):format(P.stat.atk),63,190) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) + mText(drawableText.atk,63,243) + mText(drawableText.eff,63,363) + end, + score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}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]=100 then + local T=P.stat.time + return + T<50 and 5 or + T<70 and 4 or + T<100 and 3 or + 2 + else + return + A>=60 and 1 or + A>=30 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/tech_h_plus.lua b/parts/modes/tech_h_plus.lua index 3936f171..2cd68136 100644 --- a/parts/modes/tech_h_plus.lua +++ b/parts/modes/tech_h_plus.lua @@ -1,47 +1,47 @@ local function tech_check_hard(P) - local C=P.lastPiece - if C.row>0 then - if not(C.spin or C.pc)then - P:lose() - return - end - end - if P.stat.atk>=100 then - P:win('finish') - end + local C=P.lastPiece + if C.row>0 then + if not(C.spin or C.pc)then + P:lose() + return + end + end + if P.stat.atk>=100 then + P:win('finish') + end end return{ - color=COLOR.dMagenta, - env={ - drop=30,lock=60, - freshLimit=15, - dropPiece=tech_check_hard, - bg='matrix',bgm='down', - }, - mesDisp=function(P) - setFont(45) - mStr(("%.1f"):format(P.stat.atk),63,190) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) - mText(drawableText.atk,63,243) - mText(drawableText.eff,63,363) - end, - score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}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]=100 then - local T=P.stat.time - return - T<50 and 5 or - T<70 and 4 or - T<100 and 3 or - 2 - else - return - A>=60 and 1 or - A>=30 and 0 - end - end, + color=COLOR.dMagenta, + env={ + drop=30,lock=60, + freshLimit=15, + dropPiece=tech_check_hard, + bg='matrix',bgm='down', + }, + mesDisp=function(P) + setFont(45) + mStr(("%.1f"):format(P.stat.atk),63,190) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) + mText(drawableText.atk,63,243) + mText(drawableText.eff,63,363) + end, + score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}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]=100 then + local T=P.stat.time + return + T<50 and 5 or + T<70 and 4 or + T<100 and 3 or + 2 + else + return + A>=60 and 1 or + A>=30 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/tech_l.lua b/parts/modes/tech_l.lua index ded89a66..b767ae12 100644 --- a/parts/modes/tech_l.lua +++ b/parts/modes/tech_l.lua @@ -1,35 +1,35 @@ return{ - color=COLOR.red, - env={ - drop=0,lock=60, - freshLimit=15, - b2bKill=true, - dropPiece=function(P)if P.stat.atk>=100 then P:win('finish')end end, - bg='matrix',bgm='warped', - }, - mesDisp=function(P) - setFont(45) - mStr(("%.1f"):format(P.stat.atk),63,190) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) - mText(drawableText.atk,63,243) - mText(drawableText.eff,63,363) - end, - score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}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]=100 then - local T=P.stat.time - return - T<50 and 5 or - T<70 and 4 or - T<100 and 3 or - 2 - else - return - A>=60 and 1 or - A>=30 and 0 - end - end, + color=COLOR.red, + env={ + drop=0,lock=60, + freshLimit=15, + b2bKill=true, + dropPiece=function(P)if P.stat.atk>=100 then P:win('finish')end end, + bg='matrix',bgm='warped', + }, + mesDisp=function(P) + setFont(45) + mStr(("%.1f"):format(P.stat.atk),63,190) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) + mText(drawableText.atk,63,243) + mText(drawableText.eff,63,363) + end, + score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}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]=100 then + local T=P.stat.time + return + T<50 and 5 or + T<70 and 4 or + T<100 and 3 or + 2 + else + return + A>=60 and 1 or + A>=30 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/tech_l_plus.lua b/parts/modes/tech_l_plus.lua index 72af918d..fe1c1ebd 100644 --- a/parts/modes/tech_l_plus.lua +++ b/parts/modes/tech_l_plus.lua @@ -1,47 +1,47 @@ local function tech_check_hard(P) - local C=P.lastPiece - if C.row>0 then - if not(C.spin or C.pc)then - P:lose() - return - end - end - if P.stat.atk>=100 then - P:win('finish') - end + local C=P.lastPiece + if C.row>0 then + if not(C.spin or C.pc)then + P:lose() + return + end + end + if P.stat.atk>=100 then + P:win('finish') + end end return{ - color=COLOR.dRed, - env={ - drop=0,lock=60, - freshLimit=15, - dropPiece=tech_check_hard, - bg='matrix',bgm='warped', - }, - mesDisp=function(P) - setFont(45) - mStr(("%.1f"):format(P.stat.atk),63,190) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) - mText(drawableText.atk,63,243) - mText(drawableText.eff,63,363) - end, - score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}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]=100 then - local T=P.stat.time - return - T<50 and 5 or - T<70 and 4 or - T<100 and 3 or - 2 - else - return - A>=60 and 1 or - A>=30 and 0 - end - end, + color=COLOR.dRed, + env={ + drop=0,lock=60, + freshLimit=15, + dropPiece=tech_check_hard, + bg='matrix',bgm='warped', + }, + mesDisp=function(P) + setFont(45) + mStr(("%.1f"):format(P.stat.atk),63,190) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) + mText(drawableText.atk,63,243) + mText(drawableText.eff,63,363) + end, + score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}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]=100 then + local T=P.stat.time + return + T<50 and 5 or + T<70 and 4 or + T<100 and 3 or + 2 + else + return + A>=60 and 1 or + A>=30 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/tech_n.lua b/parts/modes/tech_n.lua index 6b803579..4b401e5a 100644 --- a/parts/modes/tech_n.lua +++ b/parts/modes/tech_n.lua @@ -1,35 +1,35 @@ return{ - color=COLOR.green, - env={ - infHold=true, - drop=1e99,lock=1e99, - b2bKill=true, - dropPiece=function(P)if P.stat.atk>=100 then P:win('finish')end end, - bg='matrix',bgm='new era', - }, - mesDisp=function(P) - setFont(45) - mStr(("%.1f"):format(P.stat.atk),63,190) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) - mText(drawableText.atk,63,243) - mText(drawableText.eff,63,363) - end, - score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}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]=100 then - local T=P.stat.time - return - T<50 and 5 or - T<70 and 4 or - T<100 and 3 or - 2 - else - return - A>=60 and 1 or - A>=30 and 0 - end - end, + color=COLOR.green, + env={ + infHold=true, + drop=1e99,lock=1e99, + b2bKill=true, + dropPiece=function(P)if P.stat.atk>=100 then P:win('finish')end end, + bg='matrix',bgm='new era', + }, + mesDisp=function(P) + setFont(45) + mStr(("%.1f"):format(P.stat.atk),63,190) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) + mText(drawableText.atk,63,243) + mText(drawableText.eff,63,363) + end, + score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}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]=100 then + local T=P.stat.time + return + T<50 and 5 or + T<70 and 4 or + T<100 and 3 or + 2 + else + return + A>=60 and 1 or + A>=30 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/tech_n_plus.lua b/parts/modes/tech_n_plus.lua index c7894020..304e120e 100644 --- a/parts/modes/tech_n_plus.lua +++ b/parts/modes/tech_n_plus.lua @@ -1,47 +1,47 @@ local function tech_check_hard(P) - local C=P.lastPiece - if C.row>0 then - if not(C.spin or C.pc)then - P:lose() - return - end - end - if P.stat.atk>=100 then - P:win('finish') - end + local C=P.lastPiece + if C.row>0 then + if not(C.spin or C.pc)then + P:lose() + return + end + end + if P.stat.atk>=100 then + P:win('finish') + end end return{ - color=COLOR.dGreen, - env={ - infHold=true, - drop=1e99,lock=1e99, - dropPiece=tech_check_hard, - bg='matrix',bgm='new era', - }, - mesDisp=function(P) - setFont(45) - mStr(("%.1f"):format(P.stat.atk),63,190) - mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) - mText(drawableText.atk,63,243) - mText(drawableText.eff,63,363) - end, - score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}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]=100 then - local T=P.stat.time - return - T<50 and 5 or - T<70 and 4 or - T<100 and 3 or - 2 - else - return - A>=60 and 1 or - A>=30 and 0 - end - end, + color=COLOR.dGreen, + env={ + infHold=true, + drop=1e99,lock=1e99, + dropPiece=tech_check_hard, + bg='matrix',bgm='new era', + }, + mesDisp=function(P) + setFont(45) + mStr(("%.1f"):format(P.stat.atk),63,190) + mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310) + mText(drawableText.atk,63,243) + mText(drawableText.eff,63,363) + end, + score=function(P)return{P.stat.atk<=100 and math.floor(P.stat.atk)or 100,P.stat.time}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]=100 then + local T=P.stat.time + return + T<50 and 5 or + T<70 and 4 or + T<100 and 3 or + 2 + else + return + A>=60 and 1 or + A>=30 and 0 + end + end, } \ No newline at end of file diff --git a/parts/modes/techmino49_e.lua b/parts/modes/techmino49_e.lua index 90531d77..14ec498a 100644 --- a/parts/modes/techmino49_e.lua +++ b/parts/modes/techmino49_e.lua @@ -1,71 +1,71 @@ local function selectTarget(P) - if SETTING.swap then - for i=1,#P.keyPressing do - if P.keyPressing[i]then - P.keyPressing[i]=false - end - end - P.keyPressing[9]=true - else - P:changeAtkMode(P.atkMode<3 and P.atkMode+2 or 5-P.atkMode) - P.swappingAtkMode=30 - end + if SETTING.swap then + for i=1,#P.keyPressing do + if P.keyPressing[i]then + P.keyPressing[i]=false + end + end + P.keyPressing[9]=true + else + P:changeAtkMode(P.atkMode<3 and P.atkMode+2 or 5-P.atkMode) + P.swappingAtkMode=30 + end end return{ - color=COLOR.cyan, - env={ - drop=60,lock=60, - fall=20, - royaleMode=true, - fkey1=selectTarget, - garbageSpeed=.3, - pushSpeed=2, - freshLimit=15, - bg='rainbow',bgm='sugar fairy', - }, - load=function() - ROYALEDATA.powerUp={2,5,10,20} - ROYALEDATA.stage={30,20,15,10,5} - PLY.newPlayer(1) - local L={}for i=1,49 do L[i]=true end - local t=2 - while t>0 do - local r=math.random(2,49) - if L[r]then L[r],t=false,t-1 end - end - local n=2 - for _=1,4 do for _=1,6 do - if L[n]then - PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(4,6),hold=true}) - else - PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(2,4),next=2,hold=true,node=20000},true) - end - n=n+1 - end end - for _=9,12 do for _=1,6 do - if L[n]then - PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(4,5),hold=true}) - else - PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(3,5),next=2,hold=true,node=20000},true) - end - n=n+1 - end end - end, - mesDisp=function(P) - PLY.draw.drawRoyaleInfo(P) - end, - score=function(P)return{P.modeData.place,P.modeData.ko}end, - scoreDisp=function(D)return"NO."..D[1].." KO:"..D[2]end, - comp=function(a,b)return a[1]b[2]end, - getRank=function(P) - local R=P.modeData.place - return - R==1 and 5 or - R<=3 and 4 or - R<=5 and 3 or - R<=10 and 2 or - R<=15 and 1 or - R<=45 and 0 - end, + color=COLOR.cyan, + env={ + drop=60,lock=60, + fall=20, + royaleMode=true, + fkey1=selectTarget, + garbageSpeed=.3, + pushSpeed=2, + freshLimit=15, + bg='rainbow',bgm='sugar fairy', + }, + load=function() + ROYALEDATA.powerUp={2,5,10,20} + ROYALEDATA.stage={30,20,15,10,5} + PLY.newPlayer(1) + local L={}for i=1,49 do L[i]=true end + local t=2 + while t>0 do + local r=math.random(2,49) + if L[r]then L[r],t=false,t-1 end + end + local n=2 + for _=1,4 do for _=1,6 do + if L[n]then + PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(4,6),hold=true}) + else + PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(2,4),next=2,hold=true,node=20000},true) + end + n=n+1 + end end + for _=9,12 do for _=1,6 do + if L[n]then + PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(4,5),hold=true}) + else + PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(3,5),next=2,hold=true,node=20000},true) + end + n=n+1 + end end + end, + mesDisp=function(P) + PLY.draw.drawRoyaleInfo(P) + end, + score=function(P)return{P.modeData.place,P.modeData.ko}end, + scoreDisp=function(D)return"NO."..D[1].." KO:"..D[2]end, + comp=function(a,b)return a[1]b[2]end, + getRank=function(P) + local R=P.modeData.place + return + R==1 and 5 or + R<=3 and 4 or + R<=5 and 3 or + R<=10 and 2 or + R<=15 and 1 or + R<=45 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/techmino49_h.lua b/parts/modes/techmino49_h.lua index 3a05e8d5..9a0bb3e5 100644 --- a/parts/modes/techmino49_h.lua +++ b/parts/modes/techmino49_h.lua @@ -1,71 +1,71 @@ local function selectTarget(P) - if SETTING.swap then - for i=1,#P.keyPressing do - if P.keyPressing[i]then - P.keyPressing[i]=false - end - end - P.keyPressing[9]=true - else - P:changeAtkMode(P.atkMode<3 and P.atkMode+2 or 5-P.atkMode) - P.swappingAtkMode=30 - end + if SETTING.swap then + for i=1,#P.keyPressing do + if P.keyPressing[i]then + P.keyPressing[i]=false + end + end + P.keyPressing[9]=true + else + P:changeAtkMode(P.atkMode<3 and P.atkMode+2 or 5-P.atkMode) + P.swappingAtkMode=30 + end end return{ - color=COLOR.magenta, - env={ - drop=60,lock=60, - fall=20, - royaleMode=true, - fkey1=selectTarget, - garbageSpeed=.3, - pushSpeed=2, - freshLimit=15, - bg='rainbow',bgm='rockblock', - }, - load=function() - ROYALEDATA.powerUp={2,5,10,20} - ROYALEDATA.stage={30,20,15,10,5} - PLY.newPlayer(1) - local L={}for i=1,49 do L[i]=true end - local t=4 - while t>0 do - local r=math.random(2,49) - if L[r]then L[r],t=false,t-1 end - end - local n=2 - for _=1,4 do for _=1,6 do - if L[n]then - PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(4,8),hold=true}) - else - PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(3,6),next=3,hold=true,node=30000},true) - end - n=n+1 - end end - for _=9,12 do for _=1,6 do - if L[n]then - PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(4,7),hold=true}) - else - PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(4,6),next=3,hold=true,node=30000},true) - end - n=n+1 - end end - end, - mesDisp=function(P) - PLY.draw.drawRoyaleInfo(P) - end, - score=function(P)return{P.modeData.place,P.modeData.ko}end, - scoreDisp=function(D)return"NO."..D[1].." KO:"..D[2]end, - comp=function(a,b)return a[1]b[2]end, - getRank=function(P) - local R=P.modeData.place - return - R==1 and 5 or - R==2 and 4 or - R<=4 and 3 or - R<=6 and 2 or - R<=8 and 1 or - R<=45 and 0 - end, + color=COLOR.magenta, + env={ + drop=60,lock=60, + fall=20, + royaleMode=true, + fkey1=selectTarget, + garbageSpeed=.3, + pushSpeed=2, + freshLimit=15, + bg='rainbow',bgm='rockblock', + }, + load=function() + ROYALEDATA.powerUp={2,5,10,20} + ROYALEDATA.stage={30,20,15,10,5} + PLY.newPlayer(1) + local L={}for i=1,49 do L[i]=true end + local t=4 + while t>0 do + local r=math.random(2,49) + if L[r]then L[r],t=false,t-1 end + end + local n=2 + for _=1,4 do for _=1,6 do + if L[n]then + PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(4,8),hold=true}) + else + PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(3,6),next=3,hold=true,node=30000},true) + end + n=n+1 + end end + for _=9,12 do for _=1,6 do + if L[n]then + PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(4,7),hold=true}) + else + PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(4,6),next=3,hold=true,node=30000},true) + end + n=n+1 + end end + end, + mesDisp=function(P) + PLY.draw.drawRoyaleInfo(P) + end, + score=function(P)return{P.modeData.place,P.modeData.ko}end, + scoreDisp=function(D)return"NO."..D[1].." KO:"..D[2]end, + comp=function(a,b)return a[1]b[2]end, + getRank=function(P) + local R=P.modeData.place + return + R==1 and 5 or + R==2 and 4 or + R<=4 and 3 or + R<=6 and 2 or + R<=8 and 1 or + R<=45 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/techmino49_u.lua b/parts/modes/techmino49_u.lua index cc4aafeb..b3a05c53 100644 --- a/parts/modes/techmino49_u.lua +++ b/parts/modes/techmino49_u.lua @@ -1,71 +1,71 @@ local function selectTarget(P) - if SETTING.swap then - for i=1,#P.keyPressing do - if P.keyPressing[i]then - P.keyPressing[i]=false - end - end - P.keyPressing[9]=true - else - P:changeAtkMode(P.atkMode<3 and P.atkMode+2 or 5-P.atkMode) - P.swappingAtkMode=30 - end + if SETTING.swap then + for i=1,#P.keyPressing do + if P.keyPressing[i]then + P.keyPressing[i]=false + end + end + P.keyPressing[9]=true + else + P:changeAtkMode(P.atkMode<3 and P.atkMode+2 or 5-P.atkMode) + P.swappingAtkMode=30 + end end return{ - color=COLOR.lYellow, - env={ - drop=15,lock=60, - fall=20, - royaleMode=true, - fkey1=selectTarget, - garbageSpeed=.3, - pushSpeed=2, - freshLimit=15, - bg='rainbow',bgm='magicblock', - }, - load=function() - ROYALEDATA.powerUp={2,5,10,20} - ROYALEDATA.stage={30,20,15,10,5} - PLY.newPlayer(1) - local L={}for i=1,49 do L[i]=true end - local t=6 - while t>0 do - local r=math.random(2,49) - if L[r]then L[r],t=false,t-1 end - end - local n=2 - for _=1,4 do for _=1,6 do - if L[n]then - PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(8,10),hold=true}) - else - PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(4,7),next=3,hold=true,node=40000},true) - end - n=n+1 - end end - for _=9,12 do for _=1,6 do - if L[n]then - PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(8,9),hold=true}) - else - PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(5,8),next=3,hold=true,node=40000},true) - end - n=n+1 - end end - end, - mesDisp=function(P) - PLY.draw.drawRoyaleInfo(P) - end, - score=function(P)return{P.modeData.place,P.modeData.ko}end, - scoreDisp=function(D)return"NO."..D[1].." KO:"..D[2]end, - comp=function(a,b)return a[1]b[2]end, - getRank=function(P) - local R=P.modeData.place - return - R==1 and 5 or - R==2 and 4 or - R==3 and 3 or - R==4 and 2 or - R<=6 and 1 or - R<=45 and 0 - end, + color=COLOR.lYellow, + env={ + drop=15,lock=60, + fall=20, + royaleMode=true, + fkey1=selectTarget, + garbageSpeed=.3, + pushSpeed=2, + freshLimit=15, + bg='rainbow',bgm='magicblock', + }, + load=function() + ROYALEDATA.powerUp={2,5,10,20} + ROYALEDATA.stage={30,20,15,10,5} + PLY.newPlayer(1) + local L={}for i=1,49 do L[i]=true end + local t=6 + while t>0 do + local r=math.random(2,49) + if L[r]then L[r],t=false,t-1 end + end + local n=2 + for _=1,4 do for _=1,6 do + if L[n]then + PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(8,10),hold=true}) + else + PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(4,7),next=3,hold=true,node=40000},true) + end + n=n+1 + end end + for _=9,12 do for _=1,6 do + if L[n]then + PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(8,9),hold=true}) + else + PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(5,8),next=3,hold=true,node=40000},true) + end + n=n+1 + end end + end, + mesDisp=function(P) + PLY.draw.drawRoyaleInfo(P) + end, + score=function(P)return{P.modeData.place,P.modeData.ko}end, + scoreDisp=function(D)return"NO."..D[1].." KO:"..D[2]end, + comp=function(a,b)return a[1]b[2]end, + getRank=function(P) + local R=P.modeData.place + return + R==1 and 5 or + R==2 and 4 or + R==3 and 3 or + R==4 and 2 or + R<=6 and 1 or + R<=45 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/techmino99_e.lua b/parts/modes/techmino99_e.lua index bf07b436..92f81681 100644 --- a/parts/modes/techmino99_e.lua +++ b/parts/modes/techmino99_e.lua @@ -1,71 +1,71 @@ local function selectTarget(P) - if SETTING.swap then - for i=1,#P.keyPressing do - if P.keyPressing[i]then - P.keyPressing[i]=false - end - end - P.keyPressing[9]=true - else - P:changeAtkMode(P.atkMode<3 and P.atkMode+2 or 5-P.atkMode) - P.swappingAtkMode=30 - end + if SETTING.swap then + for i=1,#P.keyPressing do + if P.keyPressing[i]then + P.keyPressing[i]=false + end + end + P.keyPressing[9]=true + else + P:changeAtkMode(P.atkMode<3 and P.atkMode+2 or 5-P.atkMode) + P.swappingAtkMode=30 + end end return{ - color=COLOR.cyan, - env={ - drop=60,lock=60, - fall=20, - royaleMode=true, - fkey1=selectTarget, - garbageSpeed=.3, - pushSpeed=2, - freshLimit=15, - bg='rainbow',bgm='sugar fairy', - }, - load=function() - ROYALEDATA.powerUp={2,6,14,30} - ROYALEDATA.stage={75,50,35,20,10} - PLY.newPlayer(1) - local L={}for i=1,100 do L[i]=true end - local t=4 - while t>0 do - local r=math.random(2,99) - if L[r]then L[r],t=false,t-1 end - end - local n=2 - for _=1,7 do for _=1,7 do - if L[n]then - PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(4,6),hold=true}) - else - PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(2,4),next=2,hold=true,node=20000},true) - end - n=n+1 - end end - for _=15,21 do for _=1,7 do - if L[n]then - PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(4,5),hold=true}) - else - PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(3,5),next=2,hold=true,node=20000},true) - end - n=n+1 - end end - end, - mesDisp=function(P) - PLY.draw.drawRoyaleInfo(P) - end, - score=function(P)return{P.modeData.place,P.modeData.ko}end, - scoreDisp=function(D)return"NO."..D[1].." KO:"..D[2]end, - comp=function(a,b)return a[1]b[2]end, - getRank=function(P) - local R=P.modeData.place - return - R==1 and 5 or - R<=3 and 4 or - R<=6 and 3 or - R<=10 and 2 or - R<=20 and 1 or - R<=90 and 0 - end, + color=COLOR.cyan, + env={ + drop=60,lock=60, + fall=20, + royaleMode=true, + fkey1=selectTarget, + garbageSpeed=.3, + pushSpeed=2, + freshLimit=15, + bg='rainbow',bgm='sugar fairy', + }, + load=function() + ROYALEDATA.powerUp={2,6,14,30} + ROYALEDATA.stage={75,50,35,20,10} + PLY.newPlayer(1) + local L={}for i=1,100 do L[i]=true end + local t=4 + while t>0 do + local r=math.random(2,99) + if L[r]then L[r],t=false,t-1 end + end + local n=2 + for _=1,7 do for _=1,7 do + if L[n]then + PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(4,6),hold=true}) + else + PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(2,4),next=2,hold=true,node=20000},true) + end + n=n+1 + end end + for _=15,21 do for _=1,7 do + if L[n]then + PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(4,5),hold=true}) + else + PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(3,5),next=2,hold=true,node=20000},true) + end + n=n+1 + end end + end, + mesDisp=function(P) + PLY.draw.drawRoyaleInfo(P) + end, + score=function(P)return{P.modeData.place,P.modeData.ko}end, + scoreDisp=function(D)return"NO."..D[1].." KO:"..D[2]end, + comp=function(a,b)return a[1]b[2]end, + getRank=function(P) + local R=P.modeData.place + return + R==1 and 5 or + R<=3 and 4 or + R<=6 and 3 or + R<=10 and 2 or + R<=20 and 1 or + R<=90 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/techmino99_h.lua b/parts/modes/techmino99_h.lua index 87eaedb8..42381702 100644 --- a/parts/modes/techmino99_h.lua +++ b/parts/modes/techmino99_h.lua @@ -1,71 +1,71 @@ local function selectTarget(P) - if SETTING.swap then - for i=1,#P.keyPressing do - if P.keyPressing[i]then - P.keyPressing[i]=false - end - end - P.keyPressing[9]=true - else - P:changeAtkMode(P.atkMode<3 and P.atkMode+2 or 5-P.atkMode) - P.swappingAtkMode=30 - end + if SETTING.swap then + for i=1,#P.keyPressing do + if P.keyPressing[i]then + P.keyPressing[i]=false + end + end + P.keyPressing[9]=true + else + P:changeAtkMode(P.atkMode<3 and P.atkMode+2 or 5-P.atkMode) + P.swappingAtkMode=30 + end end return{ - color=COLOR.magenta, - env={ - drop=60,lock=60, - fall=20, - royaleMode=true, - fkey1=selectTarget, - garbageSpeed=.3, - pushSpeed=2, - freshLimit=15, - bg='rainbow',bgm='rockblock', - }, - load=function() - ROYALEDATA.powerUp={2,6,14,30} - ROYALEDATA.stage={75,50,35,20,10} - PLY.newPlayer(1) - local L={}for i=1,100 do L[i]=true end - local t=4 - while t>0 do - local r=math.random(2,99) - if L[r]then L[r],t=false,t-1 end - end - local n=2 - for _=1,7 do for _=1,7 do - if L[n]then - PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(4,8),hold=true}) - else - PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(3,6),next=3,hold=true,node=30000},true) - end - n=n+1 - end end - for _=15,21 do for _=1,7 do - if L[n]then - PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(4,7),hold=true}) - else - PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(4,6),next=3,hold=true,node=30000},true) - end - n=n+1 - end end - end, - mesDisp=function(P) - PLY.draw.drawRoyaleInfo(P) - end, - score=function(P)return{P.modeData.place,P.modeData.ko}end, - scoreDisp=function(D)return"NO."..D[1].." KO:"..D[2]end, - comp=function(a,b)return a[1]b[2]end, - getRank=function(P) - local R=P.modeData.place - return - R==1 and 5 or - R<=3 and 4 or - R<=6 and 3 or - R<=8 and 2 or - R<=10 and 1 or - R<=90 and 0 - end, + color=COLOR.magenta, + env={ + drop=60,lock=60, + fall=20, + royaleMode=true, + fkey1=selectTarget, + garbageSpeed=.3, + pushSpeed=2, + freshLimit=15, + bg='rainbow',bgm='rockblock', + }, + load=function() + ROYALEDATA.powerUp={2,6,14,30} + ROYALEDATA.stage={75,50,35,20,10} + PLY.newPlayer(1) + local L={}for i=1,100 do L[i]=true end + local t=4 + while t>0 do + local r=math.random(2,99) + if L[r]then L[r],t=false,t-1 end + end + local n=2 + for _=1,7 do for _=1,7 do + if L[n]then + PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(4,8),hold=true}) + else + PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(3,6),next=3,hold=true,node=30000},true) + end + n=n+1 + end end + for _=15,21 do for _=1,7 do + if L[n]then + PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(4,7),hold=true}) + else + PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(4,6),next=3,hold=true,node=30000},true) + end + n=n+1 + end end + end, + mesDisp=function(P) + PLY.draw.drawRoyaleInfo(P) + end, + score=function(P)return{P.modeData.place,P.modeData.ko}end, + scoreDisp=function(D)return"NO."..D[1].." KO:"..D[2]end, + comp=function(a,b)return a[1]b[2]end, + getRank=function(P) + local R=P.modeData.place + return + R==1 and 5 or + R<=3 and 4 or + R<=6 and 3 or + R<=8 and 2 or + R<=10 and 1 or + R<=90 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/techmino99_u.lua b/parts/modes/techmino99_u.lua index 645c3ed3..7176c136 100644 --- a/parts/modes/techmino99_u.lua +++ b/parts/modes/techmino99_u.lua @@ -1,71 +1,71 @@ local function selectTarget(P) - if SETTING.swap then - for i=1,#P.keyPressing do - if P.keyPressing[i]then - P.keyPressing[i]=false - end - end - P.keyPressing[9]=true - else - P:changeAtkMode(P.atkMode<3 and P.atkMode+2 or 5-P.atkMode) - P.swappingAtkMode=30 - end + if SETTING.swap then + for i=1,#P.keyPressing do + if P.keyPressing[i]then + P.keyPressing[i]=false + end + end + P.keyPressing[9]=true + else + P:changeAtkMode(P.atkMode<3 and P.atkMode+2 or 5-P.atkMode) + P.swappingAtkMode=30 + end end return{ - color=COLOR.lYellow, - env={ - drop=15,lock=60, - fall=20, - royaleMode=true, - fkey1=selectTarget, - garbageSpeed=.3, - pushSpeed=2, - freshLimit=15, - bg='rainbow',bgm='magicblock', - }, - load=function() - ROYALEDATA.powerUp={2,6,14,30} - ROYALEDATA.stage={75,50,35,20,10} - PLY.newPlayer(1) - local L={}for i=1,100 do L[i]=true end - local t=4 - while t>0 do - local r=math.random(2,99) - if L[r]then L[r],t=false,t-1 end - end - local n=2 - for _=1,7 do for _=1,7 do - if L[n]then - PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(8,10),hold=true}) - else - PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(4,7),next=3,hold=true,node=40000},true) - end - n=n+1 - end end - for _=15,21 do for _=1,7 do - if L[n]then - PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(8,9),hold=true}) - else - PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(5,8),next=3,hold=true,node=40000},true) - end - n=n+1 - end end - end, - mesDisp=function(P) - PLY.draw.drawRoyaleInfo(P) - end, - score=function(P)return{P.modeData.place,P.modeData.ko}end, - scoreDisp=function(D)return"NO."..D[1].." KO:"..D[2]end, - comp=function(a,b)return a[1]b[2]end, - getRank=function(P) - local R=P.modeData.place - return - R==1 and 5 or - R==2 and 4 or - R==3 and 3 or - R<=5 and 2 or - R<=7 and 1 or - R<=90 and 0 - end, + color=COLOR.lYellow, + env={ + drop=15,lock=60, + fall=20, + royaleMode=true, + fkey1=selectTarget, + garbageSpeed=.3, + pushSpeed=2, + freshLimit=15, + bg='rainbow',bgm='magicblock', + }, + load=function() + ROYALEDATA.powerUp={2,6,14,30} + ROYALEDATA.stage={75,50,35,20,10} + PLY.newPlayer(1) + local L={}for i=1,100 do L[i]=true end + local t=4 + while t>0 do + local r=math.random(2,99) + if L[r]then L[r],t=false,t-1 end + end + local n=2 + for _=1,7 do for _=1,7 do + if L[n]then + PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(8,10),hold=true}) + else + PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(4,7),next=3,hold=true,node=40000},true) + end + n=n+1 + end end + for _=15,21 do for _=1,7 do + if L[n]then + PLY.newAIPlayer(n,BOT.template{type='9S',speedLV=math.random(8,9),hold=true}) + else + PLY.newAIPlayer(n,BOT.template{type='CC',speedLV=math.random(5,8),next=3,hold=true,node=40000},true) + end + n=n+1 + end end + end, + mesDisp=function(P) + PLY.draw.drawRoyaleInfo(P) + end, + score=function(P)return{P.modeData.place,P.modeData.ko}end, + scoreDisp=function(D)return"NO."..D[1].." KO:"..D[2]end, + comp=function(a,b)return a[1]b[2]end, + getRank=function(P) + local R=P.modeData.place + return + R==1 and 5 or + R==2 and 4 or + R==3 and 3 or + R<=5 and 2 or + R<=7 and 1 or + R<=90 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/tsd_e.lua b/parts/modes/tsd_e.lua index 4855c132..1575ffd2 100644 --- a/parts/modes/tsd_e.lua +++ b/parts/modes/tsd_e.lua @@ -1,39 +1,39 @@ local function check_tsd(P) - local C=P.lastPiece - if C.row>0 then - if C.id==5 and C.row==2 and C.spin then - P.modeData.tsd=P.modeData.tsd+1 - else - P:lose() - end - end + local C=P.lastPiece + if C.row>0 then + if C.id==5 and C.row==2 and C.spin then + P.modeData.tsd=P.modeData.tsd+1 + else + P:lose() + end + end end return{ - color=COLOR.green, - env={ - drop=1e99,lock=1e99, - infHold=true, - dropPiece=check_tsd, - ospin=false, - bg='matrix',bgm='vapor', - }, - mesDisp=function(P) - setFont(60) - mStr(P.modeData.tsd,63,250) - mText(drawableText.tsd,63,315) - end, - score=function(P)return{P.modeData.tsd,P.stat.time}end, - scoreDisp=function(D)return D[1].."TSD "..STRING.time(D[2])end, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=20 and 5 or - T>=18 and 4 or - T>=15 and 3 or - T>=10 and 2 or - T>=4 and 1 or - T>=1 and 0 - end, + color=COLOR.green, + env={ + drop=1e99,lock=1e99, + infHold=true, + dropPiece=check_tsd, + ospin=false, + bg='matrix',bgm='vapor', + }, + mesDisp=function(P) + setFont(60) + mStr(P.modeData.tsd,63,250) + mText(drawableText.tsd,63,315) + end, + score=function(P)return{P.modeData.tsd,P.stat.time}end, + scoreDisp=function(D)return D[1].."TSD "..STRING.time(D[2])end, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=20 and 5 or + T>=18 and 4 or + T>=15 and 3 or + T>=10 and 2 or + T>=4 and 1 or + T>=1 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/tsd_h.lua b/parts/modes/tsd_h.lua index b9edcdf9..d95a5476 100644 --- a/parts/modes/tsd_h.lua +++ b/parts/modes/tsd_h.lua @@ -1,56 +1,56 @@ local gc=love.graphics local function check_tsd(P) - local C=P.lastPiece - if C.row>0 then - if C.id==5 and C.row==2 and C.spin then - local L=P.modeData.history - 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:lose() - else - P.modeData.tsd=P.modeData.tsd+1 - table.insert(L,1,C.centX) - L[4]=nil - end - else - P:lose() - end - end + local C=P.lastPiece + if C.row>0 then + if C.id==5 and C.row==2 and C.spin then + local L=P.modeData.history + 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:lose() + else + P.modeData.tsd=P.modeData.tsd+1 + table.insert(L,1,C.centX) + L[4]=nil + end + else + P:lose() + end + end end return{ - color=COLOR.magenta, - env={ - drop=30,lock=60, - freshLimit=15, - dropPiece=check_tsd, - task=function(P)P.modeData.history={}end, - ospin=false, - bg='matrix',bgm='vapor', - }, - mesDisp=function(P) - setFont(60) - mStr(P.modeData.tsd,63,250) - mText(drawableText.tsd,63,315) - local L=P.modeData.history - if L[1]and L[1]==L[2]and L[1]==L[3]then - PLY.draw.applyField(P) - gc.setColor(1,.5,.5,.2) - gc.rectangle('fill',30*L[1]-30,0,30,600) - PLY.draw.cancelField(P) - end - end, - score=function(P)return{P.modeData.tsd,P.stat.time}end, - scoreDisp=function(D)return D[1].."TSD "..STRING.time(D[2])end, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=20 and 5 or - T>=18 and 4 or - T>=15 and 3 or - T>=11 and 2 or - T>=7 and 1 or - T>=3 and 0 - end, + color=COLOR.magenta, + env={ + drop=30,lock=60, + freshLimit=15, + dropPiece=check_tsd, + task=function(P)P.modeData.history={}end, + ospin=false, + bg='matrix',bgm='vapor', + }, + mesDisp=function(P) + setFont(60) + mStr(P.modeData.tsd,63,250) + mText(drawableText.tsd,63,315) + local L=P.modeData.history + if L[1]and L[1]==L[2]and L[1]==L[3]then + PLY.draw.applyField(P) + gc.setColor(1,.5,.5,.2) + gc.rectangle('fill',30*L[1]-30,0,30,600) + PLY.draw.cancelField(P) + end + end, + score=function(P)return{P.modeData.tsd,P.stat.time}end, + scoreDisp=function(D)return D[1].."TSD "..STRING.time(D[2])end, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=20 and 5 or + T>=18 and 4 or + T>=15 and 3 or + T>=11 and 2 or + T>=7 and 1 or + T>=3 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/tsd_u.lua b/parts/modes/tsd_u.lua index b0a97002..1346d941 100644 --- a/parts/modes/tsd_u.lua +++ b/parts/modes/tsd_u.lua @@ -1,55 +1,55 @@ local gc=love.graphics local function check_tsd(P) - local C=P.lastPiece - if C.row>0 then - if C.id==5 and C.row==2 and C.spin then - if TABLE.find(P.modeData.history,C.centX)then - P:showText("STACK",0,-140,40,'flicker',.3) - P:lose() - else - P.modeData.tsd=P.modeData.tsd+1 - table.insert(P.modeData.history,1,C.centX) - P.modeData.history[5]=nil - end - else - P:lose() - end - end + local C=P.lastPiece + if C.row>0 then + if C.id==5 and C.row==2 and C.spin then + if TABLE.find(P.modeData.history,C.centX)then + P:showText("STACK",0,-140,40,'flicker',.3) + P:lose() + else + P.modeData.tsd=P.modeData.tsd+1 + table.insert(P.modeData.history,1,C.centX) + P.modeData.history[5]=nil + end + else + P:lose() + end + end end return{ - color=COLOR.lYellow, - env={ - drop=60,lock=60, - freshLimit=15, - dropPiece=check_tsd, - task=function(P)P.modeData.history={}end, - ospin=false, - bg='matrix',bgm='vapor', - }, - mesDisp=function(P) - setFont(60) - mStr(P.modeData.tsd,63,250) - mText(drawableText.tsd,63,315) - PLY.draw.applyField(P) - local L=P.modeData.history - for i=1,#L do - gc.setColor(1,.5,.5,.3-i*.05) - gc.rectangle('fill',30*L[i]-30,0,30,600) - end - PLY.draw.cancelField(P) - end, - score=function(P)return{P.modeData.tsd,P.stat.time}end, - scoreDisp=function(D)return D[1].."TSD "..STRING.time(D[2])end, - comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=20 and 5 or - T>=18 and 4 or - T>=16 and 3 or - T>=13 and 2 or - T>=10 and 1 or - T>=4 and 0 - end, + color=COLOR.lYellow, + env={ + drop=60,lock=60, + freshLimit=15, + dropPiece=check_tsd, + task=function(P)P.modeData.history={}end, + ospin=false, + bg='matrix',bgm='vapor', + }, + mesDisp=function(P) + setFont(60) + mStr(P.modeData.tsd,63,250) + mText(drawableText.tsd,63,315) + PLY.draw.applyField(P) + local L=P.modeData.history + for i=1,#L do + gc.setColor(1,.5,.5,.3-i*.05) + gc.rectangle('fill',30*L[i]-30,0,30,600) + end + PLY.draw.cancelField(P) + end, + score=function(P)return{P.modeData.tsd,P.stat.time}end, + scoreDisp=function(D)return D[1].."TSD "..STRING.time(D[2])end, + comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]=20 and 5 or + T>=18 and 4 or + T>=16 and 3 or + T>=13 and 2 or + T>=10 and 1 or + T>=4 and 0 + end, } \ No newline at end of file diff --git a/parts/modes/ultra.lua b/parts/modes/ultra.lua index 5563ac50..ebc1e94c 100644 --- a/parts/modes/ultra.lua +++ b/parts/modes/ultra.lua @@ -1,48 +1,48 @@ local gc=love.graphics local warnTime={60,90,105,115,116,117,118,119,120} return{ - color=COLOR.lGray, - env={ - noTele=true, - minarr=1,minsdarr=1, - drop=60,lock=60, - fall=20, - task=function(P) - P.modeData.stage=1 - while true do - YIELD() - if P.stat.frame/60>=warnTime[P.modeData.stage]then - if P.modeData.stage<9 then - P.modeData.stage=P.modeData.stage+1 - SFX.play('ready',.7+P.modeData.stage*.03) - else - SFX.play('start') - P:win('finish') - return - end - end - end - end, - bg='fan',bgm='memory', - }, - slowMark=true, - mesDisp=function(P) - gc.setLineWidth(2) - gc.rectangle('line',55,110,32,402) - local T=P.stat.frame/60/120 - gc.setColor(2*T,2-2*T,.2) - gc.rectangle('fill',56,511,30,(T-1)*400) - end, - score=function(P)return{P.stat.score}end, - scoreDisp=function(D)return tostring(D[1])end, - comp=function(a,b)return a[1]>b[1]end, - getRank=function(P) - local T=P.stat.score - return - T>=62000 and 5 or - T>=50000 and 4 or - T>=26000 and 3 or - T>=10000 and 2 or - T>=6200 and 1 - end, + color=COLOR.lGray, + env={ + noTele=true, + minarr=1,minsdarr=1, + drop=60,lock=60, + fall=20, + task=function(P) + P.modeData.stage=1 + while true do + YIELD() + if P.stat.frame/60>=warnTime[P.modeData.stage]then + if P.modeData.stage<9 then + P.modeData.stage=P.modeData.stage+1 + SFX.play('ready',.7+P.modeData.stage*.03) + else + SFX.play('start') + P:win('finish') + return + end + end + end + end, + bg='fan',bgm='memory', + }, + slowMark=true, + mesDisp=function(P) + gc.setLineWidth(2) + gc.rectangle('line',55,110,32,402) + local T=P.stat.frame/60/120 + gc.setColor(2*T,2-2*T,.2) + gc.rectangle('fill',56,511,30,(T-1)*400) + end, + score=function(P)return{P.stat.score}end, + scoreDisp=function(D)return tostring(D[1])end, + comp=function(a,b)return a[1]>b[1]end, + getRank=function(P) + local T=P.stat.score + return + T>=62000 and 5 or + T>=50000 and 4 or + T>=26000 and 3 or + T>=10000 and 2 or + T>=6200 and 1 + end, } \ No newline at end of file diff --git a/parts/modes/zen.lua b/parts/modes/zen.lua index 87664cbd..59775686 100644 --- a/parts/modes/zen.lua +++ b/parts/modes/zen.lua @@ -1,26 +1,26 @@ return{ - color=COLOR.lGray, - env={ - drop=120,lock=120, - infHold=true, - dropPiece=function(P)if P.stat.row>=200 then P:win('finish')end end, - bg='bg2',bgm='venus', - }, - mesDisp=function(P) - setFont(70) - local R=200-P.stat.row - mStr(R>=0 and R or 0,63,265) - end, - score=function(P)return{P.stat.score}end, - scoreDisp=function(D)return tostring(D[1])end, - comp=function(a,b)return a[1]>b[1]end, - getRank=function(P) - local T=P.stat.score - return - T>=126000 and 5 or - T>=100000 and 4 or - T>=60000 and 3 or - T>=30000 and 2 or - T>=10000 and 1 - end, + color=COLOR.lGray, + env={ + drop=120,lock=120, + infHold=true, + dropPiece=function(P)if P.stat.row>=200 then P:win('finish')end end, + bg='bg2',bgm='venus', + }, + mesDisp=function(P) + setFont(70) + local R=200-P.stat.row + mStr(R>=0 and R or 0,63,265) + end, + score=function(P)return{P.stat.score}end, + scoreDisp=function(D)return tostring(D[1])end, + comp=function(a,b)return a[1]>b[1]end, + getRank=function(P) + local T=P.stat.score + return + T>=126000 and 5 or + T>=100000 and 4 or + T>=60000 and 3 or + T>=30000 and 2 or + T>=10000 and 1 + end, } \ No newline at end of file diff --git a/parts/net.lua b/parts/net.lua index 576b31eb..d14ebeaa 100644 --- a/parts/net.lua +++ b/parts/net.lua @@ -5,172 +5,172 @@ local WS,TIME=WS,TIME local yield=YIELD local NET={ - allow_online=false, - accessToken=false, - cloudData={}, + allow_online=false, + accessToken=false, + cloudData={}, - roomState={--A copy of room structure on server - roomInfo={ - name=false, - type=false, - version=false, - }, - roomData={}, - count=false, - capacity=false, - private=false, - start=false, - }, - spectate=false,--If player is spectating - specSRID=false,--Cached SRID when enter playing room, for connect WS after scene swapped - seed=false, + roomState={--A copy of room structure on server + roomInfo={ + name=false, + type=false, + version=false, + }, + roomData={}, + count=false, + capacity=false, + private=false, + start=false, + }, + spectate=false,--If player is spectating + specSRID=false,--Cached SRID when enter playing room, for connect WS after scene swapped + seed=false, - roomReadyState=false, + roomReadyState=false, - UserCount="_", - PlayCount="_", - StreamCount="_", + UserCount="_", + PlayCount="_", + StreamCount="_", } local mesType={ - Connect=true, - Self=true, - Broadcast=true, - Private=true, - Server=true, + Connect=true, + Self=true, + Broadcast=true, + Private=true, + Server=true, } --Lock & Unlock submodule local locks do - local rawset=rawset - locks=setmetatable({},{ - __index=function(self,k)rawset(self,k,-1e99)return -1e99 end, - __newindex=function(self,k)rawset(self,k,-1e99)end, - }) + local rawset=rawset + locks=setmetatable({},{ + __index=function(self,k)rawset(self,k,-1e99)return -1e99 end, + __newindex=function(self,k)rawset(self,k,-1e99)end, + }) end function NET.lock(name,T) - if TIME()>=locks[name]then - locks[name]=TIME()+(T or 1e99) - return true - else - return false - end + if TIME()>=locks[name]then + locks[name]=TIME()+(T or 1e99) + return true + else + return false + end end function NET.unlock(name) - locks[name]=-1e99 + locks[name]=-1e99 end function NET.getlock(name) - return TIME()=res.lowest then - NET.allow_online=true - if USER.authToken then - NET.wsconn_user_token(USER.uid,USER.authToken) - elseif SCN.cur=='main'then - SCN.go('login') - end - end - if VERSION.code=res.lowest then + NET.allow_online=true + if USER.authToken then + NET.wsconn_user_token(USER.uid,USER.authToken) + elseif SCN.cur=='main'then + SCN.go('login') + end + end + if VERSION.code0 end function netPLY.setPlayerObj(ply,p)ply.p=p end function netPLY.setConf(uid,config)PLYmap[uid].config=config end function netPLY.setJoinMode(uid,ready) - for _,p in next,PLYlist do - if p.uid==uid then - if p.mode~=ready then - p.mode=ready - if ready==0 then NET.roomReadyState=false end - SFX.play('spin_0',.6) - if p.uid==USER.uid then - NET.unlock('ready') - elseif PLYmap[USER.uid].mode==0 then - for j=1,#PLYlist do - if not p.uid==USER.uid and PLYlist[j].mode==0 then - return - end - end - SFX.play('blip_2',.5) - end - end - return - end - end + for _,p in next,PLYlist do + if p.uid==uid then + if p.mode~=ready then + p.mode=ready + if ready==0 then NET.roomReadyState=false end + SFX.play('spin_0',.6) + if p.uid==USER.uid then + NET.unlock('ready') + elseif PLYmap[USER.uid].mode==0 then + for j=1,#PLYlist do + if not p.uid==USER.uid and PLYlist[j].mode==0 then + return + end + end + SFX.play('blip_2',.5) + end + end + return + end + end end function netPLY.setConnect(uid)PLYmap[uid].connected=true end function netPLY.setPlace(uid,place)PLYmap[uid].place=place end function netPLY.setStat(uid,S) - PLYmap[uid].stat={ - lpm=("%.1f %s"):format(S.row/S.time*60,text.radarData[5]), - apm=("%.1f %s"):format(S.atk/S.time*60,text.radarData[3]), - adpm=("%.1f %s"):format((S.atk+S.dig)/S.time*60,text.radarData[2]), - } + PLYmap[uid].stat={ + lpm=("%.1f %s"):format(S.row/S.time*60,text.radarData[5]), + apm=("%.1f %s"):format(S.atk/S.time*60,text.radarData[3]), + adpm=("%.1f %s"):format((S.atk+S.dig)/S.time*60,text.radarData[2]), + } end function netPLY.resetState() - for i=1,#PLYlist do - PLYlist[i].mode=0 - PLYlist[i].connected=false - end + for i=1,#PLYlist do + PLYlist[i].mode=0 + PLYlist[i].connected=false + end end local selP,mouseX,mouseY function netPLY.mouseMove(x,y) - selP=nil - for i=1,#PLYlist do - local p=PLYlist[i] - if x>p.x and y>p.y and xp.x and y>p.y and x=47 then - setFont(40) - gc_print("#"..p.uid,50,-5) - gc_print(p.username,210,-5) - else - setFont(15) - gc_print("#"..p.uid,46,-1) - setFont(30) - gc_print(p.username,p.h,8) - end + --UID & Username + if p.h>=47 then + setFont(40) + gc_print("#"..p.uid,50,-5) + gc_print(p.username,210,-5) + else + setFont(15) + gc_print("#"..p.uid,46,-1) + setFont(30) + gc_print(p.username,p.h,8) + end - --Stat - local S=p.stat - if S and(p.h>=55 or p.w>=180)then - setFont(20) - local x=p.w-155 - if p.h>=55 then - gc_printf(S.adpm,x,2,150,'right') - gc_printf(S.apm,x,24,150,'right') - gc_printf(S.lpm,x,46,150,'right') - else - gc_printf(S.adpm,x,0,150,'right') - gc_printf(S.lpm,x,19,150,'right') - end - end - gc_setStencilTest() - gc_translate(-p.x,-p.y) - end - if selP then - gc_translate(min(mouseX,880),min(mouseY,460)) - gc_setColor(.2,.2,.2,.7) - gc_rectangle('fill',0,0,400,260) - gc_setColor(1,1,1) - gc_setLineWidth(2) - gc_rectangle('line',0,0,400,260) + --Stat + local S=p.stat + if S and(p.h>=55 or p.w>=180)then + setFont(20) + local x=p.w-155 + if p.h>=55 then + gc_printf(S.adpm,x,2,150,'right') + gc_printf(S.apm,x,24,150,'right') + gc_printf(S.lpm,x,46,150,'right') + else + gc_printf(S.adpm,x,0,150,'right') + gc_printf(S.lpm,x,19,150,'right') + end + end + gc_setStencilTest() + gc_translate(-p.x,-p.y) + end + if selP then + gc_translate(min(mouseX,880),min(mouseY,460)) + gc_setColor(.2,.2,.2,.7) + gc_rectangle('fill',0,0,400,260) + gc_setColor(1,1,1) + gc_setLineWidth(2) + gc_rectangle('line',0,0,400,260) - gc_draw(USERS.getAvatar(selP.uid),5,5,nil,.5) - setFont(30) - gc_print("#"..selP.uid,75,0) - setFont(35) - gc_print(selP.username,75,25) - setFont(20) - gc_printf(USERS.getMotto(selP.uid),5,70,390) - if selP.stat then - local S=selP.stat - gc_print(S.lpm,5,193) - gc_print(S.apm,5,213) - gc_print(S.adpm,5,233) - end - gc_translate(-min(mouseX,880),-min(mouseY,460)) - end + gc_draw(USERS.getAvatar(selP.uid),5,5,nil,.5) + setFont(30) + gc_print("#"..selP.uid,75,0) + setFont(35) + gc_print(selP.username,75,25) + setFont(20) + gc_printf(USERS.getMotto(selP.uid),5,70,390) + if selP.stat then + local S=selP.stat + gc_print(S.lpm,5,193) + gc_print(S.apm,5,213) + gc_print(S.adpm,5,233) + end + gc_translate(-min(mouseX,880),-min(mouseY,460)) + end end return netPLY \ No newline at end of file diff --git a/parts/patron.lua b/parts/patron.lua index 6e929b28..8954cd02 100644 --- a/parts/patron.lua +++ b/parts/patron.lua @@ -1,120 +1,120 @@ return{ - {font=100,name="☆★白羽★☆"}, + {font=100,name="☆★白羽★☆"}, - {font=65,name="那没事了(T6300)"}, - {font=65,name="加油啊,钉钉动了的大哥哥(T3228)"}, - {font=65,name="弥佑瑶"}, - {font=65,name="Alan"}, - {font=65,name="幽灵3383"}, - {font=65,name="靏鸖龘龘"}, - {font=65,name="込余"}, - {font=65,name="saki"}, - {font=70,name="模电"}, - {font=65,name="吃水榴莲"}, - {font=65,name="世界沃德"}, - {font=65,name="Petris"}, - {font=65,name="Zakeru"}, - {font=65,name="镝"}, - {font=65,name="HitachiMako"}, - {font=65,name="我慌死了"}, - {font=65,name="PESWGGL"}, - {font=65,name="Ghost princess"}, - {font=65,name="奏之章"}, - {font=65,name="猫宫"}, - {font=65,name="Notypey"}, - {font=65,name="亮君"}, - {font=65,name="gggf127"}, - {font=65,name="柴影"}, - {font=65,name="怀沙"}, - {font=65,name="星街书婉"}, + {font=65,name="那没事了(T6300)"}, + {font=65,name="加油啊,钉钉动了的大哥哥(T3228)"}, + {font=65,name="弥佑瑶"}, + {font=65,name="Alan"}, + {font=65,name="幽灵3383"}, + {font=65,name="靏鸖龘龘"}, + {font=65,name="込余"}, + {font=65,name="saki"}, + {font=70,name="模电"}, + {font=65,name="吃水榴莲"}, + {font=65,name="世界沃德"}, + {font=65,name="Petris"}, + {font=65,name="Zakeru"}, + {font=65,name="镝"}, + {font=65,name="HitachiMako"}, + {font=65,name="我慌死了"}, + {font=65,name="PESWGGL"}, + {font=65,name="Ghost princess"}, + {font=65,name="奏之章"}, + {font=65,name="猫宫"}, + {font=65,name="Notypey"}, + {font=65,name="亮君"}, + {font=65,name="gggf127"}, + {font=65,name="柴影"}, + {font=65,name="怀沙"}, + {font=65,name="星街书婉"}, - {font=25,name="八零哥"}, - {font=25,name="蕴空之灵"}, - {font=25,name="solainu"}, - {font=25,name="ThTsOd"}, - {font=25,name="Fireboos"}, - {font=25,name="星月千雪"}, - {font=25,name="10元"}, - {font=25,name="立斐"}, - {font=25,name="Deep_Sea"}, - {font=25,name="时雪"}, - {font=25,name="yyangdid"}, - {font=25,name="sfqr"}, - {font=25,name="心痕"}, - {font=25,name="Sasoric"}, - {font=25,name="夏小亚"}, - {font=25,name="仁参"}, - {font=25,name="乐↗乐↘"}, - {font=25,name="开挂被封的ztcjoin"}, - {font=25,name="面包"}, - {font=25,name="蠢熏"}, - {font=25,name="潘一栗"}, - {font=25,name="Lied"}, - {font=25,name="祝西"}, - {font=25,name="829"}, - {font=25,name="e m*12"}, - {font=25,name="我永远爱白银诺艾尔(鹏"}, - {font=25,name="PCX"}, - {font=25,name="kagura77"}, - {font=25,name="呆喂"}, - {font=25,name="GlowingEmbers"}, - {font=25,name="轩辕辚"}, - {font=25,name="HimuroAki"}, - {font=25,name="TCV100"}, - {font=25,name="tech有养成系统了@7065"}, - {font=25,name="HAGE KANOBU"}, - {font=25,name="闪电和拐棍"}, - {font=25,name="葡萄味的曼妥思"}, - {font=25,name="蓝绿"}, - {font=25,name="天生的魔法师"}, - {font=25,name="琳雨空"}, - {font=25,name="T8779.易缄"}, - {font=25,name="诗情画意"}, - {font=25,name="星姐阿夸双推Man暗炎"}, - {font=25,name="[*炎]"}, - {font=25,name="[*Y]"}, - {font=25,name="aaa222"}, - {font=25,name="[**城]"}, - {font=25,name="cnDD"}, - {font=25,name="红桃老给"}, - {font=25,name="昭庭玲秋"}, - {font=25,name="旋树墩"}, - {font=25,name="火花工作室"}, - {font=25,name="Cosine"}, - {font=25,name="沁音的芝麻王"}, - {font=25,name="SuperJH"}, - {font=25,name="天上_飞"}, - {font=25,name="uiro"}, - {font=25,name="宇酱"}, - {font=25,name="[W*N]"}, - {font=25,name="[Z*.]"}, - {font=25,name="[*之]"}, - {font=25,name="白衣"}, - {font=25,name="给虫"}, - {font=25,name="我永远喜欢樱花小姐"}, - {font=25,name="xb"}, - {font=25,name="flaribbit"}, - {font=25,name="工口发动机"}, - {font=25,name="金海星"}, - {font=25,name="tatianyi"}, - {font=25,name="[*瞳]"}, - {font=25,name="彼方云城"}, - {font=25,name="pm250"}, - {font=25,name="nanaya"}, - {font=25,name="黑红蓝白"}, - {font=25,name="细胞"}, - {font=25,name="流光梦"}, - {font=25,name="George2003"}, - {font=25,name="竹月可安"}, - {font=25,name="T7887库德里尔"}, - {font=25,name="[*月]"}, - {font=25,name="凌月"}, - {font=25,name="e"}, - {font=25,name="爱吃麻薯的幽幽子"}, - {font=25,name="[*梅]"}, - {font=25,name="晦风羽幕"}, - {font=25,name="T9753"}, - {font=25,name="Trebor"}, - {font=25,name="[w*o]"}, - {font=25,name="蚂蚁"}, + {font=25,name="八零哥"}, + {font=25,name="蕴空之灵"}, + {font=25,name="solainu"}, + {font=25,name="ThTsOd"}, + {font=25,name="Fireboos"}, + {font=25,name="星月千雪"}, + {font=25,name="10元"}, + {font=25,name="立斐"}, + {font=25,name="Deep_Sea"}, + {font=25,name="时雪"}, + {font=25,name="yyangdid"}, + {font=25,name="sfqr"}, + {font=25,name="心痕"}, + {font=25,name="Sasoric"}, + {font=25,name="夏小亚"}, + {font=25,name="仁参"}, + {font=25,name="乐↗乐↘"}, + {font=25,name="开挂被封的ztcjoin"}, + {font=25,name="面包"}, + {font=25,name="蠢熏"}, + {font=25,name="潘一栗"}, + {font=25,name="Lied"}, + {font=25,name="祝西"}, + {font=25,name="829"}, + {font=25,name="e m*12"}, + {font=25,name="我永远爱白银诺艾尔(鹏"}, + {font=25,name="PCX"}, + {font=25,name="kagura77"}, + {font=25,name="呆喂"}, + {font=25,name="GlowingEmbers"}, + {font=25,name="轩辕辚"}, + {font=25,name="HimuroAki"}, + {font=25,name="TCV100"}, + {font=25,name="tech有养成系统了@7065"}, + {font=25,name="HAGE KANOBU"}, + {font=25,name="闪电和拐棍"}, + {font=25,name="葡萄味的曼妥思"}, + {font=25,name="蓝绿"}, + {font=25,name="天生的魔法师"}, + {font=25,name="琳雨空"}, + {font=25,name="T8779.易缄"}, + {font=25,name="诗情画意"}, + {font=25,name="星姐阿夸双推Man暗炎"}, + {font=25,name="[*炎]"}, + {font=25,name="[*Y]"}, + {font=25,name="aaa222"}, + {font=25,name="[**城]"}, + {font=25,name="cnDD"}, + {font=25,name="红桃老给"}, + {font=25,name="昭庭玲秋"}, + {font=25,name="旋树墩"}, + {font=25,name="火花工作室"}, + {font=25,name="Cosine"}, + {font=25,name="沁音的芝麻王"}, + {font=25,name="SuperJH"}, + {font=25,name="天上_飞"}, + {font=25,name="uiro"}, + {font=25,name="宇酱"}, + {font=25,name="[W*N]"}, + {font=25,name="[Z*.]"}, + {font=25,name="[*之]"}, + {font=25,name="白衣"}, + {font=25,name="给虫"}, + {font=25,name="我永远喜欢樱花小姐"}, + {font=25,name="xb"}, + {font=25,name="flaribbit"}, + {font=25,name="工口发动机"}, + {font=25,name="金海星"}, + {font=25,name="tatianyi"}, + {font=25,name="[*瞳]"}, + {font=25,name="彼方云城"}, + {font=25,name="pm250"}, + {font=25,name="nanaya"}, + {font=25,name="黑红蓝白"}, + {font=25,name="细胞"}, + {font=25,name="流光梦"}, + {font=25,name="George2003"}, + {font=25,name="竹月可安"}, + {font=25,name="T7887库德里尔"}, + {font=25,name="[*月]"}, + {font=25,name="凌月"}, + {font=25,name="e"}, + {font=25,name="爱吃麻薯的幽幽子"}, + {font=25,name="[*梅]"}, + {font=25,name="晦风羽幕"}, + {font=25,name="T9753"}, + {font=25,name="Trebor"}, + {font=25,name="[w*o]"}, + {font=25,name="蚂蚁"}, } \ No newline at end of file diff --git a/parts/player/draw.lua b/parts/player/draw.lua index 12cf869e..1b55111f 100644 --- a/parts/player/draw.lua +++ b/parts/player/draw.lua @@ -18,508 +18,508 @@ local drawableText,missionEnum,minoColor=drawableText,missionEnum,minoColor local RCPB={10,33,200,33,105,5,105,60} local attackColor={ - {COLOR.dH,COLOR.Z}, - {COLOR.H,COLOR.Z}, - {COLOR.lV,COLOR.Z}, - {COLOR.lR,COLOR.Z}, - {COLOR.dG,COLOR.C}, + {COLOR.dH,COLOR.Z}, + {COLOR.H,COLOR.Z}, + {COLOR.lV,COLOR.Z}, + {COLOR.lR,COLOR.Z}, + {COLOR.dG,COLOR.C}, } local hideBoardStencil={ - up=function()gc_rectangle('fill',0,-600,300,300,6)end, - down=function()gc_rectangle('fill',0,-300,300,300,6)end, - all=function()gc_rectangle('fill',0,-600,300,600,6)end, + up=function()gc_rectangle('fill',0,-600,300,300,6)end, + down=function()gc_rectangle('fill',0,-300,300,300,6)end, + all=function()gc_rectangle('fill',0,-600,300,600,6)end, } local dialFrame=GC.DO{80,80, - {'setLW',3}, - {'dCirc',40,40,38}, + {'setLW',3}, + {'dCirc',40,40,38}, } local dialNeedle=GC.DO{32,3, - {'setLW',3}, - {'fRect',0,0,32,3,2}, - {'setCL',1,.3,.3}, - {'fRect',0,0,12,3,2}, + {'setLW',3}, + {'fRect',0,0,32,3,2}, + {'setCL',1,.3,.3}, + {'fRect',0,0,12,3,2}, } local multiple=GC.DO{15,15, - {'setLW',3}, - {'line',2,2,12,12}, - {'line',2,12,12,2}, + {'setLW',3}, + {'line',2,2,12,12}, + {'line',2,12,12,2}, } local playerBoarder=GC.DO{334,620, - {'setLW',2}, - {'setCL',.97,.97,.97}, - {'dRect',16,1,302,618,5}, - {'fRect',17,612,300,2}, - {'dRect',318,10,15,604,3}, - {'dRect',1,10,15,604,3}, + {'setLW',2}, + {'setCL',.97,.97,.97}, + {'dRect',16,1,302,618,5}, + {'fRect',17,612,300,2}, + {'dRect',318,10,15,604,3}, + {'dRect',1,10,15,604,3}, } local gridLines do - local L={300,640,{'setLW',2}} - for x=1,9 do table.insert(L,{'line',30*x,0,30*x,640})end - for y=0,20 do table.insert(L,{'line',0,10+30*y,300,10+30*y})end - gridLines=GC.DO(L) + local L={300,640,{'setLW',2}} + for x=1,9 do table.insert(L,{'line',30*x,0,30*x,640})end + for y=0,20 do table.insert(L,{'line',0,10+30*y,300,10+30*y})end + gridLines=GC.DO(L) end local LDmarks=gc.newSpriteBatch(GC.DO{14,5,{'fRect',0,0,14,5,3}},15,'static') for i=0,14 do LDmarks:add(3+20*i,615)end local function _boardTransform(mode) - if mode then - if mode=="U-D"then - gc_translate(0,590) - gc_scale(1,-1) - elseif mode=="L-R"then - gc_translate(300,0) - gc_scale(-1,1) - elseif mode=="180"then - gc_translate(300,590) - gc_scale(-1,-1) - end - end + if mode then + if mode=="U-D"then + gc_translate(0,590) + gc_scale(1,-1) + elseif mode=="L-R"then + gc_translate(300,0) + gc_scale(-1,1) + elseif mode=="180"then + gc_translate(300,590) + gc_scale(-1,-1) + end + end end local function _stencilBoard()gc_rectangle('fill',0,-10,300,610)end local function _applyField(P) - gc_push('transform') + gc_push('transform') - --Apply fieldOffset - local O=P.fieldOff - if P.gameEnv.shakeFX then - local k=P.gameEnv.shakeFX - gc_translate(O.x*k+150+150,O.y*k+300) - gc_rotate(O.a*k) - gc_translate(-150,-300) - else - gc_translate(150,0) - end + --Apply fieldOffset + local O=P.fieldOff + if P.gameEnv.shakeFX then + local k=P.gameEnv.shakeFX + gc_translate(O.x*k+150+150,O.y*k+300) + gc_rotate(O.a*k) + gc_translate(-150,-300) + else + gc_translate(150,0) + end - --Apply stencil - gc_stencil(_stencilBoard) - gc_setStencilTest('equal',1) + --Apply stencil + gc_stencil(_stencilBoard) + gc_setStencilTest('equal',1) - --Move camera - gc_push('transform') - _boardTransform(P.gameEnv.flipBoard) - gc_translate(0,P.fieldBeneath+P.fieldUp) + --Move camera + gc_push('transform') + _boardTransform(P.gameEnv.flipBoard) + gc_translate(0,P.fieldBeneath+P.fieldUp) end local function _cancelField() - gc_setStencilTest() - gc_pop() - gc_pop() + gc_setStencilTest() + gc_pop() + gc_pop() end local function _drawRow(texture,h,V,L,showInvis) - local t=TIME()*4 - for i=1,10 do - if L[i]>0 then - if V[i]>0 then - gc_setColor(1,1,1,V[i]*.05) - gc_draw(texture[L[i]],30*i-30,-30*h) - elseif showInvis then - gc_setColor(1,1,1,.3+.08*sin(.5*(h-i)+t)) - gc_rectangle('fill',30*i-30,-30*h,30,30) - end - end - end + local t=TIME()*4 + for i=1,10 do + if L[i]>0 then + if V[i]>0 then + gc_setColor(1,1,1,V[i]*.05) + gc_draw(texture[L[i]],30*i-30,-30*h) + elseif showInvis then + gc_setColor(1,1,1,.3+.08*sin(.5*(h-i)+t)) + gc_rectangle('fill',30*i-30,-30*h,30,30) + end + end + end end local function _drawField(P,showInvis) - local ENV=P.gameEnv - local V,F=P.visTime,P.field - local start=int((P.fieldBeneath+P.fieldUp)/30+1) - local texture=P.skinLib - if P.falling==-1 then--Blocks only - if ENV.upEdge then - gc_setShader(shader_lighter) - gc_translate(0,-4) - -- - for j=start,min(start+21,#F)do _drawRow(texture,j,V[j],F[j])end - -- - gc_setShader(shader_fieldSatur) - gc_translate(0,4) - end + local ENV=P.gameEnv + local V,F=P.visTime,P.field + local start=int((P.fieldBeneath+P.fieldUp)/30+1) + local texture=P.skinLib + if P.falling==-1 then--Blocks only + if ENV.upEdge then + gc_setShader(shader_lighter) + gc_translate(0,-4) + -- + for j=start,min(start+21,#F)do _drawRow(texture,j,V[j],F[j])end + -- + gc_setShader(shader_fieldSatur) + gc_translate(0,4) + end - -- - for j=start,min(start+21,#F)do _drawRow(texture,j,V[j],F[j],showInvis)end - -- - else--With falling animation - local stepY=ENV.smooth and(P.falling/(ENV.fall+1))^1.6*30 or 30 - local alpha=P.falling/ENV.fall - local h=1 - if ENV.upEdge then - gc_push('transform') - gc_setShader(shader_lighter) - gc_translate(0,-4) - -- - for j=start,min(start+21,#F)do - while j==P.clearingRow[h]do - h=h+1 - gc_translate(0,-stepY) - end - _drawRow(texture,j,V[j],F[j]) - end - -- - gc_setShader(shader_fieldSatur) - gc_pop() - h=1 - end + -- + for j=start,min(start+21,#F)do _drawRow(texture,j,V[j],F[j],showInvis)end + -- + else--With falling animation + local stepY=ENV.smooth and(P.falling/(ENV.fall+1))^1.6*30 or 30 + local alpha=P.falling/ENV.fall + local h=1 + if ENV.upEdge then + gc_push('transform') + gc_setShader(shader_lighter) + gc_translate(0,-4) + -- + for j=start,min(start+21,#F)do + while j==P.clearingRow[h]do + h=h+1 + gc_translate(0,-stepY) + end + _drawRow(texture,j,V[j],F[j]) + end + -- + gc_setShader(shader_fieldSatur) + gc_pop() + h=1 + end - gc_push('transform') - -- - for j=start,min(start+21,#F)do - while j==P.clearingRow[h]do - h=h+1 - gc_translate(0,-stepY) - gc_setColor(1,1,1,alpha) - gc_rectangle('fill',0,30-30*j,300,stepY) - end - _drawRow(texture,j,V[j],F[j],showInvis) - end - -- - gc_pop() - end - gc_setShader() + gc_push('transform') + -- + for j=start,min(start+21,#F)do + while j==P.clearingRow[h]do + h=h+1 + gc_translate(0,-stepY) + gc_setColor(1,1,1,alpha) + gc_rectangle('fill',0,30-30*j,300,stepY) + end + _drawRow(texture,j,V[j],F[j],showInvis) + end + -- + gc_pop() + end + gc_setShader() end local function _drawFXs(P) - --LockFX - for i=1,#P.lockFX do - local S=P.lockFX[i] - if S[3]<.5 then - gc_setColor(1,1,1,2*S[3]) - gc_rectangle('fill',S[1],S[2],60*S[3],30) - else - gc_setColor(1,1,1,2-2*S[3]) - gc_rectangle('fill',S[1]+30,S[2],60*S[3]-60,30) - end - end + --LockFX + for i=1,#P.lockFX do + local S=P.lockFX[i] + if S[3]<.5 then + gc_setColor(1,1,1,2*S[3]) + gc_rectangle('fill',S[1],S[2],60*S[3],30) + else + gc_setColor(1,1,1,2-2*S[3]) + gc_rectangle('fill',S[1]+30,S[2],60*S[3]-60,30) + end + end - --DropFX - for i=1,#P.dropFX do - local S=P.dropFX[i] - gc_setColor(1,1,1,.6-S[5]*.6) - local w=30*S[3]*(1-S[5]*.5) - gc_rectangle('fill',30*S[1]-30+15*S[3]-w*.5,-30*S[2],w,30*S[4]) - end + --DropFX + for i=1,#P.dropFX do + local S=P.dropFX[i] + gc_setColor(1,1,1,.6-S[5]*.6) + local w=30*S[3]*(1-S[5]*.5) + gc_rectangle('fill',30*S[1]-30+15*S[3]-w*.5,-30*S[2],w,30*S[4]) + end - --MoveFX - local texture=P.skinLib - for i=1,#P.moveFX do - local S=P.moveFX[i] - gc_setColor(1,1,1,.6-S[4]*.6) - gc_draw(texture[S[1]],30*S[2]-30,-30*S[3]) - end + --MoveFX + local texture=P.skinLib + for i=1,#P.moveFX do + local S=P.moveFX[i] + gc_setColor(1,1,1,.6-S[4]*.6) + gc_draw(texture[S[1]],30*S[2]-30,-30*S[3]) + end - --ClearFX - for i=1,#P.clearFX do - local S=P.clearFX[i] - local t=S[2] - local x=t<.3 and 1-(3.3333*t-1)^2 or 1 - local y=t<.2 and 5*t or 1-1.25*(t-.2) - gc_setColor(1,1,1,y) - gc_rectangle('fill',150-x*150,15-S[1]*30-y*15,300*x,y*30) - end + --ClearFX + for i=1,#P.clearFX do + local S=P.clearFX[i] + local t=S[2] + local x=t<.3 and 1-(3.3333*t-1)^2 or 1 + local y=t<.2 and 5*t or 1-1.25*(t-.2) + gc_setColor(1,1,1,y) + gc_rectangle('fill',150-x*150,15-S[1]*30-y*15,300*x,y*30) + end end local drawGhost={ - color=function(CB,curX,ghoY,alpha,texture,clr) - gc_setColor(1,1,1,alpha) - for i=1,#CB do for j=1,#CB[1]do - if CB[i][j]then - gc_draw(texture[clr],30*(j+curX-1)-30,-30*(i+ghoY-1)) - end - end end - end, - gray=function(CB,curX,ghoY,alpha,texture,_) - gc_setColor(1,1,1,alpha) - for i=1,#CB do for j=1,#CB[1]do - if CB[i][j]then - gc_draw(texture[21],30*(j+curX-1)-30,-30*(i+ghoY-1)) - end - end end - end, - colorCell=function(CB,curX,ghoY,alpha,_,clr) - clr=minoColor[clr] - gc_setColor(clr[1],clr[2],clr[3],alpha) - for i=1,#CB do for j=1,#CB[1]do - if CB[i][j]then - gc_rectangle('fill',30*(j+curX-1)-30,-30*(i+ghoY-1),30,30) - end - end end - end, - grayCell=function(CB,curX,ghoY,alpha,_,_) - gc_setColor(1,1,1,alpha) - for i=1,#CB do for j=1,#CB[1]do - if CB[i][j]then - gc_rectangle('fill',30*(j+curX-1)-30,-30*(i+ghoY-1),30,30) - end - end end - end, - colorLine=function(CB,curX,ghoY,alpha,_,clr) - clr=minoColor[clr] - gc_setColor(clr[1],clr[2],clr[3],alpha) - gc_setLineWidth(4) - for i=1,#CB do for j=1,#CB[1]do - if CB[i][j]then - gc_rectangle('line',30*(j+curX-1)-30+4,-30*(i+ghoY-1)+4,22,22) - end - end end - end, - grayLine=function(CB,curX,ghoY,alpha,_,_) - gc_setColor(1,1,1,alpha) - gc_setLineWidth(4) - for i=1,#CB do for j=1,#CB[1]do - if CB[i][j]then - gc_rectangle('line',30*(j+curX-1)-30+4,-30*(i+ghoY-1)+4,22,22) - end - end end - end, + color=function(CB,curX,ghoY,alpha,texture,clr) + gc_setColor(1,1,1,alpha) + for i=1,#CB do for j=1,#CB[1]do + if CB[i][j]then + gc_draw(texture[clr],30*(j+curX-1)-30,-30*(i+ghoY-1)) + end + end end + end, + gray=function(CB,curX,ghoY,alpha,texture,_) + gc_setColor(1,1,1,alpha) + for i=1,#CB do for j=1,#CB[1]do + if CB[i][j]then + gc_draw(texture[21],30*(j+curX-1)-30,-30*(i+ghoY-1)) + end + end end + end, + colorCell=function(CB,curX,ghoY,alpha,_,clr) + clr=minoColor[clr] + gc_setColor(clr[1],clr[2],clr[3],alpha) + for i=1,#CB do for j=1,#CB[1]do + if CB[i][j]then + gc_rectangle('fill',30*(j+curX-1)-30,-30*(i+ghoY-1),30,30) + end + end end + end, + grayCell=function(CB,curX,ghoY,alpha,_,_) + gc_setColor(1,1,1,alpha) + for i=1,#CB do for j=1,#CB[1]do + if CB[i][j]then + gc_rectangle('fill',30*(j+curX-1)-30,-30*(i+ghoY-1),30,30) + end + end end + end, + colorLine=function(CB,curX,ghoY,alpha,_,clr) + clr=minoColor[clr] + gc_setColor(clr[1],clr[2],clr[3],alpha) + gc_setLineWidth(4) + for i=1,#CB do for j=1,#CB[1]do + if CB[i][j]then + gc_rectangle('line',30*(j+curX-1)-30+4,-30*(i+ghoY-1)+4,22,22) + end + end end + end, + grayLine=function(CB,curX,ghoY,alpha,_,_) + gc_setColor(1,1,1,alpha) + gc_setLineWidth(4) + for i=1,#CB do for j=1,#CB[1]do + if CB[i][j]then + gc_rectangle('line',30*(j+curX-1)-30+4,-30*(i+ghoY-1)+4,22,22) + end + end end + end, } local function _drawBlockOutline(CB,curX,curY,texture,trans) - shader_alpha:send('a',trans) - gc_setShader(shader_alpha) - for i=1,#CB do for j=1,#CB[1]do - if CB[i][j]then - local x=30*(j+curX)-60-3 - local y=30-30*(i+curY)-3 - gc_draw(texture,x,y) - gc_draw(texture,x+6,y+6) - gc_draw(texture,x+6,y) - gc_draw(texture,x,y+6) - end - end end - gc_setShader() + shader_alpha:send('a',trans) + gc_setShader(shader_alpha) + for i=1,#CB do for j=1,#CB[1]do + if CB[i][j]then + local x=30*(j+curX)-60-3 + local y=30-30*(i+curY)-3 + gc_draw(texture,x,y) + gc_draw(texture,x+6,y+6) + gc_draw(texture,x+6,y) + gc_draw(texture,x,y+6) + end + end end + gc_setShader() end local function _drawBlockShade(CB,curX,curY,alpha) - gc_setColor(1,1,1,alpha) - for i=1,#CB do for j=1,#CB[1]do - if CB[i][j]then - gc_rectangle('fill',30*(j+curX)-60,30-30*(i+curY),30,30) - end - end end + gc_setColor(1,1,1,alpha) + for i=1,#CB do for j=1,#CB[1]do + if CB[i][j]then + gc_rectangle('fill',30*(j+curX)-60,30-30*(i+curY),30,30) + end + end end end local function _drawBlock(CB,curX,curY,texture) - gc_setColor(1,1,1) - gc_setShader(shader_blockSatur) - for i=1,#CB do for j=1,#CB[1]do - if CB[i][j]then - gc_draw(texture,30*(j+curX-1)-30,-30*(i+curY-1)) - end - end end - gc_setShader() + gc_setColor(1,1,1) + gc_setShader(shader_blockSatur) + for i=1,#CB do for j=1,#CB[1]do + if CB[i][j]then + gc_draw(texture,30*(j+curX-1)-30,-30*(i+curY-1)) + end + end end + gc_setShader() end local function _drawNextPreview(B,fieldH,fieldBeneath) - gc_setColor(1,1,1,.8) - local y=int(fieldH+1-modf(B.rs.centerPos[B.id][B.dir][1]))+ceil(fieldBeneath/30) - B=B.bk - local x=int(6-#B[1]*.5) - local cross=TEXTURE.puzzleMark[-1] - for i=1,#B do for j=1,#B[1]do - if B[i][j]then - gc_draw(cross,30*(x+j-2),30*(1-y-i)) - end - end end + gc_setColor(1,1,1,.8) + local y=int(fieldH+1-modf(B.rs.centerPos[B.id][B.dir][1]))+ceil(fieldBeneath/30) + B=B.bk + local x=int(6-#B[1]*.5) + local cross=TEXTURE.puzzleMark[-1] + for i=1,#B do for j=1,#B[1]do + if B[i][j]then + gc_draw(cross,30*(x+j-2),30*(1-y-i)) + end + end end end local function _drawBuffer(atkBuffer,bufferWarn,atkBufferSum1,atkBufferSum) - local h=0 - for i=1,#atkBuffer do - local A=atkBuffer[i] - local bar=A.amount*30 - if h+bar>600 then bar=600-h end - if not A.sent then - --Appear - if A.time<20 then - bar=bar*(20*A.time)^.5*.05 - end - if A.countdown>0 then - --Timing - gc_setColor(attackColor[A.lv][1]) - gc_rectangle('fill',303,600-h-bar,11,bar,2) - gc_setColor(1,1,1) - for j=30,A.cd0-30,30 do - gc_rectangle('fill',303,600-h-bar*(j/A.cd0),6,2) - end - gc_setColor(attackColor[A.lv][2]) - gc_rectangle('fill',303,600-h-bar,11,bar*(1-A.countdown/A.cd0),2) - else - --Warning - local a=math.sin((TIME()-i)*30)*.5+.5 - local c1,c2=attackColor[A.lv][1],attackColor[A.lv][2] - gc_setColor(c1[1]*a+c2[1]*(1-a),c1[2]*a+c2[2]*(1-a),c1[3]*a+c2[3]*(1-a)) - gc_rectangle('fill',303,600-h-bar,11,bar,2) - end - else - gc_setColor(attackColor[A.lv][1]) - bar=bar*(20-A.time)*.05 - gc_rectangle('fill',303,600-h-bar,11,bar,2) - --Disappear - end - h=h+bar - end - if bufferWarn then - local sum=atkBufferSum1 - if sum>=8 then - gc_push('transform') - gc_translate(300,max(0,600-30*sum)) - gc_scale(min(.2+sum/50,1)) - gc_setColor(1,.2+min(sum*.02,.8)*(.5+.5*sin(TIME()*min(sum,32))),.2,min(sum/30,.8)) - setFont(100) - if sum>20 then - local d=atkBufferSum-sum - if d>.5 then - gc_translate(d^.5*(rnd()-.5)*15,d^.5*(rnd()-.5)*15) - end - end - gc_printf(int(sum),-300,-20,292,'right') - gc_pop() - end - end + local h=0 + for i=1,#atkBuffer do + local A=atkBuffer[i] + local bar=A.amount*30 + if h+bar>600 then bar=600-h end + if not A.sent then + --Appear + if A.time<20 then + bar=bar*(20*A.time)^.5*.05 + end + if A.countdown>0 then + --Timing + gc_setColor(attackColor[A.lv][1]) + gc_rectangle('fill',303,600-h-bar,11,bar,2) + gc_setColor(1,1,1) + for j=30,A.cd0-30,30 do + gc_rectangle('fill',303,600-h-bar*(j/A.cd0),6,2) + end + gc_setColor(attackColor[A.lv][2]) + gc_rectangle('fill',303,600-h-bar,11,bar*(1-A.countdown/A.cd0),2) + else + --Warning + local a=math.sin((TIME()-i)*30)*.5+.5 + local c1,c2=attackColor[A.lv][1],attackColor[A.lv][2] + gc_setColor(c1[1]*a+c2[1]*(1-a),c1[2]*a+c2[2]*(1-a),c1[3]*a+c2[3]*(1-a)) + gc_rectangle('fill',303,600-h-bar,11,bar,2) + end + else + gc_setColor(attackColor[A.lv][1]) + bar=bar*(20-A.time)*.05 + gc_rectangle('fill',303,600-h-bar,11,bar,2) + --Disappear + end + h=h+bar + end + if bufferWarn then + local sum=atkBufferSum1 + if sum>=8 then + gc_push('transform') + gc_translate(300,max(0,600-30*sum)) + gc_scale(min(.2+sum/50,1)) + gc_setColor(1,.2+min(sum*.02,.8)*(.5+.5*sin(TIME()*min(sum,32))),.2,min(sum/30,.8)) + setFont(100) + if sum>20 then + local d=atkBufferSum-sum + if d>.5 then + gc_translate(d^.5*(rnd()-.5)*15,d^.5*(rnd()-.5)*15) + end + end + gc_printf(int(sum),-300,-20,292,'right') + gc_pop() + end + end end local function _drawB2Bbar(b2b,b2b1) - local a,b=b2b,b2b1 - if a>b then a,b=b,a end - if b>0 then - gc_setColor(.8,1,.2) - gc_rectangle('fill',-14,600-b*.6,11,b*.6,2) - gc_setColor(b2b<50 and COLOR.Z or b2b<=800 and COLOR.lR or COLOR.lB) - gc_rectangle('fill',-14,600-a*.6,11,a*.6,2) - if TIME()%.5<.3 then - gc_setColor(1,1,1) - gc_rectangle('fill',-15,b<50 and 570 or 120,13,3,2) - end - end + local a,b=b2b,b2b1 + if a>b then a,b=b,a end + if b>0 then + gc_setColor(.8,1,.2) + gc_rectangle('fill',-14,600-b*.6,11,b*.6,2) + gc_setColor(b2b<50 and COLOR.Z or b2b<=800 and COLOR.lR or COLOR.lB) + gc_rectangle('fill',-14,600-a*.6,11,a*.6,2) + if TIME()%.5<.3 then + gc_setColor(1,1,1) + gc_rectangle('fill',-15,b<50 and 570 or 120,13,3,2) + end + end end local function _drawLDI(easyFresh,length,freshTime)--Lock Delay Indicator - if easyFresh then - gc_setColor(.97,.97,.97) - else - gc_setColor(1,.5,.5) - end - if length>=0 then - gc_rectangle('fill',0,602,300*length,4) - end - if freshTime>0 then - LDmarks:setDrawRange(1,min(freshTime,15)) - gc_draw(LDmarks) - end + if easyFresh then + gc_setColor(.97,.97,.97) + else + gc_setColor(1,.5,.5) + end + if length>=0 then + gc_rectangle('fill',0,602,300*length,4) + end + if freshTime>0 then + LDmarks:setDrawRange(1,min(freshTime,15)) + gc_draw(LDmarks) + end end local function _drawHold(holdQueue,holdCount,holdTime,skinLib) - local N=holdCount*72 - gc_push('transform') - gc_translate(12,20) - gc_setLineWidth(2) - gc_setColor(0,0,0,.4)gc_rectangle('fill',0,0,100,N+8,5) - gc_setColor(.97,.97,.97)gc_rectangle('line',0,0,100,N+8,5) - N=#holdQueue2 then - local S=P.stat - local t=P.finesseComboTime - local str=P.finesseCombo.."x" - if S.finesseRate==5*S.piece then - gc_setColor(.9,.9,.3,t*.2) - gc_print(str,20,570) - gc_setColor(.9,.9,.3,1.2-t*.1) - elseif S.maxFinesseCombo==S.piece then - gc_setColor(.7,.7,1,t*.2) - gc_print(str,20,570) - gc_setColor(.7,.7,1,1.2-t*.1) - else - gc_setColor(1,1,1,t*.2) - gc_print(str,20,570) - gc_setColor(1,1,1,1.2-t*.1) - end - gc_print(str,20,600,nil,1+t*.08,nil,0,30) - end + if P.finesseCombo>2 then + local S=P.stat + local t=P.finesseComboTime + local str=P.finesseCombo.."x" + if S.finesseRate==5*S.piece then + gc_setColor(.9,.9,.3,t*.2) + gc_print(str,20,570) + gc_setColor(.9,.9,.3,1.2-t*.1) + elseif S.maxFinesseCombo==S.piece then + gc_setColor(.7,.7,1,t*.2) + gc_print(str,20,570) + gc_setColor(.7,.7,1,1.2-t*.1) + else + gc_setColor(1,1,1,t*.2) + gc_print(str,20,570) + gc_setColor(1,1,1,1.2-t*.1) + end + gc_print(str,20,600,nil,1+t*.08,nil,0,30) + end end local function _drawFinesseCombo_remote(P) - if P.finesseCombo>2 then - local S=P.stat - if S.finesseRate==5*S.piece then - gc_setColor(.9,.9,.3) - elseif S.maxFinesseCombo==S.piece then - gc_setColor(.7,.7,1) - else - gc_setColor(.97,.97,.97) - end - gc_print(P.finesseCombo.."x",20,570) - end + if P.finesseCombo>2 then + local S=P.stat + if S.finesseRate==5*S.piece then + gc_setColor(.9,.9,.3) + elseif S.maxFinesseCombo==S.piece then + gc_setColor(.7,.7,1) + else + gc_setColor(.97,.97,.97) + end + gc_print(P.finesseCombo.."x",20,570) + end end local function _drawLife(life) - gc_setColor(.97,.97,.97) - gc_draw(IMG.lifeIcon,475,595,nil,.8) - if life>3 then - gc_draw(multiple,502,602) - setFont(20)gc_print(life,517,595) - else - if life>1 then gc_draw(IMG.lifeIcon,500,595,nil,.8)end - if life>2 then gc_draw(IMG.lifeIcon,525,595,nil,.8)end - end + gc_setColor(.97,.97,.97) + gc_draw(IMG.lifeIcon,475,595,nil,.8) + if life>3 then + gc_draw(multiple,502,602) + setFont(20)gc_print(life,517,595) + else + if life>1 then gc_draw(IMG.lifeIcon,500,595,nil,.8)end + if life>2 then gc_draw(IMG.lifeIcon,525,595,nil,.8)end + end end local function _drawMission(curMission,L,missionkill) - --Draw current mission - setFont(35) - if missionkill then - gc_setColor(1,.7+.2*sin(TIME()*6.26),.4) - else - gc_setColor(.97,.97,.97) - end - gc_print(missionEnum[L[curMission]],85,110) + --Draw current mission + setFont(35) + if missionkill then + gc_setColor(1,.7+.2*sin(TIME()*6.26),.4) + else + gc_setColor(.97,.97,.97) + end + gc_print(missionEnum[L[curMission]],85,110) - --Draw next mission - setFont(20) - for i=1,3 do - local m=L[curMission+i] - if m then - m=missionEnum[m] - gc_print(m,87-28*i,117) - else - break - end - end + --Draw next mission + setFont(20) + for i=1,3 do + local m=L[curMission+i] + if m then + m=missionEnum[m] + gc_print(m,87-28*i,117) + else + break + end + end end local function _drawStartCounter(time) - time=179-time - gc_push('transform') - gc_translate(300,300) - local num=int(time/60)+1 - local d=time%60 - if num==3 then - gc_setColor(.7,.8,.98) - if d>45 then gc_rotate((d-45)^2*.00355)end - elseif num==2 then - gc_setColor(.98,.85,.75) - if d>45 then gc_scale(1+(d/15-3)^2,1)end - elseif num==1 then - gc_setColor(1,.7,.7) - if d>45 then gc_scale(1,1+(d/15-3)^2)end - end - if d<20 then gc_scale((d/20)^.4)end - setFont(100) - mStr(num,0,-70) - gc_pop() + time=179-time + gc_push('transform') + gc_translate(300,300) + local num=int(time/60)+1 + local d=time%60 + if num==3 then + gc_setColor(.7,.8,.98) + if d>45 then gc_rotate((d-45)^2*.00355)end + elseif num==2 then + gc_setColor(.98,.85,.75) + if d>45 then gc_scale(1+(d/15-3)^2,1)end + elseif num==1 then + gc_setColor(1,.7,.7) + if d>45 then gc_scale(1,1+(d/15-3)^2)end + end + if d<20 then gc_scale((d/20)^.4)end + setFont(100) + mStr(num,0,-70) + gc_pop() end local draw={} @@ -527,496 +527,496 @@ draw.drawGhost=drawGhost draw.applyField=_applyField draw.cancelField=_cancelField function draw.drawNext_norm(P,repMode) - local ENV=P.gameEnv - local texture=P.skinLib - gc_translate(488,20) - gc_setLineWidth(2) - local N=ENV.nextCount*72 - gc_setColor(0,0,0,.4)gc_rectangle('fill',0,0,100,N+8,5) - gc_setColor(.97,.97,.97)gc_rectangle('line',0,0,100,N+8,5) - N=1 - gc_push('transform') - gc_translate(50,40) - gc_setColor(1,1,1) + local ENV=P.gameEnv + local texture=P.skinLib + gc_translate(488,20) + gc_setLineWidth(2) + local N=ENV.nextCount*72 + gc_setColor(0,0,0,.4)gc_rectangle('fill',0,0,100,N+8,5) + gc_setColor(.97,.97,.97)gc_rectangle('line',0,0,100,N+8,5) + N=1 + gc_push('transform') + gc_translate(50,40) + gc_setColor(1,1,1) - --Draw nexts - gc_setShader(shader_blockSatur) - local queue=P.nextQueue - while N<=ENV.nextCount and queue[N]do - local bk,sprite=queue[N].bk,texture[queue[N].color] - local k=min(2.3/#bk,3/#bk[1],.85) - gc_scale(k) - for i=1,#bk do for j=1,#bk[1]do - if bk[i][j]then - gc_draw(sprite,30*(j-#bk[1]*.5)-30,-30*(i-#bk*.5)) - end - end end - gc_scale(1/k) - N=N+1 - gc_translate(0,72) - end - gc_setShader() + --Draw nexts + gc_setShader(shader_blockSatur) + local queue=P.nextQueue + while N<=ENV.nextCount and queue[N]do + local bk,sprite=queue[N].bk,texture[queue[N].color] + local k=min(2.3/#bk,3/#bk[1],.85) + gc_scale(k) + for i=1,#bk do for j=1,#bk[1]do + if bk[i][j]then + gc_draw(sprite,30*(j-#bk[1]*.5)-30,-30*(i-#bk*.5)) + end + end end + gc_scale(1/k) + N=N+1 + gc_translate(0,72) + end + gc_setShader() - --Draw more nexts - if repMode then - gc_translate(50,-28) - local blockImg=TEXTURE.miniBlock - local skinSet=ENV.skin - local n=N - while n<=12 and queue[n]do - local id=queue[n].id - local _=minoColor[skinSet[id]] - gc_setColor(_[1],_[2],_[3],.2) - _=blockImg[id] - local h=_:getHeight() - gc_draw(_,-_:getWidth()*10,0,nil,10,nil) - gc_translate(0,10*h+3) - n=n+1 - end - end - gc_pop() + --Draw more nexts + if repMode then + gc_translate(50,-28) + local blockImg=TEXTURE.miniBlock + local skinSet=ENV.skin + local n=N + while n<=12 and queue[n]do + local id=queue[n].id + local _=minoColor[skinSet[id]] + gc_setColor(_[1],_[2],_[3],.2) + _=blockImg[id] + local h=_:getHeight() + gc_draw(_,-_:getWidth()*10,0,nil,10,nil) + gc_translate(0,10*h+3) + n=n+1 + end + end + gc_pop() - if ENV.bagLine then - gc_setColor(.8,.5,.5) - for i=-P.pieceCount%ENV.bagLine,N-1,ENV.bagLine do--i=phase - gc_rectangle('fill',2,72*i+3,96,2) - end - end - gc_translate(-488,-20) + if ENV.bagLine then + gc_setColor(.8,.5,.5) + for i=-P.pieceCount%ENV.bagLine,N-1,ENV.bagLine do--i=phase + gc_rectangle('fill',2,72*i+3,96,2) + end + end + gc_translate(-488,-20) end function draw.drawNext_hidden(P,repMode) - local ENV=P.gameEnv - local texture=P.skinLib - gc_translate(488,20) - gc_setLineWidth(2) - local N=ENV.nextCount*72 - gc_setColor(.5,0,0,.4)gc_rectangle('fill',0,0,100,N+8,5) - gc_setColor(.97,.97,.97)gc_rectangle('line',0,0,100,N+8,5) - local startN=min(ENV.nextStartPos,P.pieceCount+1) - if repMode then - gc_setColor(1,1,1,.2) - N=1 - else - gc_setColor(1,1,1) - N=startN - end - gc_push('transform') - gc_translate(50,72*N-32) + local ENV=P.gameEnv + local texture=P.skinLib + gc_translate(488,20) + gc_setLineWidth(2) + local N=ENV.nextCount*72 + gc_setColor(.5,0,0,.4)gc_rectangle('fill',0,0,100,N+8,5) + gc_setColor(.97,.97,.97)gc_rectangle('line',0,0,100,N+8,5) + local startN=min(ENV.nextStartPos,P.pieceCount+1) + if repMode then + gc_setColor(1,1,1,.2) + N=1 + else + gc_setColor(1,1,1) + N=startN + end + gc_push('transform') + gc_translate(50,72*N-32) - --Draw nexts - gc_setShader(shader_blockSatur) - local queue=P.nextQueue - while N<=ENV.nextCount and queue[N]do - if N==startN then gc_setColor(1,1,1)end - local bk,sprite=queue[N].bk,texture[queue[N].color] - local k=min(2.3/#bk,3/#bk[1],.85) - gc_scale(k) - for i=1,#bk do for j=1,#bk[1]do - if bk[i][j]then - gc_draw(sprite,30*(j-#bk[1]*.5)-30,-30*(i-#bk*.5)) - end - end end - gc_scale(1/k) - N=N+1 - gc_translate(0,72) - end - gc_setShader() + --Draw nexts + gc_setShader(shader_blockSatur) + local queue=P.nextQueue + while N<=ENV.nextCount and queue[N]do + if N==startN then gc_setColor(1,1,1)end + local bk,sprite=queue[N].bk,texture[queue[N].color] + local k=min(2.3/#bk,3/#bk[1],.85) + gc_scale(k) + for i=1,#bk do for j=1,#bk[1]do + if bk[i][j]then + gc_draw(sprite,30*(j-#bk[1]*.5)-30,-30*(i-#bk*.5)) + end + end end + gc_scale(1/k) + N=N+1 + gc_translate(0,72) + end + gc_setShader() - --Draw more nexts - if repMode then - gc_translate(50,-28) - local blockImg=TEXTURE.miniBlock - local skinSet=ENV.skin - local n=N - while n<=12 and queue[n]do - local id=queue[n].id - local _=minoColor[skinSet[id]] - gc_setColor(_[1],_[2],_[3],.2) - _=blockImg[id] - local h=_:getHeight() - gc_draw(_,-_:getWidth()*10,0,nil,10,nil) - gc_translate(0,10*h+3) - n=n+1 - end - end - gc_pop() + --Draw more nexts + if repMode then + gc_translate(50,-28) + local blockImg=TEXTURE.miniBlock + local skinSet=ENV.skin + local n=N + while n<=12 and queue[n]do + local id=queue[n].id + local _=minoColor[skinSet[id]] + gc_setColor(_[1],_[2],_[3],.2) + _=blockImg[id] + local h=_:getHeight() + gc_draw(_,-_:getWidth()*10,0,nil,10,nil) + gc_translate(0,10*h+3) + n=n+1 + end + end + gc_pop() - if ENV.bagLine then - gc_setColor(.8,.5,.5) - for i=-P.pieceCount%ENV.bagLine,N-1,ENV.bagLine do--i=phase - gc_rectangle('fill',2,72*i+3,96,2) - end - end - gc_translate(-476,-20) + if ENV.bagLine then + gc_setColor(.8,.5,.5) + for i=-P.pieceCount%ENV.bagLine,N-1,ENV.bagLine do--i=phase + gc_rectangle('fill',2,72*i+3,96,2) + end + end + gc_translate(-476,-20) end function draw.drawTargetLine(P,r) - if r<=20+(P.fieldBeneath+P.fieldUp+10)/30 and r>0 then - gc_setLineWidth(3) - gc_setColor(1,r>10 and 0 or .2+.8*rnd(),.5) - _applyField(P) - r=600-30*r - if P.falling~=-1 then r=r-#P.clearingRow*(P.gameEnv.smooth and(P.falling/(P.gameEnv.fall+1))^1.6*30 or 30)end - gc_line(0,r,300,r) - _cancelField() - end + if r<=20+(P.fieldBeneath+P.fieldUp+10)/30 and r>0 then + gc_setLineWidth(3) + gc_setColor(1,r>10 and 0 or .2+.8*rnd(),.5) + _applyField(P) + r=600-30*r + if P.falling~=-1 then r=r-#P.clearingRow*(P.gameEnv.smooth and(P.falling/(P.gameEnv.fall+1))^1.6*30 or 30)end + gc_line(0,r,300,r) + _cancelField() + end end function draw.drawProgress(s1,s2) - setFont(40) - mStr(s1,62,322) - mStr(s2,62,376) - gc_rectangle('fill',24,375,76,4,2) + setFont(40) + mStr(s1,62,322) + mStr(s2,62,376) + gc_rectangle('fill',24,375,76,4,2) end function draw.drawRoyaleInfo(P) - setFont(35) - mStr(#PLY_ALIVE.."/"..#PLAYERS,63,175) - mStr(P.modeData.ko,80,215) - gc_draw(drawableText.ko,60-drawableText.ko:getWidth(),222) - setFont(20) - gc_setColor(1,.5,0,.6) - gc_print(P.badge,103,227) - gc_setColor(.97,.97,.97) - setFont(25) - mStr(text.powerUp[P.strength],63,290) - gc_setColor(1,1,1) - for i=1,P.strength do - gc_draw(IMG.badgeIcon,16*i+6,260) - end + setFont(35) + mStr(#PLY_ALIVE.."/"..#PLAYERS,63,175) + mStr(P.modeData.ko,80,215) + gc_draw(drawableText.ko,60-drawableText.ko:getWidth(),222) + setFont(20) + gc_setColor(1,.5,0,.6) + gc_print(P.badge,103,227) + gc_setColor(.97,.97,.97) + setFont(25) + mStr(text.powerUp[P.strength],63,290) + gc_setColor(1,1,1) + for i=1,P.strength do + gc_draw(IMG.badgeIcon,16*i+6,260) + end end function draw.norm(P,repMode) - local ENV=P.gameEnv - local FBN,FUP=P.fieldBeneath,P.fieldUp - local camDY=FBN+FUP - local t=TIME() - gc_push('transform') - gc_translate(P.x,P.y) - gc_scale(P.size) + local ENV=P.gameEnv + local FBN,FUP=P.fieldBeneath,P.fieldUp + local camDY=FBN+FUP + local t=TIME() + gc_push('transform') + gc_translate(P.x,P.y) + gc_scale(P.size) - --Draw username - setFont(30) - gc_setColor(.97,.97,.97) - mStr(P.username,300,-60) + --Draw username + setFont(30) + gc_setColor(.97,.97,.97) + mStr(P.username,300,-60) - --Draw HUD - P:drawNext(repMode) - if P.curMission then _drawMission(P.curMission,ENV.mission,ENV.missionKill)end - if ENV.holdCount>0 then _drawHold(P.holdQueue,ENV.holdCount,P.holdTime,P.skinLib)end - _drawDial(499,505,P.dropSpeed) - if P.life>0 then _drawLife(P.life)end + --Draw HUD + P:drawNext(repMode) + if P.curMission then _drawMission(P.curMission,ENV.mission,ENV.missionKill)end + if ENV.holdCount>0 then _drawHold(P.holdQueue,ENV.holdCount,P.holdTime,P.skinLib)end + _drawDial(499,505,P.dropSpeed) + if P.life>0 then _drawLife(P.life)end - --Field-related things - _applyField(P) - --Fill field - gc_setColor(0,0,0,.6) - gc_rectangle('fill',0,-10-camDY,300,610) + --Field-related things + _applyField(P) + --Fill field + gc_setColor(0,0,0,.6) + gc_rectangle('fill',0,-10-camDY,300,610) - --Draw grid - if ENV.grid then - gc_setColor(1,1,1,ENV.grid) - gc_draw(gridLines,0,-40-(camDY-camDY%30)) - end + --Draw grid + if ENV.grid then + gc_setColor(1,1,1,ENV.grid) + gc_draw(gridLines,0,-40-(camDY-camDY%30)) + end - gc_translate(0,600) + gc_translate(0,600) - local fieldTop=-ENV.fieldH*30 + local fieldTop=-ENV.fieldH*30 - --Draw dangerous area - if fieldTop-camDY<610 then - gc_setColor(1,0,0,.26) - gc_rectangle('fill',0,fieldTop,300,-10-camDY-(600-fieldTop)) - end + --Draw dangerous area + if fieldTop-camDY<610 then + gc_setColor(1,0,0,.26) + gc_rectangle('fill',0,fieldTop,300,-10-camDY-(600-fieldTop)) + end - --Draw field - _drawField(P,repMode) + --Draw field + _drawField(P,repMode) - --Draw line number - if ENV.fieldH>20 and ENV.lineNum then - local a=ENV.lineNum - setFont(20) - local dy=camDY<900 and 0 or camDY-camDY%300-600 - for i=1,3 do - local num=10+10*i+dy/30 - local y=-325-300*i-dy - gc_setColor(0,0,0,a) - gc.print(num,1,y) - gc.print(num,2,y+1) - gc_setColor(.97,.97,.97,a) - gc.print(num,2,y) - gc.print(num,2,y) - end - end + --Draw line number + if ENV.fieldH>20 and ENV.lineNum then + local a=ENV.lineNum + setFont(20) + local dy=camDY<900 and 0 or camDY-camDY%300-600 + for i=1,3 do + local num=10+10*i+dy/30 + local y=-325-300*i-dy + gc_setColor(0,0,0,a) + gc.print(num,1,y) + gc.print(num,2,y+1) + gc_setColor(.97,.97,.97,a) + gc.print(num,2,y) + gc.print(num,2,y) + end + end - --Draw spawn line - gc_setLineWidth(4) - gc_setColor(1,sin(t)*.4+.5,0,.5) - gc_rectangle('fill',0,fieldTop,300,4) + --Draw spawn line + gc_setLineWidth(4) + gc_setColor(1,sin(t)*.4+.5,0,.5) + gc_rectangle('fill',0,fieldTop,300,4) - --Draw height limit line - gc_setColor(.4,.7+sin(t*12)*.3,1,.7) - gc_rectangle('fill',0,-ENV.heightLimit*30-FBN-2,300,4) + --Draw height limit line + gc_setColor(.4,.7+sin(t*12)*.3,1,.7) + gc_rectangle('fill',0,-ENV.heightLimit*30-FBN-2,300,4) - --Draw FXs - _drawFXs(P) + --Draw FXs + _drawFXs(P) - --Draw current block - if P.cur and P.waiting==-1 then - local C=P.cur - local curColor=C.color + --Draw current block + if P.cur and P.waiting==-1 then + local C=P.cur + local curColor=C.color - local trans=P.lockDelay/ENV.lock - local centerPos=C.rs.centerPos[C.id][C.dir] - local centerX=30*(P.curX+centerPos[2])-20 + local trans=P.lockDelay/ENV.lock + local centerPos=C.rs.centerPos[C.id][C.dir] + local centerX=30*(P.curX+centerPos[2])-20 - --Draw ghost & rotation center - local centerDisp=ENV.center and C.rs.centerDisp[C.id] - if ENV.ghost then - drawGhost[ENV.ghostType](P.cur.bk,P.curX,P.ghoY,ENV.ghost,P.skinLib,curColor) - if centerDisp then - gc_setColor(1,1,1,ENV.center) - gc_draw(C.rs.centerTex,centerX,-30*(P.ghoY+centerPos[1])+10) - end - elseif repMode then - drawGhost.grayCell(P.cur.bk,P.curX,P.ghoY,.15,nil,nil) - end + --Draw ghost & rotation center + local centerDisp=ENV.center and C.rs.centerDisp[C.id] + if ENV.ghost then + drawGhost[ENV.ghostType](P.cur.bk,P.curX,P.ghoY,ENV.ghost,P.skinLib,curColor) + if centerDisp then + gc_setColor(1,1,1,ENV.center) + gc_draw(C.rs.centerTex,centerX,-30*(P.ghoY+centerPos[1])+10) + end + elseif repMode then + drawGhost.grayCell(P.cur.bk,P.curX,P.ghoY,.15,nil,nil) + end - local dy=ENV.smooth and P.ghoY~=P.curY and(P.dropDelay/ENV.drop-1)*30 or 0 - gc_translate(0,-dy) - --Draw block & rotation center - if ENV.block then - _drawBlockOutline(P.cur.bk,P.curX,P.curY,P.skinLib[curColor],trans) - _drawBlock(P.cur.bk,P.curX,P.curY,P.skinLib[curColor]) - if centerDisp then - gc_setColor(1,1,1,ENV.center) - gc_draw(C.rs.centerTex,centerX,-30*(P.curY+centerPos[1])+10) - end - elseif repMode then - _drawBlockShade(P.cur.bk,P.curX,P.curY,trans*.3) - end - gc_translate(0,dy) - end + local dy=ENV.smooth and P.ghoY~=P.curY and(P.dropDelay/ENV.drop-1)*30 or 0 + gc_translate(0,-dy) + --Draw block & rotation center + if ENV.block then + _drawBlockOutline(P.cur.bk,P.curX,P.curY,P.skinLib[curColor],trans) + _drawBlock(P.cur.bk,P.curX,P.curY,P.skinLib[curColor]) + if centerDisp then + gc_setColor(1,1,1,ENV.center) + gc_draw(C.rs.centerTex,centerX,-30*(P.curY+centerPos[1])+10) + end + elseif repMode then + _drawBlockShade(P.cur.bk,P.curX,P.curY,trans*.3) + end + gc_translate(0,dy) + end - --Draw next preview - if ENV.nextPos and P.nextQueue[1]then - _drawNextPreview(P.nextQueue[1],ENV.fieldH,P.fieldBeneath) - end + --Draw next preview + if ENV.nextPos and P.nextQueue[1]then + _drawNextPreview(P.nextQueue[1],ENV.fieldH,P.fieldBeneath) + end - --Draw AI's drop destination - if P.AI_dest then - local L=P.AI_dest - local texture=TEXTURE.puzzleMark[21] - for i=1,#L,2 do - gc_draw(texture,30*L[i],-30*L[i+1]-30) - end - end + --Draw AI's drop destination + if P.AI_dest then + local L=P.AI_dest + local texture=TEXTURE.puzzleMark[21] + for i=1,#L,2 do + gc_draw(texture,30*L[i],-30*L[i+1]-30) + end + end - --Board cover - if ENV.hideBoard then - gc_stencil(hideBoardStencil[ENV.hideBoard]) - gc_setStencilTest('equal',1) - local alpha - if repMode then - gc_setLineWidth(18.8) - alpha=.7 - else - gc_setLineWidth(20) - alpha=1 - end - for i=0,24 do - local l=.32+.05*sin(i*.26+t*.2) - gc_setColor(l,l,l,alpha) - gc_line(20*i-190,-602,20*i+10,2) - end - end - gc_translate(0,-600) - gc_setStencilTest() - gc_pop() - --Draw Frame and buffers - gc_setColor(P.frameColor) - gc_draw(playerBoarder,-17,-12) - _drawBuffer(P.atkBuffer,ENV.bufferWarn,P.atkBufferSum1,P.atkBufferSum) - _drawB2Bbar(P.b2b,P.b2b1) - _drawLDI(ENV.easyFresh,P.lockDelay/ENV.lock,P.freshTime) + --Board cover + if ENV.hideBoard then + gc_stencil(hideBoardStencil[ENV.hideBoard]) + gc_setStencilTest('equal',1) + local alpha + if repMode then + gc_setLineWidth(18.8) + alpha=.7 + else + gc_setLineWidth(20) + alpha=1 + end + for i=0,24 do + local l=.32+.05*sin(i*.26+t*.2) + gc_setColor(l,l,l,alpha) + gc_line(20*i-190,-602,20*i+10,2) + end + end + gc_translate(0,-600) + gc_setStencilTest() + gc_pop() + --Draw Frame and buffers + gc_setColor(P.frameColor) + gc_draw(playerBoarder,-17,-12) + _drawBuffer(P.atkBuffer,ENV.bufferWarn,P.atkBufferSum1,P.atkBufferSum) + _drawB2Bbar(P.b2b,P.b2b1) + _drawLDI(ENV.easyFresh,P.lockDelay/ENV.lock,P.freshTime) - --Draw target selecting pad - if GAME.modeEnv.royaleMode then - if P.atkMode then - gc_setColor(1,.8,0,P.swappingAtkMode*.02) - gc_rectangle('fill',RCPB[2*P.atkMode-1],RCPB[2*P.atkMode],90,35,8,4) - end - gc_setColor(1,1,1,P.swappingAtkMode*.025) - setFont(35) - gc_setLineWidth(1) - for i=1,4 do - gc_rectangle('line',RCPB[2*i-1],RCPB[2*i],90,35,8,4) - gc_printf(text.atkModeName[i],RCPB[2*i-1]-4,RCPB[2*i]+4,200,"center",nil,.5) - end - end + --Draw target selecting pad + if GAME.modeEnv.royaleMode then + if P.atkMode then + gc_setColor(1,.8,0,P.swappingAtkMode*.02) + gc_rectangle('fill',RCPB[2*P.atkMode-1],RCPB[2*P.atkMode],90,35,8,4) + end + gc_setColor(1,1,1,P.swappingAtkMode*.025) + setFont(35) + gc_setLineWidth(1) + for i=1,4 do + gc_rectangle('line',RCPB[2*i-1],RCPB[2*i],90,35,8,4) + gc_printf(text.atkModeName[i],RCPB[2*i-1]-4,RCPB[2*i]+4,200,"center",nil,.5) + end + end - --Spike - local sp,spt=P.spike,P.spikeTime - if ENV.showSpike and spt>0 and sp>=10 then - local rg=10/sp - gc_setColor(rg,rg,1,min(spt/30,.8)) - local x,y=150,100 - if spt>85 then - local d=2*(spt-85)*min(sp/50,1) - x,y=x+(rnd()-.5)*d,y+(rnd()-.5)*d - end - mDraw(P.spikeText,x,y,nil,min(.3+(sp/26)*.4+spt/100*.3,1)) - end + --Spike + local sp,spt=P.spike,P.spikeTime + if ENV.showSpike and spt>0 and sp>=10 then + local rg=10/sp + gc_setColor(rg,rg,1,min(spt/30,.8)) + local x,y=150,100 + if spt>85 then + local d=2*(spt-85)*min(sp/50,1) + x,y=x+(rnd()-.5)*d,y+(rnd()-.5)*d + end + mDraw(P.spikeText,x,y,nil,min(.3+(sp/26)*.4+spt/100*.3,1)) + end - --Bonus texts - TEXT.draw(P.bonus) + --Bonus texts + TEXT.draw(P.bonus) - --Display Ys - -- gc_setLineWidth(6) - -- if P.curY then gc_setColor(COLOR.R) gc_line(0,611-P.curY*30,300,610-P.curY*30)end - -- if P.ghoY then gc_setColor(COLOR.G) gc_line(0,615-P.ghoY*30,300,615-P.ghoY*30)end - -- if P.minY then gc_setColor(COLOR.B) gc_line(0,619-P.minY*30,300,620-P.minY*30)end - -- gc_line(0,600-P.garbageBeneath*30,300,600-P.garbageBeneath*30) - gc_pop() + --Display Ys + -- gc_setLineWidth(6) + -- if P.curY then gc_setColor(COLOR.R)gc_line(0,611-P.curY*30,300,610-P.curY*30)end + -- if P.ghoY then gc_setColor(COLOR.G)gc_line(0,615-P.ghoY*30,300,615-P.ghoY*30)end + -- if P.minY then gc_setColor(COLOR.B)gc_line(0,619-P.minY*30,300,620-P.minY*30)end + -- gc_line(0,600-P.garbageBeneath*30,300,600-P.garbageBeneath*30) + gc_pop() - --Score & Time - setFont(25) - local tm=int(P.stat.time*100)*.01 - gc_setColor(0,0,0,.3) - gc_print(P.score1,18,509) - gc_print(tm,18,539) - gc_setColor(.97,.97,.92) - gc_print(P.score1,20,510) - gc_setColor(.85,.9,.97) - gc_print(tm,20,540) + --Score & Time + setFont(25) + local tm=int(P.stat.time*100)*.01 + gc_setColor(0,0,0,.3) + gc_print(P.score1,18,509) + gc_print(tm,18,539) + gc_setColor(.97,.97,.92) + gc_print(P.score1,20,510) + gc_setColor(.85,.9,.97) + gc_print(tm,20,540) - --FinesseCombo - ;(P.type=='remote'and _drawFinesseCombo_remote or _drawFinesseCombo_norm)(P) + --FinesseCombo + ;(P.type=='remote'and _drawFinesseCombo_remote or _drawFinesseCombo_norm)(P) - --Mode informations - if GAME.curMode.mesDisp then - gc_setColor(.97,.97,.97) - GAME.curMode.mesDisp(P,repMode) - end + --Mode informations + if GAME.curMode.mesDisp then + gc_setColor(.97,.97,.97) + GAME.curMode.mesDisp(P,repMode) + end - if P.frameRun<180 then _drawStartCounter(P.frameRun)end - gc_pop() + if P.frameRun<180 then _drawStartCounter(P.frameRun)end + gc_pop() end function draw.small(P) - --Update canvas - P.frameWait=P.frameWait-1 - if P.frameWait==0 then - P.frameWait=10 - gc_setCanvas(P.canvas) - gc_clear(0,0,0,.4) - gc_push('transform') - gc_origin() - gc_setColor(1,1,1,P.result and max(20-P.endCounter,0)*.05 or 1) + --Update canvas + P.frameWait=P.frameWait-1 + if P.frameWait==0 then + P.frameWait=10 + gc_setCanvas(P.canvas) + gc_clear(0,0,0,.4) + gc_push('transform') + gc_origin() + gc_setColor(1,1,1,P.result and max(20-P.endCounter,0)*.05 or 1) - --Field - local F=P.field - local texture=SKIN.libMini[SETTING.skinSet] - for j=1,#F do - for i=1,10 do if F[j][i]>0 then - gc_draw(texture[F[j][i]],6*i-6,120-6*j) - end end - end + --Field + local F=P.field + local texture=SKIN.libMini[SETTING.skinSet] + for j=1,#F do + for i=1,10 do if F[j][i]>0 then + gc_draw(texture[F[j][i]],6*i-6,120-6*j) + end end + end - --Draw boarder - if P.alive then - gc_setLineWidth(2) - gc_setColor(P.frameColor) - gc_rectangle('line',0,0,60,120) - end + --Draw boarder + if P.alive then + gc_setLineWidth(2) + gc_setColor(P.frameColor) + gc_rectangle('line',0,0,60,120) + end - --Draw badge - if GAME.modeEnv.royaleMode then - gc_setColor(1,1,1) - for i=1,P.strength do - gc_draw(IMG.badgeIcon,12*i-7,4,nil,.5) - end - end + --Draw badge + if GAME.modeEnv.royaleMode then + gc_setColor(1,1,1) + for i=1,P.strength do + gc_draw(IMG.badgeIcon,12*i-7,4,nil,.5) + end + end - --Draw result - if P.result then - gc_setColor(1,1,1,min(P.endCounter,60)*.01) - setFont(20)mDraw(drawableText[P.result],30,60,nil,P.size) - setFont(15)mStr(P.modeData.place,30,82) - end - gc_pop() - gc_setCanvas() - end + --Draw result + if P.result then + gc_setColor(1,1,1,min(P.endCounter,60)*.01) + setFont(20)mDraw(drawableText[P.result],30,60,nil,P.size) + setFont(15)mStr(P.modeData.place,30,82) + end + gc_pop() + gc_setCanvas() + end - --Draw Canvas - gc_setColor(1,1,1) - local size=P.size - gc_draw(P.canvas,P.x,P.y,nil,size*10) - if P.killMark then - gc_setColor(1,0,0) - gc_rectangle('fill',P.x+40*size,P.y+40*size,160*size,160*size) - end + --Draw Canvas + gc_setColor(1,1,1) + local size=P.size + gc_draw(P.canvas,P.x,P.y,nil,size*10) + if P.killMark then + gc_setColor(1,0,0) + gc_rectangle('fill',P.x+40*size,P.y+40*size,160*size,160*size) + end end function draw.demo(P) - local ENV=P.gameEnv - local curColor=P.cur.color + local ENV=P.gameEnv + local curColor=P.cur.color - --Camera - gc_push('transform') - gc_translate(P.x,P.y) - gc_scale(P.size) + --Camera + gc_push('transform') + gc_translate(P.x,P.y) + gc_scale(P.size) - gc_translate(-150,0) - _applyField(P) - gc_setStencilTest() - gc_setColor(0,0,0,.6) - gc_rectangle('fill',0,0,300,600,3) - gc_push('transform') - gc_translate(0,600) - _drawField(P) - _drawFXs(P) - if P.cur and P.waiting==-1 then - if ENV.ghost then drawGhost[ENV.ghostType](P.cur.bk,P.curX,P.ghoY,ENV.ghost,P.skinLib,curColor)end - if ENV.block then - local dy=ENV.smooth and P.ghoY~=P.curY and(P.dropDelay/ENV.drop-1)*30 or 0 - gc_translate(0,-dy) - _drawBlockOutline(P.cur.bk,P.curX,P.curY,P.skinLib[curColor],P.lockDelay/ENV.lock) - _drawBlock(P.cur.bk,P.curX,P.curY,P.skinLib[curColor]) - gc_translate(0,dy) - end - end - gc_pop() + gc_translate(-150,0) + _applyField(P) + gc_setStencilTest() + gc_setColor(0,0,0,.6) + gc_rectangle('fill',0,0,300,600,3) + gc_push('transform') + gc_translate(0,600) + _drawField(P) + _drawFXs(P) + if P.cur and P.waiting==-1 then + if ENV.ghost then drawGhost[ENV.ghostType](P.cur.bk,P.curX,P.ghoY,ENV.ghost,P.skinLib,curColor)end + if ENV.block then + local dy=ENV.smooth and P.ghoY~=P.curY and(P.dropDelay/ENV.drop-1)*30 or 0 + gc_translate(0,-dy) + _drawBlockOutline(P.cur.bk,P.curX,P.curY,P.skinLib[curColor],P.lockDelay/ENV.lock) + _drawBlock(P.cur.bk,P.curX,P.curY,P.skinLib[curColor]) + gc_translate(0,dy) + end + end + gc_pop() - local blockImg=TEXTURE.miniBlock - local skinSet=ENV.skin + local blockImg=TEXTURE.miniBlock + local skinSet=ENV.skin - --Draw hold - local N=1 - while P.holdQueue[N]do - local id=P.holdQueue[N].id - local _=minoColor[skinSet[id]] - gc_setColor(_[1],_[2],_[3],.3) - _=blockImg[id] - gc_draw(_,15,40*N-10,nil,16,nil,0,_:getHeight()*.5) - N=N+1 - end + --Draw hold + local N=1 + while P.holdQueue[N]do + local id=P.holdQueue[N].id + local _=minoColor[skinSet[id]] + gc_setColor(_[1],_[2],_[3],.3) + _=blockImg[id] + gc_draw(_,15,40*N-10,nil,16,nil,0,_:getHeight()*.5) + N=N+1 + end - --Draw next - N=1 - while N<=ENV.nextCount and P.nextQueue[N]do - local id=P.nextQueue[N].id - local _=minoColor[skinSet[id]] - gc_setColor(_[1],_[2],_[3],.3) - _=blockImg[id] - gc_draw(_,285,40*N-10,nil,16,nil,_:getWidth(),_:getHeight()*.5) - N=N+1 - end + --Draw next + N=1 + while N<=ENV.nextCount and P.nextQueue[N]do + local id=P.nextQueue[N].id + local _=minoColor[skinSet[id]] + gc_setColor(_[1],_[2],_[3],.3) + _=blockImg[id] + gc_draw(_,285,40*N-10,nil,16,nil,_:getWidth(),_:getHeight()*.5) + N=N+1 + end - --Frame - gc_setLineWidth(2) - gc_setColor(COLOR.Z) - gc_rectangle('line',-1,-1,302,602,3) - gc_pop() - gc_pop() - gc_translate(150,0) - TEXT.draw(P.bonus) - gc_pop() + --Frame + gc_setLineWidth(2) + gc_setColor(COLOR.Z) + gc_rectangle('line',-1,-1,302,602,3) + gc_pop() + gc_pop() + gc_translate(150,0) + TEXT.draw(P.bonus) + gc_pop() end return draw \ No newline at end of file diff --git a/parts/player/gameEnv0.lua b/parts/player/gameEnv0.lua index 7a32ef72..603e415d 100644 --- a/parts/player/gameEnv0.lua +++ b/parts/player/gameEnv0.lua @@ -1,65 +1,65 @@ return{ - das=10,arr=2, - dascut=0,dropcut=0, - sddas=2,sdarr=2, - ihs=true,irs=true,ims=true, - swap=true, + das=10,arr=2, + dascut=0,dropcut=0, + sddas=2,sdarr=2, + ihs=true,irs=true,ims=true, + swap=true, - ghostType='gray', - block=true,ghost=.3,center=1, - smooth=false,grid=.16,lineNum=.5, - upEdge=true, - bagLine=true, - text=true, - score=true, - lockFX=2, - dropFX=2, - moveFX=2, - clearFX=2, - splashFX=2, - shakeFX=2, - atkFX=2, + ghostType='gray', + block=true,ghost=.3,center=1, + smooth=false,grid=.16,lineNum=.5, + upEdge=true, + bagLine=true, + text=true, + score=true, + lockFX=2, + dropFX=2, + moveFX=2, + clearFX=2, + splashFX=2, + shakeFX=2, + atkFX=2, - bufferWarn=false, - highCam=false, - nextPos=false, - showSpike=false, + bufferWarn=false, + highCam=false, + nextPos=false, + showSpike=false, - hideBoard=false, - flipBoard=false, + hideBoard=false, + flipBoard=false, - drop=60,lock=60, - wait=0,fall=0, - bone=false, - fieldH=20,heightLimit=1e99, - nextCount=6,nextStartPos=1, - holdCount=1,infHold=false,phyHold=false, - ospin=true,deepDrop=false, - RS='TRS', - sequence='bag', - seqData={1,2,3,4,5,6,7}, - skinSet='crystal_scf', - face=false,skin=false, - mission=false, + drop=60,lock=60, + wait=0,fall=0, + bone=false, + fieldH=20,heightLimit=1e99, + nextCount=6,nextStartPos=1, + holdCount=1,infHold=false,phyHold=false, + ospin=true,deepDrop=false, + RS='TRS', + sequence='bag', + seqData={1,2,3,4,5,6,7}, + skinSet='crystal_scf', + face=false,skin=false, + mission=false, - life=0, - garbageSpeed=1, - pushSpeed=3, - noTele=false, - visible='show', - freshLimit=1e99,easyFresh=true, - bufferLimit=1e99, - fillClear=true, + life=0, + garbageSpeed=1, + pushSpeed=3, + noTele=false, + visible='show', + freshLimit=1e99,easyFresh=true, + bufferLimit=1e99, + fillClear=true, - fkey1=false,fkey2=false, - keyCancel={}, - fine=false,fineKill=false, - b2bKill=false, - missionKill=false, - dropPiece=NULL, - mindas=0,minarr=0,minsdarr=0, - noInitSZO=false, + fkey1=false,fkey2=false, + keyCancel={}, + fine=false,fineKill=false, + b2bKill=false, + missionKill=false, + dropPiece=NULL, + mindas=0,minarr=0,minsdarr=0, + noInitSZO=false, - bg='none',bgm='race', - allowMod=true, + bg='none',bgm='race', + allowMod=true, } \ No newline at end of file diff --git a/parts/player/init.lua b/parts/player/init.lua index 5b84d343..e5a857ec 100644 --- a/parts/player/init.lua +++ b/parts/player/init.lua @@ -11,419 +11,419 @@ local PLY={draw=ply_draw} ---------------------------------------------------- local modeDataMeta do - local rawset=rawset - modeDataMeta={ - __index=function(self,k)rawset(self,k,0)return 0 end, - __newindex=function(self,k,v)rawset(self,k,v)end, - } + local rawset=rawset + modeDataMeta={ + __index=function(self,k)rawset(self,k,0)return 0 end, + __newindex=function(self,k,v)rawset(self,k,v)end, + } end local function _getNewStatTable() - local T={ - time=0,frame=0,score=0, - key=0,rotate=0,hold=0, - extraPiece=0,finesseRate=0, - piece=0,row=0,dig=0, - atk=0,digatk=0, - send=0,recv=0,pend=0,off=0, - clear={},clears={},spin={},spins={}, - pc=0,hpc=0,b2b=0,b3b=0, - maxCombo=0,maxFinesseCombo=0, - } - for i=1,29 do - T.clear[i]={0,0,0,0,0,0} - T.spin[i]={0,0,0,0,0,0,0} - T.clears[i]=0 - T.spins[i]=0 - end - return T + local T={ + time=0,frame=0,score=0, + key=0,rotate=0,hold=0, + extraPiece=0,finesseRate=0, + piece=0,row=0,dig=0, + atk=0,digatk=0, + send=0,recv=0,pend=0,off=0, + clear={},clears={},spin={},spins={}, + pc=0,hpc=0,b2b=0,b3b=0, + maxCombo=0,maxFinesseCombo=0, + } + for i=1,29 do + T.clear[i]={0,0,0,0,0,0} + T.spin[i]={0,0,0,0,0,0,0} + T.clears[i]=0 + T.spins[i]=0 + end + return T end local function _pressKey(P,keyID) - if P.keyAvailable[keyID]and P.alive then - P.keyPressing[keyID]=true - P.actList[keyID](P) - P.stat.key=P.stat.key+1 - end + if P.keyAvailable[keyID]and P.alive then + P.keyPressing[keyID]=true + P.actList[keyID](P) + P.stat.key=P.stat.key+1 + end end local function _releaseKey(P,keyID) - P.keyPressing[keyID]=false + P.keyPressing[keyID]=false end local function _pressKey_Rec(P,keyID) - if P.keyAvailable[keyID]and P.alive then - local L=GAME.rep - ins(L,P.frameRun) - ins(L,keyID) - P.keyPressing[keyID]=true - P.actList[keyID](P) - P.stat.key=P.stat.key+1 - end + if P.keyAvailable[keyID]and P.alive then + local L=GAME.rep + ins(L,P.frameRun) + ins(L,keyID) + P.keyPressing[keyID]=true + P.actList[keyID](P) + P.stat.key=P.stat.key+1 + end end local function _releaseKey_Rec(P,keyID) - local L=GAME.rep - ins(L,P.frameRun) - ins(L,32+keyID) - P.keyPressing[keyID]=false + local L=GAME.rep + ins(L,P.frameRun) + ins(L,32+keyID) + P.keyPressing[keyID]=false end local function _newEmptyPlayer(id,mini) - local P={id=id} - PLAYERS[id]=P - PLY_ALIVE[id]=P + local P={id=id} + PLAYERS[id]=P + PLY_ALIVE[id]=P - --Inherit functions of Player class - for k,v in next,Player do P[k]=v end + --Inherit functions of Player class + for k,v in next,Player do P[k]=v end - --Set key/timer event - if P.id==1 and GAME.recording then - P.pressKey=_pressKey_Rec - P.releaseKey=_releaseKey_Rec - else - P.pressKey=_pressKey - P.releaseKey=_releaseKey - end - P.update=ply_update.alive + --Set key/timer event + if P.id==1 and GAME.recording then + P.pressKey=_pressKey_Rec + P.releaseKey=_releaseKey_Rec + else + P.pressKey=_pressKey + P.releaseKey=_releaseKey + end + P.update=ply_update.alive - --Field position - P.fieldOff={--Shake FX - x=0,y=0, - vx=0,vy=0, - a=0,va=0, - } - P.x,P.y,P.size=0,0,1 - P.frameColor=COLOR.Z + --Field position + P.fieldOff={--Shake FX + x=0,y=0, + vx=0,vy=0, + a=0,va=0, + } + P.x,P.y,P.size=0,0,1 + P.frameColor=COLOR.Z - --Set these at Player:setPosition() - -- P.fieldX,P.fieldY=... - -- P.centerX,P.centerY=... - -- P.absFieldX,P.absFieldY=... + --Set these at Player:setPosition() + -- P.fieldX,P.fieldY=... + -- P.centerX,P.centerY=... + -- P.absFieldX,P.absFieldY=... - --Minimode - P.miniMode=mini - if mini then - P.canvas=love.graphics.newCanvas(60,120) - P.frameWait=rnd(26,62) - P.draw=ply_draw.small - else - P.draw=ply_draw.norm - end + --Minimode + P.miniMode=mini + if mini then + P.canvas=love.graphics.newCanvas(60,120) + P.frameWait=rnd(26,62) + P.draw=ply_draw.small + else + P.draw=ply_draw.norm + end - --States - P.type='none' - P.sound=false - P.alive=true - P.control=false - P.timing=false - P.result=false--String: 'finish'|'win'|'lose' - P.stat=_getNewStatTable() - P.modeData=setmetatable({},modeDataMeta)--Data use by mode - P.keyPressing={}for i=1,12 do P.keyPressing[i]=false end - P.clearingRow,P.clearedRow={},{}--Clearing animation height,cleared row mark - P.dropFX,P.moveFX,P.lockFX,P.clearFX={},{},{},{} - P.tasks={} - P.bonus={}--Texts + --States + P.type='none' + P.sound=false + P.alive=true + P.control=false + P.timing=false + P.result=false--String: 'finish'|'win'|'lose' + P.stat=_getNewStatTable() + P.modeData=setmetatable({},modeDataMeta)--Data use by mode + P.keyPressing={}for i=1,12 do P.keyPressing[i]=false end + P.clearingRow,P.clearedRow={},{}--Clearing animation height,cleared row mark + P.dropFX,P.moveFX,P.lockFX,P.clearFX={},{},{},{} + P.tasks={} + P.bonus={}--Texts - --Times - P.frameRun=GAME.frameStart--Frame run, mainly for replay - P.endCounter=0--Used after gameover - P.dropTime={}for i=1,10 do P.dropTime[i]=-1e99 end P.dropSpeed=0 + --Times + P.frameRun=GAME.frameStart--Frame run, mainly for replay + P.endCounter=0--Used after gameover + P.dropTime={}for i=1,10 do P.dropTime[i]=-1e99 end P.dropSpeed=0 - --Randomizers - P.seqRND=love.math.newRandomGenerator(GAME.seed) - P.atkRND=love.math.newRandomGenerator(GAME.seed) - P.holeRND=love.math.newRandomGenerator(GAME.seed) - P.aiRND=love.math.newRandomGenerator(GAME.seed) + --Randomizers + P.seqRND=love.math.newRandomGenerator(GAME.seed) + P.atkRND=love.math.newRandomGenerator(GAME.seed) + P.holeRND=love.math.newRandomGenerator(GAME.seed) + P.aiRND=love.math.newRandomGenerator(GAME.seed) - --Field-related - P.field,P.visTime={},{} - P.keepVisible=true - P.showTime=false - P.garbageBeneath=0 - P.fieldBeneath=0 - P.fieldUp=0 + --Field-related + P.field,P.visTime={},{} + P.keepVisible=true + P.showTime=false + P.garbageBeneath=0 + P.fieldBeneath=0 + P.fieldUp=0 - --Attack-related - P.atkBuffer={} - P.atkBufferSum,P.atkBufferSum1=0,0 - P.spike,P.spikeTime=0,0 - P.spikeText=love.graphics.newText(getFont(100)) + --Attack-related + P.atkBuffer={} + P.atkBufferSum,P.atkBufferSum1=0,0 + P.spike,P.spikeTime=0,0 + P.spikeText=love.graphics.newText(getFont(100)) - --Attacker-related - P.badge,P.strength=0,0 - P.atkMode,P.swappingAtkMode=1,20 - P.atker,P.atking,P.lastRecv={} + --Attacker-related + P.badge,P.strength=0,0 + P.atkMode,P.swappingAtkMode=1,20 + P.atker,P.atking,P.lastRecv={} - --User-related - P.username="" - P.uid=false - P.sid=false + --User-related + P.username="" + P.uid=false + P.sid=false - --Block states - --[[ - P.curX,P.curY,P.ghoY,P.minY=0,0,0,0--x,y,ghostY - P.cur={ - id=shapeID, - bk=matrix[2], - sc=table[2], - dir=direction, - name=nameID - color=colorID, - } - P.newNext=false--Warped coroutine to get new next, loaded in applyGameEnv() - ]] - P.movDir,P.moving,P.downing=0,0,0--Last move key,DAS charging,downDAS charging - P.dropDelay,P.lockDelay=0,0 - P.waiting,P.falling=-1,-1 - P.freshTime=0 - P.spinLast=false - P.spinSeq=0--For Ospin, each digit mean a spin - P.ctrlCount=0--Key press time, for finesse check + --Block states + --[[ + P.curX,P.curY,P.ghoY,P.minY=0,0,0,0--x,y,ghostY + P.cur={ + id=shapeID, + bk=matrix[2], + sc=table[2], + dir=direction, + name=nameID + color=colorID, + } + P.newNext=false--Warped coroutine to get new next, loaded in applyGameEnv() + ]] + P.movDir,P.moving,P.downing=0,0,0--Last move key,DAS charging,downDAS charging + P.dropDelay,P.lockDelay=0,0 + P.waiting,P.falling=-1,-1 + P.freshTime=0 + P.spinLast=false + P.spinSeq=0--For Ospin, each digit mean a spin + P.ctrlCount=0--Key press time, for finesse check - --Game states - P.combo=0 - P.b2b,P.b2b1=0,0--B2B point & Displayed B2B point - P.score1=0--Displayed score - P.pieceCount=0--Count pieces from next, for drawing bagline - P.finesseCombo,P.finesseComboTime=0,0 - P.nextQueue={} - P.holdQueue={} - P.holdTime=0 - P.lastPiece={ - id=0,name=0,--block id/name + --Game states + P.combo=0 + P.b2b,P.b2b1=0,0--B2B point & Displayed B2B point + P.score1=0--Displayed score + P.pieceCount=0--Count pieces from next, for drawing bagline + P.finesseCombo,P.finesseComboTime=0,0 + P.nextQueue={} + P.holdQueue={} + P.holdTime=0 + P.lastPiece={ + id=0,name=0,--block id/name - curX=0,curY=0,--block position - centX=0,centY=0,--center position - dir=0,--direction + curX=0,curY=0,--block position + centX=0,centY=0,--center position + dir=0,--direction - frame=-1e99,--lock time - autoLock=true,--if lock with gravity + frame=-1e99,--lock time + autoLock=true,--if lock with gravity - finePts=0,--finesse Points + finePts=0,--finesse Points - row=0,dig=0,--lines/garbage cleared - score=0,--score gained - atk=0,exblock=0,--lines attack/defend - off=0,send=0,--lines offset/sent + row=0,dig=0,--lines/garbage cleared + score=0,--score gained + atk=0,exblock=0,--lines attack/defend + off=0,send=0,--lines offset/sent - spin=false,mini=false,--if spin/mini - pc=false,hpc=false,--if pc/hpc - special=false,--if special clear (spin, >=4, pc) - } - return P + spin=false,mini=false,--if spin/mini + pc=false,hpc=false,--if pc/hpc + special=false,--if special clear (spin, >=4, pc) + } + return P end local function _loadGameEnv(P)--Load gameEnv - P.gameEnv={}--Current game setting environment - local ENV=P.gameEnv - local GAME,SETTING=GAME,SETTING - --Load game settings - for k,v in next,gameEnv0 do - if GAME.modeEnv[k]~=nil then - v=GAME.modeEnv[k] --Mode setting - -- print("mode-"..k..":"..tostring(v)) - elseif GAME.setting[k]~=nil then - v=GAME.setting[k] --Game setting - -- print("game-"..k..":"..tostring(v)) - elseif SETTING[k]~=nil then - v=SETTING[k] --Global setting - -- print("global-"..k..":"..tostring(v)) - -- else - -- print("default-"..k..":"..tostring(v)) - end - if type(v)~='table'then--Default setting - ENV[k]=v - else - ENV[k]=TABLE.copy(v) - end - end - if ENV.allowMod then - for _,M in next,GAME.mod do - M.func(P,M.list and M.list[M.sel]) - end - end + P.gameEnv={}--Current game setting environment + local ENV=P.gameEnv + local GAME,SETTING=GAME,SETTING + --Load game settings + for k,v in next,gameEnv0 do + if GAME.modeEnv[k]~=nil then + v=GAME.modeEnv[k] --Mode setting + -- print("mode-"..k..":"..tostring(v)) + elseif GAME.setting[k]~=nil then + v=GAME.setting[k] --Game setting + -- print("game-"..k..":"..tostring(v)) + elseif SETTING[k]~=nil then + v=SETTING[k] --Global setting + -- print("global-"..k..":"..tostring(v)) + -- else + -- print("default-"..k..":"..tostring(v)) + end + if type(v)~='table'then--Default setting + ENV[k]=v + else + ENV[k]=TABLE.copy(v) + end + end + if ENV.allowMod then + for _,M in next,GAME.mod do + M.func(P,M.list and M.list[M.sel]) + end + end end local function _loadRemoteEnv(P,confStr)--Load gameEnv - confStr=JSON.decode(confStr) - if not confStr then - confStr={} - MES.new('warn',"Bad conf from "..P.username.."#"..P.uid) - end + confStr=JSON.decode(confStr) + if not confStr then + confStr={} + MES.new('warn',"Bad conf from "..P.username.."#"..P.uid) + end - P.gameEnv={}--Current game setting environment - local ENV=P.gameEnv - local GAME,SETTING=GAME,SETTING - --Load game settings - for k,v in next,gameEnv0 do - if GAME.modeEnv[k]~=nil then - v=GAME.modeEnv[k] --Mode setting - elseif confStr[k]~=nil then - v=confStr[k] --Game setting - elseif SETTING[k]~=nil then - v=SETTING[k] --Global setting - end - if type(v)~='table'then--Default setting - ENV[k]=v - else - ENV[k]=TABLE.copy(v) - end - end + P.gameEnv={}--Current game setting environment + local ENV=P.gameEnv + local GAME,SETTING=GAME,SETTING + --Load game settings + for k,v in next,gameEnv0 do + if GAME.modeEnv[k]~=nil then + v=GAME.modeEnv[k] --Mode setting + elseif confStr[k]~=nil then + v=confStr[k] --Game setting + elseif SETTING[k]~=nil then + v=SETTING[k] --Global setting + end + if type(v)~='table'then--Default setting + ENV[k]=v + else + ENV[k]=TABLE.copy(v) + end + end end local function _applyGameEnv(P)--Finish gameEnv processing - local ENV=P.gameEnv + local ENV=P.gameEnv - P._20G=ENV.drop==0 - P.dropDelay=ENV.drop - P.lockDelay=ENV.lock - P.freshTime=ENV.freshLimit + P._20G=ENV.drop==0 + P.dropDelay=ENV.drop + P.lockDelay=ENV.lock + P.freshTime=ENV.freshLimit - P.life=ENV.life + P.life=ENV.life - P.keyAvailable={true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true} - if ENV.noTele then - for i=11,20 do - if i~=14 then - P.keyAvailable[i]=false - end - end - end - if not ENV.fkey1 then P.keyAvailable[9]=false end - if not ENV.fkey2 then P.keyAvailable[10]=false end - for _,v in next,ENV.keyCancel do - P.keyAvailable[v]=false - end + P.keyAvailable={true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true} + if ENV.noTele then + for i=11,20 do + if i~=14 then + P.keyAvailable[i]=false + end + end + end + if not ENV.fkey1 then P.keyAvailable[9]=false end + if not ENV.fkey2 then P.keyAvailable[10]=false end + for _,v in next,ENV.keyCancel do + P.keyAvailable[v]=false + end - P.skinLib=SKIN.lib[ENV.skinSet] + P.skinLib=SKIN.lib[ENV.skinSet] - P:setInvisible( - ENV.visible=='show'and -1 or - ENV.visible=='easy'and 300 or - ENV.visible=='slow'and 100 or - ENV.visible=='medium'and 60 or - ENV.visible=='fast'and 20 or - ENV.visible=='none'and 0 - ) - P:set20G(P._20G) - P:setHold(ENV.holdCount) - P:setNext(ENV.nextCount,ENV.nextStartPos>1) - P:setRS(ENV.RS) + P:setInvisible( + ENV.visible=='show'and -1 or + ENV.visible=='easy'and 300 or + ENV.visible=='slow'and 100 or + ENV.visible=='medium'and 60 or + ENV.visible=='fast'and 20 or + ENV.visible=='none'and 0 + ) + P:set20G(P._20G) + P:setHold(ENV.holdCount) + P:setNext(ENV.nextCount,ENV.nextStartPos>1) + P:setRS(ENV.RS) - if type(ENV.mission)=='table'then - P.curMission=1 - end + if type(ENV.mission)=='table'then + P.curMission=1 + end - ENV.das=max(ENV.das,ENV.mindas) - ENV.arr=max(ENV.arr,ENV.minarr) - ENV.sdarr=max(ENV.sdarr,ENV.minsdarr) + ENV.das=max(ENV.das,ENV.mindas) + ENV.arr=max(ENV.arr,ENV.minarr) + ENV.sdarr=max(ENV.sdarr,ENV.minsdarr) - ENV.bagLine=(ENV.sequence=='bag'or ENV.sequence=='loop')and #ENV.seqData + ENV.bagLine=(ENV.sequence=='bag'or ENV.sequence=='loop')and #ENV.seqData - if ENV.nextCount==0 then ENV.nextPos=false end + if ENV.nextCount==0 then ENV.nextPos=false end - P.newNext=coroutine.wrap(getSeqGen(P)) - P:newNext(P.gameEnv.seqData) - if ENV.noInitSZO then - for _=1,5 do - local C=P.nextQueue[1] - if C and(C.id==1 or C.id==2 or C.id==6)then - table.remove(P.nextQueue,1) - else - break - end - end - P:newNext() - end + P.newNext=coroutine.wrap(getSeqGen(P)) + P:newNext(P.gameEnv.seqData) + if ENV.noInitSZO then + for _=1,5 do + local C=P.nextQueue[1] + if C and(C.id==1 or C.id==2 or C.id==6)then + table.remove(P.nextQueue,1) + else + break + end + end + P:newNext() + end - if P.miniMode then - ENV.lockFX=false - ENV.dropFX=false - ENV.moveFX=false - ENV.clearFX=false - ENV.splashFX=false - ENV.shakeFX=false - ENV.text=false - end - if ENV.lockFX==0 then ENV.lockFX=false end - if ENV.dropFX==0 then ENV.dropFX=false end - if ENV.moveFX==0 then ENV.moveFX=false end - if ENV.clearFX==0 then ENV.clearFX=false end - if ENV.splashFX==0 then ENV.splashFX=false end - if ENV.shakeFX==0 then ENV.shakeFX=false end - if ENV.atkFX==0 then ENV.atkFX=false end - if ENV.ghost==0 then ENV.ghost=false end - if ENV.grid==0 then ENV.grid=false end - if ENV.center==0 then ENV.center=false end - if ENV.lineNum==0 then ENV.lineNum=false end + if P.miniMode then + ENV.lockFX=false + ENV.dropFX=false + ENV.moveFX=false + ENV.clearFX=false + ENV.splashFX=false + ENV.shakeFX=false + ENV.text=false + end + if ENV.lockFX==0 then ENV.lockFX=false end + if ENV.dropFX==0 then ENV.dropFX=false end + if ENV.moveFX==0 then ENV.moveFX=false end + if ENV.clearFX==0 then ENV.clearFX=false end + if ENV.splashFX==0 then ENV.splashFX=false end + if ENV.shakeFX==0 then ENV.shakeFX=false end + if ENV.atkFX==0 then ENV.atkFX=false end + if ENV.ghost==0 then ENV.ghost=false end + if ENV.grid==0 then ENV.grid=false end + if ENV.center==0 then ENV.center=false end + if ENV.lineNum==0 then ENV.lineNum=false end end ---------------------------------------------------- ---------------------------------------------------- local DemoEnv={ - face={0,0,0,0,0,0,0}, - das=10,arr=2,sddas=2,sdarr=2, - drop=60,lock=60, - wait=10,fall=20, - highCam=false, - life=1e99, - allowMod=false, - fine=false, + face={0,0,0,0,0,0,0}, + das=10,arr=2,sddas=2,sdarr=2, + drop=60,lock=60, + wait=10,fall=20, + highCam=false, + life=1e99, + allowMod=false, + fine=false, } function PLY.newDemoPlayer(id) - local P=_newEmptyPlayer(id) - P.type='computer' - P.sound=true - P.demo=true + local P=_newEmptyPlayer(id) + P.type='computer' + P.sound=true + P.demo=true - P.frameRun=180 - P.draw=ply_draw.demo - P.control=true - GAME.modeEnv=DemoEnv - _loadGameEnv(P) - _applyGameEnv(P) - P:loadAI{ - type='CC', - next=5, - hold=true, - delay=6, - bag='bag', - node=100000, - } - P:popNext() + P.frameRun=180 + P.draw=ply_draw.demo + P.control=true + GAME.modeEnv=DemoEnv + _loadGameEnv(P) + _applyGameEnv(P) + P:loadAI{ + type='CC', + next=5, + hold=true, + delay=6, + bag='bag', + node=100000, + } + P:popNext() end function PLY.newRemotePlayer(id,mini,ply) - local P=_newEmptyPlayer(id,mini) - P.type='remote' - P.update=ply_update.remote_alive + local P=_newEmptyPlayer(id,mini) + P.type='remote' + P.update=ply_update.remote_alive - P.draw=ply_draw.norm + P.draw=ply_draw.norm - P.stream={} - P.streamProgress=1 + P.stream={} + P.streamProgress=1 - netPLY.setPlayerObj(ply,P) - P.uid=ply.uid - P.username=ply.username - P.sid=ply.sid + netPLY.setPlayerObj(ply,P) + P.uid=ply.uid + P.username=ply.username + P.sid=ply.sid - _loadRemoteEnv(P,ply.config) - _applyGameEnv(P) + _loadRemoteEnv(P,ply.config) + _applyGameEnv(P) end function PLY.newAIPlayer(id,AIdata,mini) - local P=_newEmptyPlayer(id,mini) - P.type='computer' + local P=_newEmptyPlayer(id,mini) + P.type='computer' - _loadGameEnv(P) - local ENV=P.gameEnv - ENV.face={0,0,0,0,0,0,0} - ENV.skin={1,7,11,3,14,4,9} - _applyGameEnv(P) - P:loadAI(AIdata) + _loadGameEnv(P) + local ENV=P.gameEnv + ENV.face={0,0,0,0,0,0,0} + ENV.skin={1,7,11,3,14,4,9} + _applyGameEnv(P) + P:loadAI(AIdata) end function PLY.newPlayer(id,mini) - local P=_newEmptyPlayer(id,mini) - P.type='human' - P.sound=true + local P=_newEmptyPlayer(id,mini) + P.type='human' + P.sound=true - P.uid=USER.uid - P.username=USERS.getUsername(USER.uid) + P.uid=USER.uid + P.username=USERS.getUsername(USER.uid) - _loadGameEnv(P) - _applyGameEnv(P) + _loadGameEnv(P) + _applyGameEnv(P) end ---------------------------------------------------- return PLY \ No newline at end of file diff --git a/parts/player/player.lua b/parts/player/player.lua index 70d796d1..242e7985 100644 --- a/parts/player/player.lua +++ b/parts/player/player.lua @@ -17,2039 +17,2039 @@ local ply_update=require"parts.player.update" ---------------------------------------------------- function Player:_showText(text,dx,dy,font,style,spd,stop) - ins(self.bonus,TEXT.getText(text,150+dx,300+dy,font,style,spd,stop)) + ins(self.bonus,TEXT.getText(text,150+dx,300+dy,font,style,spd,stop)) end function Player:_createLockFX(x,y,t)--Not used - ins(self.lockFX,{x,y,0,t}) + ins(self.lockFX,{x,y,0,t}) end function Player:_createDropFX(x,y,w,h)--Not used - ins(self.dropFX,{x,y,w,h}) + ins(self.dropFX,{x,y,w,h}) end function Player:_createMoveFX(color,x,y,spd)--Not used - ins(self.moveFX,{color,x,y,0,spd}) + ins(self.moveFX,{color,x,y,0,spd}) end function Player:_createClearingFX(y,spd)--Not used - ins(self.clearFX,{y,0,spd}) + ins(self.clearFX,{y,0,spd}) end function Player:showText(text,dx,dy,font,style,spd,stop) - if self.gameEnv.text then - ins(self.bonus,TEXT.getText(text,150+dx,300+dy,font,style,spd,stop)) - end + if self.gameEnv.text then + ins(self.bonus,TEXT.getText(text,150+dx,300+dy,font,style,spd,stop)) + end end function Player:popScore(score) - if self.gameEnv.score then - self:_showText( - score, - self:getCenterX()*30, - (10-self:getCenterY())*30+self.fieldBeneath+self.fieldUp, - 40-600/(score+20), - 'score',2 - ) - end + if self.gameEnv.score then + self:_showText( + score, + self:getCenterX()*30, + (10-self:getCenterY())*30+self.fieldBeneath+self.fieldUp, + 40-600/(score+20), + 'score',2 + ) + end end function Player:createLockFX() - if self.gameEnv.lockFX then - local CB=self.cur.bk - local t=12-self.gameEnv.lockFX*2 + if self.gameEnv.lockFX then + local CB=self.cur.bk + local t=12-self.gameEnv.lockFX*2 - for i=1,#CB do - local y=self.curY+i-1 - local L=self.clearedRow - for j=1,#L do - if L[j]==y then goto CONTINUE_skip end - end - y=-30*y - for j=1,#CB[1]do - if CB[i][j]then - ins(self.lockFX,{30*(self.curX+j-2),y,0,t}) - end - end - ::CONTINUE_skip:: - end - end + for i=1,#CB do + local y=self.curY+i-1 + local L=self.clearedRow + for j=1,#L do + if L[j]==y then goto CONTINUE_skip end + end + y=-30*y + for j=1,#CB[1]do + if CB[i][j]then + ins(self.lockFX,{30*(self.curX+j-2),y,0,t}) + end + end + ::CONTINUE_skip:: + end + end end function Player:clearLockFX() - for i=1,#self.lockFX do - self.lockFX[i]=nil - end + for i=1,#self.lockFX do + self.lockFX[i]=nil + end end function Player:createDropFX() - local CB=self.cur.bk - if self.gameEnv.dropFX and self.gameEnv.block and self.curY-self.ghoY-#CB>-1 then - ins(self.dropFX,{self.curX,self.curY-1,#CB[1],self.curY-self.ghoY-#CB+1,0,13-2*self.gameEnv.dropFX}) - end + local CB=self.cur.bk + if self.gameEnv.dropFX and self.gameEnv.block and self.curY-self.ghoY-#CB>-1 then + ins(self.dropFX,{self.curX,self.curY-1,#CB[1],self.curY-self.ghoY-#CB+1,0,13-2*self.gameEnv.dropFX}) + end end function Player:createMoveFX(moveDir) - local ENV=self.gameEnv - if not(ENV.moveFX and ENV.block)then - local spd=10-1.5*ENV.moveFX - local C=self.cur.color - local CB=self.cur.bk - local x=self.curX-1 - local y=ENV.smooth and self.curY+self.dropDelay/ENV.drop-2 or self.curY-1 - local L=self.moveFX - if moveDir=='left'then - for i=1,#CB do - for j=#CB[1],1,-1 do - if CB[i][j]then - ins(L,{C,x+j,y+i,0,spd}) - break - end - end - end - elseif moveDir=='right'then - for i=1,#CB do - for j=1,#CB[1]do - if CB[i][j]then - ins(L,{C,x+j,y+i,0,spd}) - break - end - end - end - elseif moveDir=='down'then - for j=1,#CB[1]do - for i=#CB,1,-1 do - if CB[i][j]then - ins(L,{C,x+j,y+i,0,spd}) - break - end - end - end - else - for i=1,#CB do - for j=1,#CB[1]do - if CB[i][j]then - ins(L,{C,x+j,y+i,0,spd}) - end - end - end - end - end + local ENV=self.gameEnv + if not(ENV.moveFX and ENV.block)then + local spd=10-1.5*ENV.moveFX + local C=self.cur.color + local CB=self.cur.bk + local x=self.curX-1 + local y=ENV.smooth and self.curY+self.dropDelay/ENV.drop-2 or self.curY-1 + local L=self.moveFX + if moveDir=='left'then + for i=1,#CB do + for j=#CB[1],1,-1 do + if CB[i][j]then + ins(L,{C,x+j,y+i,0,spd}) + break + end + end + end + elseif moveDir=='right'then + for i=1,#CB do + for j=1,#CB[1]do + if CB[i][j]then + ins(L,{C,x+j,y+i,0,spd}) + break + end + end + end + elseif moveDir=='down'then + for j=1,#CB[1]do + for i=#CB,1,-1 do + if CB[i][j]then + ins(L,{C,x+j,y+i,0,spd}) + break + end + end + end + else + for i=1,#CB do + for j=1,#CB[1]do + if CB[i][j]then + ins(L,{C,x+j,y+i,0,spd}) + end + end + end + end + end end function Player:createClearingFX(y) - if self.gameEnv.clearFX then - ins(self.clearFX,{y,0,7-self.gameEnv.clearFX}) - end + if self.gameEnv.clearFX then + ins(self.clearFX,{y,0,7-self.gameEnv.clearFX}) + end end function Player:createSplashFX(h) - if self.gameEnv.splashFX then - local L=self.field[h] - local size=self.size - local y=self.fieldY+size*(self.fieldOff.y+self.fieldBeneath+self.fieldUp+615)-30*h*size - for x=1,10 do - local c=L[x] - if c>0 then - SYSFX.newCell( - 2.5-self.gameEnv.splashFX*.4, - self.skinLib[c], - size, - self.fieldX+(30*x-15)*size,y, - rnd()*5-2.5,rnd()*-1, - 0,.6 - ) - end - end - end + if self.gameEnv.splashFX then + local L=self.field[h] + local size=self.size + local y=self.fieldY+size*(self.fieldOff.y+self.fieldBeneath+self.fieldUp+615)-30*h*size + for x=1,10 do + local c=L[x] + if c>0 then + SYSFX.newCell( + 2.5-self.gameEnv.splashFX*.4, + self.skinLib[c], + size, + self.fieldX+(30*x-15)*size,y, + rnd()*5-2.5,rnd()*-1, + 0,.6 + ) + end + end + end end function Player:createBeam(R,send) - if self.gameEnv.atkFX then - local power=self.gameEnv.atkFX - local color=self.cur.color - local x1,y1,x2,y2 - if self.miniMode then - x1,y1=self.centerX,self.centerY - else - local C=self.cur - local sc=C.rs.centerPos[C.id][C.dir] - x1=self.x+(30*(self.curX+sc[2])-30+15+150)*self.size - y1=self.y+(600-30*(self.curY+sc[1])+15+self.fieldUp+self.fieldBeneath)*self.size - end - if R.small then x2,y2=R.centerX,R.centerY - else x2,y2=R.x+308*R.size,R.y+450*R.size - end + if self.gameEnv.atkFX then + local power=self.gameEnv.atkFX + local color=self.cur.color + local x1,y1,x2,y2 + if self.miniMode then + x1,y1=self.centerX,self.centerY + else + local C=self.cur + local sc=C.rs.centerPos[C.id][C.dir] + x1=self.x+(30*(self.curX+sc[2])-30+15+150)*self.size + y1=self.y+(600-30*(self.curY+sc[1])+15+self.fieldUp+self.fieldBeneath)*self.size + end + if R.small then x2,y2=R.centerX,R.centerY + else x2,y2=R.x+308*R.size,R.y+450*R.size + end - local c=minoColor[color] - local r,g,b=c[1]*2,c[2]*2,c[3]*2 + local c=minoColor[color] + local r,g,b=c[1]*2,c[2]*2,c[3]*2 - local a=GAME.modeEnv.royaleMode and not(self.type=='human'or R.type=='human')and .2 or 1 - SYSFX.newAttack(1-power*.1,x1,y1,x2,y2,int(send^.7*(4+power)),r,g,b,a*(power+2)*.0626) - end + local a=GAME.modeEnv.royaleMode and not(self.type=='human'or R.type=='human')and .2 or 1 + SYSFX.newAttack(1-power*.1,x1,y1,x2,y2,int(send^.7*(4+power)),r,g,b,a*(power+2)*.0626) + end end ---------------------------------------------------- ---------------------------------------------------- function Player:newTask(code,...) - local thread=coroutine.create(code) - resume(thread,self,...) - if status(thread)~='dead'then - ins(self.tasks,{ - thread=thread, - code=code, - args={...}, - }) - end + local thread=coroutine.create(code) + resume(thread,self,...) + if status(thread)~='dead'then + ins(self.tasks,{ + thread=thread, + code=code, + args={...}, + }) + end end function Player:setPosition(x,y,size) - size=size or 1 - self.x,self.y,self.size=x,y,size - if self.miniMode or self.demo then - self.fieldX,self.fieldY=x,y - self.centerX,self.centerY=x+300*size,y+600*size - else - self.fieldX,self.fieldY=x+150*size,y - self.centerX,self.centerY=x+300*size,y+370*size - self.absFieldX,self.absFieldY=x+150*size,y-10*size - end + size=size or 1 + self.x,self.y,self.size=x,y,size + if self.miniMode or self.demo then + self.fieldX,self.fieldY=x,y + self.centerX,self.centerY=x+300*size,y+600*size + else + self.fieldX,self.fieldY=x+150*size,y + self.centerX,self.centerY=x+300*size,y+370*size + self.absFieldX,self.absFieldY=x+150*size,y-10*size + end end do--function Player:movePosition(x,y,size) - local function task_movePosition(self,x,y,size) - local x1,y1,size1=self.x,self.y,self.size - while true do - yield() - if (x1-x)^2+(y1-y)^2<1 then - self:setPosition(x,y,size) - return true - else - x1=x1+(x-x1)*.126 - y1=y1+(y-y1)*.126 - size1=size1+(size-size1)*.126 - self:setPosition(x1,y1,size1) - end - end - end - local function check_player(obj,Ptar) - return obj.args[1]==Ptar - end - function Player:movePosition(x,y,size) - TASK.removeTask_iterate(check_player,self) - TASK.new(task_movePosition,self,x,y,size or self.size) - end + local function task_movePosition(self,x,y,size) + local x1,y1,size1=self.x,self.y,self.size + while true do + yield() + if (x1-x)^2+(y1-y)^2<1 then + self:setPosition(x,y,size) + return true + else + x1=x1+(x-x1)*.126 + y1=y1+(y-y1)*.126 + size1=size1+(size-size1)*.126 + self:setPosition(x1,y1,size1) + end + end + end + local function check_player(obj,Ptar) + return obj.args[1]==Ptar + end + function Player:movePosition(x,y,size) + TASK.removeTask_iterate(check_player,self) + TASK.new(task_movePosition,self,x,y,size or self.size) + end end local frameColorList={[0]=COLOR.Z,COLOR.lG,COLOR.lB,COLOR.lV,COLOR.lO} function Player:setFrameColor(c) - self.frameColor=frameColorList[c] + self.frameColor=frameColorList[c] end function Player:switchKey(id,on) - self.keyAvailable[id]=on - if not on then - self:releaseKey(id) - end - if self.type=='human'then - VK.switchKey(id,on) - end + self.keyAvailable[id]=on + if not on then + self:releaseKey(id) + end + if self.type=='human'then + VK.switchKey(id,on) + end end function Player:set20G(if20g) - self._20G=if20g - self:switchKey(13,not if20g) - self:switchKey(14,not if20g) - self:switchKey(15,not if20g) - self:switchKey(16,not if20g) - if if20g and self.bot then self.bot:switch20G()end + self._20G=if20g + self:switchKey(13,not if20g) + self:switchKey(14,not if20g) + self:switchKey(15,not if20g) + self:switchKey(16,not if20g) + if if20g and self.bot then self.bot:switch20G()end end function Player:setHold(count)--Set hold count (false/true as 0/1) - if not count then - count=0 - elseif count==true then - count=1 - end - self:switchKey(8,count>0) - self.gameEnv.holdCount=count - self.holdTime=count - while self.holdQueue[count+1]do rem(self.holdQueue)end + if not count then + count=0 + elseif count==true then + count=1 + end + self:switchKey(8,count>0) + self.gameEnv.holdCount=count + self.holdTime=count + while self.holdQueue[count+1]do rem(self.holdQueue)end end function Player:setNext(next,hidden)--Set next count (use hidden=true if set env.nextStartPos>1) - self.gameEnv.nextCount=next - if next==0 then - self.drawNext=NULL - elseif not hidden then - self.drawNext=ply_draw.drawNext_norm - else - self.drawNext=ply_draw.drawNext_hidden - end + self.gameEnv.nextCount=next + if next==0 then + self.drawNext=NULL + elseif not hidden then + self.drawNext=ply_draw.drawNext_norm + else + self.drawNext=ply_draw.drawNext_hidden + end end function Player:setInvisible(time)--Time in frames - if time<0 then - self.keepVisible=true - self.showTime=1e99 - else - self.keepVisible=false - self.showTime=time - end + if time<0 then + self.keepVisible=true + self.showTime=1e99 + else + self.keepVisible=false + self.showTime=time + end end function Player:setRS(RSname) - local rs=RSlist[RSname]or RSlist.TRS - self.RS=rs + local rs=RSlist[RSname]or RSlist.TRS + self.RS=rs - --Reset all player's blocks' RSs - for i=1,#self.nextQueue do self.nextQueue[i].rs=rs end - for i=1,#self.holdQueue do self.holdQueue[i].rs=rs end - if self.cur then self.cur.rs=rs end + --Reset all player's blocks' RSs + for i=1,#self.nextQueue do self.nextQueue[i].rs=rs end + for i=1,#self.holdQueue do self.holdQueue[i].rs=rs end + if self.cur then self.cur.rs=rs end end function Player:getHolePos()--Get a good garbage-line hole position - if self.garbageBeneath==0 then - return generateLine(self.holeRND:random(10)) - else - local p=self.holeRND:random(10) - if self.field[1][p]<=0 then - return generateLine(self.holeRND:random(10)) - end - return generateLine(p) - end + if self.garbageBeneath==0 then + return generateLine(self.holeRND:random(10)) + else + local p=self.holeRND:random(10) + if self.field[1][p]<=0 then + return generateLine(self.holeRND:random(10)) + end + return generateLine(p) + end end function Player:garbageRelease()--Check garbage buffer and try to release them - local n,flag=1 - while true do - local A=self.atkBuffer[n] - if A and A.countdown<=0 and not A.sent then - self:garbageRise(19+A.lv,A.amount,A.line) - self.atkBufferSum=self.atkBufferSum-A.amount - A.sent,A.time=true,0 - self.stat.pend=self.stat.pend+A.amount - n=n+1 - flag=true - else - break - end - end - if flag and self.bot then self.bot:updateField()end + local n,flag=1 + while true do + local A=self.atkBuffer[n] + if A and A.countdown<=0 and not A.sent then + self:garbageRise(19+A.lv,A.amount,A.line) + self.atkBufferSum=self.atkBufferSum-A.amount + A.sent,A.time=true,0 + self.stat.pend=self.stat.pend+A.amount + n=n+1 + flag=true + else + break + end + end + if flag and self.bot then self.bot:updateField()end end function Player:garbageRise(color,amount,line)--Release n-lines garbage to field - local _ - local t=self.showTime*2 - for _=1,amount do - ins(self.field,1,FREEROW.get(0,true)) - ins(self.visTime,1,FREEROW.get(t)) - for i=1,10 do - self.field[1][i]=bit.rshift(line,i-1)%2==1 and color or 0 - end - end - self.fieldBeneath=self.fieldBeneath+amount*30 - if self.cur then - self.curY=self.curY+amount - self.ghoY=self.ghoY+amount - end - self.garbageBeneath=self.garbageBeneath+amount - for i=1,#self.clearingRow do - self.clearingRow[i]=self.clearingRow[i]+amount - end - self:freshBlock('push') - for i=1,#self.lockFX do - _=self.lockFX[i] - _[2]=_[2]-30*amount--Shift 30px per line cleared - end - for i=1,#self.dropFX do - _=self.dropFX[i] - _[3],_[5]=_[3]+amount,_[5]+amount - end - if #self.field>self.gameEnv.heightLimit then self:lose()end + local _ + local t=self.showTime*2 + for _=1,amount do + ins(self.field,1,FREEROW.get(0,true)) + ins(self.visTime,1,FREEROW.get(t)) + for i=1,10 do + self.field[1][i]=bit.rshift(line,i-1)%2==1 and color or 0 + end + end + self.fieldBeneath=self.fieldBeneath+amount*30 + if self.cur then + self.curY=self.curY+amount + self.ghoY=self.ghoY+amount + end + self.garbageBeneath=self.garbageBeneath+amount + for i=1,#self.clearingRow do + self.clearingRow[i]=self.clearingRow[i]+amount + end + self:freshBlock('push') + for i=1,#self.lockFX do + _=self.lockFX[i] + _[2]=_[2]-30*amount--Shift 30px per line cleared + end + for i=1,#self.dropFX do + _=self.dropFX[i] + _[3],_[5]=_[3]+amount,_[5]+amount + end + if #self.field>self.gameEnv.heightLimit then self:lose()end end local invList={2,1,4,3,5,6,7} function Player:pushLineList(L,mir)--Push some lines to field - local l=#L - local S=self.gameEnv.skin - for i=1,l do - local r=FREEROW.get(0) - if not mir then - for j=1,10 do - r[j]=S[L[i][j]]or 0 - end - else - for j=1,10 do - r[j]=S[invList[L[i][11-j]]]or 0 - end - end - ins(self.field,1,r) - ins(self.visTime,1,FREEROW.get(20)) - end - self.fieldBeneath=self.fieldBeneath+30*l - self.curY=self.curY+l - self.ghoY=self.ghoY+l - self:freshBlock('push') + local l=#L + local S=self.gameEnv.skin + for i=1,l do + local r=FREEROW.get(0) + if not mir then + for j=1,10 do + r[j]=S[L[i][j]]or 0 + end + else + for j=1,10 do + r[j]=S[invList[L[i][11-j]]]or 0 + end + end + ins(self.field,1,r) + ins(self.visTime,1,FREEROW.get(20)) + end + self.fieldBeneath=self.fieldBeneath+30*l + self.curY=self.curY+l + self.ghoY=self.ghoY+l + self:freshBlock('push') end function Player:pushNextList(L,mir)--Push some nexts to nextQueue - for i=1,#L do - self:getNext(mir and invList[L[i]]or L[i]) - end + for i=1,#L do + self:getNext(mir and invList[L[i]]or L[i]) + end end function Player:getCenterX() - local C=self.cur - return self.curX+C.rs.centerPos[C.id][C.dir][2]-5.5 + local C=self.cur + return self.curX+C.rs.centerPos[C.id][C.dir][2]-5.5 end function Player:getCenterY() - local C=self.cur - return self.curY-C.rs.centerPos[C.id][C.dir][1] + local C=self.cur + return self.curY-C.rs.centerPos[C.id][C.dir][1] end function Player:solid(x,y) - if x<1 or x>10 or y<1 then return true end - if y>#self.field then return false end - return self.field[y] - [x]>0--to catch bug (nil[*]) + if x<1 or x>10 or y<1 then return true end + if y>#self.field then return false end + return self.field[y] + [x]>0--to catch bug (nil[*]) end function Player:ifoverlap(bk,x,y) - local C=#bk[1] - if x<1 or x+C>11 or y<1 then return true end - if y>#self.field then return end - for i=1,#bk do - if self.field[y+i-1]then - for j=1,C do - if bk[i][j]and self.field[y+i-1][x+j-1]>0 then return true end - end - end - end + local C=#bk[1] + if x<1 or x+C>11 or y<1 then return true end + if y>#self.field then return end + for i=1,#bk do + if self.field[y+i-1]then + for j=1,C do + if bk[i][j]and self.field[y+i-1][x+j-1]>0 then return true end + end + end + end end function Player:attack(R,send,time,line,fromStream) - if GAME.net then - if self.type=='human'then--Local player attack others - ins(GAME.rep,self.frameRun) - ins(GAME.rep, - R.sid+ - send*0x100+ - time*0x10000+ - line*0x100000000+ - 0x2000000000000 - ) - self:createBeam(R,send) - end - if fromStream and R.type=='human'then--Local player receiving lines - ins(GAME.rep,R.frameRun) - ins(GAME.rep, - self.sid+ - send*0x100+ - time*0x10000+ - line*0x100000000+ - 0x1000000000000 - ) - R:receive(self,send,time,line) - end - else - R:receive(self,send,time,line) - self:createBeam(R,send) - end + if GAME.net then + if self.type=='human'then--Local player attack others + ins(GAME.rep,self.frameRun) + ins(GAME.rep, + R.sid+ + send*0x100+ + time*0x10000+ + line*0x100000000+ + 0x2000000000000 + ) + self:createBeam(R,send) + end + if fromStream and R.type=='human'then--Local player receiving lines + ins(GAME.rep,R.frameRun) + ins(GAME.rep, + self.sid+ + send*0x100+ + time*0x10000+ + line*0x100000000+ + 0x1000000000000 + ) + R:receive(self,send,time,line) + end + else + R:receive(self,send,time,line) + self:createBeam(R,send) + end end function Player:receive(A,send,time,line) - self.lastRecv=A - local B=self.atkBuffer - if send+self.atkBufferSum>self.gameEnv.bufferLimit then send=self.gameEnv.bufferLimit-self.atkBufferSum end - if send>0 then - local m,k=#B,1 - while k<=m and time>B[k].countdown do k=k+1 end - ins(B,k,{ - line=line, - amount=send, - countdown=time, - cd0=time, - time=0, - sent=false, - lv=min(int(send^.69),5), - })--Sorted insert(by time) - self.atkBufferSum=self.atkBufferSum+send - self.stat.recv=self.stat.recv+send - if self.sound then - SFX.play(send<4 and'blip_1'or'blip_2',min(send+1,5)*.1) - end - end + self.lastRecv=A + local B=self.atkBuffer + if send+self.atkBufferSum>self.gameEnv.bufferLimit then send=self.gameEnv.bufferLimit-self.atkBufferSum end + if send>0 then + local m,k=#B,1 + while k<=m and time>B[k].countdown do k=k+1 end + ins(B,k,{ + line=line, + amount=send, + countdown=time, + cd0=time, + time=0, + sent=false, + lv=min(int(send^.69),5), + })--Sorted insert(by time) + self.atkBufferSum=self.atkBufferSum+send + self.stat.recv=self.stat.recv+send + if self.sound then + SFX.play(send<4 and'blip_1'or'blip_2',min(send+1,5)*.1) + end + end end function Player:clearAttackBuffer() - for i=1,#self.atkBuffer do - local A=self.atkBuffer[i] - if not A.sent then - A.sent=true - A.time=0 - end - end - self.atkBufferSum=0 + for i=1,#self.atkBuffer do + local A=self.atkBuffer[i] + if not A.sent then + A.sent=true + A.time=0 + end + end + self.atkBufferSum=0 end function Player:freshTarget() - if self.atkMode==1 then - if not self.atking or not self.atking.alive or rnd()<.1 then - self:changeAtk(randomTarget(self)) - end - elseif self.atkMode==2 then - self:changeAtk(self~=GAME.mostBadge and GAME.mostBadge or GAME.secBadge or randomTarget(self)) - elseif self.atkMode==3 then - self:changeAtk(self~=GAME.mostDangerous and GAME.mostDangerous or GAME.secDangerous or randomTarget(self)) - elseif self.atkMode==4 then - for i=1,#self.atker do - if not self.atker[i].alive then - rem(self.atker,i) - return - end - end - end + if self.atkMode==1 then + if not self.atking or not self.atking.alive or rnd()<.1 then + self:changeAtk(randomTarget(self)) + end + elseif self.atkMode==2 then + self:changeAtk(self~=GAME.mostBadge and GAME.mostBadge or GAME.secBadge or randomTarget(self)) + elseif self.atkMode==3 then + self:changeAtk(self~=GAME.mostDangerous and GAME.mostDangerous or GAME.secDangerous or randomTarget(self)) + elseif self.atkMode==4 then + for i=1,#self.atker do + if not self.atker[i].alive then + rem(self.atker,i) + return + end + end + end end function Player:changeAtkMode(m) - if self.atkMode==m then return end - self.atkMode=m - if m==1 then - self:changeAtk(randomTarget(self)) - elseif m==2 or m==3 then - self:freshTarget() - elseif m==4 then - self:changeAtk() - end + if self.atkMode==m then return end + self.atkMode=m + if m==1 then + self:changeAtk(randomTarget(self)) + elseif m==2 or m==3 then + self:freshTarget() + elseif m==4 then + self:changeAtk() + end end function Player:changeAtk(R) - -- if self.type~='human'then R=PLAYERS[1]end--1vALL mode? - if self.atking then - local K=self.atking.atker - local i=TABLE.find(K,self) - if i then rem(K,i)end - end - if R then - self.atking=R - ins(R.atker,self) - else - self.atking=false - end + -- if self.type~='human'then R=PLAYERS[1]end--1vALL mode? + if self.atking then + local K=self.atking.atker + local i=TABLE.find(K,self) + if i then rem(K,i)end + end + if R then + self.atking=R + ins(R.atker,self) + else + self.atking=false + end end function Player:freshBlock(mode)--string mode: push/move/fresh/newBlock - local ENV=self.gameEnv - --Fresh ghost - if(mode=='move'or mode=='newBlock'or mode=='push')and self.cur then - local CB=self.cur.bk - self.ghoY=min(#self.field+1,self.curY) - if self._20G or ENV.sdarr==0 and self.keyPressing[7]and self.downing>ENV.sddas then - local _=self.ghoY + local ENV=self.gameEnv + --Fresh ghost + if(mode=='move'or mode=='newBlock'or mode=='push')and self.cur then + local CB=self.cur.bk + self.ghoY=min(#self.field+1,self.curY) + if self._20G or ENV.sdarr==0 and self.keyPressing[7]and self.downing>ENV.sddas then + local _=self.ghoY - --Move ghost to bottom - while not self:ifoverlap(CB,self.curX,self.ghoY-1)do - self.ghoY=self.ghoY-1 - end + --Move ghost to bottom + while not self:ifoverlap(CB,self.curX,self.ghoY-1)do + self.ghoY=self.ghoY-1 + end - --Cancel spinLast - if _~=self.ghoY then - self.spinLast=false - end + --Cancel spinLast + if _~=self.ghoY then + self.spinLast=false + end - --Create FX if dropped - if self.curY>self.ghoY then - self:createDropFX() - if ENV.shakeFX then - self.fieldOff.vy=.5 - end - self.curY=self.ghoY - end - else - while not self:ifoverlap(CB,self.curX,self.ghoY-1)do - self.ghoY=self.ghoY-1 - end - end - end + --Create FX if dropped + if self.curY>self.ghoY then + self:createDropFX() + if ENV.shakeFX then + self.fieldOff.vy=.5 + end + self.curY=self.ghoY + end + else + while not self:ifoverlap(CB,self.curX,self.ghoY-1)do + self.ghoY=self.ghoY-1 + end + end + end - --Fresh delays - if mode=='move'or mode=='newBlock'or mode=='fresh'then - local d0,l0=ENV.drop,ENV.lock - local C=self.cur - local sc=C.rs.centerPos[C.id][C.dir] - if ENV.easyFresh then - if self.lockDelay0 then - if mode~='newBlock'then - self.freshTime=self.freshTime-1 - end - self.lockDelay=l0 - self.dropDelay=d0 - end - if self.curY+sc[1]0 then - self.freshTime=self.freshTime-1 - self.dropDelay=d0 - self.lockDelay=l0 - end - end - end - end + --Fresh delays + if mode=='move'or mode=='newBlock'or mode=='fresh'then + local d0,l0=ENV.drop,ENV.lock + local C=self.cur + local sc=C.rs.centerPos[C.id][C.dir] + if ENV.easyFresh then + if self.lockDelay0 then + if mode~='newBlock'then + self.freshTime=self.freshTime-1 + end + self.lockDelay=l0 + self.dropDelay=d0 + end + if self.curY+sc[1]0 then + self.freshTime=self.freshTime-1 + self.dropDelay=d0 + self.lockDelay=l0 + end + end + end + end end function Player:checkDest() - if not self.AI_dest then return end - local dest=self.AI_dest - local CB=self.cur.bk - for k=1,#dest,2 do - local r=CB[dest[k+1]-self.curY+2] - if not r or not r[dest[k]-self.curX+2]then - if self.bot then - self.bot:lockWrongPlace() - end - self.AI_dest=nil - return - end - end + if not self.AI_dest then return end + local dest=self.AI_dest + local CB=self.cur.bk + for k=1,#dest,2 do + local r=CB[dest[k+1]-self.curY+2] + if not r or not r[dest[k]-self.curX+2]then + if self.bot then + self.bot:lockWrongPlace() + end + self.AI_dest=nil + return + end + end end function Player:lock() - local CB=self.cur.bk - for i=1,#CB do - local y=self.curY+i-1 - if not self.field[y]then self.field[y],self.visTime[y]=FREEROW.get(0),FREEROW.get(0)end - for j=1,#CB[1]do - if CB[i][j]then - self.field[y][self.curX+j-1]=self.cur.color - self.visTime[y][self.curX+j-1]=self.showTime - end - end - end + local CB=self.cur.bk + for i=1,#CB do + local y=self.curY+i-1 + if not self.field[y]then self.field[y],self.visTime[y]=FREEROW.get(0),FREEROW.get(0)end + for j=1,#CB[1]do + if CB[i][j]then + self.field[y][self.curX+j-1]=self.cur.color + self.visTime[y][self.curX+j-1]=self.showTime + end + end + end end function Player:checkClear(field,start,height,CB,CX) - local cc=0 - if self.gameEnv.fillClear then - for i=1,height do - local h=start+i-2 + local cc=0 + if self.gameEnv.fillClear then + for i=1,height do + local h=start+i-2 - --Bomb trigger (optional, must with CB) - if CB and h>0 and field[h]and self.clearedRow[cc]~=h then - for x=1,#CB[1]do - if CB[i][x]and field[h][CX+x-1]==19 then - cc=cc+1 - self.clearingRow[cc]=h-cc+1 - self.clearedRow[cc]=h - break - end - end - end + --Bomb trigger (optional, must with CB) + if CB and h>0 and field[h]and self.clearedRow[cc]~=h then + for x=1,#CB[1]do + if CB[i][x]and field[h][CX+x-1]==19 then + cc=cc+1 + self.clearingRow[cc]=h-cc+1 + self.clearedRow[cc]=h + break + end + end + end - h=h+1 - --Row filled - for x=1,10 do - if field[h][x]<=0 then - goto CONTINUE_notFull - end - end - cc=cc+1 - ins(self.clearingRow,h-cc+1) - ins(self.clearedRow,h) - ::CONTINUE_notFull:: - end - end - return cc + h=h+1 + --Row filled + for x=1,10 do + if field[h][x]<=0 then + goto CONTINUE_notFull + end + end + cc=cc+1 + ins(self.clearingRow,h-cc+1) + ins(self.clearedRow,h) + ::CONTINUE_notFull:: + end + end + return cc end function Player:roofCheck() - local CB=self.cur.bk - for x=1,#CB[1]do - local y=#CB + local CB=self.cur.bk + for x=1,#CB[1]do + local y=#CB - --Find the highest y of blocks' x-th column - while not CB[y][x]do y=y-1 end + --Find the highest y of blocks' x-th column + while not CB[y][x]do y=y-1 end - local testX=self.curX+x-1--Optimize + local testX=self.curX+x-1--Optimize - --Test the whole column of field to find roof - for testY=self.curY+y,#self.field do - if self:solid(testX,testY)then - return true - end - end - end - return false + --Test the whole column of field to find roof + for testY=self.curY+y,#self.field do + if self:solid(testX,testY)then + return true + end + end + end + return false end function Player:removeTopClearingFX() - for i=#self.clearingRow,1,-1 do - if self.clearingRow[i]>#self.field then - rem(self.clearingRow) - else - return - end - end + for i=#self.clearingRow,1,-1 do + if self.clearingRow[i]>#self.field then + rem(self.clearingRow) + else + return + end + end end function Player:checkMission(piece,mission) - if mission<5 then - return piece.row==mission and not piece.spin - elseif mission<9 then - return piece.row==mission-4 and piece.spin - elseif mission==9 then - return piece.pc - elseif mission<90 then - return piece.row==mission%10 and piece.name==int(mission/10)and piece.spin - end - return false + if mission<5 then + return piece.row==mission and not piece.spin + elseif mission<9 then + return piece.row==mission-4 and piece.spin + elseif mission==9 then + return piece.pc + elseif mission<90 then + return piece.row==mission%10 and piece.name==int(mission/10)and piece.spin + end + return false end local spawnSFX_name={}for i=1,7 do spawnSFX_name[i]='spawn_'..i end function Player:resetBlock()--Reset Block's position and execute I*S - local C=self.cur - local sc=C.rs.centerPos[C.id][C.dir] + local C=self.cur + local sc=C.rs.centerPos[C.id][C.dir] - self.curX=int(6-#C.bk[1]*.5) - local y=int(self.gameEnv.fieldH+1-modf(sc[1]))+ceil(self.fieldBeneath/30) - self.curY=y - self.minY=y+sc[1] + self.curX=int(6-#C.bk[1]*.5) + local y=int(self.gameEnv.fieldH+1-modf(sc[1]))+ceil(self.fieldBeneath/30) + self.curY=y + self.minY=y+sc[1] - local pressing=self.keyPressing - --IMS - if self.gameEnv.ims and(pressing[1]and self.movDir==-1 or pressing[2]and self.movDir==1)and self.moving>=self.gameEnv.das then - local x=self.curX+self.movDir - if not self:ifoverlap(C.bk,x,y)then - self.curX=x - end - end + local pressing=self.keyPressing + --IMS + if self.gameEnv.ims and(pressing[1]and self.movDir==-1 or pressing[2]and self.movDir==1)and self.moving>=self.gameEnv.das then + local x=self.curX+self.movDir + if not self:ifoverlap(C.bk,x,y)then + self.curX=x + end + end - --IRS - if self.gameEnv.irs then - if pressing[5]then - self:spin(2,true) - elseif pressing[3]then - if pressing[4]then - self:spin(2,true) - else - self:spin(1,true) - end - elseif pressing[4]then - self:spin(3,true) - end - pressing[3],pressing[4],pressing[5]=false,false,false - end + --IRS + if self.gameEnv.irs then + if pressing[5]then + self:spin(2,true) + elseif pressing[3]then + if pressing[4]then + self:spin(2,true) + else + self:spin(1,true) + end + elseif pressing[4]then + self:spin(3,true) + end + pressing[3],pressing[4],pressing[5]=false,false,false + end - --DAS cut - if self.gameEnv.dascut>0 then - self.moving=self.moving-(self.moving>0 and 1 or -1)*self.gameEnv.dascut - end + --DAS cut + if self.gameEnv.dascut>0 then + self.moving=self.moving-(self.moving>0 and 1 or -1)*self.gameEnv.dascut + end - --Spawn SFX - if self.sound and C.id<8 then - SFX.fplay(spawnSFX_name[C.id],SETTING.sfx_spawn) - end + --Spawn SFX + if self.sound and C.id<8 then + SFX.fplay(spawnSFX_name[C.id],SETTING.sfx_spawn) + end end function Player:spin(d,ifpre) - local C=self.cur - local sc=C.rs.centerPos[C.id][C.dir] - local kickData=C.rs.kickTable[C.id] - if type(kickData)=='table'then - local idir=(C.dir+d)%4 - kickData=kickData[C.dir*10+idir] - if not kickData then - self:freshBlock('move') - SFX.play(ifpre and'prerotate'or'rotate',nil,self:getCenterX()*.15) - return - end - local icb=BLOCKS[C.id][idir] - local isc=C.rs.centerPos[C.id][idir] - local baseX,baseY=self.curX+sc[2]-isc[2],self.curY+sc[1]-isc[1] - for test=1,#kickData do - local ix,iy=baseX+kickData[test][1],baseY+kickData[test][2] - if (self.freshTime>0 or kickData[test][2]<=0)and not self:ifoverlap(icb,ix,iy)then - --Create moveFX at the original position - self:createMoveFX() + local C=self.cur + local sc=C.rs.centerPos[C.id][C.dir] + local kickData=C.rs.kickTable[C.id] + if type(kickData)=='table'then + local idir=(C.dir+d)%4 + kickData=kickData[C.dir*10+idir] + if not kickData then + self:freshBlock('move') + SFX.play(ifpre and'prerotate'or'rotate',nil,self:getCenterX()*.15) + return + end + local icb=BLOCKS[C.id][idir] + local isc=C.rs.centerPos[C.id][idir] + local baseX,baseY=self.curX+sc[2]-isc[2],self.curY+sc[1]-isc[1] + for test=1,#kickData do + local ix,iy=baseX+kickData[test][1],baseY+kickData[test][2] + if (self.freshTime>0 or kickData[test][2]<=0)and not self:ifoverlap(icb,ix,iy)then + --Create moveFX at the original position + self:createMoveFX() - --Change block position - sc,C.bk,C.dir=isc,icb,idir - self.curX,self.curY=ix,iy - self.spinLast=test==2 and 0 or 1 + --Change block position + sc,C.bk,C.dir=isc,icb,idir + self.curX,self.curY=ix,iy + self.spinLast=test==2 and 0 or 1 - --Fresh ghost and freshTime - local t=self.freshTime - if not ifpre then self:freshBlock('move')end - if kickData[test][2]>0 and self.freshTime==t and self.curY~=self.imgY then - self.freshTime=self.freshTime-1 - end + --Fresh ghost and freshTime + local t=self.freshTime + if not ifpre then self:freshBlock('move')end + if kickData[test][2]>0 and self.freshTime==t and self.curY~=self.imgY then + self.freshTime=self.freshTime-1 + end - --Sound & Field shaking - local sfx - if ifpre then - sfx='prerotate' - elseif self:ifoverlap(icb,ix,iy+1)and self:ifoverlap(icb,ix-1,iy)and self:ifoverlap(icb,ix+1,iy)then - sfx='rotatekick' - if self.gameEnv.shakeFX then - if d==1 or d==3 then - self.fieldOff.va=self.fieldOff.va+(2-d)*6e-3 - else - self.fieldOff.va=self.fieldOff.va+self:getCenterX()*3e-3 - end - end - else - sfx='rotate' - end - if self.sound then - SFX.play(sfx,nil,self:getCenterX()*.15) - end - self.stat.rotate=self.stat.rotate+1 - return - end - end - elseif kickData then - kickData(self,d) - else - self:freshBlock('move') - SFX.play(ifpre and'prerotate'or'rotate',nil,self:getCenterX()*.15) - end + --Sound & Field shaking + local sfx + if ifpre then + sfx='prerotate' + elseif self:ifoverlap(icb,ix,iy+1)and self:ifoverlap(icb,ix-1,iy)and self:ifoverlap(icb,ix+1,iy)then + sfx='rotatekick' + if self.gameEnv.shakeFX then + if d==1 or d==3 then + self.fieldOff.va=self.fieldOff.va+(2-d)*6e-3 + else + self.fieldOff.va=self.fieldOff.va+self:getCenterX()*3e-3 + end + end + else + sfx='rotate' + end + if self.sound then + SFX.play(sfx,nil,self:getCenterX()*.15) + end + self.stat.rotate=self.stat.rotate+1 + return + end + end + elseif kickData then + kickData(self,d) + else + self:freshBlock('move') + SFX.play(ifpre and'prerotate'or'rotate',nil,self:getCenterX()*.15) + end end local phyHoldKickX={ - [true]={0,-1,1},--X==?.0 tests - [false]={-.5,.5},--X==?.5 tests + [true]={0,-1,1},--X==?.0 tests + [false]={-.5,.5},--X==?.5 tests } function Player:hold(ifpre) - local ENV=self.gameEnv - if self.holdTime>0 and(ifpre or self.waiting==-1)then - if #self.holdQueue0 and(ifpre or self.waiting==-1)then + if #self.holdQueue All test failed, interrupt with sound - SFX.play('finesseError') - do return end - -- - ::BREAK_success:: + local iki=phyHoldKickX[x==int(x)] + for Y=int(y),ceil(y+.5)do + for i=1,#iki do + local X=x+iki[i] + if not self:ifoverlap(H.bk,X,Y)then + x,y=X,Y + goto BREAK_success + end + end + end + -- All test failed, interrupt with sound + SFX.play('finesseError') + do return end + -- + ::BREAK_success:: - self.spinLast=false - self.spinSeq=0 - local hb=self:getBlock(C.id) - hb.name=C.name - hb.color=C.color - ins(self.holdQueue,hb) - self.cur=rem(self.holdQueue,1) - self.curX,self.curY=x,y - else--Normal hold - self.spinLast=false - self.spinSeq=0 + self.spinLast=false + self.spinSeq=0 + local hb=self:getBlock(C.id) + hb.name=C.name + hb.color=C.color + ins(self.holdQueue,hb) + self.cur=rem(self.holdQueue,1) + self.curX,self.curY=x,y + else--Normal hold + self.spinLast=false + self.spinSeq=0 - if C then - local hb=self:getBlock(C.id) - hb.color=C.color - hb.name=C.name - ins(self.holdQueue,hb) - end - self.cur=rem(self.holdQueue,1) + if C then + local hb=self:getBlock(C.id) + hb.color=C.color + hb.name=C.name + ins(self.holdQueue,hb) + end + self.cur=rem(self.holdQueue,1) - self:resetBlock() - end - self:freshBlock('move') - self.dropDelay=ENV.drop - self.lockDelay=ENV.lock - if self:ifoverlap(self.cur.bk,self.curX,self.curY)then - self:lock() - self:lose() - end - end + self:resetBlock() + end + self:freshBlock('move') + self.dropDelay=ENV.drop + self.lockDelay=ENV.lock + if self:ifoverlap(self.cur.bk,self.curX,self.curY)then + self:lock() + self:lose() + end + end - self.freshTime=int(min(self.freshTime+ENV.freshLimit*.25,ENV.freshLimit*((self.holdTime+1)/ENV.holdCount),ENV.freshLimit)) - if not ENV.infHold then - self.holdTime=self.holdTime-1 - end + self.freshTime=int(min(self.freshTime+ENV.freshLimit*.25,ENV.freshLimit*((self.holdTime+1)/ENV.holdCount),ENV.freshLimit)) + if not ENV.infHold then + self.holdTime=self.holdTime-1 + end - if self.sound then - SFX.play(ifpre and'prehold'or'hold') - end + if self.sound then + SFX.play(ifpre and'prehold'or'hold') + end - self.stat.hold=self.stat.hold+1 - end + self.stat.hold=self.stat.hold+1 + end end function Player:getBlock(id,name,color)--Get a block object - local ENV=self.gameEnv - local dir=ENV.face[id] - return{ - id=id, - dir=dir, - bk=BLOCKS[id][dir], - rs=self.RS, - name=name or id, - color=ENV.bone and 17 or color or ENV.skin[id], - } + local ENV=self.gameEnv + local dir=ENV.face[id] + return{ + id=id, + dir=dir, + bk=BLOCKS[id][dir], + rs=self.RS, + name=name or id, + color=ENV.bone and 17 or color or ENV.skin[id], + } end function Player:getNext(id)--Push a block to nextQueue - ins(self.nextQueue,self:getBlock(id)) - if self.bot then - self.bot:pushNewNext(id) - end + ins(self.nextQueue,self:getBlock(id)) + if self.bot then + self.bot:pushNewNext(id) + end end function Player:popNext(ifhold)--Pop nextQueue to hand - local ENV=self.gameEnv - if not ifhold then - self.holdTime=min(self.holdTime+1,ENV.holdCount) - end - self.spinLast=false - self.spinSeq=0 - self.ctrlCount=0 + local ENV=self.gameEnv + if not ifhold then + self.holdTime=min(self.holdTime+1,ENV.holdCount) + end + self.spinLast=false + self.spinSeq=0 + self.ctrlCount=0 - self.cur=rem(self.nextQueue,1) - self.newNext() - if self.cur then - self.pieceCount=self.pieceCount+1 + self.cur=rem(self.nextQueue,1) + self.newNext() + if self.cur then + self.pieceCount=self.pieceCount+1 - local pressing=self.keyPressing + local pressing=self.keyPressing - --IHS - if not ifhold and pressing[8]and ENV.ihs and self.holdTime>0 then - self:hold(true) - pressing[8]=false - else - self:resetBlock() - end + --IHS + if not ifhold and pressing[8]and ENV.ihs and self.holdTime>0 then + self:hold(true) + pressing[8]=false + else + self:resetBlock() + end - self.dropDelay=ENV.drop - self.lockDelay=ENV.lock - self.freshTime=ENV.freshLimit + self.dropDelay=ENV.drop + self.lockDelay=ENV.lock + self.freshTime=ENV.freshLimit - if self.cur then - if self:ifoverlap(self.cur.bk,self.curX,self.curY)then - self:lock() - self:lose() - end - self:freshBlock('newBlock') - end + if self.cur then + if self:ifoverlap(self.cur.bk,self.curX,self.curY)then + self:lock() + self:lose() + end + self:freshBlock('newBlock') + end - --IHdS - if pressing[6]and not ifhold then - self:act_hardDrop() - pressing[6]=false - end - else - self:hold() - end + --IHdS + if pressing[6]and not ifhold then + self:act_hardDrop() + pressing[6]=false + end + else + self:hold() + end end function Player:cancel(N)--Cancel Garbage - local off=0--Lines offseted - local bf=self.atkBuffer - for i=1,#bf do - if self.atkBufferSum==0 or N==0 then break end - local A=bf[i] - if not A.sent then - local O=min(A.amount,N)--Cur Offset - if N2 then dospin=dospin+2 end - end - end - end - --Immovable spin check - if self:ifoverlap(CB,CX,CY+1)and self:ifoverlap(CB,CX-1,CY)and self:ifoverlap(CB,CX+1,CY)then - dospin=dospin+2 - end + --Tri-corner spin check + if self.spinLast then + if C.id<6 then + local x,y=CX+sc[2],CY+sc[1] + local c=0 + if self:solid(x-1,y+1)then c=c+1 end + if self:solid(x+1,y+1)then c=c+1 end + if c~=0 then + if self:solid(x-1,y-1)then c=c+1 end + if self:solid(x+1,y-1)then c=c+1 end + if c>2 then dospin=dospin+2 end + end + end + end + --Immovable spin check + if self:ifoverlap(CB,CX,CY+1)and self:ifoverlap(CB,CX-1,CY)and self:ifoverlap(CB,CX+1,CY)then + dospin=dospin+2 + end - if self.bot then - self:checkDest() - end - self:lock() + if self.bot then + self:checkDest() + end + self:lock() - --Clear list of cleared-rows - if self.clearedRow[1]then TABLE.cut(self.clearedRow)end + --Clear list of cleared-rows + if self.clearedRow[1]then TABLE.cut(self.clearedRow)end - --Check line clear - cc=cc+self:checkClear(self.field,CY,#CB,CB,CX) + --Check line clear + cc=cc+self:checkClear(self.field,CY,#CB,CB,CX) - --Create clearing FX - for i=1,cc do - local y=self.clearedRow[i] - self:createClearingFX(y) - self:createSplashFX(y) - end + --Create clearing FX + for i=1,cc do + local y=self.clearedRow[i] + self:createClearingFX(y) + self:createSplashFX(y) + end - --Create locking FX - if cc==0 then - self:createLockFX() - else - self:clearLockFX() - end + --Create locking FX + if cc==0 then + self:createLockFX() + else + self:clearLockFX() + end - --Final spin check - if dospin>0 then - if cc>0 then - dospin=dospin+(self.spinLast or 0) - if dospin<3 then - mini=C.id<6 and cc<#CB - end - end - else - dospin=false - end + --Final spin check + if dospin>0 then + if cc>0 then + dospin=dospin+(self.spinLast or 0) + if dospin<3 then + mini=C.id<6 and cc<#CB + end + end + else + dospin=false + end - --Finesse: roof check - local finesse=CY>ENV.fieldH-2 or self:roofCheck() + --Finesse: roof check + local finesse=CY>ENV.fieldH-2 or self:roofCheck() - --Remove rows need to be cleared - if cc>0 then - for i=cc,1,-1 do - _=self.clearedRow[i] - if self.field[_].garbage then - self.garbageBeneath=self.garbageBeneath-1 - gbcc=gbcc+1 - end - FREEROW.discard(rem(self.field,_)) - FREEROW.discard(rem(self.visTime,_)) - end - end + --Remove rows need to be cleared + if cc>0 then + for i=cc,1,-1 do + _=self.clearedRow[i] + if self.field[_].garbage then + self.garbageBeneath=self.garbageBeneath-1 + gbcc=gbcc+1 + end + FREEROW.discard(rem(self.field,_)) + FREEROW.discard(rem(self.visTime,_)) + end + end - --Cancel top clearing FX - self:removeTopClearingFX() - if self.clearingRow[1]then - self.falling=ENV.fall - else - clear=true - end + --Cancel top clearing FX + self:removeTopClearingFX() + if self.clearingRow[1]then + self.falling=ENV.fall + else + clear=true + end - --Finesse check (control) - local finePts - if not finesse then - if dospin then self.ctrlCount=self.ctrlCount-2 end--Allow 2 more step for roof-less spin - local id=C.id - local d=self.ctrlCount-finesseList[id][C.dir+1][CX] - finePts=d<=0 and 5 or max(3-d,0) - else - finePts=5 - end - piece.finePts=finePts + --Finesse check (control) + local finePts + if not finesse then + if dospin then self.ctrlCount=self.ctrlCount-2 end--Allow 2 more step for roof-less spin + local id=C.id + local d=self.ctrlCount-finesseList[id][C.dir+1][CX] + finePts=d<=0 and 5 or max(3-d,0) + else + finePts=5 + end + piece.finePts=finePts - Stat.finesseRate=Stat.finesseRate+finePts - if finePts<5 then - Stat.extraPiece=Stat.extraPiece+1 - if ENV.fineKill then - finish=true - end - if self.sound then - if ENV.fineKill then - SFX.play('finesseError_long',.6) - elseif ENV.fine then - SFX.play('finesseError',.8) - else - SFX.play('lock',nil,self:getCenterX()*.15) - end - end - elseif self.sound then - SFX.play('lock',nil,self:getCenterX()*.15) - end + Stat.finesseRate=Stat.finesseRate+finePts + if finePts<5 then + Stat.extraPiece=Stat.extraPiece+1 + if ENV.fineKill then + finish=true + end + if self.sound then + if ENV.fineKill then + SFX.play('finesseError_long',.6) + elseif ENV.fine then + SFX.play('finesseError',.8) + else + SFX.play('lock',nil,self:getCenterX()*.15) + end + end + elseif self.sound then + SFX.play('lock',nil,self:getCenterX()*.15) + end - if finePts<=1 then - self.finesseCombo=0 - else - self.finesseCombo=self.finesseCombo+1 - if self.finesseCombo>2 then - self.finesseComboTime=12 - end - end + if finePts<=1 then + self.finesseCombo=0 + else + self.finesseCombo=self.finesseCombo+1 + if self.finesseCombo>2 then + self.finesseComboTime=12 + end + end - piece.spin,piece.mini=dospin,false - piece.pc,piece.hpc=false,false - piece.special=false - if cc>0 then--If lines cleared,about 200 lines of codes below - cmb=cmb+1 - if dospin then - cscore=(spinSCR[C.name]or spinSCR[8])[cc] - if self.b2b>800 then - self:showText(text.b3b..text.block[C.name]..text.spin.." "..text.clear[cc],0,-30,35,'stretch') - atk=b2bATK[cc]+cc*.5 - exblock=exblock+1 - cscore=cscore*2 - Stat.b3b=Stat.b3b+1 - if self.sound then - VOC.play('b3b',CHN) - end - elseif self.b2b>=50 then - self:showText(text.b2b..text.block[C.name]..text.spin.." "..text.clear[cc],0,-30,35,'spin') - atk=b2bATK[cc] - cscore=cscore*1.2 - Stat.b2b=Stat.b2b+1 - if self.sound then - VOC.play('b2b',CHN) - end - else - self:showText(text.block[C.name]..text.spin.." "..text.clear[cc],0,-30,45,'spin') - atk=2*cc - end - sendTime=20+atk*20 - if mini then - self:showText(text.mini,0,-80,35,'appear') - atk=atk*.25 - sendTime=sendTime+60 - cscore=cscore*.5 - self.b2b=self.b2b+b2bPoint[cc]*.5 - if self.sound then - VOC.play('mini',CHN) - end - else - self.b2b=self.b2b+b2bPoint[cc] - end - piece.mini=mini - piece.special=true - if self.sound then - SFX.play(spinSFX[cc]or'spin_3') - VOC.play(spinVoice[C.name],CHN) - end - elseif cc>=4 then - cscore=cc==4 and 1000 or cc==5 and 1500 or 2000 - if self.b2b>800 then - self:showText(text.b3b..text.clear[cc],0,-30,50,'fly') - atk=4*cc-10 - sendTime=100 - exblock=exblock+1 - cscore=cscore*1.8 - Stat.b3b=Stat.b3b+1 - if self.sound then - VOC.play('b3b',CHN) - end - elseif self.b2b>=50 then - self:showText(text.b2b..text.clear[cc],0,-30,50,'drive') - sendTime=80 - atk=3*cc-7 - cscore=cscore*1.3 - Stat.b2b=Stat.b2b+1 - if self.sound then - VOC.play('b2b',CHN) - end - else - self:showText(text.clear[cc],0,-30,70,'stretch') - sendTime=60 - atk=2*cc-4 - end - self.b2b=self.b2b+cc*50-50 - piece.special=true - else - piece.special=false - end - if self.sound then - VOC.play(clearVoice[cc],CHN) - end + piece.spin,piece.mini=dospin,false + piece.pc,piece.hpc=false,false + piece.special=false + if cc>0 then--If lines cleared,about 200 lines of codes below + cmb=cmb+1 + if dospin then + cscore=(spinSCR[C.name]or spinSCR[8])[cc] + if self.b2b>800 then + self:showText(text.b3b..text.block[C.name]..text.spin.." "..text.clear[cc],0,-30,35,'stretch') + atk=b2bATK[cc]+cc*.5 + exblock=exblock+1 + cscore=cscore*2 + Stat.b3b=Stat.b3b+1 + if self.sound then + VOC.play('b3b',CHN) + end + elseif self.b2b>=50 then + self:showText(text.b2b..text.block[C.name]..text.spin.." "..text.clear[cc],0,-30,35,'spin') + atk=b2bATK[cc] + cscore=cscore*1.2 + Stat.b2b=Stat.b2b+1 + if self.sound then + VOC.play('b2b',CHN) + end + else + self:showText(text.block[C.name]..text.spin.." "..text.clear[cc],0,-30,45,'spin') + atk=2*cc + end + sendTime=20+atk*20 + if mini then + self:showText(text.mini,0,-80,35,'appear') + atk=atk*.25 + sendTime=sendTime+60 + cscore=cscore*.5 + self.b2b=self.b2b+b2bPoint[cc]*.5 + if self.sound then + VOC.play('mini',CHN) + end + else + self.b2b=self.b2b+b2bPoint[cc] + end + piece.mini=mini + piece.special=true + if self.sound then + SFX.play(spinSFX[cc]or'spin_3') + VOC.play(spinVoice[C.name],CHN) + end + elseif cc>=4 then + cscore=cc==4 and 1000 or cc==5 and 1500 or 2000 + if self.b2b>800 then + self:showText(text.b3b..text.clear[cc],0,-30,50,'fly') + atk=4*cc-10 + sendTime=100 + exblock=exblock+1 + cscore=cscore*1.8 + Stat.b3b=Stat.b3b+1 + if self.sound then + VOC.play('b3b',CHN) + end + elseif self.b2b>=50 then + self:showText(text.b2b..text.clear[cc],0,-30,50,'drive') + sendTime=80 + atk=3*cc-7 + cscore=cscore*1.3 + Stat.b2b=Stat.b2b+1 + if self.sound then + VOC.play('b2b',CHN) + end + else + self:showText(text.clear[cc],0,-30,70,'stretch') + sendTime=60 + atk=2*cc-4 + end + self.b2b=self.b2b+cc*50-50 + piece.special=true + else + piece.special=false + end + if self.sound then + VOC.play(clearVoice[cc],CHN) + end - --Normal clear,reduce B2B point - if not piece.special then - self.b2b=max(self.b2b-250,0) - self:showText(text.clear[cc],0,-30,35,'appear',(8-cc)*.3) - atk=cc-.5 - sendTime=20+int(atk*20) - cscore=cscore+clearSCR[cc] - end + --Normal clear,reduce B2B point + if not piece.special then + self.b2b=max(self.b2b-250,0) + self:showText(text.clear[cc],0,-30,35,'appear',(8-cc)*.3) + atk=cc-.5 + sendTime=20+int(atk*20) + cscore=cscore+clearSCR[cc] + end - --Combo bonus - sendTime=sendTime+25*cmb - if cmb>1 then - atk=atk*(1+(cc==1 and .15 or .25)*min(cmb-1,12)) - if cmb>=3 then - atk=atk+1 - end - self:showText(text.cmb[min(cmb,21)],0,25,15+min(cmb,15)*5,cmb<10 and'appear'or'flicker') - cscore=cscore+min(50*cmb,500)*(2*cc-1) - end + --Combo bonus + sendTime=sendTime+25*cmb + if cmb>1 then + atk=atk*(1+(cc==1 and .15 or .25)*min(cmb-1,12)) + if cmb>=3 then + atk=atk+1 + end + self:showText(text.cmb[min(cmb,21)],0,25,15+min(cmb,15)*5,cmb<10 and'appear'or'flicker') + cscore=cscore+min(50*cmb,500)*(2*cc-1) + end - --PC/HPC - if clear and cc>=#C.bk then - if CY==1 then - self:showText(text.PC,0,-80,50,'flicker') - atk=max(atk,min(8+Stat.pc*2,16)) - exblock=exblock+2 - sendTime=sendTime+120 - if Stat.row+cc>4 then - self.b2b=self.b2b+800 - cscore=cscore+300*min(6+Stat.pc,10) - else - cscore=cscore+626 - end - Stat.pc=Stat.pc+1 - if self.sound then - SFX.play('clear') - VOC.play('perfect_clear',CHN) - end - piece.pc=true - piece.special=true - elseif cc>1 or #self.field==self.garbageBeneath then - self:showText(text.HPC,0,-80,50,'fly') - atk=atk+4 - exblock=exblock+2 - sendTime=sendTime+60 - self.b2b=self.b2b+100 - cscore=cscore+626 - Stat.hpc=Stat.hpc+1 - if self.sound then - SFX.play('clear') - VOC.play('half_clear',CHN) - end - piece.hpc=true - piece.special=true - end - end + --PC/HPC + if clear and cc>=#C.bk then + if CY==1 then + self:showText(text.PC,0,-80,50,'flicker') + atk=max(atk,min(8+Stat.pc*2,16)) + exblock=exblock+2 + sendTime=sendTime+120 + if Stat.row+cc>4 then + self.b2b=self.b2b+800 + cscore=cscore+300*min(6+Stat.pc,10) + else + cscore=cscore+626 + end + Stat.pc=Stat.pc+1 + if self.sound then + SFX.play('clear') + VOC.play('perfect_clear',CHN) + end + piece.pc=true + piece.special=true + elseif cc>1 or #self.field==self.garbageBeneath then + self:showText(text.HPC,0,-80,50,'fly') + atk=atk+4 + exblock=exblock+2 + sendTime=sendTime+60 + self.b2b=self.b2b+100 + cscore=cscore+626 + Stat.hpc=Stat.hpc+1 + if self.sound then + SFX.play('clear') + VOC.play('half_clear',CHN) + end + piece.hpc=true + piece.special=true + end + end - if self.b2b>1000 then - self.b2b=1000 - elseif self.b2b==0 and ENV.b2bKill then - finish=true - end + if self.b2b>1000 then + self.b2b=1000 + elseif self.b2b==0 and ENV.b2bKill then + finish=true + end - --Bonus atk/def when focused - if GAME.modeEnv.royaleMode then - local i=min(#self.atker,9) - if i>1 then - atk=atk+reAtk[i] - exblock=exblock+reDef[i] - end - end + --Bonus atk/def when focused + if GAME.modeEnv.royaleMode then + local i=min(#self.atker,9) + if i>1 then + atk=atk+reAtk[i] + exblock=exblock+reDef[i] + end + end - --Send Lines - atk=int(atk*(1+self.strength*.25))--Badge Buff - send=atk - if exblock>0 then - exblock=int(exblock*(1+self.strength*.25))--Badge Buff - self:showText("+"..exblock,0,53,20,'fly') - off=off+self:cancel(exblock) - end - if send>=1 then - self:showText(send,0,80,35,'zoomout') - _=self:cancel(send) - send=send-_ - off=off+_ - if send>0 then - local T - if GAME.modeEnv.royaleMode then - if self.atkMode==4 then - local M=#self.atker - if M>0 then - for i=1,M do - self:attack(self.atker[i],send,sendTime,generateLine(self.atkRND:random(10))) - end - else - T=randomTarget(self) - end - else - T=self.atking - self:freshTarget() - end - elseif #PLY_ALIVE>1 then - T=randomTarget(self) - end - if T then - self:attack(T,send,sendTime,generateLine(self.atkRND:random(10))) - end - end - if self.sound and send>3 then SFX.play('emit',min(send,7)*.1)end - end + --Send Lines + atk=int(atk*(1+self.strength*.25))--Badge Buff + send=atk + if exblock>0 then + exblock=int(exblock*(1+self.strength*.25))--Badge Buff + self:showText("+"..exblock,0,53,20,'fly') + off=off+self:cancel(exblock) + end + if send>=1 then + self:showText(send,0,80,35,'zoomout') + _=self:cancel(send) + send=send-_ + off=off+_ + if send>0 then + local T + if GAME.modeEnv.royaleMode then + if self.atkMode==4 then + local M=#self.atker + if M>0 then + for i=1,M do + self:attack(self.atker[i],send,sendTime,generateLine(self.atkRND:random(10))) + end + else + T=randomTarget(self) + end + else + T=self.atking + self:freshTarget() + end + elseif #PLY_ALIVE>1 then + T=randomTarget(self) + end + if T then + self:attack(T,send,sendTime,generateLine(self.atkRND:random(10))) + end + end + if self.sound and send>3 then SFX.play('emit',min(send,7)*.1)end + end - --SFX & Vibrate - if self.sound then - SFX.play(clearSFX[cc]or'clear_4') - SFX.play(renSFX[min(cmb,11)]) - if cmb>14 then SFX.play('ren_mega',(cmb-10)*.1)end - VIB(cc+1) - end - else--No lines clear - cmb=0 + --SFX & Vibrate + if self.sound then + SFX.play(clearSFX[cc]or'clear_4') + SFX.play(renSFX[min(cmb,11)]) + if cmb>14 then SFX.play('ren_mega',(cmb-10)*.1)end + VIB(cc+1) + end + else--No lines clear + cmb=0 - --Spin bonus - if dospin then - self:showText(text.block[C.name]..text.spin,0,-30,45,'appear') - self.b2b=self.b2b+20 - if self.sound then - SFX.play('spin_0') - VOC.play(spinVoice[C.name],CHN) - end - cscore=30 - end + --Spin bonus + if dospin then + self:showText(text.block[C.name]..text.spin,0,-30,45,'appear') + self.b2b=self.b2b+20 + if self.sound then + SFX.play('spin_0') + VOC.play(spinVoice[C.name],CHN) + end + cscore=30 + end - if self.b2b>800 then - self.b2b=max(self.b2b-40,800) - end - self:garbageRelease() - end + if self.b2b>800 then + self.b2b=max(self.b2b-40,800) + end + self:garbageRelease() + end - self.combo=cmb + self.combo=cmb - --Spike - if atk>0 then - self.spike=self.spikeTime==0 and atk or self.spike+atk - self.spikeTime=min(self.spikeTime+atk*20,100) - self.spikeText:set(self.spike) - end + --Spike + if atk>0 then + self.spike=self.spikeTime==0 and atk or self.spike+atk + self.spikeTime=min(self.spikeTime+atk*20,100) + self.spikeText:set(self.spike) + end - --DropSpeed bonus - if self._20G then - cscore=cscore*2 - elseif ENV.drop<1 then - cscore=cscore*1.5 - elseif ENV.drop<3 then - cscore=cscore*1.2 - end + --DropSpeed bonus + if self._20G then + cscore=cscore*2 + elseif ENV.drop<1 then + cscore=cscore*1.5 + elseif ENV.drop<3 then + cscore=cscore*1.2 + end - --Speed bonus - if self.dropSpeed>60 then cscore=cscore*(.9+self.dropSpeed/600)end + --Speed bonus + if self.dropSpeed>60 then cscore=cscore*(.9+self.dropSpeed/600)end - cscore=int(cscore) - self:popScore(cscore) + cscore=int(cscore) + self:popScore(cscore) - piece.row,piece.dig=cc,gbcc - piece.score=cscore - piece.atk,piece.exblock=atk,exblock - piece.off,piece.send=off,send + piece.row,piece.dig=cc,gbcc + piece.score=cscore + piece.atk,piece.exblock=atk,exblock + piece.off,piece.send=off,send - --Check clearing task - if cc>0 and self.curMission then - if self:checkMission(piece,ENV.mission[self.curMission])then - self.curMission=self.curMission+1 - SFX.play('reach') - if self.curMission>#ENV.mission then - self.curMission=false - if not finish then finish='finish'end - end - elseif ENV.missionKill then - self:_showText(text.missionFailed,0,140,40,'flicker',.5) - SFX.play('finesseError_long',.6) - finish=true - end - end + --Check clearing task + if cc>0 and self.curMission then + if self:checkMission(piece,ENV.mission[self.curMission])then + self.curMission=self.curMission+1 + SFX.play('reach') + if self.curMission>#ENV.mission then + self.curMission=false + if not finish then finish='finish'end + end + elseif ENV.missionKill then + self:_showText(text.missionFailed,0,140,40,'flicker',.5) + SFX.play('finesseError_long',.6) + finish=true + end + end - --Check height limit - if cc==0 and #self.field>ENV.heightLimit then self:lose()end + --Check height limit + if cc==0 and #self.field>ENV.heightLimit then self:lose()end - --Update stat - Stat.piece=Stat.piece+1 - Stat.row=Stat.row+cc - Stat.maxFinesseCombo=max(Stat.maxFinesseCombo,self.finesseCombo) - Stat.maxCombo=max(Stat.maxCombo,self.combo) - Stat.score=Stat.score+cscore - if atk>0 then - Stat.atk=Stat.atk+atk - if send>0 then - Stat.send=Stat.send+int(send) - end - if off>0 then - Stat.off=Stat.off+off - end - end - if gbcc>0 then - Stat.dig=Stat.dig+gbcc - if atk>0 then - Stat.digatk=Stat.digatk+atk*gbcc/cc - end - end - local n=C.name - if dospin then - _=Stat.spin[n] _[cc+1]=_[cc+1]+1--Spin[1~25][0~4] - _=Stat.spins _[cc+1]=_[cc+1]+1--Spin[0~4] - elseif cc>0 then - _=Stat.clear[n] _[cc]=_[cc]+1--Clear[1~25][1~5] - _=Stat.clears _[cc]=_[cc]+1--Clear[1~5] - end + --Update stat + Stat.piece=Stat.piece+1 + Stat.row=Stat.row+cc + Stat.maxFinesseCombo=max(Stat.maxFinesseCombo,self.finesseCombo) + Stat.maxCombo=max(Stat.maxCombo,self.combo) + Stat.score=Stat.score+cscore + if atk>0 then + Stat.atk=Stat.atk+atk + if send>0 then + Stat.send=Stat.send+int(send) + end + if off>0 then + Stat.off=Stat.off+off + end + end + if gbcc>0 then + Stat.dig=Stat.dig+gbcc + if atk>0 then + Stat.digatk=Stat.digatk+atk*gbcc/cc + end + end + local n=C.name + if dospin then + _=Stat.spin[n] _[cc+1]=_[cc+1]+1--Spin[1~25][0~4] + _=Stat.spins _[cc+1]=_[cc+1]+1--Spin[0~4] + elseif cc>0 then + _=Stat.clear[n] _[cc]=_[cc]+1--Clear[1~25][1~5] + _=Stat.clears _[cc]=_[cc]+1--Clear[1~5] + end - if finish then - if finish==true then self:lose()return end - _=ENV.dropPiece if _ then _(self)end - if finish then self:win(finish)end - else - _=ENV.dropPiece if _ then _(self)end - end - end + if finish then + if finish==true then self:lose()return end + _=ENV.dropPiece if _ then _(self)end + if finish then self:win(finish)end + else + _=ENV.dropPiece if _ then _(self)end + end + end end function Player:loadAI(data)--Load AI params - self.bot=BOT.new(self,data) - self.bot.data=data + self.bot=BOT.new(self,data) + self.bot.data=data end ---------------------------------------------------- ---------------------------------------------------- local function task_throwBadge(ifAI,sender,time) - while true do - yield() - time=time-1 - if time%4==0 then - local S,R=sender,sender.lastRecv - local x1,y1,x2,y2 - if S.small then - x1,y1=S.centerX,S.centerY - else - x1,y1=S.x+308*S.size,S.y+450*S.size - end - if R.small then - x2,y2=R.centerX,R.centerY - else - x2,y2=R.x+66*R.size,R.y+344*R.size - end + while true do + yield() + time=time-1 + if time%4==0 then + local S,R=sender,sender.lastRecv + local x1,y1,x2,y2 + if S.small then + x1,y1=S.centerX,S.centerY + else + x1,y1=S.x+308*S.size,S.y+450*S.size + end + if R.small then + x2,y2=R.centerX,R.centerY + else + x2,y2=R.x+66*R.size,R.y+344*R.size + end - --Generate badge object - SYSFX.newBadge(x1,y1,x2,y2) + --Generate badge object + SYSFX.newBadge(x1,y1,x2,y2) - if not ifAI and time%8==0 then - SFX.play('collect') - end - end - if time<=0 then return end - end + if not ifAI and time%8==0 then + SFX.play('collect') + end + end + if time<=0 then return end + end end local function task_finish(self) - while true do - yield() - self.endCounter=self.endCounter+1 - if self.endCounter<40 then - --Make field visible - for j=1,#self.field do for i=1,10 do - if self.visTime[j][i]<20 then self.visTime[j][i]=self.visTime[j][i]+.5 end - end end - elseif self.endCounter==60 then - return - end - end + while true do + yield() + self.endCounter=self.endCounter+1 + if self.endCounter<40 then + --Make field visible + for j=1,#self.field do for i=1,10 do + if self.visTime[j][i]<20 then self.visTime[j][i]=self.visTime[j][i]+.5 end + end end + elseif self.endCounter==60 then + return + end + end end local function task_lose(self) - while true do - yield() - self.endCounter=self.endCounter+1 - if self.endCounter<40 then - --Make field visible - for j=1,#self.field do for i=1,10 do - if self.visTime[j][i]<20 then self.visTime[j][i]=self.visTime[j][i]+.5 end - end end - elseif self.endCounter>80 then - for i=1,#self.field do - for j=1,10 do - if self.visTime[i][j]>0 then - self.visTime[i][j]=self.visTime[i][j]-1 - end - end - end - if self.endCounter==120 then - for _=#self.field,1,-1 do - FREEROW.discard(self.field[_]) - FREEROW.discard(self.visTime[_]) - self.field[_],self.visTime[_]=nil - end - return - end - end - if not GAME.modeEnv.royaleMode and #PLAYERS>1 then - self.y=self.y+self.endCounter*.26 - self.absFieldY=self.absFieldY+self.endCounter*.26 - end - end + while true do + yield() + self.endCounter=self.endCounter+1 + if self.endCounter<40 then + --Make field visible + for j=1,#self.field do for i=1,10 do + if self.visTime[j][i]<20 then self.visTime[j][i]=self.visTime[j][i]+.5 end + end end + elseif self.endCounter>80 then + for i=1,#self.field do + for j=1,10 do + if self.visTime[i][j]>0 then + self.visTime[i][j]=self.visTime[i][j]-1 + end + end + end + if self.endCounter==120 then + for _=#self.field,1,-1 do + FREEROW.discard(self.field[_]) + FREEROW.discard(self.visTime[_]) + self.field[_],self.visTime[_]=nil + end + return + end + end + if not GAME.modeEnv.royaleMode and #PLAYERS>1 then + self.y=self.y+self.endCounter*.26 + self.absFieldY=self.absFieldY+self.endCounter*.26 + end + end end local function task_autoPause() - local time=0 - while true do - yield() - time=time+1 - if SCN.cur~='game'or PLAYERS[1].frameRun<180 then - return - elseif time==120 then - pauseGame() - return - end - end + local time=0 + while true do + yield() + time=time+1 + if SCN.cur~='game'or PLAYERS[1].frameRun<180 then + return + elseif time==120 then + pauseGame() + return + end + end end ---------------------------------------------------- ---------------------------------------------------- function Player:die()--Called both when win/lose! - self.alive=false - self.timing=false - self.control=false - self.update=ply_update.dead - self.waiting=1e99 - self.b2b=0 - self.tasks={} - self:clearAttackBuffer() - for i=1,#self.field do - for j=1,10 do - self.visTime[i][j]=min(self.visTime[i][j],20) - end - end - if GAME.net then - if self.id==1 then - ins(GAME.rep,self.frameRun) - ins(GAME.rep,0) - else - if self.lastRecv and self.lastRecv.id==1 then - SFX.play('collect') - end - end - end + self.alive=false + self.timing=false + self.control=false + self.update=ply_update.dead + self.waiting=1e99 + self.b2b=0 + self.tasks={} + self:clearAttackBuffer() + for i=1,#self.field do + for j=1,10 do + self.visTime[i][j]=min(self.visTime[i][j],20) + end + end + if GAME.net then + if self.id==1 then + ins(GAME.rep,self.frameRun) + ins(GAME.rep,0) + else + if self.lastRecv and self.lastRecv.id==1 then + SFX.play('collect') + end + end + end end function Player:revive() - self.waiting=62 - local h=#self.field - for _=h,1,-1 do - FREEROW.discard(self.field[_]) - FREEROW.discard(self.visTime[_]) - self.field[_],self.visTime[_]=nil - end - self.garbageBeneath=0 - if self.bot then - self.bot:revive() - end + self.waiting=62 + local h=#self.field + for _=h,1,-1 do + FREEROW.discard(self.field[_]) + FREEROW.discard(self.visTime[_]) + self.field[_],self.visTime[_]=nil + end + self.garbageBeneath=0 + if self.bot then + self.bot:revive() + end - self:clearAttackBuffer() + self:clearAttackBuffer() - self.life=self.life-1 - self.fieldBeneath=0 - self.b2b=0 + self.life=self.life-1 + self.fieldBeneath=0 + self.b2b=0 - for i=1,h do - self:createClearingFX(i,1.5) - end - SYSFX.newShade(1.4,self.fieldX,self.fieldY,300*self.size,610*self.size) - SYSFX.newRectRipple(2,self.fieldX,self.fieldY,300*self.size,610*self.size) - SYSFX.newRipple(2,self.x+(475+25*(self.life<3 and self.life or 0)+12)*self.size,self.y+(595+12)*self.size,20) - SFX.play('clear_3') - SFX.play('emit') + for i=1,h do + self:createClearingFX(i,1.5) + end + SYSFX.newShade(1.4,self.fieldX,self.fieldY,300*self.size,610*self.size) + SYSFX.newRectRipple(2,self.fieldX,self.fieldY,300*self.size,610*self.size) + SYSFX.newRipple(2,self.x+(475+25*(self.life<3 and self.life or 0)+12)*self.size,self.y+(595+12)*self.size,20) + SFX.play('clear_3') + SFX.play('emit') end function Player:win(result) - if self.result then return end - self:die() - self.result='win' - if GAME.modeEnv.royaleMode then - self.modeData.place=1 - self:changeAtk() - end - if self.type=='human'then - GAME.result=result or'gamewin' - SFX.play('win') - VOC.play('win') - if GAME.modeEnv.royaleMode then - BGM.play('8-bit happiness') - end - end - if GAME.curMode.name=='custom_puzzle'then - self:_showText(text.win,0,0,90,'beat',.4) - else - self:_showText(text.win,0,0,90,'beat',.5,.2) - end - if self.type=='human'then - gameOver() - TASK.new(task_autoPause) - end - self:newTask(task_finish) + if self.result then return end + self:die() + self.result='win' + if GAME.modeEnv.royaleMode then + self.modeData.place=1 + self:changeAtk() + end + if self.type=='human'then + GAME.result=result or'gamewin' + SFX.play('win') + VOC.play('win') + if GAME.modeEnv.royaleMode then + BGM.play('8-bit happiness') + end + end + if GAME.curMode.name=='custom_puzzle'then + self:_showText(text.win,0,0,90,'beat',.4) + else + self:_showText(text.win,0,0,90,'beat',.5,.2) + end + if self.type=='human'then + gameOver() + TASK.new(task_autoPause) + end + self:newTask(task_finish) end function Player:lose(force) - if self.result then return end - if not force then - if self.life>0 then self:revive()return end - if self.type=='remote'then self.waiting=1e99 return end - end - self:die() - local p=TABLE.find(PLY_ALIVE,self)if p then rem(PLY_ALIVE,p)end - self.result='lose' - if GAME.modeEnv.royaleMode then - self:changeAtk() - self.modeData.place=#PLY_ALIVE+1 - self.strength=0 - if self.lastRecv then - local A,depth=self,0 - repeat - A,depth=A.lastRecv,depth+1 - until not A or A.alive or A==self or depth==3 - if A and A.alive then - if self.id==1 or A.id==1 then - self.killMark=A.id==1 - end - A.modeData.ko,A.badge=A.modeData.ko+1,A.badge+self.badge+1 - for i=A.strength+1,4 do - if A.badge>=ROYALEDATA.powerUp[i]then - A.strength=i - A:setFrameColor(i) - end - end - self.lastRecv=A - if self.id==1 or A.id==1 then - TASK.new(task_throwBadge,not A.type=='human',self,max(3,self.badge)*4) - end - end - else - self.badge=-1 - end + if self.result then return end + if not force then + if self.life>0 then self:revive()return end + if self.type=='remote'then self.waiting=1e99 return end + end + self:die() + local p=TABLE.find(PLY_ALIVE,self)if p then rem(PLY_ALIVE,p)end + self.result='lose' + if GAME.modeEnv.royaleMode then + self:changeAtk() + self.modeData.place=#PLY_ALIVE+1 + self.strength=0 + if self.lastRecv then + local A,depth=self,0 + repeat + A,depth=A.lastRecv,depth+1 + until not A or A.alive or A==self or depth==3 + if A and A.alive then + if self.id==1 or A.id==1 then + self.killMark=A.id==1 + end + A.modeData.ko,A.badge=A.modeData.ko+1,A.badge+self.badge+1 + for i=A.strength+1,4 do + if A.badge>=ROYALEDATA.powerUp[i]then + A.strength=i + A:setFrameColor(i) + end + end + self.lastRecv=A + if self.id==1 or A.id==1 then + TASK.new(task_throwBadge,not A.type=='human',self,max(3,self.badge)*4) + end + end + else + self.badge=-1 + end - freshMostBadge() - freshMostDangerous() - if #PLY_ALIVE==ROYALEDATA.stage[GAME.stage]then - royaleLevelup() - end - self:_showText(self.modeData.place,0,120,60,'appear',.26,.9) - end - self.gameEnv.keepVisible=self.gameEnv.visible~='show' - self:_showText(text.lose,0,0,90,'appear',.26,.9) - if self.type=='human'then - GAME.result='gameover' - SFX.play('fail') - VOC.play('lose') - if GAME.modeEnv.royaleMode then - BGM.play('end') - end - gameOver() - self:newTask(#PLAYERS>1 and task_lose or task_finish) - if GAME.net and not NET.spectate then - NET.signal_die() - else - TASK.new(task_autoPause) - end - else - self:newTask(task_lose) - end - if #PLY_ALIVE==1 then - PLY_ALIVE[1]:win() - end + freshMostBadge() + freshMostDangerous() + if #PLY_ALIVE==ROYALEDATA.stage[GAME.stage]then + royaleLevelup() + end + self:_showText(self.modeData.place,0,120,60,'appear',.26,.9) + end + self.gameEnv.keepVisible=self.gameEnv.visible~='show' + self:_showText(text.lose,0,0,90,'appear',.26,.9) + if self.type=='human'then + GAME.result='gameover' + SFX.play('fail') + VOC.play('lose') + if GAME.modeEnv.royaleMode then + BGM.play('end') + end + gameOver() + self:newTask(#PLAYERS>1 and task_lose or task_finish) + if GAME.net and not NET.spectate then + NET.signal_die() + else + TASK.new(task_autoPause) + end + else + self:newTask(task_lose) + end + if #PLY_ALIVE==1 then + PLY_ALIVE[1]:win() + end end --------------------------<\Events>-------------------------- ---------------------------------------------------- function Player:act_moveLeft(auto) - if not auto then - self.ctrlCount=self.ctrlCount+1 - end - self.movDir=-1 - if self.keyPressing[9]then - if self.gameEnv.swap then - self:changeAtkMode(1) - self.keyPressing[1]=false - end - elseif self.control and self.waiting==-1 then - if self.cur and not self:ifoverlap(self.cur.bk,self.curX-1,self.curY)then - self:createMoveFX('left') - self.curX=self.curX-1 - self:freshBlock('move') - if self.sound and self.curY==self.ghoY then SFX.play('move')end - if not auto then self.moving=0 end - self.spinLast=false - else - self.moving=self.gameEnv.das - end - else - self.moving=0 - end + if not auto then + self.ctrlCount=self.ctrlCount+1 + end + self.movDir=-1 + if self.keyPressing[9]then + if self.gameEnv.swap then + self:changeAtkMode(1) + self.keyPressing[1]=false + end + elseif self.control and self.waiting==-1 then + if self.cur and not self:ifoverlap(self.cur.bk,self.curX-1,self.curY)then + self:createMoveFX('left') + self.curX=self.curX-1 + self:freshBlock('move') + if self.sound and self.curY==self.ghoY then SFX.play('move')end + if not auto then self.moving=0 end + self.spinLast=false + else + self.moving=self.gameEnv.das + end + else + self.moving=0 + end end function Player:act_moveRight(auto) - if not auto then - self.ctrlCount=self.ctrlCount+1 - end - self.movDir=1 - if self.keyPressing[9]then - if self.gameEnv.swap then - self:changeAtkMode(2) - self.keyPressing[2]=false - end - elseif self.control and self.waiting==-1 then - if self.cur and not self:ifoverlap(self.cur.bk,self.curX+1,self.curY)then - self:createMoveFX('right') - self.curX=self.curX+1 - self:freshBlock('move') - if self.sound and self.curY==self.ghoY then SFX.play('move')end - if not auto then self.moving=0 end - self.spinLast=false - else - self.moving=self.gameEnv.das - end - else - self.moving=0 - end + if not auto then + self.ctrlCount=self.ctrlCount+1 + end + self.movDir=1 + if self.keyPressing[9]then + if self.gameEnv.swap then + self:changeAtkMode(2) + self.keyPressing[2]=false + end + elseif self.control and self.waiting==-1 then + if self.cur and not self:ifoverlap(self.cur.bk,self.curX+1,self.curY)then + self:createMoveFX('right') + self.curX=self.curX+1 + self:freshBlock('move') + if self.sound and self.curY==self.ghoY then SFX.play('move')end + if not auto then self.moving=0 end + self.spinLast=false + else + self.moving=self.gameEnv.das + end + else + self.moving=0 + end end function Player:act_rotRight() - if self.control and self.waiting==-1 and self.cur then - self.ctrlCount=self.ctrlCount+1 - self:spin(1) - self.keyPressing[3]=false - end + if self.control and self.waiting==-1 and self.cur then + self.ctrlCount=self.ctrlCount+1 + self:spin(1) + self.keyPressing[3]=false + end end function Player:act_rotLeft() - if self.control and self.waiting==-1 and self.cur then - self.ctrlCount=self.ctrlCount+1 - self:spin(3) - self.keyPressing[4]=false - end + if self.control and self.waiting==-1 and self.cur then + self.ctrlCount=self.ctrlCount+1 + self:spin(3) + self.keyPressing[4]=false + end end function Player:act_rot180() - if self.control and self.waiting==-1 and self.cur then - self.ctrlCount=self.ctrlCount+2 - self:spin(2) - self.keyPressing[5]=false - end + if self.control and self.waiting==-1 and self.cur then + self.ctrlCount=self.ctrlCount+2 + self:spin(2) + self.keyPressing[5]=false + end end function Player:act_hardDrop() - local ENV=self.gameEnv - if self.keyPressing[9]then - if ENV.swap then - self:changeAtkMode(3) - end - self.keyPressing[6]=false - elseif self.control and self.waiting==-1 and self.cur then - if self.lastPiece.autoLock and self.frameRun-self.lastPiece.frameself.ghoY then - self:createDropFX() - self.curY=self.ghoY - self.spinLast=false - if self.sound then - SFX.play('drop',nil,self:getCenterX()*.15) - VIB(1) - end - end - if ENV.shakeFX then - self.fieldOff.vy=.6 - self.fieldOff.va=self.fieldOff.va+self:getCenterX()*6e-4 - end - self.lockDelay=-1 - self:drop() - self.keyPressing[6]=false - end - end + local ENV=self.gameEnv + if self.keyPressing[9]then + if ENV.swap then + self:changeAtkMode(3) + end + self.keyPressing[6]=false + elseif self.control and self.waiting==-1 and self.cur then + if self.lastPiece.autoLock and self.frameRun-self.lastPiece.frameself.ghoY then + self:createDropFX() + self.curY=self.ghoY + self.spinLast=false + if self.sound then + SFX.play('drop',nil,self:getCenterX()*.15) + VIB(1) + end + end + if ENV.shakeFX then + self.fieldOff.vy=.6 + self.fieldOff.va=self.fieldOff.va+self:getCenterX()*6e-4 + end + self.lockDelay=-1 + self:drop() + self.keyPressing[6]=false + end + end end function Player:act_softDrop() - local ENV=self.gameEnv - if self.keyPressing[9]then - if ENV.swap then - self:changeAtkMode(4) - end - else - self.downing=1 - if self.control and self.waiting==-1 and self.cur then - if self.curY>self.ghoY then - self.curY=self.curY-1 - self:freshBlock('fresh') - self.spinLast=false - elseif ENV.deepDrop then - local CB=self.cur.bk - local y=self.curY-1 - while self:ifoverlap(CB,self.curX,y)and y>0 do - y=y-1 - end - if y>0 then - self.ghoY=y - self:createDropFX() - self.curY=y - self:freshBlock('move') - SFX.play('swipe') - end - end - end - end + local ENV=self.gameEnv + if self.keyPressing[9]then + if ENV.swap then + self:changeAtkMode(4) + end + else + self.downing=1 + if self.control and self.waiting==-1 and self.cur then + if self.curY>self.ghoY then + self.curY=self.curY-1 + self:freshBlock('fresh') + self.spinLast=false + elseif ENV.deepDrop then + local CB=self.cur.bk + local y=self.curY-1 + while self:ifoverlap(CB,self.curX,y)and y>0 do + y=y-1 + end + if y>0 then + self.ghoY=y + self:createDropFX() + self.curY=y + self:freshBlock('move') + SFX.play('swipe') + end + end + end + end end function Player:act_hold() - if self.control then - if self.waiting==-1 then - self:hold() - self.keyPressing[8]=false - end - end + if self.control then + if self.waiting==-1 then + self:hold() + self.keyPressing[8]=false + end + end end function Player:act_func1() - self.gameEnv.fkey1(self) + self.gameEnv.fkey1(self) end function Player:act_func2() - self.gameEnv.fkey2(self) + self.gameEnv.fkey2(self) end function Player:act_insLeft(auto) - if not self.cur then return end - local x0=self.curX - while not self:ifoverlap(self.cur.bk,self.curX-1,self.curY)do - self:createMoveFX('left') - self.curX=self.curX-1 - self:freshBlock('move') - end - if self.curX~=x0 then - self.spinLast=false - end - if self.gameEnv.shakeFX then - self.fieldOff.vx=-.5 - end - if auto then - if self.ctrlCount==0 then self.ctrlCount=1 end - else - self.ctrlCount=self.ctrlCount+1 - end + if not self.cur then return end + local x0=self.curX + while not self:ifoverlap(self.cur.bk,self.curX-1,self.curY)do + self:createMoveFX('left') + self.curX=self.curX-1 + self:freshBlock('move') + end + if self.curX~=x0 then + self.spinLast=false + end + if self.gameEnv.shakeFX then + self.fieldOff.vx=-.5 + end + if auto then + if self.ctrlCount==0 then self.ctrlCount=1 end + else + self.ctrlCount=self.ctrlCount+1 + end end function Player:act_insRight(auto) - if not self.cur then return end - local x0=self.curX - while not self:ifoverlap(self.cur.bk,self.curX+1,self.curY)do - self:createMoveFX('right') - self.curX=self.curX+1 - self:freshBlock('move') - end - if self.curX~=x0 then - self.spinLast=false - end - if self.gameEnv.shakeFX then - self.fieldOff.vx=.5 - end - if auto then - if self.ctrlCount==0 then self.ctrlCount=1 end - else - self.ctrlCount=self.ctrlCount+1 - end + if not self.cur then return end + local x0=self.curX + while not self:ifoverlap(self.cur.bk,self.curX+1,self.curY)do + self:createMoveFX('right') + self.curX=self.curX+1 + self:freshBlock('move') + end + if self.curX~=x0 then + self.spinLast=false + end + if self.gameEnv.shakeFX then + self.fieldOff.vx=.5 + end + if auto then + if self.ctrlCount==0 then self.ctrlCount=1 end + else + self.ctrlCount=self.ctrlCount+1 + end end function Player:act_insDown() - if self.cur and self.curY>self.ghoY then - local ENV=self.gameEnv - self:createDropFX() - if ENV.shakeFX then - self.fieldOff.vy=.5 - end - self.curY=self.ghoY - self.lockDelay=ENV.lock - self.spinLast=false - self:freshBlock('fresh') - end + if self.cur and self.curY>self.ghoY then + local ENV=self.gameEnv + self:createDropFX() + if ENV.shakeFX then + self.fieldOff.vy=.5 + end + self.curY=self.ghoY + self.lockDelay=ENV.lock + self.spinLast=false + self:freshBlock('fresh') + end end function Player:act_down1() - if self.cur and self.curY>self.ghoY then - self:createMoveFX('down') - self.curY=self.curY-1 - self:freshBlock('fresh') - self.spinLast=false - end + if self.cur and self.curY>self.ghoY then + self:createMoveFX('down') + self.curY=self.curY-1 + self:freshBlock('fresh') + self.spinLast=false + end end function Player:act_down4() - if self.cur and self.curY>self.ghoY then - self.ghoY=max(self.curY-4,self.ghoY) - self:createDropFX() - self.curY=self.ghoY - self:freshBlock('fresh') - self.spinLast=false - end + if self.cur and self.curY>self.ghoY then + self.ghoY=max(self.curY-4,self.ghoY) + self:createDropFX() + self.curY=self.ghoY + self:freshBlock('fresh') + self.spinLast=false + end end function Player:act_down10() - if self.cur and self.curY>self.ghoY then - self.ghoY=max(self.curY-10,self.ghoY) - self:createDropFX() - self.curY=self.ghoY - self:freshBlock('fresh') - self.spinLast=false - end + if self.cur and self.curY>self.ghoY then + self.ghoY=max(self.curY-10,self.ghoY) + self:createDropFX() + self.curY=self.ghoY + self:freshBlock('fresh') + self.spinLast=false + end end function Player:act_dropLeft() - if not self.cur then return end - self:act_insLeft() - self:act_hardDrop() + if not self.cur then return end + self:act_insLeft() + self:act_hardDrop() end function Player:act_dropRight() - if not self.cur then return end - self:act_insRight() - self:act_hardDrop() + if not self.cur then return end + self:act_insRight() + self:act_hardDrop() end function Player:act_zangiLeft() - if not self.cur then return end - self:act_insLeft() - self:act_insDown() - self:act_insRight() - self:act_hardDrop() + if not self.cur then return end + self:act_insLeft() + self:act_insDown() + self:act_insRight() + self:act_hardDrop() end function Player:act_zangiRight() - if not self.cur then return end - self:act_insRight() - self:act_insDown() - self:act_insLeft() - self:act_hardDrop() + if not self.cur then return end + self:act_insRight() + self:act_insDown() + self:act_insLeft() + self:act_hardDrop() end Player.actList={ - Player.act_moveLeft, --1 - Player.act_moveRight, --2 - Player.act_rotRight, --3 - Player.act_rotLeft, --4 - Player.act_rot180, --5 - Player.act_hardDrop, --6 - Player.act_softDrop, --7 - Player.act_hold, --8 - Player.act_func1, --9 - Player.act_func2, --10 - Player.act_insLeft, --11 - Player.act_insRight, --12 - Player.act_insDown, --13 - Player.act_down1, --14 - Player.act_down4, --15 - Player.act_down10, --16 - Player.act_dropLeft, --17 - Player.act_dropRight, --18 - Player.act_zangiLeft, --19 - Player.act_zangiRight, --20 + Player.act_moveLeft, --1 + Player.act_moveRight, --2 + Player.act_rotRight, --3 + Player.act_rotLeft, --4 + Player.act_rot180, --5 + Player.act_hardDrop, --6 + Player.act_softDrop, --7 + Player.act_hold, --8 + Player.act_func1, --9 + Player.act_func2, --10 + Player.act_insLeft, --11 + Player.act_insRight, --12 + Player.act_insDown, --13 + Player.act_down1, --14 + Player.act_down4, --15 + Player.act_down10, --16 + Player.act_dropLeft, --17 + Player.act_dropRight, --18 + Player.act_zangiLeft, --19 + Player.act_zangiRight,--20 } ---------------------------------------------------- return Player \ No newline at end of file diff --git a/parts/player/seqGenerators.lua b/parts/player/seqGenerators.lua index cefdc0aa..e51b961f 100644 --- a/parts/player/seqGenerators.lua +++ b/parts/player/seqGenerators.lua @@ -3,234 +3,234 @@ local ceil=math.ceil local yield=YIELD local seqGenerators={ - none=function()while true do yield()end end, - bag=function(P,seq0) - local rndGen=P.seqRND - local len=#seq0 - local bag={} - while true do - while #P.nextQueue<12 do - if #bag==0 then - for i=1,len do - bag[i]=seq0[len-i+1] - end - end - P:getNext(rem(bag,rndGen:random(#bag))) - end - yield() - end - end, - his=function(P,seq0) - local rndGen=P.seqRND - local len=#seq0 - local hisLen=ceil(len*.5) - local history=TABLE.new(0,hisLen) - while true do - while #P.nextQueue<12 do - local r - for _=1,hisLen do--Reroll up to [hisLen] times - r=rndGen:random(len) - for i=1,hisLen do - if r==history[i]then - goto CONTINUE_rollAgain - end - end - do break end - ::CONTINUE_rollAgain:: - end - if history[1]~=0 then P:getNext(seq0[r])end - rem(history,1)ins(history,r) - end - yield() - end - end, - hisPool=function(P,seq0) - local rndGen=P.seqRND - local len=#seq0 - local hisLen=ceil(len*.5) - local history=TABLE.new(0,hisLen)--Indexes of mino-index + none=function()while true do yield()end end, + bag=function(P,seq0) + local rndGen=P.seqRND + local len=#seq0 + local bag={} + while true do + while #P.nextQueue<12 do + if #bag==0 then + for i=1,len do + bag[i]=seq0[len-i+1] + end + end + P:getNext(rem(bag,rndGen:random(#bag))) + end + yield() + end + end, + his=function(P,seq0) + local rndGen=P.seqRND + local len=#seq0 + local hisLen=ceil(len*.5) + local history=TABLE.new(0,hisLen) + while true do + while #P.nextQueue<12 do + local r + for _=1,hisLen do--Reroll up to [hisLen] times + r=rndGen:random(len) + for i=1,hisLen do + if r==history[i]then + goto CONTINUE_rollAgain + end + end + do break end + ::CONTINUE_rollAgain:: + end + if history[1]~=0 then P:getNext(seq0[r])end + rem(history,1)ins(history,r) + end + yield() + end + end, + hisPool=function(P,seq0) + local rndGen=P.seqRND + local len=#seq0 + local hisLen=ceil(len*.5) + local history=TABLE.new(0,hisLen)--Indexes of mino-index - local poolLen=5*len - local droughtTimes=TABLE.new(len,len)--Drought times of seq0 - local pool={}for i=1,len do for _=1,5 do ins(pool,i)end end--5 times indexes of seq0 - local function _poolPick() - local r=rndGen:random(poolLen) - local res=pool[r] + local poolLen=5*len + local droughtTimes=TABLE.new(len,len)--Drought times of seq0 + local pool={}for i=1,len do for _=1,5 do ins(pool,i)end end--5 times indexes of seq0 + local function _poolPick() + local r=rndGen:random(poolLen) + local res=pool[r] - --Find droughtest(s) minoes - local droughtList={1}--Droughtst minoes' indexes of seq0 - local maxTime=droughtTimes[1] - for i=2,len do - if droughtTimes[i]>maxTime then - maxTime=droughtTimes[i] - if #droughtList==1 then droughtList[1]=i else droughtList={i}end - elseif droughtTimes[i]==maxTime then - ins(droughtList,i) - end - end + --Find droughtest(s) minoes + local droughtList={1}--Droughtst minoes' indexes of seq0 + local maxTime=droughtTimes[1] + for i=2,len do + if droughtTimes[i]>maxTime then + maxTime=droughtTimes[i] + if #droughtList==1 then droughtList[1]=i else droughtList={i}end + elseif droughtTimes[i]==maxTime then + ins(droughtList,i) + end + end - --Update droughtTimes - for i=1,len do droughtTimes[i]=droughtTimes[i]+1 end - droughtTimes[res]=0 + --Update droughtTimes + for i=1,len do droughtTimes[i]=droughtTimes[i]+1 end + droughtTimes[res]=0 - --Update pool - -- print("Rem "..res) - pool[r]=droughtList[rndGen:random(#droughtList)] - -- print("Add "..pool[r]) + --Update pool + -- print("Rem "..res) + pool[r]=droughtList[rndGen:random(#droughtList)] + -- print("Add "..pool[r]) - return res - end + return res + end - while true do - while #P.nextQueue<12 do - -- print"======================" - --Pick a mino from pool - local tryTime=0 - ::REPEAT_pickAgain:: - local r=_poolPick()--Random mino-index in pool - for i=1,len do - if r==history[i]then - tryTime=tryTime+1 - if tryTimeweight[maxK]then - maxK=i - end - end - weight[maxK]=weight[maxK]/3.5 - P:getNext(seq0[maxK]) - end - yield() - end - end, - rnd=function(P,seq0) - if #seq0==1 then - local i=seq0[1] - while true do - while #P.nextQueue<12 do P:getNext(i)end - yield() - end - else - local rndGen=P.seqRND - local len=#seq0 - local last=0 - while true do - while #P.nextQueue<12 do - local r=rndGen:random(len-1) - if r>=last then r=r+1 end - P:getNext(seq0[r]) - last=r - end - yield() - end - end - end, - mess=function(P,seq0) - local rndGen=P.seqRND - while true do - while #P.nextQueue<12 do - P:getNext(seq0[rndGen:random(#seq0)]) - end - yield() - end - end, - reverb=function(P,seq0) - local rndGen=P.seqRND - local bufferSeq,bag={},{} - while true do - while #P.nextQueue<12 do - if #bag==0 then - for i=1,#seq0 do bufferSeq[i]=seq0[i]end - repeat - local r=rem(bufferSeq,rndGen:random(#bag)) - local p=1 - repeat - ins(bag,r) - p=p-.15-rndGen:random() - until p<0 - until #bufferSeq==0 - for i=1,#bag do - bufferSeq[i]=bag[i] - end - end - P:getNext(rem(bag,rndGen:random(#bag))) - end - yield() - end - end, - loop=function(P,seq0) - local len=#seq0 - local bag={} - while true do - while #P.nextQueue<12 do - if #bag==0 then - for i=1,len do - bag[i]=seq0[len-i+1] - end - end - P:getNext(rem(bag)) - end - yield() - end - end, - fixed=function(P,seq0) - local seq={} - for i=#seq0,1,-1 do - ins(seq,seq0[i]) - end - while true do - while #P.nextQueue<12 do - if seq[1]then - P:getNext(rem(seq)) - else - if not(P.cur or P.nextQueue[1]or P.holdQueue[1])then - P:lose(true) - end - break - end - end - yield() - end - end, + while true do + while #P.nextQueue<12 do + local maxK=1 + for i=1,len do + weight[i]=weight[i]*.5+rndGen:random() + if weight[i]>weight[maxK]then + maxK=i + end + end + weight[maxK]=weight[maxK]/3.5 + P:getNext(seq0[maxK]) + end + yield() + end + end, + rnd=function(P,seq0) + if #seq0==1 then + local i=seq0[1] + while true do + while #P.nextQueue<12 do P:getNext(i)end + yield() + end + else + local rndGen=P.seqRND + local len=#seq0 + local last=0 + while true do + while #P.nextQueue<12 do + local r=rndGen:random(len-1) + if r>=last then r=r+1 end + P:getNext(seq0[r]) + last=r + end + yield() + end + end + end, + mess=function(P,seq0) + local rndGen=P.seqRND + while true do + while #P.nextQueue<12 do + P:getNext(seq0[rndGen:random(#seq0)]) + end + yield() + end + end, + reverb=function(P,seq0) + local rndGen=P.seqRND + local bufferSeq,bag={},{} + while true do + while #P.nextQueue<12 do + if #bag==0 then + for i=1,#seq0 do bufferSeq[i]=seq0[i]end + repeat + local r=rem(bufferSeq,rndGen:random(#bag)) + local p=1 + repeat + ins(bag,r) + p=p-.15-rndGen:random() + until p<0 + until #bufferSeq==0 + for i=1,#bag do + bufferSeq[i]=bag[i] + end + end + P:getNext(rem(bag,rndGen:random(#bag))) + end + yield() + end + end, + loop=function(P,seq0) + local len=#seq0 + local bag={} + while true do + while #P.nextQueue<12 do + if #bag==0 then + for i=1,len do + bag[i]=seq0[len-i+1] + end + end + P:getNext(rem(bag)) + end + yield() + end + end, + fixed=function(P,seq0) + local seq={} + for i=#seq0,1,-1 do + ins(seq,seq0[i]) + end + while true do + while #P.nextQueue<12 do + if seq[1]then + P:getNext(rem(seq)) + else + if not(P.cur or P.nextQueue[1]or P.holdQueue[1])then + P:lose(true) + end + break + end + end + yield() + end + end, } return function(P)--Return a piece-generating function for player P - local s=P.gameEnv.sequence - if type(s)=='function'then - return s - elseif type(s)=='string'and seqGenerators[s]then - return seqGenerators[s] - else - MES.new('warn', - type(s)=='string'and - "No sequence mode called "..s or - "Wrong sequence generator" - ) - P.gameEnv.sequence='bag' - return seqGenerators.bag - end + local s=P.gameEnv.sequence + if type(s)=='function'then + return s + elseif type(s)=='string'and seqGenerators[s]then + return seqGenerators[s] + else + MES.new('warn', + type(s)=='string'and + "No sequence mode called "..s or + "Wrong sequence generator" + ) + P.gameEnv.sequence='bag' + return seqGenerators.bag + end end \ No newline at end of file diff --git a/parts/player/update.lua b/parts/player/update.lua index fbdb34ac..2638030c 100644 --- a/parts/player/update.lua +++ b/parts/player/update.lua @@ -7,444 +7,444 @@ local TEXT,GAME=TEXT,GAME local PLY_ALIVE=PLY_ALIVE local function _updateMisc(P,dt) - --Finesse combo animation - if P.finesseComboTime>0 then - P.finesseComboTime=P.finesseComboTime-1 - end + --Finesse combo animation + if P.finesseComboTime>0 then + P.finesseComboTime=P.finesseComboTime-1 + end - --Update spike counter - if P.spikeTime>0 then P.spikeTime=P.spikeTime-1 end + --Update spike counter + if P.spikeTime>0 then P.spikeTime=P.spikeTime-1 end - --Update atkBuffer alert - local t=P.atkBufferSum1 - if tP.atkBufferSum then - P.atkBufferSum1=t-.5 - end + --Update atkBuffer alert + local t=P.atkBufferSum1 + if tP.atkBufferSum then + P.atkBufferSum1=t-.5 + end - --Update attack buffer - local bf=P.atkBuffer - for i=#bf,1,-1 do - local A=bf[i] - A.time=A.time+1 - if not A.sent then - if A.countdown>0 then - A.countdown=max(A.countdown-P.gameEnv.garbageSpeed,0) - end - else - if A.time>20 then - rem(bf,i) - end - end - end + --Update attack buffer + local bf=P.atkBuffer + for i=#bf,1,-1 do + local A=bf[i] + A.time=A.time+1 + if not A.sent then + if A.countdown>0 then + A.countdown=max(A.countdown-P.gameEnv.garbageSpeed,0) + end + else + if A.time>20 then + rem(bf,i) + end + end + end - --Push up garbages - local y=P.fieldBeneath - if y>0 then - P.fieldBeneath=max(y-P.gameEnv.pushSpeed,0) - end + --Push up garbages + local y=P.fieldBeneath + if y>0 then + P.fieldBeneath=max(y-P.gameEnv.pushSpeed,0) + end - --Move camera - if P.gameEnv.highCam then - if not P.alive then - y=0 - else - y=30*max(min(#P.field-18.5-P.fieldBeneath/30,P.ghoY-17),0) - end - local f=P.fieldUp - if f~=y then - P.fieldUp=f>y and max(f*.95+y*.05-2,y)or min(f*.97+y*.03+1,y) - end - end + --Move camera + if P.gameEnv.highCam then + if not P.alive then + y=0 + else + y=30*max(min(#P.field-18.5-P.fieldBeneath/30,P.ghoY-17),0) + end + local f=P.fieldUp + if f~=y then + P.fieldUp=f>y and max(f*.95+y*.05-2,y)or min(f*.97+y*.03+1,y) + end + end - --Update Score - if P.stat.score>P.score1 then - if P.stat.score-P.score1<10 then - P.score1=P.score1+1 - else - P.score1=int(min(P.score1*.9+P.stat.score*.1+1)) - end - end + --Update Score + if P.stat.score>P.score1 then + if P.stat.score-P.score1<10 then + P.score1=P.score1+1 + else + P.score1=int(min(P.score1*.9+P.stat.score*.1+1)) + end + end - --Update lock FX - for i=#P.lockFX,1,-1 do - local S=P.lockFX[i] - S[3]=S[3]+S[4]*dt - if S[3]>1 then - rem(P.lockFX,i) - end - end + --Update lock FX + for i=#P.lockFX,1,-1 do + local S=P.lockFX[i] + S[3]=S[3]+S[4]*dt + if S[3]>1 then + rem(P.lockFX,i) + end + end - --Update drop FX - for i=#P.dropFX,1,-1 do - local S=P.dropFX[i] - S[5]=S[5]+S[6]*dt - if S[5]>1 then - rem(P.dropFX,i) - end - end + --Update drop FX + for i=#P.dropFX,1,-1 do + local S=P.dropFX[i] + S[5]=S[5]+S[6]*dt + if S[5]>1 then + rem(P.dropFX,i) + end + end - --Update move FX - for i=#P.moveFX,1,-1 do - local S=P.moveFX[i] - S[4]=S[4]+S[5]*dt - if S[4]>1 then - rem(P.moveFX,i) - end - end + --Update move FX + for i=#P.moveFX,1,-1 do + local S=P.moveFX[i] + S[4]=S[4]+S[5]*dt + if S[4]>1 then + rem(P.moveFX,i) + end + end - --Update clear FX - for i=#P.clearFX,1,-1 do - local S=P.clearFX[i] - S[2]=S[2]+S[3]*dt - if S[2]>1 then - rem(P.clearFX,i) - end - end + --Update clear FX + for i=#P.clearFX,1,-1 do + local S=P.clearFX[i] + S[2]=S[2]+S[3]*dt + if S[2]>1 then + rem(P.clearFX,i) + end + end - --Field shaking - if P.gameEnv.shakeFX then - local O=P.fieldOff - O.vx=O.vx*.7-abs(O.x)^1.3*(O.x>0 and .1 or -.1) - O.x=O.x+O.vx + --Field shaking + if P.gameEnv.shakeFX then + local O=P.fieldOff + O.vx=O.vx*.7-abs(O.x)^1.3*(O.x>0 and .1 or -.1) + O.x=O.x+O.vx - O.vy=O.vy*.7-abs(O.y)^1.2*(O.y>0 and .1 or -.1) - O.y=O.y+O.vy + O.vy=O.vy*.7-abs(O.y)^1.2*(O.y>0 and .1 or -.1) + O.y=O.y+O.vy - O.va=O.va*.7-abs(O.a)^1.4*(O.a>0 and .08 or -.08) - O.a=O.a+O.va - if abs(O.a)<.0006 then O.a,O.va=0,0 end - end + O.va=O.va*.7-abs(O.a)^1.4*(O.a>0 and .08 or -.08) + O.a=O.a+O.va + if abs(O.a)<.0006 then O.a,O.va=0,0 end + end - --Update texts - if P.bonus then - TEXT.update(P.bonus) - end + --Update texts + if P.bonus then + TEXT.update(P.bonus) + end - --Update tasks - local L=P.tasks - for i=#L,1,-1 do - local tr=L[i].thread - assert(resume(tr)) - if status(tr)=='dead'then - rem(L,i) - end - end + --Update tasks + local L=P.tasks + for i=#L,1,-1 do + local tr=L[i].thread + assert(resume(tr)) + if status(tr)=='dead'then + rem(L,i) + end + end end local update={ } function update.alive(P,dt) - local ENV=P.gameEnv - local S=P.stat + local ENV=P.gameEnv + local S=P.stat - P.frameRun=P.frameRun+1 - if P.frameRun<=180 then - if P.frameRun==180 then - if P.id==1 then SFX.play('start')end - P.control=true - P.timing=true - P:popNext() - elseif P.frameRun==60 or P.frameRun==120 then - if P.id==1 then SFX.play('ready')end - end - if P.movDir~=0 then - if P.moving15 and 4 or 8 - if v~=tar then - P.swappingAtkMode=v+(v15 and 4 or 8 + if v~=tar then + P.swappingAtkMode=v+(v0 then L[i]=L[i]-1 end - end - end - end + --Fresh visible time + if not P.keepVisible then + local V=P.visTime + for j=1,#P.field do + local L=V[j] + for i=1,10 do + if L[i]>0 then L[i]=L[i]-1 end + end + end + end - --Moving pressed - if P.movDir~=0 then - local das,arr=ENV.das,ENV.arr - local mov=P.moving - if P.waiting==-1 then - if P.movDir==1 then - if P.keyPressing[2]then - if arr>0 then - if mov==das+arr or mov==das then - if not P.cur or P:ifoverlap(P.cur.bk,P.curX+1,P.curY)then - mov=das+arr-1 - else - P:act_moveRight(true) - mov=das - end - end - mov=mov+1 - else - if mov==das then - P:act_insRight(true) - else - mov=mov+1 - end - end - if mov>=das and ENV.shakeFX and P.cur and P:ifoverlap(P.cur.bk,P.curX+1,P.curY)then - P.fieldOff.vx=.5 - end - else - P.movDir=0 - end - else - if P.keyPressing[1]then - if arr>0 then - if mov==das+arr or mov==das then - if not P.cur or P:ifoverlap(P.cur.bk,P.curX-1,P.curY)then - mov=das+arr-1 - else - P:act_moveLeft(true) - mov=das - end - end - mov=mov+1 - else - if mov==das then - P:act_insLeft(true) - else - mov=mov+1 - end - end - if mov>=das and ENV.shakeFX and P.cur and P:ifoverlap(P.cur.bk,P.curX-1,P.curY)then - P.fieldOff.vx=-.5 - end - else - P.movDir=0 - end - end - elseif mov0 then + if mov==das+arr or mov==das then + if not P.cur or P:ifoverlap(P.cur.bk,P.curX+1,P.curY)then + mov=das+arr-1 + else + P:act_moveRight(true) + mov=das + end + end + mov=mov+1 + else + if mov==das then + P:act_insRight(true) + else + mov=mov+1 + end + end + if mov>=das and ENV.shakeFX and P.cur and P:ifoverlap(P.cur.bk,P.curX+1,P.curY)then + P.fieldOff.vx=.5 + end + else + P.movDir=0 + end + else + if P.keyPressing[1]then + if arr>0 then + if mov==das+arr or mov==das then + if not P.cur or P:ifoverlap(P.cur.bk,P.curX-1,P.curY)then + mov=das+arr-1 + else + P:act_moveLeft(true) + mov=das + end + end + mov=mov+1 + else + if mov==das then + P:act_insLeft(true) + else + mov=mov+1 + end + end + if mov>=das and ENV.shakeFX and P.cur and P:ifoverlap(P.cur.bk,P.curX-1,P.curY)then + P.fieldOff.vx=-.5 + end + else + P.movDir=0 + end + end + elseif mov1 then - if ENV.sdarr>0 then - if d%ENV.sdarr==0 then - P:act_down1() - end - else - P:act_insDown() - end - if ENV.shakeFX then - P.fieldOff.vy=.2 - end - end - else - P.downing=0 - end + --Drop pressed + if P.keyPressing[7]and not P.keyPressing[9]then + P.downing=P.downing+1 + local d=P.downing-ENV.sddas + if d>1 then + if ENV.sdarr>0 then + if d%ENV.sdarr==0 then + P:act_down1() + end + else + P:act_insDown() + end + if ENV.shakeFX then + P.fieldOff.vy=.2 + end + end + else + P.downing=0 + end - --Falling animation - if P.falling>=0 then - P.falling=P.falling-1 - if P.falling>=0 then - goto THROW_stop - else - local L=#P.clearingRow - if P.sound and ENV.fall>0 and #P.field+L>P.clearingRow[L]then SFX.play('fall')end - P.clearingRow={} - end - end + --Falling animation + if P.falling>=0 then + P.falling=P.falling-1 + if P.falling>=0 then + goto THROW_stop + else + local L=#P.clearingRow + if P.sound and ENV.fall>0 and #P.field+L>P.clearingRow[L]then SFX.play('fall')end + P.clearingRow={} + end + end - --Update block state - if P.control then - --Try spawn new block - if P.waiting>=0 then - P.waiting=P.waiting-1 - if P.waiting<0 then - P:popNext() - end - goto THROW_stop - end + --Update block state + if P.control then + --Try spawn new block + if P.waiting>=0 then + P.waiting=P.waiting-1 + if P.waiting<0 then + P:popNext() + end + goto THROW_stop + end - --Natural block falling - if P.cur then - if P.curY>P.ghoY then - local D=P.dropDelay - if D>1 then - P.dropDelay=D-1 - goto THROW_stop - end + --Natural block falling + if P.cur then + if P.curY>P.ghoY then + local D=P.dropDelay + if D>1 then + P.dropDelay=D-1 + goto THROW_stop + end - if D==1 then - if ENV.moveFX and ENV.block then - P:createMoveFX('down') - end - P.curY=P.curY-1 - else - D=min(1/D,P.curY-P.ghoY)--1/D=Drop dist, lowest to ghost - if ENV.moveFX and ENV.block then - for _=1,D do - P:createMoveFX('down') - P.curY=P.curY-1 - end - else - P.curY=P.curY-D - end - end - P:freshBlock('fresh') - P.spinLast=false + if D==1 then + if ENV.moveFX and ENV.block then + P:createMoveFX('down') + end + P.curY=P.curY-1 + else + D=min(1/D,P.curY-P.ghoY)--1/D=Drop dist, lowest to ghost + if ENV.moveFX and ENV.block then + for _=1,D do + P:createMoveFX('down') + P.curY=P.curY-1 + end + else + P.curY=P.curY-D + end + end + P:freshBlock('fresh') + P.spinLast=false - if P.ghoY~=P.curY then - P.dropDelay=ENV.drop - end - else - P.lockDelay=P.lockDelay-1 - if P.lockDelay>=0 then - goto THROW_stop - end - P:drop(true) - if P.bot then - P.bot:unexpectedLock() - end - end - end - end - ::THROW_stop:: + if P.ghoY~=P.curY then + P.dropDelay=ENV.drop + end + else + P.lockDelay=P.lockDelay-1 + if P.lockDelay>=0 then + goto THROW_stop + end + P:drop(true) + if P.bot then + P.bot:unexpectedLock() + end + end + end + end + ::THROW_stop:: - --B2B bar animation - if P.b2b1==P.b2b then - elseif P.b2b1=0 then - P.falling=P.falling-1 - if P.falling<0 then - local L=#P.clearingRow - if P.sound and P.gameEnv.fall>0 and #P.field+L>P.clearingRow[L]then SFX.play('fall')end - P.clearingRow={} - end - end - if P.b2b1>0 then - P.b2b1=max(0,P.b2b1*.92-1) - end - _updateMisc(P,dt) + if P.falling>=0 then + P.falling=P.falling-1 + if P.falling<0 then + local L=#P.clearingRow + if P.sound and P.gameEnv.fall>0 and #P.field+L>P.clearingRow[L]then SFX.play('fall')end + P.clearingRow={} + end + end + if P.b2b1>0 then + P.b2b1=max(0,P.b2b1*.92-1) + end + _updateMisc(P,dt) end function update.remote_alive(P,dt) - local frameRate=(P.stream[#P.stream-1]or 0)-P.frameRun - frameRate= - frameRate<26 and 1 or - frameRate<50 and 2 or - frameRate<80 and 3 or - frameRate<120 and 5 or - frameRate<160 and 7 or - frameRate<200 and 10 or - 20 - for _=1,frameRate do - local eventTime=P.stream[P.streamProgress] - if eventTime then--Normal state, event forward - if P.frameRun==eventTime then--Event time, execute action, read next so don't update immediately - local event=P.stream[P.streamProgress+1] - if event==0 then--Just wait - elseif event<=32 then--Press key - P:pressKey(event) - elseif event<=64 then--Release key - P:releaseKey(event-32) - elseif event>0x2000000000000 then--Sending lines - local sid=event%0x100 - local amount=int(event/0x100)%0x100 - local time=int(event/0x10000)%0x10000 - local line=int(event/0x100000000)%0x10000 - for _,p in next,PLY_ALIVE do - if p.sid==sid then - P:attack(p,amount,time,line,true) - if P.gameEnv.atkFX then - P:createBeam(p,amount,P.gameEnv.atkFX,P.cur.color) - end - break - end - end - elseif event>0x1000000000000 then--Receiving lines - local sid=event%0x100 - for _,p in next,PLY_ALIVE do - if p.sid==sid then - P:receive( - p, - int(event/0x100)%0x100,--amount - int(event/0x10000)%0x10000,--time - int(event/0x100000000)%0x10000--line - ) - break - end - end - end - P.streamProgress=P.streamProgress+2 - else--No event now, run one frame - update.alive(P,dt/frameRate) - P.stat.time=P.frameRun/60 - end - else--Pause state, no actions, quit loop - break - end - end + local frameRate=(P.stream[#P.stream-1]or 0)-P.frameRun + frameRate= + frameRate<26 and 1 or + frameRate<50 and 2 or + frameRate<80 and 3 or + frameRate<120 and 5 or + frameRate<160 and 7 or + frameRate<200 and 10 or + 20 + for _=1,frameRate do + local eventTime=P.stream[P.streamProgress] + if eventTime then--Normal state, event forward + if P.frameRun==eventTime then--Event time, execute action, read next so don't update immediately + local event=P.stream[P.streamProgress+1] + if event==0 then--Just wait + elseif event<=32 then--Press key + P:pressKey(event) + elseif event<=64 then--Release key + P:releaseKey(event-32) + elseif event>0x2000000000000 then--Sending lines + local sid=event%0x100 + local amount=int(event/0x100)%0x100 + local time=int(event/0x10000)%0x10000 + local line=int(event/0x100000000)%0x10000 + for _,p in next,PLY_ALIVE do + if p.sid==sid then + P:attack(p,amount,time,line,true) + if P.gameEnv.atkFX then + P:createBeam(p,amount,P.gameEnv.atkFX,P.cur.color) + end + break + end + end + elseif event>0x1000000000000 then--Receiving lines + local sid=event%0x100 + for _,p in next,PLY_ALIVE do + if p.sid==sid then + P:receive( + p, + int(event/0x100)%0x100,--amount + int(event/0x10000)%0x10000,--time + int(event/0x100000000)%0x10000--line + ) + break + end + end + end + P.streamProgress=P.streamProgress+2 + else--No event now, run one frame + update.alive(P,dt/frameRate) + P.stat.time=P.frameRun/60 + end + else--Pause state, no actions, quit loop + break + end + end end return update \ No newline at end of file diff --git a/parts/scenes/about.lua b/parts/scenes/about.lua index a7d3df65..ab47a8f8 100644 --- a/parts/scenes/about.lua +++ b/parts/scenes/about.lua @@ -5,48 +5,48 @@ local sin=math.sin local scene={} function scene.sceneInit() - BG.set() + BG.set() end function scene.draw() - --Texts - setFont(20) - gc.setColor(COLOR.Z) - for i=1,#text.aboutTexts do - gc.printf(text.aboutTexts[i],150,35*i+50,1000,'center') - end + --Texts + setFont(20) + gc.setColor(COLOR.Z) + for i=1,#text.aboutTexts do + gc.printf(text.aboutTexts[i],150,35*i+50,1000,'center') + end - --Group - setFont(20) - mStr(text.group,640,480) + --Group + setFont(20) + mStr(text.group,640,480) - --Lib used - setFont(15) - gc.print(text.used,30,320) + --Lib used + setFont(15) + gc.print(text.used,30,320) - --Logo - local t=TIME() - gc.draw(TEXTURE.title,280,610,.1,.4+.03*sin(t*2.6),nil,580,118) - gc.setLineWidth(3) + --Logo + local t=TIME() + gc.draw(TEXTURE.title,280,610,.1,.4+.03*sin(t*2.6),nil,580,118) + gc.setLineWidth(3) - --QR Code frame - gc.rectangle('line',18,18,263,263) - gc.rectangle('line',1012,18,250,250) + --QR Code frame + gc.rectangle('line',18,18,263,263) + gc.rectangle('line',1012,18,250,250) - --Support text - gc.setColor(1,1,1,sin(t*20)*.3+.6) - setFont(30) - mStr(text.support,150+sin(t*4)*20,283) - mStr(text.support,1138-sin(t*4)*20,270) + --Support text + gc.setColor(1,1,1,sin(t*20)*.3+.6) + setFont(30) + mStr(text.support,150+sin(t*4)*20,283) + mStr(text.support,1138-sin(t*4)*20,270) end scene.widgetList={ - WIDGET.newImage{name="pay1", x=20, y=20}, - WIDGET.newImage{name="pay2", x=1014, y=20}, - WIDGET.newButton{name="staff", x=1140, y=400,w=220,h=80,font=35,code=goScene'staff'}, - WIDGET.newButton{name="his", x=1140, y=500,w=220,h=80,font=35,code=goScene'history'}, - WIDGET.newButton{name="qq", x=1140, y=600,w=220,h=80,font=35,code=function()love.system.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end,hide=MOBILE}, - WIDGET.newButton{name="back", x=640, y=600,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newImage{name="pay1", x=20, y=20}, + WIDGET.newImage{name="pay2", x=1014,y=20}, + WIDGET.newButton{name="staff", x=1140,y=400,w=220,h=80,font=35,code=goScene'staff'}, + WIDGET.newButton{name="his", x=1140,y=500,w=220,h=80,font=35,code=goScene'history'}, + WIDGET.newButton{name="qq", x=1140,y=600,w=220,h=80,font=35,code=function()love.system.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end,hide=MOBILE}, + WIDGET.newButton{name="back", x=640, y=600,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/account.lua b/parts/scenes/account.lua index 42a0b863..30866b4b 100644 --- a/parts/scenes/account.lua +++ b/parts/scenes/account.lua @@ -7,8 +7,8 @@ function scene.sceneInit() end scene.widgetList={ - WIDGET.newText{name="title",x=80,y=50,font=70,align='L'}, - WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newText{name="title",x=80,y=50,font=70,align='L'}, + WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/app_15p.lua b/parts/scenes/app_15p.lua index 39ecf499..5f1453a8 100644 --- a/parts/scenes/app_15p.lua +++ b/parts/scenes/app_15p.lua @@ -13,318 +13,318 @@ local color,blind='color1' local slide,pathVis,revKB local function ifGaming()return state==1 end -local colorSelector=WIDGET.newSelector{name="color",x=150,y=240,w=200,list={'color1','rainbow','color2','gray','black'},color='lY',disp=function()return color end, code=function(v)if state~=1 then color=v end end,hideF=ifGaming} +local colorSelector=WIDGET.newSelector{name="color",x=150,y=240,w=200,list={'color1','rainbow','color2','gray','black'},color='lY',disp=function()return color end, code=function(v)if state~=1 then color=v end end,hideF=ifGaming} function scene.sceneInit() - BG.set('rainbow2') - BGM.play('push') - board={{1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,15,16}} - cx,cy=4,4 - startTime=0 - time=0 - move,push=0,0 - state=2 + BG.set('rainbow2') + BGM.play('push') + board={{1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,15,16}} + cx,cy=4,4 + startTime=0 + time=0 + move,push=0,0 + state=2 - color='color1' - blind=false - slide=true - pathVis=true - revKB=false + color='color1' + blind=false + slide=true + pathVis=true + revKB=false end local function moveU(x,y) - if y<4 then - board[y][x],board[y+1][x]=board[y+1][x],board[y][x] - cy=cy+1 - end + if y<4 then + board[y][x],board[y+1][x]=board[y+1][x],board[y][x] + cy=cy+1 + end end local function moveD(x,y) - if y>1 then - board[y][x],board[y-1][x]=board[y-1][x],board[y][x] - cy=cy-1 - end + if y>1 then + board[y][x],board[y-1][x]=board[y-1][x],board[y][x] + cy=cy-1 + end end local function moveL(x,y) - if x<4 then - board[y][x],board[y][x+1]=board[y][x+1],board[y][x] - cx=cx+1 - end + if x<4 then + board[y][x],board[y][x+1]=board[y][x+1],board[y][x] + cx=cx+1 + end end local function moveR(x,y) - if x>1 then - board[y][x],board[y][x-1]=board[y][x-1],board[y][x] - cx=cx-1 - end + if x>1 then + board[y][x],board[y][x-1]=board[y][x-1],board[y][x] + cx=cx-1 + end end local function shuffleBoard() - for i=1,300 do - i=rnd() - if i<.25 then moveU(cx,cy) - elseif i<.5 then moveD(cx,cy) - elseif i<.75 then moveL(cx,cy) - else moveR(cx,cy) - end - end + for i=1,300 do + i=rnd() + if i<.25 then moveU(cx,cy) + elseif i<.5 then moveD(cx,cy) + elseif i<.75 then moveL(cx,cy) + else moveR(cx,cy) + end + end end local function checkBoard(b) - for i=4,1,-1 do - for j=1,4 do - if b[i][j]~=4*i+j-4 then return false end - end - end - return true + for i=4,1,-1 do + for j=1,4 do + if b[i][j]~=4*i+j-4 then return false end + end + end + return true end local function tapBoard(x,y,key) - if state<2 then - if not key then - if pathVis then - SYSFX.newShade(6,x-5,y-5,11,11,1,1,1) - end - x,y=int((x-320)/160)+1,int((y-40)/160)+1 - end - local b=board - local moves=0 - if cx==x then - if y>cy and y<5 then - for i=cy,y-1 do - moveU(x,i) - moves=moves+1 - end - elseif y0 then - for i=cy,y+1,-1 do - moveD(x,i) - moves=moves+1 - end - end - elseif cy==y then - if x>cx and x<5 then - for i=cx,x-1 do - moveL(i,y) - moves=moves+1 - end - elseif x0 then - for i=cx,x+1,-1 do - moveR(i,y) - moves=moves+1 - end - end - end - if moves>0 then - push=push+1 - move=move+moves - if state==0 then - state=1 - startTime=TIME() - end - if checkBoard(b)then - state=2 - time=TIME()-startTime - if time<1 then MES.new(false,"不是人") - elseif time<2 then MES.new(false,"还是人") - elseif time<3 then MES.new(false,"神仙") - elseif time<5 then MES.new(false,"太强了") - elseif time<7.5 then MES.new(false,"很强") - elseif time<10 then MES.new(false,"可以的") - elseif time<20 then MES.new(false,"马上入门了") - elseif time<30 then MES.new(false,"入门不远了") - elseif time<60 then MES.new(false,"多加练习") - else MES.new(false,"第一次玩?加油") - end - SFX.play('win') - return - end - SFX.play('move') - end - end + if state<2 then + if not key then + if pathVis then + SYSFX.newShade(6,x-5,y-5,11,11,1,1,1) + end + x,y=int((x-320)/160)+1,int((y-40)/160)+1 + end + local b=board + local moves=0 + if cx==x then + if y>cy and y<5 then + for i=cy,y-1 do + moveU(x,i) + moves=moves+1 + end + elseif y0 then + for i=cy,y+1,-1 do + moveD(x,i) + moves=moves+1 + end + end + elseif cy==y then + if x>cx and x<5 then + for i=cx,x-1 do + moveL(i,y) + moves=moves+1 + end + elseif x0 then + for i=cx,x+1,-1 do + moveR(i,y) + moves=moves+1 + end + end + end + if moves>0 then + push=push+1 + move=move+moves + if state==0 then + state=1 + startTime=TIME() + end + if checkBoard(b)then + state=2 + time=TIME()-startTime + if time<1 then MES.new(false,"不是人") + elseif time<2 then MES.new(false,"还是人") + elseif time<3 then MES.new(false,"神仙") + elseif time<5 then MES.new(false,"太强了") + elseif time<7.5 then MES.new(false,"很强") + elseif time<10 then MES.new(false,"可以的") + elseif time<20 then MES.new(false,"马上入门了") + elseif time<30 then MES.new(false,"入门不远了") + elseif time<60 then MES.new(false,"多加练习") + else MES.new(false,"第一次玩?加油") + end + SFX.play('win') + return + end + SFX.play('move') + end + end end function scene.keyDown(key,isRep) - if isRep then return end - if key=="up"then - tapBoard(cx,cy-(revKB and 1 or -1),true) - elseif key=="down"then - tapBoard(cx,cy+(revKB and 1 or -1),true) - elseif key=="left"then - tapBoard(cx-(revKB and 1 or -1),cy,true) - elseif key=="right"then - tapBoard(cx+(revKB and 1 or -1),cy,true) - elseif key=="space"then - shuffleBoard() - state=0 - time=0 - move,push=0,0 - elseif key=="q"then - if state~=1 then - colorSelector:scroll(love.keyboard.isDown("lshift","rshift")and -1 or 1) - end - elseif key=="w"then - if state==0 then - blind=not blind - end - elseif key=="e"then - if state==0 then - slide=not slide - if not slide then - pathVis=false - end - end - elseif key=="r"then - if state==0 and slide then - pathVis=not pathVis - end - elseif key=="t"then - if state==0 then - revKB=not revKB - end - elseif key=="escape"then - SCN.back() - end + if isRep then return end + if key=="up"then + tapBoard(cx,cy-(revKB and 1 or -1),true) + elseif key=="down"then + tapBoard(cx,cy+(revKB and 1 or -1),true) + elseif key=="left"then + tapBoard(cx-(revKB and 1 or -1),cy,true) + elseif key=="right"then + tapBoard(cx+(revKB and 1 or -1),cy,true) + elseif key=="space"then + shuffleBoard() + state=0 + time=0 + move,push=0,0 + elseif key=="q"then + if state~=1 then + colorSelector:scroll(love.keyboard.isDown("lshift","rshift")and -1 or 1) + end + elseif key=="w"then + if state==0 then + blind=not blind + end + elseif key=="e"then + if state==0 then + slide=not slide + if not slide then + pathVis=false + end + end + elseif key=="r"then + if state==0 and slide then + pathVis=not pathVis + end + elseif key=="t"then + if state==0 then + revKB=not revKB + end + elseif key=="escape"then + SCN.back() + end end function scene.mouseDown(x,y) - tapBoard(x,y) + tapBoard(x,y) end function scene.mouseMove(x,y) - if slide then - tapBoard(x,y) - end + if slide then + tapBoard(x,y) + end end function scene.touchDown(x,y) - tapBoard(x,y) + tapBoard(x,y) end function scene.touchMove(x,y) - if slide then - tapBoard(x,y) - end + if slide then + tapBoard(x,y) + end end function scene.update() - if state==1 then - time=TIME()-startTime - end + if state==1 then + time=TIME()-startTime + end end local frontColor={ - color1={ - COLOR.lR,COLOR.lR,COLOR.lR,COLOR.lR, - COLOR.lG,COLOR.lB,COLOR.lB,COLOR.lB, - COLOR.lG,COLOR.lY,COLOR.lV,COLOR.lV, - COLOR.lG,COLOR.lY,COLOR.lV,COLOR.lV, - },--Colored(rank) - rainbow={ - COLOR.lR,COLOR.lR,COLOR.lR,COLOR.lR, - COLOR.lO,COLOR.lY,COLOR.lY,COLOR.lY, - COLOR.lO,COLOR.lG,COLOR.lB,COLOR.lB, - COLOR.lO,COLOR.lG,COLOR.lB,COLOR.lB, - },--Rainbow(rank) - color2={ - COLOR.lR,COLOR.lR,COLOR.lR,COLOR.lR, - COLOR.lB,COLOR.lB,COLOR.lB,COLOR.lB, - COLOR.lG,COLOR.lY,COLOR.lV,COLOR.lV, - COLOR.lG,COLOR.lY,COLOR.lV,COLOR.lV, - },--Colored(row) - gray={ - COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z, - COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z, - COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z, - COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z, - },--Gray - black={ - COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z, - COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z, - COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z, - COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z, - },--Black + color1={ + COLOR.lR,COLOR.lR,COLOR.lR,COLOR.lR, + COLOR.lG,COLOR.lB,COLOR.lB,COLOR.lB, + COLOR.lG,COLOR.lY,COLOR.lV,COLOR.lV, + COLOR.lG,COLOR.lY,COLOR.lV,COLOR.lV, + },--Colored(rank) + rainbow={ + COLOR.lR,COLOR.lR,COLOR.lR,COLOR.lR, + COLOR.lO,COLOR.lY,COLOR.lY,COLOR.lY, + COLOR.lO,COLOR.lG,COLOR.lB,COLOR.lB, + COLOR.lO,COLOR.lG,COLOR.lB,COLOR.lB, + },--Rainbow(rank) + color2={ + COLOR.lR,COLOR.lR,COLOR.lR,COLOR.lR, + COLOR.lB,COLOR.lB,COLOR.lB,COLOR.lB, + COLOR.lG,COLOR.lY,COLOR.lV,COLOR.lV, + COLOR.lG,COLOR.lY,COLOR.lV,COLOR.lV, + },--Colored(row) + gray={ + COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z, + COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z, + COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z, + COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z, + },--Gray + black={ + COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z, + COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z, + COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z, + COLOR.Z,COLOR.Z,COLOR.Z,COLOR.Z, + },--Black } local backColor={ - color1={ - COLOR.dR,COLOR.dR,COLOR.dR,COLOR.dR, - COLOR.dG,COLOR.dB,COLOR.dB,COLOR.dB, - COLOR.dG,COLOR.dY,COLOR.dP,COLOR.dP, - COLOR.dG,COLOR.dY,COLOR.dP,COLOR.dP, - },--Colored(rank) - rainbow={ - COLOR.dR,COLOR.dR,COLOR.dR,COLOR.dR, - COLOR.dO,COLOR.dY,COLOR.dY,COLOR.dY, - COLOR.dO,COLOR.dG,COLOR.dB,COLOR.dB, - COLOR.dO,COLOR.dG,COLOR.dB,COLOR.dB, - },--Rainbow(rank) - color2={ - COLOR.dR,COLOR.dR,COLOR.dR,COLOR.dR, - COLOR.dB,COLOR.dB,COLOR.dB,COLOR.dB, - COLOR.dG,COLOR.dY,COLOR.dP,COLOR.dP, - COLOR.dG,COLOR.dY,COLOR.dP,COLOR.dP, - },--Colored(row) - gray={ - COLOR.dH,COLOR.dH,COLOR.dH,COLOR.dH, - COLOR.dH,COLOR.dH,COLOR.dH,COLOR.dH, - COLOR.dH,COLOR.dH,COLOR.dH,COLOR.dH, - COLOR.dH,COLOR.dH,COLOR.dH,COLOR.dH, - },--Gray - black={ - COLOR.D,COLOR.D,COLOR.D,COLOR.D, - COLOR.D,COLOR.D,COLOR.D,COLOR.D, - COLOR.D,COLOR.D,COLOR.D,COLOR.D, - COLOR.D,COLOR.D,COLOR.D,COLOR.D, - },--Black + color1={ + COLOR.dR,COLOR.dR,COLOR.dR,COLOR.dR, + COLOR.dG,COLOR.dB,COLOR.dB,COLOR.dB, + COLOR.dG,COLOR.dY,COLOR.dP,COLOR.dP, + COLOR.dG,COLOR.dY,COLOR.dP,COLOR.dP, + },--Colored(rank) + rainbow={ + COLOR.dR,COLOR.dR,COLOR.dR,COLOR.dR, + COLOR.dO,COLOR.dY,COLOR.dY,COLOR.dY, + COLOR.dO,COLOR.dG,COLOR.dB,COLOR.dB, + COLOR.dO,COLOR.dG,COLOR.dB,COLOR.dB, + },--Rainbow(rank) + color2={ + COLOR.dR,COLOR.dR,COLOR.dR,COLOR.dR, + COLOR.dB,COLOR.dB,COLOR.dB,COLOR.dB, + COLOR.dG,COLOR.dY,COLOR.dP,COLOR.dP, + COLOR.dG,COLOR.dY,COLOR.dP,COLOR.dP, + },--Colored(row) + gray={ + COLOR.dH,COLOR.dH,COLOR.dH,COLOR.dH, + COLOR.dH,COLOR.dH,COLOR.dH,COLOR.dH, + COLOR.dH,COLOR.dH,COLOR.dH,COLOR.dH, + COLOR.dH,COLOR.dH,COLOR.dH,COLOR.dH, + },--Gray + black={ + COLOR.D,COLOR.D,COLOR.D,COLOR.D, + COLOR.D,COLOR.D,COLOR.D,COLOR.D, + COLOR.D,COLOR.D,COLOR.D,COLOR.D, + COLOR.D,COLOR.D,COLOR.D,COLOR.D, + },--Black } function scene.draw() - setFont(40) - gc.setColor(COLOR.Z) - gc.print(("%.3f"):format(time),1026,80) - gc.setColor(1,.8,.8) - gc.print(move,1026,130) - gc.setColor(.8,.8,1) - gc.print(push,1026,180) + setFont(40) + gc.setColor(COLOR.Z) + gc.print(("%.3f"):format(time),1026,80) + gc.setColor(1,.8,.8) + gc.print(move,1026,130) + gc.setColor(.8,.8,1) + gc.print(push,1026,180) - if state==2 then - --Draw no-setting area - gc.setColor(1,0,0,.3) - gc.rectangle('fill',15,295,285,340) + if state==2 then + --Draw no-setting area + gc.setColor(1,0,0,.3) + gc.rectangle('fill',15,295,285,340) - gc.setColor(.9,.9,0)--win - elseif state==1 then - gc.setColor(.9,.9,.9)--game - elseif state==0 then - gc.setColor(.2,.8,.2)--ready - end - gc.setLineWidth(10) - gc.rectangle('line',313,33,654,654,18) + gc.setColor(.9,.9,0)--win + elseif state==1 then + gc.setColor(.9,.9,.9)--game + elseif state==0 then + gc.setColor(.2,.8,.2)--ready + end + gc.setLineWidth(10) + gc.rectangle('line',313,33,654,654,18) - gc.setLineWidth(4) - local mono=blind and state==1 - setFont(80) - for i=1,4 do - for j=1,4 do - if cx~=j or cy~=i then - local N=board[i][j] - local C=mono and'gray'or color + gc.setLineWidth(4) + local mono=blind and state==1 + setFont(80) + for i=1,4 do + for j=1,4 do + if cx~=j or cy~=i then + local N=board[i][j] + local C=mono and'gray'or color - gc.setColor(backColor[C][N]) - gc.rectangle('fill',j*160+163,i*160-117,154,154,8) - gc.setColor(frontColor[C][N]) - gc.rectangle('line',j*160+163,i*160-117,154,154,8) - if not mono then - gc.setColor(.1,.1,.1) - mStr(N,j*160+240,i*160-96) - mStr(N,j*160+242,i*160-98) - gc.setColor(COLOR.Z) - mStr(N,j*160+243,i*160-95) - end - end - end - end - gc.setColor(0,0,0,.3) - gc.setLineWidth(10) - gc.rectangle('line',cx*160+173,cy*160-107,134,134,50) + gc.setColor(backColor[C][N]) + gc.rectangle('fill',j*160+163,i*160-117,154,154,8) + gc.setColor(frontColor[C][N]) + gc.rectangle('line',j*160+163,i*160-117,154,154,8) + if not mono then + gc.setColor(.1,.1,.1) + mStr(N,j*160+240,i*160-96) + mStr(N,j*160+242,i*160-98) + gc.setColor(COLOR.Z) + mStr(N,j*160+243,i*160-95) + end + end + end + end + gc.setColor(0,0,0,.3) + gc.setLineWidth(10) + gc.rectangle('line',cx*160+173,cy*160-107,134,134,50) end scene.widgetList={ - WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color='lG', font=40,code=pressKey"space"}, - colorSelector, - WIDGET.newSwitch{name="blind", x=240,y=330,w=60, font=40,disp=function()return blind end, code=pressKey"w",hideF=ifGaming}, - WIDGET.newSwitch{name="slide", x=240,y=420,w=60, font=40,disp=function()return slide end, code=pressKey"e",hideF=ifGaming}, - WIDGET.newSwitch{name="pathVis",x=240,y=510,w=60, font=40,disp=function()return pathVis end, code=pressKey"r",hideF=function()return state==1 or not slide end}, - WIDGET.newSwitch{name="revKB", x=240,y=600,w=60, font=40,disp=function()return revKB end, code=pressKey"t",hideF=ifGaming}, - WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newButton{name="reset", x=160, y=100,w=180,h=100,color='lG',font=40,code=pressKey"space"}, + colorSelector, + WIDGET.newSwitch{name="blind", x=240, y=330,w=60,font=40,disp=function()return blind end, code=pressKey"w",hideF=ifGaming}, + WIDGET.newSwitch{name="slide", x=240, y=420,w=60,font=40,disp=function()return slide end, code=pressKey"e",hideF=ifGaming}, + WIDGET.newSwitch{name="pathVis",x=240, y=510,w=60,font=40,disp=function()return pathVis end,code=pressKey"r",hideF=function()return state==1 or not slide end}, + WIDGET.newSwitch{name="revKB", x=240, y=600,w=60,font=40,disp=function()return revKB end, code=pressKey"t",hideF=ifGaming}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/app_2048.lua b/parts/scenes/app_2048.lua index 65a56a1f..cc8e2b71 100644 --- a/parts/scenes/app_2048.lua +++ b/parts/scenes/app_2048.lua @@ -23,476 +23,476 @@ local prevSpawnTime=0 local maxTile local skipper={ - used=false, - cd=0, + used=false, + cd=0, } local repeater={ - focus=false, - seq={"",""},last={"X","X"}, + focus=false, + seq={"",""},last={"X","X"}, } local score --[[Tiles' value: - -1: black tile, cannot move - 0: X tile, cannot merge - 1/2/3/...: 2/4/8/... tile + -1: black tile, cannot move + 0: X tile, cannot merge + 1/2/3/...: 2/4/8/... tile ]] local tileColor={ - [-1]=COLOR.D, - [0]={.5,.3,.3}, - {.93,.89,.85}, - {.93,.88,.78}, - {.95,.69,.47}, - {.96,.58,.39}, - {.96,.49,.37}, - {.96,.37,.23}, - {.93,.81,.45}, - {.93,.80,.38}, - {.93,.78,.31}, - {.93,.77,.25}, - {.93,.76,.18}, - {.40,.37,.33}, - {.22,.19,.17}, + [-1]=COLOR.D, + [0]={.5,.3,.3}, + {.93,.89,.85}, + {.93,.88,.78}, + {.95,.69,.47}, + {.96,.58,.39}, + {.96,.49,.37}, + {.96,.37,.23}, + {.93,.81,.45}, + {.93,.80,.38}, + {.93,.78,.31}, + {.93,.77,.25}, + {.93,.76,.18}, + {.40,.37,.33}, + {.22,.19,.17}, } local tileFont={ - 80,80,80,--2/4/8 - 70,70,70,--16/32/64 - 60,60,60,--128/256/512 - 55,55,55,55,--1024/2048/4096/8192 - 50,50,50,--16384/32768/65536 - 45,45,45,--131072/262144/524288 - 30,--1048576 + 80,80,80,--2/4/8 + 70,70,70,--16/32/64 + 60,60,60,--128/256/512 + 55,55,55,55,--1024/2048/4096/8192 + 50,50,50,--16384/32768/65536 + 45,45,45,--131072/262144/524288 + 30,--1048576 } local tileName={[0]="X","2","4","8","16","32","64","128","256","512","1024","2048","4096","8192","16384","32768","65536","131072","262144","524288","2^20"} local function airExist() - for i=1,16 do - if not board[i]then - return true - end - end + for i=1,16 do + if not board[i]then + return true + end + end end local function newTile() - --Select position & generate number - nextPos=(nextPos+6)%16+1 - while board[nextPos]do - nextPos=(nextPos-4)%16+1 - end - board[nextPos]=nextTile - prevPos=nextPos - prevSpawnTime=0 + --Select position & generate number + nextPos=(nextPos+6)%16+1 + while board[nextPos]do + nextPos=(nextPos-4)%16+1 + end + board[nextPos]=nextTile + prevPos=nextPos + prevSpawnTime=0 - --Fresh score - score=score+2^nextTile - TEXT.show("+"..2^nextTile,1130+rnd(-60,60),575+rnd(-30,30),30,'score',1.5) + --Fresh score + score=score+2^nextTile + TEXT.show("+"..2^nextTile,1130+rnd(-60,60),575+rnd(-30,30),30,'score',1.5) - --Generate next number - nextCD=nextCD-1 - if nextCD>0 then - nextTile=1 - else - nextTile=rnd()>.1 and 2 or rnd()>.1 and 3 or 4 - nextCD=rnd(8,12) - end + --Generate next number + nextCD=nextCD-1 + if nextCD>0 then + nextTile=1 + else + nextTile=rnd()>.1 and 2 or rnd()>.1 and 3 or 4 + nextCD=rnd(8,12) + end - --Check if board is full - if airExist()then return end + --Check if board is full + if airExist()then return end - --Check if board is locked in all-directions - for i=1,12 do - if board[i]==board[i+4]then - return - end - end - for i=1,13,4 do - if - board[i+0]==board[i+1]or - board[i+1]==board[i+2]or - board[i+2]==board[i+3] - then - return - end - end + --Check if board is locked in all-directions + for i=1,12 do + if board[i]==board[i+4]then + return + end + end + for i=1,13,4 do + if + board[i+0]==board[i+1]or + board[i+1]==board[i+2]or + board[i+2]==board[i+3] + then + return + end + end - --Die. - state=2 - SFX.play(maxTile>=10 and'win'or'fail') + --Die. + state=2 + SFX.play(maxTile>=10 and'win'or'fail') end local function freshMaxTile() - maxTile=maxTile+1 - if maxTile==12 then skipper.cd=0 end - SFX.play('reach') - ins(progress,("%s - %.3fs"):format(tileName[maxTile],TIME()-startTime)) + maxTile=maxTile+1 + if maxTile==12 then skipper.cd=0 end + SFX.play('reach') + ins(progress,("%s - %.3fs"):format(tileName[maxTile],TIME()-startTime)) end local function squash(L) - local p1,p2=1 - local moved=false - while true do - p2=p1+1 - while not L[p2]and p2<5 do - p2=p2+1 - end - if p2==5 then - if p1==4 then - return L[1],L[2],L[3],L[4],moved - else - p1=p1+1 - end - else - if not L[p1]then--air←2 - L[p1],L[p2]=L[p2],false - moved=true - elseif L[p1]==L[p2]then--2←2 - L[p1],L[p2]=L[p1]+1,false - if L[p1]>maxTile then - freshMaxTile() - end - L[p2]=false - p1=p1+1 - moved=true - elseif p1+1~=p2 then--2←4 - L[p1+1],L[p2]=L[p2],false - p1=p1+1 - moved=true - else--2,4 - p1=p1+1 - end - end - end + local p1,p2=1 + local moved=false + while true do + p2=p1+1 + while not L[p2]and p2<5 do + p2=p2+1 + end + if p2==5 then + if p1==4 then + return L[1],L[2],L[3],L[4],moved + else + p1=p1+1 + end + else + if not L[p1]then--air←2 + L[p1],L[p2]=L[p2],false + moved=true + elseif L[p1]==L[p2]then--2←2 + L[p1],L[p2]=L[p1]+1,false + if L[p1]>maxTile then + freshMaxTile() + end + L[p2]=false + p1=p1+1 + moved=true + elseif p1+1~=p2 then--2←4 + L[p1+1],L[p2]=L[p2],false + p1=p1+1 + moved=true + else--2,4 + p1=p1+1 + end + end + end end local function reset() - for i=1,16 do board[i]=false end - progress={} - state=0 - score=0 - time=0 - move=0 - maxTile=6 - nextTile,nextPos=1,rnd(16) - nextCD=32 - skipper.cd,skipper.used=false,false - repeater.seq[1],repeater.seq[2]="","" - repeater.last[1],repeater.last[2]="X","X" - newTile() + for i=1,16 do board[i]=false end + progress={} + state=0 + score=0 + time=0 + move=0 + maxTile=6 + nextTile,nextPos=1,rnd(16) + nextCD=32 + skipper.cd,skipper.used=false,false + repeater.seq[1],repeater.seq[2]="","" + repeater.last[1],repeater.last[2]="X","X" + newTile() end local function moveUp() - local moved - for i=1,4 do - local m - board[i],board[i+4],board[i+8],board[i+12],m=squash({board[i],board[i+4],board[i+8],board[i+12]}) - if m then moved=true end - end - return moved + local moved + for i=1,4 do + local m + board[i],board[i+4],board[i+8],board[i+12],m=squash({board[i],board[i+4],board[i+8],board[i+12]}) + if m then moved=true end + end + return moved end local function moveDown() - local moved - for i=1,4 do - local m - board[i+12],board[i+8],board[i+4],board[i],m=squash({board[i+12],board[i+8],board[i+4],board[i]}) - if m then moved=true end - end - return moved + local moved + for i=1,4 do + local m + board[i+12],board[i+8],board[i+4],board[i],m=squash({board[i+12],board[i+8],board[i+4],board[i]}) + if m then moved=true end + end + return moved end local function moveLeft() - local moved - for i=1,13,4 do - local m - board[i],board[i+1],board[i+2],board[i+3],m=squash({board[i],board[i+1],board[i+2],board[i+3]}) - if m then moved=true end - end - return moved + local moved + for i=1,13,4 do + local m + board[i],board[i+1],board[i+2],board[i+3],m=squash({board[i],board[i+1],board[i+2],board[i+3]}) + if m then moved=true end + end + return moved end local function moveRight() - local moved - for i=1,13,4 do - local m - board[i+3],board[i+2],board[i+1],board[i],m=squash({board[i+3],board[i+2],board[i+1],board[i]}) - if m then moved=true end - end - return moved + local moved + for i=1,13,4 do + local m + board[i+3],board[i+2],board[i+1],board[i],m=squash({board[i+3],board[i+2],board[i+1],board[i]}) + if m then moved=true end + end + return moved end local function skip() - if state==1 and skipper.cd==0 then - if airExist()then - skipper.cd=1024 - skipper.used=true - newTile() - SFX.play('hold') - else - SFX.play('finesseError') - end - end + if state==1 and skipper.cd==0 then + if airExist()then + skipper.cd=1024 + skipper.used=true + newTile() + SFX.play('hold') + else + SFX.play('finesseError') + end + end end function scene.sceneInit() - BG.set('cubes') - BGM.play('truth') - board={} + BG.set('cubes') + BGM.play('truth') + board={} - blind=false - tapControl=false - startTime=0 - reset() + blind=false + tapControl=false + startTime=0 + reset() end function scene.mouseDown(x,y,k) - if tapControl then - if k==2 then - skip() - else - local dx,dy=x-640,y-360 - if abs(dx)<320 and abs(dy)<320 and(abs(dx)>60 or abs(dy)>60)then - scene.keyDown(abs(dx)-abs(dy)>0 and - (dx>0 and"right"or"left")or - (dy>0 and"down"or"up") - ) - end - end - end + if tapControl then + if k==2 then + skip() + else + local dx,dy=x-640,y-360 + if abs(dx)<320 and abs(dy)<320 and(abs(dx)>60 or abs(dy)>60)then + scene.keyDown(abs(dx)-abs(dy)>0 and + (dx>0 and"right"or"left")or + (dy>0 and"down"or"up") + ) + end + end + end end function scene.touchDown(x,y) - scene.mouseDown(x,y) + scene.mouseDown(x,y) end local moveFunc={ - up=moveUp, - down=moveDown, - left=moveLeft, - right=moveRight, + up=moveUp, + down=moveDown, + left=moveLeft, + right=moveRight, } local arrows={ - up="↑",down="↓",left="←",right="→", - ["↑"]="up",["↓"]="down",["←"]="left",["→"]="right", + up="↑",down="↓",left="←",right="→", + ["↑"]="up",["↓"]="down",["←"]="left",["→"]="right", } local function setFocus(n) - if state~=2 then - repeater.focus=n - repeater.seq[n]="" - end + if state~=2 then + repeater.focus=n + repeater.seq[n]="" + end end local function playRep(n) - if state~=2 and #repeater.seq[n]>0 then - repeater.focus=false - local move0=move - for i=1,#repeater.seq[n],3 do - autoPressing=true - scene.keyDown(arrows[repeater.seq[n]:sub(i,i+2)],true) - autoPressing=false - end - if move~=move0 then - if repeater.seq[n]~=repeater.last[n]then - repeater.last[n]=repeater.seq[n] - move=move0+#repeater.seq[n]/3+1 - else - move=move0+1 - end - end - end + if state~=2 and #repeater.seq[n]>0 then + repeater.focus=false + local move0=move + for i=1,#repeater.seq[n],3 do + autoPressing=true + scene.keyDown(arrows[repeater.seq[n]:sub(i,i+2)],true) + autoPressing=false + end + if move~=move0 then + if repeater.seq[n]~=repeater.last[n]then + repeater.last[n]=repeater.seq[n] + move=move0+#repeater.seq[n]/3+1 + else + move=move0+1 + end + end + end end function scene.keyDown(key,isRep) - if isRep then return end - if key=="up"or key=="down"or key=="left"or key=="right"then - if repeater.focus then - local f=repeater.focus - if #repeater.seq[f]<24 then - repeater.seq[f]=repeater.seq[f]..arrows[key] - end - else - if moveFunc[key]()then - if state==0 then - startTime=TIME() - state=1 - end - if skipper.cd and skipper.cd>0 then - skipper.cd=skipper.cd-1 - if skipper.cd==0 then - SFX.play('spin_0') - end - end - newTile() - TEXT.show(arrows[key],640,360,80,'beat',3) - move=move+1 - if not autoPressing then - SFX.play('move') - end - end - end - elseif key=="space"then skip() - elseif key=="r"then reset() - elseif key=="q"then if state==0 then blind=not blind end - elseif key=="w"then if state==0 then tapControl=not tapControl end - elseif key=="1"or key=="2"then(kb.isDown("lshift","lctrl","lalt")and playRep or setFocus)(key=="1"and 1 or 2) - elseif key=="c1"then playRep(1) - elseif key=="c2"then playRep(2) - elseif key=="return"then - if repeater.focus then - repeater.focus=false - end - elseif key=="escape"then - if repeater.focus then - repeater.focus=false - else - SCN.back() - end - end + if isRep then return end + if key=="up"or key=="down"or key=="left"or key=="right"then + if repeater.focus then + local f=repeater.focus + if #repeater.seq[f]<24 then + repeater.seq[f]=repeater.seq[f]..arrows[key] + end + else + if moveFunc[key]()then + if state==0 then + startTime=TIME() + state=1 + end + if skipper.cd and skipper.cd>0 then + skipper.cd=skipper.cd-1 + if skipper.cd==0 then + SFX.play('spin_0') + end + end + newTile() + TEXT.show(arrows[key],640,360,80,'beat',3) + move=move+1 + if not autoPressing then + SFX.play('move') + end + end + end + elseif key=="space"then skip() + elseif key=="r"then reset() + elseif key=="q"then if state==0 then blind=not blind end + elseif key=="w"then if state==0 then tapControl=not tapControl end + elseif key=="1"or key=="2"then(kb.isDown("lshift","lctrl","lalt")and playRep or setFocus)(key=="1"and 1 or 2) + elseif key=="c1"then playRep(1) + elseif key=="c2"then playRep(2) + elseif key=="return"then + if repeater.focus then + repeater.focus=false + end + elseif key=="escape"then + if repeater.focus then + repeater.focus=false + else + SCN.back() + end + end end function scene.update(dt) - if state==1 then - time=TIME()-startTime - end - if prevSpawnTime<1 then - prevSpawnTime=min(prevSpawnTime+3*dt,1) - end + if state==1 then + time=TIME()-startTime + end + if prevSpawnTime<1 then + prevSpawnTime=min(prevSpawnTime+3*dt,1) + end end function scene.draw() - setFont(35) - setColor(1,1,1) - gc.print(("%.3f"):format(time),1000,10) - gc.print(move,1000,45) + setFont(35) + setColor(1,1,1) + gc.print(("%.3f"):format(time),1000,10) + gc.print(move,1000,45) - --Progress time list - setFont(20) - setColor(.6,.6,.6) - for i=1,#progress do - gc.print(progress[i],1000,65+20*i) - end + --Progress time list + setFont(20) + setColor(.6,.6,.6) + for i=1,#progress do + gc.print(progress[i],1000,65+20*i) + end - --Repeater - gc.setLineWidth(6) - setFont(25) - for i=1,2 do - setColor(COLOR[ - repeater.focus==i and( - TIME()%.5>.25 and - 'R'or - 'Y' - )or( - repeater.seq[i]==repeater.last[i]and - 'H'or - 'Z' - ) - ]) - rectangle('line',990,305+60*i,220,50) - gc.print(repeater.seq[i],1000,313+60*i) - end + --Repeater + gc.setLineWidth(6) + setFont(25) + for i=1,2 do + setColor(COLOR[ + repeater.focus==i and( + TIME()%.5>.25 and + 'R'or + 'Y' + )or( + repeater.seq[i]==repeater.last[i]and + 'H'or + 'Z' + ) + ]) + rectangle('line',990,305+60*i,220,50) + gc.print(repeater.seq[i],1000,313+60*i) + end - --Score - setFont(40) - setColor(1,.7,.7) - mStr(score,1130,510) + --Score + setFont(40) + setColor(1,.7,.7) + mStr(score,1130,510) - --Messages - if state==2 then - --Draw no-setting area - setColor(1,0,0,.3) - rectangle('fill',15,265,285,140) + --Messages + if state==2 then + --Draw no-setting area + setColor(1,0,0,.3) + rectangle('fill',15,265,285,140) - setColor(.9,.9,0)--win - elseif state==1 then - setColor(.9,.9,.9)--game - elseif state==0 then - setColor(.2,.8,.2)--ready - end - gc.setLineWidth(10) - rectangle('line',310,30,660,660) + setColor(.9,.9,0)--win + elseif state==1 then + setColor(.9,.9,.9)--game + elseif state==0 then + setColor(.2,.8,.2)--ready + end + gc.setLineWidth(10) + rectangle('line',310,30,660,660) - --Board - for i=1,16 do - if board[i]then - local x,y=1+(i-1)%4,int((i+3)/4) - local N=board[i] - if i~=prevPos or prevSpawnTime==1 then - if not blind or i==prevPos then - setColor(tileColor[N]or COLOR.D) - rectangle('fill',x*160+163,y*160-117,154,154,15) - if N>=0 then - setColor(N<3 and COLOR.D or COLOR.Z) - local fontSize=tileFont[N] - setFont(fontSize) - mStr(tileName[N],320+(x-.5)*160,40+(y-.5)*160-fontSize*.7) - end - else - setColor(COLOR.H) - rectangle('fill',x*160+163,y*160-117,154,154,15) - end - else - local c=tileColor[N] - setColor(c[1],c[2],c[3],prevSpawnTime) - rectangle('fill',x*160+163,y*160-117,154,154,15) - c=N<3 and 0 or 1 - setColor(c,c,c,prevSpawnTime) - local fontSize=tileFont[N] - setFont(fontSize) - mStr(tileName[N],320+(x-.5)*160,40+(y-.5)*160-fontSize*.7) - end - end - end + --Board + for i=1,16 do + if board[i]then + local x,y=1+(i-1)%4,int((i+3)/4) + local N=board[i] + if i~=prevPos or prevSpawnTime==1 then + if not blind or i==prevPos then + setColor(tileColor[N]or COLOR.D) + rectangle('fill',x*160+163,y*160-117,154,154,15) + if N>=0 then + setColor(N<3 and COLOR.D or COLOR.Z) + local fontSize=tileFont[N] + setFont(fontSize) + mStr(tileName[N],320+(x-.5)*160,40+(y-.5)*160-fontSize*.7) + end + else + setColor(COLOR.H) + rectangle('fill',x*160+163,y*160-117,154,154,15) + end + else + local c=tileColor[N] + setColor(c[1],c[2],c[3],prevSpawnTime) + rectangle('fill',x*160+163,y*160-117,154,154,15) + c=N<3 and 0 or 1 + setColor(c,c,c,prevSpawnTime) + local fontSize=tileFont[N] + setFont(fontSize) + mStr(tileName[N],320+(x-.5)*160,40+(y-.5)*160-fontSize*.7) + end + end + end - --Next indicator - setColor(1,1,1) - if nextCD<=12 then - for i=1,nextCD do - rectangle('fill',140+i*16-nextCD*8,170,12,12) - end - end + --Next indicator + setColor(1,1,1) + if nextCD<=12 then + for i=1,nextCD do + rectangle('fill',140+i*16-nextCD*8,170,12,12) + end + end - --Next - setFont(40) - gc.print("Next",50,195) - if nextTile>1 then - setColor(1,.5,.4) - end - setFont(70) - mStr(tileName[nextTile],220,175) + --Next + setFont(40) + gc.print("Next",50,195) + if nextTile>1 then + setColor(1,.5,.4) + end + setFont(70) + mStr(tileName[nextTile],220,175) - --Skip CoolDown - if skipper.cd and skipper.cd>0 then - setFont(50) - setColor(1,1,.5) - mStr(skipper.cd,155,600) - end + --Skip CoolDown + if skipper.cd and skipper.cd>0 then + setFont(50) + setColor(1,1,.5) + mStr(skipper.cd,155,600) + end - --Skip mark - if skipper.used then - setColor(1,1,.5) - gc.circle('fill',280,675,10) - end + --Skip mark + if skipper.used then + setColor(1,1,.5) + gc.circle('fill',280,675,10) + end - --New tile position - local x,y=1+(prevPos-1)%4,int((prevPos+3)/4) - gc.setLineWidth(8) - setColor(.2,.8,0,prevSpawnTime) - local d=25-prevSpawnTime*25 - rectangle('line',x*160+163-d,y*160-117-d,154+2*d,154+2*d,15) + --New tile position + local x,y=1+(prevPos-1)%4,int((prevPos+3)/4) + gc.setLineWidth(8) + setColor(.2,.8,0,prevSpawnTime) + local d=25-prevSpawnTime*25 + rectangle('line',x*160+163-d,y*160-117-d,154+2*d,154+2*d,15) - --Touch control boarder line - if tapControl then - gc.setLineWidth(6) - setColor(1,1,1,.2) - gc.line(310,30,580,300) - gc.line(970,30,700,300) - gc.line(310,690,580,420) - gc.line(970,690,700,420) - rectangle('line',580,300,120,120,10) - end + --Touch control boarder line + if tapControl then + gc.setLineWidth(6) + setColor(1,1,1,.2) + gc.line(310,30,580,300) + gc.line(970,30,700,300) + gc.line(310,690,580,420) + gc.line(970,690,700,420) + rectangle('line',580,300,120,120,10) + end end scene.widgetList={ - WIDGET.newButton{name="reset", x=155,y=100,w=180,h=100,color='lG',font=40,code=pressKey"r"}, - WIDGET.newSwitch{name="blind", x=240,y=300,w=60,font=40,disp=function()return blind end,code=pressKey"q",hideF=function()return state==1 end}, - WIDGET.newSwitch{name="tapControl", x=240,y=370,w=60,font=40,disp=function()return tapControl end,code=pressKey"w",hideF=function()return state==1 end}, + WIDGET.newButton{name="reset", x=155,y=100,w=180,h=100,color='lG',font=40,code=pressKey"r"}, + WIDGET.newSwitch{name="blind", x=240,y=300,w=60,font=40,disp=function()return blind end,code=pressKey"q",hideF=function()return state==1 end}, + WIDGET.newSwitch{name="tapControl",x=240,y=370,w=60,font=40,disp=function()return tapControl end,code=pressKey"w",hideF=function()return state==1 end}, - WIDGET.newKey{name="up", x=155,y=460,w=100,fText="↑",font=50,color='Y',code=pressKey"up",hideF=function()return tapControl end}, - WIDGET.newKey{name="down", x=155,y=660,w=100,fText="↓",font=50,color='Y',code=pressKey"down",hideF=function()return tapControl end}, - WIDGET.newKey{name="left", x=55,y=560,w=100,fText="←",font=50,color='Y',code=pressKey"left",hideF=function()return tapControl end}, - WIDGET.newKey{name="right", x=255,y=560,w=100,fText="→",font=50,color='Y',code=pressKey"right",hideF=function()return tapControl end}, - WIDGET.newKey{name="skip", x=155,y=400,w=100,font=20, color='Y',code=pressKey"space",hideF=function()return state~=1 or not skipper.cd or skipper.cd>0 end}, - WIDGET.newKey{name="record1", x=1100,y=390,w=220,h=50,fText="", color='H',code=pressKey"1",hideF=function()return state==2 end}, - WIDGET.newKey{name="record2", x=1100,y=450,w=220,h=50,fText="", color='H',code=pressKey"2",hideF=function()return state==2 end}, - WIDGET.newKey{name="replay1", x=1245,y=390,w=50,fText="!", color='G',code=pressKey"c1",hideF=function()return state==2 or #repeater.seq[1]==0 end}, - WIDGET.newKey{name="replay2", x=1245,y=450,w=50,fText="!", color='G',code=pressKey"c2",hideF=function()return state==2 or #repeater.seq[2]==0 end}, - WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newKey{name="up", x=155,y=460,w=100,fText="↑",font=50, color='Y',code=pressKey"up", hideF=function()return tapControl end}, + WIDGET.newKey{name="down", x=155,y=660,w=100,fText="↓",font=50, color='Y',code=pressKey"down", hideF=function()return tapControl end}, + WIDGET.newKey{name="left", x=55,y=560,w=100,fText="←",font=50, color='Y',code=pressKey"left", hideF=function()return tapControl end}, + WIDGET.newKey{name="right", x=255,y=560,w=100,fText="→",font=50,color='Y',code=pressKey"right", hideF=function()return tapControl end}, + WIDGET.newKey{name="skip", x=155,y=400,w=100,font=20, color='Y',code=pressKey"space", hideF=function()return state~=1 or not skipper.cd or skipper.cd>0 end}, + WIDGET.newKey{name="record1", x=1100,y=390,w=220,h=50,fText="", color='H',code=pressKey"1", hideF=function()return state==2 end}, + WIDGET.newKey{name="record2", x=1100,y=450,w=220,h=50,fText="", color='H',code=pressKey"2", hideF=function()return state==2 end}, + WIDGET.newKey{name="replay1", x=1245,y=390,w=50,fText="!", color='G',code=pressKey"c1", hideF=function()return state==2 or #repeater.seq[1]==0 end}, + WIDGET.newKey{name="replay2", x=1245,y=450,w=50,fText="!", color='G',code=pressKey"c2", hideF=function()return state==2 or #repeater.seq[2]==0 end}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/app_AtoZ.lua b/parts/scenes/app_AtoZ.lua index 64976e8b..09b88cea 100644 --- a/parts/scenes/app_AtoZ.lua +++ b/parts/scenes/app_AtoZ.lua @@ -3,23 +3,23 @@ local rnd=math.random local mStr=mStr local levels={ - A_Z="ABCDEFGHIJKLMNOPQRSTUVWXYZ", - Z_A="ZYXWVUTSRQPONMLKJIHGFEDCBA", - Tech1="TECHMINOHAOWAN", - Tech2="TECHMINOISFUN", - KeyTest1="THEQUICKBROWNFOXJUMPSOVERALAZYDOG", - KeyTest2="THEFIVEBOXINGWIZARDSJUMPQUICKLY", - Hello="HELLOWORLD", - Roll1="QWERTYUIOPASDFGHJKLZXCVBNM", - Roll2="QAZWSXEDCRFVTGBYHNUJMIKOLP", - Roll3="ZAQWSXCDERFVBGTYHNMJUIKLOP", - ZZZ="ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ", - ZXZX="ZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZX", - ZMZM="ZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZM", - Stair="ZXCVZXCVZXCVZXCVZXCVZXCVZXCVZXCVZXCVZXCVZXCVZXCVZXCVZXCVZXCVZXCV", - Stair2="ZXCVCXZXCVCXZXCVCXZXCVCXZXCVCXZXCVCXZXCVCXZXCVCXZXCVCXZXCVCXZXCV", - Stair3="XZCVXZCVXZCVXZCVXZCVXZCVXZCVXZCVXZCVXZCVXZCVXZCVXZCVXZCVXZCVXZCV", - BPW="OHOOOOOOOOOAAAAEAAIAUJOOOOOOOOOOOAAEOAAUUAEEEEEEEEEAAAAEAEIEAJOOOOOOOOOOEEEEOAAAAAAA", + A_Z="ABCDEFGHIJKLMNOPQRSTUVWXYZ", + Z_A="ZYXWVUTSRQPONMLKJIHGFEDCBA", + Tech1="TECHMINOHAOWAN", + Tech2="TECHMINOISFUN", + KeyTest1="THEQUICKBROWNFOXJUMPSOVERALAZYDOG", + KeyTest2="THEFIVEBOXINGWIZARDSJUMPQUICKLY", + Hello="HELLOWORLD", + Roll1="QWERTYUIOPASDFGHJKLZXCVBNM", + Roll2="QAZWSXEDCRFVTGBYHNUJMIKOLP", + Roll3="ZAQWSXCDERFVBGTYHNMJUIKLOP", + ZZZ="ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ", + ZXZX="ZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZXZX", + ZMZM="ZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZMZM", + Stair="ZXCVZXCVZXCVZXCVZXCVZXCVZXCVZXCVZXCVZXCVZXCVZXCVZXCVZXCVZXCVZXCV", + Stair2="ZXCVCXZXCVCXZXCVCXZXCVCXZXCVCXZXCVCXZXCVCXZXCVCXZXCVCXZXCVCXZXCV", + Stair3="XZCVXZCVXZCVXZCVXZCVXZCVXZCVXZCVXZCVXZCVXZCVXZCVXZCVXZCVXZCVXZCV", + BPW="OHOOOOOOOOOAAAAEAAIAUJOOOOOOOOOOOAAEOAAUUAEEEEEEEEEAAAAEAEIEAJOOOOOOOOOOEEEEOAAAAAAA", } local scene={} @@ -31,92 +31,92 @@ local state,progress local frameKeyCount,mistake function scene.sceneInit() - BG.set('bg2') - BGM.play('way') - levelName="A_Z" - targetString=levels.A_Z - progress=1 - frameKeyCount=0 - mistake=0 - startTime=0 - time=0 - state=0 + BG.set('bg2') + BGM.play('way') + levelName="A_Z" + targetString=levels.A_Z + progress=1 + frameKeyCount=0 + mistake=0 + startTime=0 + time=0 + state=0 end function scene.keyDown(key,isRep) - if isRep then return end - if #key==1 then - if state<2 and frameKeyCount<3 then - if key:upper():byte()==targetString:byte(progress)then - progress=progress+1 - frameKeyCount=frameKeyCount+1 - TEXT.show(key:upper(),rnd(320,960),rnd(100,240),90,'score',2.6) - SFX.play('move') - if progress==2 then - state=1 - startTime=TIME() - elseif progress>#targetString then - time=TIME()-startTime - state=2 - SFX.play('reach') - end - elseif progress>1 then - mistake=mistake+1 - SFX.play('finesseError') - end - end - elseif key=="space"then - progress=1 - mistake=0 - time=0 - state=0 - elseif key=="escape"then - SCN.back() - end + if isRep then return end + if #key==1 then + if state<2 and frameKeyCount<3 then + if key:upper():byte()==targetString:byte(progress)then + progress=progress+1 + frameKeyCount=frameKeyCount+1 + TEXT.show(key:upper(),rnd(320,960),rnd(100,240),90,'score',2.6) + SFX.play('move') + if progress==2 then + state=1 + startTime=TIME() + elseif progress>#targetString then + time=TIME()-startTime + state=2 + SFX.play('reach') + end + elseif progress>1 then + mistake=mistake+1 + SFX.play('finesseError') + end + end + elseif key=="space"then + progress=1 + mistake=0 + time=0 + state=0 + elseif key=="escape"then + SCN.back() + end end function scene.update() - if state==1 then - frameKeyCount=0 - time=TIME()-startTime - end + if state==1 then + frameKeyCount=0 + time=TIME()-startTime + end end function scene.draw() - setFont(40) - gc.setColor(COLOR.Z) - gc.print(("%.3f"):format(time),1026,80) - gc.print(mistake,1026,150) + setFont(40) + gc.setColor(COLOR.Z) + gc.print(("%.3f"):format(time),1026,80) + gc.print(mistake,1026,150) - if state>0 then - gc.print(("%.3f/s"):format((progress-1)/time),1026,220) - end + if state>0 then + gc.print(("%.3f/s"):format((progress-1)/time),1026,220) + end - if state==2 then - gc.setColor(.9,.9,0)--win - elseif state==1 then - gc.setColor(.9,.9,.9)--game - elseif state==0 then - gc.setColor(.2,.8,.2)--ready - end + if state==2 then + gc.setColor(.9,.9,0)--win + elseif state==1 then + gc.setColor(.9,.9,.9)--game + elseif state==0 then + gc.setColor(.2,.8,.2)--ready + end - setFont(100) - mStr(state==1 and #targetString-progress+1 or state==0 and"Ready"or state==2 and"Win",640,200) + setFont(100) + mStr(state==1 and #targetString-progress+1 or state==0 and"Ready"or state==2 and"Win",640,200) - gc.setColor(COLOR.Z) - gc.print(targetString:sub(progress,progress),120,280,0,2) - gc.print(targetString:sub(progress+1),310,380) + gc.setColor(COLOR.Z) + gc.print(targetString:sub(progress,progress),120,280,0,2) + gc.print(targetString:sub(progress+1),310,380) - gc.setColor(1,1,1,.7) - setFont(40) - gc.print(targetString,120,520) + gc.setColor(1,1,1,.7) + setFont(40) + gc.print(targetString,120,520) end scene.widgetList={ - WIDGET.newSelector{name="level", x=640,y=640,w=200,list={'A_Z','Z_A','Tech1','Tech2','KeyTest1','KeyTest2','Hello','Roll1','Roll2','Roll3','ZZZ','ZXZX','ZMZM','Stair','Stair2','Stair3','BPW'},disp=function()return levelName end,code=function(i)levelName=i;targetString=levels[i]end,hideF=function()return state>0 end}, - WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color='lG',font=40,code=pressKey"space"}, - WIDGET.newButton{name="keyboard", x=160,y=210,w=180,h=100,code=function()love.keyboard.setTextInput(true,0,select(2,SCR.xOy:transformPoint(0,500)),1,1)end,hide=not MOBILE}, - WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newSelector{name="level", x=640,y=640,w=200,list={'A_Z','Z_A','Tech1','Tech2','KeyTest1','KeyTest2','Hello','Roll1','Roll2','Roll3','ZZZ','ZXZX','ZMZM','Stair','Stair2','Stair3','BPW'},disp=function()return levelName end,code=function(i)levelName=i;targetString=levels[i]end,hideF=function()return state>0 end}, + WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color='lG',font=40,code=pressKey"space"}, + WIDGET.newButton{name="keyboard",x=160,y=210,w=180,h=100,code=function()love.keyboard.setTextInput(true,0,select(2,SCR.xOy:transformPoint(0,500)),1,1)end,hide=not MOBILE}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/app_UTTT.lua b/parts/scenes/app_UTTT.lua index 2e29037f..3c2ae950 100644 --- a/parts/scenes/app_UTTT.lua +++ b/parts/scenes/app_UTTT.lua @@ -2,14 +2,14 @@ local gc=love.graphics local int=math.floor local lines={ - {1,2,3}, - {4,5,6}, - {7,8,9}, - {1,4,7}, - {2,5,8}, - {3,6,9}, - {1,5,9}, - {3,5,7}, + {1,2,3}, + {4,5,6}, + {7,8,9}, + {1,4,7}, + {2,5,8}, + {3,6,9}, + {1,5,9}, + {3,5,7}, } local board={{},{},{},{},{},{},{},{},{}} @@ -23,222 +23,222 @@ local placeTime local gameover local function restart() - lastX,lastx=false,false - curX,curx=nil - round=0 - target=false - placeTime=TIME() - gameover=false - for X=1,9 do - score[X]=false - for x=1,9 do - board[X][x]=false - end - end + lastX,lastx=false,false + curX,curx=nil + round=0 + target=false + placeTime=TIME() + gameover=false + for X=1,9 do + score[X]=false + for x=1,9 do + board[X][x]=false + end + end end local function checkBoard(b,p) - for i=1,8 do - for j=1,3 do - if b[lines[i][j]]~=p then - goto CONTINUE_testNextLine - end - end - do return true end - ::CONTINUE_testNextLine:: - end + for i=1,8 do + for j=1,3 do + if b[lines[i][j]]~=p then + goto CONTINUE_testNextLine + end + end + do return true end + ::CONTINUE_testNextLine:: + end end local function full(L) - for i=1,9 do - if not L[i]then - return false - end - end - return true + for i=1,9 do + if not L[i]then + return false + end + end + return true end local function place(X,x) - board[X][x]=round - SFX.play('move') - lastX,lastx=X,x - curX,curx=nil - placeTime=TIME() - if checkBoard(board[X],round)then - score[X]=round - if checkBoard(score,round)then - gameover=round - SFX.play('win') - return - else - if full(score)then - gameover=true - return - end - end - SFX.play('reach') - else - if full(board[X])then - SFX.play('emit') - score[X]=true - if full(score)then - gameover=true - return - end - end - end - if score[x]then - target=false - else - target=x - end - round=1-round + board[X][x]=round + SFX.play('move') + lastX,lastx=X,x + curX,curx=nil + placeTime=TIME() + if checkBoard(board[X],round)then + score[X]=round + if checkBoard(score,round)then + gameover=round + SFX.play('win') + return + else + if full(score)then + gameover=true + return + end + end + SFX.play('reach') + else + if full(board[X])then + SFX.play('emit') + score[X]=true + if full(score)then + gameover=true + return + end + end + end + if score[x]then + target=false + else + target=x + end + round=1-round end local scene={} function scene.sceneInit() - restart() - BGM.play('truth') - BG.set('rainbow') + restart() + BGM.play('truth') + BG.set('rainbow') end function scene.draw() - gc.push('transform') - --origin pos:0,140; scale:4 - gc.translate(280,0) - gc.scale(8) + gc.push('transform') + --origin pos:0,140; scale:4 + gc.translate(280,0) + gc.scale(8) - --Draw board - gc.setColor(0,0,0,.4) - gc.rectangle('fill',0,0,90,90) + --Draw board + gc.setColor(0,0,0,.4) + gc.rectangle('fill',0,0,90,90) - --Draw target area - gc.setColor(1,1,1,math.sin((TIME()-placeTime)*5)/5+.2) - if target then - gc.rectangle('fill',(target-1)%3*30,int((target-1)/3)*30,30,30) - elseif not gameover then - gc.rectangle('fill',0,0,90,90) - end + --Draw target area + gc.setColor(1,1,1,math.sin((TIME()-placeTime)*5)/5+.2) + if target then + gc.rectangle('fill',(target-1)%3*30,int((target-1)/3)*30,30,30) + elseif not gameover then + gc.rectangle('fill',0,0,90,90) + end - --Draw cursor - if curX then - gc.setColor(1,1,1,.3) - gc.rectangle('fill',(curX-1)%3*30+(curx-1)%3*10-.5,int((curX-1)/3)*30+int((curx-1)/3)*10-.5,11,11) - end + --Draw cursor + if curX then + gc.setColor(1,1,1,.3) + gc.rectangle('fill',(curX-1)%3*30+(curx-1)%3*10-.5,int((curX-1)/3)*30+int((curx-1)/3)*10-.5,11,11) + end - gc.setLineWidth(.8) - for X=1,9 do - if score[X]then - if score[X]==0 then - gc.setColor(.5,0,0) - elseif score[X]==1 then - gc.setColor(0,0,.5) - else - gc.setColor(COLOR.D) - end - gc.rectangle('fill',(X-1)%3*30,int((X-1)/3)*30,30,30) - end - for x=1,9 do - local c=board[X][x] - if c then - local _x=(X-1)%3*30+(x-1)%3*10 - local _y=int((X-1)/3)*30+int((x-1)/3)*10 - if c==0 then - gc.setColor(1,.2,.2) - gc.rectangle('line',_x+2.25,_y+2.25,5.5,5.5) - else - gc.setColor(.3,.3,1) - gc.line(_x+2,_y+2,_x+8,_y+8) - gc.line(_x+2,_y+8,_x+8,_y+2) - end - end - end - end + gc.setLineWidth(.8) + for X=1,9 do + if score[X]then + if score[X]==0 then + gc.setColor(.5,0,0) + elseif score[X]==1 then + gc.setColor(0,0,.5) + else + gc.setColor(COLOR.D) + end + gc.rectangle('fill',(X-1)%3*30,int((X-1)/3)*30,30,30) + end + for x=1,9 do + local c=board[X][x] + if c then + local _x=(X-1)%3*30+(x-1)%3*10 + local _y=int((X-1)/3)*30+int((x-1)/3)*10 + if c==0 then + gc.setColor(1,.2,.2) + gc.rectangle('line',_x+2.25,_y+2.25,5.5,5.5) + else + gc.setColor(.3,.3,1) + gc.line(_x+2,_y+2,_x+8,_y+8) + gc.line(_x+2,_y+8,_x+8,_y+2) + end + end + end + end - --Draw board line - gc.setLineWidth(.8) - for x=0,9 do - gc.setColor(1,1,1,x%3==0 and 1 or .3) - gc.line(10*x,0,10*x,90) - gc.line(0,10*x,90,10*x) - end + --Draw board line + gc.setLineWidth(.8) + for x=0,9 do + gc.setColor(1,1,1,x%3==0 and 1 or .3) + gc.line(10*x,0,10*x,90) + gc.line(0,10*x,90,10*x) + end - --Draw last pos - if lastX then - gc.setColor(.5,1,.4,.8) - local r=.5+.5*math.sin(TIME()*6.26) - gc.rectangle('line',(lastX-1)%3*30+(lastx-1)%3*10-r,int((lastX-1)/3)*30+int((lastx-1)/3)*10-r,10+2*r,10+2*r) - end - gc.pop() + --Draw last pos + if lastX then + gc.setColor(.5,1,.4,.8) + local r=.5+.5*math.sin(TIME()*6.26) + gc.rectangle('line',(lastX-1)%3*30+(lastx-1)%3*10-r,int((lastX-1)/3)*30+int((lastx-1)/3)*10-r,10+2*r,10+2*r) + end + gc.pop() - if gameover then - --Draw result - setFont(60) - if gameover==0 then - gc.setColor(1,.6,.6) - mStr("RED\nWON",1140,200) - elseif gameover==1 then - gc.setColor(.6,.6,1) - mStr("BLUE\nWON",1140,200) - else - gc.setColor(.8,.8,.8) - mStr("TIE",1140,240) - end - else - --Draw current round mark - gc.setColor(.8,.8,.8,.8) - gc.rectangle('fill',80,80,160,160) - gc.setColor(COLOR.Z) - gc.setLineWidth(6) - gc.rectangle('line',80,80,160,160) + if gameover then + --Draw result + setFont(60) + if gameover==0 then + gc.setColor(1,.6,.6) + mStr("RED\nWON",1140,200) + elseif gameover==1 then + gc.setColor(.6,.6,1) + mStr("BLUE\nWON",1140,200) + else + gc.setColor(.8,.8,.8) + mStr("TIE",1140,240) + end + else + --Draw current round mark + gc.setColor(.8,.8,.8,.8) + gc.rectangle('fill',80,80,160,160) + gc.setColor(COLOR.Z) + gc.setLineWidth(6) + gc.rectangle('line',80,80,160,160) - gc.setLineWidth(10) - if round==0 then - gc.setColor(1,0,0) - gc.rectangle('line',160-40,160-40,80,80) - else - gc.setColor(0,0,1) - gc.line(160-45,160-45,160+45,160+45) - gc.line(160-45,160+45,160+45,160-45) - end - end + gc.setLineWidth(10) + if round==0 then + gc.setColor(1,0,0) + gc.rectangle('line',160-40,160-40,80,80) + else + gc.setColor(0,0,1) + gc.line(160-45,160-45,160+45,160+45) + gc.line(160-45,160+45,160+45,160-45) + end + end end function scene.touchDown(x,y) - scene.mouseMove(x,y) + scene.mouseMove(x,y) end function scene.touchMove(x,y) - scene.mouseMove(x,y) + scene.mouseMove(x,y) end function scene.touchUp(x,y) - scene.mouseDown(x,y) + scene.mouseDown(x,y) end function scene.mouseMove(x,y) - x,y=int((x-280)/80),int(y/80) - curX,curx=int(x/3)+int(y/3)*3+1,x%3+y%3*3+1 - if - x<0 or x>8 or - y<0 or y>8 or - curX<1 or curX>9 or - curx<1 or curx>9 or - score[curX]or - not(target==curX or not target)or - board[curX][curx]or - gameover - then - curX,curx=nil - end + x,y=int((x-280)/80),int(y/80) + curX,curx=int(x/3)+int(y/3)*3+1,x%3+y%3*3+1 + if + x<0 or x>8 or + y<0 or y>8 or + curX<1 or curX>9 or + curx<1 or curx>9 or + score[curX]or + not(target==curX or not target)or + board[curX][curx]or + gameover + then + curX,curx=nil + end end function scene.mouseDown(x,y) - scene.mouseMove(x,y) - if curX then place(curX,curx)end + scene.mouseMove(x,y) + if curX then place(curX,curx)end end scene.widgetList={ - WIDGET.newButton{name="reset",x=1140,y=540,w=170,h=80,font=40,color='lG',code=restart}, - WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newButton{name="reset",x=1140,y=540,w=170,h=80,font=40,color='lG',code=restart}, + WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/app_calc.lua b/parts/scenes/app_calc.lua index 5bb98806..43ee7d6f 100644 --- a/parts/scenes/app_calc.lua +++ b/parts/scenes/app_calc.lua @@ -8,122 +8,122 @@ local val--result value local sym--symbol function scene.sceneInit() - BG.set('none') - BGM.stop() - reg,val,sym=false,"0",false + BG.set('none') + BGM.stop() + reg,val,sym=false,"0",false end function scene.sceneBack() - BGM.play() + BGM.play() end scene.mouseDown=NULL function scene.keyDown(key) - if key:byte()>=48 and key:byte()<=57 then - if sym=="="then - val=key - sym=false - elseif sym and not reg then - reg=val - val=key - else - if #val<14 then - if val=="0"then val=""end - val=val..key - end - end - elseif key:sub(1,2)=="kp"then - scene.keyDown(key:sub(3)) - elseif key=="."then - if sym=="="then - sym,reg=false,false - val="0." - elseif not(val:find(".",nil,true)or val:find("e"))then - if sym and not reg then - reg=val - val="0." - else - val=val.."." - end - end - elseif key=="e"then - if sym=="="then - sym,reg=false - val="0e" - elseif not val:find("e")then - val=val.."e" - end - elseif key=="backspace"then - if sym=="="then - val="" - elseif sym then - sym=false - else - val=val:sub(1,-2) - end - if val==""then val="0"end - elseif key=="+"or key=="="and kb.isDown("lshift","rshift")then - if reg and sym then scene.keyDown("return")else reg=false end sym="+" - elseif key=="*"or key=="8"and kb.isDown("lshift","rshift")then - if reg and sym then scene.keyDown("return")else reg=false end sym="*" - elseif key=="-"then - if reg and sym then scene.keyDown("return")else reg=false end sym="-" - elseif key=="/"then - if reg and sym then scene.keyDown("return")else reg=false end sym="/" - elseif key=="return"then - if val:sub(-1)=="e"then val=val:sub(1,-2)end - if sym and reg then - if reg:sub(-1)=="e"then reg=reg:sub(1,-2)end - val= - sym=="+"and tostring((tonumber(reg)or 0)+tonumber(val))or - sym=="-"and tostring((tonumber(reg)or 0)-tonumber(val))or - sym=="*"and tostring((tonumber(reg)or 0)*tonumber(val))or - sym=="/"and tostring((tonumber(reg)or 0)/tonumber(val))or - "-1" - end - sym="=" - reg=false - elseif key=="escape"then - if val~="0"then - reg,sym=false,false - val="0" - else - SCN.back() - end - elseif key=="delete"then - val="0" - end + if key:byte()>=48 and key:byte()<=57 then + if sym=="="then + val=key + sym=false + elseif sym and not reg then + reg=val + val=key + else + if #val<14 then + if val=="0"then val=""end + val=val..key + end + end + elseif key:sub(1,2)=="kp"then + scene.keyDown(key:sub(3)) + elseif key=="."then + if sym=="="then + sym,reg=false,false + val="0." + elseif not(val:find(".",nil,true)or val:find("e"))then + if sym and not reg then + reg=val + val="0." + else + val=val.."." + end + end + elseif key=="e"then + if sym=="="then + sym,reg=false + val="0e" + elseif not val:find("e")then + val=val.."e" + end + elseif key=="backspace"then + if sym=="="then + val="" + elseif sym then + sym=false + else + val=val:sub(1,-2) + end + if val==""then val="0"end + elseif key=="+"or key=="="and kb.isDown("lshift","rshift")then + if reg and sym then scene.keyDown("return")else reg=false end sym="+" + elseif key=="*"or key=="8"and kb.isDown("lshift","rshift")then + if reg and sym then scene.keyDown("return")else reg=false end sym="*" + elseif key=="-"then + if reg and sym then scene.keyDown("return")else reg=false end sym="-" + elseif key=="/"then + if reg and sym then scene.keyDown("return")else reg=false end sym="/" + elseif key=="return"then + if val:sub(-1)=="e"then val=val:sub(1,-2)end + if sym and reg then + if reg:sub(-1)=="e"then reg=reg:sub(1,-2)end + val= + sym=="+"and tostring((tonumber(reg)or 0)+tonumber(val))or + sym=="-"and tostring((tonumber(reg)or 0)-tonumber(val))or + sym=="*"and tostring((tonumber(reg)or 0)*tonumber(val))or + sym=="/"and tostring((tonumber(reg)or 0)/tonumber(val))or + "-1" + end + sym="=" + reg=false + elseif key=="escape"then + if val~="0"then + reg,sym=false,false + val="0" + else + SCN.back() + end + elseif key=="delete"then + val="0" + end end function scene.draw() - gc.setColor(COLOR.Z) - gc.setLineWidth(2) - gc.rectangle('line',100,80,650,150,5) - setFont(45) - if reg then gc.printf(reg,0,100,720,'right')end - if val then gc.printf(val,0,150,720,'right')end - if sym then setFont(50)gc.print(sym,126,150)end + gc.setColor(COLOR.Z) + gc.setLineWidth(2) + gc.rectangle('line',100,80,650,150,5) + setFont(45) + if reg then gc.printf(reg,0,100,720,'right')end + if val then gc.printf(val,0,150,720,'right')end + if sym then setFont(50)gc.print(sym,126,150)end end scene.widgetList={ - WIDGET.newKey{name="_1",x=145,y=300,w=90,fText="1",font=50,code=pressKey"1"}, - WIDGET.newKey{name="_2",x=245,y=300,w=90,fText="2",font=50,code=pressKey"2"}, - WIDGET.newKey{name="_3",x=345,y=300,w=90,fText="3",font=50,code=pressKey"3"}, - WIDGET.newKey{name="_4",x=145,y=400,w=90,fText="4",font=50,code=pressKey"4"}, - WIDGET.newKey{name="_5",x=245,y=400,w=90,fText="5",font=50,code=pressKey"5"}, - WIDGET.newKey{name="_6",x=345,y=400,w=90,fText="6",font=50,code=pressKey"6"}, - WIDGET.newKey{name="_7",x=145,y=500,w=90,fText="7",font=50,code=pressKey"7"}, - WIDGET.newKey{name="_8",x=245,y=500,w=90,fText="8",font=50,code=pressKey"8"}, - WIDGET.newKey{name="_9",x=345,y=500,w=90,fText="9",font=50,code=pressKey"9"}, - WIDGET.newKey{name="_0",x=145,y=600,w=90,fText="0",font=50,code=pressKey"0"}, - WIDGET.newKey{name=".",x=245,y=600,w=90,fText=".",color='lM',font=50,code=pressKey"."}, - WIDGET.newKey{name="e",x=345,y=600,w=90,fText="e",color='lM',font=50,code=pressKey"e"}, - WIDGET.newKey{name="+",x=445,y=300,w=90,fText="+",color='lB',font=50,code=pressKey"+"}, - WIDGET.newKey{name="-",x=445,y=400,w=90,fText="-",color='lB',font=50,code=pressKey"-"}, - WIDGET.newKey{name="*",x=445,y=500,w=90,fText="*",color='lB',font=50,code=pressKey"*"}, - WIDGET.newKey{name="/",x=445,y=600,w=90,fText="/",color='lB',font=50,code=pressKey"/"}, - WIDGET.newKey{name="<",x=545,y=300,w=90,fText="<",color='lR',font=50,code=pressKey"backspace"}, - WIDGET.newKey{name="=",x=545,y=400,w=90,fText="=",color='lY',font=50,code=pressKey"return"}, - WIDGET.newKey{name="back",x=1135,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newKey{name="_1",x=145,y=300,w=90,fText="1",font=50,code=pressKey"1"}, + WIDGET.newKey{name="_2",x=245,y=300,w=90,fText="2",font=50,code=pressKey"2"}, + WIDGET.newKey{name="_3",x=345,y=300,w=90,fText="3",font=50,code=pressKey"3"}, + WIDGET.newKey{name="_4",x=145,y=400,w=90,fText="4",font=50,code=pressKey"4"}, + WIDGET.newKey{name="_5",x=245,y=400,w=90,fText="5",font=50,code=pressKey"5"}, + WIDGET.newKey{name="_6",x=345,y=400,w=90,fText="6",font=50,code=pressKey"6"}, + WIDGET.newKey{name="_7",x=145,y=500,w=90,fText="7",font=50,code=pressKey"7"}, + WIDGET.newKey{name="_8",x=245,y=500,w=90,fText="8",font=50,code=pressKey"8"}, + WIDGET.newKey{name="_9",x=345,y=500,w=90,fText="9",font=50,code=pressKey"9"}, + WIDGET.newKey{name="_0",x=145,y=600,w=90,fText="0",font=50,code=pressKey"0"}, + WIDGET.newKey{name=".",x=245,y=600,w=90,fText=".",color='lM',font=50,code=pressKey"."}, + WIDGET.newKey{name="e",x=345,y=600,w=90,fText="e",color='lM',font=50,code=pressKey"e"}, + WIDGET.newKey{name="+",x=445,y=300,w=90,fText="+",color='lB',font=50,code=pressKey"+"}, + WIDGET.newKey{name="-",x=445,y=400,w=90,fText="-",color='lB',font=50,code=pressKey"-"}, + WIDGET.newKey{name="*",x=445,y=500,w=90,fText="*",color='lB',font=50,code=pressKey"*"}, + WIDGET.newKey{name="/",x=445,y=600,w=90,fText="/",color='lB',font=50,code=pressKey"/"}, + WIDGET.newKey{name="<",x=545,y=300,w=90,fText="<",color='lR',font=50,code=pressKey"backspace"}, + WIDGET.newKey{name="=",x=545,y=400,w=90,fText="=",color='lY',font=50,code=pressKey"return"}, + WIDGET.newKey{name="back",x=1135,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/app_cannon.lua b/parts/scenes/app_cannon.lua index 383a5249..50b5d91d 100644 --- a/parts/scenes/app_cannon.lua +++ b/parts/scenes/app_cannon.lua @@ -7,125 +7,125 @@ local x,y,vx,vy,ex,ey local scene={} function scene.sceneInit() - pow,ang=0,0 - state=0 - timer=0 - score,combo=0,0 - x,y=160,500 - ex,ey=626,260 - BG.set('matrix') - BGM.play('hang out') + pow,ang=0,0 + state=0 + timer=0 + score,combo=0,0 + x,y=160,500 + ex,ey=626,260 + BG.set('matrix') + BGM.play('hang out') end function scene.keyDown(key,isRep) - if isRep then return end - if key=="space"or key=="return"then - if state==0 then - state=1 - elseif state==1 then - state=2 - vx=pow*cos(ang)/2.6 - vy=pow*sin(ang)/2.6 - end - elseif key=="escape"then - SCN.back() - end + if isRep then return end + if key=="space"or key=="return"then + if state==0 then + state=1 + elseif state==1 then + state=2 + vx=pow*cos(ang)/2.6 + vy=pow*sin(ang)/2.6 + end + elseif key=="escape"then + SCN.back() + end end function scene.mouseDown(k) - if k==1 then - scene.keyDown("space") - end + if k==1 then + scene.keyDown("space") + end end function scene.touchDown() - scene.keyDown("space") + scene.keyDown("space") end function scene.update() - timer=timer+1 - if state==0 then - pow=abs(100-TIME()*200%200) - elseif state==1 then - ang=(abs(110-TIME()*120%220)-30)/180*3.141592653589793 - else - x,y=x+vx,y-vy - vy=vy-.62 - local e - if (x-ex)^2+(y-ey)^2<900 then - score=math.min(score+4+combo*2,626) - combo=combo+1 - ex,ey=rnd(626,1100),rnd(26,700) - SFX.play('reach') - e=true - end - if x>1280 or y>720 then - if score>0 then - score=score-int(score/10) - end - SFX.play('finesseError') - combo=0 - e=true - end - if e then - x,y=rnd(100,260),rnd(160,700) - state=0 - end - end + timer=timer+1 + if state==0 then + pow=abs(100-TIME()*200%200) + elseif state==1 then + ang=(abs(110-TIME()*120%220)-30)/180*3.141592653589793 + else + x,y=x+vx,y-vy + vy=vy-.62 + local e + if (x-ex)^2+(y-ey)^2<900 then + score=math.min(score+4+combo*2,626) + combo=combo+1 + ex,ey=rnd(626,1100),rnd(26,700) + SFX.play('reach') + e=true + end + if x>1280 or y>720 then + if score>0 then + score=score-int(score/10) + end + SFX.play('finesseError') + combo=0 + e=true + end + if e then + x,y=rnd(100,260),rnd(160,700) + state=0 + end + end end local scoreColor={ - 'Z',--0 - 'A',--20 - 'N',--40 - 'B',--60 - 'P',--80 - 'W',--100 - 'R','F','O','Y','lA',--200 - 'lN','lB','lP','lW','lR',--300 - 'lF','lO','lY','dA','dN',--400 - 'dB','dP','dW','dR','dF',--500 - 'dY','lH','H','dH',--before 600, black after + 'Z',--0 + 'A',--20 + 'N',--40 + 'B',--60 + 'P',--80 + 'W',--100 + 'R','F','O','Y','lA',--200 + 'lN','lB','lP','lW','lR',--300 + 'lF','lO','lY','dA','dN',--400 + 'dB','dP','dW','dR','dF',--500 + 'dY','lH','H','dH',--before 600, black after } function scene.draw() - --Spawn area - gc.setColor(1,1,1,.2) - gc.rectangle('fill',85,0,190,720) + --Spawn area + gc.setColor(1,1,1,.2) + gc.rectangle('fill',85,0,190,720) - --Power & Angle - gc.setColor(COLOR.Z) - if state~=2 then - gc.setLineWidth(2) - gc.rectangle('fill',x-80,y+20,pow*1.6,16) - gc.rectangle('line',x-80,y+20,160,15) - if state==1 then - gc.setLineWidth(5) - gc.line(x,y,x+(20+2*pow)*cos(ang),y-(20+2*pow)*sin(ang)) - end - end + --Power & Angle + gc.setColor(COLOR.Z) + if state~=2 then + gc.setLineWidth(2) + gc.rectangle('fill',x-80,y+20,pow*1.6,16) + gc.rectangle('line',x-80,y+20,160,15) + if state==1 then + gc.setLineWidth(5) + gc.line(x,y,x+(20+2*pow)*cos(ang),y-(20+2*pow)*sin(ang)) + end + end - --Info - setFont(40) - if combo>1 then - gc.setColor(1,1,.6) - gc.print("x"..combo,300,80) - end - gc.setColor(COLOR[scoreColor[int(score/20)+1]or'D']) - gc.print(score,300,30) + --Info + setFont(40) + if combo>1 then + gc.setColor(1,1,.6) + gc.print("x"..combo,300,80) + end + gc.setColor(COLOR[scoreColor[int(score/20)+1]or'D']) + gc.print(score,300,30) - --Cannon ball - gc.circle('fill',x,y,15) + --Cannon ball + gc.circle('fill',x,y,15) - --Arrow - if y<-15 then - gc.print("↑",x-20.5,0) - end + --Arrow + if y<-15 then + gc.print("↑",x-20.5,0) + end - --Target - gc.setColor(1,1,.4) - gc.circle('fill',ex,ey,15) + --Target + gc.setColor(1,1,.4) + gc.circle('fill',ex,ey,15) end scene.widgetList={ - WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/app_console.lua b/parts/scenes/app_console.lua index a7bc6886..d6fe5a14 100644 --- a/parts/scenes/app_console.lua +++ b/parts/scenes/app_console.lua @@ -16,848 +16,848 @@ local sudomode=false local the_secret=(14^2*10)..(2*11) local commands={}do - --[[ - format of elements in table 'commands': - key: the command name - value: a table containing the following two elements: - code: code to run when call - description: a string that shows when user types 'help'. - details: an array of strings containing documents, shows when user types 'help [command]'. - ]] + --[[ + format of elements in table 'commands': + key: the command name + value: a table containing the following two elements: + code: code to run when call + description: a string that shows when user types 'help'. + details: an array of strings containing documents, shows when user types 'help [command]'. + ]] - local cmdList={}--List of all non-alias commands + local cmdList={}--List of all non-alias commands - --Basic - commands.help={ - code=function(arg) - if #arg>0 then - --help [command] - if commands[arg]then - if commands[arg].description then - log{C.H,("%s"):format(commands[arg].description)} - end - if commands[arg].details then - for _,v in ipairs(commands[arg].details)do log(v)end - else - log{C.Y,("No details for command '%s'"):format(arg)} - end - else - log{C.Y,("No command called '%s'"):format(arg)} - end - else - --help - for i=1,#cmdList do - local cmd=cmdList[i] - local body=commands[cmd] - log( - body.description and - {C.Z,cmd,C.H," "..body.description} - or - log{C.Z,cmd} - ) - end - end - end, - description="Display help messages", - details={ - "Display help messages.", - "", - "Aliases: help ?", - "", - "Usage:", - "help", - "help [command_name]", - }, - }commands["?"]="help" - commands["#"]={ - description="Run arbitrary Lua code", - details={ - "Run arbitrary Lua code.", - "", - "Usage: #[lua_source_code]", - "", - "print() can be used to print text into this window.", - }, - } - commands.exit={ - code=backScene, - description="Return to the last menu", - details={ - "Return to the last menu.", - "", - "Aliases: exit quit", - "", - "Usage: exit", - }, - }commands.quit="exit" - commands.echo={ - code=function(str)if str~=""then log(str)end end, - description="Print a message", - details={ - "Print a message to this window.", - "", - "Usage: echo [message]", - }, - } - commands.cls={ - code=function()outputBox:clear()end, - description="Clear the window", - details={ - "Clear the log output.", - "", - "Usage: cls", - }, - } + --Basic + commands.help={ + code=function(arg) + if #arg>0 then + --help [command] + if commands[arg]then + if commands[arg].description then + log{C.H,("%s"):format(commands[arg].description)} + end + if commands[arg].details then + for _,v in ipairs(commands[arg].details)do log(v)end + else + log{C.Y,("No details for command '%s'"):format(arg)} + end + else + log{C.Y,("No command called '%s'"):format(arg)} + end + else + --help + for i=1,#cmdList do + local cmd=cmdList[i] + local body=commands[cmd] + log( + body.description and + {C.Z,cmd,C.H," "..body.description} + or + log{C.Z,cmd} + ) + end + end + end, + description="Display help messages", + details={ + "Display help messages.", + "", + "Aliases: help ?", + "", + "Usage:", + "help", + "help [command_name]", + }, + }commands["?"]="help" + commands["#"]={ + description="Run arbitrary Lua code", + details={ + "Run arbitrary Lua code.", + "", + "Usage: #[lua_source_code]", + "", + "print() can be used to print text into this window.", + }, + } + commands.exit={ + code=backScene, + description="Return to the last menu", + details={ + "Return to the last menu.", + "", + "Aliases: exit quit", + "", + "Usage: exit", + }, + }commands.quit="exit" + commands.echo={ + code=function(str)if str~=""then log(str)end end, + description="Print a message", + details={ + "Print a message to this window.", + "", + "Usage: echo [message]", + }, + } + commands.cls={ + code=function()outputBox:clear()end, + description="Clear the window", + details={ + "Clear the log output.", + "", + "Usage: cls", + }, + } - --File - do--tree - local function tree(path,name,depth) - local info=love.filesystem.getInfo(path..name) - if info.type=='file'then - log(("\t\t"):rep(depth)..name) - elseif info.type=='directory'then - log(("\t\t"):rep(depth)..name..">") - local L=love.filesystem.getDirectoryItems(path..name) - for _,subName in next,L do - tree(path..name.."/",subName,depth+1) - end - else - log("Unkown item type: %s (%s)"):format(name,info.type) - end - end - commands.tree={ - code=function() - local L=love.filesystem.getDirectoryItems"" - for _,name in next,L do - if love.filesystem.getRealDirectory(name)==SAVEDIR then - tree("",name,0) - end - end - end, - description="List all files & directories", - details={ - "List all files & directories in saving directory", - "", - "Usage: tree", - }, - } - end - do--del - local function delFile(name) - if love.filesystem.remove(name)then - log{C.Y,("Deleted: '%s'"):format(name)} - else - log{C.R,("Failed to delete: '%s'"):format(name)} - end - end - local function delDir(name) - if #love.filesystem.getDirectoryItems(name)==0 then - if love.filesystem.remove(name)then - log{C.Y,("Directory deleted: '%s'"):format(name)} - else - log{C.R,("Failed to delete directory '%s'"):format(name)} - end - else - log{C.R,"Directory '"..name.."' is not empty"} - end - end - local function recursiveDelDir(dir) - local containing=love.filesystem.getDirectoryItems(dir) - if #containing==0 then - if love.filesystem.remove(dir)then - log{C.Y,("Succesfully deleted directory '%s'"):format(dir)} - else - log{C.R,("Failed to delete directory '%s'"):format(dir)} - end - else - for _,name in next,containing do - local path=dir.."/"..name - local info=love.filesystem.getInfo(path) - if info then - if info.type=='file'then - delFile(path) - elseif info.type=='directory'then - recursiveDelDir(path) - else - log("Unkown item type: %s (%s)"):format(name,info.type) - end - end - end - delDir(dir) - end - end - commands.del={ - code=function(name) - local recursive=name:sub(1,3)=="-s " - if recursive then name=name:sub(4)end + --File + do--tree + local function tree(path,name,depth) + local info=love.filesystem.getInfo(path..name) + if info.type=='file'then + log(("\t\t"):rep(depth)..name) + elseif info.type=='directory'then + log(("\t\t"):rep(depth)..name..">") + local L=love.filesystem.getDirectoryItems(path..name) + for _,subName in next,L do + tree(path..name.."/",subName,depth+1) + end + else + log("Unkown item type: %s (%s)"):format(name,info.type) + end + end + commands.tree={ + code=function() + local L=love.filesystem.getDirectoryItems"" + for _,name in next,L do + if love.filesystem.getRealDirectory(name)==SAVEDIR then + tree("",name,0) + end + end + end, + description="List all files & directories", + details={ + "List all files & directories in saving directory", + "", + "Usage: tree", + }, + } + end + do--del + local function delFile(name) + if love.filesystem.remove(name)then + log{C.Y,("Deleted: '%s'"):format(name)} + else + log{C.R,("Failed to delete: '%s'"):format(name)} + end + end + local function delDir(name) + if #love.filesystem.getDirectoryItems(name)==0 then + if love.filesystem.remove(name)then + log{C.Y,("Directory deleted: '%s'"):format(name)} + else + log{C.R,("Failed to delete directory '%s'"):format(name)} + end + else + log{C.R,"Directory '"..name.."' is not empty"} + end + end + local function recursiveDelDir(dir) + local containing=love.filesystem.getDirectoryItems(dir) + if #containing==0 then + if love.filesystem.remove(dir)then + log{C.Y,("Succesfully deleted directory '%s'"):format(dir)} + else + log{C.R,("Failed to delete directory '%s'"):format(dir)} + end + else + for _,name in next,containing do + local path=dir.."/"..name + local info=love.filesystem.getInfo(path) + if info then + if info.type=='file'then + delFile(path) + elseif info.type=='directory'then + recursiveDelDir(path) + else + log("Unkown item type: %s (%s)"):format(name,info.type) + end + end + end + delDir(dir) + end + end + commands.del={ + code=function(name) + local recursive=name:sub(1,3)=="-s " + if recursive then name=name:sub(4)end - if name~=""then - local info=love.filesystem.getInfo(name) - if info then - if info.type=='file'then - if not recursive then - delFile(name) - else - log{C.R,("'%s' is not a directory."):format(name)} - end - elseif info.type=='directory'then - (recursive and recursiveDelDir or delDir)(name) - else - log("Unkown item type: %s (%s)"):format(name,info.type) - end - else - log{C.R,("No file called '%s'"):format(name)} - end - else - log{C.A,"Usage: del [filename|dirname]"} - log{C.A,"Usage: del -s [dirname]"} - end - end, - description="Delete a file or directory", - details={ - "Attempt to delete a file or directory (in saving directory)", - "", - "Aliases: del rm", - "", - "Usage: del [filename|dirname]", - "Usage: del -s [dirname]", - } - } - commands.rm=commands.del - end - commands.mv={ - code=function(arg) - --Check arguments - arg=STRING.split(arg," ") - if #arg>2 then - log{C.lY,"Warning: file name with space is not allowed"} - return - elseif #arg<2 then - log{C.A,"Usage: ren [oldfilename] [newfilename]"} - return - end + if name~=""then + local info=love.filesystem.getInfo(name) + if info then + if info.type=='file'then + if not recursive then + delFile(name) + else + log{C.R,("'%s' is not a directory."):format(name)} + end + elseif info.type=='directory'then + (recursive and recursiveDelDir or delDir)(name) + else + log("Unkown item type: %s (%s)"):format(name,info.type) + end + else + log{C.R,("No file called '%s'"):format(name)} + end + else + log{C.A,"Usage: del [filename|dirname]"} + log{C.A,"Usage: del -s [dirname]"} + end + end, + description="Delete a file or directory", + details={ + "Attempt to delete a file or directory (in saving directory)", + "", + "Aliases: del rm", + "", + "Usage: del [filename|dirname]", + "Usage: del -s [dirname]", + } + } + commands.rm=commands.del + end + commands.mv={ + code=function(arg) + --Check arguments + arg=STRING.split(arg," ") + if #arg>2 then + log{C.lY,"Warning: file name with space is not allowed"} + return + elseif #arg<2 then + log{C.A,"Usage: ren [oldfilename] [newfilename]"} + return + end - --Check file exist - local info - info=love.filesystem.getInfo(arg[1]) - if not(info and info.type=='file')then log{C.R,("'%s' is not a file!"):format(arg[1])}return end - info=love.filesystem.getInfo(arg[2]) - if info then log{C.R,("'%s' already exists!"):format(arg[2])}return end + --Check file exist + local info + info=love.filesystem.getInfo(arg[1]) + if not(info and info.type=='file')then log{C.R,("'%s' is not a file!"):format(arg[1])}return end + info=love.filesystem.getInfo(arg[2]) + if info then log{C.R,("'%s' already exists!"):format(arg[2])}return end - --Read file - local data,err1=love.filesystem.read('data',arg[1]) - if not data then log{C.R,("Failed to read file '%s': "):format(arg[1],err1 or"Unknown error")}return end + --Read file + local data,err1=love.filesystem.read('data',arg[1]) + if not data then log{C.R,("Failed to read file '%s': "):format(arg[1],err1 or"Unknown error")}return end - --Write file - local res,err2=love.filesystem.write(arg[2],data) - if not res then log{C.R,("Failed to write file: "):format(err2 or"Unknown error")}return end + --Write file + local res,err2=love.filesystem.write(arg[2],data) + if not res then log{C.R,("Failed to write file: "):format(err2 or"Unknown error")}return end - --Delete file - if not love.filesystem.remove(arg[1])then log{C.R,("Failed to delete old file ''"):format(arg[1])}return end + --Delete file + if not love.filesystem.remove(arg[1])then log{C.R,("Failed to delete old file ''"):format(arg[1])}return end - log{C.Y,("Succesfully renamed file '%s' to '%s'"):format(arg[1],arg[2])} - end, - description="Rename or move a file (in saving directory)", - details={ - "Rename or move a file (in saving directory)", - {C.lY,"Warning: file name with space is not allowed"}, - "", - "Aliases: mv ren", - "", - "Usage: mv [oldfilename] [newfilename]", - }, - }commands.ren="mv" - commands.print={ - code=function(name) - if name~=""then - local info=love.filesystem.getInfo(name) - if info then - if info.type=='file'then - log{COLOR.lC,"/* "..name.." */"} - for l in love.filesystem.lines(name)do - log(l) - end - log{COLOR.lC,"/* END */"} - else - log{C.R,("Unprintable item: %s (%s)"):format(name,info.type)} - end - else - log{C.R,("No file called '%s'"):format(name)} - end - else - log{C.A,"Usage: print [filename]"} - end - end, - description="Print file content", - details={ - "Print a file to this window.", - "", - "Usage: print [filename]", - }, - } + log{C.Y,("Succesfully renamed file '%s' to '%s'"):format(arg[1],arg[2])} + end, + description="Rename or move a file (in saving directory)", + details={ + "Rename or move a file (in saving directory)", + {C.lY,"Warning: file name with space is not allowed"}, + "", + "Aliases: mv ren", + "", + "Usage: mv [oldfilename] [newfilename]", + }, + }commands.ren="mv" + commands.print={ + code=function(name) + if name~=""then + local info=love.filesystem.getInfo(name) + if info then + if info.type=='file'then + log{COLOR.lC,"/* "..name.." */"} + for l in love.filesystem.lines(name)do + log(l) + end + log{COLOR.lC,"/* END */"} + else + log{C.R,("Unprintable item: %s (%s)"):format(name,info.type)} + end + else + log{C.R,("No file called '%s'"):format(name)} + end + else + log{C.A,"Usage: print [filename]"} + end + end, + description="Print file content", + details={ + "Print a file to this window.", + "", + "Usage: print [filename]", + }, + } - --System - commands.crash={ - code=function()error("ERROR")end, - description="Manually crash the game", - } - commands.mes={ - code=function(arg) - if - arg=='check'or - arg=='info'or - arg=='broadcast'or - arg=='warn'or - arg=='error' - then - MES.new(arg,"Test message",6) - else - log{C.A,"Show a message on the up-left corner"} - log"" - log{C.A,"Usage: mes "} - end - end, - description="Show a message", - details={ - "Show a message on the up-left corner", - "", - "Usage: mes ", - }, - } - commands.openurl={ - code=function(url) - if url~=""then - local res,err=pcall(love.system.openURL,url) - if not res then - log{C.R,"[ERR] ",C.Z,err} - end - else - log{C.A,"Usage: openurl [url]"} - end - end, - description="Open a URL", - details={ - "Attempt to open a URL with your device.", - "", - "Usage: openurl [url]", - }, - } - commands.scrinfo={ - code=function() - for _,v in next,SCR.info()do - log(v) - end - end, - description="Display window info.", - details={ - "Display information about the game window.", - "", - "Usage: scrinfo", - }, - } - commands.wireframe={ - code=function(bool) - if bool=="on"or bool=="off"then - gc.setWireframe(bool=="on") - log("Wireframe: "..(gc.isWireframe()and"on"or"off")) - else - log{C.A,"Usage: wireframe "} - end - end, - description="Turn on/off wireframe mode", - details={ - "Enable or disable wireframe drawing mode.", - "", - "Usage: wireframe ", - }, - } - commands.gammacorrect={ - code=function(bool) - if bool=="on"or bool=="off"then - love._setGammaCorrect(bool=="on") - log("GammaCorrect: "..(gc.isGammaCorrect()and"on"or"off")) - else - log{C.A,"Usage: gammacorrect "} - end - end, - description="Turn on/off gamma correction", - details={ - "Enable or disable gamma correction.", - "", - "Usage: gammacorrect ", - }, - } - commands.fn={ - code=function(n) - if tonumber(n)then - n=math.floor(tonumber(n)) - if n>=1 and n<=12 then - love.keypressed("f"..n) - end - else - log{C.A,"Usage: fn [1~12]"} - end - end, - description="Simulates a Function key press", - details={ - "Acts as if you have pressed a function key (i.e. F1-F12) on a keyboard.", - "Useful if you are on a mobile device without access to these keys.", - "", - "Usage: fn <1-12>", - }, - } - commands.playbgm={ - code=function(bgm) - if bgm~=""then - if bgm~=BGM.nowPlay then - if BGM.play(bgm)then - log("Now playing: "..bgm) - else - log("No BGM called "..bgm) - end - else - log("Already playing: "..bgm) - end - else - log{C.A,"Usage: playbgm [bgmName]"} - end - end, - description="Play a BGM", - details={ - "Play a BGM.", - "", - "Usage: playbgm [bgmName]" - }, - } - commands.stopbgm={ - code=function() - BGM.stop() - end, - description="Stop the BGM", - details={ - "Stop the BGM.", - "", - "Usage: stopbgm" - }, - } - commands.setbg={ - code=function(name) - if name~=""then - if name~=BG.cur then - if BG.set(name)then - log(("Background set to '%s'"):format(name)) - else - log(("No background called '%s'"):format(name)) - end - else - log(("Background already set to '%s'"):format(name)) - end - else - log{C.A,"Usage: setbg [bgName]"} - end - end, - description="Set background", - details={ - "Set a background.", - "", - "Usage: setbg [bgName]", - }, - } - commands.theme={ - code=function(name) - if name~=""then - if THEME.set(name)then - log("Theme set to: "..name) - else - log("No theme called "..name) - end - else - log{C.A,"Usage: theme [themeName]"} - end - end, - description="Load theme", - details={ - "Load a theme.", - "", - "Usage: theme ", - }, - } - commands.test={ - code=function() - SCN.go('test','none') - end, - description="Enter test scene", - details={ - "Go to an empty test scene", - "", - "Usage: test", - }, - } - do--app - local APPs={ - { - code="calc", - scene='app_calc', - description="A simple calculator" - }, - { - code="15p", - scene='app_15p', - description="15 Puzzle, a.k.a. sliding puzzle" - }, - { - code="grid", - scene='app_schulteG', - description="Schulte Grid" - }, - { - code="pong", - scene='app_pong', - description="Pong (2P)" - }, - { - code="atoz", - scene='app_AtoZ', - description="A to Z, a.k.a. typing" - }, - { - code="uttt", - scene='app_UTTT', - description="Ultimate Tic-Tac-Toe (2P)" - }, - { - code="cube", - scene='app_cubefield', - description="Cubefield, original by Max Abernethy" - }, - { - code="2048", - scene='app_2048', - description="2048 with some new features" - }, - { - code="ten", - scene='app_ten', - description="Just Get Ten" - }, - { - code="tap", - scene='app_tap', - description="Clicking/Tapping speed test" - }, - { - code="dtw", - scene='app_dtw', - description="Don't Touch White, a.k.a. Piano Tiles" - }, - { - code="can", - scene='app_cannon', - description="A simple cannon shooting game" - }, - { - code="drp", - scene='app_dropper', - description="Dropper" - }, - { - code="rfl", - scene='app_reflect', - description="Reflect (2P)" - }, - { - code="poly", - scene='app_polyforge', - description="Polyforge, original by ImpactBlue Studios" - }, - } - commands.app={ - code=function(name) - if name=="-list"then - for i=1,#APPs do - log(APPs[i].code..": "..APPs[i].description) - end - elseif name~=""then - for i=1,#APPs do - if APPs[i].code==name then - SCN.go(APPs[i].scene) - return - end - end - log{C.A,"No applet with this name. Type app -list to view all applets"} - else - log{C.A,"Usage:"} - log{C.A,"app -list"} - log{C.A,"app [appName]"} - end - end, - description="Enter a applet scene", - details={ - "Go to an applet scene", - "", - "Usage:", - "app -list", - "app [appName]", - }, - } - end - commands.resetall={ - code=function(arg) - if arg=="sure"then - log"Really?" - log"Type: resetall really" - elseif arg=="really"then - WIDGET.unFocus(true)inputBox.hide=true - BGM.stop() - commands.cls.code() - outputBox:clear() - outputBox.h=500 - local button=WIDGET.newButton{name="bye",x=640,y=615,w=426,h=100,code=function() - TASK.new(function() - WIDGET.active.bye.hide=true - for _=1,30 do coroutine.yield()end - log{C.R,"Bye in 5..."}SFX.play('ready')SFX.play('clear_2')for _=1,60 do coroutine.yield()end - log{C.R,"Bye in 4..."}SFX.play('ready')SFX.play('clear_2')for _=1,60 do coroutine.yield()end - log{C.R,"Bye in 3..."}SFX.play('ready')SFX.play('clear_2')for _=1,60 do coroutine.yield()end - log{C.R,"Bye in 2..."}SFX.play('ready')SFX.play('clear_3')for _=1,60 do coroutine.yield()end - log{C.R,"Bye in 1..."}SFX.play('ready')SFX.play('clear_3')for _=1,60 do coroutine.yield()end - log{C.R,"Bye in 0..."}SFX.play('start')SFX.play('clear_4')for _=1,60 do coroutine.yield()end - outputBox.hide=true for _=1,26 do coroutine.yield()end - FILE.clear_s('')love.event.quit() - end) - end} - button:setObject("Techmino is fun. Bye.") - ins(WIDGET.active,button) - else - log"Are you sure to reset all?" - log"Type: resetall sure" - end - end, - description="Reset all things.", - } - commands.sudo={ - code=function(code) - if sudomode then - log{C.Y,"You are already in the sudo mode, use # to run any lua code"} - log{C.Y,"已经进入最高权限模式了, 请使用 # 执行任意lua代码"} - elseif code=="7126"then - sudomode=true - log{C.Y,"* SUDO MODE ON, DO NOT RUN ANY CODE YOU DON'T UNDERSTAND *"} - log{C.Y,"* 最高权限模式开启, 请不要执行任何自己不懂确切含义的代码 *"} - else - log{C.Y,"Password not correct"} - end - end, - }commands.su="sudo" + --System + commands.crash={ + code=function()error("ERROR")end, + description="Manually crash the game", + } + commands.mes={ + code=function(arg) + if + arg=='check'or + arg=='info'or + arg=='broadcast'or + arg=='warn'or + arg=='error' + then + MES.new(arg,"Test message",6) + else + log{C.A,"Show a message on the up-left corner"} + log"" + log{C.A,"Usage: mes "} + end + end, + description="Show a message", + details={ + "Show a message on the up-left corner", + "", + "Usage: mes ", + }, + } + commands.openurl={ + code=function(url) + if url~=""then + local res,err=pcall(love.system.openURL,url) + if not res then + log{C.R,"[ERR] ",C.Z,err} + end + else + log{C.A,"Usage: openurl [url]"} + end + end, + description="Open a URL", + details={ + "Attempt to open a URL with your device.", + "", + "Usage: openurl [url]", + }, + } + commands.scrinfo={ + code=function() + for _,v in next,SCR.info()do + log(v) + end + end, + description="Display window info.", + details={ + "Display information about the game window.", + "", + "Usage: scrinfo", + }, + } + commands.wireframe={ + code=function(bool) + if bool=="on"or bool=="off"then + gc.setWireframe(bool=="on") + log("Wireframe: "..(gc.isWireframe()and"on"or"off")) + else + log{C.A,"Usage: wireframe "} + end + end, + description="Turn on/off wireframe mode", + details={ + "Enable or disable wireframe drawing mode.", + "", + "Usage: wireframe ", + }, + } + commands.gammacorrect={ + code=function(bool) + if bool=="on"or bool=="off"then + love._setGammaCorrect(bool=="on") + log("GammaCorrect: "..(gc.isGammaCorrect()and"on"or"off")) + else + log{C.A,"Usage: gammacorrect "} + end + end, + description="Turn on/off gamma correction", + details={ + "Enable or disable gamma correction.", + "", + "Usage: gammacorrect ", + }, + } + commands.fn={ + code=function(n) + if tonumber(n)then + n=math.floor(tonumber(n)) + if n>=1 and n<=12 then + love.keypressed("f"..n) + end + else + log{C.A,"Usage: fn [1~12]"} + end + end, + description="Simulates a Function key press", + details={ + "Acts as if you have pressed a function key (i.e. F1-F12) on a keyboard.", + "Useful if you are on a mobile device without access to these keys.", + "", + "Usage: fn <1-12>", + }, + } + commands.playbgm={ + code=function(bgm) + if bgm~=""then + if bgm~=BGM.nowPlay then + if BGM.play(bgm)then + log("Now playing: "..bgm) + else + log("No BGM called "..bgm) + end + else + log("Already playing: "..bgm) + end + else + log{C.A,"Usage: playbgm [bgmName]"} + end + end, + description="Play a BGM", + details={ + "Play a BGM.", + "", + "Usage: playbgm [bgmName]" + }, + } + commands.stopbgm={ + code=function() + BGM.stop() + end, + description="Stop the BGM", + details={ + "Stop the BGM.", + "", + "Usage: stopbgm" + }, + } + commands.setbg={ + code=function(name) + if name~=""then + if name~=BG.cur then + if BG.set(name)then + log(("Background set to '%s'"):format(name)) + else + log(("No background called '%s'"):format(name)) + end + else + log(("Background already set to '%s'"):format(name)) + end + else + log{C.A,"Usage: setbg [bgName]"} + end + end, + description="Set background", + details={ + "Set a background.", + "", + "Usage: setbg [bgName]", + }, + } + commands.theme={ + code=function(name) + if name~=""then + if THEME.set(name)then + log("Theme set to: "..name) + else + log("No theme called "..name) + end + else + log{C.A,"Usage: theme [themeName]"} + end + end, + description="Load theme", + details={ + "Load a theme.", + "", + "Usage: theme ", + }, + } + commands.test={ + code=function() + SCN.go('test','none') + end, + description="Enter test scene", + details={ + "Go to an empty test scene", + "", + "Usage: test", + }, + } + do--app + local APPs={ + { + code="calc", + scene='app_calc', + description="A simple calculator" + }, + { + code="15p", + scene='app_15p', + description="15 Puzzle, a.k.a. sliding puzzle" + }, + { + code="grid", + scene='app_schulteG', + description="Schulte Grid" + }, + { + code="pong", + scene='app_pong', + description="Pong (2P)" + }, + { + code="atoz", + scene='app_AtoZ', + description="A to Z, a.k.a. typing" + }, + { + code="uttt", + scene='app_UTTT', + description="Ultimate Tic-Tac-Toe (2P)" + }, + { + code="cube", + scene='app_cubefield', + description="Cubefield, original by Max Abernethy" + }, + { + code="2048", + scene='app_2048', + description="2048 with some new features" + }, + { + code="ten", + scene='app_ten', + description="Just Get Ten" + }, + { + code="tap", + scene='app_tap', + description="Clicking/Tapping speed test" + }, + { + code="dtw", + scene='app_dtw', + description="Don't Touch White, a.k.a. Piano Tiles" + }, + { + code="can", + scene='app_cannon', + description="A simple cannon shooting game" + }, + { + code="drp", + scene='app_dropper', + description="Dropper" + }, + { + code="rfl", + scene='app_reflect', + description="Reflect (2P)" + }, + { + code="poly", + scene='app_polyforge', + description="Polyforge, original by ImpactBlue Studios" + }, + } + commands.app={ + code=function(name) + if name=="-list"then + for i=1,#APPs do + log(APPs[i].code..": "..APPs[i].description) + end + elseif name~=""then + for i=1,#APPs do + if APPs[i].code==name then + SCN.go(APPs[i].scene) + return + end + end + log{C.A,"No applet with this name. Type app -list to view all applets"} + else + log{C.A,"Usage:"} + log{C.A,"app -list"} + log{C.A,"app [appName]"} + end + end, + description="Enter a applet scene", + details={ + "Go to an applet scene", + "", + "Usage:", + "app -list", + "app [appName]", + }, + } + end + commands.resetall={ + code=function(arg) + if arg=="sure"then + log"Really?" + log"Type: resetall really" + elseif arg=="really"then + WIDGET.unFocus(true)inputBox.hide=true + BGM.stop() + commands.cls.code() + outputBox:clear() + outputBox.h=500 + local button=WIDGET.newButton{name="bye",x=640,y=615,w=426,h=100,code=function() + TASK.new(function() + WIDGET.active.bye.hide=true + for _=1,30 do coroutine.yield()end + log{C.R,"Bye in 5..."}SFX.play('ready')SFX.play('clear_2')for _=1,60 do coroutine.yield()end + log{C.R,"Bye in 4..."}SFX.play('ready')SFX.play('clear_2')for _=1,60 do coroutine.yield()end + log{C.R,"Bye in 3..."}SFX.play('ready')SFX.play('clear_2')for _=1,60 do coroutine.yield()end + log{C.R,"Bye in 2..."}SFX.play('ready')SFX.play('clear_3')for _=1,60 do coroutine.yield()end + log{C.R,"Bye in 1..."}SFX.play('ready')SFX.play('clear_3')for _=1,60 do coroutine.yield()end + log{C.R,"Bye in 0..."}SFX.play('start')SFX.play('clear_4')for _=1,60 do coroutine.yield()end + outputBox.hide=true for _=1,26 do coroutine.yield()end + FILE.clear_s('')love.event.quit() + end) + end} + button:setObject("Techmino is fun. Bye.") + ins(WIDGET.active,button) + else + log"Are you sure to reset all?" + log"Type: resetall sure" + end + end, + description="Reset all things.", + } + commands.sudo={ + code=function(code) + if sudomode then + log{C.Y,"You are already in the sudo mode, use # to run any lua code"} + log{C.Y,"已经进入最高权限模式了, 请使用 # 执行任意lua代码"} + elseif code=="7126"then + sudomode=true + log{C.Y,"* SUDO MODE ON, DO NOT RUN ANY CODE YOU DON'T UNDERSTAND *"} + log{C.Y,"* 最高权限模式开启, 请不要执行任何自己不懂确切含义的代码 *"} + else + log{C.Y,"Password not correct"} + end + end, + }commands.su="sudo" - --Game - commands.rmconf={ - code=function(key) - if #key>0 then - if SETTING[key]~=nil then - SETTING[key]=nil - saveSettings() - log{C.Y,("Succesfully erased key '%s'"):format(key)} - else - log{C.R,"No key called "..key} - end - else - log{C.A,"Usage: rmconf [key]"} - end - end, - description="Erase a setting value", - details={ - "Erase a setting value", - "Useful if you have your setting corrupted", - "YOU MUST RESTART THE GAME AFTER USING THIS", - "", - "Usage: rmconf [key]", - }, - } - commands.unlockall={ - code=function(bool) - if bool=="sure"then - for name,M in next,MODES do - if type(name)=='string'and not RANKS[name]and M.x then - if M.x then RANKS[name]=0 end - end - end - saveProgress() - log{C.lC,"\85\78\76\79\67\75\65\76\76"} - SFX.play('clear_2') - else - log"Are you sure to unlock all modes?" - log"Type: unlockall sure" - end - end, - description="Unlock the whole map", - details={ - "Unlock all modes on the map.", - "", - "Usage: unlockall", - }, - } - commands.play={ - code=function(m) - if MODES[m]then - loadGame(m,true) - elseif m~=""then - log{C.R,"No mode called "..m} - else - log{C.A,"Usage: play [modeName]"} - end - end, - description="Load a game mode", - details={ - "Load a game mode, including those that are not on the map.", - "", - "Usage: play [mode_name]", - }, - } - commands.tas={ - code=function(bool) - if bool=="on"or bool=="off"then - SETTING.allowTAS=bool=="on" - saveSettings() - log("Allow TAS: "..bool) - if bool then - log("Hot keys: f1=play/pause f2=slowdown f3=speedup/nextframe") - end - else - log{C.A,"Usage: tas "} - end - end, - description="Allow you to use TAS tool", - details={ - "Allow you to use TAS tool, a TAS button will show up at the pause menu", - "", - "Usage: tas ", - }, - } + --Game + commands.rmconf={ + code=function(key) + if #key>0 then + if SETTING[key]~=nil then + SETTING[key]=nil + saveSettings() + log{C.Y,("Succesfully erased key '%s'"):format(key)} + else + log{C.R,"No key called "..key} + end + else + log{C.A,"Usage: rmconf [key]"} + end + end, + description="Erase a setting value", + details={ + "Erase a setting value", + "Useful if you have your setting corrupted", + "YOU MUST RESTART THE GAME AFTER USING THIS", + "", + "Usage: rmconf [key]", + }, + } + commands.unlockall={ + code=function(bool) + if bool=="sure"then + for name,M in next,MODES do + if type(name)=='string'and not RANKS[name]and M.x then + if M.x then RANKS[name]=0 end + end + end + saveProgress() + log{C.lC,"\85\78\76\79\67\75\65\76\76"} + SFX.play('clear_2') + else + log"Are you sure to unlock all modes?" + log"Type: unlockall sure" + end + end, + description="Unlock the whole map", + details={ + "Unlock all modes on the map.", + "", + "Usage: unlockall", + }, + } + commands.play={ + code=function(m) + if MODES[m]then + loadGame(m,true) + elseif m~=""then + log{C.R,"No mode called "..m} + else + log{C.A,"Usage: play [modeName]"} + end + end, + description="Load a game mode", + details={ + "Load a game mode, including those that are not on the map.", + "", + "Usage: play [mode_name]", + }, + } + commands.tas={ + code=function(bool) + if bool=="on"or bool=="off"then + SETTING.allowTAS=bool=="on" + saveSettings() + log("Allow TAS: "..bool) + if bool then + log("Hot keys: f1=play/pause f2=slowdown f3=speedup/nextframe") + end + else + log{C.A,"Usage: tas "} + end + end, + description="Allow you to use TAS tool", + details={ + "Allow you to use TAS tool, a TAS button will show up at the pause menu", + "", + "Usage: tas ", + }, + } - --Network - commands.switchhost={ - code=function(arg) - arg=STRING.split(arg," ") - if arg[1]and #arg<=3 then - WS.switchHost(unpack(arg)) - log{C.Y,"Host switched"} - else - log{C.A,"Usage:"} - log{C.A,"switchhost [host]"} - log{C.A,"switchhost [host] [port]"} - log{C.A,"switchhost [host] [port] [path]"} - log{C.A,"Example: switchhost 127.0.0.1 26000 /sock"} - end - end, - description="Switch to another host", - details={ - "Disconnect all connections and switch to another host", - "", - "Usage:", - "switchhost [host]", - "switchhost [host] [port]", - "switchhost [host] [port] [path]", - "Example: switchhost 127.0.0.1 26000 /sock", - }, - } - function commands.manage() - if WS.status('manage')=='running'then - WS.close('manage') - log{C.Y,"Disconnected"} - else - if({[1]=0,[2]=0,[26]=0})[USER.uid]then - NET.wsconn_manage() - log{C.Y,"Connecting"} - else - log{C.R,"Permission denied"} - end - end - end - function commands.m_broadcast(str) - if #str>0 then - WS.send('manage','{"action":0,"data":'..JSON.encode{message=str}..'}') - log{C.Y,"Request sent"} - else - log{C.R,"format error"} - end - end - function commands.m_shutdown(sec) - sec=tonumber(sec) - if sec and sec>0 and sec~=math.floor(sec) then - WS.send('manage','{"action":9,"data":'..JSON.encode{countdown=tonumber(sec)}..'}') - log{C.Y,"Request sent"} - else - log{C.R,"format error"} - end - end - function commands.m_connInfo()WS.send('manage','{"action":10}')end - function commands.m_playMgrInfo()WS.send('manage','{"action":11}')end - function commands.m_streamMgrInfo()WS.send('manage','{"action":12}')end + --Network + commands.switchhost={ + code=function(arg) + arg=STRING.split(arg," ") + if arg[1]and #arg<=3 then + WS.switchHost(unpack(arg)) + log{C.Y,"Host switched"} + else + log{C.A,"Usage:"} + log{C.A,"switchhost [host]"} + log{C.A,"switchhost [host] [port]"} + log{C.A,"switchhost [host] [port] [path]"} + log{C.A,"Example: switchhost 127.0.0.1 26000 /sock"} + end + end, + description="Switch to another host", + details={ + "Disconnect all connections and switch to another host", + "", + "Usage:", + "switchhost [host]", + "switchhost [host] [port]", + "switchhost [host] [port] [path]", + "Example: switchhost 127.0.0.1 26000 /sock", + }, + } + function commands.manage() + if WS.status('manage')=='running'then + WS.close('manage') + log{C.Y,"Disconnected"} + else + if({[1]=0,[2]=0,[26]=0})[USER.uid]then + NET.wsconn_manage() + log{C.Y,"Connecting"} + else + log{C.R,"Permission denied"} + end + end + end + function commands.m_broadcast(str) + if #str>0 then + WS.send('manage','{"action":0,"data":'..JSON.encode{message=str}..'}') + log{C.Y,"Request sent"} + else + log{C.R,"format error"} + end + end + function commands.m_shutdown(sec) + sec=tonumber(sec) + if sec and sec>0 and sec~=math.floor(sec) then + WS.send('manage','{"action":9,"data":'..JSON.encode{countdown=tonumber(sec)}..'}') + log{C.Y,"Request sent"} + else + log{C.R,"format error"} + end + end + function commands.m_connInfo()WS.send('manage','{"action":10}')end + function commands.m_playMgrInfo()WS.send('manage','{"action":11}')end + function commands.m_streamMgrInfo()WS.send('manage','{"action":12}')end - for cmd,body in next,commands do - if type(body)=='function'then - commands[cmd]={code=body} - end - if type(body)~='string'then - ins(cmdList,cmd) - end - end - table.sort(cmdList) - TABLE.reIndex(commands) + for cmd,body in next,commands do + if type(body)=='function'then + commands[cmd]={code=body} + end + if type(body)~='string'then + ins(cmdList,cmd) + end + end + table.sort(cmdList) + TABLE.reIndex(commands) end local combKey={ - x=function() - love.system.setClipboardText(inputBox:getText()) - inputBox:clear() - SFX.play('reach') - end, - c=function() - love.system.setClipboardText(inputBox:getText()) - SFX.play('reach') - end, - v=function() - inputBox:addText(love.system.getClipboardText()) - SFX.play('reach') - end, + x=function() + love.system.setClipboardText(inputBox:getText()) + inputBox:clear() + SFX.play('reach') + end, + c=function() + love.system.setClipboardText(inputBox:getText()) + SFX.play('reach') + end, + v=function() + inputBox:addText(love.system.getClipboardText()) + SFX.play('reach') + end, } --Environment for user's function local userG={ - timer=TIME, + timer=TIME, - _VERSION=VERSION.code, - assert=assert,error=error, - tonumber=tonumber,tostring=tostring, - select=select,next=next, - ipairs=ipairs,pairs=pairs, - type=type, - pcall=pcall,xpcall=xpcall, - rawget=rawget,rawset=rawset,rawlen=rawlen,rawequal=rawequal, - setfenv=setfenv,setmetatable=setmetatable, - -- require=require, - -- load=load,loadfile=loadfile,dofile=dofile, - -- getfenv=getfenv,getmetatable=getmetatable, - -- collectgarbage=collectgarbage, + _VERSION=VERSION.code, + assert=assert,error=error, + tonumber=tonumber,tostring=tostring, + select=select,next=next, + ipairs=ipairs,pairs=pairs, + type=type, + pcall=pcall,xpcall=xpcall, + rawget=rawget,rawset=rawset,rawlen=rawlen,rawequal=rawequal, + setfenv=setfenv,setmetatable=setmetatable, + -- require=require, + -- load=load,loadfile=loadfile,dofile=dofile, + -- getfenv=getfenv,getmetatable=getmetatable, + -- collectgarbage=collectgarbage, - math={},string={},table={},bit={},coroutine={}, - debug={"No way."},package={"No way."},io={"No way."},os={"No way."}, + math={},string={},table={},bit={},coroutine={}, + debug={"No way."},package={"No way."},io={"No way."},os={"No way."}, } function userG.print(...) - local args,L={...},{} - for k,v in next,args do ins(L,{k,v})end - table.sort(L,function(a,b)return a[1] "..input} - local code,err=loadstring(input:sub(2)) - if code then - if not sudomode then setfenv(code,userG)end - local success,result=pcall(code) - if success then - if result~=nil then - log{C.lG,">> "..tostring(result)} - else - log{C.lG,"done"} - end - else - log{C.R,result} - end - else - log{C.R,"[SyntaxErr] ",C.R,err} - end - else - --Execute builtin command - log{C.lS,"> "..input} - local p=input:find(" ") - local cmd,arg - if p then - cmd=input:sub(1,p-1):lower() - arg=input:sub(input:find("%S",p+1)or -1) - else - cmd=input - arg="" - end - if commands[cmd]then - commands[cmd].code(arg) - else - log{C.R,"No command called "..cmd} - end - end - inputBox:clear() + --Execute + if input:byte()==35 then + --Execute lua code + log{C.lC,"> "..input} + local code,err=loadstring(input:sub(2)) + if code then + if not sudomode then setfenv(code,userG)end + local success,result=pcall(code) + if success then + if result~=nil then + log{C.lG,">> "..tostring(result)} + else + log{C.lG,"done"} + end + else + log{C.R,result} + end + else + log{C.R,"[SyntaxErr] ",C.R,err} + end + else + --Execute builtin command + log{C.lS,"> "..input} + local p=input:find(" ") + local cmd,arg + if p then + cmd=input:sub(1,p-1):lower() + arg=input:sub(input:find("%S",p+1)or -1) + else + cmd=input + arg="" + end + if commands[cmd]then + commands[cmd].code(arg) + else + log{C.R,"No command called "..cmd} + end + end + inputBox:clear() - --Insert empty line - log"" - elseif key=="up"then - if not hisPtr then - hisPtr=#history - if hisPtr>0 then - inputBox:setText(history[hisPtr]) - end - elseif hisPtr>1 then - hisPtr=hisPtr-1 - inputBox:setText(history[hisPtr]) - end - elseif key=="down"then - if hisPtr then - hisPtr=hisPtr+1 - if history[hisPtr]then - inputBox:setText(history[hisPtr]) - else - hisPtr=nil - inputBox:clear() - end - end - elseif key=="tab"then - local str=inputBox:getText() - if str~=""and not str:find("%s")then - local res={} - for c in next,commands do - if c:find(str,nil,true)==1 then - ins(res,c) - end - end + --Insert empty line + log"" + elseif key=="up"then + if not hisPtr then + hisPtr=#history + if hisPtr>0 then + inputBox:setText(history[hisPtr]) + end + elseif hisPtr>1 then + hisPtr=hisPtr-1 + inputBox:setText(history[hisPtr]) + end + elseif key=="down"then + if hisPtr then + hisPtr=hisPtr+1 + if history[hisPtr]then + inputBox:setText(history[hisPtr]) + else + hisPtr=nil + inputBox:clear() + end + end + elseif key=="tab"then + local str=inputBox:getText() + if str~=""and not str:find("%s")then + local res={} + for c in next,commands do + if c:find(str,nil,true)==1 then + ins(res,c) + end + end - if #res>1 then - log(">Commands start with '"..str.."' :") - table.sort(res) - for i=1,#res do log{COLOR.lH,res[i]}end - elseif #res==1 then - inputBox:setText(res[1]) - end - end - elseif key=="scrollup"then outputBox:scroll(-5) - elseif key=="scrolldown"then outputBox:scroll(5) - elseif key=="pageup"then outputBox:scroll(-20) - elseif key=="pagedown"then outputBox:scroll(20) - elseif key=="home"then outputBox:scroll(-1e99) - elseif key=="end"then outputBox:scroll(1e99) - elseif combKey[key]and kb.isDown("lctrl","rctrl")then combKey[key]() - elseif key=="escape"then - if not WIDGET.isFocus(inputBox)then - WIDGET.focus(inputBox) - else - SCN.back() - end - else - if not WIDGET.isFocus(inputBox)then WIDGET.focus(inputBox)end - WIDGET.keyPressed(key) - end + if #res>1 then + log(">Commands start with '"..str.."' :") + table.sort(res) + for i=1,#res do log{COLOR.lH,res[i]}end + elseif #res==1 then + inputBox:setText(res[1]) + end + end + elseif key=="scrollup"then outputBox:scroll(-5) + elseif key=="scrolldown"then outputBox:scroll(5) + elseif key=="pageup"then outputBox:scroll(-20) + elseif key=="pagedown"then outputBox:scroll(20) + elseif key=="home"then outputBox:scroll(-1e99) + elseif key=="end"then outputBox:scroll(1e99) + elseif combKey[key]and kb.isDown("lctrl","rctrl")then combKey[key]() + elseif key=="escape"then + if not WIDGET.isFocus(inputBox)then + WIDGET.focus(inputBox) + else + SCN.back() + end + else + if not WIDGET.isFocus(inputBox)then WIDGET.focus(inputBox)end + WIDGET.keyPressed(key) + end end scene.widgetList={ - outputBox, - inputBox, + outputBox, + inputBox, } return scene \ No newline at end of file diff --git a/parts/scenes/app_cubefield.lua b/parts/scenes/app_cubefield.lua index cfe1b63f..68cc0ea7 100644 --- a/parts/scenes/app_cubefield.lua +++ b/parts/scenes/app_cubefield.lua @@ -7,17 +7,17 @@ local max,min=math.max,math.min local setFont=setFont local cubeColor={ - {.88,.75,.00}, - {.50,.50,.97}, - {.50,.50,.50}, - {.50,.97,.00}, - {.94,.94,.94}, - {.40,.40,.40}, - {.31,.88,.97}, - {.97,.97,.50}, - {.91,.50,.97}, - {.97,.63,.31}, - {0,0,0}, + {.88,.75,.00}, + {.50,.50,.97}, + {.50,.50,.50}, + {.50,.97,.00}, + {.94,.94,.94}, + {.40,.40,.40}, + {.31,.88,.97}, + {.97,.97,.50}, + {.91,.50,.97}, + {.97,.63,.31}, + {0,0,0}, } local cubesX,cubesY @@ -30,282 +30,282 @@ local score local sunH,color,rot local function near(o,t) - return o>t and max(o-.01,t)or ot and max(o-.01,t)or o640 then - moveDir=1 - return - end - end - else - for i=1,#L do - if tc.getPosition(L[i])<640 then - moveDir=-1 - return - end - end - end - moveDir=0 - else - scene.keyDown("space") - end + if play then + local L=tc.getTouches() + if x<640 then + for i=1,#L do + if tc.getPosition(L[i])>640 then + moveDir=1 + return + end + end + else + for i=1,#L do + if tc.getPosition(L[i])<640 then + moveDir=-1 + return + end + end + end + moveDir=0 + else + scene.keyDown("space") + end end function scene.keyDown(key,isRep) - if isRep then return end - if key=="escape"then - SCN.back() - elseif play then - if key=="left"or key=="a"then - moveDir=-1 - elseif key=="right"or key=="d"then - moveDir=1 - end - else - if key=="space"and ct==60 then - menu=-1 - speed=1 - level=1 - end - end + if isRep then return end + if key=="escape"then + SCN.back() + elseif play then + if key=="left"or key=="a"then + moveDir=-1 + elseif key=="right"or key=="d"then + moveDir=1 + end + else + if key=="space"and ct==60 then + menu=-1 + speed=1 + level=1 + end + end end function scene.keyUp(key) - if play then - if key=="left"or key=="a"then - moveDir=kb.isDown("right","d")and 1 or 0 - elseif key=="right"or key=="d"then - moveDir=kb.isDown("left","a")and -1 or 0 - end - end + if play then + if key=="left"or key=="a"then + moveDir=kb.isDown("right","d")and 1 or 0 + elseif key=="right"or key=="d"then + moveDir=kb.isDown("left","a")and -1 or 0 + end + end end function scene.update(dt) - dt=dt*600 + dt=dt*600 - --Update cubes' position - local cy=cubesY - local step=speed*dt*.005 - for i=1,40 do - cy[i]=cy[i]+step - if cy[i]>10 then - if score%1000<820 then - cubesX[i]=rnd()*16-8+player - else - cubesX[i]=player+i%2*6-3 - end - cy[i]=cy[i]-9 - lastCube=(lastCube-2)%40+1 - end - end + --Update cubes' position + local cy=cubesY + local step=speed*dt*.005 + for i=1,40 do + cy[i]=cy[i]+step + if cy[i]>10 then + if score%1000<820 then + cubesX[i]=rnd()*16-8+player + else + cubesX[i]=player+i%2*6-3 + end + cy[i]=cy[i]-9 + lastCube=(lastCube-2)%40+1 + end + end - --Collision detect - if play then - for j=1,40 do - local i=(j+lastCube-2)%40+1 - local Y=cubesY[i] - if Y<8.8 then - local size=100/(10-Y) - local x=(cubesX[i]-player)/(10-Y)*200-size*.5 - local y=5/(10-Y)*150-50 - if y>420 and y<480 and x<8 and x+size>-8 and inv==0 then - cubesX[i]=cubesX[i]-3 - hurt(650) - inv=40 - end - end - end - end + --Collision detect + if play then + for j=1,40 do + local i=(j+lastCube-2)%40+1 + local Y=cubesY[i] + if Y<8.8 then + local size=100/(10-Y) + local x=(cubesX[i]-player)/(10-Y)*200-size*.5 + local y=5/(10-Y)*150-50 + if y>420 and y<480 and x<8 and x+size>-8 and inv==0 then + cubesX[i]=cubesX[i]-3 + hurt(650) + inv=40 + end + end + end + end - --Screen rotation - if moveDir~=0 then - player=player+moveDir*dt*.003*speed^.8 - if abs(rot)<.16 or moveDir*rot>0 then - rot=rot-moveDir*dt*.0003*speed - end - elseif rot~=0 then - local d=dt*.0002*speed - if rot>0 then - rot=max(rot-d,0) - else - rot=min(rot+d,0) - end - end + --Screen rotation + if moveDir~=0 then + player=player+moveDir*dt*.003*speed^.8 + if abs(rot)<.16 or moveDir*rot>0 then + rot=rot-moveDir*dt*.0003*speed + end + elseif rot~=0 then + local d=dt*.0002*speed + if rot>0 then + rot=max(rot-d,0) + else + rot=min(rot+d,0) + end + end - life1=life1*.7+life*.3 + life1=life1*.7+life*.3 - if play then - if inv>0 then inv=inv-1 end - score=score+dt*.04+life*.0004 - life=min(life+dt*.04,1000) - if score>1000*level then - if speed<3 then speed=speed+.2 end - level=level+1 - SFX.play('blip_1') - end - sunH=sunH+.01 - elseif menu==1 then - ct=ct+1 - if ct==60 then menu=false end - elseif menu==-1 then - for i=1,3 do color[i]=near(color[i],cubeColor[1][i])end - for i=1,40 do cubesY[i]=cubesY[i]-(70-ct)*.003 end - if sunH>0 then sunH=max(sunH*.85-1,0)end - ct=ct-1 - if ct==0 then - score=0 - life=1000 - play,menu=true,false - inv=90 - end - end + if play then + if inv>0 then inv=inv-1 end + score=score+dt*.04+life*.0004 + life=min(life+dt*.04,1000) + if score>1000*level then + if speed<3 then speed=speed+.2 end + level=level+1 + SFX.play('blip_1') + end + sunH=sunH+.01 + elseif menu==1 then + ct=ct+1 + if ct==60 then menu=false end + elseif menu==-1 then + for i=1,3 do color[i]=near(color[i],cubeColor[1][i])end + for i=1,40 do cubesY[i]=cubesY[i]-(70-ct)*.003 end + if sunH>0 then sunH=max(sunH*.85-1,0)end + ct=ct-1 + if ct==0 then + score=0 + life=1000 + play,menu=true,false + inv=90 + end + end end function scene.draw() - --Health bar - if life1>0 then - gc.setColor(1,0,0) - gc.rectangle('fill',640-life1*.64,710,life1*1.28,10) - end + --Health bar + if life1>0 then + gc.setColor(1,0,0) + gc.rectangle('fill',640-life1*.64,710,life1*1.28,10) + end - --Draw player - if play and inv%8<4 then - gc.setColor(COLOR.Z) - gc.rectangle('fill',620,670,40,40) - end + --Draw player + if play and inv%8<4 then + gc.setColor(COLOR.Z) + gc.rectangle('fill',620,670,40,40) + end - --Set screen rotation - gc.push('transform') - gc.translate(640,690) - gc.rotate(rot) + --Set screen rotation + gc.push('transform') + gc.translate(640,690) + gc.rotate(rot) - --Draw sun - gc.setColor(.7,.5,.3) - gc.circle('fill',0,-380-sunH,60) + --Draw sun + gc.setColor(.7,.5,.3) + gc.circle('fill',0,-380-sunH,60) - --Draw sun-board - gc.setColor(.08,.08,.084) - gc.rectangle('fill',-60,-440,120,120) + --Draw sun-board + gc.setColor(.08,.08,.084) + gc.rectangle('fill',-60,-440,120,120) - --Draw direction - if play then - gc.setLineWidth(3) - gc.setColor(1,1,1,.1) - gc.polygon('fill',-15,30,0,-440,15,30) - end + --Draw direction + if play then + gc.setLineWidth(3) + gc.setColor(1,1,1,.1) + gc.polygon('fill',-15,30,0,-440,15,30) + end - --Draw Horizon/Direction - gc.setColor(COLOR.Z) - gc.line(-942,-440,942,-440) + --Draw Horizon/Direction + gc.setColor(COLOR.Z) + gc.line(-942,-440,942,-440) - --Draw cubes - for j=1,40 do - local i=(j+lastCube-2)%40+1 - local Y=cubesY[i] - if Y<8.8 then - local size=100/(10-Y) - local x=(cubesX[i]-player)/(10-Y)*200-size*.5 - local y=5/(10-Y)*150-50 - if Y>1 then - gc.setColor(color) - gc.rectangle('fill',x,y-485,size,size) - gc.setLineWidth(size*.05) - gc.setColor(COLOR.Z) - gc.rectangle('line',x,y-485,size,size) - end - end - end + --Draw cubes + for j=1,40 do + local i=(j+lastCube-2)%40+1 + local Y=cubesY[i] + if Y<8.8 then + local size=100/(10-Y) + local x=(cubesX[i]-player)/(10-Y)*200-size*.5 + local y=5/(10-Y)*150-50 + if Y>1 then + gc.setColor(color) + gc.rectangle('fill',x,y-485,size,size) + gc.setLineWidth(size*.05) + gc.setColor(COLOR.Z) + gc.rectangle('line',x,y-485,size,size) + end + end + end - --Draw menu - if play then - setFont(60) - mStr(int(score),-300,-640) - mStr(int(score),300,-640) - if score%1000>920 then - gc.setColor(1,1,1,abs(score%1000-970)*8) - setFont(70) - if level<11 then - mStr("++SPEED++",0,-650) - for i=1,3 do - color[i]=near(color[i],cubeColor[level+1][i]) - end - else - mStr("!!MAXSPEED!!",0,-650) - end - end - else - gc.setColor(COLOR.Z) - gc.rectangle('fill',-20,-20+ct,40,40) + --Draw menu + if play then + setFont(60) + mStr(int(score),-300,-640) + mStr(int(score),300,-640) + if score%1000>920 then + gc.setColor(1,1,1,abs(score%1000-970)*8) + setFont(70) + if level<11 then + mStr("++SPEED++",0,-650) + for i=1,3 do + color[i]=near(color[i],cubeColor[level+1][i]) + end + else + mStr("!!MAXSPEED!!",0,-650) + end + end + else + gc.setColor(COLOR.Z) + gc.rectangle('fill',-20,-20+ct,40,40) - gc.setColor(1,1,1,(1-ct/60)*.1) - gc.polygon('fill',-15,30,0,-440,15,30) + gc.setColor(1,1,1,(1-ct/60)*.1) + gc.polygon('fill',-15,30,0,-440,15,30) - gc.setColor(1,1,1,ct/60) + gc.setColor(1,1,1,ct/60) - setFont(90) - mStr("CubeField",0,-650) + setFont(90) + mStr("CubeField",0,-650) - setFont(20) - gc.print("Original game by Max Abernethy",40,-550) - gc.print("Original CX-CAS version by Loïc Pujet",40,-525) - gc.print("Ported / Rewritten / Balanced by MrZ",40,-500) + setFont(20) + gc.print("Original game by Max Abernethy",40,-550) + gc.print("Original CX-CAS version by Loïc Pujet",40,-525) + gc.print("Ported / Rewritten / Balanced by MrZ",40,-500) - setFont(45) - if score>0 then - mStr("Score : "..score,0,-350) - end + setFont(45) + if score>0 then + mStr("Score : "..score,0,-350) + end - mStr(MOBILE and"Touch to Start"or"Press space to Start",0,-160) - end - gc.pop() + mStr(MOBILE and"Touch to Start"or"Press space to Start",0,-160) + end + gc.pop() end scene.widgetList={ - WIDGET.newKey{name="back",x=1140,y=80,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newKey{name="back",x=1140,y=80,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/app_dropper.lua b/parts/scenes/app_dropper.lua index 90fe6dfe..e0fef167 100644 --- a/parts/scenes/app_dropper.lua +++ b/parts/scenes/app_dropper.lua @@ -19,221 +19,221 @@ local score,floor,camY local color1,color2={},{} local function restart() - move={x=0,y=260,l=500} - base={x=40,y=690,l=1200} - message="Welcome" - speed=10 - score=0 - floor=0 - camY=0 - for i=1,3 do - color1[i]=rnd() - color2[i]=rnd() - end + move={x=0,y=260,l=500} + base={x=40,y=690,l=1200} + message="Welcome" + speed=10 + score=0 + floor=0 + camY=0 + for i=1,3 do + color1[i]=rnd() + color2[i]=rnd() + end end function scene.sceneInit() - restart() - state='menu' - BGM.play('hang out') - BG.set('space') + restart() + state='menu' + BGM.play('hang out') + BG.set('space') end function scene.keyDown(key,isRep) - if isRep then return end - if key=="space"or key=="return"then - if state=='move'then - if floor>0 then - if move.xbase.x then - move.x=move.x-10 - end - end - SFX.play('swipe') - state='drop' - elseif state=='dead'then - move.x,move.y,move.l=1e99,0,0 - base.x,base.y,base.l=1e99,0,0 - state='scroll' - elseif state=='menu'then - restart() - state='move' - end - elseif key=="escape"then - SCN.back() - end + if isRep then return end + if key=="space"or key=="return"then + if state=='move'then + if floor>0 then + if move.xbase.x then + move.x=move.x-10 + end + end + SFX.play('swipe') + state='drop' + elseif state=='dead'then + move.x,move.y,move.l=1e99,0,0 + base.x,base.y,base.l=1e99,0,0 + state='scroll' + elseif state=='menu'then + restart() + state='move' + end + elseif key=="escape"then + SCN.back() + end end function scene.mouseDown(_,_,k) - if k==1 then - scene.keyDown("space") - end + if k==1 then + scene.keyDown("space") + end end function scene.touchDown() - scene.keyDown("space") + scene.keyDown("space") end function scene.update() - if state=='move'then - move.x=move.x+speed - if speed<0 and move.x<=0 or speed>0 and move.x+move.l>=1280 then - SFX.play('lock') - speed=-speed - end - elseif state=='drop'then - move.y=move.y+18 - if move.y>=660 then - if move.x>base.x+base.l or move.x+move.l0 and move.x==base.x then - SFX.play('ren_mega') - end - state='shorten' - end - end - elseif state=='shorten'then - if move.x>base.x+base.l or move.x+move.lbase.x+base.l then - move.l=move.l-5 - else - state='climb' - end - elseif state=='climb'then - if base.y<720 then - move.y=move.y+3 - base.y=base.y+3 - camY=camY+3 - else - if move.x==base.x and move.x+move.l==base.x+base.l and floor~=0 then - score=score+2 - message=perfect[rnd(1,3)] - else - score=score+1 - message=great[rnd(1,table.maxn(great))] - end - for i=1,3 do - color2[i]=color1[i] - color1[i]=rnd() - end - base.x=move.x - base.y=690 - base.l=move.l - floor=floor+1 - if rnd()<.5 then - move.x=-move.l - speed=10 - else - move.x=1280 - speed=-10 - end - move.y=rnd(max(260-floor*4,60),max(420-floor*5,100)) - state='move' - end - elseif state=='die'then - move.y=move.y+18 - if move.y>1000 then - highScore=max(score,highScore) - highFloor=max(floor,floor) - state='dead' - end - elseif state=='scroll'then - camY=camY-floor/4 - if camY<1000 then camY=camY-1 end - if camY<500 then camY=camY-1 end - if camY<0 then - restart() - state='move' - end - end + if state=='move'then + move.x=move.x+speed + if speed<0 and move.x<=0 or speed>0 and move.x+move.l>=1280 then + SFX.play('lock') + speed=-speed + end + elseif state=='drop'then + move.y=move.y+18 + if move.y>=660 then + if move.x>base.x+base.l or move.x+move.l0 and move.x==base.x then + SFX.play('ren_mega') + end + state='shorten' + end + end + elseif state=='shorten'then + if move.x>base.x+base.l or move.x+move.lbase.x+base.l then + move.l=move.l-5 + else + state='climb' + end + elseif state=='climb'then + if base.y<720 then + move.y=move.y+3 + base.y=base.y+3 + camY=camY+3 + else + if move.x==base.x and move.x+move.l==base.x+base.l and floor~=0 then + score=score+2 + message=perfect[rnd(1,3)] + else + score=score+1 + message=great[rnd(1,table.maxn(great))] + end + for i=1,3 do + color2[i]=color1[i] + color1[i]=rnd() + end + base.x=move.x + base.y=690 + base.l=move.l + floor=floor+1 + if rnd()<.5 then + move.x=-move.l + speed=10 + else + move.x=1280 + speed=-10 + end + move.y=rnd(max(260-floor*4,60),max(420-floor*5,100)) + state='move' + end + elseif state=='die'then + move.y=move.y+18 + if move.y>1000 then + highScore=max(score,highScore) + highFloor=max(floor,floor) + state='dead' + end + elseif state=='scroll'then + camY=camY-floor/4 + if camY<1000 then camY=camY-1 end + if camY<500 then camY=camY-1 end + if camY<0 then + restart() + state='move' + end + end end local backColor={ - {.71,1,.71}, - {.47,.86,1}, - {.63,.78,1}, - {.71,.71,.71}, - {.59,.55,.55}, - {.43,.43,.43,.9}, - {.34,.34,.34,.8}, - {.26,.26,.26,.7}, + {.71,1,.71}, + {.47,.86,1}, + {.63,.78,1}, + {.71,.71,.71}, + {.59,.55,.55}, + {.43,.43,.43,.9}, + {.34,.34,.34,.8}, + {.26,.26,.26,.7}, } backColor.__index=function(t,lv) - local a=backColor[#backColor][4]-.1 - t[lv]={.26,.26,.26,a} - return t[lv] + local a=backColor[#backColor][4]-.1 + t[lv]={.26,.26,.26,a} + return t[lv] end setmetatable(backColor,backColor) function scene.draw() - --Background - local lv,height=int(camY/700),camY%700 - gc.setColor(backColor[lv+1]or COLOR.D) - gc.rectangle('fill',0,720,1280,height-700) - gc.setColor(backColor[lv+2]or COLOR.D) - gc.rectangle('fill',0,height+20,1280,-height-20) - if height-680>0 then - gc.setColor(backColor[lv+3]or COLOR.D) - gc.rectangle('fill',0,height-680,1280,680-height) - end + --Background + local lv,height=int(camY/700),camY%700 + gc.setColor(backColor[lv+1]or COLOR.D) + gc.rectangle('fill',0,720,1280,height-700) + gc.setColor(backColor[lv+2]or COLOR.D) + gc.rectangle('fill',0,height+20,1280,-height-20) + if height-680>0 then + gc.setColor(backColor[lv+3]or COLOR.D) + gc.rectangle('fill',0,height-680,1280,680-height) + end - if state=='menu'or state=='dead'then - setFont(100) - gc.setColor(COLOR.rainbow_light(TIME()*2.6)) - mStr("DROPPER",640,120) + if state=='menu'or state=='dead'then + setFont(100) + gc.setColor(COLOR.rainbow_light(TIME()*2.6)) + mStr("DROPPER",640,120) - gc.setColor(COLOR.rainbow_gray(TIME()*1.626)) - setFont(55) - mStr("Score - "..score,640,290) - mStr("High Score - "..highScore,640,370) - mStr("High Floor - "..highFloor,640,450) + gc.setColor(COLOR.rainbow_gray(TIME()*1.626)) + setFont(55) + mStr("Score - "..score,640,290) + mStr("High Score - "..highScore,640,370) + mStr("High Floor - "..highFloor,640,450) - gc.setColor(COLOR.D) - setFont(35) - mStr(MOBILE and"Touch to Start"or"Press space to Start",640,570) - setFont(20) - gc.print("Original CX-CAS version by MrZ",740,235) - gc.print("Ported / Rewritten / Balanced by MrZ",740,260) - end - if state~='menu'then - --High floor - gc.setColor(COLOR.Z) - gc.setLineWidth(2) - local y=690+camY-30*highFloor - gc.line(0,y,1280,y) + gc.setColor(COLOR.D) + setFont(35) + mStr(MOBILE and"Touch to Start"or"Press space to Start",640,570) + setFont(20) + gc.print("Original CX-CAS version by MrZ",740,235) + gc.print("Ported / Rewritten / Balanced by MrZ",740,260) + end + if state~='menu'then + --High floor + gc.setColor(COLOR.Z) + gc.setLineWidth(2) + local y=690+camY-30*highFloor + gc.line(0,y,1280,y) - gc.setLineWidth(6) - gc.rectangle('line',move.x-3,move.y-3,move.l+6,36) - gc.rectangle('line',base.x-3,base.y-3,base.l+6,36) + gc.setLineWidth(6) + gc.rectangle('line',move.x-3,move.y-3,move.l+6,36) + gc.rectangle('line',base.x-3,base.y-3,base.l+6,36) - setFont(45) - gc.print(floor+1,move.x+move.l+15,move.y-18) - gc.print(floor,base.x+base.l+15,base.y-18) + setFont(45) + gc.print(floor+1,move.x+move.l+15,move.y-18) + gc.print(floor,base.x+base.l+15,base.y-18) - gc.setColor(COLOR.Z) - mStr(message,640,0) - gc.setColor(COLOR.D) - mStr(message,643,2) + gc.setColor(COLOR.Z) + mStr(message,640,0) + gc.setColor(COLOR.D) + mStr(message,643,2) - setFont(70) - gc.setColor(COLOR.Z) - gc.print(score,60,40) - gc.setColor(COLOR.D) - gc.print(score,64,43) + setFont(70) + gc.setColor(COLOR.Z) + gc.print(score,60,40) + gc.setColor(COLOR.D) + gc.print(score,64,43) - gc.setColor(color1)gc.rectangle('fill',move.x,move.y,move.l,30) - gc.setColor(color2)gc.rectangle('fill',base.x,base.y,base.l,30) - end + gc.setColor(color1)gc.rectangle('fill',move.x,move.y,move.l,30) + gc.setColor(color2)gc.rectangle('fill',base.x,base.y,base.l,30) + end end scene.widgetList={ - WIDGET.newButton{name="back",x=1140,y=60,w=170,h=80,fText=TEXTURE.back,code=pressKey"escape"}, + WIDGET.newButton{name="back",x=1140,y=60,w=170,h=80,fText=TEXTURE.back,code=pressKey"escape"}, } return scene \ No newline at end of file diff --git a/parts/scenes/app_dtw.lua b/parts/scenes/app_dtw.lua index 699d109b..53fed52e 100644 --- a/parts/scenes/app_dtw.lua +++ b/parts/scenes/app_dtw.lua @@ -4,13 +4,13 @@ local int,rnd=math.floor,math.random local ins,rem=table.insert,table.remove local targets={ - [40]=true, - [100]=true, - [200]=true, - [400]=true, - [620]=true, - [1000]=true, - [2600]=true, + [40]=true, + [100]=true, + [200]=true, + [400]=true, + [620]=true, + [1000]=true, + [2600]=true, } local state,progress @@ -23,33 +23,33 @@ local bgm="secret7th" local tileColor="black" local mode="Normal" local modeSelector=WIDGET.newSelector{name="mode",x=155,y=220,w=280, - list={ - "Normal", - "Split", - "Short", - "Stairs", - "Double", - "Singlestream", - "Light_Jumpstream", - "Dense_Jumpstream", - "Light_Handstream", - "Dense_Handstream", - "Light_Quadstream", - "Quadstream", - },disp=function()return mode end,code=function(m)mode=m end + list={ + "Normal", + "Split", + "Short", + "Stairs", + "Double", + "Singlestream", + "Light_Jumpstream", + "Dense_Jumpstream", + "Light_Handstream", + "Dense_Handstream", + "Light_Quadstream", + "Quadstream", + },disp=function()return mode end,code=function(m)mode=m end } local bgmSelector=WIDGET.newSelector{name="bgm",x=155,y=290,w=280,list=BGM.getList(),disp=function()return bgm end,code=function(i)bgm=i BGM.play(i)end} local colorSelector=WIDGET.newSelector{name="color",x=155,y=360,w=280, - list={"black","dGray","gray","lGray","dRed","red","lRed","dFire","fire","lFire","dOrange","orange","lOrange","dYellow","yellow","lYellow","dLime","lime","lLime","dJade","jade","lJade","dGreen","green","lGreen","dAqua","aqua","lAqua","dCyan","cyan","lCyan","dNavy","navy","lNavy","dSea","sea","lSea","dBlue","blue","lBlue","dViolet","violet","lViolet","dPurple","purple","lPurple","dMagenta","magenta","lMagenta","dWine","wine","lWine"}, - disp=function()return tileColor end,code=function(m)tileColor=m end + list={"black","dGray","gray","lGray","dRed","red","lRed","dFire","fire","lFire","dOrange","orange","lOrange","dYellow","yellow","lYellow","dLime","lime","lLime","dJade","jade","lJade","dGreen","green","lGreen","dAqua","aqua","lAqua","dCyan","cyan","lCyan","dNavy","navy","lNavy","dSea","sea","lSea","dBlue","blue","lBlue","dViolet","violet","lViolet","dPurple","purple","lPurple","dMagenta","magenta","lMagenta","dWine","wine","lWine"}, + disp=function()return tileColor end,code=function(m)tileColor=m end } -local arcadeSwitch=WIDGET.newSwitch{name="arcade", x=230,y=430,font=40,disp=function()return arcade end,code=pressKey"e"} +local arcadeSwitch=WIDGET.newSwitch{name="arcade", x=230,y=430,font=40,disp=function()return arcade end,code=pressKey"e"} local function freshSelectors() - local f=state~=0 - modeSelector.hide=f - bgmSelector.hide=f - colorSelector.hide=f - arcadeSwitch.hide=f + local f=state~=0 + modeSelector.hide=f + bgmSelector.hide=f + colorSelector.hide=f + arcadeSwitch.hide=f end local score @@ -57,323 +57,323 @@ local pos,height local diePos local function get1(prev) - if prev<10 or prev>999 then - local r=rnd(3) - return r>=prev and r+1 or r - else - while true do - local r=rnd(4) - if not string.find(prev,r)then return r end - end - end + if prev<10 or prev>999 then + local r=rnd(3) + return r>=prev and r+1 or r + else + while true do + local r=rnd(4) + if not string.find(prev,r)then return r end + end + end end local function get2(prev) - while true do - local i=rnd(4) - local r=rnd(3) - if r>=i then r=r+1 end - if not(string.find(prev,r)or string.find(prev,i))then - return 10*i+r - end - end + while true do + local i=rnd(4) + local r=rnd(3) + if r>=i then r=r+1 end + if not(string.find(prev,r)or string.find(prev,i))then + return 10*i+r + end + end end local function get3(prev) - if prev==0 then prev=rnd(4)end - if prev==1 then return 234 - elseif prev==2 then return 134 - elseif prev==3 then return 124 - elseif prev==4 then return 123 - else error("wrong get3 usage: "..(prev or -1)) - end + if prev==0 then prev=rnd(4)end + if prev==1 then return 234 + elseif prev==2 then return 134 + elseif prev==3 then return 124 + elseif prev==4 then return 123 + else error("wrong get3 usage: "..(prev or -1)) + end end local generator={ - Normal=function() - ins(pos,rnd(4)) - end, - Split=function() - if #pos==0 then ins(pos,rnd(4))end - ins(pos,pos[#pos]<=2 and rnd(3,4)or rnd(2)) - end, - Short=function() - if #pos<2 then ins(pos,rnd(4))ins(pos,rnd(4))end - local r - if pos[#pos]==pos[#pos-1]then - r=rnd(3) - if r>=pos[#pos]then r=r+1 end - ins(pos,r) - else - ins(pos,rnd(4)) - end - end, - Stairs=function() - local r=get1(pos[#pos]or 0) - local dir=r==1 and 1 or r==4 and -1 or rnd()<.5 and 1 or -1 - local count=rnd(3,5) - while count>0 do - ins(pos,r) - r=r+dir - if r==0 then - r,dir=2,1 - elseif r==5 then - r,dir=3,-1 - end - count=count-1 - end - end, - Double=function() - local i=rnd(4) - local r=rnd(3) - if r>=i then r=r+1 end - r=10*i+r - ins(pos,r) - end, - Singlestream=function() - ins(pos,get1(pos[#pos]or 0)) - end, - Light_Jumpstream=function()--2111 - ins(pos,get2(pos[#pos]or 0)) - ins(pos,get1(pos[#pos])) - ins(pos,get1(pos[#pos])) - ins(pos,get1(pos[#pos])) - end, - Dense_Jumpstream=function()--2121 - ins(pos,get2(pos[#pos]or 0)) - ins(pos,get1(pos[#pos])) - ins(pos,get2(pos[#pos])) - ins(pos,get1(pos[#pos])) - end, - Light_Handstream=function()--3111 - ins(pos,get3(pos[#pos]or 0)) - ins(pos,get1(pos[#pos])) - ins(pos,get1(pos[#pos])) - ins(pos,get1(pos[#pos])) - end, - Dense_Handstream=function()--3121 - ins(pos,get3(pos[#pos]or 0)) - ins(pos,get1(pos[#pos])) - ins(pos,get2(pos[#pos])) - ins(pos,get1(pos[#pos])) - end, - Light_Quadstream=function()--4111 - ins(pos,1234) - ins(pos,get1(pos[#pos-1]or 0)) - ins(pos,get1(pos[#pos])) - ins(pos,get1(pos[#pos])) - end, - Quadstream=function()--4121 - ins(pos,1234) - ins(pos,get1(pos[#pos-1]or 0)) - ins(pos,get2(pos[#pos])) - ins(pos,get1(pos[#pos])) - end, + Normal=function() + ins(pos,rnd(4)) + end, + Split=function() + if #pos==0 then ins(pos,rnd(4))end + ins(pos,pos[#pos]<=2 and rnd(3,4)or rnd(2)) + end, + Short=function() + if #pos<2 then ins(pos,rnd(4))ins(pos,rnd(4))end + local r + if pos[#pos]==pos[#pos-1]then + r=rnd(3) + if r>=pos[#pos]then r=r+1 end + ins(pos,r) + else + ins(pos,rnd(4)) + end + end, + Stairs=function() + local r=get1(pos[#pos]or 0) + local dir=r==1 and 1 or r==4 and -1 or rnd()<.5 and 1 or -1 + local count=rnd(3,5) + while count>0 do + ins(pos,r) + r=r+dir + if r==0 then + r,dir=2,1 + elseif r==5 then + r,dir=3,-1 + end + count=count-1 + end + end, + Double=function() + local i=rnd(4) + local r=rnd(3) + if r>=i then r=r+1 end + r=10*i+r + ins(pos,r) + end, + Singlestream=function() + ins(pos,get1(pos[#pos]or 0)) + end, + Light_Jumpstream=function()--2111 + ins(pos,get2(pos[#pos]or 0)) + ins(pos,get1(pos[#pos])) + ins(pos,get1(pos[#pos])) + ins(pos,get1(pos[#pos])) + end, + Dense_Jumpstream=function()--2121 + ins(pos,get2(pos[#pos]or 0)) + ins(pos,get1(pos[#pos])) + ins(pos,get2(pos[#pos])) + ins(pos,get1(pos[#pos])) + end, + Light_Handstream=function()--3111 + ins(pos,get3(pos[#pos]or 0)) + ins(pos,get1(pos[#pos])) + ins(pos,get1(pos[#pos])) + ins(pos,get1(pos[#pos])) + end, + Dense_Handstream=function()--3121 + ins(pos,get3(pos[#pos]or 0)) + ins(pos,get1(pos[#pos])) + ins(pos,get2(pos[#pos])) + ins(pos,get1(pos[#pos])) + end, + Light_Quadstream=function()--4111 + ins(pos,1234) + ins(pos,get1(pos[#pos-1]or 0)) + ins(pos,get1(pos[#pos])) + ins(pos,get1(pos[#pos])) + end, + Quadstream=function()--4121 + ins(pos,1234) + ins(pos,get1(pos[#pos-1]or 0)) + ins(pos,get2(pos[#pos])) + ins(pos,get1(pos[#pos])) + end, } local function reset() - keyTime={}for i=1,40 do keyTime[i]=-1e99 end - speed,maxSpeed=0,0 - progress={} - state=0 - freshSelectors() - time=0 - score=0 - rollSpeed=6.26 + keyTime={}for i=1,40 do keyTime[i]=-1e99 end + speed,maxSpeed=0,0 + progress={} + state=0 + freshSelectors() + time=0 + score=0 + rollSpeed=6.26 - pos={} - while #pos<7 do generator[mode]()end - height=0 - diePos=false + pos={} + while #pos<7 do generator[mode]()end + height=0 + diePos=false end local scene={} function scene.sceneInit() - reset() - BG.set('gray') - BGM.play(bgm) + reset() + BG.set('gray') + BGM.play(bgm) end local function touch(n) - if state==0 then - state=1 - freshSelectors() - startTime=TIME() - end - local t=tostring(pos[1]) - local p=string.find(t,n) - if p then - t=t:sub(1,p-1)..t:sub(p+1) - if #t>0 then - pos[1]=tonumber(t) - SFX.play('move') - else - rem(pos,1) - while #pos<7 do generator[mode]()end - ins(keyTime,1,TIME()) - keyTime[21]=nil - score=score+1 - if not arcade and targets[score]then - ins(progress,("%s - %.3fs"):format(score,TIME()-startTime)) - if score==2600 then - for i=1,#pos do - pos[i]=626 - end - time=TIME()-startTime - state=2 - SFX.play('win') - else - SFX.play('reach',.5) - end - end - height=height+120 - SFX.play('move') - end - else - time=TIME()-startTime - state=2 - diePos=n - SFX.play('clear_2') - end + if state==0 then + state=1 + freshSelectors() + startTime=TIME() + end + local t=tostring(pos[1]) + local p=string.find(t,n) + if p then + t=t:sub(1,p-1)..t:sub(p+1) + if #t>0 then + pos[1]=tonumber(t) + SFX.play('move') + else + rem(pos,1) + while #pos<7 do generator[mode]()end + ins(keyTime,1,TIME()) + keyTime[21]=nil + score=score+1 + if not arcade and targets[score]then + ins(progress,("%s - %.3fs"):format(score,TIME()-startTime)) + if score==2600 then + for i=1,#pos do + pos[i]=626 + end + time=TIME()-startTime + state=2 + SFX.play('win') + else + SFX.play('reach',.5) + end + end + height=height+120 + SFX.play('move') + end + else + time=TIME()-startTime + state=2 + diePos=n + SFX.play('clear_2') + end end function scene.keyDown(key,isRep) - if isRep then return end - if key=="r"or key=="space"then reset() - elseif key=="escape"then SCN.back() - elseif state~=2 then - if key=="d"or key=="c"then touch(1) - elseif key=="f"or key=="v"then touch(2) - elseif key=="j"or key=="n"then touch(3) - elseif key=="k"or key=="m"then touch(4) - elseif state==0 then - if key=="tab"then - local mode1=mode - modeSelector:scroll(love.keyboard.isDown("lshift","rshift")and -1 or 1) - if mode1~=mode then reset()end - elseif key=="q"then - bgmSelector:scroll(love.keyboard.isDown("lshift","rshift")and -1 or 1) - elseif key=="w"then - colorSelector:scroll(love.keyboard.isDown("lshift","rshift")and -1 or 1) - elseif key=="e"then - arcade=not arcade - end - end - end + if isRep then return end + if key=="r"or key=="space"then reset() + elseif key=="escape"then SCN.back() + elseif state~=2 then + if key=="d"or key=="c"then touch(1) + elseif key=="f"or key=="v"then touch(2) + elseif key=="j"or key=="n"then touch(3) + elseif key=="k"or key=="m"then touch(4) + elseif state==0 then + if key=="tab"then + local mode1=mode + modeSelector:scroll(love.keyboard.isDown("lshift","rshift")and -1 or 1) + if mode1~=mode then reset()end + elseif key=="q"then + bgmSelector:scroll(love.keyboard.isDown("lshift","rshift")and -1 or 1) + elseif key=="w"then + colorSelector:scroll(love.keyboard.isDown("lshift","rshift")and -1 or 1) + elseif key=="e"then + arcade=not arcade + end + end + end end function scene.mouseDown(x) - scene.touchDown(x) + scene.touchDown(x) end function scene.touchDown(x) - if state==2 then return end - x=int((x-300)/170+1) - if x>=1 and x<=4 then - touch(x) - end + if state==2 then return end + x=int((x-300)/170+1) + if x>=1 and x<=4 then + touch(x) + end end function scene.update() - if state==1 then - local t=TIME() - time=t-startTime - local v=0 - for i=2,20 do v=v+i*(i-1)*.3/(t-keyTime[i])end - speed=speed*.99+v*.01 - if speed>maxSpeed then maxSpeed=speed end + if state==1 then + local t=TIME() + time=t-startTime + local v=0 + for i=2,20 do v=v+i*(i-1)*.3/(t-keyTime[i])end + speed=speed*.99+v*.01 + if speed>maxSpeed then maxSpeed=speed end - if arcade then - height=height-rollSpeed - rollSpeed=rollSpeed+.00355 - if height<-120 then - state=2 - SFX.play('clear_2') - end - else - height=height*.6 - end - end + if arcade then + height=height-rollSpeed + rollSpeed=rollSpeed+.00355 + if height<-120 then + state=2 + SFX.play('clear_2') + end + else + height=height*.6 + end + end end local function boardStencil()gc.rectangle('fill',300,0,680,720)end function scene.draw() - setFont(50) - if arcade then - --Draw rolling speed - mStr(("%.2f/s"):format(rollSpeed/2),155,490) - else - --Draw speed - setFont(45) - gc.setColor(1,.6,.6) - mStr(("%.2f"):format(maxSpeed/60),155,460) - gc.setColor(COLOR.Z) - mStr(("%.2f"):format(speed/60),155,520) + setFont(50) + if arcade then + --Draw rolling speed + mStr(("%.2f/s"):format(rollSpeed/2),155,490) + else + --Draw speed + setFont(45) + gc.setColor(1,.6,.6) + mStr(("%.2f"):format(maxSpeed/60),155,460) + gc.setColor(COLOR.Z) + mStr(("%.2f"):format(speed/60),155,520) - --Progress time list - setFont(30) - gc.setColor(.6,.6,.6) - for i=1,#progress do - gc.print(progress[i],1030,120+25*i) - end + --Progress time list + setFont(30) + gc.setColor(.6,.6,.6) + for i=1,#progress do + gc.print(progress[i],1030,120+25*i) + end - --Draw time - gc.setColor(COLOR.Z) - setFont(45) - gc.print(("%.3f"):format(time),1030,70) - end + --Draw time + gc.setColor(COLOR.Z) + setFont(45) + gc.print(("%.3f"):format(time),1030,70) + end - --Draw mode - if state~=0 then - gc.setColor(COLOR.Z) - setFont(30)mStr(mode,155,212) - end + --Draw mode + if state~=0 then + gc.setColor(COLOR.Z) + setFont(30)mStr(mode,155,212) + end - --Draw tiles - gc.stencil(boardStencil) - gc.setStencilTest('equal',1) - gc.rectangle('fill',300,0,680,720) - gc.setColor(COLOR[tileColor]) - gc.push('transform') - gc.translate(0,720-height+8) - for i=1,7 do - local t=pos[i] - while t>0 do - gc.rectangle('fill',130+170*(t%10)+8,-i*120,170-16,120-16) - t=(t-t%10)/10 - end - end - gc.pop() - gc.setStencilTest() - --Draw track line - gc.setColor(COLOR.D) - gc.setLineWidth(2) - for x=1,5 do - x=130+170*x - gc.line(x,0,x,720) - end - for y=0,6 do - y=720-120*y-height%120 - gc.line(300,y,980,y) - end + --Draw tiles + gc.stencil(boardStencil) + gc.setStencilTest('equal',1) + gc.rectangle('fill',300,0,680,720) + gc.setColor(COLOR[tileColor]) + gc.push('transform') + gc.translate(0,720-height+8) + for i=1,7 do + local t=pos[i] + while t>0 do + gc.rectangle('fill',130+170*(t%10)+8,-i*120,170-16,120-16) + t=(t-t%10)/10 + end + end + gc.pop() + gc.setStencilTest() + --Draw track line + gc.setColor(COLOR.D) + gc.setLineWidth(2) + for x=1,5 do + x=130+170*x + gc.line(x,0,x,720) + end + for y=0,6 do + y=720-120*y-height%120 + gc.line(300,y,980,y) + end - --Draw red tile - if diePos then - gc.setColor(1,.2,.2) - gc.rectangle('fill',130+170*diePos+8,600-height+8,170-16,120-16) - end + --Draw red tile + if diePos then + gc.setColor(1,.2,.2) + gc.rectangle('fill',130+170*diePos+8,600-height+8,170-16,120-16) + end - --Draw score - setFont(100) - gc.push('transform') - gc.translate(640,26) - gc.scale(1.6) - gc.setColor(.5,.5,.5,.6) - mStr(score,0,0) - gc.pop() + --Draw score + setFont(100) + gc.push('transform') + gc.translate(640,26) + gc.scale(1.6) + gc.setColor(.5,.5,.5,.6) + mStr(score,0,0) + gc.pop() end scene.widgetList={ - WIDGET.newButton{name="reset", x=155,y=100,w=180,h=100,color='lG',font=40,code=pressKey"r"}, - modeSelector,bgmSelector,colorSelector, - arcadeSwitch, - WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newButton{name="reset",x=155,y=100,w=180,h=100,color='lG',font=40,code=pressKey"r"}, + modeSelector,bgmSelector,colorSelector, + arcadeSwitch, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/app_polyforge.lua b/parts/scenes/app_polyforge.lua index d27663c4..93d714f4 100644 --- a/parts/scenes/app_polyforge.lua +++ b/parts/scenes/app_polyforge.lua @@ -10,158 +10,158 @@ local side,count local needReset local function new() - if needReset then - side=math.max(side-2,6) - needReset=false - else - side=side+1 - end - count=0 - for c=1,side do - hit[c]=0 - dist[c]=rnd(80,270)+637.5 - end + if needReset then + side=math.max(side-2,6) + needReset=false + else + side=side+1 + end + count=0 + for c=1,side do + hit[c]=0 + dist[c]=rnd(80,270)+637.5 + end end local scene={} function scene.sceneInit() - state=0 - ang,pos=0,-tau/4 - timer=50 - hit,dist={},{} - side=rnd(3,6)*2 - needReset=true - for c=1,side,2 do - hit[c],hit[c+1]=rnd(2),rnd(2) - dist[c],dist[c+1]=226,126 - end - BG.set('none') - BGM.play('dream') + state=0 + ang,pos=0,-tau/4 + timer=50 + hit,dist={},{} + side=rnd(3,6)*2 + needReset=true + for c=1,side,2 do + hit[c],hit[c+1]=rnd(2),rnd(2) + dist[c],dist[c+1]=226,126 + end + BG.set('none') + BGM.play('dream') end function scene.keyDown(key,isRep) - if isRep then return end - if key=="escape"then - SCN.back() - elseif key=="space"then - if state==0 then--main - if timer==0 then - state=1 - end - elseif state==3 then--play - local c=(math.floor((pos-ang)*side/tau)-1)%side+1 - if hit[c]==0 then - hit[c]=1 - count=count+1 - SFX.play(side<26 and'ren_'..rnd(5)or'ren_'..rnd(6,11)) - if count>=12 then - SFX.play('ren_mega',(count-11)/15) - end - if count==side then - state=1 - SFX.play('spin_0') - else - SFX.play('lock') - end - else - hit[c]=2 - SFX.play('emit') - needReset=true - state=1 - end - end - end + if isRep then return end + if key=="escape"then + SCN.back() + elseif key=="space"then + if state==0 then--main + if timer==0 then + state=1 + end + elseif state==3 then--play + local c=(math.floor((pos-ang)*side/tau)-1)%side+1 + if hit[c]==0 then + hit[c]=1 + count=count+1 + SFX.play(side<26 and'ren_'..rnd(5)or'ren_'..rnd(6,11)) + if count>=12 then + SFX.play('ren_mega',(count-11)/15) + end + if count==side then + state=1 + SFX.play('spin_0') + else + SFX.play('lock') + end + else + hit[c]=2 + SFX.play('emit') + needReset=true + state=1 + end + end + end end function scene.mouseDown(_,_,k) - if k==1 then - scene.keyDown("space") - end + if k==1 then + scene.keyDown("space") + end end function scene.touchDown() - scene.keyDown("space") + scene.keyDown("space") end function scene.update() - if state==0 then--main - ang=ang-.02 - if ang>0 then ang=ang-tau end - if pos0 then timer=timer-1 end - elseif state==1 or state==2 then--zoom - ang=ang+.02+timer/260 - pos=pos-.016 - if ang>0 then ang=ang-tau end - if pos0 then - ang=ang-tau - end - if pos0 then ang=ang-tau end + if pos0 then timer=timer-1 end + elseif state==1 or state==2 then--zoom + ang=ang+.02+timer/260 + pos=pos-.016 + if ang>0 then ang=ang-tau end + if pos0 then + ang=ang-tau + end + if pos.5 and 6 or -6 - vy=rnd()*6-3 + state=1 + vx=rnd()>.5 and 6 or -6 + vy=rnd()*6-3 end function scene.keyDown(key,isRep) - if isRep then return end - if key=="space"then - if state==0 then - start() - end - elseif key=="r"then - state=0 - bx,by=640,360 - vx,vy=0,0 - ry=0 - p1.score,p2.score=0,0 - SFX.play('hold') - elseif key=="w"or key=="s"then - p1.y0=false - elseif key=="up"or key=="down"then - p2.y0=false - elseif key=="escape"then - SCN.back() - end + if isRep then return end + if key=="space"then + if state==0 then + start() + end + elseif key=="r"then + state=0 + bx,by=640,360 + vx,vy=0,0 + ry=0 + p1.score,p2.score=0,0 + SFX.play('hold') + elseif key=="w"or key=="s"then + p1.y0=false + elseif key=="up"or key=="down"then + p2.y0=false + elseif key=="escape"then + SCN.back() + end end function scene.touchDown(x,y) - scene.touchMove(x,y) - if state==0 then start()end + scene.touchMove(x,y) + if state==0 then start()end end function scene.touchMove(x,y)(x<640 and p1 or p2).y0=y end function scene.mouseMove(x,y)(x<640 and p1 or p2).y0=y end --Rect Area X:150~1130 Y:20~700 function scene.update() - --Update pads - local P=p1 - while P do - if P.y0 then - if P.y>P.y0 then - P.y=max(P.y-8,P.y0,70) - P.vy=-10 - elseif P.y650 then - P.vy=-P.vy*.5 - P.y=650 - elseif P.y<70 then - P.vy=-P.vy*.5 - P.y=70 - end - end - P=P==p1 and p2 - end + --Update pads + local P=p1 + while P do + if P.y0 then + if P.y>P.y0 then + P.y=max(P.y-8,P.y0,70) + P.vy=-10 + elseif P.y650 then + P.vy=-P.vy*.5 + P.y=650 + elseif P.y<70 then + P.vy=-P.vy*.5 + P.y=70 + end + end + P=P==p1 and p2 + end - --Update ball - bx,by=bx+vx,by+vy - if ry~=0 then - if ry>0 then - ry=max(ry-.1,0) - vy=vy-.1 - else - ry=min(ry+.1,0) - vy=vy+.1 - end - end - if state==1 then--Playing - if bx<160 or bx>1120 then - P=bx<160 and p1 or p2 - local d=by-P.y - if abs(d)<60 then - vx=-vx-(vx>0 and .05 or -.5) - vy=vy+d*.08+P.vy*.5 - ry=P.vy - SFX.play('collect') - else - state=2 - end - end - if by<30 or by>690 then - by=by<30 and 30 or 690 - vy,ry=-vy,-ry - SFX.play('collect') - end - elseif state==2 then--Game over - if bx<-120 or bx>1400 or by<-40 or by>760 then - P=bx>640 and p1 or p2 - P.score=P.score+1 - TEXT.show("+1",bx>1400 and 470 or 810,226,50,'score') - SFX.play('reach') + --Update ball + bx,by=bx+vx,by+vy + if ry~=0 then + if ry>0 then + ry=max(ry-.1,0) + vy=vy-.1 + else + ry=min(ry+.1,0) + vy=vy+.1 + end + end + if state==1 then--Playing + if bx<160 or bx>1120 then + P=bx<160 and p1 or p2 + local d=by-P.y + if abs(d)<60 then + vx=-vx-(vx>0 and .05 or -.5) + vy=vy+d*.08+P.vy*.5 + ry=P.vy + SFX.play('collect') + else + state=2 + end + end + if by<30 or by>690 then + by=by<30 and 30 or 690 + vy,ry=-vy,-ry + SFX.play('collect') + end + elseif state==2 then--Game over + if bx<-120 or bx>1400 or by<-40 or by>760 then + P=bx>640 and p1 or p2 + P.score=P.score+1 + TEXT.show("+1",bx>1400 and 470 or 810,226,50,'score') + SFX.play('reach') - state=0 - bx,by=640,360 - vx,vy=0,0 - end - end - bx,by,vx,vy,ry=bx,by,vx,vy,ry + state=0 + bx,by=640,360 + vx,vy=0,0 + end + end + bx,by,vx,vy,ry=bx,by,vx,vy,ry end function scene.draw() - --Draw score - setFont(100) - gc.setColor(.4,.4,.4) - mStr(p1.score,470,20) - mStr(p2.score,810,20) + --Draw score + setFont(100) + gc.setColor(.4,.4,.4) + mStr(p1.score,470,20) + mStr(p2.score,810,20) - --Draw boundary - gc.setColor(COLOR.Z) - gc.setLineWidth(4) - gc.line(134,20,1146,20) - gc.line(134,700,1146,700) + --Draw boundary + gc.setColor(COLOR.Z) + gc.setLineWidth(4) + gc.line(134,20,1146,20) + gc.line(134,700,1146,700) - --Draw ball & speed line - gc.setColor(1,1,1-abs(ry)*.16) - gc.circle('fill',bx,by,10) - gc.setColor(1,1,1,.1) - gc.line(bx+vx*22,by+vy*22,bx+vx*30,by+vy*30) + --Draw ball & speed line + gc.setColor(1,1,1-abs(ry)*.16) + gc.circle('fill',bx,by,10) + gc.setColor(1,1,1,.1) + gc.line(bx+vx*22,by+vy*22,bx+vx*30,by+vy*30) - --Draw pads - gc.setColor(1,.8,.8) - gc.rectangle('fill',134,p1.y-50,16,100) - gc.setColor(.8,.8,1) - gc.rectangle('fill',1130,p2.y-50,16,100) + --Draw pads + gc.setColor(1,.8,.8) + gc.rectangle('fill',134,p1.y-50,16,100) + gc.setColor(.8,.8,1) + gc.rectangle('fill',1130,p2.y-50,16,100) end scene.widgetList={ - WIDGET.newKey{name="reset",x=640,y=45,w=150,h=50,font=35,code=pressKey"r"}, - WIDGET.newKey{name="back",x=640,y=675,w=150,h=50,fText=TEXTURE.back,code=backScene}, + WIDGET.newKey{name="reset",x=640,y=45,w=150,h=50,font=35,code=pressKey"r"}, + WIDGET.newKey{name="back",x=640,y=675,w=150,h=50,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/app_reflect.lua b/parts/scenes/app_reflect.lua index b1d0d802..6f04e29a 100644 --- a/parts/scenes/app_reflect.lua +++ b/parts/scenes/app_reflect.lua @@ -9,128 +9,128 @@ local s1,s2 local up,winner=true local function reset() - state=0 - ct=20 - s1,s2=0,0 + state=0 + ct=20 + s1,s2=0,0 end function scene.sceneInit() - reset() - BG.set('none') + reset() + BG.set('none') end function scene.keyDown(key,isRep) - if isRep then return end - if state==0 then - if key=="space"then - reset() - state=1 - ct=60 - end - elseif state==2 and #key==1 then - key=("qapl"):find(key) - if key then - --BEAUTIFUL LOGIC BELOW: + if isRep then return end + if state==0 then + if key=="space"then + reset() + state=1 + ct=60 + end + elseif state==2 and #key==1 then + key=("qapl"):find(key) + if key then + --BEAUTIFUL LOGIC BELOW: - --early = error, [UP-key]==[target is up] = correct sfx, else = wrong sfx - SFX.play(ct>6 and'finesseError'or key%2==1==up and'reach'or'fail') + --early = error, [UP-key]==[target is up] = correct sfx, else = wrong sfx + SFX.play(ct>6 and'finesseError'or key%2==1==up and'reach'or'fail') - --(early && P2-key || not early && [P1-key]==[target is up]) = P1 win, else P2 win - if ct>6 and key>2 or ct<=6 and key%4<2==up then - winner=1;s1=s1+1 - else - winner=2;s2=s2+1 - end - state=3 - ct=60 - end - end + --(early && P2-key || not early && [P1-key]==[target is up]) = P1 win, else P2 win + if ct>6 and key>2 or ct<=6 and key%4<2==up then + winner=1;s1=s1+1 + else + winner=2;s2=s2+1 + end + state=3 + ct=60 + end + end end function scene.touchDown(x,y) - scene.keyDown( - state==0 and "space"or - x<640 and - (y<360 and"q"or"a")or - (y<360 and"p"or"l") - ) + scene.keyDown( + state==0 and "space"or + x<640 and + (y<360 and"q"or"a")or + (y<360 and"p"or"l") + ) end function scene.update() - if state==0 then--Menu - if ct>0 then - ct=ct-1 - elseif rnd()<.00626 then - ct=30 - end - elseif state==1 then--Waiting - ct=ct-1 - if ct==0 then - ct=rnd(26,162) - up=rnd()<.5 - state=2 - end - elseif state==2 then--Winking - ct=ct-1 - if ct==0 then ct=6 end - elseif state==3 then - ct=ct-1 - if ct==0 then - if s1==6 or s2==6 then - state=0 - else - state=1 - end - ct=60 - end - end + if state==0 then--Menu + if ct>0 then + ct=ct-1 + elseif rnd()<.00626 then + ct=30 + end + elseif state==1 then--Waiting + ct=ct-1 + if ct==0 then + ct=rnd(26,162) + up=rnd()<.5 + state=2 + end + elseif state==2 then--Winking + ct=ct-1 + if ct==0 then ct=6 end + elseif state==3 then + ct=ct-1 + if ct==0 then + if s1==6 or s2==6 then + state=0 + else + state=1 + end + ct=60 + end + end end function scene.draw() - --Dividing line - gc.setLineWidth(10) - gc.setColor(1,1,1,.9) - gc.line(640,0,640,720) - gc.setColor(1,1,1,.3) - gc.line(500,360,780,360) + --Dividing line + gc.setLineWidth(10) + gc.setColor(1,1,1,.9) + gc.line(640,0,640,720) + gc.setColor(1,1,1,.3) + gc.line(500,360,780,360) - --Help - setFont(100) - mStr("Q",80,100) - mStr("A",80,480) - mStr("P",1200,100) - mStr("L",1200,480) + --Help + setFont(100) + mStr("Q",80,100) + mStr("A",80,480) + mStr("P",1200,100) + mStr("L",1200,480) - --Score - setFont(80) - gc.printf(s1,50,300,200) - gc.printf(s2,1030,300,200,'right') + --Score + setFont(80) + gc.printf(s1,50,300,200) + gc.printf(s2,1030,300,200,'right') - if state==0 then - setFont(40) - mStr(MOBILE and"Touch to Start"or"Press space to Start",640,400) - mStr("Press key on the same side when block appear!",640,500) - if ct>0 then - setFont(100) - gc.setColor(1,1,1,ct/30) - mStr("REFLECT",640,140) - end - elseif state==1 then - gc.setColor(.2,.7,.4,math.min((60-ct)/10,ct/10)*.8) - gc.arc('fill',640,360,260,-1.5708,-1.5708+(ct/60)*6.2832) - elseif state==2 and ct<5 then - gc.setColor(1,ct>2 and 1 or 0,0) - gc.rectangle('fill',640-100,(up and 180 or 540)-100,200,200,10) - elseif state==3 then - local x=(60-ct)*62 - gc.setColor(.4,1,.4,ct/100) - if winner==1 then - gc.rectangle('fill',0,0,x,720) - else - gc.rectangle('fill',1280,0,-x,720) - end - end + if state==0 then + setFont(40) + mStr(MOBILE and"Touch to Start"or"Press space to Start",640,400) + mStr("Press key on the same side when block appear!",640,500) + if ct>0 then + setFont(100) + gc.setColor(1,1,1,ct/30) + mStr("REFLECT",640,140) + end + elseif state==1 then + gc.setColor(.2,.7,.4,math.min((60-ct)/10,ct/10)*.8) + gc.arc('fill',640,360,260,-1.5708,-1.5708+(ct/60)*6.2832) + elseif state==2 and ct<5 then + gc.setColor(1,ct>2 and 1 or 0,0) + gc.rectangle('fill',640-100,(up and 180 or 540)-100,200,200,10) + elseif state==3 then + local x=(60-ct)*62 + gc.setColor(.4,1,.4,ct/100) + if winner==1 then + gc.rectangle('fill',0,0,x,720) + else + gc.rectangle('fill',1280,0,-x,720) + end + end end scene.widgetList={ - WIDGET.newKey{name="back",x=640,y=675,w=150,h=50,fText=TEXTURE.back,code=backScene}, + WIDGET.newKey{name="back",x=640,y=675,w=150,h=50,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/app_schulteG.lua b/parts/scenes/app_schulteG.lua index d4f42084..59959974 100644 --- a/parts/scenes/app_schulteG.lua +++ b/parts/scenes/app_schulteG.lua @@ -15,166 +15,166 @@ local state,progress local tapFX,mistake function scene.sceneInit() - BG.set('space') - BGM.play('way') - board={} - rank=3 - blind=false - disappear=false - tapFX=true + BG.set('space') + BGM.play('way') + board={} + rank=3 + blind=false + disappear=false + tapFX=true - startTime=0 - time=0 - mistake=0 - state=0 - progress=0 + startTime=0 + time=0 + mistake=0 + state=0 + progress=0 end local function newBoard() - local L={} - for i=1,rank^2 do - L[i]=i - end - for i=1,rank^2 do - board[i]=rem(L,rnd(#L)) - end + local L={} + for i=1,rank^2 do + L[i]=i + end + for i=1,rank^2 do + board[i]=rem(L,rnd(#L)) + end end local function tapBoard(x,y) - local R=rank - if x>320 and x<960 and y>40 and y<680 then - if state==0 then - newBoard() - state=1 - startTime=TIME() - progress=0 - elseif state==1 then - local X=int((x-320)/640*R) - local Y=int((y-40)/640*R) - x=R*Y+X+1 - if board[x]==progress+1 then - progress=progress+1 - if progress320 and x<960 and y>40 and y<680 then + if state==0 then + newBoard() + state=1 + startTime=TIME() + progress=0 + elseif state==1 then + local X=int((x-320)/640*R) + local Y=int((y-40)/640*R) + x=R*Y+X+1 + if board[x]==progress+1 then + progress=progress+1 + if progress0 then - board={} - time=0 - mistake=0 - state=0 - progress=0 - end - elseif key=="q"then - if state==0 then - blind=not blind - end - elseif key=="w"then - if state==0 then - disappear=not disappear - end - elseif key=="e"then - if state==0 then - tapFX=not tapFX - end - elseif key=="3"or key=="4"or key=="5"or key=="6"then - if state==0 then - rank=tonumber(key) - end - elseif key=="escape"then - SCN.back() - end + if isRep then return end + if key=="z"or key=="x"then + love.mousepressed(ms.getPosition()) + elseif key=="space"then + if state>0 then + board={} + time=0 + mistake=0 + state=0 + progress=0 + end + elseif key=="q"then + if state==0 then + blind=not blind + end + elseif key=="w"then + if state==0 then + disappear=not disappear + end + elseif key=="e"then + if state==0 then + tapFX=not tapFX + end + elseif key=="3"or key=="4"or key=="5"or key=="6"then + if state==0 then + rank=tonumber(key) + end + elseif key=="escape"then + SCN.back() + end end function scene.update() - if state==1 then - time=TIME()-startTime+mistake - end + if state==1 then + time=TIME()-startTime+mistake + end end function scene.draw() - setFont(40) - gc.setColor(COLOR.Z) - gc.print(("%.3f"):format(time),1026,80) - gc.print(mistake,1026,150) + setFont(40) + gc.setColor(COLOR.Z) + gc.print(("%.3f"):format(time),1026,80) + gc.print(mistake,1026,150) - setFont(70) - mStr(state==1 and progress or state==0 and"Ready"or state==2 and"Win",1130,300) + setFont(70) + mStr(state==1 and progress or state==0 and"Ready"or state==2 and"Win",1130,300) - if state==2 then - --Draw no-setting area - gc.setColor(1,0,0,.3) - gc.rectangle('fill',15,295,285,250) + if state==2 then + --Draw no-setting area + gc.setColor(1,0,0,.3) + gc.rectangle('fill',15,295,285,250) - gc.setColor(.9,.9,0)--win - elseif state==1 then - gc.setColor(.9,.9,.9)--game - elseif state==0 then - gc.setColor(.2,.8,.2)--ready - end - gc.setLineWidth(10) - gc.rectangle('line',310,30,660,660) + gc.setColor(.9,.9,0)--win + elseif state==1 then + gc.setColor(.9,.9,.9)--game + elseif state==0 then + gc.setColor(.2,.8,.2)--ready + end + gc.setLineWidth(10) + gc.rectangle('line',310,30,660,660) - local width=640/rank - local mono=state==0 or blind and state==1 and progress>0 - gc.setLineWidth(4) - local f=180-rank*20 - setFont(f) - for i=1,rank do - for j=1,rank do - local N=board[rank*(i-1)+j] - if not(state==1 and disappear and N<=progress)then - gc.setColor(.4,.5,.6) - gc.rectangle('fill',320+(j-1)*width,(i-1)*width+40,width,width) - gc.setColor(COLOR.Z) - gc.rectangle('line',320+(j-1)*width,(i-1)*width+40,width,width) - if not mono then - local x,y=320+(j-.5)*width,40+(i-.5)*width-f*.67 - gc.setColor(.1,.1,.1) - mStr(N,x-3,y-1) - mStr(N,x-1,y-3) - gc.setColor(COLOR.Z) - mStr(N,x,y) - end - end - end - end + local width=640/rank + local mono=state==0 or blind and state==1 and progress>0 + gc.setLineWidth(4) + local f=180-rank*20 + setFont(f) + for i=1,rank do + for j=1,rank do + local N=board[rank*(i-1)+j] + if not(state==1 and disappear and N<=progress)then + gc.setColor(.4,.5,.6) + gc.rectangle('fill',320+(j-1)*width,(i-1)*width+40,width,width) + gc.setColor(COLOR.Z) + gc.rectangle('line',320+(j-1)*width,(i-1)*width+40,width,width) + if not mono then + local x,y=320+(j-.5)*width,40+(i-.5)*width-f*.67 + gc.setColor(.1,.1,.1) + mStr(N,x-3,y-1) + mStr(N,x-1,y-3) + gc.setColor(COLOR.Z) + mStr(N,x,y) + end + end + end + end end scene.widgetList={ - WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color='lG',font=40,code=pressKey"space",hideF=function()return state==0 end}, - WIDGET.newSlider{name="rank", x=130,y=250,w=150,unit=3,show=false,font=40,disp=function()return rank-3 end,code=function(v)rank=v+3 end,hideF=function()return state>0 end}, - WIDGET.newSwitch{name="blind", x=240,y=330,w=60, font=40,disp=function()return blind end, code=pressKey"q",hideF=function()return state==1 end}, - WIDGET.newSwitch{name="disappear", x=240,y=420,w=60, font=40,disp=function()return disappear end,code=pressKey"w",hideF=function()return state==1 end}, - WIDGET.newSwitch{name="tapFX", x=240,y=510,w=60, font=40,disp=function()return tapFX end, code=pressKey"e",hideF=function()return state==1 end}, - WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color='lG',font=40,code=pressKey"space",hideF=function()return state==0 end}, + WIDGET.newSlider{name="rank", x=130,y=250,w=150,unit=3,show=false,font=40,disp=function()return rank-3 end,code=function(v)rank=v+3 end,hideF=function()return state>0 end}, + WIDGET.newSwitch{name="blind", x=240,y=330,w=60, font=40,disp=function()return blind end, code=pressKey"q",hideF=function()return state==1 end}, + WIDGET.newSwitch{name="disappear",x=240,y=420,w=60, font=40,disp=function()return disappear end,code=pressKey"w",hideF=function()return state==1 end}, + WIDGET.newSwitch{name="tapFX", x=240,y=510,w=60, font=40,disp=function()return tapFX end, code=pressKey"e",hideF=function()return state==1 end}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/app_tap.lua b/parts/scenes/app_tap.lua index b5705ac6..de3c575a 100644 --- a/parts/scenes/app_tap.lua +++ b/parts/scenes/app_tap.lua @@ -9,68 +9,68 @@ local lastKey,keyTime local speed,maxSpeed=0,260 function scene.sceneInit() - lastKey=nil - speed=0 - keyTime={}for i=1,40 do keyTime[i]=-1e99 end - BG.set('gray') - BGM.play('push') + lastKey=nil + speed=0 + keyTime={}for i=1,40 do keyTime[i]=-1e99 end + BG.set('gray') + BGM.play('push') end function scene.keyDown(key,isRep) - if isRep then return end - if key=="escape"then - SCN.back() - else - if lastKey~=key then - lastKey=key - else - ins(keyTime,1,TIME()) - keyTime[41]=nil - SFX.play('click',.3) - end - end + if isRep then return end + if key=="escape"then + SCN.back() + else + if lastKey~=key then + lastKey=key + else + ins(keyTime,1,TIME()) + keyTime[41]=nil + SFX.play('click',.3) + end + end end function scene.update() - local t=TIME() - local v=0 - for i=2,40 do v=v+i*(i-1)*.075/(t-keyTime[i])end - speed=speed*.99+v*.01 - if speed>maxSpeed then maxSpeed=speed end + local t=TIME() + local v=0 + for i=2,40 do v=v+i*(i-1)*.075/(t-keyTime[i])end + speed=speed*.99+v*.01 + if speed>maxSpeed then maxSpeed=speed end end function scene.draw() - setFont(70)gc.setColor(1,.6,.6) - mStr(("%.2f"):format(maxSpeed),640,20) + setFont(70)gc.setColor(1,.6,.6) + mStr(("%.2f"):format(maxSpeed),640,20) - setFont(100)gc.setColor(COLOR.Z) - mStr(("%.2f"):format(speed),640,150) + setFont(100)gc.setColor(COLOR.Z) + mStr(("%.2f"):format(speed),640,150) - setFont(35) - gc.setColor(.6,.6,.9) - mStr(("%.2f"):format(maxSpeed/60),640,95) - gc.setColor(.8,.8,.8) - mStr(("%.2f"):format(speed/60),640,255) + setFont(35) + gc.setColor(.6,.6,.9) + mStr(("%.2f"):format(maxSpeed/60),640,95) + gc.setColor(.8,.8,.8) + mStr(("%.2f"):format(speed/60),640,255) - setFont(60)gc.setColor(.7,.7,.7) - mStr("/min",640,310) + setFont(60)gc.setColor(.7,.7,.7) + mStr("/min",640,310) - gc.setLineWidth(4) - if speed==maxSpeed then - local t=TIME()%.1>.05 and 1 or 0 - gc.setColor(1,t,t) - else - gc.setColor(max(speed/maxSpeed*10-9,0),1-max(speed/maxSpeed*8-7,0),1-max(speed/maxSpeed*4-3,0)) - end - gc.rectangle('fill',960,360,30,-320*max(speed/maxSpeed*4-3,0)) - gc.setColor(COLOR.Z) - gc.rectangle('line',960,360,30,-320) + gc.setLineWidth(4) + if speed==maxSpeed then + local t=TIME()%.1>.05 and 1 or 0 + gc.setColor(1,t,t) + else + gc.setColor(max(speed/maxSpeed*10-9,0),1-max(speed/maxSpeed*8-7,0),1-max(speed/maxSpeed*4-3,0)) + end + gc.rectangle('fill',960,360,30,-320*max(speed/maxSpeed*4-3,0)) + gc.setColor(COLOR.Z) + gc.rectangle('line',960,360,30,-320) end scene.widgetList={ - WIDGET.newKey{name="tap",x=640,y=540,w=626,h=260,fText="TAP",color='Z',font=100,code=function(i)love.keypressed('b'..i)end}, - WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newKey{name="tap",x=640,y=540,w=626,h=260,fText="TAP",color='Z',font=100,code=function(i)love.keypressed('b'..i)end}, + WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/app_ten.lua b/parts/scenes/app_ten.lua index e50b8406..1713c415 100644 --- a/parts/scenes/app_ten.lua +++ b/parts/scenes/app_ten.lua @@ -10,18 +10,18 @@ local scene={} local previewX={245,186,129,78,35} local tileColor={ - {.39, 1.0, .39}, - {.39, .39, 1.0}, - {1.0, .70, .31}, - {.94, .31, .31}, - {.00, .71, .12}, - {.90, .20, .90}, - {.94, .47, .39}, - {.90, .00, .00}, - {.86, .86, .31}, - {.78, .31, .00}, - {.78, .55, .04}, - {.12, .12, .51}, + {.39, 1.0, .39}, + {.39, .39, 1.0}, + {1.0, .70, .31}, + {.94, .31, .31}, + {.00, .71, .12}, + {.90, .20, .90}, + {.94, .47, .39}, + {.90, .00, .00}, + {.86, .86, .31}, + {.78, .31, .00}, + {.78, .55, .04}, + {.12, .12, .51}, } local board,preview,cx,cy @@ -37,273 +37,273 @@ local blind local fast local function reset() - progress={} - state=0 - score=0 - time=0 - maxTile=2 - maxNew=2 - for i=1,5 do - preview[i]=rnd(2) - end - for i=1,5 do for j=1,5 do - board[i][j]=rnd(2) - end end - board[rnd(5)][rnd(5)]=2 - fallingTimer=false - failPos=false + progress={} + state=0 + score=0 + time=0 + maxTile=2 + maxNew=2 + for i=1,5 do + preview[i]=rnd(2) + end + for i=1,5 do for j=1,5 do + board[i][j]=rnd(2) + end end + board[rnd(5)][rnd(5)]=2 + fallingTimer=false + failPos=false end function scene.sceneInit() - BG.set('rainbow2') - BGM.play('truth') - preview={} - board={{},{},{},{},{}} - cx,cy=3,3 - startTime=0 - blind=false - nexts=true - reset() + BG.set('rainbow2') + BGM.play('truth') + preview={} + board={{},{},{},{},{}} + cx,cy=3,3 + startTime=0 + blind=false + nexts=true + reset() end local function merge() - if fallingTimer or state==2 or not cx then return end - if state==0 then - state=1 - startTime=TIME() - end - if failPos==cy*10+cx then return end - local chosen=board[cy][cx] - local connected={{cy,cx}} - local count=1 - repeat - local c=rem(connected) - local y,x=c[1],c[2] - if board[y][x]~=0 then - board[y][x]=0 - SYSFX.newShade(2,320+x*128-128,40+y*128-128,128,128) - if x>1 and board[y][x-1]==chosen then ins(connected,{y,x-1})count=count+1 end - if x<5 and board[y][x+1]==chosen then ins(connected,{y,x+1})count=count+1 end - if y>1 and board[y-1][x]==chosen then ins(connected,{y-1,x})count=count+1 end - if y<5 and board[y+1][x]==chosen then ins(connected,{y+1,x})count=count+1 end - end - until not connected[1] - if count>1 then - board[cy][cx]=chosen+1 - local getScore=3^(chosen-1)*math.min(int(.5+count/2),4) - score=score+getScore - TEXT.show(getScore,cx*128+256,cy*128-40,40,'score') - SYSFX.newRectRipple(2,320+cx*128-128,40+cy*128-128,128,128) - SFX.play('lock') - if chosen==maxTile then - maxTile=chosen+1 - if maxTile>=6 then - ins(progress,("%s - %.3fs"):format(maxTile,TIME()-startTime)) - end - maxNew= - maxTile<=4 and 2 or - maxTile<=8 and 3 or - maxTile<=11 and 4 or - 5 - SFX.play('reach') - end - if chosen>=5 then - SFX.play( - chosen>=9 and"ren_mega"or - chosen>=8 and"spin_3"or - chosen>=7 and"spin_2"or - chosen>=6 and"spin_1"or - "spin_0" - ) - end - fallingTimer=fast and 8 or 12 - failPos=false - else - board[cy][cx]=chosen - failPos=cy*10+cx - end + if fallingTimer or state==2 or not cx then return end + if state==0 then + state=1 + startTime=TIME() + end + if failPos==cy*10+cx then return end + local chosen=board[cy][cx] + local connected={{cy,cx}} + local count=1 + repeat + local c=rem(connected) + local y,x=c[1],c[2] + if board[y][x]~=0 then + board[y][x]=0 + SYSFX.newShade(2,320+x*128-128,40+y*128-128,128,128) + if x>1 and board[y][x-1]==chosen then ins(connected,{y,x-1})count=count+1 end + if x<5 and board[y][x+1]==chosen then ins(connected,{y,x+1})count=count+1 end + if y>1 and board[y-1][x]==chosen then ins(connected,{y-1,x})count=count+1 end + if y<5 and board[y+1][x]==chosen then ins(connected,{y+1,x})count=count+1 end + end + until not connected[1] + if count>1 then + board[cy][cx]=chosen+1 + local getScore=3^(chosen-1)*math.min(int(.5+count/2),4) + score=score+getScore + TEXT.show(getScore,cx*128+256,cy*128-40,40,'score') + SYSFX.newRectRipple(2,320+cx*128-128,40+cy*128-128,128,128) + SFX.play('lock') + if chosen==maxTile then + maxTile=chosen+1 + if maxTile>=6 then + ins(progress,("%s - %.3fs"):format(maxTile,TIME()-startTime)) + end + maxNew= + maxTile<=4 and 2 or + maxTile<=8 and 3 or + maxTile<=11 and 4 or + 5 + SFX.play('reach') + end + if chosen>=5 then + SFX.play( + chosen>=9 and"ren_mega"or + chosen>=8 and"spin_3"or + chosen>=7 and"spin_2"or + chosen>=6 and"spin_1"or + "spin_0" + ) + end + fallingTimer=fast and 8 or 12 + failPos=false + else + board[cy][cx]=chosen + failPos=cy*10+cx + end end function scene.keyDown(key,isRep) - if isRep then return end - if key=="up"or key=="down"or key=="left"or key=="right"then - if state==2 then return end - if not cx then - cx,cy=3,3 - else - if key=="up"then - if cy>1 then cy=cy-1 end - elseif key=="down"then - if cy<5 then cy=cy+1 end - elseif key=="left"then - if cx>1 then cx=cx-1 end - elseif key=="right"then - if cx<5 then cx=cx+1 end - end - end - elseif key=="z"or key=="space"then - merge() - elseif key=="r"then - reset() - elseif key=="q"then - if state==0 then - nexts=not nexts - end - elseif key=="w"then - if state==0 then - blind=not blind - end - elseif key=="e"then - if state==0 then - fast=not fast - end - elseif key=="escape"then - SCN.back() - end + if isRep then return end + if key=="up"or key=="down"or key=="left"or key=="right"then + if state==2 then return end + if not cx then + cx,cy=3,3 + else + if key=="up"then + if cy>1 then cy=cy-1 end + elseif key=="down"then + if cy<5 then cy=cy+1 end + elseif key=="left"then + if cx>1 then cx=cx-1 end + elseif key=="right"then + if cx<5 then cx=cx+1 end + end + end + elseif key=="z"or key=="space"then + merge() + elseif key=="r"then + reset() + elseif key=="q"then + if state==0 then + nexts=not nexts + end + elseif key=="w"then + if state==0 then + blind=not blind + end + elseif key=="e"then + if state==0 then + fast=not fast + end + elseif key=="escape"then + SCN.back() + end end function scene.mouseMove(x,y) - cx,cy=int((x-192)/128),int((y+88)/128) - if cx<1 or cx>5 or cy<1 or cy>5 then cx,cy=false end + cx,cy=int((x-192)/128),int((y+88)/128) + if cx<1 or cx>5 or cy<1 or cy>5 then cx,cy=false end end function scene.mouseDown(x,y) - scene.mouseMove(x,y) - merge() + scene.mouseMove(x,y) + merge() end scene.touchMove=scene.mouseMove scene.touchDown=scene.mouseMove function scene.touchClick(x,y) - scene.mouseDown(x,y) + scene.mouseDown(x,y) end function scene.update() - if state==1 then - time=TIME()-startTime - if fallingTimer then - fallingTimer=fallingTimer-1 - if fallingTimer==0 then - for i=5,2,-1 do - for j=1,5 do - if board[i][j]==0 then - board[i][j]=board[i-1][j] - board[i-1][j]=0 - end - end - end - local noNewTile=true - for i=1,5 do - if board[1][i]==0 then - board[1][i]=rem(preview,1) - preview[5]= - maxTile<=4 and rnd(2)or - maxTile<=8 and rnd(1+rnd(2))or - maxTile<=11 and rnd(2+rnd(2))or - rnd(2+rnd(3)) - noNewTile=false - end - end - if noNewTile then - fallingTimer=false - for i=1,4 do for j=1,5 do if board[i][j]==board[i+1][j]then return end end end - for i=1,5 do for j=1,4 do if board[i][j]==board[i][j+1]then return end end end - state=2 - SFX.play('fail') - else - fallingTimer=fast and 4 or 5 - SFX.play('move') - end - end - elseif fast and( - msIsDown(1)or - #tcTouches()>0 or - kbIsDown("space") - )then - merge() - end - end + if state==1 then + time=TIME()-startTime + if fallingTimer then + fallingTimer=fallingTimer-1 + if fallingTimer==0 then + for i=5,2,-1 do + for j=1,5 do + if board[i][j]==0 then + board[i][j]=board[i-1][j] + board[i-1][j]=0 + end + end + end + local noNewTile=true + for i=1,5 do + if board[1][i]==0 then + board[1][i]=rem(preview,1) + preview[5]= + maxTile<=4 and rnd(2)or + maxTile<=8 and rnd(1+rnd(2))or + maxTile<=11 and rnd(2+rnd(2))or + rnd(2+rnd(3)) + noNewTile=false + end + end + if noNewTile then + fallingTimer=false + for i=1,4 do for j=1,5 do if board[i][j]==board[i+1][j]then return end end end + for i=1,5 do for j=1,4 do if board[i][j]==board[i][j+1]then return end end end + state=2 + SFX.play('fail') + else + fallingTimer=fast and 4 or 5 + SFX.play('move') + end + end + elseif fast and( + msIsDown(1)or + #tcTouches()>0 or + kbIsDown("space") + )then + merge() + end + end end function scene.draw() - setFont(40) - setColor(1,1,1) - gc.print(("%.3f"):format(time),1026,50) - gc.print(score,1026,100) + setFont(40) + setColor(1,1,1) + gc.print(("%.3f"):format(time),1026,50) + gc.print(score,1026,100) - --Progress time list - setFont(25) - setColor(.7,.7,.7) - for i=1,#progress do - gc.print(progress[i],1000,140+30*i) - end + --Progress time list + setFont(25) + setColor(.7,.7,.7) + for i=1,#progress do + gc.print(progress[i],1000,140+30*i) + end - --Previews - if nexts then - gc.setColor(0,0,0,.2) - rectangle('fill',20,450,280,75) - gc.setLineWidth(6) - setColor(1,1,1) - rectangle('line',20,450,280,75) - for i=1,5 do - setFont(85-10*i) - gc.setColor(tileColor[preview[i]]) - gc.print(preview[i],previewX[i],428+i*7) - end - end + --Previews + if nexts then + gc.setColor(0,0,0,.2) + rectangle('fill',20,450,280,75) + gc.setLineWidth(6) + setColor(1,1,1) + rectangle('line',20,450,280,75) + for i=1,5 do + setFont(85-10*i) + gc.setColor(tileColor[preview[i]]) + gc.print(preview[i],previewX[i],428+i*7) + end + end - if state==2 then - --Draw no-setting area - setColor(1,0,0,.3) - rectangle('fill',15,200,285,210) - end - gc.setLineWidth(10) - setColor(COLOR[ - state==0 and'G'or - state==1 and(fast and'R'or'W')or - state==2 and'Y' - ]) - rectangle('line',315,35,650,650) + if state==2 then + --Draw no-setting area + setColor(1,0,0,.3) + rectangle('fill',15,200,285,210) + end + gc.setLineWidth(10) + setColor(COLOR[ + state==0 and'G'or + state==1 and(fast and'R'or'W')or + state==2 and'Y' + ]) + rectangle('line',315,35,650,650) - gc.setLineWidth(4) - setFont(70) - local hide=blind and state==1 - for i=1,5 do - for j=1,5 do - local N=board[i][j] - if N>0 then - if hide and N>maxNew then - setColor(COLOR.dH) - rectangle('fill',320+j*128-128,40+i*128-128,128,128) - setColor(1,1,1,.3) - mStr("?",j*128+256,i*128-75) - else - if N<=12 then - setColor(tileColor[N]) - elseif N<=14 then - setColor(COLOR.rainbow(4*TIME()-i-j)) - else - setColor(0,0,0,1-math.abs(TIME()%.5-.25)*6-.25) - end - rectangle('fill',320+j*128-128,40+i*128-128,128,128) - setColor(1,1,1,.9) - mStr(N,j*128+256,i*128-75) - end - end - end - end - if state<2 and cx then - setColor(1,1,1,.6) - gc.setLineWidth(10) - rectangle('line',325+cx*128-128,45+cy*128-128,118,118) - end - setFont(50) - setColor(1,1,1) - mStr("Just Get Ten",160,580) + gc.setLineWidth(4) + setFont(70) + local hide=blind and state==1 + for i=1,5 do + for j=1,5 do + local N=board[i][j] + if N>0 then + if hide and N>maxNew then + setColor(COLOR.dH) + rectangle('fill',320+j*128-128,40+i*128-128,128,128) + setColor(1,1,1,.3) + mStr("?",j*128+256,i*128-75) + else + if N<=12 then + setColor(tileColor[N]) + elseif N<=14 then + setColor(COLOR.rainbow(4*TIME()-i-j)) + else + setColor(0,0,0,1-math.abs(TIME()%.5-.25)*6-.25) + end + rectangle('fill',320+j*128-128,40+i*128-128,128,128) + setColor(1,1,1,.9) + mStr(N,j*128+256,i*128-75) + end + end + end + end + if state<2 and cx then + setColor(1,1,1,.6) + gc.setLineWidth(10) + rectangle('line',325+cx*128-128,45+cy*128-128,118,118) + end + setFont(50) + setColor(1,1,1) + mStr("Just Get Ten",160,580) end scene.widgetList={ - WIDGET.newButton{name="reset", x=160,y=100,w=180,h=100,color='lG',font=40,code=pressKey"r"}, - WIDGET.newSwitch{name="next", x=240,y=235,font=40,disp=function()return nexts end,code=pressKey"q",hideF=function()return state==1 end}, - WIDGET.newSwitch{name="blind", x=240,y=305,font=40,disp=function()return blind end,code=pressKey"w",hideF=function()return state==1 end}, - WIDGET.newSwitch{name="fast", x=240,y=375,font=30,disp=function()return fast end,code=pressKey"e",hideF=function()return state==1 end}, - WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newButton{name="reset",x=160,y=100,w=180,h=100,color='lG',font=40,code=pressKey"r"}, + WIDGET.newSwitch{name="next", x=240,y=235,font=40,disp=function()return nexts end,code=pressKey"q",hideF=function()return state==1 end}, + WIDGET.newSwitch{name="blind",x=240,y=305,font=40,disp=function()return blind end,code=pressKey"w",hideF=function()return state==1 end}, + WIDGET.newSwitch{name="fast", x=240,y=375,font=30,disp=function()return fast end,code=pressKey"e",hideF=function()return state==1 end}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/customGame.lua b/parts/scenes/customGame.lua index 310ff32a..8d6215f9 100644 --- a/parts/scenes/customGame.lua +++ b/parts/scenes/customGame.lua @@ -3,26 +3,26 @@ local int=math.floor local CUSTOMENV=CUSTOMENV local function _notAir(L) - for i=1,10 do - if L[i]>0 then - return true - end - end + for i=1,10 do + if L[i]>0 then + return true + end + end end local sList={ - visible={"show","easy","slow","medium","fast","none"}, - freshLimit={0,1,2,4,6,8,10,12,15,30,1e99}, - opponent={"X","9S Lv.1","9S Lv.2","9S Lv.3","9S Lv.4","9S Lv.5","CC Lv.1","CC Lv.2","CC Lv.3","CC Lv.4","CC Lv.5"}, - life={0,1,2,3,5,10,15,26,42,87,500}, - pushSpeed={1,2,3,5,15}, - fieldH={1,2,3,4,6,8,10,15,20,30,50,100}, - heightLimit={2,3,4,6,8,10,15,20,30,40,70,100,150,200,1e99}, - bufferLimit={4,6,10,15,20,40,100,1e99}, + visible={"show","easy","slow","medium","fast","none"}, + freshLimit={0,1,2,4,6,8,10,12,15,30,1e99}, + opponent={"X","9S Lv.1","9S Lv.2","9S Lv.3","9S Lv.4","9S Lv.5","CC Lv.1","CC Lv.2","CC Lv.3","CC Lv.4","CC Lv.5"}, + life={0,1,2,3,5,10,15,26,42,87,500}, + pushSpeed={1,2,3,5,15}, + fieldH={1,2,3,4,6,8,10,15,20,30,50,100}, + heightLimit={2,3,4,6,8,10,15,20,30,40,70,100,150,200,1e99}, + bufferLimit={4,6,10,15,20,40,100,1e99}, - drop={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}, - lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99}, - wait={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, - fall={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, + drop={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}, + lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99}, + wait={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, + fall={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, } local scene={} @@ -30,229 +30,229 @@ local scene={} local sure local initField local function _freshMiniFieldVisible() - initField=false - for y=1,20 do - if _notAir(FIELD[1][y])then - initField=true - return - end - end + initField=false + for y=1,20 do + if _notAir(FIELD[1][y])then + initField=true + return + end + end end function scene.sceneInit() - sure=0 - destroyPlayers() - BG.set(CUSTOMENV.bg) - BGM.play(CUSTOMENV.bgm) - _freshMiniFieldVisible() + sure=0 + destroyPlayers() + BG.set(CUSTOMENV.bg) + BGM.play(CUSTOMENV.bgm) + _freshMiniFieldVisible() end function scene.sceneBack() - BGM.play() + BGM.play() end function scene.keyDown(key,isRep) - if isRep then return end - if key=="return"or key=="return2"then - if CUSTOMENV.opponent~="X"then - if CUSTOMENV.opponent:sub(1,2)=='CC'and CUSTOMENV.sequence=="fixed"then - MES.new('error',text.ai_fixed) - return - end - if #BAG>0 then - for _=1,#BAG do - if BAG[_]>7 then - MES.new('error',text.ai_prebag) - return - end - end - end - if #MISSION>0 then - MES.new('error',text.ai_mission) - return - end - end - if key=="return2"or kb.isDown("lalt","lctrl","lshift")then - if initField then - FILE.save(CUSTOMENV,'conf/customEnv') - loadGame('custom_puzzle',true) - end - else - FILE.save(CUSTOMENV,'conf/customEnv') - loadGame('custom_clear',true) - end - elseif key=="f"then - SCN.go('custom_field','swipeD') - elseif key=="s"then - SCN.go('custom_sequence','swipeD') - elseif key=="m"then - SCN.go('custom_mission','swipeD') - elseif key=="delete"then - if sure>.3 then - TABLE.cut(FIELD)TABLE.cut(BAG)TABLE.cut(MISSION) - FIELD[1]=DATA.newBoard() - _freshMiniFieldVisible() - TABLE.clear(CUSTOMENV) - TABLE.complete(require"parts.customEnv0",CUSTOMENV) - for _,W in next,scene.widgetList do W:reset()end - FILE.save(DATA.copyMission(),'conf/customMissions') - FILE.save(DATA.copyBoards(),'conf/customBoards') - FILE.save(DATA.copySequence(),'conf/customSequence') - FILE.save(CUSTOMENV,'conf/customEnv') - sure=0 - SFX.play('finesseError',.7) - BG.set(CUSTOMENV.bg) - BGM.play(CUSTOMENV.bgm) - else - sure=1 - end - elseif key=="f1"then - SCN.go('mod','swipeD') - elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then - local str="Techmino Quest:"..DATA.copyQuestArgs().."!" - if #BAG>0 then str=str..DATA.copySequence()end - str=str.."!" - if #MISSION>0 then str=str..DATA.copyMission()end - sys.setClipboardText(str.."!"..DATA.copyBoards().."!") - MES.new('check',text.exportSuccess) - elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then - local str=sys.getClipboardText() - local args=STRING.split(str:sub((str:find(":")or 0)+1),"!") - if #args<4 then goto THROW_fail end - if not( - DATA.pasteQuestArgs(args[1])and - DATA.pasteSequence(args[2])and - DATA.pasteMission(args[3]) - )then goto THROW_fail end - TABLE.cut(FIELD) - FIELD[1]=DATA.newBoard() - for i=4,#args do - if args[i]:find("%S")and not DATA.pasteBoard(args[i],i-3)and i<#args then goto THROW_fail end - end - _freshMiniFieldVisible() - MES.new('check',text.importSuccess) - do return end - ::THROW_fail::MES.new('error',text.dataCorrupted) - elseif key=="escape"then - FILE.save(CUSTOMENV,'conf/customEnv') - SCN.back() - else - WIDGET.keyPressed(key) - end + if isRep then return end + if key=="return"or key=="return2"then + if CUSTOMENV.opponent~="X"then + if CUSTOMENV.opponent:sub(1,2)=='CC'and CUSTOMENV.sequence=="fixed"then + MES.new('error',text.ai_fixed) + return + end + if #BAG>0 then + for _=1,#BAG do + if BAG[_]>7 then + MES.new('error',text.ai_prebag) + return + end + end + end + if #MISSION>0 then + MES.new('error',text.ai_mission) + return + end + end + if key=="return2"or kb.isDown("lalt","lctrl","lshift")then + if initField then + FILE.save(CUSTOMENV,'conf/customEnv') + loadGame('custom_puzzle',true) + end + else + FILE.save(CUSTOMENV,'conf/customEnv') + loadGame('custom_clear',true) + end + elseif key=="f"then + SCN.go('custom_field','swipeD') + elseif key=="s"then + SCN.go('custom_sequence','swipeD') + elseif key=="m"then + SCN.go('custom_mission','swipeD') + elseif key=="delete"then + if sure>.3 then + TABLE.cut(FIELD)TABLE.cut(BAG)TABLE.cut(MISSION) + FIELD[1]=DATA.newBoard() + _freshMiniFieldVisible() + TABLE.clear(CUSTOMENV) + TABLE.complete(require"parts.customEnv0",CUSTOMENV) + for _,W in next,scene.widgetList do W:reset()end + FILE.save(DATA.copyMission(),'conf/customMissions') + FILE.save(DATA.copyBoards(),'conf/customBoards') + FILE.save(DATA.copySequence(),'conf/customSequence') + FILE.save(CUSTOMENV,'conf/customEnv') + sure=0 + SFX.play('finesseError',.7) + BG.set(CUSTOMENV.bg) + BGM.play(CUSTOMENV.bgm) + else + sure=1 + end + elseif key=="f1"then + SCN.go('mod','swipeD') + elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then + local str="Techmino Quest:"..DATA.copyQuestArgs().."!" + if #BAG>0 then str=str..DATA.copySequence()end + str=str.."!" + if #MISSION>0 then str=str..DATA.copyMission()end + sys.setClipboardText(str.."!"..DATA.copyBoards().."!") + MES.new('check',text.exportSuccess) + elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then + local str=sys.getClipboardText() + local args=STRING.split(str:sub((str:find(":")or 0)+1),"!") + if #args<4 then goto THROW_fail end + if not( + DATA.pasteQuestArgs(args[1])and + DATA.pasteSequence(args[2])and + DATA.pasteMission(args[3]) + )then goto THROW_fail end + TABLE.cut(FIELD) + FIELD[1]=DATA.newBoard() + for i=4,#args do + if args[i]:find("%S")and not DATA.pasteBoard(args[i],i-3)and i<#args then goto THROW_fail end + end + _freshMiniFieldVisible() + MES.new('check',text.importSuccess) + do return end + ::THROW_fail::MES.new('error',text.dataCorrupted) + elseif key=="escape"then + FILE.save(CUSTOMENV,'conf/customEnv') + SCN.back() + else + WIDGET.keyPressed(key) + end end function scene.update(dt) - if sure>0 then sure=sure-dt end + if sure>0 then sure=sure-dt end end function scene.draw() - gc.translate(0,-WIDGET.scrollPos) - setFont(30) + gc.translate(0,-WIDGET.scrollPos) + setFont(30) - --Sequence - if #MISSION>0 then - gc.setColor(1,CUSTOMENV.missionKill and 0 or 1,int(TIME()*6.26)%2) - gc.print("#"..#MISSION,70,220) - end + --Sequence + if #MISSION>0 then + gc.setColor(1,CUSTOMENV.missionKill and 0 or 1,int(TIME()*6.26)%2) + gc.print("#"..#MISSION,70,220) + end - --Field content - if initField then - gc.push('transform') - gc.translate(330,240) - gc.scale(.5) - gc.setColor(1,1,1) - gc.setLineWidth(3) - gc.rectangle('line',-2,-2,304,604) - local F=FIELD[1] - local cross=TEXTURE.puzzleMark[-1] - local texture=SKIN.lib[SETTING.skinSet] - for y=1,20 do for x=1,10 do - local B=F[y][x] - if B>0 then - gc.draw(texture[B],30*x-30,600-30*y) - elseif B==-1 then - gc.draw(cross,30*x-30,600-30*y) - end - end end - gc.pop() - if #FIELD>1 then - gc.setColor(1,1,int(TIME()*6.26)%2) - gc.print("+"..#FIELD-1,490,220) - end - end + --Field content + if initField then + gc.push('transform') + gc.translate(330,240) + gc.scale(.5) + gc.setColor(1,1,1) + gc.setLineWidth(3) + gc.rectangle('line',-2,-2,304,604) + local F=FIELD[1] + local cross=TEXTURE.puzzleMark[-1] + local texture=SKIN.lib[SETTING.skinSet] + for y=1,20 do for x=1,10 do + local B=F[y][x] + if B>0 then + gc.draw(texture[B],30*x-30,600-30*y) + elseif B==-1 then + gc.draw(cross,30*x-30,600-30*y) + end + end end + gc.pop() + if #FIELD>1 then + gc.setColor(1,1,int(TIME()*6.26)%2) + gc.print("+"..#FIELD-1,490,220) + end + end - --Sequence - if #BAG>0 then - gc.setColor(1,1,int(TIME()*6.26)%2) - gc.print("#"..#BAG,615,220) - end + --Sequence + if #BAG>0 then + gc.setColor(1,1,int(TIME()*6.26)%2) + gc.print("#"..#BAG,615,220) + end - gc.setColor(COLOR.Z) - gc.print(CUSTOMENV.sequence,610,250) + gc.setColor(COLOR.Z) + gc.print(CUSTOMENV.sequence,610,250) - --Confirm reset - if sure>0 then - gc.setColor(1,1,1,sure) - gc.draw(TEXTURE.sure,920,50) - end - gc.translate(0, WIDGET.scrollPos) + --Confirm reset + if sure>0 then + gc.setColor(1,1,1,sure) + gc.draw(TEXTURE.sure,920,50) + end + gc.translate(0, WIDGET.scrollPos) end scene.widgetScrollHeight=400 scene.widgetList={ - WIDGET.newText{name="title", x=520, y=15,font=70,align='R'}, - WIDGET.newText{name="subTitle", x=530, y=60,font=35,align='L',color='H'}, + WIDGET.newText{name="title", x=520,y=15,font=70,align='R'}, + WIDGET.newText{name="subTitle",x=530,y=60,font=35,align='L',color='H'}, - WIDGET.newKey{name="reset", x=1110, y=90,w=230,h=90,color='R',code=pressKey"delete"}, - WIDGET.newKey{name="mod", x=1110, y=200,w=230,h=90,color='Z',code=pressKey"f1"}, + WIDGET.newKey{name="reset", x=1110,y=90,w=230,h=90,color='R',code=pressKey"delete"}, + WIDGET.newKey{name="mod", x=1110,y=200,w=230,h=90,color='Z',code=pressKey"f1"}, - --Mission / Field / Sequence - WIDGET.newKey{name="mission", x=170, y=180,w=240,h=80,color='N',font=25,code=pressKey"m"}, - WIDGET.newKey{name="field", x=450, y=180,w=240,h=80,color='A',font=25,code=pressKey"f"}, - WIDGET.newKey{name="sequence", x=730, y=180,w=240,h=80,color='W',font=25,code=pressKey"s"}, + --Mission / Field / Sequence + WIDGET.newKey{name="mission", x=170,y=180,w=240,h=80,color='N',font=25,code=pressKey"m"}, + WIDGET.newKey{name="field", x=450,y=180,w=240,h=80,color='A',font=25,code=pressKey"f"}, + WIDGET.newKey{name="sequence", x=730,y=180,w=240,h=80,color='W',font=25,code=pressKey"s"}, - WIDGET.newText{name="noMsn", x=50, y=220,align='L',color='H',hideF=function()return MISSION[1]end}, - WIDGET.newText{name="defSeq", x=610, y=220,align='L',color='H',hideF=function()return BAG[1]end}, + WIDGET.newText{name="noMsn", x=50, y=220,align='L',color='H',hideF=function()return MISSION[1]end}, + WIDGET.newText{name="defSeq", x=610,y=220,align='L',color='H',hideF=function()return BAG[1]end}, - --Selectors - WIDGET.newSelector{name="opponent", x=170,y=330,w=260,color='R',list=sList.opponent, disp=CUSval("opponent"), code=CUSsto("opponent")}, - WIDGET.newSelector{name="life", x=170,y=410,w=260,color='R',list=sList.life, disp=CUSval("life"), code=CUSsto("life")}, - WIDGET.newSelector{name="pushSpeed", x=170,y=520,w=260,color='V',list=sList.pushSpeed, disp=CUSval("pushSpeed"), code=CUSsto("pushSpeed")}, - WIDGET.newSelector{name="garbageSpeed", x=170,y=600,w=260,color='V',list=sList.pushSpeed, disp=CUSval("garbageSpeed"),code=CUSsto("garbageSpeed")}, - WIDGET.newSelector{name="visible", x=170,y=710,w=260,color='lB',list=sList.visible, disp=CUSval("visible"), code=CUSsto("visible")}, - WIDGET.newSelector{name="freshLimit", x=170,y=790,w=260,color='lB',list=sList.freshLimit, disp=CUSval("freshLimit"), code=CUSsto("freshLimit")}, + --Selectors + WIDGET.newSelector{name="opponent", x=170,y=330,w=260,color='R',list=sList.opponent, disp=CUSval("opponent"), code=CUSsto("opponent")}, + WIDGET.newSelector{name="life", x=170,y=410,w=260,color='R',list=sList.life, disp=CUSval("life"), code=CUSsto("life")}, + WIDGET.newSelector{name="pushSpeed", x=170,y=520,w=260,color='V',list=sList.pushSpeed, disp=CUSval("pushSpeed"), code=CUSsto("pushSpeed")}, + WIDGET.newSelector{name="garbageSpeed",x=170,y=600,w=260,color='V',list=sList.pushSpeed, disp=CUSval("garbageSpeed"),code=CUSsto("garbageSpeed")}, + WIDGET.newSelector{name="visible", x=170,y=710,w=260,color='lB',list=sList.visible, disp=CUSval("visible"), code=CUSsto("visible")}, + WIDGET.newSelector{name="freshLimit", x=170,y=790,w=260,color='lB',list=sList.freshLimit,disp=CUSval("freshLimit"), code=CUSsto("freshLimit")}, - WIDGET.newSelector{name="fieldH", x=450,y=600,w=260,color='N',list=sList.fieldH, disp=CUSval("fieldH"), code=CUSsto("fieldH")}, - WIDGET.newSelector{name="heightLimit", x=450,y=710,w=260,color='S',list=sList.heightLimit, disp=CUSval("heightLimit"), code=CUSsto("heightLimit")}, - WIDGET.newSelector{name="bufferLimit", x=450,y=790,w=260,color='B',list=sList.bufferLimit, disp=CUSval("bufferLimit"), code=CUSsto("bufferLimit")}, + WIDGET.newSelector{name="fieldH", x=450,y=600,w=260,color='N',list=sList.fieldH, disp=CUSval("fieldH"), code=CUSsto("fieldH")}, + WIDGET.newSelector{name="heightLimit", x=450,y=710,w=260,color='S',list=sList.heightLimit,disp=CUSval("heightLimit"), code=CUSsto("heightLimit")}, + WIDGET.newSelector{name="bufferLimit", x=450,y=790,w=260,color='B',list=sList.bufferLimit,disp=CUSval("bufferLimit"), code=CUSsto("bufferLimit")}, - WIDGET.newSelector{name="drop",x=730,y=330,w=260,color='O',list=sList.drop,disp=CUSval("drop"),code=CUSsto("drop")}, - WIDGET.newSelector{name="lock",x=730,y=410,w=260,color='O',list=sList.lock,disp=CUSval("lock"),code=CUSsto("lock")}, - WIDGET.newSelector{name="wait",x=730,y=520,w=260,color='G',list=sList.wait,disp=CUSval("wait"),code=CUSsto("wait")}, - WIDGET.newSelector{name="fall",x=730,y=600,w=260,color='G',list=sList.fall,disp=CUSval("fall"),code=CUSsto("fall")}, + WIDGET.newSelector{name="drop", x=730,y=330,w=260,color='O',list=sList.drop,disp=CUSval("drop"),code=CUSsto("drop")}, + WIDGET.newSelector{name="lock", x=730,y=410,w=260,color='O',list=sList.lock,disp=CUSval("lock"),code=CUSsto("lock")}, + WIDGET.newSelector{name="wait", x=730,y=520,w=260,color='G',list=sList.wait,disp=CUSval("wait"),code=CUSsto("wait")}, + WIDGET.newSelector{name="fall", x=730,y=600,w=260,color='G',list=sList.fall,disp=CUSval("fall"),code=CUSsto("fall")}, - --Copy / Paste / Start - WIDGET.newButton{name="copy", x=1070, y=300,w=310,h=70,color='lR',font=25,code=pressKey"cC"}, - WIDGET.newButton{name="paste", x=1070, y=380,w=310,h=70,color='lB',font=25,code=pressKey"cV"}, - WIDGET.newButton{name="clear", x=1070, y=460,w=310,h=70,color='lY',font=35,code=pressKey"return"}, - WIDGET.newButton{name="puzzle", x=1070, y=540,w=310,h=70,color='lM',font=35,code=pressKey"return2",hideF=function()return not initField end}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,fText=TEXTURE.back,code=pressKey"escape"}, + --Copy / Paste / Start + WIDGET.newButton{name="copy", x=1070,y=300,w=310,h=70,color='lR',font=25,code=pressKey"cC"}, + WIDGET.newButton{name="paste", x=1070,y=380,w=310,h=70,color='lB',font=25,code=pressKey"cV"}, + WIDGET.newButton{name="clear", x=1070,y=460,w=310,h=70,color='lY',font=35,code=pressKey"return"}, + WIDGET.newButton{name="puzzle", x=1070,y=540,w=310,h=70,color='lM',font=35,code=pressKey"return2",hideF=function()return not initField end}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=pressKey"escape"}, - --Special rules - WIDGET.newSwitch{name="ospin", x=830, y=750,disp=CUSval("ospin"), code=CUSrev("ospin")}, - WIDGET.newSwitch{name="fineKill", x=830, y=840,disp=CUSval("fineKill"), code=CUSrev("fineKill")}, - WIDGET.newSwitch{name="b2bKill", x=830, y=930,disp=CUSval("b2bKill"), code=CUSrev("b2bKill")}, - WIDGET.newSwitch{name="easyFresh", x=1170, y=750,disp=CUSval("easyFresh"), code=CUSrev("easyFresh")}, - WIDGET.newSwitch{name="deepDrop", x=1170, y=840,disp=CUSval("deepDrop"), code=CUSrev("deepDrop")}, - WIDGET.newSwitch{name="bone", x=1170, y=930,disp=CUSval("bone"), code=CUSrev("bone")}, + --Special rules + WIDGET.newSwitch{name="ospin", x=830, y=750,disp=CUSval("ospin"), code=CUSrev("ospin")}, + WIDGET.newSwitch{name="fineKill", x=830, y=840,disp=CUSval("fineKill"), code=CUSrev("fineKill")}, + WIDGET.newSwitch{name="b2bKill", x=830, y=930,disp=CUSval("b2bKill"), code=CUSrev("b2bKill")}, + WIDGET.newSwitch{name="easyFresh",x=1170,y=750,disp=CUSval("easyFresh"),code=CUSrev("easyFresh")}, + WIDGET.newSwitch{name="deepDrop", x=1170,y=840,disp=CUSval("deepDrop"), code=CUSrev("deepDrop")}, + WIDGET.newSwitch{name="bone", x=1170,y=930,disp=CUSval("bone"), code=CUSrev("bone")}, - --Next & Hold - WIDGET.newSlider{name="nextCount", x=120,y=940,w=200,unit=6, disp=CUSval("nextCount"),code=CUSsto("nextCount")}, - WIDGET.newSlider{name="holdCount", x=120,y=1030,w=200,unit=6, disp=CUSval("holdCount"),code=CUSsto("holdCount")}, - WIDGET.newSwitch{name="infHold", x=560,y=940, disp=CUSval("infHold"),code=CUSrev("infHold"),hideF=function()return CUSTOMENV.holdCount==0 end}, - WIDGET.newSwitch{name="phyHold", x=560,y=1030, disp=CUSval("phyHold"),code=CUSrev("phyHold"),hideF=function()return CUSTOMENV.holdCount==0 end}, + --Next & Hold + WIDGET.newSlider{name="nextCount",x=120, y=940,w=200,unit=6, disp=CUSval("nextCount"),code=CUSsto("nextCount")}, + WIDGET.newSlider{name="holdCount",x=120, y=1030,w=200,unit=6,disp=CUSval("holdCount"),code=CUSsto("holdCount")}, + WIDGET.newSwitch{name="infHold", x=560, y=940, disp=CUSval("infHold"),code=CUSrev("infHold"),hideF=function()return CUSTOMENV.holdCount==0 end}, + WIDGET.newSwitch{name="phyHold", x=560, y=1030, disp=CUSval("phyHold"),code=CUSrev("phyHold"),hideF=function()return CUSTOMENV.holdCount==0 end}, - --BG & BGM - WIDGET.newSelector{name="bg", x=840, y=1030,w=250,color='Y',list=BG.getList(),disp=CUSval("bg"),code=function(i)CUSTOMENV.bg=i BG.set(i)end}, - WIDGET.newSelector{name="bgm", x=1120, y=1030,w=250,color='Y',list=BGM.getList(),disp=CUSval("bgm"),code=function(i)CUSTOMENV.bgm=i BGM.play(i)end}, + --BG & BGM + WIDGET.newSelector{name="bg", x=840, y=1030,w=250,color='Y',list=BG.getList(),disp=CUSval("bg"),code=function(i)CUSTOMENV.bg=i BG.set(i)end}, + WIDGET.newSelector{name="bgm", x=1120,y=1030,w=250,color='Y',list=BGM.getList(),disp=CUSval("bgm"),code=function(i)CUSTOMENV.bgm=i BGM.play(i)end}, } return scene \ No newline at end of file diff --git a/parts/scenes/custom_field.lua b/parts/scenes/custom_field.lua index a9a26b19..1961be79 100644 --- a/parts/scenes/custom_field.lua +++ b/parts/scenes/custom_field.lua @@ -17,133 +17,133 @@ local demo--If show x local page local penKey={ - ["1"]=1,["2"]=2,["3"]=3,["4"]=4,["5"]=5,["6"]=6,["7"]=7,["8"]=8, - q=9,w=10,e=11,r=12,t=13,y=14,u=15,i=16, - a=17,s=18,d=19,f=20,g=21,h=22,j=23,k=24, - z=0,x=-1, + ["1"]=1,["2"]=2,["3"]=3,["4"]=4,["5"]=5,["6"]=6,["7"]=7,["8"]=8, + q=9,w=10,e=11,r=12,t=13,y=14,u=15,i=16, + a=17,s=18,d=19,f=20,g=21,h=22,j=23,k=24, + z=0,x=-1, } local minoPosCode={ - [102]=1,[1121]=1,--Z - [195]=2,[610]=2,--S - [39]=3,[1569]=3,[228]=3,[1091]=3,--J - [135]=4,[547]=4,[225]=4,[1602]=4,--L - [71]=5,[609]=5,[226]=5,[1122]=5,--T - [99]=6,--O - [15]=7,[4641]=7,--I - [1606]=8,[2273]=8,--Z5 - [3139]=9,[740]=9,--S5 - [103]=10,[1633]=10,[230]=10,[1123]=10,--P - [199]=11,[611]=11,[227]=11,[1634]=11,--Q - [738]=12,[3170]=12,[1252]=12,[1219]=12,--F - [2274]=13,[1126]=13,[1249]=13,[1730]=13,--E - [1095]=14,[737]=14,[3650]=14,[2276]=14,--T5 - [167]=15,[1571]=15,[229]=15,[1603]=15,--U - [2183]=16,[551]=16,[3617]=16,[3716]=16,--V - [614]=17,[3169]=17,[1732]=17,[2243]=17,--W - [1250]=18,--X - [47]=19,[12833]=19,[488]=19,[9283]=19,--J5 - [271]=20,[4643]=20,[481]=20,[13378]=20,--L5 - [79]=21,[5665]=21,[484]=21,[9314]=21,--R - [143]=22,[4705]=22,[482]=22,[9794]=22,--Y - [110]=23,[9761]=23,[236]=23,[9313]=23,--N - [391]=24,[4706]=24,[451]=24,[5698]=24,--H - [31]=25,[21025]=25,--I5 - [7]=26,[545]=26,--I3 - [67]=27,[35]=27,[97]=27,[98]=27,--C - [3]=28,[33]=28,--I2 - [1]=29,--O1 + [102]=1,[1121]=1,--Z + [195]=2,[610]=2,--S + [39]=3,[1569]=3,[228]=3,[1091]=3,--J + [135]=4,[547]=4,[225]=4,[1602]=4,--L + [71]=5,[609]=5,[226]=5,[1122]=5,--T + [99]=6,--O + [15]=7,[4641]=7,--I + [1606]=8,[2273]=8,--Z5 + [3139]=9,[740]=9,--S5 + [103]=10,[1633]=10,[230]=10,[1123]=10,--P + [199]=11,[611]=11,[227]=11,[1634]=11,--Q + [738]=12,[3170]=12,[1252]=12,[1219]=12,--F + [2274]=13,[1126]=13,[1249]=13,[1730]=13,--E + [1095]=14,[737]=14,[3650]=14,[2276]=14,--T5 + [167]=15,[1571]=15,[229]=15,[1603]=15,--U + [2183]=16,[551]=16,[3617]=16,[3716]=16,--V + [614]=17,[3169]=17,[1732]=17,[2243]=17,--W + [1250]=18,--X + [47]=19,[12833]=19,[488]=19,[9283]=19,--J5 + [271]=20,[4643]=20,[481]=20,[13378]=20,--L5 + [79]=21,[5665]=21,[484]=21,[9314]=21,--R + [143]=22,[4705]=22,[482]=22,[9794]=22,--Y + [110]=23,[9761]=23,[236]=23,[9313]=23,--N + [391]=24,[4706]=24,[451]=24,[5698]=24,--H + [31]=25,[21025]=25,--I5 + [7]=26,[545]=26,--I3 + [67]=27,[35]=27,[97]=27,[98]=27,--C + [3]=28,[33]=28,--I2 + [1]=29,--O1 } local function _pTouch(x,y) - if not curPen then return end - for i=1,#penPath do - if x==penPath[i][1]and y==penPath[i][2]then - return - end - end - if #penPath==0 then - penMode= - pens[curPen]>0 and(FIELD[page][y][x]~=pens[curPen] and 0 or 1)or - pens[curPen]==0 and 1 or - pens[curPen]==-1 and 0 or - pens[curPen]==-2 and (FIELD[page][y][x]<=0 and 0 or 1) - end - ins(penPath,{x,y}) + if not curPen then return end + for i=1,#penPath do + if x==penPath[i][1]and y==penPath[i][2]then + return + end + end + if #penPath==0 then + penMode= + pens[curPen]>0 and(FIELD[page][y][x]~=pens[curPen] and 0 or 1)or + pens[curPen]==0 and 1 or + pens[curPen]==-1 and 0 or + pens[curPen]==-2 and (FIELD[page][y][x]<=0 and 0 or 1) + end + ins(penPath,{x,y}) end local function _pDraw() - local l=#penPath - if l==0 then return end + local l=#penPath + if l==0 then return end - local C--Color - if penMode==0 then - if pens[curPen]==-2 then - if l<=5 then - local sum=0 - local x,y={},{} - for i=1,l do - ins(x,penPath[i][1]) - ins(y,penPath[i][2]) - end - local minY,minX=min(unpack(y)),min(unpack(x)) - for i=1,#y do - sum=sum+2^((11-(y[i]-minY))*(y[i]-minY)/2+(x[i]-minX)) - end - if minoPosCode[sum]then - C=SETTING.skin[minoPosCode[sum]] - end - else - C=20 - end - else - C=pens[curPen] - end - else - C=0 - end + local C--Color + if penMode==0 then + if pens[curPen]==-2 then + if l<=5 then + local sum=0 + local x,y={},{} + for i=1,l do + ins(x,penPath[i][1]) + ins(y,penPath[i][2]) + end + local minY,minX=min(unpack(y)),min(unpack(x)) + for i=1,#y do + sum=sum+2^((11-(y[i]-minY))*(y[i]-minY)/2+(x[i]-minX)) + end + if minoPosCode[sum]then + C=SETTING.skin[minoPosCode[sum]] + end + else + C=20 + end + else + C=pens[curPen] + end + else + C=0 + end - if C then - for i=1,l do - FIELD[page][penPath[i][2]][penPath[i][1]]=C - end - end - penPath={} - penMode=0 + if C then + for i=1,l do + FIELD[page][penPath[i][2]][penPath[i][1]]=C + end + end + penPath={} + penMode=0 end function scene.sceneInit() - sure=0 - curPen=false - penMode=0 - penX,penY=1,1 - demo=false - page=1 + sure=0 + curPen=false + penMode=0 + penX,penY=1,1 + demo=false + page=1 end function scene.sceneBack() - FILE.save(DATA.copyBoards(),'conf/customBoards') + FILE.save(DATA.copyBoards(),'conf/customBoards') end function scene.mouseMove(x,y) - local sx,sy=int((x-200)/30)+1,20-int((y-60)/30) - if sx>=1 and sx<=10 and sy>=1 and sy<=20 then - penX,penY=sx,sy - if curPen then _pTouch(sx,sy)end - else - penX,penY=nil - end + local sx,sy=int((x-200)/30)+1,20-int((y-60)/30) + if sx>=1 and sx<=10 and sy>=1 and sy<=20 then + penX,penY=sx,sy + if curPen then _pTouch(sx,sy)end + else + penX,penY=nil + end end function scene.mouseDown(x,y,k) - if not curPen then - curPen=k - elseif curPen~=k then - curPen=false - penPath={} - end - scene.mouseMove(x,y) + if not curPen then + curPen=k + elseif curPen~=k then + curPen=false + penPath={} + end + scene.mouseMove(x,y) end function scene.mouseUp(_,_,k) - if curPen==k then - _pDraw() - curPen=false - end + if curPen==k then + _pDraw() + curPen=false + end end function scene.touchDown(x,y)scene.mouseDown(x,y,1)end @@ -151,343 +151,343 @@ function scene.touchMove(x,y)scene.mouseMove(x,y)end function scene.touchUp(x,y)scene.mouseUp(x,y,1)end function scene.keyDown(key) - if key=="up"or key=="down"or key=="left"or key=="right"then - if not penX or not penY then penX,penY=1,1 end - if key=="up"then - if penY<20 then penY=penY+1 end - elseif key=="down"then - if penY>1 then penY=penY-1 end - elseif key=="left"then - if penX>1 then penX=penX-1 end - elseif key=="right"then - if penX<10 then penX=penX+1 end - end - if kb.isDown("space")then - scene.keyDown("space") - end - elseif key=="space"then - if penX and penY then - curPen=1 - _pTouch(penX,penY) - end - elseif key=="delete"then - if sure>.3 then - for y=1,20 do for x=1,10 do FIELD[page][y][x]=0 end end - sure=0 - SFX.play('finesseError',.7) - else - sure=1 - end - elseif key=="j"then - demo=not demo - elseif key=="k"then - ins(FIELD[page],1,{21,21,21,21,21,21,21,21,21,21}) - FIELD[page][21]=nil - SFX.play('blip') - elseif key=="l"then - local F=FIELD[page] - for i=20,1,-1 do - for j=1,10 do - if F[i][j]<=0 then goto CONTINUE_notFull end - end - SYSFX.newShade(3,200,660-30*i,300,30) - SYSFX.newRectRipple(3,200,660-30*i,300,30) - rem(F,i) - ::CONTINUE_notFull:: - end - if #F~=20 then - repeat - F[#F+1]={0,0,0,0,0,0,0,0,0,0} - until#F==20 - SFX.play('clear_3',.8) - SFX.play('fall',.8) - end - elseif key=="n"then - ins(FIELD,page+1,DATA.newBoard(FIELD[page])) - page=page+1 - SFX.play('blip_1',.8) - SYSFX.newShade(3,200,60,300,600,.5,1,.5) - elseif key=="m"then - rem(FIELD,page) - page=max(page-1,1) - if not FIELD[1]then - ins(FIELD,DATA.newBoard()) - end - SYSFX.newShade(3,200,60,300,600,1,.5,.5) - SFX.play('clear_4',.8) - SFX.play('fall',.8) - elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then - sys.setClipboardText("Techmino Field:"..DATA.copyBoard(page)) - MES.new('check',text.exportSuccess) - elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then - local str=sys.getClipboardText() - local p=str:find(":")--ptr* - if p then - if not str:sub(1,p-1):find("Field")then - MES.new('error',text.pasteWrongPlace) - end - str=str:sub(p+1) - end - if DATA.pasteBoard(str,page)then - MES.new('check',text.importSuccess) - else - MES.new('error',text.dataCorrupted) - end - elseif key=="pageup"then - page=max(page-1,1) - elseif key=="pagedown"then - page=min(page+1,#FIELD) - elseif key=="escape"then - if curPen then - curPen=false - penPath={} - else - SCN.back() - end - else - pens[curPen]=penKey[key]or pens[curPen] - end + if key=="up"or key=="down"or key=="left"or key=="right"then + if not penX or not penY then penX,penY=1,1 end + if key=="up"then + if penY<20 then penY=penY+1 end + elseif key=="down"then + if penY>1 then penY=penY-1 end + elseif key=="left"then + if penX>1 then penX=penX-1 end + elseif key=="right"then + if penX<10 then penX=penX+1 end + end + if kb.isDown("space")then + scene.keyDown("space") + end + elseif key=="space"then + if penX and penY then + curPen=1 + _pTouch(penX,penY) + end + elseif key=="delete"then + if sure>.3 then + for y=1,20 do for x=1,10 do FIELD[page][y][x]=0 end end + sure=0 + SFX.play('finesseError',.7) + else + sure=1 + end + elseif key=="j"then + demo=not demo + elseif key=="k"then + ins(FIELD[page],1,{21,21,21,21,21,21,21,21,21,21}) + FIELD[page][21]=nil + SFX.play('blip') + elseif key=="l"then + local F=FIELD[page] + for i=20,1,-1 do + for j=1,10 do + if F[i][j]<=0 then goto CONTINUE_notFull end + end + SYSFX.newShade(3,200,660-30*i,300,30) + SYSFX.newRectRipple(3,200,660-30*i,300,30) + rem(F,i) + ::CONTINUE_notFull:: + end + if #F~=20 then + repeat + F[#F+1]={0,0,0,0,0,0,0,0,0,0} + until#F==20 + SFX.play('clear_3',.8) + SFX.play('fall',.8) + end + elseif key=="n"then + ins(FIELD,page+1,DATA.newBoard(FIELD[page])) + page=page+1 + SFX.play('blip_1',.8) + SYSFX.newShade(3,200,60,300,600,.5,1,.5) + elseif key=="m"then + rem(FIELD,page) + page=max(page-1,1) + if not FIELD[1]then + ins(FIELD,DATA.newBoard()) + end + SYSFX.newShade(3,200,60,300,600,1,.5,.5) + SFX.play('clear_4',.8) + SFX.play('fall',.8) + elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then + sys.setClipboardText("Techmino Field:"..DATA.copyBoard(page)) + MES.new('check',text.exportSuccess) + elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then + local str=sys.getClipboardText() + local p=str:find(":")--ptr* + if p then + if not str:sub(1,p-1):find("Field")then + MES.new('error',text.pasteWrongPlace) + end + str=str:sub(p+1) + end + if DATA.pasteBoard(str,page)then + MES.new('check',text.importSuccess) + else + MES.new('error',text.dataCorrupted) + end + elseif key=="pageup"then + page=max(page-1,1) + elseif key=="pagedown"then + page=min(page+1,#FIELD) + elseif key=="escape"then + if curPen then + curPen=false + penPath={} + else + SCN.back() + end + else + pens[curPen]=penKey[key]or pens[curPen] + end end function scene.keyUp(key) - if key=="space"then - _pDraw() - curPen=false - end + if key=="space"then + _pDraw() + curPen=false + end end function scene.update(dt) - if sure>0 then sure=sure-dt end + if sure>0 then sure=sure-dt end end function scene.draw() - gc.translate(200,60) + gc.translate(200,60) - --Draw grid - gc.setColor(1,1,1,.2) - gc.setLineWidth(1) - for x=1,9 do gc.line(30*x,0,30*x,600)end - for y=0,19 do gc.line(0,30*y,300,30*y)end + --Draw grid + gc.setColor(1,1,1,.2) + gc.setLineWidth(1) + for x=1,9 do gc.line(30*x,0,30*x,600)end + for y=0,19 do gc.line(0,30*y,300,30*y)end - --Draw field - gc.setColor(COLOR.Z) - gc.setLineWidth(2) - gc.rectangle('line',-2,-2,304,604,5) - gc.setLineWidth(2) - local cross=TEXTURE.puzzleMark[-1] - local F=FIELD[page] - local texture=SKIN.lib[SETTING.skinSet] - for y=1,20 do for x=1,10 do - local B=F[y][x] - if B>0 then - gc.draw(texture[B],30*x-30,600-30*y) - elseif B==-1 and not demo then - gc.draw(cross,30*x-30,600-30*y) - end - end end + --Draw field + gc.setColor(COLOR.Z) + gc.setLineWidth(2) + gc.rectangle('line',-2,-2,304,604,5) + gc.setLineWidth(2) + local cross=TEXTURE.puzzleMark[-1] + local F=FIELD[page] + local texture=SKIN.lib[SETTING.skinSet] + for y=1,20 do for x=1,10 do + local B=F[y][x] + if B>0 then + gc.draw(texture[B],30*x-30,600-30*y) + elseif B==-1 and not demo then + gc.draw(cross,30*x-30,600-30*y) + end + end end - --Draw pen - if penX and penY then - local x,y=30*penX,600-30*penY - if curPen==1 or curPen==2 then - gc.setLineWidth(5) - gc.rectangle('line',x-30,y,30,30,4) - elseif curPen==3 then - gc.setLineWidth(3) - gc.line(x-15,y,x-30,y+15) - gc.line(x,y,x-30,y+30) - gc.line(x,y+15,x-15,y+30) - end - gc.setLineWidth(2) - gc.rectangle('line',x-30,y,30,30,3) - gc.setColor(1,1,1,.2) - gc.rectangle('fill',x-30,y,30,30,3) - end + --Draw pen + if penX and penY then + local x,y=30*penX,600-30*penY + if curPen==1 or curPen==2 then + gc.setLineWidth(5) + gc.rectangle('line',x-30,y,30,30,4) + elseif curPen==3 then + gc.setLineWidth(3) + gc.line(x-15,y,x-30,y+15) + gc.line(x,y,x-30,y+30) + gc.line(x,y+15,x-15,y+30) + end + gc.setLineWidth(2) + gc.rectangle('line',x-30,y,30,30,3) + gc.setColor(1,1,1,.2) + gc.rectangle('fill',x-30,y,30,30,3) + end - --Draw smart pen path - if #penPath>0 then - gc.setLineWidth(4) - if penMode==0 then - if pens[curPen]==-2 then - if #penPath<=5 then - gc.setColor(COLOR.rainbow_light(TIME()*6.2)) - else - gc.setColor(.9,.9,.9,.7+.2*math.sin(TIME()*12.6)) - end - for i=1,#penPath do - gc.rectangle('line',30*penPath[i][1]-30+2,600-30*penPath[i][2]+2,30-4,30-4,3) - end - elseif pens[curPen]==-1 then - gc.setColor(1,1,0,.7+.3*math.sin(TIME()*12.6)) - for i=1,#penPath do - gc.draw(cross,30*penPath[i][1]-30,600-30*penPath[i][2]) - end - elseif pens[curPen]==0 then - gc.setColor(1,0,0) - for i=1,#penPath do - gc.draw(cross,30*penPath[i][1]-30+math.random(-1,1),600-30*penPath[i][2]+math.random(-1,1)) - end - else - local c=minoColor[pens[curPen]] - gc.setColor(c[1],c[2],c[3],.7+.2*math.sin(TIME()*12.6)) - for i=1,#penPath do - gc.rectangle('line',30*penPath[i][1]-30+2,600-30*penPath[i][2]+2,30-4,30-4,3) - end - end - else - gc.setColor(1,0,0) - for i=1,#penPath do - gc.draw(cross,30*penPath[i][1]-30+math.random(-1,1),600-30*penPath[i][2]+math.random(-1,1)) - end - end - end - gc.translate(-200,-60) + --Draw smart pen path + if #penPath>0 then + gc.setLineWidth(4) + if penMode==0 then + if pens[curPen]==-2 then + if #penPath<=5 then + gc.setColor(COLOR.rainbow_light(TIME()*6.2)) + else + gc.setColor(.9,.9,.9,.7+.2*math.sin(TIME()*12.6)) + end + for i=1,#penPath do + gc.rectangle('line',30*penPath[i][1]-30+2,600-30*penPath[i][2]+2,30-4,30-4,3) + end + elseif pens[curPen]==-1 then + gc.setColor(1,1,0,.7+.3*math.sin(TIME()*12.6)) + for i=1,#penPath do + gc.draw(cross,30*penPath[i][1]-30,600-30*penPath[i][2]) + end + elseif pens[curPen]==0 then + gc.setColor(1,0,0) + for i=1,#penPath do + gc.draw(cross,30*penPath[i][1]-30+math.random(-1,1),600-30*penPath[i][2]+math.random(-1,1)) + end + else + local c=minoColor[pens[curPen]] + gc.setColor(c[1],c[2],c[3],.7+.2*math.sin(TIME()*12.6)) + for i=1,#penPath do + gc.rectangle('line',30*penPath[i][1]-30+2,600-30*penPath[i][2]+2,30-4,30-4,3) + end + end + else + gc.setColor(1,0,0) + for i=1,#penPath do + gc.draw(cross,30*penPath[i][1]-30+math.random(-1,1),600-30*penPath[i][2]+math.random(-1,1)) + end + end + end + gc.translate(-200,-60) - --Draw page - setFont(55) - gc.setColor(COLOR.Z) - mStr(page,100,530) - mStr(#FIELD,100,600) - gc.rectangle('fill',50,600,100,6) + --Draw page + setFont(55) + gc.setColor(COLOR.Z) + mStr(page,100,530) + mStr(#FIELD,100,600) + gc.rectangle('fill',50,600,100,6) - --Draw mouse & pen color - gc.translate(560,475) - --Mouse - gc.setLineWidth(2) - gc.rectangle('line',0,0,80,110,5) - gc.line(0,40,80,40) - gc.line(33,0,33,25,47,25,47,0) - gc.line(40,25,40,40) + --Draw mouse & pen color + gc.translate(560,475) + --Mouse + gc.setLineWidth(2) + gc.rectangle('line',0,0,80,110,5) + gc.line(0,40,80,40) + gc.line(33,0,33,25,47,25,47,0) + gc.line(40,25,40,40) - --Left button - if pens[1]>0 then - gc.setColor(minoColor[pens[1]]) - gc.rectangle('fill',5,5,23,30,3) - elseif pens[1]==-1 then - gc.setColor(COLOR.Z) - gc.line(5,5,28,35) - gc.line(28,5,5,35) - elseif pens[1]==-2 then - if penMode==0 then - gc.setLineWidth(13) - gc.setColor(COLOR.rainbow(TIME()*12.6)) - gc.rectangle('fill',5,5,23,30,3) - else - gc.setLineWidth(3) - gc.setColor(1,0,0) - gc.line(5,5,28,35) - gc.line(28,5,5,35) - end - end + --Left button + if pens[1]>0 then + gc.setColor(minoColor[pens[1]]) + gc.rectangle('fill',5,5,23,30,3) + elseif pens[1]==-1 then + gc.setColor(COLOR.Z) + gc.line(5,5,28,35) + gc.line(28,5,5,35) + elseif pens[1]==-2 then + if penMode==0 then + gc.setLineWidth(13) + gc.setColor(COLOR.rainbow(TIME()*12.6)) + gc.rectangle('fill',5,5,23,30,3) + else + gc.setLineWidth(3) + gc.setColor(1,0,0) + gc.line(5,5,28,35) + gc.line(28,5,5,35) + end + end - --Right button - if pens[2]>0 then - gc.setColor(minoColor[pens[2]]) - gc.rectangle('fill',52,5,23,30,3) - elseif pens[2]==-1 then - gc.setColor(COLOR.Z) - gc.setLineWidth(3) - gc.line(52,5,75,35) - gc.line(75,5,52,35) - elseif pens[2]==-2 then - if penMode==0 then - gc.setLineWidth(13) - gc.setColor(COLOR.rainbow(TIME()*12.6)) - gc.rectangle('fill',52,5,23,30,3) - else - gc.setLineWidth(3) - gc.setColor(1,0,0) - gc.line(52,5,75,35) - gc.line(75,5,52,35) - end - end + --Right button + if pens[2]>0 then + gc.setColor(minoColor[pens[2]]) + gc.rectangle('fill',52,5,23,30,3) + elseif pens[2]==-1 then + gc.setColor(COLOR.Z) + gc.setLineWidth(3) + gc.line(52,5,75,35) + gc.line(75,5,52,35) + elseif pens[2]==-2 then + if penMode==0 then + gc.setLineWidth(13) + gc.setColor(COLOR.rainbow(TIME()*12.6)) + gc.rectangle('fill',52,5,23,30,3) + else + gc.setLineWidth(3) + gc.setColor(1,0,0) + gc.line(52,5,75,35) + gc.line(75,5,52,35) + end + end - --Middle button - if pens[3]>0 then - gc.setColor(minoColor[pens[3]]) - gc.rectangle('fill',35,2,10,21,3) - elseif pens[3]==-1 then - gc.setColor(COLOR.Z) - gc.setLineWidth(2) - gc.line(35,2,45,23) - gc.line(45,2,35,23) - elseif pens[3]==-2 then - if penMode==0 then - gc.setLineWidth(13) - gc.setColor(COLOR.rainbow(TIME()*12.6)) - gc.rectangle('fill',35,2,10,21,3) - else - gc.setLineWidth(3) - gc.setColor(1,0,0) - gc.line(35,2,45,23) - gc.line(45,2,35,23) - end - end - gc.translate(-560,-475) + --Middle button + if pens[3]>0 then + gc.setColor(minoColor[pens[3]]) + gc.rectangle('fill',35,2,10,21,3) + elseif pens[3]==-1 then + gc.setColor(COLOR.Z) + gc.setLineWidth(2) + gc.line(35,2,45,23) + gc.line(45,2,35,23) + elseif pens[3]==-2 then + if penMode==0 then + gc.setLineWidth(13) + gc.setColor(COLOR.rainbow(TIME()*12.6)) + gc.rectangle('fill',35,2,10,21,3) + else + gc.setLineWidth(3) + gc.setColor(1,0,0) + gc.line(35,2,45,23) + gc.line(45,2,35,23) + end + end + gc.translate(-560,-475) - --Confirm reset - if sure>0 then - gc.setColor(1,1,1,sure) - mDraw(TEXTURE.sure,990,530,nil,1.2) - end + --Confirm reset + if sure>0 then + gc.setColor(1,1,1,sure) + mDraw(TEXTURE.sure,990,530,nil,1.2) + end - --Block name - setFont(55) - gc.setColor(1,1,1) - for i=1,7 do - local skin=SETTING.skin[i] - mStr(text.block[i],500+skin%8*80,90+80*int(skin/8)) - end + --Block name + setFont(55) + gc.setColor(1,1,1) + for i=1,7 do + local skin=SETTING.skin[i] + mStr(text.block[i],500+skin%8*80,90+80*int(skin/8)) + end end local function _setPen(i)return function(k)pens[k]=i end end scene.widgetList={ - WIDGET.newText{name="title", x=1020,y=5,font=70,align='R'}, - WIDGET.newText{name="subTitle", x=1030,y=50,font=35,align='L',color='H'}, + WIDGET.newText{name="title", x=1020,y=5,font=70,align='R'}, + WIDGET.newText{name="subTitle", x=1030,y=50,font=35,align='L',color='H'}, - WIDGET.newButton{name="b1", x=580, y=130,w=75,fText="",color='R',code=_setPen(1)},--B1 - WIDGET.newButton{name="b2", x=660, y=130,w=75,fText="",color='F',code=_setPen(2)},--B2 - WIDGET.newButton{name="b3", x=740, y=130,w=75,fText="",color='O',code=_setPen(3)},--B3 - WIDGET.newButton{name="b4", x=820, y=130,w=75,fText="",color='Y',code=_setPen(4)},--B4 - WIDGET.newButton{name="b5", x=900, y=130,w=75,fText="",color='L',code=_setPen(5)},--B5 - WIDGET.newButton{name="b6", x=980, y=130,w=75,fText="",color='J',code=_setPen(6)},--B6 - WIDGET.newButton{name="b7", x=1060, y=130,w=75,fText="",color='G',code=_setPen(7)},--B7 - WIDGET.newButton{name="b8", x=1140, y=130,w=75,fText="",color='A',code=_setPen(8)},--B8 + WIDGET.newButton{name="b1", x=580, y=130,w=75,fText="",color='R',code=_setPen(1)},--B1 + WIDGET.newButton{name="b2", x=660, y=130,w=75,fText="",color='F',code=_setPen(2)},--B2 + WIDGET.newButton{name="b3", x=740, y=130,w=75,fText="",color='O',code=_setPen(3)},--B3 + WIDGET.newButton{name="b4", x=820, y=130,w=75,fText="",color='Y',code=_setPen(4)},--B4 + WIDGET.newButton{name="b5", x=900, y=130,w=75,fText="",color='L',code=_setPen(5)},--B5 + WIDGET.newButton{name="b6", x=980, y=130,w=75,fText="",color='J',code=_setPen(6)},--B6 + WIDGET.newButton{name="b7", x=1060,y=130,w=75,fText="",color='G',code=_setPen(7)},--B7 + WIDGET.newButton{name="b8", x=1140,y=130,w=75,fText="",color='A',code=_setPen(8)},--B8 - WIDGET.newButton{name="b9", x=580, y=210,w=75,fText="",color='C',code=_setPen(9)},--B9 - WIDGET.newButton{name="b10", x=660, y=210,w=75,fText="",color='N',code=_setPen(10)},--B10 - WIDGET.newButton{name="b11", x=740, y=210,w=75,fText="",color='S',code=_setPen(11)},--B11 - WIDGET.newButton{name="b12", x=820, y=210,w=75,fText="",color='B',code=_setPen(12)},--B12 - WIDGET.newButton{name="b13", x=900, y=210,w=75,fText="",color='V',code=_setPen(13)},--B13 - WIDGET.newButton{name="b14", x=980, y=210,w=75,fText="",color='P',code=_setPen(14)},--B14 - WIDGET.newButton{name="b15", x=1060, y=210,w=75,fText="",color='M',code=_setPen(15)},--B15 - WIDGET.newButton{name="b16", x=1140, y=210,w=75,fText="",color='W',code=_setPen(16)},--B16 + WIDGET.newButton{name="b9", x=580, y=210,w=75,fText="",color='C',code=_setPen(9)},--B9 + WIDGET.newButton{name="b10", x=660, y=210,w=75,fText="",color='N',code=_setPen(10)},--B10 + WIDGET.newButton{name="b11", x=740, y=210,w=75,fText="",color='S',code=_setPen(11)},--B11 + WIDGET.newButton{name="b12", x=820, y=210,w=75,fText="",color='B',code=_setPen(12)},--B12 + WIDGET.newButton{name="b13", x=900, y=210,w=75,fText="",color='V',code=_setPen(13)},--B13 + WIDGET.newButton{name="b14", x=980, y=210,w=75,fText="",color='P',code=_setPen(14)},--B14 + WIDGET.newButton{name="b15", x=1060,y=210,w=75,fText="",color='M',code=_setPen(15)},--B15 + WIDGET.newButton{name="b16", x=1140,y=210,w=75,fText="",color='W',code=_setPen(16)},--B16 - WIDGET.newButton{name="b17", x=580, y=290,w=75,fText="[ ]",color='dH', code=_setPen(17)},--BONE - WIDGET.newButton{name="b18", x=660, y=290,w=75,fText="N", color='D', code=_setPen(18)},--HIDE - WIDGET.newButton{name="b19", x=740, y=290,w=75,fText="B", color='lY', code=_setPen(19)},--BOMB - WIDGET.newButton{name="b20", x=820, y=290,w=75,fText="_", color='H', code=_setPen(20)},--GB1 - WIDGET.newButton{name="b21", x=900, y=290,w=75,fText="_", color='lH', code=_setPen(21)},--GB2 - WIDGET.newButton{name="b22", x=980, y=290,w=75,fText="_", color='dV', code=_setPen(22)},--GB3 - WIDGET.newButton{name="b23", x=1060, y=290,w=75,fText="_", color='dR', code=_setPen(23)},--GB4 - WIDGET.newButton{name="b24", x=1140, y=290,w=75,fText="_", color='dG', code=_setPen(24)},--GB5 + WIDGET.newButton{name="b17", x=580, y=290,w=75,fText="[ ]",color='dH',code=_setPen(17)},--BONE + WIDGET.newButton{name="b18", x=660, y=290,w=75,fText="N", color='D', code=_setPen(18)},--HIDE + WIDGET.newButton{name="b19", x=740, y=290,w=75,fText="B", color='lY',code=_setPen(19)},--BOMB + WIDGET.newButton{name="b20", x=820, y=290,w=75,fText="_", color='H', code=_setPen(20)},--GB1 + WIDGET.newButton{name="b21", x=900, y=290,w=75,fText="_", color='lH',code=_setPen(21)},--GB2 + WIDGET.newButton{name="b22", x=980, y=290,w=75,fText="_", color='dV',code=_setPen(22)},--GB3 + WIDGET.newButton{name="b23", x=1060,y=290,w=75,fText="_", color='dR',code=_setPen(23)},--GB4 + WIDGET.newButton{name="b24", x=1140,y=290,w=75,fText="_", color='dG',code=_setPen(24)},--GB5 - WIDGET.newButton{name="any", x=600, y=400,w=120,color='lH', font=40,code=_setPen(0)}, - WIDGET.newButton{name="space", x=730, y=400,w=120,color='H', font=65,code=_setPen(-1)}, - WIDGET.newButton{name="smart", x=860, y=400,w=120,color='lG', font=30,code=_setPen(-2)}, - WIDGET.newButton{name="push", x=990, y=400,w=120,h=120,color='lY',font=20,code=pressKey"k"}, - WIDGET.newButton{name="del", x=1120, y=400,w=120,h=120,color='lY',font=20,code=pressKey"l"}, + WIDGET.newButton{name="any", x=600, y=400,w=120,color='lH', font=40,code=_setPen(0)}, + WIDGET.newButton{name="space", x=730, y=400,w=120,color='H', font=65,code=_setPen(-1)}, + WIDGET.newButton{name="smart", x=860, y=400,w=120,color='lG', font=30,code=_setPen(-2)}, + WIDGET.newButton{name="push", x=990, y=400,w=120,h=120,color='lY',font=20,code=pressKey"k"}, + WIDGET.newButton{name="del", x=1120,y=400,w=120,h=120,color='lY',font=20,code=pressKey"l"}, - WIDGET.newButton{name="copy", x=730, y=530,w=120,color='lR', font=35,code=pressKey"cC"}, - WIDGET.newButton{name="paste", x=860, y=530,w=120,color='lB', font=35,code=pressKey"cV"}, - WIDGET.newButton{name="clear", x=990, y=530,w=120,color='Z', font=40,code=pressKey"delete"}, - WIDGET.newSwitch{name="demo", x=755, y=640,disp=function()return demo end,code=function()demo=not demo end}, + WIDGET.newButton{name="copy", x=730, y=530,w=120,color='lR', font=35,code=pressKey"cC"}, + WIDGET.newButton{name="paste", x=860, y=530,w=120,color='lB', font=35,code=pressKey"cV"}, + WIDGET.newButton{name="clear", x=990, y=530,w=120,color='Z', font=40,code=pressKey"delete"}, + WIDGET.newSwitch{name="demo", x=755, y=640,disp=function()return demo end,code=function()demo=not demo end}, - WIDGET.newButton{name="newPg", x=100, y=110,w=160,h=110,color='N',font=20,code=pressKey"n"}, - WIDGET.newButton{name="delPg", x=100, y=230,w=160,h=110,color='lR',font=20,code=pressKey"m"}, - WIDGET.newButton{name="prevPg", x=100, y=350,w=160,h=110,color='lG',font=20,code=pressKey"pageup",hideF=function()return page==1 end}, - WIDGET.newButton{name="nextPg", x=100, y=470,w=160,h=110,color='lG',font=20,code=pressKey"pagedown",hideF=function()return page==#FIELD end}, + WIDGET.newButton{name="newPg", x=100, y=110,w=160,h=110,color='N',font=20,code=pressKey"n"}, + WIDGET.newButton{name="delPg", x=100, y=230,w=160,h=110,color='lR',font=20,code=pressKey"m"}, + WIDGET.newButton{name="prevPg", x=100, y=350,w=160,h=110,color='lG',font=20,code=pressKey"pageup",hideF=function()return page==1 end}, + WIDGET.newButton{name="nextPg", x=100, y=470,w=160,h=110,color='lG',font=20,code=pressKey"pagedown",hideF=function()return page==#FIELD end}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/custom_mission.lua b/parts/scenes/custom_mission.lua index 071d3c01..70bab949 100644 --- a/parts/scenes/custom_mission.lua +++ b/parts/scenes/custom_mission.lua @@ -11,235 +11,235 @@ local cur--Cursor position local sure function scene.sceneInit() - input="" - cur=#MISSION - sure=0 + input="" + cur=#MISSION + sure=0 end function scene.sceneBack() - FILE.save(DATA.copyMission(),'conf/customMissions') + FILE.save(DATA.copyMission(),'conf/customMissions') end local missionEnum=missionEnum local legalInput={Z=true,S=true,J=true,L=true,T=true,O=true,I=true,A=true,_=true,P=true} function scene.keyDown(key) - if key=="left"then - local p=cur - if p==0 then - cur=#MISSION - else - repeat - p=p-1 - until MISSION[p]~=MISSION[cur] - cur=p - end - elseif key=="right"then - local p=cur - if p==#MISSION then - cur=0 - else - repeat - p=p+1 - until MISSION[p+1]~=MISSION[cur+1] - cur=p - end - elseif key=="ten"then - for _=1,10 do - local p=cur - if p==#MISSION then break end - repeat - p=p+1 - until MISSION[p+1]~=MISSION[cur+1] - cur=p - end - elseif key=="backspace"then - if #input>0 then - input="" - elseif cur>0 then - rem(MISSION,cur) - cur=cur-1 - if cur>0 and MISSION[cur]==MISSION[cur+1]then - scene.keyDown("right") - end - end - elseif key=="delete"then - if sure>.3 then - TABLE.cut(MISSION) - cur=0 - sure=0 - SFX.play('finesseError',.7) - else - sure=1 - end - elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then - if #MISSION>0 then - sys.setClipboardText("Techmino Target:"..DATA.copyMission()) - MES.new('check',text.exportSuccess) - end - elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then - local str=sys.getClipboardText() - local p=str:find(":")--ptr* - if p then - if not str:sub(1,p-1):find("Target")then - MES.new('error',text.pasteWrongPlace) - end - str=str:sub(p+1) - end - if DATA.pasteMission(str)then - MES.new('check',text.importSuccess) - cur=#MISSION - else - MES.new('error',text.dataCorrupted) - end - elseif key=="escape"then - SCN.back() - elseif type(key)=='number'then - local p=cur+1 - while MISSION[p]==key do p=p+1 end - ins(MISSION,p,key) - cur=p - else - if key=="space"then - key="_" - else - key=string.upper(key) - end + if key=="left"then + local p=cur + if p==0 then + cur=#MISSION + else + repeat + p=p-1 + until MISSION[p]~=MISSION[cur] + cur=p + end + elseif key=="right"then + local p=cur + if p==#MISSION then + cur=0 + else + repeat + p=p+1 + until MISSION[p+1]~=MISSION[cur+1] + cur=p + end + elseif key=="ten"then + for _=1,10 do + local p=cur + if p==#MISSION then break end + repeat + p=p+1 + until MISSION[p+1]~=MISSION[cur+1] + cur=p + end + elseif key=="backspace"then + if #input>0 then + input="" + elseif cur>0 then + rem(MISSION,cur) + cur=cur-1 + if cur>0 and MISSION[cur]==MISSION[cur+1]then + scene.keyDown("right") + end + end + elseif key=="delete"then + if sure>.3 then + TABLE.cut(MISSION) + cur=0 + sure=0 + SFX.play('finesseError',.7) + else + sure=1 + end + elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then + if #MISSION>0 then + sys.setClipboardText("Techmino Target:"..DATA.copyMission()) + MES.new('check',text.exportSuccess) + end + elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then + local str=sys.getClipboardText() + local p=str:find(":")--ptr* + if p then + if not str:sub(1,p-1):find("Target")then + MES.new('error',text.pasteWrongPlace) + end + str=str:sub(p+1) + end + if DATA.pasteMission(str)then + MES.new('check',text.importSuccess) + cur=#MISSION + else + MES.new('error',text.dataCorrupted) + end + elseif key=="escape"then + SCN.back() + elseif type(key)=='number'then + local p=cur+1 + while MISSION[p]==key do p=p+1 end + ins(MISSION,p,key) + cur=p + else + if key=="space"then + key="_" + else + key=string.upper(key) + end - input=input..key - if missionEnum[input]then - cur=cur+1 - ins(MISSION,cur,missionEnum[input]) - SFX.play('lock') - input="" - elseif #input>1 or not legalInput[input]then - input="" - end - end + input=input..key + if missionEnum[input]then + cur=cur+1 + ins(MISSION,cur,missionEnum[input]) + SFX.play('lock') + input="" + elseif #input>1 or not legalInput[input]then + input="" + end + end end function scene.update(dt) - if sure>0 then sure=sure-dt end + if sure>0 then sure=sure-dt end end function scene.draw() - --Draw frame - gc.setLineWidth(2) - gc.setColor(COLOR.Z) - gc.rectangle('line',58,108,1164,174,5) + --Draw frame + gc.setLineWidth(2) + gc.setColor(COLOR.Z) + gc.rectangle('line',58,108,1164,174,5) - --Draw inputing target - setFont(30) - gc.setColor(.9,.9,.9) - gc.print(input,1200,275) + --Draw inputing target + setFont(30) + gc.setColor(.9,.9,.9) + gc.print(input,1200,275) - --Draw targets - local libColor=minoColor - local set=SETTING.skin - local L=MISSION - local x,y=100,136--Next block pos - local cx,cy=100,136--Cursor-center pos - local i,j=1,#L - local count=1 - repeat - if L[i]==L[i-1]then - count=count+1 - else - if count>1 then - setFont(25) - gc.setColor(COLOR.Z) - gc.print("×",x-10,y-14) - gc.print(count,x+5,y-13) - x=x+(count<10 and 33 or 45) - count=1 - if i==cur+1 then - cx,cy=x,y - end - end - if x>1140 then - x,y=100,y+36 - if y>1260 then break end - end - if i<=j then - setFont(35) - local N=int(L[i]*.1) - if N>0 then - gc.setColor(libColor[set[N]]) - elseif L[i]>4 then - gc.setColor(COLOR.rainbow(i+TIME()*6.26)) - else - gc.setColor(COLOR.H) - end - gc.print(missionEnum[L[i]],x,y-25) - x=x+56 - end - end - if i==cur then - cx,cy=x,y - end - i=i+1 - until i>j+1 + --Draw targets + local libColor=minoColor + local set=SETTING.skin + local L=MISSION + local x,y=100,136--Next block pos + local cx,cy=100,136--Cursor-center pos + local i,j=1,#L + local count=1 + repeat + if L[i]==L[i-1]then + count=count+1 + else + if count>1 then + setFont(25) + gc.setColor(COLOR.Z) + gc.print("×",x-10,y-14) + gc.print(count,x+5,y-13) + x=x+(count<10 and 33 or 45) + count=1 + if i==cur+1 then + cx,cy=x,y + end + end + if x>1140 then + x,y=100,y+36 + if y>1260 then break end + end + if i<=j then + setFont(35) + local N=int(L[i]*.1) + if N>0 then + gc.setColor(libColor[set[N]]) + elseif L[i]>4 then + gc.setColor(COLOR.rainbow(i+TIME()*6.26)) + else + gc.setColor(COLOR.H) + end + gc.print(missionEnum[L[i]],x,y-25) + x=x+56 + end + end + if i==cur then + cx,cy=x,y + end + i=i+1 + until i>j+1 - --Draw cursor - gc.setColor(1,1,.4,.6+.4*sin(TIME()*6.26)) - gc.line(cx-5,cy-20,cx-5,cy+20) + --Draw cursor + gc.setColor(1,1,.4,.6+.4*sin(TIME()*6.26)) + gc.line(cx-5,cy-20,cx-5,cy+20) - --Confirm reset - if sure>0 then - gc.setColor(1,1,1,sure) - mDraw(TEXTURE.sure,1000,640,nil,.9) - end + --Confirm reset + if sure>0 then + gc.setColor(1,1,1,sure) + mDraw(TEXTURE.sure,1000,640,nil,.9) + end end scene.widgetList={ - WIDGET.newText{name="title", x=520,y=5,font=70,align='R'}, - WIDGET.newText{name="subTitle", x=530,y=50,font=35,align='L',color='H'}, + WIDGET.newText{name="title", x=520,y=5,font=70,align='R'}, + WIDGET.newText{name="subTitle",x=530,y=50,font=35,align='L',color='H'}, - WIDGET.newKey{name="_1", x=800,y=540,w=90,font=50,code=pressKey(01)}, - WIDGET.newKey{name="_2", x=900,y=540,w=90,font=50,code=pressKey(02)}, - WIDGET.newKey{name="_3", x=800,y=640,w=90,font=50,code=pressKey(03)}, - WIDGET.newKey{name="_4", x=900,y=640,w=90,font=50,code=pressKey(04)}, - WIDGET.newKey{name="any1", x=100,y=640,w=90, code=pressKey(05)}, - WIDGET.newKey{name="any2", x=200,y=640,w=90, code=pressKey(06)}, - WIDGET.newKey{name="any3", x=300,y=640,w=90, code=pressKey(07)}, - WIDGET.newKey{name="any4", x=400,y=640,w=90, code=pressKey(08)}, - WIDGET.newKey{name="PC", x=500,y=640,w=90,font=50,code=pressKey(09)}, + WIDGET.newKey{name="_1", x=800,y=540,w=90,font=50,code=pressKey(01)}, + WIDGET.newKey{name="_2", x=900,y=540,w=90,font=50,code=pressKey(02)}, + WIDGET.newKey{name="_3", x=800,y=640,w=90,font=50,code=pressKey(03)}, + WIDGET.newKey{name="_4", x=900,y=640,w=90,font=50,code=pressKey(04)}, + WIDGET.newKey{name="any1", x=100,y=640,w=90, code=pressKey(05)}, + WIDGET.newKey{name="any2", x=200,y=640,w=90, code=pressKey(06)}, + WIDGET.newKey{name="any3", x=300,y=640,w=90, code=pressKey(07)}, + WIDGET.newKey{name="any4", x=400,y=640,w=90, code=pressKey(08)}, + WIDGET.newKey{name="PC", x=500,y=640,w=90,font=50,code=pressKey(09)}, - WIDGET.newKey{name="Z1", x=100,y=340,w=90,font=50,code=pressKey(11)}, - WIDGET.newKey{name="S1", x=200,y=340,w=90,font=50,code=pressKey(21)}, - WIDGET.newKey{name="J1", x=300,y=340,w=90,font=50,code=pressKey(31)}, - WIDGET.newKey{name="L1", x=400,y=340,w=90,font=50,code=pressKey(41)}, - WIDGET.newKey{name="T1", x=500,y=340,w=90,font=50,code=pressKey(51)}, - WIDGET.newKey{name="O1", x=600,y=340,w=90,font=50,code=pressKey(61)}, - WIDGET.newKey{name="I1", x=700,y=340,w=90,font=50,code=pressKey(71)}, + WIDGET.newKey{name="Z1", x=100,y=340,w=90,font=50,code=pressKey(11)}, + WIDGET.newKey{name="S1", x=200,y=340,w=90,font=50,code=pressKey(21)}, + WIDGET.newKey{name="J1", x=300,y=340,w=90,font=50,code=pressKey(31)}, + WIDGET.newKey{name="L1", x=400,y=340,w=90,font=50,code=pressKey(41)}, + WIDGET.newKey{name="T1", x=500,y=340,w=90,font=50,code=pressKey(51)}, + WIDGET.newKey{name="O1", x=600,y=340,w=90,font=50,code=pressKey(61)}, + WIDGET.newKey{name="I1", x=700,y=340,w=90,font=50,code=pressKey(71)}, - WIDGET.newKey{name="Z2", x=100,y=440,w=90,font=50,code=pressKey(12)}, - WIDGET.newKey{name="S2", x=200,y=440,w=90,font=50,code=pressKey(22)}, - WIDGET.newKey{name="J2", x=300,y=440,w=90,font=50,code=pressKey(32)}, - WIDGET.newKey{name="L2", x=400,y=440,w=90,font=50,code=pressKey(42)}, - WIDGET.newKey{name="T2", x=500,y=440,w=90,font=50,code=pressKey(52)}, - WIDGET.newKey{name="O2", x=600,y=440,w=90,font=50,code=pressKey(62)}, - WIDGET.newKey{name="I2", x=700,y=440,w=90,font=50,code=pressKey(72)}, + WIDGET.newKey{name="Z2", x=100,y=440,w=90,font=50,code=pressKey(12)}, + WIDGET.newKey{name="S2", x=200,y=440,w=90,font=50,code=pressKey(22)}, + WIDGET.newKey{name="J2", x=300,y=440,w=90,font=50,code=pressKey(32)}, + WIDGET.newKey{name="L2", x=400,y=440,w=90,font=50,code=pressKey(42)}, + WIDGET.newKey{name="T2", x=500,y=440,w=90,font=50,code=pressKey(52)}, + WIDGET.newKey{name="O2", x=600,y=440,w=90,font=50,code=pressKey(62)}, + WIDGET.newKey{name="I2", x=700,y=440,w=90,font=50,code=pressKey(72)}, - WIDGET.newKey{name="Z3", x=100,y=540,w=90,font=50,code=pressKey(13)}, - WIDGET.newKey{name="S3", x=200,y=540,w=90,font=50,code=pressKey(23)}, - WIDGET.newKey{name="J3", x=300,y=540,w=90,font=50,code=pressKey(33)}, - WIDGET.newKey{name="L3", x=400,y=540,w=90,font=50,code=pressKey(43)}, - WIDGET.newKey{name="T3", x=500,y=540,w=90,font=50,code=pressKey(53)}, - WIDGET.newKey{name="O3", x=600,y=540,w=90,font=50,code=pressKey(63)}, - WIDGET.newKey{name="I3", x=700,y=540,w=90,font=50,code=pressKey(73)}, + WIDGET.newKey{name="Z3", x=100,y=540,w=90,font=50,code=pressKey(13)}, + WIDGET.newKey{name="S3", x=200,y=540,w=90,font=50,code=pressKey(23)}, + WIDGET.newKey{name="J3", x=300,y=540,w=90,font=50,code=pressKey(33)}, + WIDGET.newKey{name="L3", x=400,y=540,w=90,font=50,code=pressKey(43)}, + WIDGET.newKey{name="T3", x=500,y=540,w=90,font=50,code=pressKey(53)}, + WIDGET.newKey{name="O3", x=600,y=540,w=90,font=50,code=pressKey(63)}, + WIDGET.newKey{name="I3", x=700,y=540,w=90,font=50,code=pressKey(73)}, - WIDGET.newKey{name="O4", x=600,y=640,w=90,font=50,code=pressKey(64)}, - WIDGET.newKey{name="I4", x=700,y=640,w=90,font=50,code=pressKey(74)}, + WIDGET.newKey{name="O4", x=600,y=640,w=90,font=50,code=pressKey(64)}, + WIDGET.newKey{name="I4", x=700,y=640,w=90,font=50,code=pressKey(74)}, - WIDGET.newKey{name="left", x=800, y=440,w=90, color='lG',font=55,code=pressKey"left"}, - WIDGET.newKey{name="right", x=900, y=440,w=90, color='lG',font=55,code=pressKey"right"}, - WIDGET.newKey{name="ten", x=1000, y=440,w=90, color='lG',font=40,code=pressKey"ten"}, - WIDGET.newKey{name="backsp", x=1000, y=540,w=90, color='lY',font=50,code=pressKey"backspace"}, - WIDGET.newKey{name="reset", x=1000, y=640,w=90, color='lY',font=50,code=pressKey"delete"}, - WIDGET.newButton{name="copy", x=1140, y=440,w=170,h=80, color='lR',font=40,code=pressKey"cC",hideF=function()return #MISSION==0 end}, - WIDGET.newButton{name="paste", x=1140, y=540,w=170,h=80, color='lB',font=40,code=pressKey"cV"}, - WIDGET.newSwitch{name="mission",x=1150, y=340,disp=CUSval("missionKill"),code=CUSrev("missionKill")}, + WIDGET.newKey{name="left", x=800, y=440,w=90, color='lG',font=55,code=pressKey"left"}, + WIDGET.newKey{name="right", x=900, y=440,w=90, color='lG',font=55,code=pressKey"right"}, + WIDGET.newKey{name="ten", x=1000,y=440,w=90, color='lG',font=40,code=pressKey"ten"}, + WIDGET.newKey{name="backsp", x=1000,y=540,w=90, color='lY',font=50,code=pressKey"backspace"}, + WIDGET.newKey{name="reset", x=1000,y=640,w=90, color='lY',font=50,code=pressKey"delete"}, + WIDGET.newButton{name="copy", x=1140,y=440,w=170,h=80,color='lR',font=40,code=pressKey"cC",hideF=function()return #MISSION==0 end}, + WIDGET.newButton{name="paste", x=1140,y=540,w=170,h=80,color='lB',font=40,code=pressKey"cV"}, + WIDGET.newSwitch{name="mission",x=1150,y=340,disp=CUSval("missionKill"),code=CUSrev("missionKill")}, - WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/custom_sequence.lua b/parts/scenes/custom_sequence.lua index dff34d08..7c462d5a 100644 --- a/parts/scenes/custom_sequence.lua +++ b/parts/scenes/custom_sequence.lua @@ -10,234 +10,234 @@ local cur--Cursor position local sure function scene.sceneInit() - cur=#BAG - sure=0 + cur=#BAG + sure=0 end function scene.sceneBack() - FILE.save(DATA.copySequence(),'conf/customSequence') + FILE.save(DATA.copySequence(),'conf/customSequence') end local minoKey={ - ['1']=1,['2']=2,['3']=3,['4']=4,['5']=5,['6']=6,['7']=7, - z=1,s=2,j=3,l=4,t=5,o=6,i=7, - p=10,q=11,f=12,e=13,u=15, - v=16,w=17,x=18,r=21,y=22,n=23,h=24, - ['/']=26,c=27,[',']=27,['\'']=27,['-']=28,[';']=28,['.']=29, + ['1']=1,['2']=2,['3']=3,['4']=4,['5']=5,['6']=6,['7']=7, + z=1,s=2,j=3,l=4,t=5,o=6,i=7, + p=10,q=11,f=12,e=13,u=15, + v=16,w=17,x=18,r=21,y=22,n=23,h=24, + ['/']=26,c=27,[',']=27,['\'']=27,['-']=28,[';']=28,['.']=29, } local minoKey2={ - ['1']=8,['2']=9,['3']=19,['4']=20,['5']=14,['7']=25, - z=8,s=9,t=14,j=19,l=20,i=25,['-']=26,o=29, + ['1']=8,['2']=9,['3']=19,['4']=20,['5']=14,['7']=25, + z=8,s=9,t=14,j=19,l=20,i=25,['-']=26,o=29, } function scene.keyDown(key) - if key=="left"then - local p=cur - if p==0 then - cur=#BAG - else - repeat - p=p-1 - until BAG[p]~=BAG[cur] - cur=p - end - elseif key=="right"then - local p=cur - if p==#BAG then - cur=0 - else - repeat - p=p+1 - until BAG[p+1]~=BAG[cur+1] - cur=p - end - elseif key=="ten"then - for _=1,10 do - local p=cur - if p==#BAG then break end - repeat - p=p+1 - until BAG[p+1]~=BAG[cur+1] - cur=p - end - elseif key=="backspace"then - if cur>0 then - rem(BAG,cur) - cur=cur-1 - if cur>0 and BAG[cur]==BAG[cur+1]then - scene.keyDown("right") - end - end - elseif key=="delete"then - if sure>.3 then - TABLE.cut(BAG) - cur=0 - sure=0 - SFX.play('finesseError',.7) - else - sure=1 - end - elseif key=="="then - local l={1,2,3,4,5,6,7} - repeat scene.keyDown(rem(l,math.random(#l)))until not l[1] - elseif key=="tab"then - WIDGET.active.sequence:scroll(kb.isDown("lshift","rshift")and -1 or 1) - elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then - if #BAG>0 then - sys.setClipboardText("Techmino SEQ:"..DATA.copySequence()) - MES.new('check',text.exportSuccess) - end - elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then - local str=sys.getClipboardText() - local p=str:find(":")--ptr* - if p then - if not str:sub(1,p-1):find("SEQ")then - MES.new('error',text.pasteWrongPlace) - end - str=str:sub(p+1) - end - if DATA.pasteSequence(str)then - MES.new('check',text.importSuccess) - cur=#BAG - else - TABLE.cut(BAG) - cur=0 - MES.new('error',text.dataCorrupted) - end - elseif key=="escape"then - SCN.back() - elseif type(key)=='number'then - cur=cur+1 - ins(BAG,cur,key) - elseif #key==1 then - key=(kb.isDown("lshift","lalt","rshift","ralt")and minoKey2 or minoKey)[key] - if key then - local p=cur+1 - while BAG[p]==key do p=p+1 end - ins(BAG,p,key) - cur=p - SFX.play('lock') - end - end + if key=="left"then + local p=cur + if p==0 then + cur=#BAG + else + repeat + p=p-1 + until BAG[p]~=BAG[cur] + cur=p + end + elseif key=="right"then + local p=cur + if p==#BAG then + cur=0 + else + repeat + p=p+1 + until BAG[p+1]~=BAG[cur+1] + cur=p + end + elseif key=="ten"then + for _=1,10 do + local p=cur + if p==#BAG then break end + repeat + p=p+1 + until BAG[p+1]~=BAG[cur+1] + cur=p + end + elseif key=="backspace"then + if cur>0 then + rem(BAG,cur) + cur=cur-1 + if cur>0 and BAG[cur]==BAG[cur+1]then + scene.keyDown("right") + end + end + elseif key=="delete"then + if sure>.3 then + TABLE.cut(BAG) + cur=0 + sure=0 + SFX.play('finesseError',.7) + else + sure=1 + end + elseif key=="="then + local l={1,2,3,4,5,6,7} + repeat scene.keyDown(rem(l,math.random(#l)))until not l[1] + elseif key=="tab"then + WIDGET.active.sequence:scroll(kb.isDown("lshift","rshift")and -1 or 1) + elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then + if #BAG>0 then + sys.setClipboardText("Techmino SEQ:"..DATA.copySequence()) + MES.new('check',text.exportSuccess) + end + elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then + local str=sys.getClipboardText() + local p=str:find(":")--ptr* + if p then + if not str:sub(1,p-1):find("SEQ")then + MES.new('error',text.pasteWrongPlace) + end + str=str:sub(p+1) + end + if DATA.pasteSequence(str)then + MES.new('check',text.importSuccess) + cur=#BAG + else + TABLE.cut(BAG) + cur=0 + MES.new('error',text.dataCorrupted) + end + elseif key=="escape"then + SCN.back() + elseif type(key)=='number'then + cur=cur+1 + ins(BAG,cur,key) + elseif #key==1 then + key=(kb.isDown("lshift","lalt","rshift","ralt")and minoKey2 or minoKey)[key] + if key then + local p=cur+1 + while BAG[p]==key do p=p+1 end + ins(BAG,p,key) + cur=p + SFX.play('lock') + end + end end function scene.update(dt) - if sure>0 then sure=sure-dt end + if sure>0 then sure=sure-dt end end function scene.draw() - --Draw frame - gc.setColor(COLOR.Z) - gc.setLineWidth(2) - gc.rectangle('line',100,110,1080,260,5) + --Draw frame + gc.setColor(COLOR.Z) + gc.setLineWidth(2) + gc.rectangle('line',100,110,1080,260,5) - --Draw sequence - local miniBlock=TEXTURE.miniBlock - local libColor=minoColor - local set=SETTING.skin - local L=BAG - local x,y=120,136--Next block pos - local cx,cy=120,136--Cursor-center pos - local i,j=1,#L - local count=1 - setFont(25) - repeat - if L[i]==L[i-1]then - count=count+1 - else - if count>1 then - gc.setColor(COLOR.Z) - gc.print("×",x-5,y-14) - gc.print(count,x+10,y-13) - x=x+(count<10 and 33 or 45) - count=1 - if i==cur+1 then - cx,cy=x,y - end - end - if x>1060 then - x,y=120,y+50 - if y>1260 then break end - end - if i<=j then - local B=miniBlock[L[i]] - gc.setColor(libColor[set[L[i]]]) - gc.draw(B,x,y,nil,15,15,0,B:getHeight()*.5) - x=x+B:getWidth()*15+10 - end - end + --Draw sequence + local miniBlock=TEXTURE.miniBlock + local libColor=minoColor + local set=SETTING.skin + local L=BAG + local x,y=120,136--Next block pos + local cx,cy=120,136--Cursor-center pos + local i,j=1,#L + local count=1 + setFont(25) + repeat + if L[i]==L[i-1]then + count=count+1 + else + if count>1 then + gc.setColor(COLOR.Z) + gc.print("×",x-5,y-14) + gc.print(count,x+10,y-13) + x=x+(count<10 and 33 or 45) + count=1 + if i==cur+1 then + cx,cy=x,y + end + end + if x>1060 then + x,y=120,y+50 + if y>1260 then break end + end + if i<=j then + local B=miniBlock[L[i]] + gc.setColor(libColor[set[L[i]]]) + gc.draw(B,x,y,nil,15,15,0,B:getHeight()*.5) + x=x+B:getWidth()*15+10 + end + end - if i==cur then - cx,cy=x,y - end - i=i+1 - until i>j+1 + if i==cur then + cx,cy=x,y + end + i=i+1 + until i>j+1 - --Draw lenth - setFont(40) - gc.setColor(COLOR.Z) - gc.print(#L,120,310) + --Draw lenth + setFont(40) + gc.setColor(COLOR.Z) + gc.print(#L,120,310) - --Draw cursor - gc.setColor(.5,1,.5,.6+.4*sin(TIME()*6.26)) - gc.line(cx-5,cy-20,cx-5,cy+20) + --Draw cursor + gc.setColor(.5,1,.5,.6+.4*sin(TIME()*6.26)) + gc.line(cx-5,cy-20,cx-5,cy+20) - --Confirm reset - if sure>0 then - gc.setColor(1,1,1,sure) - mDraw(TEXTURE.sure,1000,460,nil,.8) - end + --Confirm reset + if sure>0 then + gc.setColor(1,1,1,sure) + mDraw(TEXTURE.sure,1000,460,nil,.8) + end end scene.widgetList={ - WIDGET.newText{name="title",x=520,y=5,font=70,align='R'}, - WIDGET.newText{name="subTitle",x=530,y=50,font=35,align='L',color='H'}, + WIDGET.newText{name="title",x=520,y=5,font=70,align='R'}, + WIDGET.newText{name="subTitle",x=530,y=50,font=35,align='L',color='H'}, - WIDGET.newSelector{name="sequence",x=1080,y=60,w=200,color='Y', - list={'bag','his','hisPool','c2','rnd','mess','reverb','loop','fixed'}, - disp=CUSval("sequence"),code=CUSsto("sequence") - }, + WIDGET.newSelector{name="sequence",x=1080,y=60,w=200,color='Y', + list={'bag','his','hisPool','c2','rnd','mess','reverb','loop','fixed'}, + disp=CUSval("sequence"),code=CUSsto("sequence") + }, - WIDGET.newKey{name="Z", x=120,y=460,w=80,font=50,code=pressKey(1)}, - WIDGET.newKey{name="S", x=200,y=460,w=80,font=50,code=pressKey(2)}, - WIDGET.newKey{name="J", x=280,y=460,w=80,font=50,code=pressKey(3)}, - WIDGET.newKey{name="L", x=360,y=460,w=80,font=50,code=pressKey(4)}, - WIDGET.newKey{name="T", x=440,y=460,w=80,font=50,code=pressKey(5)}, - WIDGET.newKey{name="O", x=520,y=460,w=80,font=50,code=pressKey(6)}, - WIDGET.newKey{name="I", x=600,y=460,w=80,font=50,code=pressKey(7)}, - WIDGET.newKey{name="left", x=680,y=460,w=80,color='lG',font=55,code=pressKey"left"}, - WIDGET.newKey{name="right", x=760,y=460,w=80,color='lG',font=55,code=pressKey"right"}, - WIDGET.newKey{name="ten", x=840,y=460,w=80,color='lG',font=40,code=pressKey"ten"}, - WIDGET.newKey{name="backsp",x=920,y=460,w=80,color='lY',font=50,code=pressKey"backspace"}, - WIDGET.newKey{name="reset", x=1000,y=460,w=80,color='lY',font=25,code=pressKey"delete"}, + WIDGET.newKey{name="Z", x=120,y=460,w=80,font=50,code=pressKey(1)}, + WIDGET.newKey{name="S", x=200,y=460,w=80,font=50,code=pressKey(2)}, + WIDGET.newKey{name="J", x=280,y=460,w=80,font=50,code=pressKey(3)}, + WIDGET.newKey{name="L", x=360,y=460,w=80,font=50,code=pressKey(4)}, + WIDGET.newKey{name="T", x=440,y=460,w=80,font=50,code=pressKey(5)}, + WIDGET.newKey{name="O", x=520,y=460,w=80,font=50,code=pressKey(6)}, + WIDGET.newKey{name="I", x=600,y=460,w=80,font=50,code=pressKey(7)}, + WIDGET.newKey{name="left", x=680,y=460,w=80,color='lG',font=55,code=pressKey"left"}, + WIDGET.newKey{name="right", x=760,y=460,w=80,color='lG',font=55,code=pressKey"right"}, + WIDGET.newKey{name="ten", x=840,y=460,w=80,color='lG',font=40,code=pressKey"ten"}, + WIDGET.newKey{name="backsp",x=920,y=460,w=80,color='lY',font=50,code=pressKey"backspace"}, + WIDGET.newKey{name="reset", x=1000,y=460,w=80,color='lY',font=25,code=pressKey"delete"}, - WIDGET.newKey{name="Z5", x=120,y=550,w=80,color='lH',font=50,code=pressKey(8)}, - WIDGET.newKey{name="S5", x=200,y=550,w=80,color='lH',font=50,code=pressKey(9)}, - WIDGET.newKey{name="P", x=280,y=550,w=80,color='lH',font=50,code=pressKey(10)}, - WIDGET.newKey{name="Q", x=360,y=550,w=80,color='lH',font=50,code=pressKey(11)}, - WIDGET.newKey{name="F", x=440,y=550,w=80,color='lH',font=50,code=pressKey(12)}, - WIDGET.newKey{name="E", x=520,y=550,w=80,color='lH',font=50,code=pressKey(13)}, - WIDGET.newKey{name="T5", x=600,y=550,w=80,color='lH',font=50,code=pressKey(14)}, - WIDGET.newKey{name="U", x=680,y=550,w=80,color='lH',font=50,code=pressKey(15)}, - WIDGET.newKey{name="V", x=760,y=550,w=80,color='lH',font=50,code=pressKey(16)}, - WIDGET.newKey{name="I3", x=840,y=550,w=80,color='H',font=50,code=pressKey(26)}, - WIDGET.newKey{name="C", x=920,y=550,w=80,color='H',font=50,code=pressKey(27)}, - WIDGET.newKey{name="rnd", x=1000,y=550,w=80,color='R',font=25,code=pressKey"="}, + WIDGET.newKey{name="Z5", x=120,y=550,w=80,color='lH',font=50,code=pressKey(8)}, + WIDGET.newKey{name="S5", x=200,y=550,w=80,color='lH',font=50,code=pressKey(9)}, + WIDGET.newKey{name="P", x=280,y=550,w=80,color='lH',font=50,code=pressKey(10)}, + WIDGET.newKey{name="Q", x=360,y=550,w=80,color='lH',font=50,code=pressKey(11)}, + WIDGET.newKey{name="F", x=440,y=550,w=80,color='lH',font=50,code=pressKey(12)}, + WIDGET.newKey{name="E", x=520,y=550,w=80,color='lH',font=50,code=pressKey(13)}, + WIDGET.newKey{name="T5", x=600,y=550,w=80,color='lH',font=50,code=pressKey(14)}, + WIDGET.newKey{name="U", x=680,y=550,w=80,color='lH',font=50,code=pressKey(15)}, + WIDGET.newKey{name="V", x=760,y=550,w=80,color='lH',font=50,code=pressKey(16)}, + WIDGET.newKey{name="I3", x=840,y=550,w=80,color='H',font=50,code=pressKey(26)}, + WIDGET.newKey{name="C", x=920,y=550,w=80,color='H',font=50,code=pressKey(27)}, + WIDGET.newKey{name="rnd", x=1000,y=550,w=80,color='R',font=25,code=pressKey"="}, - WIDGET.newKey{name="W", x=120,y=640,w=80,color='lH',font=50,code=pressKey(17)}, - WIDGET.newKey{name="X", x=200,y=640,w=80,color='lH',font=50,code=pressKey(18)}, - WIDGET.newKey{name="J5", x=280,y=640,w=80,color='lH',font=50,code=pressKey(19)}, - WIDGET.newKey{name="L5", x=360,y=640,w=80,color='lH',font=50,code=pressKey(20)}, - WIDGET.newKey{name="R", x=440,y=640,w=80,color='lH',font=50,code=pressKey(21)}, - WIDGET.newKey{name="Y", x=520,y=640,w=80,color='lH',font=50,code=pressKey(22)}, - WIDGET.newKey{name="N", x=600,y=640,w=80,color='lH',font=50,code=pressKey(23)}, - WIDGET.newKey{name="H", x=680,y=640,w=80,color='lH',font=50,code=pressKey(24)}, - WIDGET.newKey{name="I5", x=760,y=640,w=80,color='lH',font=50,code=pressKey(25)}, - WIDGET.newKey{name="I2", x=840,y=640,w=80,color='dH',font=50,code=pressKey(28)}, - WIDGET.newKey{name="O1", x=920,y=640,w=80,color='dH',font=50,code=pressKey(29)}, + WIDGET.newKey{name="W", x=120,y=640,w=80,color='lH',font=50,code=pressKey(17)}, + WIDGET.newKey{name="X", x=200,y=640,w=80,color='lH',font=50,code=pressKey(18)}, + WIDGET.newKey{name="J5", x=280,y=640,w=80,color='lH',font=50,code=pressKey(19)}, + WIDGET.newKey{name="L5", x=360,y=640,w=80,color='lH',font=50,code=pressKey(20)}, + WIDGET.newKey{name="R", x=440,y=640,w=80,color='lH',font=50,code=pressKey(21)}, + WIDGET.newKey{name="Y", x=520,y=640,w=80,color='lH',font=50,code=pressKey(22)}, + WIDGET.newKey{name="N", x=600,y=640,w=80,color='lH',font=50,code=pressKey(23)}, + WIDGET.newKey{name="H", x=680,y=640,w=80,color='lH',font=50,code=pressKey(24)}, + WIDGET.newKey{name="I5", x=760,y=640,w=80,color='lH',font=50,code=pressKey(25)}, + WIDGET.newKey{name="I2", x=840,y=640,w=80,color='dH',font=50,code=pressKey(28)}, + WIDGET.newKey{name="O1", x=920,y=640,w=80,color='dH',font=50,code=pressKey(29)}, - WIDGET.newButton{name="copy",x=1140,y=460,w=170,h=80,color='lR',font=40,code=pressKey"cC",hideF=function()return #BAG==0 end}, - WIDGET.newButton{name="paste",x=1140,y=550,w=170,h=80,color='lB',font=40,code=pressKey"cV"}, - WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newButton{name="copy", x=1140,y=460,w=170,h=80,color='lR',font=40,code=pressKey"cC",hideF=function()return #BAG==0 end}, + WIDGET.newButton{name="paste",x=1140,y=550,w=170,h=80,color='lB',font=40,code=pressKey"cV"}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/depause.lua b/parts/scenes/depause.lua index a53e194e..db78c36c 100644 --- a/parts/scenes/depause.lua +++ b/parts/scenes/depause.lua @@ -5,50 +5,50 @@ local scene={} local timer function scene.sceneInit() - timer=1 - scene.widgetList.pause.x= - SETTING.menuPos=='right'and 1195 or - SETTING.menuPos=='middle'and 860 or - SETTING.menuPos=='left'and 190 + timer=1 + scene.widgetList.pause.x= + SETTING.menuPos=='right'and 1195 or + SETTING.menuPos=='middle'and 860 or + SETTING.menuPos=='left'and 190 end function scene.keyDown(key) - if key=="escape"then - pauseGame() - end + if key=="escape"then + pauseGame() + end end scene.mouseDown=NULL scene.touchDown=NULL function scene.update(dt) - timer=timer-dt*.8 - if timer<0 then - SFX.play('click') - SCN.swapTo('game','none') - end + timer=timer-dt*.8 + if timer<0 then + SFX.play('click') + SCN.swapTo('game','none') + end end function scene.draw() - --Game scene - SCN.scenes.game.draw() + --Game scene + SCN.scenes.game.draw() - --Gray screen cover - gc.setColor(.12,.12,.12,timer*8-7) - gc.replaceTransform(SCR.origin) - gc.rectangle('fill',0,0,SCR.w,SCR.h) - gc.replaceTransform(SCR.xOy) + --Gray screen cover + gc.setColor(.12,.12,.12,timer*8-7) + gc.replaceTransform(SCR.origin) + gc.rectangle('fill',0,0,SCR.w,SCR.h) + gc.replaceTransform(SCR.xOy) - --Counter bar - gc.setLineWidth(2) - gc.setColor(.9,.9,.9,math.min(1,12*timer,8*(1-timer))*.6) - gc.rectangle('line',494,336,292,48,14) - gc.setColor(.9,.9,.9,math.min(1,12*timer,8*(1-timer))*.75) - gc.rectangle('fill',500,342,280*timer,36,10) + --Counter bar + gc.setLineWidth(2) + gc.setColor(.9,.9,.9,math.min(1,12*timer,8*(1-timer))*.6) + gc.rectangle('line',494,336,292,48,14) + gc.setColor(.9,.9,.9,math.min(1,12*timer,8*(1-timer))*.75) + gc.rectangle('fill',500,342,280*timer,36,10) end scene.widgetList={ - WIDGET.newKey{name="pause",x=0,y=45,w=60,code=pauseGame,fText=TEXTURE.game.pause}, + WIDGET.newKey{name="pause",x=0,y=45,w=60,code=pauseGame,fText=TEXTURE.game.pause}, } return scene \ No newline at end of file diff --git a/parts/scenes/dict.lua b/parts/scenes/dict.lua index 95f59748..bff666bf 100644 --- a/parts/scenes/dict.lua +++ b/parts/scenes/dict.lua @@ -20,174 +20,174 @@ local scrollPos--Scroll down length local lastSearch--Last searched string local typeColor={ - help=COLOR.Y, - other=COLOR.lO, - game=COLOR.lC, - term=COLOR.lR, - setup=COLOR.lY, - pattern=COLOR.lJ, - command=COLOR.lN, - english=COLOR.B, - name=COLOR.lV, + help=COLOR.Y, + other=COLOR.lO, + game=COLOR.lC, + term=COLOR.lR, + setup=COLOR.lY, + pattern=COLOR.lJ, + command=COLOR.lN, + english=COLOR.B, + name=COLOR.lV, } local function _getList()return result[1]and result or dict end local function _clearResult() - TABLE.cut(result) - selected,scrollPos=1,0 - waiting,lastSearch=0,false + TABLE.cut(result) + selected,scrollPos=1,0 + waiting,lastSearch=0,false end local function _search() - local input=inputBox:getText():lower() - _clearResult() - local first - for i=1,#dict do - local pos=find(dict[i][2],input,nil,true) - if pos==1 and not first then - ins(result,1,dict[i]) - first=true - elseif pos then - ins(result,dict[i]) - end - end - if #result>0 then - SFX.play('reach') - end - url=_getList()[selected][5] - lastSearch=input + local input=inputBox:getText():lower() + _clearResult() + local first + for i=1,#dict do + local pos=find(dict[i][2],input,nil,true) + if pos==1 and not first then + ins(result,1,dict[i]) + first=true + elseif pos then + ins(result,dict[i]) + end + end + if #result>0 then + SFX.play('reach') + end + url=_getList()[selected][5] + lastSearch=input end function scene.sceneInit() - dict=require("parts.language.dict_"..({"zh","zh","zh","en","en","en","en","en"})[SETTING.lang]) + dict=require("parts.language.dict_"..({"zh","zh","zh","en","en","en","en","en"})[SETTING.lang]) - inputBox:clear() - result={} - url=dict[1][5] + inputBox:clear() + result={} + url=dict[1][5] - waiting=0 - selected=1 - scrollPos=0 + waiting=0 + selected=1 + scrollPos=0 - lastSearch=false - WIDGET.focus(inputBox) - BG.set('rainbow') + lastSearch=false + WIDGET.focus(inputBox) + BG.set('rainbow') end function scene.wheelMoved(_,y) - WHEELMOV(y) + WHEELMOV(y) end function scene.keyDown(key) - if key=="up"then - if selected and selected>1 then - selected=selected-1 - if selectedscrollPos+15 then - scrollPos=selected-15 - end - end - elseif key=="left"or key=="pageup"then - for _=1,12 do scene.keyDown("up")end - elseif key=="right"or key=="pagedown"then - for _=1,12 do scene.keyDown("down")end - elseif key=="link"then - love.system.openURL(url) - elseif key=="delete"then - if inputBox:hasText()then - _clearResult() - inputBox:clear() - SFX.play('hold') - end - elseif key=="backspace"then - WIDGET.keyPressed("backspace") - elseif key=="escape"then - if inputBox:hasText()then - scene.keyDown("delete") - else - SCN.back() - end - else - return - end - url=_getList()[selected][5] + if key=="up"then + if selected and selected>1 then + selected=selected-1 + if selectedscrollPos+15 then + scrollPos=selected-15 + end + end + elseif key=="left"or key=="pageup"then + for _=1,12 do scene.keyDown("up")end + elseif key=="right"or key=="pagedown"then + for _=1,12 do scene.keyDown("down")end + elseif key=="link"then + love.system.openURL(url) + elseif key=="delete"then + if inputBox:hasText()then + _clearResult() + inputBox:clear() + SFX.play('hold') + end + elseif key=="backspace"then + WIDGET.keyPressed("backspace") + elseif key=="escape"then + if inputBox:hasText()then + scene.keyDown("delete") + else + SCN.back() + end + else + return + end + url=_getList()[selected][5] end function scene.update(dt) - local input=inputBox:getText() - if input~=lastTickInput then - if #input==0 then - _clearResult() - else - waiting=.8 - end - lastTickInput=input - end - if waiting>0 then - waiting=waiting-dt - if waiting<=0 then - if #input>0 and input~=lastSearch then - _search() - end - end - end + local input=inputBox:getText() + if input~=lastTickInput then + if #input==0 then + _clearResult() + else + waiting=.8 + end + lastTickInput=input + end + if waiting>0 then + waiting=waiting-dt + if waiting<=0 then + if #input>0 and input~=lastSearch then + _search() + end + end + end end function scene.draw() - local list=_getList() - gc.setColor(COLOR.Z) - local t=list[selected][4] - setFont( - #t>900 and 15 or - #t>600 and 20 or - #t>400 and 25 or - 30 - ) - gc.printf(t,306,180,950) + local list=_getList() + gc.setColor(COLOR.Z) + local t=list[selected][4] + setFont( + #t>900 and 15 or + #t>600 and 20 or + #t>400 and 25 or + 30 + ) + gc.printf(t,306,180,950) - setFont(30) - gc.setColor(1,1,1,.4+.2*sin(TIME()*4)) - gc.rectangle('fill',20,143+35*(selected-scrollPos),280,35) + setFont(30) + gc.setColor(1,1,1,.4+.2*sin(TIME()*4)) + gc.rectangle('fill',20,143+35*(selected-scrollPos),280,35) - setFont(30) - for i=1,min(#list,15)do - local y=142+35*i - i=i+scrollPos - local item=list[i] - gc.setColor(COLOR.D) - gc.print(item[1],29,y-1) - gc.print(item[1],29,y+1) - gc.print(item[1],31,y-1) - gc.print(item[1],31,y+1) - gc.setColor(typeColor[item[3]]) - gc.print(item[1],30,y) - end + setFont(30) + for i=1,min(#list,15)do + local y=142+35*i + i=i+scrollPos + local item=list[i] + gc.setColor(COLOR.D) + gc.print(item[1],29,y-1) + gc.print(item[1],29,y+1) + gc.print(item[1],31,y-1) + gc.print(item[1],31,y+1) + gc.setColor(typeColor[item[3]]) + gc.print(item[1],30,y) + end - gc.setLineWidth(2) - gc.setColor(COLOR.Z) - gc.rectangle('line',300,180,958,526,5) - gc.rectangle('line',20,180,280,526,5) + gc.setLineWidth(2) + gc.setColor(COLOR.Z) + gc.rectangle('line',300,180,958,526,5) + gc.rectangle('line',20,180,280,526,5) - if waiting>0 then - local r=TIME()*2 - local R=int(r)%7+1 - gc.setColor(1,1,1,1-abs(r%1*2-1)) - gc.draw(TEXTURE.miniBlock[R],785,140,TIME()*10%6.2832,15,15,DSCP[R][0][2]+.5,#BLOCKS[R][0]-DSCP[R][0][1]-.5) - end + if waiting>0 then + local r=TIME()*2 + local R=int(r)%7+1 + gc.setColor(1,1,1,1-abs(r%1*2-1)) + gc.draw(TEXTURE.miniBlock[R],785,140,TIME()*10%6.2832,15,15,DSCP[R][0][2]+.5,#BLOCKS[R][0]-DSCP[R][0][1]-.5) + end end scene.widgetList={ - WIDGET.newText{name="title", x=20,y=5,font=70,align='L'}, - inputBox, - WIDGET.newKey{name="link", x=1150,y=655,w=200,h=80,font=35,code=pressKey"link",hideF=function()return not url end}, - WIDGET.newKey{name="up", x=1130,y=460,w=60,h=90,font=35,fText="↑",code=pressKey"up",hide=not MOBILE}, - WIDGET.newKey{name="down", x=1130,y=560,w=60,h=90,font=35,fText="↓",code=pressKey"down",hide=not MOBILE}, - WIDGET.newKey{name="pageup", x=1210,y=460,w=80,h=90,font=35,fText="↑↑",code=pressKey"pageup",hide=not MOBILE}, - WIDGET.newKey{name="pagedown", x=1210,y=560,w=80,h=90,font=35,fText="↓↓",code=pressKey"pagedown",hide=not MOBILE}, - WIDGET.newButton{name="back", x=1165,y=60,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newText{name="title", x=20,y=5,font=70,align='L'}, + inputBox, + WIDGET.newKey{name="link", x=1150,y=655,w=200,h=80,font=35,code=pressKey"link",hideF=function()return not url end}, + WIDGET.newKey{name="up", x=1130,y=460,w=60,h=90,font=35,fText="↑",code=pressKey"up",hide=not MOBILE}, + WIDGET.newKey{name="down", x=1130,y=560,w=60,h=90,font=35,fText="↓",code=pressKey"down",hide=not MOBILE}, + WIDGET.newKey{name="pageup", x=1210,y=460,w=80,h=90,font=35,fText="↑↑",code=pressKey"pageup",hide=not MOBILE}, + WIDGET.newKey{name="pagedown",x=1210,y=560,w=80,h=90,font=35,fText="↓↓",code=pressKey"pagedown",hide=not MOBILE}, + WIDGET.newButton{name="back", x=1165,y=60,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/error.lua b/parts/scenes/error.lua index 8984929f..90170d64 100644 --- a/parts/scenes/error.lua +++ b/parts/scenes/error.lua @@ -8,37 +8,37 @@ local errorShot,errorInfo local scene={} function scene.sceneInit() - BGcolor=rnd()>.026 and{.3,.5,.9}or{.62,.3,.926} - stateInfo=SYSTEM.."-"..VERSION.string.." scene:"..ERRDATA[#ERRDATA].scene - errorText=LOADED and text.errorMsg or"An error has occurred during loading.\nError info has been created, and you can send it to the author." - errorShot,errorInfo=ERRDATA[#ERRDATA].shot,ERRDATA[#ERRDATA].mes - NET.wsclose_app() - NET.wsclose_user() - NET.wsclose_play() - NET.wsclose_stream() - if SETTING then SFX.fplay('error',SETTING.voc*.8 or 0)end + BGcolor=rnd()>.026 and{.3,.5,.9}or{.62,.3,.926} + stateInfo=SYSTEM.."-"..VERSION.string.." scene:"..ERRDATA[#ERRDATA].scene + errorText=LOADED and text.errorMsg or"An error has occurred during loading.\nError info has been created, and you can send it to the author." + errorShot,errorInfo=ERRDATA[#ERRDATA].shot,ERRDATA[#ERRDATA].mes + NET.wsclose_app() + NET.wsclose_user() + NET.wsclose_play() + NET.wsclose_stream() + if SETTING then SFX.fplay('error',SETTING.voc*.8 or 0)end end function scene.draw() - gc.clear(BGcolor) - gc.setColor(1,1,1) - gc.draw(errorShot,100,345,nil,512/errorShot:getWidth(),288/errorShot:getHeight()) - gc.setColor(COLOR.Z) - setFont(100)gc.print(":(",100,0,0,1.2) - setFont(40)gc.printf(errorText,100,160,SCR.w0-100) - setFont(20) + gc.clear(BGcolor) + gc.setColor(1,1,1) + gc.draw(errorShot,100,345,nil,512/errorShot:getWidth(),288/errorShot:getHeight()) + gc.setColor(COLOR.Z) + setFont(100)gc.print(":(",100,0,0,1.2) + setFont(40)gc.printf(errorText,100,160,SCR.w0-100) + setFont(20) - gc.print(stateInfo,100,640) - gc.printf(errorInfo[1],626,326,1260-626) - gc.print("TRACEBACK",626,390) - for i=4,#errorInfo do - gc.print(errorInfo[i],626,340+20*i) - end + gc.print(stateInfo,100,640) + gc.printf(errorInfo[1],626,326,1260-626) + gc.print("TRACEBACK",626,390) + for i=4,#errorInfo do + gc.print(errorInfo[i],626,340+20*i) + end end scene.widgetList={ - WIDGET.newKey{name="console",x=940,y=640,w=170,h=80,font=35,code=goScene'app_console'}, - WIDGET.newKey{name="quit",x=1140,y=640,w=170,h=80,font=35,code=backScene}, + WIDGET.newKey{name="console",x=940,y=640,w=170,h=80,font=35,code=goScene'app_console'}, + WIDGET.newKey{name="quit",x=1140,y=640,w=170,h=80,font=35,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/game.lua b/parts/scenes/game.lua index 0ae00632..3e8e2b14 100644 --- a/parts/scenes/game.lua +++ b/parts/scenes/game.lua @@ -15,386 +15,386 @@ local repRateStrings={[0]="pause",[.125]="0.125x",[.5]="0.5x",[1]="1x",[2]="2x", local scene={} local function _updateMenuButtons() - WIDGET.active.restart.hide=replaying + WIDGET.active.restart.hide=replaying - local pos=(tasMode or replaying)and'right'or SETTING.menuPos - if GAME.replaying or pos=='right'then - WIDGET.active.restart.x=1125 - WIDGET.active.pause.x=1195 - modeTextPos=1100-drawableText.modeName:getWidth() - elseif pos=='middle'then - WIDGET.active.restart.x=360 - WIDGET.active.pause.x=860 - modeTextPos=940 - elseif pos=='left'then - WIDGET.active.restart.x=120 - WIDGET.active.pause.x=190 - modeTextPos=1200-drawableText.modeName:getWidth() - end + local pos=(tasMode or replaying)and'right'or SETTING.menuPos + if GAME.replaying or pos=='right'then + WIDGET.active.restart.x=1125 + WIDGET.active.pause.x=1195 + modeTextPos=1100-drawableText.modeName:getWidth() + elseif pos=='middle'then + WIDGET.active.restart.x=360 + WIDGET.active.pause.x=860 + modeTextPos=940 + elseif pos=='left'then + WIDGET.active.restart.x=120 + WIDGET.active.pause.x=190 + modeTextPos=1200-drawableText.modeName:getWidth() + end end local function _updateRepButtons() - local L=scene.widgetList - if replaying or tasMode then - for i=1,6 do L[i].hide=false end L[7].hide=true - if gameRate==0 then - L[1].hide=true - L[7].hide=false - elseif gameRate==.125 then - L[2].hide=true - elseif gameRate==.5 then - L[3].hide=true - elseif gameRate==1 then - L[4].hide=true - elseif gameRate==2 then - L[5].hide=true - elseif gameRate==5 then - L[6].hide=true - end - else - for i=1,7 do L[i].hide=true end - end + local L=scene.widgetList + if replaying or tasMode then + for i=1,6 do L[i].hide=false end L[7].hide=true + if gameRate==0 then + L[1].hide=true + L[7].hide=false + elseif gameRate==.125 then + L[2].hide=true + elseif gameRate==.5 then + L[3].hide=true + elseif gameRate==1 then + L[4].hide=true + elseif gameRate==2 then + L[5].hide=true + elseif gameRate==5 then + L[6].hide=true + end + else + for i=1,7 do L[i].hide=true end + end end local function _speedUp() - if gameRate==.125 then gameRate=.5 - elseif gameRate==.5 then gameRate=1 - elseif gameRate==1 then gameRate=2 - elseif gameRate==2 then gameRate=5 - end - _updateRepButtons() + if gameRate==.125 then gameRate=.5 + elseif gameRate==.5 then gameRate=1 + elseif gameRate==1 then gameRate=2 + elseif gameRate==2 then gameRate=5 + end + _updateRepButtons() end local function _speedDown() - if gameRate==.5 then gameRate=.125 - elseif gameRate==1 then gameRate=.5 - elseif gameRate==2 then gameRate=1 - elseif gameRate==5 then gameRate=2 - end - _updateRepButtons() + if gameRate==.5 then gameRate=.125 + elseif gameRate==1 then gameRate=.5 + elseif gameRate==2 then gameRate=1 + elseif gameRate==5 then gameRate=2 + end + _updateRepButtons() end local function _rep0() - scene.widgetList[1].hide=true - scene.widgetList[7].hide=false - gameRate=0 - _updateRepButtons() + scene.widgetList[1].hide=true + scene.widgetList[7].hide=false + gameRate=0 + _updateRepButtons() end local function _repP8() - scene.widgetList[2].hide=true - gameRate=.125 - _updateRepButtons() + scene.widgetList[2].hide=true + gameRate=.125 + _updateRepButtons() end local function _repP2() - scene.widgetList[3].hide=true - gameRate=.5 - _updateRepButtons() + scene.widgetList[3].hide=true + gameRate=.5 + _updateRepButtons() end local function _rep1() - scene.widgetList[4].hide=true - gameRate=1 - _updateRepButtons() + scene.widgetList[4].hide=true + gameRate=1 + _updateRepButtons() end local function _rep2() - scene.widgetList[5].hide=true - gameRate=2 - _updateRepButtons() + scene.widgetList[5].hide=true + gameRate=2 + _updateRepButtons() end local function _rep5() - scene.widgetList[6].hide=true - gameRate=5 - _updateRepButtons() + scene.widgetList[6].hide=true + gameRate=5 + _updateRepButtons() end local function _step()floatGameRate=floatGameRate+1 end local function _restart() - resetGameData(PLAYERS[1].frameRun<240 and'q') - noKey=replaying - noTouch=replaying - tasMode=false - floatGameRate,gameRate=0,1 - _updateRepButtons() + resetGameData(PLAYERS[1].frameRun<240 and'q') + noKey=replaying + noTouch=replaying + tasMode=false + floatGameRate,gameRate=0,1 + _updateRepButtons() end local function _checkGameKeyDown(key) - local k=keyMap.keyboard[key] - if k then - if k>0 then - if noKey then return end - PLAYERS[1]:pressKey(k) - VK.press(k) - return - elseif not GAME.fromRepMenu then - _restart() - return - end - end - return true--No key pressed + local k=keyMap.keyboard[key] + if k then + if k>0 then + if noKey then return end + PLAYERS[1]:pressKey(k) + VK.press(k) + return + elseif not GAME.fromRepMenu then + _restart() + return + end + end + return true--No key pressed end function scene.sceneInit(org) - if GAME.init then - resetGameData() - GAME.init=false - end + if GAME.init then + resetGameData() + GAME.init=false + end - tasMode=GAME.tasUsed - replaying=GAME.replaying - noKey=replaying - noTouch=not SETTING.VKSwitch or replaying + tasMode=GAME.tasUsed + replaying=GAME.replaying + noKey=replaying + noTouch=not SETTING.VKSwitch or replaying - if org~='depause'and org~='pause'then - floatGameRate,gameRate=0,1 - elseif not replaying then - if tasMode then - floatGameRate,gameRate=0,0 - else - floatGameRate,gameRate=0,1 - end - end + if org~='depause'and org~='pause'then + floatGameRate,gameRate=0,1 + elseif not replaying then + if tasMode then + floatGameRate,gameRate=0,0 + else + floatGameRate,gameRate=0,1 + end + end - _updateRepButtons() - _updateMenuButtons() + _updateRepButtons() + _updateMenuButtons() end scene.mouseDown=NULL function scene.touchDown(x,y) - if noTouch then return end + if noTouch then return end - local t=VK.on(x,y) - if t then - PLAYERS[1]:pressKey(t) - VK.touch(t,x,y) - end + local t=VK.on(x,y) + if t then + PLAYERS[1]:pressKey(t) + VK.touch(t,x,y) + end end function scene.touchUp(x,y) - if noTouch then return end + if noTouch then return end - local n=VK.on(x,y) - if n then - PLAYERS[1]:releaseKey(n) - VK.release(n) - end + local n=VK.on(x,y) + if n then + PLAYERS[1]:releaseKey(n) + VK.release(n) + end end function scene.touchMove() - if noTouch or touchMoveLastFrame then return end - touchMoveLastFrame=true + if noTouch or touchMoveLastFrame then return end + touchMoveLastFrame=true - local L=tc.getTouches() - for i=#L,1,-1 do - L[2*i-1],L[2*i]=SCR.xOy:inverseTransformPoint(tc.getPosition(L[i])) - end - local keys=VK.keys - for n=1,#keys do - local B=keys[n] - if B.ava then - for i=1,#L,2 do - if(L[i]-B.x)^2+(L[i+1]-B.y)^2<=B.r^2 then - goto CONTINUE_nextKey - end - end - PLAYERS[1]:releaseKey(n) - VK.release(n) - end - ::CONTINUE_nextKey:: - end + local L=tc.getTouches() + for i=#L,1,-1 do + L[2*i-1],L[2*i]=SCR.xOy:inverseTransformPoint(tc.getPosition(L[i])) + end + local keys=VK.keys + for n=1,#keys do + local B=keys[n] + if B.ava then + for i=1,#L,2 do + if(L[i]-B.x)^2+(L[i+1]-B.y)^2<=B.r^2 then + goto CONTINUE_nextKey + end + end + PLAYERS[1]:releaseKey(n) + VK.release(n) + end + ::CONTINUE_nextKey:: + end end function scene.keyDown(key,isRep) - if replaying then - if key=="space"then - if not isRep then gameRate=gameRate==0 and 1 or 0 end - _updateRepButtons() - elseif key=="left"then - if not isRep then - _speedDown() - end - elseif key=="right"then - if gameRate==0 then - _step() - elseif not isRep then - _speedUp() - end - elseif key=="escape"then - pauseGame() - end - else - if isRep then - return - elseif _checkGameKeyDown(key)then - if tasMode then - if key=="f1"then - if not isRep then gameRate=gameRate==0 and .125 or 0 end - _updateRepButtons() - elseif key=='f2'then - if not isRep then - _speedDown() - end - elseif key=='f3'then - if gameRate==0 then - _step() - elseif not isRep then - _speedUp() - end - end - end - if key=="escape"then - pauseGame() - end - end - end + if replaying then + if key=="space"then + if not isRep then gameRate=gameRate==0 and 1 or 0 end + _updateRepButtons() + elseif key=="left"then + if not isRep then + _speedDown() + end + elseif key=="right"then + if gameRate==0 then + _step() + elseif not isRep then + _speedUp() + end + elseif key=="escape"then + pauseGame() + end + else + if isRep then + return + elseif _checkGameKeyDown(key)then + if tasMode then + if key=="f1"then + if not isRep then gameRate=gameRate==0 and .125 or 0 end + _updateRepButtons() + elseif key=='f2'then + if not isRep then + _speedDown() + end + elseif key=='f3'then + if gameRate==0 then + _step() + elseif not isRep then + _speedUp() + end + end + end + if key=="escape"then + pauseGame() + end + end + end end function scene.keyUp(key) - if noKey then return end - local k=keyMap.keyboard[key] - if k then - if k>0 then - PLAYERS[1]:releaseKey(k) - VK.release(k) - end - end + if noKey then return end + local k=keyMap.keyboard[key] + if k then + if k>0 then + PLAYERS[1]:releaseKey(k) + VK.release(k) + end + end end function scene.gamepadDown(key) - if noKey then return end - local k=keyMap.joystick[key] - if k then - if k>0 then - PLAYERS[1]:pressKey(k) - VK.press(k) - else - _restart() - end - elseif key=="back"then - pauseGame() - end + if noKey then return end + local k=keyMap.joystick[key] + if k then + if k>0 then + PLAYERS[1]:pressKey(k) + VK.press(k) + else + _restart() + end + elseif key=="back"then + pauseGame() + end end function scene.gamepadUp(key) - if noKey then return end - local k=keyMap.joystick[key] - if k then - if k>0 then - PLAYERS[1]:releaseKey(k) - VK.release(k) - end - end + if noKey then return end + local k=keyMap.joystick[key] + if k then + if k>0 then + PLAYERS[1]:releaseKey(k) + VK.release(k) + end + end end local function _update_replay(repPtr) - local P1=PLAYERS[1] - local L=GAME.rep - while P1.frameRun==L[repPtr]do - local key=L[repPtr+1] - if key==0 then--Just wait - elseif key<=32 then--Press key - P1:pressKey(key) - VK.press(key) - elseif key<=64 then--Release key - P1:releaseKey(key-32) - VK.release(key-32) - end - repPtr=repPtr+2 - end - GAME.replaying=repPtr + local P1=PLAYERS[1] + local L=GAME.rep + while P1.frameRun==L[repPtr]do + local key=L[repPtr+1] + if key==0 then--Just wait + elseif key<=32 then--Press key + P1:pressKey(key) + VK.press(key) + elseif key<=64 then--Release key + P1:releaseKey(key-32) + VK.release(key-32) + end + repPtr=repPtr+2 + end + GAME.replaying=repPtr end local function _update_common(dt) - --Update control - touchMoveLastFrame=false - VK.update() + --Update control + touchMoveLastFrame=false + VK.update() - --Update players - for p=1,#PLAYERS do PLAYERS[p]:update(dt)end + --Update players + for p=1,#PLAYERS do PLAYERS[p]:update(dt)end - --Fresh royale target - if GAME.modeEnv.royaleMode and PLAYERS[1].frameRun%120==0 then - freshMostDangerous() - end + --Fresh royale target + if GAME.modeEnv.royaleMode and PLAYERS[1].frameRun%120==0 then + freshMostDangerous() + end - --Warning check - checkWarning() + --Warning check + checkWarning() end function scene.update(dt) - floatGameRate=floatGameRate+gameRate - while floatGameRate>=1 do - floatGameRate=floatGameRate-1 - if GAME.replaying then _update_replay(GAME.replaying)end - _update_common(dt) - end + floatGameRate=floatGameRate+gameRate + while floatGameRate>=1 do + floatGameRate=floatGameRate-1 + if GAME.replaying then _update_replay(GAME.replaying)end + _update_common(dt) + end end local tasText=gc.newText(getFont(100),"TAS") local function _drawAtkPointer(x,y) - local t=TIME() - local a=t*3%1*.8 - t=sin(t*20) + local t=TIME() + local a=t*3%1*.8 + t=sin(t*20) - gc.setColor(.2,.7+t*.2,1,.6+t*.4) - gc.circle('fill',x,y,25,6) + gc.setColor(.2,.7+t*.2,1,.6+t*.4) + gc.circle('fill',x,y,25,6) - gc.setColor(0,.6,1,.8-a) - gc.circle('line',x,y,30*(1+a),6) + gc.setColor(0,.6,1,.8-a) + gc.circle('line',x,y,30*(1+a),6) end function scene.draw() - if tasMode then - gc.push('transform') - gc.scale(4) - setFont(100) - gc.setColor(.4,.4,.4,.5) - gc.draw(tasText,72,20) - gc.pop() - end + if tasMode then + gc.push('transform') + gc.scale(4) + setFont(100) + gc.setColor(.4,.4,.4,.5) + gc.draw(tasText,72,20) + gc.pop() + end - local repMode=GAME.replaying or tasMode + local repMode=GAME.replaying or tasMode - --Players - for p=1,#PLAYERS do - PLAYERS[p]:draw(repMode) - end + --Players + for p=1,#PLAYERS do + PLAYERS[p]:draw(repMode) + end - --Virtual keys - VK.draw() + --Virtual keys + VK.draw() - --Attacking & Being attacked - if GAME.modeEnv.royaleMode then - local P=PLAYERS[1] - gc.setLineWidth(5) - gc.setColor(.8,1,0,.2) - for i=1,#P.atker do - local p=P.atker[i] - gc.line(p.centerX,p.centerY,P.x+300*P.size,P.y+620*P.size) - end - if P.atkMode~=4 then - if P.atking then - _drawAtkPointer(P.atking.centerX,P.atking.centerY) - end - else - for i=1,#P.atker do - local p=P.atker[i] - _drawAtkPointer(p.centerX,p.centerY) - end - end - end + --Attacking & Being attacked + if GAME.modeEnv.royaleMode then + local P=PLAYERS[1] + gc.setLineWidth(5) + gc.setColor(.8,1,0,.2) + for i=1,#P.atker do + local p=P.atker[i] + gc.line(p.centerX,p.centerY,P.x+300*P.size,P.y+620*P.size) + end + if P.atkMode~=4 then + if P.atking then + _drawAtkPointer(P.atking.centerX,P.atking.centerY) + end + else + for i=1,#P.atker do + local p=P.atker[i] + _drawAtkPointer(p.centerX,p.centerY) + end + end + end - --Mode info - gc.setColor(1,1,1,.8) - gc.draw(drawableText.modeName,modeTextPos,10) + --Mode info + gc.setColor(1,1,1,.8) + gc.draw(drawableText.modeName,modeTextPos,10) - --Replaying - if replaying or tasMode then - setFont(20) - gc.setColor(1,1,TIME()%.8>.4 and 1 or 0) - mStr(text[replaying and'replaying'or'tasUsing'],770,6) - gc.setColor(1,1,1,.8) - mStr(("%s %sf"):format(repRateStrings[gameRate],PLAYERS[1].frameRun),770,31) - end + --Replaying + if replaying or tasMode then + setFont(20) + gc.setColor(1,1,TIME()%.8>.4 and 1 or 0) + mStr(text[replaying and'replaying'or'tasUsing'],770,6) + gc.setColor(1,1,1,.8) + mStr(("%s %sf"):format(repRateStrings[gameRate],PLAYERS[1].frameRun),770,31) + end - --Warning - drawWarning() + --Warning + drawWarning() end scene.widgetList={ - WIDGET.newKey{name="rep0", x=40,y=50,w=60,code=_rep0,fText=TEXTURE.rep.rep0}, - WIDGET.newKey{name="repP8", x=105,y=50,w=60,code=_repP8,fText=TEXTURE.rep.repP8}, - WIDGET.newKey{name="repP2", x=170,y=50,w=60,code=_repP2,fText=TEXTURE.rep.repP2}, - WIDGET.newKey{name="rep1", x=235,y=50,w=60,code=_rep1,fText=TEXTURE.rep.rep1}, - WIDGET.newKey{name="rep2", x=300,y=50,w=60,code=_rep2,fText=TEXTURE.rep.rep2}, - WIDGET.newKey{name="rep5", x=365,y=50,w=60,code=_rep5,fText=TEXTURE.rep.rep5}, - WIDGET.newKey{name="step", x=430,y=50,w=60,code=_step,fText=TEXTURE.rep.step}, - WIDGET.newKey{name="restart", x=0,y=45,w=60,code=_restart,fText=TEXTURE.game.restart}, - WIDGET.newKey{name="pause", x=0,y=45,w=60,code=pauseGame,fText=TEXTURE.game.pause}, + WIDGET.newKey{name="rep0", x=40,y=50,w=60,code=_rep0,fText=TEXTURE.rep.rep0}, + WIDGET.newKey{name="repP8", x=105,y=50,w=60,code=_repP8,fText=TEXTURE.rep.repP8}, + WIDGET.newKey{name="repP2", x=170,y=50,w=60,code=_repP2,fText=TEXTURE.rep.repP2}, + WIDGET.newKey{name="rep1", x=235,y=50,w=60,code=_rep1,fText=TEXTURE.rep.rep1}, + WIDGET.newKey{name="rep2", x=300,y=50,w=60,code=_rep2,fText=TEXTURE.rep.rep2}, + WIDGET.newKey{name="rep5", x=365,y=50,w=60,code=_rep5,fText=TEXTURE.rep.rep5}, + WIDGET.newKey{name="step", x=430,y=50,w=60,code=_step,fText=TEXTURE.rep.step}, + WIDGET.newKey{name="restart",x=0,y=45,w=60,code=_restart,fText=TEXTURE.game.restart}, + WIDGET.newKey{name="pause", x=0,y=45,w=60,code=pauseGame,fText=TEXTURE.game.pause}, } return scene \ No newline at end of file diff --git a/parts/scenes/history.lua b/parts/scenes/history.lua index dede8e46..81f24fc1 100644 --- a/parts/scenes/history.lua +++ b/parts/scenes/history.lua @@ -1,30 +1,30 @@ local scene={} function scene.sceneInit() - BG.set('cubes') - WIDGET.active.texts:setTexts(STRING.split(require"parts.updateLog","\n")) + BG.set('cubes') + WIDGET.active.texts:setTexts(STRING.split(require"parts.updateLog","\n")) end function scene.wheelMoved(_,y) - WHEELMOV(y) + WHEELMOV(y) end function scene.keyDown(key) - if key=="up"then - WIDGET.active.texts:scroll(-5) - elseif key=="down"then - WIDGET.active.texts:scroll(5) - elseif key=="pageup"then - WIDGET.active.texts:scroll(-20) - elseif key=="pagedown"then - WIDGET.active.texts:scroll(20) - elseif key=="escape"then - SCN.back() - end + if key=="up"then + WIDGET.active.texts:scroll(-5) + elseif key=="down"then + WIDGET.active.texts:scroll(5) + elseif key=="pageup"then + WIDGET.active.texts:scroll(-20) + elseif key=="pagedown"then + WIDGET.active.texts:scroll(20) + elseif key=="escape"then + SCN.back() + end end scene.widgetList={ - WIDGET.newTextBox{name="texts",x=30,y=45,w=1000,h=640,font=20,fix=true}, - WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newTextBox{name="texts",x=30,y=45,w=1000,h=640,font=20,fix=true}, + WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/lang.lua b/parts/scenes/lang.lua index 7c324f25..44ae6790 100644 --- a/parts/scenes/lang.lua +++ b/parts/scenes/lang.lua @@ -1,37 +1,37 @@ local langList={ - "中文", - "全中文", - "就这?", - "English", - "Français", - "Español", - "Português", - "?????", + "中文", + "全中文", + "就这?", + "English", + "Français", + "Español", + "Português", + "?????", } local scene={} function scene.sceneBack() - saveSettings() + saveSettings() end local function _setLang(n) - SETTING.lang=n - LANG.set(n) - TEXT.clear() - TEXT.show(langList[n],640,500,100,'appear',.626) - collectgarbage() + SETTING.lang=n + LANG.set(n) + TEXT.clear() + TEXT.show(langList[n],640,500,100,'appear',.626) + collectgarbage() end scene.widgetList={ - WIDGET.newButton{x=200,y=100,w=200,h=120,fText=langList[1],color='R',font=35,code=function()_setLang(1)end}, - WIDGET.newButton{x=420,y=100,w=200,h=120,fText=langList[2],color='dR',font=35,code=function()_setLang(2)end}, - WIDGET.newButton{x=640,y=100,w=200,h=120,fText=langList[3],color='D',font=35,code=function()_setLang(3)end}, - WIDGET.newButton{x=860,y=100,w=200,h=120,fText=langList[4],color='N',font=35,code=function()_setLang(4)end}, - WIDGET.newButton{x=1080,y=100,w=200,h=120,fText=langList[5],color='lW',font=35,code=function()_setLang(5)end}, - WIDGET.newButton{x=200,y=250,w=200,h=120,fText=langList[6],color='O',font=35,code=function()_setLang(6)end}, - WIDGET.newButton{x=420,y=250,w=200,h=120,fText=langList[7],color='Y',font=35,code=function()_setLang(7)end}, - WIDGET.newButton{x=640,y=250,w=200,h=120,fText=langList[8],color='dH',font=35,code=function()_setLang(8)end}, - WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newButton{x=200,y=100,w=200,h=120,fText=langList[1],color='R',font=35,code=function()_setLang(1)end}, + WIDGET.newButton{x=420,y=100,w=200,h=120,fText=langList[2],color='dR',font=35,code=function()_setLang(2)end}, + WIDGET.newButton{x=640,y=100,w=200,h=120,fText=langList[3],color='D',font=35,code=function()_setLang(3)end}, + WIDGET.newButton{x=860,y=100,w=200,h=120,fText=langList[4],color='N',font=35,code=function()_setLang(4)end}, + WIDGET.newButton{x=1080,y=100,w=200,h=120,fText=langList[5],color='lW',font=35,code=function()_setLang(5)end}, + WIDGET.newButton{x=200,y=250,w=200,h=120,fText=langList[6],color='O',font=35,code=function()_setLang(6)end}, + WIDGET.newButton{x=420,y=250,w=200,h=120,fText=langList[7],color='Y',font=35,code=function()_setLang(7)end}, + WIDGET.newButton{x=640,y=250,w=200,h=120,fText=langList[8],color='dH',font=35,code=function()_setLang(8)end}, + WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/load.lua b/parts/scenes/load.lua index ddd4f40c..eb36b4e6 100644 --- a/parts/scenes/load.lua +++ b/parts/scenes/load.lua @@ -12,211 +12,211 @@ local studioLogo--Studio logo text object local logoColor1,logoColor2 local loadingThread=coroutine.wrap(function() - DAILYLAUNCH=freshDate'q' - if DAILYLAUNCH then - logoColor1=COLOR.S - logoColor2=COLOR.lS - else - local r=math.random()*6.2832 - logoColor1={COLOR.rainbow(r)} - logoColor2={COLOR.rainbow_light(r)} - end - YIELD() - YIELD('loadSFX')SFX.loadAll() - YIELD('loadVoice')VOC.loadAll() - YIELD('loadFont')for i=1,17 do getFont(15+5*i)end + DAILYLAUNCH=freshDate'q' + if DAILYLAUNCH then + logoColor1=COLOR.S + logoColor2=COLOR.lS + else + local r=math.random()*6.2832 + logoColor1={COLOR.rainbow(r)} + logoColor2={COLOR.rainbow_light(r)} + end + YIELD() + YIELD('loadSFX')SFX.loadAll() + YIELD('loadVoice')VOC.loadAll() + YIELD('loadFont')for i=1,17 do getFont(15+5*i)end - YIELD('loadModeIcon') - local modeIcons={} - modeIcons.marathon=GC.DO{32,32, - {'move',3,1}, - {'fRect',10,4,-2,23}, - {'fPoly',10,4,24,10,10,16.5}, - {'fRect',4,24,10,3}, - } - modeIcons.infinite=GC.DO{64,64, - {'setLW',4}, - {'dCirc',32,32,28}, - {'line',32,32,32,14}, - {'line',32,32,41,41}, - {'move',.5,.5}, - {'fRect',30,7,4,4}, - {'fRect',7,30,4,4}, - {'fRect',52,30,4,4}, - {'fRect',30,52,4,4}, - } - modeIcons.classic=GC.DO{64,64, - {'setLW',6}, - {'dRect',10,24,12,12}, - {'dRect',26,24,12,12}, - {'dRect',42,24,12,12}, - {'dRect',26,40,12,12}, - } - modeIcons.tsd=GC.DO{64,64, - {'fRect',7,7,16,16}, - {'fRect',7,41,16,16}, - {'fRect',41,41,16,16}, - {'move',.5,.5}, - {'setLW',1}, - {'dPoly',7,24,56,24,56,39,39,39,39,56,24,56,24,39,7,39}, - } - modeIcons.t49=GC.DO{64,64, - {'setLW',2}, - {'dRect',05,05,10,20},{'dRect',49,05,10,20}, - {'dRect',05,39,10,20},{'dRect',49,39,10,20}, - {'dRect',20,10,23,43}, - {'setCL',1,1,1,.7}, - {'fRect',20,10,23,43}, - } - modeIcons.t99=GC.DO{64,64, - {'setLW',2}, - {'dRect',02,02,6,12},{'dRect',11,02,6,12}, - {'dRect',02,18,6,12},{'dRect',11,18,6,12}, - {'dRect',02,34,6,12},{'dRect',11,34,6,12}, - {'dRect',02,50,6,12},{'dRect',11,50,6,12}, - {'dRect',47,02,6,12},{'dRect',56,02,6,12}, - {'dRect',47,18,6,12},{'dRect',56,18,6,12}, - {'dRect',47,34,6,12},{'dRect',56,34,6,12}, - {'dRect',47,50,6,12},{'dRect',56,50,6,12}, - {'dRect',20,10,23,43}, - {'setCL',1,1,1,.7}, - {'fRect',20,10,23,43}, - } + YIELD('loadModeIcon') + local modeIcons={} + modeIcons.marathon=GC.DO{32,32, + {'move',3,1}, + {'fRect',10,4,-2,23}, + {'fPoly',10,4,24,10,10,16.5}, + {'fRect',4,24,10,3}, + } + modeIcons.infinite=GC.DO{64,64, + {'setLW',4}, + {'dCirc',32,32,28}, + {'line',32,32,32,14}, + {'line',32,32,41,41}, + {'move',.5,.5}, + {'fRect',30,7,4,4}, + {'fRect',7,30,4,4}, + {'fRect',52,30,4,4}, + {'fRect',30,52,4,4}, + } + modeIcons.classic=GC.DO{64,64, + {'setLW',6}, + {'dRect',10,24,12,12}, + {'dRect',26,24,12,12}, + {'dRect',42,24,12,12}, + {'dRect',26,40,12,12}, + } + modeIcons.tsd=GC.DO{64,64, + {'fRect',7,7,16,16}, + {'fRect',7,41,16,16}, + {'fRect',41,41,16,16}, + {'move',.5,.5}, + {'setLW',1}, + {'dPoly',7,24,56,24,56,39,39,39,39,56,24,56,24,39,7,39}, + } + modeIcons.t49=GC.DO{64,64, + {'setLW',2}, + {'dRect',05,05,10,20},{'dRect',49,05,10,20}, + {'dRect',05,39,10,20},{'dRect',49,39,10,20}, + {'dRect',20,10,23,43}, + {'setCL',1,1,1,.7}, + {'fRect',20,10,23,43}, + } + modeIcons.t99=GC.DO{64,64, + {'setLW',2}, + {'dRect',02,02,6,12},{'dRect',11,02,6,12}, + {'dRect',02,18,6,12},{'dRect',11,18,6,12}, + {'dRect',02,34,6,12},{'dRect',11,34,6,12}, + {'dRect',02,50,6,12},{'dRect',11,50,6,12}, + {'dRect',47,02,6,12},{'dRect',56,02,6,12}, + {'dRect',47,18,6,12},{'dRect',56,18,6,12}, + {'dRect',47,34,6,12},{'dRect',56,34,6,12}, + {'dRect',47,50,6,12},{'dRect',56,50,6,12}, + {'dRect',20,10,23,43}, + {'setCL',1,1,1,.7}, + {'fRect',20,10,23,43}, + } - YIELD('loadMode') - for _,M in next,MODES do - M.records=FILE.load("record/"..M.name..".rec")or M.score and{} - if M.icon then - if not modeIcons[M.icon]then - modeIcons[M.icon]=gc.newImage("media/image/modeicon/"..M.icon..".png") - end - M.icon=modeIcons[M.icon] - end - end - if not MODES[STAT.lastPlay]then - STAT.lastPlay='sprint_10l' - end - local editFlag - for name,rank in next,RANKS do - local M=MODES[name] - if type(rank)~='number'then - RANKS[name]=nil - editFlag=true - elseif M and M.unlock and rank>0 then - for _,unlockName in next,M.unlock do - if not RANKS[unlockName]then - RANKS[unlockName]=0 - editFlag=true - end - end - end - if not(M and M.x)then - RANKS[name]=nil - editFlag=true - end - end - if editFlag then - saveProgress() - end + YIELD('loadMode') + for _,M in next,MODES do + M.records=FILE.load("record/"..M.name..".rec")or M.score and{} + if M.icon then + if not modeIcons[M.icon]then + modeIcons[M.icon]=gc.newImage("media/image/modeicon/"..M.icon..".png") + end + M.icon=modeIcons[M.icon] + end + end + if not MODES[STAT.lastPlay]then + STAT.lastPlay='sprint_10l' + end + local editFlag + for name,rank in next,RANKS do + local M=MODES[name] + if type(rank)~='number'then + RANKS[name]=nil + editFlag=true + elseif M and M.unlock and rank>0 then + for _,unlockName in next,M.unlock do + if not RANKS[unlockName]then + RANKS[unlockName]=0 + editFlag=true + end + end + end + if not(M and M.x)then + RANKS[name]=nil + editFlag=true + end + end + if editFlag then + saveProgress() + end - YIELD('loadOther') - STAT.run=STAT.run+1 + YIELD('loadOther') + STAT.run=STAT.run+1 - --Connect to server - NET.wsconn_app() + --Connect to server + NET.wsconn_app() - SFX.play('enter',.8) - SFX.play('welcome_sfx') - VOC.play('welcome_voc') - THEME.fresh() - LOADED=true - return'finish' + SFX.play('enter',.8) + SFX.play('welcome_sfx') + VOC.play('welcome_voc') + THEME.fresh() + LOADED=true + return'finish' end) function scene.sceneInit() - studioLogo=gc.newText(getFont(90),"26F Studio") - progress=0 - maxProgress=10 - t1,t2=0,0--Timer - animeType={}for i=1,8 do animeType[i]=rnd(5)end--Random animation type + studioLogo=gc.newText(getFont(90),"26F Studio") + progress=0 + maxProgress=10 + t1,t2=0,0--Timer + animeType={}for i=1,8 do animeType[i]=rnd(5)end--Random animation type end function scene.sceneBack() - love.event.quit() + love.event.quit() end function scene.mouseDown() - if LOADED then - if FIRSTLAUNCH then - SCN.push('main') - SCN.swapTo('lang') - else - SCN.swapTo(SETTING.simpMode and'main_simple'or'main') - end - end + if LOADED then + if FIRSTLAUNCH then + SCN.push('main') + SCN.swapTo('lang') + else + SCN.swapTo(SETTING.simpMode and'main_simple'or'main') + end + end end scene.touchDown=scene.mouseDown function scene.keyDown(key) - if key=="escape"then - love.event.quit() - else - scene.mouseDown() - end + if key=="escape"then + love.event.quit() + else + scene.mouseDown() + end end function scene.update() - if not LOADED then - loading=loadingThread() - progress=progress+1 - else - t1,t2=t1+1,t2+1 - end + if not LOADED then + loading=loadingThread() + progress=progress+1 + else + t1,t2=t1+1,t2+1 + end end local titleTransform={ - function(t)gc.translate(0,max(50-t,0)^2/25)end, - function(t)gc.translate(0,-max(50-t,0)^2/25)end, - function(t,i)local d=max(50-t,0)gc.translate(sin(TIME()*3+626*i)*d,cos(TIME()*3+626*i)*d)end, - function(t,i)local d=max(50-t,0)gc.translate(sin(TIME()*3+626*i)*d,-cos(TIME()*3+626*i)*d)end, - function(t)gc.setColor(1,1,1,min(t*.02,1)+rnd()*.2)end, + function(t)gc.translate(0,max(50-t,0)^2/25)end, + function(t)gc.translate(0,-max(50-t,0)^2/25)end, + function(t,i)local d=max(50-t,0)gc.translate(sin(TIME()*3+626*i)*d,cos(TIME()*3+626*i)*d)end, + function(t,i)local d=max(50-t,0)gc.translate(sin(TIME()*3+626*i)*d,-cos(TIME()*3+626*i)*d)end, + function(t)gc.setColor(1,1,1,min(t*.02,1)+rnd()*.2)end, } local titleColor={COLOR.lP,COLOR.lC,COLOR.lB,COLOR.lO,COLOR.lF,COLOR.lM,COLOR.lG,COLOR.lY} function scene.draw() - gc.clear(.08,.08,.084) + gc.clear(.08,.08,.084) - local T=(t1+110)%300 - if T<30 then - gc.setLineWidth(4+(30-T)^1.626/62) - else - gc.setLineWidth(4) - end - local L=title - gc.push('transform') - gc.translate(126,100) - for i=1,8 do - local t=t1-i*15 - if t>0 then - gc.push('transform') - titleTransform[animeType[i]](t,i) - local dt=(t1+62-5*i)%300 - if dt<20 then - gc.translate(0,math.abs(10-dt)-10) - end - gc.setColor(titleColor[i][1],titleColor[i][2],titleColor[i][3],min(t*.025,1)*.16) - gc.polygon('fill',L[i]) - gc.setColor(1,1,1,min(t*.025,1)) - gc.polygon('line',L[i]) - gc.pop() - end - end - gc.pop() + local T=(t1+110)%300 + if T<30 then + gc.setLineWidth(4+(30-T)^1.626/62) + else + gc.setLineWidth(4) + end + local L=title + gc.push('transform') + gc.translate(126,100) + for i=1,8 do + local t=t1-i*15 + if t>0 then + gc.push('transform') + titleTransform[animeType[i]](t,i) + local dt=(t1+62-5*i)%300 + if dt<20 then + gc.translate(0,math.abs(10-dt)-10) + end + gc.setColor(titleColor[i][1],titleColor[i][2],titleColor[i][3],min(t*.025,1)*.16) + gc.polygon('fill',L[i]) + gc.setColor(1,1,1,min(t*.025,1)) + gc.polygon('line',L[i]) + gc.pop() + end + end + gc.pop() - gc.setColor(logoColor1[1],logoColor1[2],logoColor1[3],progress/maxProgress)mDraw(studioLogo,640,400) - gc.setColor(logoColor2[1],logoColor2[2],logoColor2[3],progress/maxProgress)for dx=-2,2,2 do for dy=-2,2,2 do mDraw(studioLogo,640+dx,400+dy)end end - gc.setColor(.2,.2,.2,progress/maxProgress)mDraw(studioLogo,640,400) + gc.setColor(logoColor1[1],logoColor1[2],logoColor1[3],progress/maxProgress)mDraw(studioLogo,640,400) + gc.setColor(logoColor2[1],logoColor2[2],logoColor2[3],progress/maxProgress)for dx=-2,2,2 do for dy=-2,2,2 do mDraw(studioLogo,640+dx,400+dy)end end + gc.setColor(.2,.2,.2,progress/maxProgress)mDraw(studioLogo,640,400) - gc.setColor(COLOR.Z) - setFont(30) - mStr(text.loadText[loading]or"",640,530) + gc.setColor(COLOR.Z) + setFont(30) + mStr(text.loadText[loading]or"",640,530) end return scene \ No newline at end of file diff --git a/parts/scenes/login.lua b/parts/scenes/login.lua index efc1a168..b12593d3 100644 --- a/parts/scenes/login.lua +++ b/parts/scenes/login.lua @@ -4,39 +4,39 @@ local passwordBox=WIDGET.newInputBox{name="password",x=380,y=300,w=620,h=60,secr local savePW=false local function _login() - local email,password=emailBox:getText(),passwordBox:getText() - if not STRING.simpEmailCheck(email)then - MES.new('error',text.wrongEmail)return - elseif #password==0 then - MES.new('error',text.noPassword)return - end - NET.wsconn_user_pswd(email,password) - if savePW then - FILE.save({email,password},'conf/account') - else - love.filesystem.remove('conf/account') - end + local email,password=emailBox:getText(),passwordBox:getText() + if not STRING.simpEmailCheck(email)then + MES.new('error',text.wrongEmail)return + elseif #password==0 then + MES.new('error',text.noPassword)return + end + NET.wsconn_user_pswd(email,password) + if savePW then + FILE.save({email,password},'conf/account') + else + love.filesystem.remove('conf/account') + end end local scene={} function scene.sceneInit() - local data=FILE.load('conf/account') - if data then - savePW=true - emailBox:setText(data[1]) - passwordBox:setText(data[2]) - end + local data=FILE.load('conf/account') + if data then + savePW=true + emailBox:setText(data[1]) + passwordBox:setText(data[2]) + end end scene.widgetList={ - WIDGET.newText{name="title", x=80, y=50,font=70,align='L'}, - WIDGET.newButton{name="register", x=1140, y=100,w=170,h=80,color='lY',code=function()SCN.swapTo('register','swipeR')end}, - emailBox, - passwordBox, - WIDGET.newSwitch{name="keepPW", x=900,y=420,disp=function()return savePW end,code=function()savePW=not savePW end}, - WIDGET.newKey{name="login", x=1140, y=540,w=170,h=80,font=40,code=_login}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newText{name="title", x=80, y=50,font=70,align='L'}, + WIDGET.newButton{name="register",x=1140,y=100,w=170,h=80,color='lY',code=function()SCN.swapTo('register','swipeR')end}, + emailBox, + passwordBox, + WIDGET.newSwitch{name="keepPW", x=900, y=420,disp=function()return savePW end,code=function()savePW=not savePW end}, + WIDGET.newKey{name="login", x=1140,y=540,w=170,h=80,font=40,code=_login}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/main.lua b/parts/scenes/main.lua index 47067129..e083df2c 100644 --- a/parts/scenes/main.lua +++ b/parts/scenes/main.lua @@ -9,196 +9,196 @@ local tip=gc.newText(getFont(30),"") local scrollX--Tip scroll position local widgetX0={ - -10,-10,-10,-10, - 1290,1290,1290,1290, + -10,-10,-10,-10, + 1290,1290,1290,1290, } local enterConsole=coroutine.wrap(function() - while true do - SFX.play('ren_'..math.random(5,6))YIELD() - SFX.play('ren_'..math.random(7,8))YIELD() - SFX.play('ren_'..math.random(9,10))YIELD() - SFX.play('ren_9')SFX.play('ren_11')SFX.play('ren_mega') - SCN.go('app_console') - YIELD() - end + while true do + SFX.play('ren_'..math.random(5,6))YIELD() + SFX.play('ren_'..math.random(7,8))YIELD() + SFX.play('ren_'..math.random(9,10))YIELD() + SFX.play('ren_9')SFX.play('ren_11')SFX.play('ren_mega') + SCN.go('app_console') + YIELD() + end end) function scene.sceneInit() - BG.set() - lastQuitTime=-1e99 + BG.set() + lastQuitTime=-1e99 - --Set tip - tip:set(text.getTip()) - scrollX=tipLength + --Set tip + tip:set(text.getTip()) + scrollX=tipLength - --Set quick-play-button text - scene.widgetList[2]:setObject(text.WidgetText.main.qplay..": "..text.modes[STAT.lastPlay][1]) + --Set quick-play-button text + scene.widgetList[2]:setObject(text.WidgetText.main.qplay..": "..text.modes[STAT.lastPlay][1]) - --Create demo player - destroyPlayers() - GAME.modeEnv=NONE - GAME.seed=math.random(2e6) - PLY.newDemoPlayer(1) - PLAYERS[1]:setPosition(520,140,.8) + --Create demo player + destroyPlayers() + GAME.modeEnv=NONE + GAME.seed=math.random(2e6) + PLY.newDemoPlayer(1) + PLAYERS[1]:setPosition(520,140,.8) end function scene.mouseDown(x,y) - if x>=400 and x<=880 and y>=10 and y<=110 then - enterConsole() - end + if x>=400 and x<=880 and y>=10 and y<=110 then + enterConsole() + end end scene.touchDown=scene.mouseDown local function _testButton(n) - if NET.getlock('access_and_login')then - MES.new('warn',text.wsConnecting) - else - if WIDGET.isFocus(scene.widgetList[n])then - return true - else - WIDGET.focus(scene.widgetList[n]) - end - end + if NET.getlock('access_and_login')then + MES.new('warn',text.wsConnecting) + else + if WIDGET.isFocus(scene.widgetList[n])then + return true + else + WIDGET.focus(scene.widgetList[n]) + end + end end function scene.keyDown(key,isRep) - if isRep then return end - if key=="1"then - if _testButton(1)then - SCN.go('mode') - end - elseif key=="q"then - if _testButton(2)then - loadGame(STAT.lastPlay,true) - end - elseif key=="a"then - if _testButton(3)then - if WS.status('app')=='running'then - NET.tryLogin(false) - elseif WS.status('app')=='dead'then - NET.wsconn_app() - SFX.play('connect') - MES.new('info',text.wsConnecting) - end - end - elseif key=="z"then - if _testButton(4)then - SCN.go('customGame') - end - elseif key=="-"then - if _testButton(5)then - SCN.go('setting_game') - end - elseif key=="p"then - if _testButton(6)then - SCN.go('stat') - end - elseif key=="l"then - if _testButton(7)then - SCN.go('dict') - end - elseif key==","then - if _testButton(8)then - SCN.go('replays') - end - elseif key=="2"then - if _testButton(9)then - SCN.go('music') - end - elseif key=="3"then - if _testButton(10)then - SCN.go('lang') - end - elseif key=="x"then - if _testButton(11)then - SCN.go('about') - end - elseif key=="m"then - if _testButton(12)then - SCN.go('manual') - end - elseif key=="c"then - enterConsole() - elseif key=="escape"then - if TIME()-lastQuitTime<1 then - VOC.play('bye') - SCN.swapTo('quit','slowFade') - else - lastQuitTime=TIME() - MES.new('warn',text.sureQuit) - end - end + if isRep then return end + if key=="1"then + if _testButton(1)then + SCN.go('mode') + end + elseif key=="q"then + if _testButton(2)then + loadGame(STAT.lastPlay,true) + end + elseif key=="a"then + if _testButton(3)then + if WS.status('app')=='running'then + NET.tryLogin(false) + elseif WS.status('app')=='dead'then + NET.wsconn_app() + SFX.play('connect') + MES.new('info',text.wsConnecting) + end + end + elseif key=="z"then + if _testButton(4)then + SCN.go('customGame') + end + elseif key=="-"then + if _testButton(5)then + SCN.go('setting_game') + end + elseif key=="p"then + if _testButton(6)then + SCN.go('stat') + end + elseif key=="l"then + if _testButton(7)then + SCN.go('dict') + end + elseif key==","then + if _testButton(8)then + SCN.go('replays') + end + elseif key=="2"then + if _testButton(9)then + SCN.go('music') + end + elseif key=="3"then + if _testButton(10)then + SCN.go('lang') + end + elseif key=="x"then + if _testButton(11)then + SCN.go('about') + end + elseif key=="m"then + if _testButton(12)then + SCN.go('manual') + end + elseif key=="c"then + enterConsole() + elseif key=="escape"then + if TIME()-lastQuitTime<1 then + VOC.play('bye') + SCN.swapTo('quit','slowFade') + else + lastQuitTime=TIME() + MES.new('warn',text.sureQuit) + end + end end function scene.update(dt) - PLAYERS[1]:update(dt) - scrollX=scrollX-2.6 - if scrollX<-tip:getWidth()then - scrollX=tipLength - tip:set(text.getTip()) - end - local L=scene.widgetList - for i=1,8 do - L[i].x=L[i].x*.9+(widgetX0[i]-400+(WIDGET.isFocus(L[i])and(i<5 and 100 or -100)or 0))*.1 - end + PLAYERS[1]:update(dt) + scrollX=scrollX-2.6 + if scrollX<-tip:getWidth()then + scrollX=tipLength + tip:set(text.getTip()) + end + local L=scene.widgetList + for i=1,8 do + L[i].x=L[i].x*.9+(widgetX0[i]-400+(WIDGET.isFocus(L[i])and(i<5 and 100 or -100)or 0))*.1 + end end local function _tipStencil() - gc.rectangle('fill',0,0,tipLength,42) + gc.rectangle('fill',0,0,tipLength,42) end function scene.draw() - --Version - setFont(20) - gc.setColor(.6,.6,.6) - mStr(verName,640,110) + --Version + setFont(20) + gc.setColor(.6,.6,.6) + mStr(verName,640,110) - --Title - gc.setColor(1,1,1) - mDraw(TEXTURE.title_color,640,60,nil,.43) + --Title + gc.setColor(1,1,1) + mDraw(TEXTURE.title_color,640,60,nil,.43) - --Tip - gc.setColor(COLOR.Z) - gc.push('transform') - gc.translate(260,650) - gc.setLineWidth(2) - gc.rectangle('line',0,0,tipLength,42,3) - gc.stencil(_tipStencil) - gc.setStencilTest('equal',1) - gc.draw(tip,0+scrollX,0) - gc.setColor(1,1,1,.2) - gc.setStencilTest() - gc.pop() + --Tip + gc.setColor(COLOR.Z) + gc.push('transform') + gc.translate(260,650) + gc.setLineWidth(2) + gc.rectangle('line',0,0,tipLength,42,3) + gc.stencil(_tipStencil) + gc.setStencilTest('equal',1) + gc.draw(tip,0+scrollX,0) + gc.setColor(1,1,1,.2) + gc.setStencilTest() + gc.pop() - --Player - PLAYERS[1]:draw() + --Player + PLAYERS[1]:draw() - --Profile - drawSelfProfile() + --Profile + drawSelfProfile() - --Player count - drawOnlinePlayerCount() + --Player count + drawOnlinePlayerCount() - --Connecting mark - if NET.getlock('access_and_login')then - gc.setColor(COLOR.Z) - gc.setLineWidth(10) - local t=TIME()*6.26%6.2832 - gc.arc('line','open',scene.widgetList[3].x+865,450,40,t,t+4.26) - end + --Connecting mark + if NET.getlock('access_and_login')then + gc.setColor(COLOR.Z) + gc.setLineWidth(10) + local t=TIME()*6.26%6.2832 + gc.arc('line','open',scene.widgetList[3].x+865,450,40,t,t+4.26) + end end scene.widgetList={ - WIDGET.newButton{name="offline",x=-1200,y=210,w=800,h=100, color='lR',font=45,align='R',edge=30,code=pressKey"1"}, - WIDGET.newButton{name="qplay", x=-1200,y=330,w=800,h=100, color='lM',font=40,align='R',edge=30,code=pressKey"q"}, - WIDGET.newButton{name="online", x=-1200,y=450,w=800,h=100, color='lV',font=45,align='R',edge=30,code=pressKey"a"}, - WIDGET.newButton{name="custom", x=-1200,y=570,w=800,h=100, color='lS',font=45,align='R',edge=30,code=pressKey"z"}, + WIDGET.newButton{name="offline",x=-1200,y=210,w=800,h=100,color='lR',font=45,align='R',edge=30,code=pressKey"1"}, + WIDGET.newButton{name="qplay", x=-1200,y=330,w=800,h=100,color='lM',font=40,align='R',edge=30,code=pressKey"q"}, + WIDGET.newButton{name="online", x=-1200,y=450,w=800,h=100,color='lV',font=45,align='R',edge=30,code=pressKey"a"}, + WIDGET.newButton{name="custom", x=-1200,y=570,w=800,h=100,color='lS',font=45,align='R',edge=30,code=pressKey"z"}, - WIDGET.newButton{name="setting",x=2480,y=210,w=800,h=100, color='lO',font=40,align='L',edge=30,code=pressKey"-"}, - WIDGET.newButton{name="stat", x=2480,y=330,w=800,h=100, color='lL',font=40,align='L',edge=30,code=pressKey"p"}, - WIDGET.newButton{name="dict", x=2480,y=450,w=800,h=100, color='lG',font=40,align='L',edge=30,code=pressKey"l"}, - WIDGET.newButton{name="replays",x=2480,y=570,w=800,h=100, color='lC',font=40,align='L',edge=30,code=pressKey","}, + WIDGET.newButton{name="setting",x=2480,y=210,w=800,h=100, color='lO',font=40,align='L',edge=30,code=pressKey"-"}, + WIDGET.newButton{name="stat", x=2480,y=330,w=800,h=100, color='lL',font=40,align='L',edge=30,code=pressKey"p"}, + WIDGET.newButton{name="dict", x=2480,y=450,w=800,h=100, color='lG',font=40,align='L',edge=30,code=pressKey"l"}, + WIDGET.newButton{name="replays",x=2480,y=570,w=800,h=100, color='lC',font=40,align='L',edge=30,code=pressKey","}, - WIDGET.newButton{name="music", x=120,y=80,w=100, color='lO',code=pressKey"2",fText=TEXTURE.music}, - WIDGET.newButton{name="lang", x=280,y=80,w=100, color='lN',code=pressKey"3",fText=TEXTURE.language}, - WIDGET.newButton{name="about", x=-110,y=670,w=600,h=70, color='lB',align='R',edge=30,code=pressKey"x",fText=TEXTURE.info}, - WIDGET.newButton{name="manual", x=1390,y=670,w=600,h=70, color='lR',align='L',edge=30,code=pressKey"m",fText=TEXTURE.question}, + WIDGET.newButton{name="music", x=120,y=80,w=100, color='lO',code=pressKey"2",fText=TEXTURE.music}, + WIDGET.newButton{name="lang", x=280,y=80,w=100, color='lN',code=pressKey"3",fText=TEXTURE.language}, + WIDGET.newButton{name="about", x=-110,y=670,w=600,h=70, color='lB',align='R',edge=30,code=pressKey"x",fText=TEXTURE.info}, + WIDGET.newButton{name="manual", x=1390,y=670,w=600,h=70, color='lR',align='L',edge=30,code=pressKey"m",fText=TEXTURE.question}, } return scene \ No newline at end of file diff --git a/parts/scenes/main_simple.lua b/parts/scenes/main_simple.lua index 6d36a7af..1102bad6 100644 --- a/parts/scenes/main_simple.lua +++ b/parts/scenes/main_simple.lua @@ -5,25 +5,25 @@ local scene={} local tip=gc.newText(getFont(30),"") function scene.sceneInit() - tip:set(text.getTip()) - BG.set() + tip:set(text.getTip()) + BG.set() end function scene.draw() - gc.setColor(1,1,1) - mDraw(TEXTURE.title_color,640,160) - mDraw(tip,640,660) + gc.setColor(1,1,1) + mDraw(TEXTURE.title_color,640,160) + mDraw(tip,640,660) end scene.widgetList={ - WIDGET.newText{name="system", x=750,y=280,color='Z',align='L',fText=SYSTEM}, - WIDGET.newText{name="version", x=950,y=280,color='Z',align='L',fText=VERSION.string}, - WIDGET.newButton{name="sprint", x=260,y=480,w=260,font=50,code=function()loadGame('sprint_40l',true)end}, - WIDGET.newButton{name="marathon",x=640,y=480,w=260,font=50,code=function()loadGame('marathon_n',true)end}, - WIDGET.newButton{name="setting",x=1000,y=400,w=120,fText=TEXTURE.setting,code=goScene'setting_game'}, - WIDGET.newButton{name="lang", x=1000,y=560,w=120,fText=TEXTURE.language,code=goScene'lang'}, - WIDGET.newButton{name="manual", x=1160,y=400,w=120,fText=TEXTURE.sure,code=goScene'manual'}, - WIDGET.newButton{name="quit", x=1160,y=560,w=120,fText=TEXTURE.quit,code=function()VOC.play('bye')SCN.swapTo('quit','slowFade')end}, + WIDGET.newText{name="system", x=750,y=280,color='Z',align='L',fText=SYSTEM}, + WIDGET.newText{name="version", x=950,y=280,color='Z',align='L',fText=VERSION.string}, + WIDGET.newButton{name="sprint", x=260,y=480,w=260,font=50,code=function()loadGame('sprint_40l',true)end}, + WIDGET.newButton{name="marathon",x=640,y=480,w=260,font=50,code=function()loadGame('marathon_n',true)end}, + WIDGET.newButton{name="setting", x=1000,y=400,w=120,fText=TEXTURE.setting,code=goScene'setting_game'}, + WIDGET.newButton{name="lang", x=1000,y=560,w=120,fText=TEXTURE.language,code=goScene'lang'}, + WIDGET.newButton{name="manual", x=1160,y=400,w=120,fText=TEXTURE.sure,code=goScene'manual'}, + WIDGET.newButton{name="quit", x=1160,y=560,w=120,fText=TEXTURE.quit,code=function()VOC.play('bye')SCN.swapTo('quit','slowFade')end}, } return scene \ No newline at end of file diff --git a/parts/scenes/manual.lua b/parts/scenes/manual.lua index f4320d7a..5fcdcda9 100644 --- a/parts/scenes/manual.lua +++ b/parts/scenes/manual.lua @@ -1,30 +1,30 @@ local scene={} function scene.sceneInit() - BG.set('cubes') - WIDGET.active.texts:setTexts(require("parts.language.manual_"..({'zh','zh','zh','en','en','en','en','en'})[SETTING.lang])) + BG.set('cubes') + WIDGET.active.texts:setTexts(require("parts.language.manual_"..({'zh','zh','zh','en','en','en','en','en'})[SETTING.lang])) end function scene.wheelMoved(_,y) - WHEELMOV(y) + WHEELMOV(y) end function scene.keyDown(key) - if key=="up"then - WIDGET.active.texts:scroll(-5) - elseif key=="down"then - WIDGET.active.texts:scroll(5) - elseif key=="pageup"then - WIDGET.active.texts:scroll(-20) - elseif key=="pagedown"then - WIDGET.active.texts:scroll(20) - elseif key=="escape"then - SCN.back() - end + if key=="up"then + WIDGET.active.texts:scroll(-5) + elseif key=="down"then + WIDGET.active.texts:scroll(5) + elseif key=="pageup"then + WIDGET.active.texts:scroll(-20) + elseif key=="pagedown"then + WIDGET.active.texts:scroll(20) + elseif key=="escape"then + SCN.back() + end end scene.widgetList={ - WIDGET.newTextBox{name="texts",x=30,y=45,w=1000,h=640,font=15,fix=true}, - WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newTextBox{name="texts",x=30,y=45,w=1000,h=640,font=15,fix=true}, + WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/mod.lua b/parts/scenes/mod.lua index 148ef20d..3a3f1346 100644 --- a/parts/scenes/mod.lua +++ b/parts/scenes/mod.lua @@ -3,36 +3,36 @@ local kb=love.keyboard local ins,rem=table.insert,table.remove local function _modComp(a,b) - return a.no0 then - M.time=M.time-1 - end - else - if M.time<10 then - M.time=M.time+1 - end - end - end + for _,M in next,MODOPT do + if M.sel==0 then + if M.time>0 then + M.time=M.time-1 + end + else + if M.time<10 then + M.time=M.time+1 + end + end + end end function scene.draw() - setFont(40) - gc.setLineWidth(5) - for _,M in next,MODOPT do - gc.push('transform') - gc.translate(M.x,M.y) - local t=M.time*.01--t range:0~0.1 - gc.scale(1+3*t) - gc.rotate(t) - local rad,side - if M.unranked then - rad,side=45,5 - else - rad=40 - end - local color=M.color - gc.setColor(color[1],color[2],color[3],5*t) - gc.circle('fill',0,0,rad,side) + setFont(40) + gc.setLineWidth(5) + for _,M in next,MODOPT do + gc.push('transform') + gc.translate(M.x,M.y) + local t=M.time*.01--t range:0~0.1 + gc.scale(1+3*t) + gc.rotate(t) + local rad,side + if M.unranked then + rad,side=45,5 + else + rad=40 + end + local color=M.color + gc.setColor(color[1],color[2],color[3],5*t) + gc.circle('fill',0,0,rad,side) - gc.setColor(color) - gc.circle('line',0,0,rad,side) - gc.setColor(COLOR.Z) - mStr(M.id,0,-28) - if M.sel>0 and M.list then - setFont(25) - gc.setColor(1,1,1,10*t) - mStr(M.list[M.sel],20,8) - setFont(40) - end + gc.setColor(color) + gc.circle('line',0,0,rad,side) + gc.setColor(COLOR.Z) + mStr(M.id,0,-28) + if M.sel>0 and M.list then + setFont(25) + gc.setColor(1,1,1,10*t) + mStr(M.list[M.sel],20,8) + setFont(40) + end - if M.list then - gc.setColor(1,1,1,t*6) - gc.arc('line','open',0,0,rad+6,0,(M.sel/#M.list)*6.2832) - end - gc.pop() - end + if M.list then + gc.setColor(1,1,1,t*6) + gc.arc('line','open',0,0,rad+6,0,(M.sel/#M.list)*6.2832) + end + gc.pop() + end - gc.setColor(COLOR.Z) - if selected then - setFont(30) - gc.printf(text.modInfo[selected.name],70,540,950) - else - setFont(25) - gc.printf(text.modInstruction,70,540,950) - end + gc.setColor(COLOR.Z) + if selected then + setFont(30) + gc.printf(text.modInfo[selected.name],70,540,950) + else + setFont(25) + gc.printf(text.modInstruction,70,540,950) + end end scene.widgetList={ - WIDGET.newText{name="title", x=80,y=50,font=70,align='L'}, - WIDGET.newText{name="unranked", x=1200,y=60,color='Y',font=50,align='R',hideF=function()return scoreValid()end}, - WIDGET.newButton{name="reset", x=1140,y=540,w=170,h=80,font=25,code=pressKey"tab"}, - WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newText{name="title", x=80,y=50,font=70,align='L'}, + WIDGET.newText{name="unranked",x=1200,y=60,color='Y',font=50,align='R',hideF=function()return scoreValid()end}, + WIDGET.newButton{name="reset", x=1140,y=540,w=170,h=80,font=25,code=pressKey"tab"}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/mode.lua b/parts/scenes/mode.lua index 5c81c85b..ab96dcb9 100644 --- a/parts/scenes/mode.lua +++ b/parts/scenes/mode.lua @@ -15,13 +15,13 @@ local int,abs=math.floor,math.abs local setFont=setFont local mapCam={ - sel=false,--Selected mode ID - xOy=mt.newTransform(0,0,0,1),--Transformation for map display - keyCtrl=false,--If controlling with key + sel=false,--Selected mode ID + xOy=mt.newTransform(0,0,0,1),--Transformation for map display + keyCtrl=false,--If controlling with key - --For auto zooming when enter/leave scene - zoomMethod=false, - zoomK=false, + --For auto zooming when enter/leave scene + zoomMethod=false, + zoomK=false, } local visibleModes local touchDist @@ -29,310 +29,310 @@ local touchDist local scene={} function scene.sceneInit(org) - BG.set() - mapCam.zoomK=org=='main'and 5 or 1 - visibleModes={}--1=unlocked, 2=locked but visible - for name,M in next,MODES do - if RANKS[name]and M.x then - visibleModes[name]=1 - if M.unlock then - for i=1,#M.unlock do - visibleModes[M.unlock[i]]=visibleModes[M.unlock[i]]or 2 - end - end - end - end + BG.set() + mapCam.zoomK=org=='main'and 5 or 1 + visibleModes={}--1=unlocked, 2=locked but visible + for name,M in next,MODES do + if RANKS[name]and M.x then + visibleModes[name]=1 + if M.unlock then + for i=1,#M.unlock do + visibleModes[M.unlock[i]]=visibleModes[M.unlock[i]]or 2 + end + end + end + end end local function _getK() - return abs(mapCam.xOy:transformPoint(1,0)-mapCam.xOy:transformPoint(0,0)) + return abs(mapCam.xOy:transformPoint(1,0)-mapCam.xOy:transformPoint(0,0)) end local function _getPos() - return mapCam.xOy:inverseTransformPoint(0,0) + return mapCam.xOy:inverseTransformPoint(0,0) end local function _onModeRaw(x,y) - for name,M in next,MODES do - if visibleModes[name]and M.x then - local s=M.size - if M.shape==1 then - if x>M.x-s and xM.y-s and yM.x-s and xM.y-s and y1300 and dx<0 or x<-1500 and dx>0 then dx=0 end - if y>420 and dy<0 or y<-1900 and dy>0 then dy=0 end - mapCam.xOy:translate(dx/k,dy/k) + local k=_getK() + local x,y=_getPos() + if x>1300 and dx<0 or x<-1500 and dx>0 then dx=0 end + if y>420 and dy<0 or y<-1900 and dy>0 then dy=0 end + mapCam.xOy:translate(dx/k,dy/k) end function scene.wheelMoved(_,dy) - mapCam.keyCtrl=false - local k=_getK() - k=min(max(k+dy*.1,.3),1.6)/k - mapCam.xOy:scale(k) + mapCam.keyCtrl=false + local k=_getK() + k=min(max(k+dy*.1,.3),1.6)/k + mapCam.xOy:scale(k) - local x,y=_getPos() - mapCam.xOy:translate(x*(1-k),y*(1-k)) + local x,y=_getPos() + mapCam.xOy:translate(x*(1-k),y*(1-k)) end function scene.mouseMove(_,_,dx,dy) - if ms.isDown(1)then - _moveMap(dx,dy) - end - mapCam.keyCtrl=false + if ms.isDown(1)then + _moveMap(dx,dy) + end + mapCam.keyCtrl=false end function scene.mouseClick(x,y) - local _=mapCam.sel - if not _ or x<920 then - x,y=x-640,y-360 - x,y=mapCam.xOy:inverseTransformPoint(x,y) - local SEL=_onModeRaw(x,y) - if _~=SEL then - if SEL then - mapCam.moving=true - _=MODES[SEL] - mapCam.sel=SEL - SFX.play('click') - else - mapCam.sel=false - end - elseif _ then - scene.keyDown("return") - end - end - mapCam.keyCtrl=false + local _=mapCam.sel + if not _ or x<920 then + x,y=x-640,y-360 + x,y=mapCam.xOy:inverseTransformPoint(x,y) + local SEL=_onModeRaw(x,y) + if _~=SEL then + if SEL then + mapCam.moving=true + _=MODES[SEL] + mapCam.sel=SEL + SFX.play('click') + else + mapCam.sel=false + end + elseif _ then + scene.keyDown("return") + end + end + mapCam.keyCtrl=false end function scene.touchDown() - touchDist=false + touchDist=false end function scene.touchMove(x,y,dx,dy) - local L=tc.getTouches() - if not L[2]then - _moveMap(dx,dy) - elseif not L[3]then - x,y=SCR.xOy:inverseTransformPoint(tc.getPosition(L[1])) - dx,dy=SCR.xOy:inverseTransformPoint(tc.getPosition(L[2]))--Not delta!!! - local d=(x-dx)^2+(y-dy)^2 - if d>100 then - d=d^.5 - if touchDist then - scene.wheelMoved(nil,(d-touchDist)*.02) - end - touchDist=d - end - end - mapCam.keyCtrl=false + local L=tc.getTouches() + if not L[2]then + _moveMap(dx,dy) + elseif not L[3]then + x,y=SCR.xOy:inverseTransformPoint(tc.getPosition(L[1])) + dx,dy=SCR.xOy:inverseTransformPoint(tc.getPosition(L[2]))--Not delta!!! + local d=(x-dx)^2+(y-dy)^2 + if d>100 then + d=d^.5 + if touchDist then + scene.wheelMoved(nil,(d-touchDist)*.02) + end + touchDist=d + end + end + mapCam.keyCtrl=false end function scene.touchClick(x,y) - scene.mouseClick(x,y) + scene.mouseClick(x,y) end function scene.keyDown(key,isRep) - if isRep then return end - if key=="return"then - if mapCam.sel then - if visibleModes[mapCam.sel]==2 then - MES.new('info',text.unlockHint) - else - mapCam.keyCtrl=false - loadGame(mapCam.sel) - end - end - elseif key=="f1"then - SCN.go('mod') - elseif key=="escape"then - if mapCam.sel then - mapCam.sel=false - else - SCN.back() - end - end + if isRep then return end + if key=="return"then + if mapCam.sel then + if visibleModes[mapCam.sel]==2 then + MES.new('info',text.unlockHint) + else + mapCam.keyCtrl=false + loadGame(mapCam.sel) + end + end + elseif key=="f1"then + SCN.go('mod') + elseif key=="escape"then + if mapCam.sel then + mapCam.sel=false + else + SCN.back() + end + end end function scene.update() - local dx,dy=0,0 - local F - if not SCN.swapping then - if kb.isDown("up", "w")then dy=dy+10 F=true end - if kb.isDown("down","s")then dy=dy-10 F=true end - if kb.isDown("left","a")then dx=dx+10 F=true end - if kb.isDown("right","d")then dx=dx-10 F=true end - local js1=joysticks[1] - if js1 then - local dir=js1:getAxis(1) - if dir~="c"then - if dir=="u"or dir=="ul"or dir=="ur"then dy=dy+10 F=true end - if dir=="d"or dir=="dl"or dir=="dl"then dy=dy-10 F=true end - if dir=="l"or dir=="ul"or dir=="dl"then dx=dx+10 F=true end - if dir=="r"or dir=="ur"or dir=="dr"then dx=dx-10 F=true end - end - end - end - if F then - mapCam.keyCtrl=true - if kb.isDown("lctrl","rctrl","lalt","ralt")then - scene.wheelMoved(nil,(dy-dx)*.026) - else - _moveMap(dx,dy) - local x,y=_getPos() - local SEL=_onModeRaw(x,y) - if SEL and mapCam.sel~=SEL then - mapCam.sel=SEL - SFX.play('click') - end - end - end + local dx,dy=0,0 + local F + if not SCN.swapping then + if kb.isDown("up", "w")then dy=dy+10 F=true end + if kb.isDown("down","s")then dy=dy-10 F=true end + if kb.isDown("left","a")then dx=dx+10 F=true end + if kb.isDown("right","d")then dx=dx-10 F=true end + local js1=joysticks[1] + if js1 then + local dir=js1:getAxis(1) + if dir~="c"then + if dir=="u"or dir=="ul"or dir=="ur"then dy=dy+10 F=true end + if dir=="d"or dir=="dl"or dir=="dl"then dy=dy-10 F=true end + if dir=="l"or dir=="ul"or dir=="dl"then dx=dx+10 F=true end + if dir=="r"or dir=="ur"or dir=="dr"then dx=dx-10 F=true end + end + end + end + if F then + mapCam.keyCtrl=true + if kb.isDown("lctrl","rctrl","lalt","ralt")then + scene.wheelMoved(nil,(dy-dx)*.026) + else + _moveMap(dx,dy) + local x,y=_getPos() + local SEL=_onModeRaw(x,y) + if SEL and mapCam.sel~=SEL then + mapCam.sel=SEL + SFX.play('click') + end + end + end - local _=SCN.stat.tar - mapCam.zoomMethod=_=="game"and 1 or _=="mode"and 2 - if mapCam.zoomMethod==1 then - _=mapCam.zoomK - if _<.8 then _=_*1.05 end - if _<1.1 then _=_*1.05 end - mapCam.zoomK=_*1.05 - elseif mapCam.zoomMethod==2 then - mapCam.zoomK=mapCam.zoomK^.9 - end + local _=SCN.stat.tar + mapCam.zoomMethod=_=="game"and 1 or _=="mode"and 2 + if mapCam.zoomMethod==1 then + _=mapCam.zoomK + if _<.8 then _=_*1.05 end + if _<1.1 then _=_*1.05 end + mapCam.zoomK=_*1.05 + elseif mapCam.zoomMethod==2 then + mapCam.zoomK=mapCam.zoomK^.9 + end end --noRank/D/C/B/A/S local baseRankColor={ - [0]={0,0,0,.3}, - {.4,.1,.1,.3}, - {.4,.35,.3,.3}, - {.6,.4,.2,.3}, - {.7,.75,.85,.3}, - {.85,.8,.3,.3}, + [0]={0,0,0,.3}, + {.4,.1,.1,.3}, + {.4,.35,.3,.3}, + {.6,.4,.2,.3}, + {.7,.75,.85,.3}, + {.85,.8,.3,.3}, } local rankColor=rankColor local function _drawModeShape(M,S,drawType) - if M.shape==1 then--Rectangle - gc_rectangle(drawType,M.x-S,M.y-S,2*S,2*S) - elseif M.shape==2 then--Diamond - gc_circle(drawType,M.x,M.y,S+12,4) - elseif M.shape==3 then--Octagon - gc_circle(drawType,M.x,M.y,S+6,8) - end + if M.shape==1 then--Rectangle + gc_rectangle(drawType,M.x-S,M.y-S,2*S,2*S) + elseif M.shape==2 then--Diamond + gc_circle(drawType,M.x,M.y,S+12,4) + elseif M.shape==3 then--Octagon + gc_circle(drawType,M.x,M.y,S+6,8) + end end function scene.draw() - local _ - gc_push('transform') - gc_translate(640,360) - gc_rotate((mapCam.zoomK^.6-1)) - gc_scale(mapCam.zoomK^.7) - gc_applyTransform(mapCam.xOy); + local _ + gc_push('transform') + gc_translate(640,360) + gc_rotate((mapCam.zoomK^.6-1)) + gc_scale(mapCam.zoomK^.7) + gc_applyTransform(mapCam.xOy); - local R=RANKS - local sel=mapCam.sel + local R=RANKS + local sel=mapCam.sel - --Lines connecting modes - gc_setLineWidth(8) - gc_setColor(1,1,1,.2) - for name,M in next,MODES do - if R[name]and M.unlock and M.x then - for _=1,#M.unlock do - local m=MODES[M.unlock[_]] - gc_line(M.x,M.y,m.x,m.y) - end - end - end + --Lines connecting modes + gc_setLineWidth(8) + gc_setColor(1,1,1,.2) + for name,M in next,MODES do + if R[name]and M.unlock and M.x then + for _=1,#M.unlock do + local m=MODES[M.unlock[_]] + gc_line(M.x,M.y,m.x,m.y) + end + end + end - --Modes - setFont(80) - gc_setLineWidth(4) - for name,M in next,MODES do - local unlocked=visibleModes[name] - if unlocked then - local rank=R[name] - local S=M.size + --Modes + setFont(80) + gc_setLineWidth(4) + for name,M in next,MODES do + local unlocked=visibleModes[name] + if unlocked then + local rank=R[name] + local S=M.size - --Draw shapes on map - if unlocked==1 then - gc_setColor(baseRankColor[rank]) - _drawModeShape(M,S,'fill') - end - gc_setColor(1,1,sel==name and 0 or 1,unlocked==1 and .8 or .3) - _drawModeShape(M,S,'line') + --Draw shapes on map + if unlocked==1 then + gc_setColor(baseRankColor[rank]) + _drawModeShape(M,S,'fill') + end + gc_setColor(1,1,sel==name and 0 or 1,unlocked==1 and .8 or .3) + _drawModeShape(M,S,'line') - --Icon - local icon=M.icon - if icon then - gc_setColor(unlocked==1 and COLOR.lH or COLOR.dH) - local length=icon:getWidth()*.5 - gc_draw(icon,M.x,M.y,nil,S/length,nil,length,length) - end + --Icon + local icon=M.icon + if icon then + gc_setColor(unlocked==1 and COLOR.lH or COLOR.dH) + local length=icon:getWidth()*.5 + gc_draw(icon,M.x,M.y,nil,S/length,nil,length,length) + end - --Rank - if unlocked==1 then - name=text.ranks[rank] - if name then - gc_setColor(0,0,0,.8) - mStr(name,M.x+M.size*.7,M.y-50-M.size*.7) - gc_setColor(rankColor[rank]) - mStr(name,M.x+M.size*.7+4,M.y-50-M.size*.7-4) - end - end - end - end - gc_pop() + --Rank + if unlocked==1 then + name=text.ranks[rank] + if name then + gc_setColor(0,0,0,.8) + mStr(name,M.x+M.size*.7,M.y-50-M.size*.7) + gc_setColor(rankColor[rank]) + mStr(name,M.x+M.size*.7+4,M.y-50-M.size*.7-4) + end + end + end + end + gc_pop() - --Score board - if sel then - local M=MODES[sel] - gc_setColor(.5,.5,.5,.8) - gc_rectangle('fill',920,0,360,720,5)--Info board - gc_setColor(M.color) - setFont(40)mStr(text.modes[sel][1],1100,5) - setFont(30)mStr(text.modes[sel][2],1100,50) - gc_setColor(1,1,1) - setFont(25)gc_printf(text.modes[sel][3],920,110,360,'center') - if M.slowMark then - gc_draw(IMG.ctrlSpeedLimit,1230,50,nil,.4) - end - if M.score then - mText(drawableText.highScore,1100,240) - gc_setColor(.3,.3,.3,.7) - gc_rectangle('fill',940,290,320,280,5)--Highscore board - local L=M.records - gc_setColor(1,1,1) - if visibleModes[sel]==2 then - mText(drawableText.modeLocked,1100,370) - elseif L[1]then - for i=1,#L do - local t=M.scoreDisp(L[i]) - local f=int((30-#t*.4)/5)*5 - setFont(f) - gc_print(t,955,275+25*i+17-f*.7) - _=L[i].date - if _ then - setFont(10) - gc_print(_,1155,285+25*i) - end - end - else - mText(drawableText.noScore,1100,370) - end - end - end - if mapCam.keyCtrl then - gc_setColor(1,1,1) - gc_setLineWidth(4) - gc_translate(640,360) - gc_line(-20,0,20,0) - gc_line(0,-20,0,20) - gc_translate(-640,-360) - end + --Score board + if sel then + local M=MODES[sel] + gc_setColor(.5,.5,.5,.8) + gc_rectangle('fill',920,0,360,720,5)--Info board + gc_setColor(M.color) + setFont(40)mStr(text.modes[sel][1],1100,5) + setFont(30)mStr(text.modes[sel][2],1100,50) + gc_setColor(1,1,1) + setFont(25)gc_printf(text.modes[sel][3],920,110,360,'center') + if M.slowMark then + gc_draw(IMG.ctrlSpeedLimit,1230,50,nil,.4) + end + if M.score then + mText(drawableText.highScore,1100,240) + gc_setColor(.3,.3,.3,.7) + gc_rectangle('fill',940,290,320,280,5)--Highscore board + local L=M.records + gc_setColor(1,1,1) + if visibleModes[sel]==2 then + mText(drawableText.modeLocked,1100,370) + elseif L[1]then + for i=1,#L do + local t=M.scoreDisp(L[i]) + local f=int((30-#t*.4)/5)*5 + setFont(f) + gc_print(t,955,275+25*i+17-f*.7) + _=L[i].date + if _ then + setFont(10) + gc_print(_,1155,285+25*i) + end + end + else + mText(drawableText.noScore,1100,370) + end + end + end + if mapCam.keyCtrl then + gc_setColor(1,1,1) + gc_setLineWidth(4) + gc_translate(640,360) + gc_line(-20,0,20,0) + gc_line(0,-20,0,20) + gc_translate(-640,-360) + end end scene.widgetList={ - WIDGET.newKey{name="mod", x=140,y=655,w=220,h=80,font=35,code=goScene'mod'}, - WIDGET.newButton{name="start", x=1040,y=655,w=180,h=80,font=40,code=pressKey"return",hideF=function()return not mapCam.sel end}, - WIDGET.newButton{name="back", x=1200,y=655,w=120,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newKey{name="mod", x=140,y=655,w=220,h=80,font=35,code=goScene'mod'}, + WIDGET.newButton{name="start",x=1040,y=655,w=180,h=80,font=40,code=pressKey"return",hideF=function()return not mapCam.sel end}, + WIDGET.newButton{name="back", x=1200,y=655,w=120,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/music.lua b/parts/scenes/music.lua index 9b176c59..0daad2cc 100644 --- a/parts/scenes/music.lua +++ b/parts/scenes/music.lua @@ -2,20 +2,20 @@ local gc=love.graphics local sin=math.sin local author={ - blank="MrZ (old works)", - race="MrZ (old works)", - infinite="MrZ (old works)", - push="MrZ (old works)", - way="MrZ (old works)", - reason="MrZ (old works)", - cruelty="MrZ (old works)", - final="MrZ (old works)", - ["end"]="MrZ (old works)", - battle="Aether & MrZ", - empty="ERM", - ["how feeling"]="????", - moonbeam="Beethoven & MrZ", - ["secret7th remix"]="柒栎流星", + blank="MrZ (old works)", + race="MrZ (old works)", + infinite="MrZ (old works)", + push="MrZ (old works)", + way="MrZ (old works)", + reason="MrZ (old works)", + cruelty="MrZ (old works)", + final="MrZ (old works)", + ["end"]="MrZ (old works)", + battle="Aether & MrZ", + empty="ERM", + ["how feeling"]="????", + moonbeam="Beethoven & MrZ", + ["secret7th remix"]="柒栎流星", } local scene={} @@ -25,86 +25,86 @@ local selected--Music selected local bgmList=BGM.getList() if #bgmList==0 then bgmList={"[NO BGM]"}end function scene.sceneInit() - selected=TABLE.find(bgmList,BGM.nowPlay)or 1 + selected=TABLE.find(bgmList,BGM.nowPlay)or 1 end function scene.wheelMoved(_,y) - WHEELMOV(y) + WHEELMOV(y) end function scene.keyDown(key,isRep) - local S=selected - if key=="down"then - if S<#bgmList then - selected=S+1 - SFX.play('move',.7) - end - elseif key=="up"then - if S>1 then - selected=S-1 - SFX.play('move',.7) - end - elseif not isRep then - if key=="return"or key=="space"then - if BGM.nowPlay~=bgmList[S]then - BGM.play(bgmList[S]) - if SETTING.bgm>0 then SFX.play('click')end - else - BGM.stop() - end - elseif key=="tab"then - SCN.swapTo('sound','none') - elseif key=="escape"then - SCN.back() - end - end + local S=selected + if key=="down"then + if S<#bgmList then + selected=S+1 + SFX.play('move',.7) + end + elseif key=="up"then + if S>1 then + selected=S-1 + SFX.play('move',.7) + end + elseif not isRep then + if key=="return"or key=="space"then + if BGM.nowPlay~=bgmList[S]then + BGM.play(bgmList[S]) + if SETTING.bgm>0 then SFX.play('click')end + else + BGM.stop() + end + elseif key=="tab"then + SCN.swapTo('sound','none') + elseif key=="escape"then + SCN.back() + end + end end function scene.draw() - gc.setColor(COLOR.Z) + gc.setColor(COLOR.Z) - setFont(50) - gc.print(bgmList[selected],320,355) - setFont(35) - if selected>1 then gc.print(bgmList[selected-1],320,350-30)end - if selected<#bgmList then gc.print(bgmList[selected+1],320,350+65)end - setFont(20) - if selected>2 then gc.print(bgmList[selected-2],320,350-50)end - if selected<#bgmList-1 then gc.print(bgmList[selected+2],320,350+110)end + setFont(50) + gc.print(bgmList[selected],320,355) + setFont(35) + if selected>1 then gc.print(bgmList[selected-1],320,350-30)end + if selected<#bgmList then gc.print(bgmList[selected+1],320,350+65)end + setFont(20) + if selected>2 then gc.print(bgmList[selected-2],320,350-50)end + if selected<#bgmList-1 then gc.print(bgmList[selected+2],320,350+110)end - gc.draw(TEXTURE.title,840,220,nil,.5,nil,580,118) - if BGM.nowPlay then - local t=TIME() - setFont(45) - gc.setColor(sin(t*.5)*.2+.8,sin(t*.7)*.2+.8,sin(t)*.2+.8) - gc.print(BGM.nowPlay,710,508) - setFont(35) - gc.setColor(1,sin(t*2.6)*.5+.5,sin(t*2.6)*.5+.5) - gc.print(author[BGM.nowPlay]or"MrZ",680,465) + gc.draw(TEXTURE.title,840,220,nil,.5,nil,580,118) + if BGM.nowPlay then + local t=TIME() + setFont(45) + gc.setColor(sin(t*.5)*.2+.8,sin(t*.7)*.2+.8,sin(t)*.2+.8) + gc.print(BGM.nowPlay,710,508) + setFont(35) + gc.setColor(1,sin(t*2.6)*.5+.5,sin(t*2.6)*.5+.5) + gc.print(author[BGM.nowPlay]or"MrZ",680,465) - local a=-t%2.3/2 - if a<1 then - gc.setColor(1,1,1,a) - gc.draw(TEXTURE.title_color,840,220,nil,.5+.062-.062*a,.5+.126-.126*a,580,118) - end + local a=-t%2.3/2 + if a<1 then + gc.setColor(1,1,1,a) + gc.draw(TEXTURE.title_color,840,220,nil,.5+.062-.062*a,.5+.126-.126*a,580,118) + end - gc.setColor(1,1,1,.4) - gc.setLineWidth(4) - gc.line(500,600,900,600) - gc.setColor(COLOR.Z) - gc.circle('fill',500+400*BGM.playing:tell()/BGM.playing:getDuration(),600,6) - end + gc.setColor(1,1,1,.4) + gc.setLineWidth(4) + gc.line(500,600,900,600) + gc.setColor(COLOR.Z) + gc.circle('fill',500+400*BGM.playing:tell()/BGM.playing:getDuration(),600,6) + end end scene.widgetList={ - WIDGET.newText{name="title", x=30, y=30,font=80,align='L'}, - WIDGET.newText{name="arrow", x=270, y=360,font=45,align='L'}, - WIDGET.newText{name="now", x=700, y=500,font=50,align='R',hideF=function()return not BGM.nowPlay end}, - WIDGET.newSlider{name="bgm", x=760, y=80,w=400,disp=SETval("bgm"),code=function(v)SETTING.bgm=v BGM.freshVolume()end}, - WIDGET.newButton{name="up", x=200, y=250,w=120,code=pressKey"up",hideF=function()return selected==1 end,fText=GC.DO{32,32,{'setLW',4},{'line',2,28,16,4,30,28}}}, - WIDGET.newButton{name="play", x=200, y=390,w=120,code=pressKey"space",fText=GC.DO{64,64,{'fPoly',14+3,10,14+3,54,55+3,32}}}, - WIDGET.newButton{name="down", x=200, y=530,w=120,code=pressKey"down",hideF=function()return selected==#bgmList end,fText=GC.DO{32,32,{'setLW',4},{'line',2,4,16,28,30,4}}}, - WIDGET.newButton{name="sound", x=1140, y=540,w=170,h=80,font=40,code=pressKey"tab"}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newText{name="title", x=30,y=30,font=80,align='L'}, + WIDGET.newText{name="arrow", x=270,y=360,font=45,align='L'}, + WIDGET.newText{name="now", x=700,y=500,font=50,align='R',hideF=function()return not BGM.nowPlay end}, + WIDGET.newSlider{name="bgm", x=760,y=80,w=400,disp=SETval("bgm"),code=function(v)SETTING.bgm=v BGM.freshVolume()end}, + WIDGET.newButton{name="up", x=200,y=250,w=120,code=pressKey"up",hideF=function()return selected==1 end,fText=GC.DO{32,32,{'setLW',4},{'line',2,28,16,4,30,28}}}, + WIDGET.newButton{name="play", x=200,y=390,w=120,code=pressKey"space",fText=GC.DO{64,64,{'fPoly',14+3,10,14+3,54,55+3,32}}}, + WIDGET.newButton{name="down", x=200,y=530,w=120,code=pressKey"down",hideF=function()return selected==#bgmList end,fText=GC.DO{32,32,{'setLW',4},{'line',2,4,16,28,30,4}}}, + WIDGET.newButton{name="sound",x=1140,y=540,w=170,h=80,font=40,code=pressKey"tab"}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/net_game.lua b/parts/scenes/net_game.lua index a70f81c9..8b80d9d9 100644 --- a/parts/scenes/net_game.lua +++ b/parts/scenes/net_game.lua @@ -22,323 +22,323 @@ local touchMoveLastFrame=false local newMessageTimer local function _hideReadyUI() - return - playing or - NET.roomState.start or - NET.getlock('ready') + return + playing or + NET.roomState.start or + NET.getlock('ready') end local function _setCancel()NET.signal_setMode(0)end local function _setReady()NET.signal_setMode(1)end local function _setSpectate()NET.signal_setMode(2)end local function _gotoSetting() - GAME.prevBG=BG.cur - SCN.go('setting_game') + GAME.prevBG=BG.cur + SCN.go('setting_game') end local function _quit() - if TIME()-lastBackTime<1 then - NET.signal_quit() - else - lastBackTime=TIME() - MES.new('info',text.sureQuit) - end + if TIME()-lastBackTime<1 then + NET.signal_quit() + else + lastBackTime=TIME() + MES.new('info',text.sureQuit) + end end local function _switchChat() - if inputBox.hide then - textBox.hide=false - inputBox.hide=false - WIDGET.focus(inputBox) - else - textBox.hide=true - inputBox.hide=true - WIDGET.unFocus(true) - end + if inputBox.hide then + textBox.hide=false + inputBox.hide=false + WIDGET.focus(inputBox) + else + textBox.hide=true + inputBox.hide=true + WIDGET.unFocus(true) + end end local scene={} function scene.sceneInit(org) - textBox.hide=true - textBox:clear() - inputBox.hide=true + textBox.hide=true + textBox:clear() + inputBox.hide=true - noTouch=not SETTING.VKSwitch - playing=false - lastUpstreamTime=0 - upstreamProgress=1 - newMessageTimer=0 + noTouch=not SETTING.VKSwitch + playing=false + lastUpstreamTime=0 + upstreamProgress=1 + newMessageTimer=0 - if org=='setting_game'then NET.changeConfig()end - if GAME.prevBG then - BG.set(GAME.prevBG) - GAME.prevBG=false - end - if NET.specSRID then - NET.wsconn_stream(NET.specSRID) - NET.specSRID=false - end + if org=='setting_game'then NET.changeConfig()end + if GAME.prevBG then + BG.set(GAME.prevBG) + GAME.prevBG=false + end + if NET.specSRID then + NET.wsconn_stream(NET.specSRID) + NET.specSRID=false + end end function scene.sceneBack() - GAME.playing=false + GAME.playing=false end scene.mouseDown=NULL function scene.mouseMove(x,y)netPLY.mouseMove(x,y)end function scene.touchDown(x,y) - if not playing then netPLY.mouseMove(x,y)return end - if noTouch then return end + if not playing then netPLY.mouseMove(x,y)return end + if noTouch then return end - local t=VK.on(x,y) - if t then - PLAYERS[1]:pressKey(t) - VK.touch(t,x,y) - end + local t=VK.on(x,y) + if t then + PLAYERS[1]:pressKey(t) + VK.touch(t,x,y) + end end function scene.touchUp(x,y) - if not playing or noTouch then return end - local n=VK.on(x,y) - if n then - PLAYERS[1]:releaseKey(n) - VK.release(n) - end + if not playing or noTouch then return end + local n=VK.on(x,y) + if n then + PLAYERS[1]:releaseKey(n) + VK.release(n) + end end function scene.touchMove() - if touchMoveLastFrame or not playing or noTouch then return end - touchMoveLastFrame=true + if touchMoveLastFrame or not playing or noTouch then return end + touchMoveLastFrame=true - local L=tc.getTouches() - for i=#L,1,-1 do - L[2*i-1],L[2*i]=SCR.xOy:inverseTransformPoint(tc.getPosition(L[i])) - end - local keys=VK.keys - for n=1,#keys do - local B=keys[n] - if B.ava then - for i=1,#L,2 do - if(L[i]-B.x)^2+(L[i+1]-B.y)^2<=B.r^2 then - goto CONTINUE_nextKey - end - end - PLAYERS[1]:releaseKey(n) - VK.release(n) - end - ::CONTINUE_nextKey:: - end + local L=tc.getTouches() + for i=#L,1,-1 do + L[2*i-1],L[2*i]=SCR.xOy:inverseTransformPoint(tc.getPosition(L[i])) + end + local keys=VK.keys + for n=1,#keys do + local B=keys[n] + if B.ava then + for i=1,#L,2 do + if(L[i]-B.x)^2+(L[i+1]-B.y)^2<=B.r^2 then + goto CONTINUE_nextKey + end + end + PLAYERS[1]:releaseKey(n) + VK.release(n) + end + ::CONTINUE_nextKey:: + end end function scene.keyDown(key,isRep) - if key=="escape"then - if not inputBox.hide then - _switchChat() - else - _quit() - end - elseif key=="return"then - local mes=STRING.trim(inputBox:getText()) - if not inputBox.hide and #mes>0 then - NET.sendMessage(mes) - inputBox:clear() - else - _switchChat() - end - elseif not inputBox.hide then - WIDGET.focus(inputBox) - inputBox:keypress(key) - elseif playing then - if noKey or isRep then return end - local k=keyMap.keyboard[key] - if k and k>0 then - PLAYERS[1]:pressKey(k) - VK.press(k) - end - elseif not _hideReadyUI()then - if key=="space"then - if netPLY.getSelfJoinMode()==0 then - (kb.isDown("lctrl","rctrl","lalt","ralt")and _setSpectate or _setReady)() - else - _setCancel() - end - elseif key=="s"then - _gotoSetting() - end - end + if key=="escape"then + if not inputBox.hide then + _switchChat() + else + _quit() + end + elseif key=="return"then + local mes=STRING.trim(inputBox:getText()) + if not inputBox.hide and #mes>0 then + NET.sendMessage(mes) + inputBox:clear() + else + _switchChat() + end + elseif not inputBox.hide then + WIDGET.focus(inputBox) + inputBox:keypress(key) + elseif playing then + if noKey or isRep then return end + local k=keyMap.keyboard[key] + if k and k>0 then + PLAYERS[1]:pressKey(k) + VK.press(k) + end + elseif not _hideReadyUI()then + if key=="space"then + if netPLY.getSelfJoinMode()==0 then + (kb.isDown("lctrl","rctrl","lalt","ralt")and _setSpectate or _setReady)() + else + _setCancel() + end + elseif key=="s"then + _gotoSetting() + end + end end function scene.keyUp(key) - if not playing or noKey then return end - local k=keyMap.keyboard[key] - if k and k>0 then - PLAYERS[1]:releaseKey(k) - VK.release(k) - end + if not playing or noKey then return end + local k=keyMap.keyboard[key] + if k and k>0 then + PLAYERS[1]:releaseKey(k) + VK.release(k) + end end function scene.gamepadDown(key) - if key=="back"then - scene.keyDown("escape") - else - if not playing then return end - local k=keyMap.joystick[key] - if k and k>0 then - PLAYERS[1]:pressKey(k) - VK.press(k) - end - end + if key=="back"then + scene.keyDown("escape") + else + if not playing then return end + local k=keyMap.joystick[key] + if k and k>0 then + PLAYERS[1]:pressKey(k) + VK.press(k) + end + end end function scene.gamepadUp(key) - if not playing then return end - local k=keyMap.joystick[key] - if k and k>0 then - PLAYERS[1]:releaseKey(k) - VK.release(k) - end + if not playing then return end + local k=keyMap.joystick[key] + if k and k>0 then + PLAYERS[1]:releaseKey(k) + VK.release(k) + end end function scene.socketRead(cmd,d) - if cmd=='join'then - textBox:push{ - COLOR.lR,d.username, - COLOR.dY,"#"..d.uid.." ", - COLOR.Y,text.joinRoom, - } - SFX.play('click') - elseif cmd=='leave'then - textBox:push{ - COLOR.lR,d.username, - COLOR.dY,"#"..d.uid.." ", - COLOR.Y,text.leaveRoom, - } - elseif cmd=='talk'then - newMessageTimer=80 - textBox:push{ - COLOR.Z,d.username, - COLOR.dY,"#"..d.uid.." ", - COLOR.N,d.message or"[_]", - } - elseif cmd=='go'then - if not playing then - playing=true - lastUpstreamTime=0 - upstreamProgress=1 - resetGameData('n',NET.seed) - netPLY.mouseMove(0,0) - else - MES.new('warn',"Redundant [Go]") - end - elseif cmd=='finish'then - playing=false - BG.set() - end + if cmd=='join'then + textBox:push{ + COLOR.lR,d.username, + COLOR.dY,"#"..d.uid.." ", + COLOR.Y,text.joinRoom, + } + SFX.play('click') + elseif cmd=='leave'then + textBox:push{ + COLOR.lR,d.username, + COLOR.dY,"#"..d.uid.." ", + COLOR.Y,text.leaveRoom, + } + elseif cmd=='talk'then + newMessageTimer=80 + textBox:push{ + COLOR.Z,d.username, + COLOR.dY,"#"..d.uid.." ", + COLOR.N,d.message or"[_]", + } + elseif cmd=='go'then + if not playing then + playing=true + lastUpstreamTime=0 + upstreamProgress=1 + resetGameData('n',NET.seed) + netPLY.mouseMove(0,0) + else + MES.new('warn',"Redundant [Go]") + end + elseif cmd=='finish'then + playing=false + BG.set() + end end function scene.update(dt) - if NET.checkPlayDisconn()then - NET.wsclose_stream() - SCN.back() - return - end - if playing then - local P1=PLAYERS[1] + if NET.checkPlayDisconn()then + NET.wsclose_stream() + SCN.back() + return + end + if playing then + local P1=PLAYERS[1] - touchMoveLastFrame=false - VK.update() + touchMoveLastFrame=false + VK.update() - --Update players - for p=1,#PLAYERS do PLAYERS[p]:update(dt)end + --Update players + for p=1,#PLAYERS do PLAYERS[p]:update(dt)end - --Warning check - checkWarning() + --Warning check + checkWarning() - --Upload stream - if not NET.spectate and P1.frameRun-lastUpstreamTime>8 then - local stream - if not GAME.rep[upstreamProgress]then - ins(GAME.rep,P1.frameRun) - ins(GAME.rep,0) - end - stream,upstreamProgress=DATA.dumpRecording(GAME.rep,upstreamProgress) - if #stream%3==1 then - stream=stream.."\0\0" - elseif #stream%3==2 then - stream=stream.."\0\0\0\0" - end - NET.uploadRecStream(stream) - lastUpstreamTime=PLAYERS[1].alive and P1.frameRun or 1e99 - end - else - netPLY.update() - end - if newMessageTimer>0 then - newMessageTimer=newMessageTimer-1 - end + --Upload stream + if not NET.spectate and P1.frameRun-lastUpstreamTime>8 then + local stream + if not GAME.rep[upstreamProgress]then + ins(GAME.rep,P1.frameRun) + ins(GAME.rep,0) + end + stream,upstreamProgress=DATA.dumpRecording(GAME.rep,upstreamProgress) + if #stream%3==1 then + stream=stream.."\0\0" + elseif #stream%3==2 then + stream=stream.."\0\0\0\0" + end + NET.uploadRecStream(stream) + lastUpstreamTime=PLAYERS[1].alive and P1.frameRun or 1e99 + end + else + netPLY.update() + end + if newMessageTimer>0 then + newMessageTimer=newMessageTimer-1 + end end function scene.draw() - if playing then - --Players - for p=1,#PLAYERS do - PLAYERS[p]:draw() - end + if playing then + --Players + for p=1,#PLAYERS do + PLAYERS[p]:draw() + end - --Virtual keys - VK.draw() + --Virtual keys + VK.draw() - --Warning - drawWarning() + --Warning + drawWarning() - if NET.spectate then - setFont(30) - gc_setColor(.2,1,0,.8) - gc_print(text.spectating,940,0) - end - else - --Users - netPLY.draw() + if NET.spectate then + setFont(30) + gc_setColor(.2,1,0,.8) + gc_print(text.spectating,940,0) + end + else + --Users + netPLY.draw() - --Ready & Set mark - setFont(50) - if NET.roomReadyState=='allReady'then - gc_setColor(1,.85,.6,.9) - mStr(text.ready,640,15) - elseif NET.roomReadyState=='connecting'then - gc_setColor(.6,1,.9,.9) - mStr(text.connStream,640,15) - elseif NET.roomReadyState=='waitConn'then - gc_setColor(.6,.95,1,.9) - mStr(text.waitStream,640,15) - end + --Ready & Set mark + setFont(50) + if NET.roomReadyState=='allReady'then + gc_setColor(1,.85,.6,.9) + mStr(text.ready,640,15) + elseif NET.roomReadyState=='connecting'then + gc_setColor(.6,1,.9,.9) + mStr(text.connStream,640,15) + elseif NET.roomReadyState=='waitConn'then + gc_setColor(.6,.95,1,.9) + mStr(text.waitStream,640,15) + end - --Room info. - gc_setColor(1,1,1) - setFont(25) - gc_printf(NET.roomState.roomInfo.name,0,685,1270,'right') - setFont(40) - gc_print(netPLY.getCount().."/"..NET.roomState.capacity,70,655) - if NET.roomState.private then gc_draw(IMG.lock,30,668)end - if NET.roomState.start then gc_setColor(0,1,0)gc_print(text.started,230,655)end + --Room info. + gc_setColor(1,1,1) + setFont(25) + gc_printf(NET.roomState.roomInfo.name,0,685,1270,'right') + setFont(40) + gc_print(netPLY.getCount().."/"..NET.roomState.capacity,70,655) + if NET.roomState.private then gc_draw(IMG.lock,30,668)end + if NET.roomState.start then gc_setColor(0,1,0)gc_print(text.started,230,655)end - --Profile - drawSelfProfile() + --Profile + drawSelfProfile() - --Player count - drawOnlinePlayerCount() - end + --Player count + drawOnlinePlayerCount() + end - --New message - if newMessageTimer>0 then - setFont(40) - gc_setColor(.3,.7,1,(newMessageTimer/60)^2) - gc_print("M",430,10) - end + --New message + if newMessageTimer>0 then + setFont(40) + gc_setColor(.3,.7,1,(newMessageTimer/60)^2) + gc_print("M",430,10) + end end local function _hideF_ingame()return _hideReadyUI()or netPLY.getSelfReady()end local function _hideF_ingame2()return _hideReadyUI()or not netPLY.getSelfReady()end scene.widgetList={ - textBox, - inputBox, - WIDGET.newKey{name="setting", x=1200,y=160,w=90,h=90, fText=TEXTURE.setting, code=_gotoSetting,hideF=_hideF_ingame}, - WIDGET.newKey{name="ready", x=1060,y=510,w=360,h=90,color='lG',font=35, code=_setReady,hideF=_hideF_ingame}, - WIDGET.newKey{name="spectate", x=1060,y=610,w=360,h=90,color='lO',font=35, code=_setSpectate,hideF=_hideF_ingame}, - WIDGET.newKey{name="cancel", x=1060,y=560,w=360,h=120,color='lH',font=40, code=_setCancel,hideF=_hideF_ingame2}, - WIDGET.newKey{name="chat", x=360,y=45,w=60,fText="...",font=35, code=_switchChat}, - WIDGET.newKey{name="quit", x=860,y=45,w=60,fText=TEXTURE.quit_small, code=_quit}, + textBox, + inputBox, + WIDGET.newKey{name="setting", x=1200,y=160,w=90,h=90,fText=TEXTURE.setting,code=_gotoSetting,hideF=_hideF_ingame}, + WIDGET.newKey{name="ready", x=1060,y=510,w=360,h=90,color='lG',font=35, code=_setReady,hideF=_hideF_ingame}, + WIDGET.newKey{name="spectate",x=1060,y=610,w=360,h=90,color='lO',font=35, code=_setSpectate,hideF=_hideF_ingame}, + WIDGET.newKey{name="cancel", x=1060,y=560,w=360,h=120,color='lH',font=40, code=_setCancel,hideF=_hideF_ingame2}, + WIDGET.newKey{name="chat", x=360,y=45,w=60,fText="...",font=35, code=_switchChat}, + WIDGET.newKey{name="quit", x=860,y=45,w=60,fText=TEXTURE.quit_small, code=_quit}, } return scene \ No newline at end of file diff --git a/parts/scenes/net_league.lua b/parts/scenes/net_league.lua index dc4f0f15..de125197 100644 --- a/parts/scenes/net_league.lua +++ b/parts/scenes/net_league.lua @@ -3,21 +3,21 @@ local gc=love.graphics local scene={} function scene.sceneInit() - BG.set('league') - BGM.play('exploration') + BG.set('league') + BGM.play('exploration') end function scene.draw() - gc.setColor(COLOR.Z) - setFont(100) - mStr("Tech League",640,120) - drawSelfProfile() - drawOnlinePlayerCount() + gc.setColor(COLOR.Z) + setFont(100) + mStr("Tech League",640,120) + drawSelfProfile() + drawOnlinePlayerCount() end scene.widgetList={ - WIDGET.newKey{name="setting",fText=TEXTURE.setting,x=1200,y=160,w=90,h=90,code=goScene'setting_game'}, - WIDGET.newKey{name="match",x=640,y=500,w=760,h=140,font=60,code=function()MES.new('warn',text.notFinished)end}, - WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newKey{name="setting",fText=TEXTURE.setting,x=1200,y=160,w=90,h=90,code=goScene'setting_game'}, + WIDGET.newKey{name="match",x=640,y=500,w=760,h=140,font=60,code=function()MES.new('warn',text.notFinished)end}, + WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/net_menu.lua b/parts/scenes/net_menu.lua index 832fd1f6..7ffd1987 100644 --- a/parts/scenes/net_menu.lua +++ b/parts/scenes/net_menu.lua @@ -3,40 +3,40 @@ local lastLogoutTime local scene={} function scene.sceneInit() - lastLogoutTime=-1e99 - BG.set() + lastLogoutTime=-1e99 + BG.set() end function scene.sceneBack() - NET.wsclose_play() + NET.wsclose_play() end function scene.draw() - drawSelfProfile() - drawOnlinePlayerCount() + drawSelfProfile() + drawOnlinePlayerCount() end scene.widgetList={ - WIDGET.newKey{name="setting",fText=TEXTURE.setting,x=1200,y=160,w=90,h=90,code=goScene'setting_game'}, - WIDGET.newButton{name="league", x=640, y=180,w=350,h=120,font=40,color='D',code=goScene'net_league'}, - WIDGET.newButton{name="ffa", x=640, y=360,w=350,h=120,font=40,color='D',code=function()MES.new('warn',text.notFinished)--[[NET.enterRoom({name="ffa"})]]end}, - WIDGET.newButton{name="rooms", x=640, y=540,w=350,h=120,font=40,code=goScene'net_rooms'}, - WIDGET.newButton{name="logout", x=880, y=40,w=180,h=60,color='dR', - code=function() - if TIME()-lastLogoutTime<1 then - if USER.uid then - NET.wsclose_play() - NET.wsclose_user() - USER.uid=false - USER.authToken=false - FILE.save(USER,'conf/user') - SCN.back() - end - else - MES.new('info',text.sureQuit) - lastLogoutTime=TIME() - end - end}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newKey{name="setting",fText=TEXTURE.setting,x=1200,y=160,w=90,h=90,code=goScene'setting_game'}, + WIDGET.newButton{name="league",x=640, y=180,w=350,h=120,font=40,color='D',code=goScene'net_league'}, + WIDGET.newButton{name="ffa", x=640, y=360,w=350,h=120,font=40,color='D',code=function()MES.new('warn',text.notFinished)--[[NET.enterRoom({name="ffa"})]]end}, + WIDGET.newButton{name="rooms", x=640, y=540,w=350,h=120,font=40,code=goScene'net_rooms'}, + WIDGET.newButton{name="logout",x=880, y=40,w=180,h=60,color='dR', + code=function() + if TIME()-lastLogoutTime<1 then + if USER.uid then + NET.wsclose_play() + NET.wsclose_user() + USER.uid=false + USER.authToken=false + FILE.save(USER,'conf/user') + SCN.back() + end + else + MES.new('info',text.sureQuit) + lastLogoutTime=TIME() + end + end}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/net_newRoom.lua b/parts/scenes/net_newRoom.lua index c792e94c..bff43997 100644 --- a/parts/scenes/net_newRoom.lua +++ b/parts/scenes/net_newRoom.lua @@ -1,110 +1,110 @@ local ROOMENV=ROOMENV -local roomName=WIDGET.newText{name="roomName", x=40,y=115,align='L'} -local roomNameBox=WIDGET.newInputBox{ x=40,y=160,w=540,h=60} -local password=WIDGET.newText{name="password", x=40,y=255,align='L'} -local passwordBox=WIDGET.newInputBox{ x=40,y=300,w=540,h=60} -local description=WIDGET.newText{name="description",x=650,y=55,align='L'} -local descriptionBox=WIDGET.newInputBox { x=650,y=100,w=550,h=160,font=25} +local roomName=WIDGET.newText{name="roomName", x=40,y=115,align='L'} +local roomNameBox=WIDGET.newInputBox{ x=40,y=160,w=540,h=60} +local password=WIDGET.newText{name="password", x=40,y=255,align='L'} +local passwordBox=WIDGET.newInputBox{ x=40,y=300,w=540,h=60} +local description=WIDGET.newText{name="description", x=650,y=55,align='L'} +local descriptionBox=WIDGET.newInputBox { x=650,y=100,w=550,h=160,font=25} local sList={ - visible={"show","easy","slow","medium","fast","none"}, - freshLimit={0,1,2,4,6,8,10,12,15,30,1e99}, - life={0,1,2,3,5,10,15,26,42,87,500}, - pushSpeed={1,2,3,5,15}, - fieldH={1,2,3,4,6,8,10,15,20,30,50,100}, - heightLimit={2,3,4,6,8,10,15,20,30,40,70,100,150,200,1e99}, - bufferLimit={4,6,10,15,20,40,100,1e99}, + visible={"show","easy","slow","medium","fast","none"}, + freshLimit={0,1,2,4,6,8,10,12,15,30,1e99}, + life={0,1,2,3,5,10,15,26,42,87,500}, + pushSpeed={1,2,3,5,15}, + fieldH={1,2,3,4,6,8,10,15,20,30,50,100}, + heightLimit={2,3,4,6,8,10,15,20,30,40,70,100,150,200,1e99}, + bufferLimit={4,6,10,15,20,40,100,1e99}, - drop={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}, - lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99}, - wait={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, - fall={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, + drop={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}, + lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99}, + wait={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, + fall={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, } local scene={} local function _createRoom() - local pw=passwordBox.value - if pw==""then pw=nil end - local roomname=STRING.trim(roomNameBox.value) - if #roomname==0 then roomname=(USERS.getUsername(USER.uid)or"Anonymous").."'s room"end - NET.createRoom( - roomname, - descriptionBox.value, - ROOMENV.capacity, - "normal", - ROOMENV, - pw - ) + local pw=passwordBox.value + if pw==""then pw=nil end + local roomname=STRING.trim(roomNameBox.value) + if #roomname==0 then roomname=(USERS.getUsername(USER.uid)or"Anonymous").."'s room"end + NET.createRoom( + roomname, + descriptionBox.value, + ROOMENV.capacity, + "normal", + ROOMENV, + pw + ) end function scene.sceneInit() - sure=0 - destroyPlayers() - BG.set(ROOMENV.bg) - BGM.play(ROOMENV.bgm) + sure=0 + destroyPlayers() + BG.set(ROOMENV.bg) + BGM.play(ROOMENV.bgm) end function scene.sceneBack() - BGM.play() + BGM.play() end function scene.keyDown(key) - if key=="return"then - _createRoom() - elseif key=="escape"then - SCN.back() - else - WIDGET.keyPressed(key) - end + if key=="return"then + _createRoom() + elseif key=="escape"then + SCN.back() + else + WIDGET.keyPressed(key) + end end scene.widgetScrollHeight=400 scene.widgetList={ - WIDGET.newText{name="title",x=40,y=15,font=70,align='L'}, + WIDGET.newText{name="title",x=40,y=15,font=70,align='L'}, - --Room name/password/description - roomName, - roomNameBox, - password, - passwordBox, - description, - descriptionBox, + --Room name/password/description + roomName, + roomNameBox, + password, + passwordBox, + description, + descriptionBox, - --Selectors - WIDGET.newSelector{name="life", x=170,y=410,w=260,color='R',list=sList.life, disp=ROOMval("life"), code=ROOMsto("life")}, - WIDGET.newSelector{name="pushSpeed", x=170,y=520,w=260,color='V',list=sList.pushSpeed, disp=ROOMval("pushSpeed"), code=ROOMsto("pushSpeed")}, - WIDGET.newSelector{name="garbageSpeed", x=170,y=600,w=260,color='V',list=sList.pushSpeed, disp=ROOMval("garbageSpeed"),code=ROOMsto("garbageSpeed")}, - WIDGET.newSelector{name="visible", x=170,y=710,w=260,color='lB',list=sList.visible, disp=ROOMval("visible"), code=ROOMsto("visible")}, - WIDGET.newSelector{name="freshLimit", x=170,y=790,w=260,color='lB',list=sList.freshLimit, disp=ROOMval("freshLimit"), code=ROOMsto("freshLimit")}, + --Selectors + WIDGET.newSelector{name="life", x=170,y=410,w=260,color='R',list=sList.life, disp=ROOMval("life"), code=ROOMsto("life")}, + WIDGET.newSelector{name="pushSpeed", x=170,y=520,w=260,color='V',list=sList.pushSpeed, disp=ROOMval("pushSpeed"), code=ROOMsto("pushSpeed")}, + WIDGET.newSelector{name="garbageSpeed", x=170,y=600,w=260,color='V',list=sList.pushSpeed, disp=ROOMval("garbageSpeed"), code=ROOMsto("garbageSpeed")}, + WIDGET.newSelector{name="visible", x=170,y=710,w=260,color='lB',list=sList.visible, disp=ROOMval("visible"), code=ROOMsto("visible")}, + WIDGET.newSelector{name="freshLimit", x=170,y=790,w=260,color='lB',list=sList.freshLimit, disp=ROOMval("freshLimit"), code=ROOMsto("freshLimit")}, - WIDGET.newSelector{name="fieldH", x=450,y=600,w=260,color='N',list=sList.fieldH, disp=ROOMval("fieldH"), code=ROOMsto("fieldH")}, - WIDGET.newSelector{name="heightLimit", x=450,y=710,w=260,color='S',list=sList.heightLimit, disp=ROOMval("heightLimit"),code=ROOMsto("heightLimit")}, - WIDGET.newSelector{name="bufferLimit", x=450,y=790,w=260,color='B',list=sList.bufferLimit, disp=ROOMval("bufferLimit"),code=ROOMsto("bufferLimit")}, + WIDGET.newSelector{name="fieldH", x=450,y=600,w=260,color='N',list=sList.fieldH, disp=ROOMval("fieldH"), code=ROOMsto("fieldH")}, + WIDGET.newSelector{name="heightLimit", x=450,y=710,w=260,color='S',list=sList.heightLimit, disp=ROOMval("heightLimit"), code=ROOMsto("heightLimit")}, + WIDGET.newSelector{name="bufferLimit", x=450,y=790,w=260,color='B',list=sList.bufferLimit, disp=ROOMval("bufferLimit"), code=ROOMsto("bufferLimit")}, - WIDGET.newSelector{name="drop",x=730,y=330,w=260,color='O',list=sList.drop,disp=ROOMval("drop"),code=ROOMsto("drop")}, - WIDGET.newSelector{name="lock",x=730,y=410,w=260,color='O',list=sList.lock,disp=ROOMval("lock"),code=ROOMsto("lock")}, - WIDGET.newSelector{name="wait",x=730,y=520,w=260,color='G',list=sList.wait,disp=ROOMval("wait"),code=ROOMsto("wait")}, - WIDGET.newSelector{name="fall",x=730,y=600,w=260,color='G',list=sList.fall,disp=ROOMval("fall"),code=ROOMsto("fall")}, + WIDGET.newSelector{name="drop", x=730,y=330,w=260,color='O',list=sList.drop,disp=ROOMval("drop"),code=ROOMsto("drop")}, + WIDGET.newSelector{name="lock", x=730,y=410,w=260,color='O',list=sList.lock,disp=ROOMval("lock"),code=ROOMsto("lock")}, + WIDGET.newSelector{name="wait", x=730,y=520,w=260,color='G',list=sList.wait,disp=ROOMval("wait"),code=ROOMsto("wait")}, + WIDGET.newSelector{name="fall", x=730,y=600,w=260,color='G',list=sList.fall,disp=ROOMval("fall"),code=ROOMsto("fall")}, - --Capacity & Create & Back - WIDGET.newSelector{name="capacity", x=1070,y=330,w=310,color='lY',list={2,3,4,5,7,10,17,31,49,99},disp=ROOMval("capacity"),code=ROOMsto("capacity")}, - WIDGET.newButton{name="create", x=1070,y=480,w=310,h=140,color='lN',font=40,code=pressKey"return"}, - WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + --Capacity & Create & Back + WIDGET.newSelector{name="capacity", x=1070,y=330,w=310,color='lY',list={2,3,4,5,7,10,17,31,49,99},disp=ROOMval("capacity"),code=ROOMsto("capacity")}, + WIDGET.newButton{name="create", x=1070,y=480,w=310,h=140,color='lN',font=40,code=pressKey"return"}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, - --Special rules - WIDGET.newSwitch{name="ospin", x=830, y=750,disp=ROOMval("ospin"), code=ROOMrev("ospin")}, - WIDGET.newSwitch{name="fineKill", x=830, y=840,disp=ROOMval("fineKill"), code=ROOMrev("fineKill")}, - WIDGET.newSwitch{name="b2bKill", x=830, y=930,disp=ROOMval("b2bKill"), code=ROOMrev("b2bKill")}, - WIDGET.newSwitch{name="easyFresh", x=1170, y=750,disp=ROOMval("easyFresh"),code=ROOMrev("easyFresh")}, - WIDGET.newSwitch{name="deepDrop", x=1170, y=840,disp=ROOMval("deepDrop"), code=ROOMrev("deepDrop")}, - WIDGET.newSwitch{name="bone", x=1170, y=930,disp=ROOMval("bone"), code=ROOMrev("bone")}, + --Special rules + WIDGET.newSwitch{name="ospin", x=830, y=750,disp=ROOMval("ospin"), code=ROOMrev("ospin")}, + WIDGET.newSwitch{name="fineKill", x=830, y=840,disp=ROOMval("fineKill"), code=ROOMrev("fineKill")}, + WIDGET.newSwitch{name="b2bKill", x=830, y=930,disp=ROOMval("b2bKill"), code=ROOMrev("b2bKill")}, + WIDGET.newSwitch{name="easyFresh", x=1170,y=750,disp=ROOMval("easyFresh"),code=ROOMrev("easyFresh")}, + WIDGET.newSwitch{name="deepDrop", x=1170,y=840,disp=ROOMval("deepDrop"), code=ROOMrev("deepDrop")}, + WIDGET.newSwitch{name="bone", x=1170,y=930,disp=ROOMval("bone"), code=ROOMrev("bone")}, - --Next & Hold - WIDGET.newSlider{name="nextCount", x=120,y=940,w=200,unit=6, disp=ROOMval("nextCount"),code=ROOMsto("nextCount")}, - WIDGET.newSlider{name="holdCount", x=120,y=1030,w=200,unit=6, disp=ROOMval("holdCount"),code=ROOMsto("holdCount")}, - WIDGET.newSwitch{name="infHold", x=560,y=940, disp=ROOMval("infHold"),code=ROOMrev("infHold"),hideF=function()return ROOMENV.holdCount==0 end}, - WIDGET.newSwitch{name="phyHold", x=560,y=1030, disp=ROOMval("phyHold"),code=ROOMrev("phyHold"),hideF=function()return ROOMENV.holdCount==0 end}, + --Next & Hold + WIDGET.newSlider{name="nextCount", x=120,y=940,w=200,unit=6, disp=ROOMval("nextCount"),code=ROOMsto("nextCount")}, + WIDGET.newSlider{name="holdCount", x=120,y=1030,w=200,unit=6, disp=ROOMval("holdCount"),code=ROOMsto("holdCount")}, + WIDGET.newSwitch{name="infHold", x=560,y=940, disp=ROOMval("infHold"),code=ROOMrev("infHold"),hideF=function()return ROOMENV.holdCount==0 end}, + WIDGET.newSwitch{name="phyHold", x=560,y=1030, disp=ROOMval("phyHold"),code=ROOMrev("phyHold"),hideF=function()return ROOMENV.holdCount==0 end}, } return scene \ No newline at end of file diff --git a/parts/scenes/net_rooms.lua b/parts/scenes/net_rooms.lua index a67d39f1..8acd306d 100644 --- a/parts/scenes/net_rooms.lua +++ b/parts/scenes/net_rooms.lua @@ -10,145 +10,145 @@ local NET=NET local fetchTimer local roomList=WIDGET.newListBox{name="roomList",x=50,y=50,w=800,h=440,lineH=40,drawF=function(item,id,ifSel) - setFont(35) - if ifSel then - gc_setColor(1,1,1,.3) - gc_rectangle('fill',0,0,800,40) - end - gc_setColor(1,1,1) - if item.private then gc_draw(IMG.lock,10,5)end - gc_print(item.count.."/"..item.capacity,670,-4) + setFont(35) + if ifSel then + gc_setColor(1,1,1,.3) + gc_rectangle('fill',0,0,800,40) + end + gc_setColor(1,1,1) + if item.private then gc_draw(IMG.lock,10,5)end + gc_print(item.count.."/"..item.capacity,670,-4) - gc_setColor(.9,.9,1) - gc_print(id,45,-4) + gc_setColor(.9,.9,1) + gc_print(id,45,-4) - if item.start then - gc_setColor(.1,.5,.2) - else - gc_setColor(1,1,.7) - end - gc_print(item.roomInfo.name,200,-4) + if item.start then + gc_setColor(.1,.5,.2) + else + gc_setColor(1,1,.7) + end + gc_print(item.roomInfo.name,200,-4) end} local function _hidePW() - local R=roomList:getSel() - return not R or not R.private + local R=roomList:getSel() + return not R or not R.private end local passwordBox=WIDGET.newInputBox{name="password",x=350,y=505,w=500,h=50,secret=true,hideF=_hidePW} --[[roomList[n]={ - rid="qwerty", - roomInfo={ - name="MrZ's room", - type="classic", - version=1409, - }, - private=false, - start=false, - count=4, - capacity=5, + rid="qwerty", + roomInfo={ + name="MrZ's room", + type="classic", + version=1409, + }, + private=false, + start=false, + count=4, + capacity=5, }]] local function _fetchRoom() - fetchTimer=10 - NET.fetchRoom() + fetchTimer=10 + NET.fetchRoom() end local scene={} function scene.sceneInit() - BG.set() - _fetchRoom() + BG.set() + _fetchRoom() end function scene.keyDown(key) - if NET.getlock('enterRoom')then return end - if WIDGET.sel~=passwordBox then - if key=="r"then - if fetchTimer<=7 then - _fetchRoom() - end - elseif key=="s"then - SCN.go('setting_game') - elseif key=="n"then - SCN.go('net_newRoom') - elseif key=="escape"then - SCN.back() - elseif roomList:getLen()>0 and key=="return"then - local R=roomList:getSel() - if NET.getlock('fetchRoom')or not R then return end - if R.roomInfo.version==VERSION.room then - NET.enterRoom(R,passwordBox.value) - else - MES.new('error',text.versionNotMatch) - end - else - WIDGET.keyPressed(key) - end - else - WIDGET.keyPressed(key) - end + if NET.getlock('enterRoom')then return end + if WIDGET.sel~=passwordBox then + if key=="r"then + if fetchTimer<=7 then + _fetchRoom() + end + elseif key=="s"then + SCN.go('setting_game') + elseif key=="n"then + SCN.go('net_newRoom') + elseif key=="escape"then + SCN.back() + elseif roomList:getLen()>0 and key=="return"then + local R=roomList:getSel() + if NET.getlock('fetchRoom')or not R then return end + if R.roomInfo.version==VERSION.room then + NET.enterRoom(R,passwordBox.value) + else + MES.new('error',text.versionNotMatch) + end + else + WIDGET.keyPressed(key) + end + else + WIDGET.keyPressed(key) + end end function scene.update(dt) - if not NET.getlock('fetchRoom')and _hidePW()then - fetchTimer=fetchTimer-dt - if fetchTimer<=0 then - _fetchRoom() - end - end + if not NET.getlock('fetchRoom')and _hidePW()then + fetchTimer=fetchTimer-dt + if fetchTimer<=0 then + _fetchRoom() + end + end end function scene.draw() - --Fetching timer - gc_setColor(1,1,1,.12) - gc_arc('fill','pie',250,630,40,-1.5708,-1.5708-.6283*fetchTimer) + --Fetching timer + gc_setColor(1,1,1,.12) + gc_arc('fill','pie',250,630,40,-1.5708,-1.5708-.6283*fetchTimer) - --Joining mark - if NET.getlock('enterRoom')then - gc.setColor(COLOR.Z) - gc.setLineWidth(15) - local t=TIME()*6.26%6.2832 - gc.arc('line','open',640,360,80,t,t+4.26) - end + --Joining mark + if NET.getlock('enterRoom')then + gc.setColor(COLOR.Z) + gc.setLineWidth(15) + local t=TIME()*6.26%6.2832 + gc.arc('line','open',640,360,80,t,t+4.26) + end - --Room list - local R=roomList:getSel() - if R then - gc_translate(870,220) - gc_setColor(1,1,1) - gc_setLineWidth(3) - gc_rectangle('line',0,0,385,335) - setFont(25) - gc_print(R.roomInfo.type,10,25) - gc_setColor(1,1,.7) - gc_printf(R.roomInfo.name,10,0,365) - setFont(20) - gc_setColor(COLOR.lH) - gc_printf(R.roomInfo.description or"[No description]",10,55,365) - if R.start then - gc_setColor(COLOR.lA) - gc_print(text.started,10,300) - end - gc_setColor(COLOR.lN) - gc_printf(R.roomInfo.version,10,300,365,'right') - gc_translate(-870,-220) - end + --Room list + local R=roomList:getSel() + if R then + gc_translate(870,220) + gc_setColor(1,1,1) + gc_setLineWidth(3) + gc_rectangle('line',0,0,385,335) + setFont(25) + gc_print(R.roomInfo.type,10,25) + gc_setColor(1,1,.7) + gc_printf(R.roomInfo.name,10,0,365) + setFont(20) + gc_setColor(COLOR.lH) + gc_printf(R.roomInfo.description or"[No description]",10,55,365) + if R.start then + gc_setColor(COLOR.lA) + gc_print(text.started,10,300) + end + gc_setColor(COLOR.lN) + gc_printf(R.roomInfo.version,10,300,365,'right') + gc_translate(-870,-220) + end - --Profile - drawSelfProfile() + --Profile + drawSelfProfile() - --Player count - drawOnlinePlayerCount() + --Player count + drawOnlinePlayerCount() end scene.widgetList={ - roomList, - passwordBox, - WIDGET.newKey{name="setting",fText=TEXTURE.setting,x=1200,y=160,w=90,h=90,code=pressKey"s"}, - WIDGET.newText{name="refreshing",x=450,y=240,font=45,hideF=function()return not NET.getlock('fetchRoom')end}, - WIDGET.newText{name="noRoom", x=450,y=245,font=40,hideF=function()return roomList:getLen()>0 or NET.getlock('fetchRoom')end}, - WIDGET.newKey{name="refresh", x=250,y=630,w=140,h=120,code=_fetchRoom,hideF=function()return fetchTimer>7 end}, - WIDGET.newKey{name="new", x=510,y=630,w=260,h=120,code=pressKey"n"}, - WIDGET.newKey{name="join", x=780,y=630,w=140,h=120,code=pressKey"return",hideF=function()return roomList:getLen()==0 or NET.getlock('enterRoom')end}, - WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=pressKey"escape"}, + roomList, + passwordBox, + WIDGET.newKey{name="setting", x=1200,y=160,w=90,h=90,fText=TEXTURE.setting,code=pressKey"s"}, + WIDGET.newText{name="refreshing",x=450,y=240,font=45,hideF=function()return not NET.getlock('fetchRoom')end}, + WIDGET.newText{name="noRoom", x=450,y=245,font=40,hideF=function()return roomList:getLen()>0 or NET.getlock('fetchRoom')end}, + WIDGET.newKey{name="refresh", x=250,y=630,w=140,h=120,code=_fetchRoom,hideF=function()return fetchTimer>7 end}, + WIDGET.newKey{name="new", x=510,y=630,w=260,h=120,code=pressKey"n"}, + WIDGET.newKey{name="join", x=780,y=630,w=140,h=120,code=pressKey"return",hideF=function()return roomList:getLen()==0 or NET.getlock('enterRoom')end}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=pressKey"escape"}, } return scene \ No newline at end of file diff --git a/parts/scenes/pause.lua b/parts/scenes/pause.lua index 57b4a6a2..00df57ff 100644 --- a/parts/scenes/pause.lua +++ b/parts/scenes/pause.lua @@ -5,14 +5,14 @@ local GAME,SCR=GAME,SCR local setFont,mStr=setFont,mStr local fnsRankColor={ - Z=COLOR.lY, - S=COLOR.lH, - A=COLOR.N, - B=COLOR.lG, - C=COLOR.M, - D=COLOR.dG, - E=COLOR.R, - F=COLOR.dR, + Z=COLOR.lY, + S=COLOR.lH, + A=COLOR.N, + B=COLOR.lG, + C=COLOR.M, + D=COLOR.dG, + E=COLOR.R, + F=COLOR.dR, } local scene={} @@ -29,156 +29,156 @@ local trophy--Current trophy local trophyColor--Current trophy color function scene.sceneInit(org) - page=0 - if org:find("setting")then - TEXT.show(text.needRestart,640,410,50,'fly',.6) - end - local P=PLAYERS[1] - local S=P.stat + page=0 + if org:find("setting")then + TEXT.show(text.needRestart,640,410,50,'fly',.6) + end + local P=PLAYERS[1] + local S=P.stat - timer1=org=='game'and 0 or 50 - timer2=timer1 + timer1=org=='game'and 0 or 50 + timer2=timer1 - local frameLostRate=(S.frame/S.time/60-1)*100 - form={ - {COLOR.Z,STRING.time(S.time),COLOR[frameLostRate>10 and'R'or frameLostRate>3 and'Y'or'H'],(" (%.2f%%)"):format(frameLostRate)}, - ("%d/%d/%d"):format(S.key,S.rotate,S.hold), - ("%d %.2fPPS"):format(S.piece,S.piece/S.time), - ("%d(%d) %.2fLPM"):format(S.row,S.dig,S.row/S.time*60), - ("%d(%d) %.2fAPM"):format(S.atk,S.digatk,S.atk/S.time*60), - ("%d(%d-%d)"):format(S.pend,S.recv,S.recv-S.pend), - ("%d/%d/%d/%d"):format(S.clears[1],S.clears[2],S.clears[3],S.clears[4]), - ("(%d)/%d/%d/%d"):format(S.spins[1],S.spins[2],S.spins[3],S.spins[4]), - ("%d/%d ; %d/%d"):format(S.b2b,S.b3b,S.pc,S.hpc), - ("%d/%dx/%.2f%%"):format(S.extraPiece,S.maxFinesseCombo,S.finesseRate*20/S.piece), - } - --From right-down, 60 degree each - radar={ - (S.off+S.dig)/S.time*60,--DefPM - (S.atk+S.dig)/S.time*60,--ADPM - S.atk/S.time*60, --AtkPM - S.send/S.time*60, --SendPM - S.piece/S.time*24, --LinePM - S.dig/S.time*60, --DigPM - } - val={1/80,1/80,1/80,1/60,1/100,1/40} + local frameLostRate=(S.frame/S.time/60-1)*100 + form={ + {COLOR.Z,STRING.time(S.time),COLOR[frameLostRate>10 and'R'or frameLostRate>3 and'Y'or'H'],(" (%.2f%%)"):format(frameLostRate)}, + ("%d/%d/%d"):format(S.key,S.rotate,S.hold), + ("%d %.2fPPS"):format(S.piece,S.piece/S.time), + ("%d(%d) %.2fLPM"):format(S.row,S.dig,S.row/S.time*60), + ("%d(%d) %.2fAPM"):format(S.atk,S.digatk,S.atk/S.time*60), + ("%d(%d-%d)"):format(S.pend,S.recv,S.recv-S.pend), + ("%d/%d/%d/%d"):format(S.clears[1],S.clears[2],S.clears[3],S.clears[4]), + ("(%d)/%d/%d/%d"):format(S.spins[1],S.spins[2],S.spins[3],S.spins[4]), + ("%d/%d ; %d/%d"):format(S.b2b,S.b3b,S.pc,S.hpc), + ("%d/%dx/%.2f%%"):format(S.extraPiece,S.maxFinesseCombo,S.finesseRate*20/S.piece), + } + --From right-down, 60 degree each + radar={ + (S.off+S.dig)/S.time*60,--DefPM + (S.atk+S.dig)/S.time*60,--ADPM + S.atk/S.time*60, --AtkPM + S.send/S.time*60, --SendPM + S.piece/S.time*24, --LinePM + S.dig/S.time*60, --DigPM + } + val={1/80,1/80,1/80,1/60,1/100,1/40} - --Normalize Values - for i=1,6 do - val[i]=val[i]*radar[i]if val[i]>1.26 then val[i]=1.26+log(val[i]-.26)end - end + --Normalize Values + for i=1,6 do + val[i]=val[i]*radar[i]if val[i]>1.26 then val[i]=1.26+log(val[i]-.26)end + end - for i=1,6 do - radar[i]=("%.2f%s"):format(radar[i],text.radarData[i]) - end - local f=1 - for i=1,6 do - if val[i]>.5 then f=2 end - if val[i]>1 then f=3 break end - end - if f==1 then chartColor,f={.4,.9,.5},1.25 --Vegetable - elseif f==2 then chartColor,f={.4,.7,.9},1 --Normal - elseif f==3 then chartColor,f={1,.3,.3},.626 --Diao - end - standard={ - 120*.5*f, 120*3^.5*.5*f, - 120*-.5*f, 120*3^.5*.5*f, - 120*-1*f, 120*0*f, - 120*-.5*f, 120*-3^.5*.5*f, - 120*.5*f, 120*-3^.5*.5*f, - 120*1*f, 120*0*f, - } + for i=1,6 do + radar[i]=("%.2f%s"):format(radar[i],text.radarData[i]) + end + local f=1 + for i=1,6 do + if val[i]>.5 then f=2 end + if val[i]>1 then f=3 break end + end + if f==1 then chartColor,f={.4,.9,.5},1.25--Vegetable + elseif f==2 then chartColor,f={.4,.7,.9},1 --Normal + elseif f==3 then chartColor,f={1,.3,.3},.626 --Diao + end + standard={ + 120*.5*f, 120*3^.5*.5*f, + 120*-.5*f,120*3^.5*.5*f, + 120*-1*f, 120*0*f, + 120*-.5*f,120*-3^.5*.5*f, + 120*.5*f, 120*-3^.5*.5*f, + 120*1*f, 120*0*f, + } - for i=6,1,-1 do - val[2*i-1],val[2*i]=val[i]*standard[2*i-1],val[i]*standard[2*i] - end + for i=6,1,-1 do + val[2*i-1],val[2*i]=val[i]*standard[2*i-1],val[i]*standard[2*i] + end - if P.result=='win'and P.stat.piece>4 then - local acc=P.stat.finesseRate*.2/P.stat.piece - rank= - acc==1. and"Z"or - acc>.97 and"S"or - acc>.94 and"A"or - acc>.87 and"B"or - acc>.70 and"C"or - acc>.50 and"D"or - acc>.30 and"E"or - "F" - if acc==1 then - trophy=text.finesse_ap - trophyColor=COLOR.Y - elseif P.stat.maxFinesseCombo==P.stat.piece then - trophy=text.finesse_fc - trophyColor=COLOR.lC - else - trophy=nil - end - else - rank,trophy=nil - end - if GAME.prevBG then - BG.set(GAME.prevBG) - GAME.prevBG=false - end + if P.result=='win'and P.stat.piece>4 then + local acc=P.stat.finesseRate*.2/P.stat.piece + rank= + acc==1. and"Z"or + acc>.97 and"S"or + acc>.94 and"A"or + acc>.87 and"B"or + acc>.70 and"C"or + acc>.50 and"D"or + acc>.30 and"E"or + "F" + if acc==1 then + trophy=text.finesse_ap + trophyColor=COLOR.Y + elseif P.stat.maxFinesseCombo==P.stat.piece then + trophy=text.finesse_fc + trophyColor=COLOR.lC + else + trophy=nil + end + else + rank,trophy=nil + end + if GAME.prevBG then + BG.set(GAME.prevBG) + GAME.prevBG=false + end end function scene.sceneBack() - trySave() + trySave() end function scene.keyDown(key,isRep) - if isRep then return end - if key=="q"then - SCN.back() - GAME.playing=false - elseif key=="escape"then - SCN.swapTo(GAME.result and'game'or'depause','none') - elseif key=="s"then - if not GAME.fromRepMenu then - GAME.prevBG=BG.cur - SCN.go('setting_sound') - end - elseif key=="r"then - if not GAME.fromRepMenu then - resetGameData() - SCN.swapTo('game','none') - end - elseif key=="p"then - if(GAME.result or GAME.replaying)and #PLAYERS==1 then - resetGameData('r') - SCN.swapTo('game','none') - end - elseif key=="o"then - if(GAME.result or GAME.replaying)and #PLAYERS==1 and not GAME.saved then - if DATA.saveReplay()then - GAME.saved=true - SFX.play('connected') - end - end - elseif key=="tab"or key=="Stab"then - if love.keyboard.isDown("lshift","rshift")or key=="Stab"then - page=(page-1)%2 - else - page=(page+1)%2 - end - timer2=0 - elseif key=="t"then - if SETTING.allowTAS and not(GAME.result or GAME.replaying)then - GAME.tasUsed=true - SFX.play('ren_mega') - SFX.play('clear_3') - SYSFX.newShade(1.2,555,200,620,380,.6,.6,.6) - end - else - WIDGET.keyPressed(key) - end + if isRep then return end + if key=="q"then + SCN.back() + GAME.playing=false + elseif key=="escape"then + SCN.swapTo(GAME.result and'game'or'depause','none') + elseif key=="s"then + if not GAME.fromRepMenu then + GAME.prevBG=BG.cur + SCN.go('setting_sound') + end + elseif key=="r"then + if not GAME.fromRepMenu then + resetGameData() + SCN.swapTo('game','none') + end + elseif key=="p"then + if(GAME.result or GAME.replaying)and #PLAYERS==1 then + resetGameData('r') + SCN.swapTo('game','none') + end + elseif key=="o"then + if(GAME.result or GAME.replaying)and #PLAYERS==1 and not GAME.saved then + if DATA.saveReplay()then + GAME.saved=true + SFX.play('connected') + end + end + elseif key=="tab"or key=="Stab"then + if love.keyboard.isDown("lshift","rshift")or key=="Stab"then + page=(page-1)%2 + else + page=(page+1)%2 + end + timer2=0 + elseif key=="t"then + if SETTING.allowTAS and not(GAME.result or GAME.replaying)then + GAME.tasUsed=true + SFX.play('ren_mega') + SFX.play('clear_3') + SYSFX.newShade(1.2,555,200,620,380,.6,.6,.6) + end + else + WIDGET.keyPressed(key) + end end function scene.update(dt) - if not(GAME.result or GAME.replaying)then - GAME.pauseTime=GAME.pauseTime+dt - end - if timer1<50 then timer1=timer1+1 end - if timer2<25 then timer2=timer2+1 end + if not(GAME.result or GAME.replaying)then + GAME.pauseTime=GAME.pauseTime+dt + end + if timer1<50 then timer1=timer1+1 end + if timer2<25 then timer2=timer2+1 end end local hexList={1,0,.5,1.732*.5,-.5,1.732*.5} @@ -186,191 +186,191 @@ for i=1,6 do hexList[i]=hexList[i]*150 end local textPos={90,131,-90,131,-200,-25,-90,-181,90,-181,200,-25} local dataPos={90,143,-90,143,-200,-13,-90,-169,90,-169,200,-13} function scene.draw() - local T=timer1*.02 - local T2=timer2*.04 - if T<1 or GAME.result then SCN.scenes.game.draw()end + local T=timer1*.02 + local T2=timer2*.04 + if T<1 or GAME.result then SCN.scenes.game.draw()end - --Dark BG - local _=T - if GAME.result then _=_*.76 end - gc.setColor(.12,.12,.12,_) - gc.replaceTransform(SCR.origin) - gc.rectangle('fill',0,0,SCR.w,SCR.h) - gc.replaceTransform(SCR.xOy) + --Dark BG + local _=T + if GAME.result then _=_*.76 end + gc.setColor(.12,.12,.12,_) + gc.replaceTransform(SCR.origin) + gc.rectangle('fill',0,0,SCR.w,SCR.h) + gc.replaceTransform(SCR.xOy) - gc.setColor(.97,.97,.97,T) + gc.setColor(.97,.97,.97,T) - --Result Text - mDraw(GAME.result and drawableText[GAME.result]or drawableText.pause,640,70-10*(5-timer1*.1)^1.5) + --Result Text + mDraw(GAME.result and drawableText[GAME.result]or drawableText.pause,640,70-10*(5-timer1*.1)^1.5) - --Mode Info (outside) - gc.draw(drawableText.modeName,745-drawableText.modeName:getWidth(),143) + --Mode Info (outside) + gc.draw(drawableText.modeName,745-drawableText.modeName:getWidth(),143) - --Level rank - if GAME.rank>0 then - gc.push('transform') - gc.translate(1050,5) - local str=text.ranks[GAME.rank] - setFont(80) - gc.setColor(0,0,0,T*.7) - gc.print(str,-5,-4,nil,1.5) - local L=rankColor[GAME.rank] - gc.setColor(L[1],L[2],L[3],T) - gc.print(str,0,0,nil,1.5) - gc.pop() - end + --Level rank + if GAME.rank>0 then + gc.push('transform') + gc.translate(1050,5) + local str=text.ranks[GAME.rank] + setFont(80) + gc.setColor(0,0,0,T*.7) + gc.print(str,-5,-4,nil,1.5) + local L=rankColor[GAME.rank] + gc.setColor(L[1],L[2],L[3],T) + gc.print(str,0,0,nil,1.5) + gc.pop() + end - if GAME.tasUsed then - gc.push('transform') - gc.translate(560,205) - gc.scale(2.6) - setFont(100) - gc.setColor(.97,.97,.97,T*.08) - gc.print("TAS",50,-23,.3) - gc.pop() - end + if GAME.tasUsed then + gc.push('transform') + gc.translate(560,205) + gc.scale(2.6) + setFont(100) + gc.setColor(.97,.97,.97,T*.08) + gc.print("TAS",50,-23,.3) + gc.pop() + end - --Big info frame - if PLAYERS[1].frameRun>180 then - gc.push('transform') - gc.translate(560,205) - gc.setLineWidth(2) + --Big info frame + if PLAYERS[1].frameRun>180 then + gc.push('transform') + gc.translate(560,205) + gc.setLineWidth(2) - --Pause Info (outside) - setFont(25) - if GAME.pauseCount>0 then - gc.setColor(.97,.97,.97,T*.06) - gc.rectangle('fill',-5,390,620,36,8) - gc.setColor(.97,.97,.97,T) - gc.rectangle('line',-5,390,620,36,8) - mStr(("%s:[%d] %.2fs"):format(text.pauseCount,GAME.pauseCount,GAME.pauseTime),305,389) - end + --Pause Info (outside) + setFont(25) + if GAME.pauseCount>0 then + gc.setColor(.97,.97,.97,T*.06) + gc.rectangle('fill',-5,390,620,36,8) + gc.setColor(.97,.97,.97,T) + gc.rectangle('line',-5,390,620,36,8) + mStr(("%s:[%d] %.2fs"):format(text.pauseCount,GAME.pauseCount,GAME.pauseTime),305,389) + end - --Pages - if page==0 then - --Frame - gc.setColor(.97,.97,.97,T2*.06) - gc.rectangle('fill',-5,-5,620,380,8) - gc.setColor(.97,.97,.97,T2) - gc.rectangle('line',-5,-5,620,380,8) + --Pages + if page==0 then + --Frame + gc.setColor(.97,.97,.97,T2*.06) + gc.rectangle('fill',-5,-5,620,380,8) + gc.setColor(.97,.97,.97,T2) + gc.rectangle('line',-5,-5,620,380,8) - --Game statistics - gc.push('transform') - gc.scale(.85) - gc.setLineWidth(2) + --Game statistics + gc.push('transform') + gc.scale(.85) + gc.setLineWidth(2) - --Stats - _=form - setFont(30) - gc.setColor(.97,.97,.97,T2) - for i=1,10 do - gc.print(text.pauseStat[i],5,43*(i-1)+2) - gc.printf(_[i],210,43*(i-1)+2,500,'right') - end + --Stats + _=form + setFont(30) + gc.setColor(.97,.97,.97,T2) + for i=1,10 do + gc.print(text.pauseStat[i],5,43*(i-1)+2) + gc.printf(_[i],210,43*(i-1)+2,500,'right') + end - --Finesse rank & trophy - if rank then - setFont(40) - local c=fnsRankColor[rank] - gc.setColor(c[1],c[2],c[3],T2) - gc.print(rank,405,383) - if trophy then - setFont(20) - gc.setColor(trophyColor[1],trophyColor[2],trophyColor[3],T2*2-1) - gc.printf(trophy,95-120*(1-T2^.5),398,300,'right') - end - end - gc.pop() - elseif page==1 then - --Radar Chart - gc.setLineWidth(1) - gc.push('transform') - gc.translate(310,185) + --Finesse rank & trophy + if rank then + setFont(40) + local c=fnsRankColor[rank] + gc.setColor(c[1],c[2],c[3],T2) + gc.print(rank,405,383) + if trophy then + setFont(20) + gc.setColor(trophyColor[1],trophyColor[2],trophyColor[3],T2*2-1) + gc.printf(trophy,95-120*(1-T2^.5),398,300,'right') + end + end + gc.pop() + elseif page==1 then + --Radar Chart + gc.setLineWidth(1) + gc.push('transform') + gc.translate(310,185) - --Polygon - gc.push('transform') - gc.scale((3-2*T2)*T2) - gc.setColor(.97,.97,.97,T2*(.5+.3*sin(TIME()*6.26))) - GC.regularPolygon('line',0,0,120,6,8) - gc.setColor(chartColor[1],chartColor[2],chartColor[3],T2*.626) - for i=1,9,2 do - gc.polygon('fill',0,0,val[i],val[i+1],val[i+2],val[i+3]) - end - gc.polygon('fill',0,0,val[11],val[12],val[1],val[2]) - gc.setColor(.97,.97,.97,T2) - for i=1,9,2 do - gc.line(val[i],val[i+1],val[i+2],val[i+3]) - end - gc.line(val[11],val[12],val[1],val[2]) - gc.pop() + --Polygon + gc.push('transform') + gc.scale((3-2*T2)*T2) + gc.setColor(.97,.97,.97,T2*(.5+.3*sin(TIME()*6.26))) + GC.regularPolygon('line',0,0,120,6,8) + gc.setColor(chartColor[1],chartColor[2],chartColor[3],T2*.626) + for i=1,9,2 do + gc.polygon('fill',0,0,val[i],val[i+1],val[i+2],val[i+3]) + end + gc.polygon('fill',0,0,val[11],val[12],val[1],val[2]) + gc.setColor(.97,.97,.97,T2) + for i=1,9,2 do + gc.line(val[i],val[i+1],val[i+2],val[i+3]) + end + gc.line(val[11],val[12],val[1],val[2]) + gc.pop() - --Texts - local C - _=TIME()%6.2832 - if _>3.142 then - gc.setColor(.97,.97,.97,-T2*sin(_)) - setFont(35) - C,_=text.radar,textPos - else - gc.setColor(.97,.97,.97,T2*sin(_)) - setFont(20) - C,_=radar,dataPos - end - for i=1,6 do - mStr(C[i],_[2*i-1],_[2*i]) - end - gc.pop() - end - gc.pop() - end + --Texts + local C + _=TIME()%6.2832 + if _>3.142 then + gc.setColor(.97,.97,.97,-T2*sin(_)) + setFont(35) + C,_=text.radar,textPos + else + gc.setColor(.97,.97,.97,T2*sin(_)) + setFont(20) + C,_=radar,dataPos + end + for i=1,6 do + mStr(C[i],_[2*i-1],_[2*i]) + end + gc.pop() + end + gc.pop() + end - --Mods - gc.push('transform') - gc.translate(131,600) - gc.scale(.65) - if #GAME.mod>0 then - gc.setLineWidth(2) - if scoreValid()then - gc.setColor(.7,.7,.7,T) - gc.rectangle('line',-5,-5,500,150,8) - gc.setColor(.7,.7,.7,T*.05) - gc.rectangle('fill',-5,-5,500,150,8) - else - gc.setColor(.8,0,0,T) - gc.rectangle('line',-5,-5,500,150,8) - gc.setColor(1,0,0,T*.05) - gc.rectangle('fill',-5,-5,500,150,8) - end - setFont(35) - for _,M in next,MODOPT do - if M.sel>0 then - _=M.color - gc.setColor(_[1],_[2],_[3],T) - mStr(M.id,35+M.no%8*60,math.floor(M.no/8)*45) - end - end - end - gc.pop() + --Mods + gc.push('transform') + gc.translate(131,600) + gc.scale(.65) + if #GAME.mod>0 then + gc.setLineWidth(2) + if scoreValid()then + gc.setColor(.7,.7,.7,T) + gc.rectangle('line',-5,-5,500,150,8) + gc.setColor(.7,.7,.7,T*.05) + gc.rectangle('fill',-5,-5,500,150,8) + else + gc.setColor(.8,0,0,T) + gc.rectangle('line',-5,-5,500,150,8) + gc.setColor(1,0,0,T*.05) + gc.rectangle('fill',-5,-5,500,150,8) + end + setFont(35) + for _,M in next,MODOPT do + if M.sel>0 then + _=M.color + gc.setColor(_[1],_[2],_[3],T) + mStr(M.id,35+M.no%8*60,math.floor(M.no/8)*45) + end + end + end + gc.pop() end scene.widgetList={ - WIDGET.newKey{name="resume", x=290,y=240,w=300,h=70,code=pressKey"escape"}, - WIDGET.newKey{name="restart", x=290,y=340,w=300,h=70,code=pressKey"r",hideF=function()return GAME.fromRepMenu end}, - WIDGET.newKey{name="setting", x=290,y=440,w=300,h=70,code=pressKey"s",hideF=function()return GAME.fromRepMenu end}, - WIDGET.newKey{name="quit", x=290,y=540,w=300,h=70,code=pressKey"q"}, - WIDGET.newKey{name="tas", x=290,y=620,w=240,h=50,code=pressKey"t",hideF=function()return not SETTING.allowTAS or GAME.tasUsed or GAME.result or GAME.replaying end}, - WIDGET.newKey{name="page_prev", x=500,y=390,w=70,code=pressKey"tab",noFrame=true, - fText=GC.DO{70,70,{'setLW',2}, {'dRPol',33,35,32,3,6,3.142},{'dRPol',45,35,32,3,6,3.142}}, - fShade=GC.DO{70,70,{'setCL',1,1,1,.4},{'draw',GC.DO{70,70,{'setCL',1,1,1,1},{'fRPol',33,35,32,3,6,3.142},{'fRPol',45,35,32,3,6,3.142}}}}, - hideF=function()return PLAYERS[1].frameRun<=180 end, - }, - WIDGET.newKey{name="page_next", x=1230,y=390,w=70,code=pressKey"Stab",noFrame=true, - fText=GC.DO{70,70,{'setLW',2}, {'dRPol',37,35,32,3,6},{'dRPol',25,35,32,3,6}}, - fShade=GC.DO{70,70,{'setCL',1,1,1,.4},{'draw',GC.DO{70,70,{'setCL',1,1,1,1},{'fRPol',37,35,32,3,6},{'fRPol',25,35,32,3,6}}}}, - hideF=function()return PLAYERS[1].frameRun<=180 end, - }, - WIDGET.newKey{name="replay", x=865,y=165,w=200,h=40,font=25,code=pressKey"p",hideF=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 end}, - WIDGET.newKey{name="save", x=1075,y=165,w=200,h=40,font=25,code=pressKey"o",hideF=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 or GAME.saved end}, + WIDGET.newKey{name="resume", x=290,y=240,w=300,h=70,code=pressKey"escape"}, + WIDGET.newKey{name="restart", x=290,y=340,w=300,h=70,code=pressKey"r",hideF=function()return GAME.fromRepMenu end}, + WIDGET.newKey{name="setting", x=290,y=440,w=300,h=70,code=pressKey"s",hideF=function()return GAME.fromRepMenu end}, + WIDGET.newKey{name="quit", x=290,y=540,w=300,h=70,code=pressKey"q"}, + WIDGET.newKey{name="tas", x=290,y=620,w=240,h=50,code=pressKey"t",hideF=function()return not SETTING.allowTAS or GAME.tasUsed or GAME.result or GAME.replaying end}, + WIDGET.newKey{name="page_prev",x=500,y=390,w=70,code=pressKey"tab",noFrame=true, + fText=GC.DO{70,70,{'setLW',2}, {'dRPol',33,35,32,3,6,3.142},{'dRPol',45,35,32,3,6,3.142}}, + fShade=GC.DO{70,70,{'setCL',1,1,1,.4},{'draw',GC.DO{70,70,{'setCL',1,1,1,1},{'fRPol',33,35,32,3,6,3.142},{'fRPol',45,35,32,3,6,3.142}}}}, + hideF=function()return PLAYERS[1].frameRun<=180 end, + }, + WIDGET.newKey{name="page_next",x=1230,y=390,w=70,code=pressKey"Stab",noFrame=true, + fText=GC.DO{70,70,{'setLW',2}, {'dRPol',37,35,32,3,6},{'dRPol',25,35,32,3,6}}, + fShade=GC.DO{70,70,{'setCL',1,1,1,.4},{'draw',GC.DO{70,70,{'setCL',1,1,1,1},{'fRPol',37,35,32,3,6},{'fRPol',25,35,32,3,6}}}}, + hideF=function()return PLAYERS[1].frameRun<=180 end, + }, + WIDGET.newKey{name="replay", x=865,y=165,w=200,h=40,font=25,code=pressKey"p",hideF=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 end}, + WIDGET.newKey{name="save", x=1075,y=165,w=200,h=40,font=25,code=pressKey"o",hideF=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 or GAME.saved end}, } return scene \ No newline at end of file diff --git a/parts/scenes/quit.lua b/parts/scenes/quit.lua index 0d17e89e..00f81424 100644 --- a/parts/scenes/quit.lua +++ b/parts/scenes/quit.lua @@ -1,12 +1,12 @@ local scene={} function scene.sceneInit() - if math.random()>.0000626 then - love.timer.sleep(.26) - love.event.quit() - else - error("So lucky! 0.00626% to get this!! You can quit the game now.") - end + if math.random()>.0000626 then + love.timer.sleep(.26) + love.event.quit() + else + error("So lucky! 0.00626% to get this!! You can quit the game now.") + end end return scene \ No newline at end of file diff --git a/parts/scenes/register.lua b/parts/scenes/register.lua index ab600e8e..582a920b 100644 --- a/parts/scenes/register.lua +++ b/parts/scenes/register.lua @@ -1,34 +1,34 @@ local scene={} local function _register() - local username= WIDGET.active.username:getText() - local email= WIDGET.active.email:getText() - local password= WIDGET.active.password:getText() - local password2=WIDGET.active.password2:getText() - if #username==0 then - MES.new('error',text.noUsername)return - elseif not STRING.simpEmailCheck(email)then - MES.new('error',text.wrongEmail)return - elseif #password==0 or #password2==0 then - MES.new('error',text.noPassword)return - elseif password~=password2 then - MES.new('error',text.diffPassword)return - end - NET.register(username,email,password) + local username= WIDGET.active.username:getText() + local email= WIDGET.active.email:getText() + local password= WIDGET.active.password:getText() + local password2=WIDGET.active.password2:getText() + if #username==0 then + MES.new('error',text.noUsername)return + elseif not STRING.simpEmailCheck(email)then + MES.new('error',text.wrongEmail)return + elseif #password==0 or #password2==0 then + MES.new('error',text.noPassword)return + elseif password~=password2 then + MES.new('error',text.diffPassword)return + end + NET.register(username,email,password) end scene.widgetList={ - WIDGET.newText{name="title", x=80, y=50,font=70,align='L'}, - WIDGET.newButton{name="login", x=1140, y=100,w=170,h=80,color='lY',code=function()SCN.swapTo('login','swipeL')end}, - WIDGET.newInputBox{name="username", x=380, y=200,w=500,h=60,regex="[0-9A-Za-z_]"}, - WIDGET.newInputBox{name="email", x=380, y=300,w=626,h=60}, - WIDGET.newInputBox{name="password", x=380, y=400,w=626,h=60,secret=true,regex="[ -~]"}, - WIDGET.newInputBox{name="password2",x=380, y=500,w=626,h=60,secret=true,regex="[ -~]"}, + WIDGET.newText{name="title", x=80, y=50,font=70,align='L'}, + WIDGET.newButton{name="login", x=1140,y=100,w=170,h=80,color='lY',code=function()SCN.swapTo('login','swipeL')end}, + WIDGET.newInputBox{name="username", x=380, y=200,w=500,h=60,regex="[0-9A-Za-z_]"}, + WIDGET.newInputBox{name="email", x=380, y=300,w=626,h=60}, + WIDGET.newInputBox{name="password", x=380, y=400,w=626,h=60,secret=true,regex="[ -~]"}, + WIDGET.newInputBox{name="password2",x=380, y=500,w=626,h=60,secret=true,regex="[ -~]"}, - WIDGET.newKey{name="register", x=640, y=640,w=300,h=80,font=40,code=_register,hideF=function()return NET.getlock('register')end}, - WIDGET.newText{name="registering", x=640, y=605,font=50,hideF=function()return not NET.getlock('register')end}, + WIDGET.newKey{name="register", x=640, y=640,w=300,h=80,font=40,code=_register,hideF=function()return NET.getlock('register')end}, + WIDGET.newText{name="registering", x=640, y=605,font=50,hideF=function()return not NET.getlock('register')end}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/replays.lua b/parts/scenes/replays.lua index e7cd55ac..dcc6317d 100644 --- a/parts/scenes/replays.lua +++ b/parts/scenes/replays.lua @@ -7,34 +7,34 @@ local kb=love.keyboard local setFont=setFont local listBox=WIDGET.newListBox{name="list",x=50,y=50,w=1200,h=520,lineH=40,drawF=function(rep,id,ifSel) - if ifSel then - gc_setColor(1,1,1,.3) - gc_rectangle('fill',0,0,1200,40) - end + if ifSel then + gc_setColor(1,1,1,.3) + gc_rectangle('fill',0,0,1200,40) + end - setFont(30) - gc_setColor(.8,.8,.8) - gc_print(id,10,-2) - if rep.tasUsed then - gc_setColor(COLOR.R) - gc_print("TAS",680,-2) - end + setFont(30) + gc_setColor(.8,.8,.8) + gc_print(id,10,-2) + if rep.tasUsed then + gc_setColor(COLOR.R) + gc_print("TAS",680,-2) + end - if rep.available then - gc_setColor(.9,.9,1) - local modeName=text.modes[rep.mode] - gc_print(modeName and modeName[1].." "..modeName[2]or rep.mode,310,-2) - setFont(20) - gc_setColor(1,1,.8) - gc_print(rep.date,80,6) - gc_setColor(1,.4,.4,.6) - gc_printf(rep.version,0,6,1190,'right') - gc_setColor(COLOR.Z) - gc_printf(rep.player,0,6,960,'right') - else - gc_setColor(.6,.6,.6) - gc_print(rep.fileName,80,-2) - end + if rep.available then + gc_setColor(.9,.9,1) + local modeName=text.modes[rep.mode] + gc_print(modeName and modeName[1].." "..modeName[2]or rep.mode,310,-2) + setFont(20) + gc_setColor(1,1,.8) + gc_print(rep.date,80,6) + gc_setColor(1,.4,.4,.6) + gc_printf(rep.version,0,6,1190,'right') + gc_setColor(COLOR.Z) + gc_printf(rep.player,0,6,960,'right') + else + gc_setColor(.6,.6,.6) + gc_print(rep.fileName,80,-2) + end end} local scene={} @@ -42,124 +42,124 @@ local scene={} local sure local function _playRep(fileName) - local rep=DATA.parseReplay(fileName,true) - if not rep.available then - MES.new('error',text.replayBroken) - elseif MODES[rep.mode]then - GAME.seed=rep.seed - GAME.setting=rep.setting - TABLE.cut(GAME.mod) - for i=1,#MODOPT do MODOPT[i].sel=0 end - for _,m in next,rep.mod do - MODOPT[m[1]+1].sel=m[2] - table.insert(GAME.mod,MODOPT[m[1]+1]) - end - GAME.rep={} - DATA.pumpRecording(rep.data,GAME.rep) + local rep=DATA.parseReplay(fileName,true) + if not rep.available then + MES.new('error',text.replayBroken) + elseif MODES[rep.mode]then + GAME.seed=rep.seed + GAME.setting=rep.setting + TABLE.cut(GAME.mod) + for i=1,#MODOPT do MODOPT[i].sel=0 end + for _,m in next,rep.mod do + MODOPT[m[1]+1].sel=m[2] + table.insert(GAME.mod,MODOPT[m[1]+1]) + end + GAME.rep={} + DATA.pumpRecording(rep.data,GAME.rep) - loadGame(rep.mode,true) - resetGameData('r') - PLAYERS[1].username=rep.player - GAME.init=false - GAME.saved=true - GAME.fromRepMenu=true - GAME.tasUsed=rep.tasUsed - else - MES.new('error',("No mode id: [%s]"):format(rep.mode)) - end + loadGame(rep.mode,true) + resetGameData('r') + PLAYERS[1].username=rep.player + GAME.init=false + GAME.saved=true + GAME.fromRepMenu=true + GAME.tasUsed=rep.tasUsed + else + MES.new('error',("No mode id: [%s]"):format(rep.mode)) + end end function scene.sceneInit() - sure=0 - listBox:setList(REPLAY) - local hide=listBox:getLen()==0 - for i=3,5 do - scene.widgetList[i].hide=hide - end + sure=0 + listBox:setList(REPLAY) + local hide=listBox:getLen()==0 + for i=3,5 do + scene.widgetList[i].hide=hide + end end function scene.keyDown(key) - if key=="return"then - local rep=listBox:getSel() - if rep then - _playRep(rep.fileName) - end - elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then - local rep=listBox:getSel() - if rep then - if rep.available and rep.fileName then - local repStr=FILE.load(rep.fileName) - if repStr then - love.system.setClipboardText(love.data.encode('string','base64',repStr)) - MES.new('info',text.exportSuccess) - else - MES.new('error',text.replayBroken) - end - else - MES.new('error',text.replayBroken) - end - end - elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then - local repStr=love.system.getClipboardText() - local res,fileData=pcall(love.data.decode,'string','base64',repStr) - if res then - local fileName=os.date("replay/%Y_%m_%d_%H%M%S_import.rep") - local rep=DATA.parseReplayData(fileName,fileData,false) - if rep.available then - if FILE.save(fileData,fileName,'d')then - table.insert(REPLAY,1,rep) - MES.new('info',text.importSuccess) - end - else - MES.new('error',text.dataCorrupted) - end - else - MES.new('error',text.dataCorrupted) - end - elseif key=="delete"then - local rep=listBox:getSel() - if rep then - if sure>.3 then - sure=0 - listBox:remove() - love.filesystem.remove(rep.fileName) - for i=1,#REPLAY do - if REPLAY[i].fileName==rep.fileName then - table.remove(REPLAY,i) - break - end - end - SFX.play('finesseError',.7) - else - sure=1 - end - end - elseif key=="escape"then - SCN.back() - else - WIDGET.keyPressed(key) - end + if key=="return"then + local rep=listBox:getSel() + if rep then + _playRep(rep.fileName) + end + elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then + local rep=listBox:getSel() + if rep then + if rep.available and rep.fileName then + local repStr=FILE.load(rep.fileName) + if repStr then + love.system.setClipboardText(love.data.encode('string','base64',repStr)) + MES.new('info',text.exportSuccess) + else + MES.new('error',text.replayBroken) + end + else + MES.new('error',text.replayBroken) + end + end + elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then + local repStr=love.system.getClipboardText() + local res,fileData=pcall(love.data.decode,'string','base64',repStr) + if res then + local fileName=os.date("replay/%Y_%m_%d_%H%M%S_import.rep") + local rep=DATA.parseReplayData(fileName,fileData,false) + if rep.available then + if FILE.save(fileData,fileName,'d')then + table.insert(REPLAY,1,rep) + MES.new('info',text.importSuccess) + end + else + MES.new('error',text.dataCorrupted) + end + else + MES.new('error',text.dataCorrupted) + end + elseif key=="delete"then + local rep=listBox:getSel() + if rep then + if sure>.3 then + sure=0 + listBox:remove() + love.filesystem.remove(rep.fileName) + for i=1,#REPLAY do + if REPLAY[i].fileName==rep.fileName then + table.remove(REPLAY,i) + break + end + end + SFX.play('finesseError',.7) + else + sure=1 + end + end + elseif key=="escape"then + SCN.back() + else + WIDGET.keyPressed(key) + end end function scene.update(dt) - if sure>0 then sure=sure-dt end + if sure>0 then sure=sure-dt end end function scene.draw() - --Confirm delete - if sure>0 then - gc_setColor(1,1,1,sure) - mDraw(TEXTURE.sure,930,640,nil,.9) - end + --Confirm delete + if sure>0 then + gc_setColor(1,1,1,sure) + mDraw(TEXTURE.sure,930,640,nil,.9) + end end scene.widgetList={ - listBox, - WIDGET.newButton{name="export",x=200,y=640,w=70,color='lG',code=pressKey"cC",fText=GC.DO{50,50,{'fRect',8,44,34,4},{'fRect',22,17,6,23},{'fPoly',25,5,10,20,40,20}}}, - WIDGET.newButton{name="import",x=300,y=640,w=70,color='lN',code=pressKey"cV",fText=GC.DO{50,50,{'fRect',8,44,34,4},{'fRect',22,5,6,23},{'fPoly',25,40,10,25,40,25}}}, - WIDGET.newButton{name="play",x=700,y=640,w=170,h=80,color='lY',code=pressKey"return",fText=GC.DO{50,50,{'fPoly',10,0,49,24,10,49}}}, - WIDGET.newButton{name="delete",x=850,y=640,w=80,h=80,color='lR',code=pressKey"delete",fText=GC.DO{50,50,{'setLW',8},{'line',5,5,45,45},{'line',5,45,45,5}}}, - WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + listBox, + WIDGET.newButton{name="export",x=200,y=640,w=70,color='lG',code=pressKey"cC",fText=GC.DO{50,50,{'fRect',8,44,34,4},{'fRect',22,17,6,23},{'fPoly',25,5,10,20,40,20}}}, + WIDGET.newButton{name="import",x=300,y=640,w=70,color='lN',code=pressKey"cV",fText=GC.DO{50,50,{'fRect',8,44,34,4},{'fRect',22,5,6,23},{'fPoly',25,40,10,25,40,25}}}, + WIDGET.newButton{name="play", x=700,y=640,w=170,h=80,color='lY',code=pressKey"return",fText=GC.DO{50,50,{'fPoly',10,0,49,24,10,49}}}, + WIDGET.newButton{name="delete",x=850,y=640,w=80,h=80,color='lR',code=pressKey"delete",fText=GC.DO{50,50,{'setLW',8},{'line',5,5,45,45},{'line',5,45,45,5}}}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/savedata.lua b/parts/scenes/savedata.lua index 1f6d616d..9cc44bd0 100644 --- a/parts/scenes/savedata.lua +++ b/parts/scenes/savedata.lua @@ -1,88 +1,88 @@ local scene={} local function _dumpCB(T) - love.system.setClipboardText(STRING.packText(TABLE.dump(T))) - MES.new('check',text.exportSuccess) + love.system.setClipboardText(STRING.packText(TABLE.dump(T))) + MES.new('check',text.exportSuccess) end local function _parseCB() - local _ - local s=love.system.getClipboardText() + local _ + local s=love.system.getClipboardText() - --Decode - s=STRING.unpackText(s) - if not s then MES.new('error',text.dataCorrupted)return end + --Decode + s=STRING.unpackText(s) + if not s then MES.new('error',text.dataCorrupted)return end - s=loadstring(s) - if s then - setfenv(s,NONE) - return s() - end + s=loadstring(s) + if s then + setfenv(s,NONE) + return s() + end end scene.widgetList={ - WIDGET.newText{name="export", x=55,y=45,color='lY',align='L',font=50}, - WIDGET.newButton{name="unlock", x=190,y=170,w=280,h=100,color='lY',code=function()_dumpCB(RANKS)end}, - WIDGET.newButton{name="data", x=490,y=170,w=280,h=100,color='lY',code=function()_dumpCB(STAT)end}, - WIDGET.newButton{name="setting", x=790,y=170,w=280,h=100,color='lY',code=function()_dumpCB(SETTING)end}, - WIDGET.newButton{name="vk", x=1090,y=170,w=280,h=100,color='lY',code=function()_dumpCB(VK_org)end}, + WIDGET.newText{name="export", x=55,y=45,color='lY',align='L',font=50}, + WIDGET.newButton{name="unlock", x=190,y=170,w=280,h=100,color='lY',code=function()_dumpCB(RANKS)end}, + WIDGET.newButton{name="data", x=490,y=170,w=280,h=100,color='lY',code=function()_dumpCB(STAT)end}, + WIDGET.newButton{name="setting", x=790,y=170,w=280,h=100,color='lY',code=function()_dumpCB(SETTING)end}, + WIDGET.newButton{name="vk", x=1090,y=170,w=280,h=100,color='lY',code=function()_dumpCB(VK_org)end}, - WIDGET.newText{name="import", x=55,y=265,color='lR',align='L',font=50}, - WIDGET.newButton{name="unlock", x=190,y=390,w=280,h=100,color='lR', - code=function() - local D=_parseCB() - if D then - TABLE.cover(D,RANKS) - for k,v in next,oldModeNameTable do - if RANKS[k]then - RANKS[v]=RANKS[k] - RANKS[k]=nil - end - end - saveProgress() - MES.new('check',text.importSuccess) - else - MES.new('error',text.dataCorrupted) - end - end}, - WIDGET.newButton{name="data", x=490,y=390,w=280,h=100,color='lR', - code=function() - local D=_parseCB() - if D and D.version==STAT.version then - TABLE.update(D,STAT) - saveStats() - MES.new('check',text.importSuccess) - else - MES.new('error',text.dataCorrupted) - end - end}, - WIDGET.newButton{name="setting", x=790,y=390,w=280,h=100,color='lR', - code=function() - local D=_parseCB() - if D then - TABLE.update(D,SETTING) - applySettings() - saveSettings() - MES.new('check',text.importSuccess) - else - MES.new('error',text.dataCorrupted) - end - end}, - WIDGET.newButton{name="vk", x=1090,y=390,w=280,h=100,color='lR', - code=function() - local D=_parseCB() - if D then - TABLE.update(D,VK_org) - FILE.save(VK_org,'conf/virtualkey') - MES.new('check',text.importSuccess) - else - MES.new('error',text.dataCorrupted) - end - end}, + WIDGET.newText{name="import", x=55,y=265,color='lR',align='L',font=50}, + WIDGET.newButton{name="unlock", x=190,y=390,w=280,h=100,color='lR', + code=function() + local D=_parseCB() + if D then + TABLE.cover(D,RANKS) + for k,v in next,oldModeNameTable do + if RANKS[k]then + RANKS[v]=RANKS[k] + RANKS[k]=nil + end + end + saveProgress() + MES.new('check',text.importSuccess) + else + MES.new('error',text.dataCorrupted) + end + end}, + WIDGET.newButton{name="data", x=490,y=390,w=280,h=100,color='lR', + code=function() + local D=_parseCB() + if D and D.version==STAT.version then + TABLE.update(D,STAT) + saveStats() + MES.new('check',text.importSuccess) + else + MES.new('error',text.dataCorrupted) + end + end}, + WIDGET.newButton{name="setting", x=790,y=390,w=280,h=100,color='lR', + code=function() + local D=_parseCB() + if D then + TABLE.update(D,SETTING) + applySettings() + saveSettings() + MES.new('check',text.importSuccess) + else + MES.new('error',text.dataCorrupted) + end + end}, + WIDGET.newButton{name="vk", x=1090,y=390,w=280,h=100,color='lR', + code=function() + local D=_parseCB() + if D then + TABLE.update(D,VK_org) + FILE.save(VK_org,'conf/virtualkey') + MES.new('check',text.importSuccess) + else + MES.new('error',text.dataCorrupted) + end + end}, - WIDGET.newText{name="couldSave", x=55,y=485,color='lB',align='L',font=50}, - WIDGET.newText{name="notLogin", x=55,y=550,color='dB',align='L',font=30,hideF=function()return WS.status('user')=='running'end}, - WIDGET.newButton{name="upload", x=190,y=610,w=280,h=90,color='lB',font=25,code=NET.uploadSave,hideF=function()return WS.status('user')~='running'end}, - WIDGET.newButton{name="download", x=490,y=610,w=280,h=90,color='lB',font=25,code=NET.downloadSave,hideF=function()return WS.status('user')~='running'end}, - WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newText{name="couldSave", x=55,y=485,color='lB',align='L',font=50}, + WIDGET.newText{name="notLogin", x=55,y=550,color='dB',align='L',font=30,hideF=function()return WS.status('user')=='running'end}, + WIDGET.newButton{name="upload", x=190,y=610,w=280,h=90,color='lB',font=25,code=NET.uploadSave,hideF=function()return WS.status('user')~='running'end}, + WIDGET.newButton{name="download", x=490,y=610,w=280,h=90,color='lB',font=25,code=NET.downloadSave,hideF=function()return WS.status('user')~='running'end}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/setting_control.lua b/parts/scenes/setting_control.lua index 48f94d8c..07079a1d 100644 --- a/parts/scenes/setting_control.lua +++ b/parts/scenes/setting_control.lua @@ -6,101 +6,101 @@ local das,arr local pos,dir,wait function scene.sceneInit() - das,arr=SETTING.das,SETTING.arr - pos,dir,wait=0,1,30 - BG.set('bg1') + das,arr=SETTING.das,SETTING.arr + pos,dir,wait=0,1,30 + BG.set('bg1') end function scene.update() - if wait>0 then - wait=wait-1 - if wait==0 then - pos=pos+(das==0 and 2 or 1)*dir - else - return - end - end - if das>0 then - das=das-1 - if das==0 then - if arr==0 then - pos=pos+7*dir - das=SETTING.das+1 - arr=SETTING.arr - dir=-dir - wait=26 - else - pos=pos+dir - end - end - else - arr=arr-1 - if arr==0 then - pos=pos+dir - arr=SETTING.arr - elseif arr==-1 then - pos=dir>0 and 8 or 0 - arr=SETTING.arr - end - if pos%8==0 then - dir=-dir - wait=26 - das=SETTING.das - end - end + if wait>0 then + wait=wait-1 + if wait==0 then + pos=pos+(das==0 and 2 or 1)*dir + else + return + end + end + if das>0 then + das=das-1 + if das==0 then + if arr==0 then + pos=pos+7*dir + das=SETTING.das+1 + arr=SETTING.arr + dir=-dir + wait=26 + else + pos=pos+dir + end + end + else + arr=arr-1 + if arr==0 then + pos=pos+dir + arr=SETTING.arr + elseif arr==-1 then + pos=dir>0 and 8 or 0 + arr=SETTING.arr + end + if pos%8==0 then + dir=-dir + wait=26 + das=SETTING.das + end + end end function scene.draw() - gc.translate(550,600) + gc.translate(550,600) - --Testing grid line - gc.setLineWidth(4) - gc.setColor(1,1,1,.4) - gc.line(0,0,400,0) - gc.line(0,40,400,40) - gc.line(0,80,400,80) - for x=40,360,40 do - gc.line(x,-10,x,90) - end - gc.setColor(COLOR.Z) - gc.line(0,-10,0,90) - gc.line(400,-10,400,90) + --Testing grid line + gc.setLineWidth(4) + gc.setColor(1,1,1,.4) + gc.line(0,0,400,0) + gc.line(0,40,400,40) + gc.line(0,80,400,80) + for x=40,360,40 do + gc.line(x,-10,x,90) + end + gc.setColor(COLOR.Z) + gc.line(0,-10,0,90) + gc.line(400,-10,400,90) - --O mino animation - gc.setColor(1,1,1) - local O=SKIN.lib[SETTING.skinSet][SETTING.skin[6]] - gc.draw(O,40*pos,0,nil,40/30) - gc.draw(O,40*pos,40,nil,40/30) - gc.draw(O,40*pos+40,0,nil,40/30) - gc.draw(O,40*pos+40,40,nil,40/30) - gc.translate(-550,-600) + --O mino animation + gc.setColor(1,1,1) + local O=SKIN.lib[SETTING.skinSet][SETTING.skin[6]] + gc.draw(O,40*pos,0,nil,40/30) + gc.draw(O,40*pos,40,nil,40/30) + gc.draw(O,40*pos+40,0,nil,40/30) + gc.draw(O,40*pos+40,40,nil,40/30) + gc.translate(-550,-600) end local function _sliderShow(S) - S=S.disp() - return S.."F "..math.floor(S*16.67).."ms" + S=S.disp() + return S.."F "..math.floor(S*16.67).."ms" end scene.widgetList={ - WIDGET.newText{name="title", x=80, y=50,font=70,align='L'}, - WIDGET.newText{name="preview", x=520, y=610,font=40,align='R'}, + WIDGET.newText{name="title", x=80, y=50,font=70,align='L'}, + WIDGET.newText{name="preview", x=520, y=610,font=40,align='R'}, - WIDGET.newSlider{name="das", x=250, y=190,w=600,unit=20,disp=SETval("das"), show=_sliderShow,code=SETsto("das")}, - WIDGET.newSlider{name="arr", x=250, y=260,w=525,unit=15,disp=SETval("arr"), show=_sliderShow,code=SETsto("arr")}, - WIDGET.newSlider{name="sddas", x=250, y=330,w=350,unit=10,disp=SETval("sddas"),show=_sliderShow,code=SETsto("sddas")}, - WIDGET.newSlider{name="sdarr", x=250, y=400,w=140,unit=4, disp=SETval("sdarr"),show=_sliderShow,code=SETsto("sdarr")}, - WIDGET.newSlider{name="dascut", x=250, y=470,w=600,unit=20,disp=SETval("dascut"),show=_sliderShow,code=SETsto("dascut")}, - WIDGET.newSlider{name="dropcut",x=250, y=540,w=300,unit=10,disp=SETval("dropcut"),show=_sliderShow,code=SETsto("dropcut")}, - WIDGET.newSwitch{name="ihs", x=1100, y=260, disp=SETval("ihs"), code=SETrev("ihs")}, - WIDGET.newSwitch{name="irs", x=1100, y=330, disp=SETval("irs"), code=SETrev("irs")}, - WIDGET.newSwitch{name="ims", x=1100, y=400, disp=SETval("ims"), code=SETrev("ims")}, - WIDGET.newButton{name="reset", x=160, y=640,w=200,h=100,color='lR',font=40, - code=function() - local _=SETTING - _.das,_.arr,_.dascut=10,2,0 - _.sddas,_.sdarr=0,2 - _.ihs,_.irs,_.ims=false,false,false - end}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newSlider{name="das", x=250, y=190,w=600,unit=20,disp=SETval("das"), show=_sliderShow,code=SETsto("das")}, + WIDGET.newSlider{name="arr", x=250, y=260,w=525,unit=15,disp=SETval("arr"), show=_sliderShow,code=SETsto("arr")}, + WIDGET.newSlider{name="sddas", x=250, y=330,w=350,unit=10,disp=SETval("sddas"), show=_sliderShow,code=SETsto("sddas")}, + WIDGET.newSlider{name="sdarr", x=250, y=400,w=140,unit=4, disp=SETval("sdarr"), show=_sliderShow,code=SETsto("sdarr")}, + WIDGET.newSlider{name="dascut", x=250, y=470,w=600,unit=20,disp=SETval("dascut"), show=_sliderShow,code=SETsto("dascut")}, + WIDGET.newSlider{name="dropcut",x=250, y=540,w=300,unit=10,disp=SETval("dropcut"),show=_sliderShow,code=SETsto("dropcut")}, + WIDGET.newSwitch{name="ihs", x=1100, y=260, disp=SETval("ihs"), code=SETrev("ihs")}, + WIDGET.newSwitch{name="irs", x=1100, y=330, disp=SETval("irs"), code=SETrev("irs")}, + WIDGET.newSwitch{name="ims", x=1100, y=400, disp=SETval("ims"), code=SETrev("ims")}, + WIDGET.newButton{name="reset", x=160, y=640,w=200,h=100,color='lR',font=40, + code=function() + local _=SETTING + _.das,_.arr,_.dascut=10,2,0 + _.sddas,_.sdarr=0,2 + _.ihs,_.irs,_.ims=false,false,false + end}, + WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/setting_game.lua b/parts/scenes/setting_game.lua index 3bba10ed..cc82f5d9 100644 --- a/parts/scenes/setting_game.lua +++ b/parts/scenes/setting_game.lua @@ -3,61 +3,61 @@ local gc=love.graphics local scene={} function scene.sceneInit() - BG.set() + BG.set() end function scene.sceneBack() - saveSettings() + saveSettings() end function scene.draw() - gc.push('transform') - gc.translate(410,540-WIDGET.scrollPos) + gc.push('transform') + gc.translate(410,540-WIDGET.scrollPos) - --Draw mino - local t=TIME() - local b=math.floor(t*2)%16+1 - gc.setShader(SHADER.blockSatur) - gc.setColor(1,1,1) - mDraw(SKIN.lib[SETTING.skinSet][b],0,0,t%6.2832,2) - gc.setColor(1,1,1,t*2%1) - mDraw(SKIN.lib[SETTING.skinSet][b%16+1],0,0,t%6.2832,2) - gc.setShader() + --Draw mino + local t=TIME() + local b=math.floor(t*2)%16+1 + gc.setShader(SHADER.blockSatur) + gc.setColor(1,1,1) + mDraw(SKIN.lib[SETTING.skinSet][b],0,0,t%6.2832,2) + gc.setColor(1,1,1,t*2%1) + mDraw(SKIN.lib[SETTING.skinSet][b%16+1],0,0,t%6.2832,2) + gc.setShader() - --Draw center - gc.setColor(1,1,1) - mDraw(RSlist[SETTING.RS].centerTex,0,0,0,1.2) + --Draw center + gc.setColor(1,1,1) + mDraw(RSlist[SETTING.RS].centerTex,0,0,0,1.2) - gc.pop() + gc.pop() end scene.widgetScrollHeight=200 scene.widgetList={ - WIDGET.newText{name="title", x=640,y=15,font=80}, + WIDGET.newText{name="title", x=640,y=15,font=80}, - WIDGET.newButton{name="graphic", x=200, y=80, w=240,h=80, color='lC',font=35,code=swapScene('setting_video','swipeR')}, - WIDGET.newButton{name="sound", x=1080, y=80, w=240,h=80, color='lC',font=35,code=swapScene('setting_sound','swipeL')}, + WIDGET.newButton{name="graphic", x=200, y=80, w=240,h=80,color='lC',font=35,code=swapScene('setting_video','swipeR')}, + WIDGET.newButton{name="sound", x=1080, y=80, w=240,h=80,color='lC',font=35,code=swapScene('setting_sound','swipeL')}, - WIDGET.newButton{name="ctrl", x=290, y=220, w=320,h=80, color='lY',font=35,code=goScene'setting_control'}, - WIDGET.newButton{name="key", x=640, y=220, w=320,h=80, color='lG',font=35,code=goScene'setting_key'}, - WIDGET.newButton{name="touch", x=990, y=220, w=320,h=80, color='lB',font=35,code=goScene'setting_touch'}, - WIDGET.newSlider{name="reTime", x=330, y=320, w=300,unit=10,disp=SETval("reTime"),code=SETsto("reTime"),show=function(S)return(.5+S.disp()*.25).."s"end}, - WIDGET.newSelector{name="RS", x=300, y=420, w=300,color='S',list={'TRS','SRS','SRS_plus','SRS_X','BiRS','ARS_Z','ASC','ASC_plus','C2','C2_sym','Classic','Classic_plus','None','None_plus'},disp=SETval("RS"),code=SETsto("RS")}, - WIDGET.newButton{name="layout", x=250, y=540, w=200,h=70,font=35, code=goScene'setting_skin'}, - WIDGET.newSwitch{name="autoPause", x=1060, y=320, disp=SETval("autoPause"), code=SETrev("autoPause")}, - WIDGET.newSelector{name="menuPos", x=980, y=420, w=300,color='O',list={'left','middle','right'},disp=SETval("menuPos"),code=SETsto("menuPos")}, - WIDGET.newSwitch{name="swap", x=1060, y=520, disp=SETval("swap"), code=SETrev("swap")}, - WIDGET.newSwitch{name="autoSave", x=600, y=800, disp=SETval("autoSave"), code=SETrev("autoSave")}, - WIDGET.newSwitch{name="simpMode", x=1060, y=800, disp=SETval("simpMode"), - code=function() - SETTING.simpMode=not SETTING.simpMode - for i=1,#SCN.stack,2 do - if SCN.stack[i]=='main'or SCN.stack[i]=='main_simple'then - SCN.stack[i]=SETTING.simpMode and'main_simple'or'main' - break - end - end - end}, - WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newButton{name="ctrl", x=290, y=220, w=320,h=80,color='lY',font=35,code=goScene'setting_control'}, + WIDGET.newButton{name="key", x=640, y=220, w=320,h=80,color='lG',font=35,code=goScene'setting_key'}, + WIDGET.newButton{name="touch", x=990, y=220, w=320,h=80,color='lB',font=35,code=goScene'setting_touch'}, + WIDGET.newSlider{name="reTime", x=330, y=320, w=300,unit=10,disp=SETval("reTime"),code=SETsto("reTime"),show=function(S)return(.5+S.disp()*.25).."s"end}, + WIDGET.newSelector{name="RS", x=300, y=420, w=300,color='S',list={'TRS','SRS','SRS_plus','SRS_X','BiRS','ARS_Z','ASC','ASC_plus','C2','C2_sym','Classic','Classic_plus','None','None_plus'},disp=SETval("RS"),code=SETsto("RS")}, + WIDGET.newButton{name="layout", x=250, y=540, w=200,h=70,font=35, code=goScene'setting_skin'}, + WIDGET.newSwitch{name="autoPause", x=1060, y=320, disp=SETval("autoPause"),code=SETrev("autoPause")}, + WIDGET.newSelector{name="menuPos", x=980, y=420, w=300,color='O',list={'left','middle','right'},disp=SETval("menuPos"),code=SETsto("menuPos")}, + WIDGET.newSwitch{name="swap", x=1060, y=520, disp=SETval("swap"), code=SETrev("swap")}, + WIDGET.newSwitch{name="autoSave", x=600, y=800, disp=SETval("autoSave"), code=SETrev("autoSave")}, + WIDGET.newSwitch{name="simpMode", x=1060, y=800, disp=SETval("simpMode"), + code=function() + SETTING.simpMode=not SETTING.simpMode + for i=1,#SCN.stack,2 do + if SCN.stack[i]=='main'or SCN.stack[i]=='main_simple'then + SCN.stack[i]=SETTING.simpMode and'main_simple'or'main' + break + end + end + end}, + WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/setting_key.lua b/parts/scenes/setting_key.lua index b7551a8d..f440502e 100644 --- a/parts/scenes/setting_key.lua +++ b/parts/scenes/setting_key.lua @@ -8,139 +8,139 @@ local selected--if waiting for key local keyList local function _freshKeyList() - keyList={}for i=0,20 do keyList[i]={}end - for k,v in next,keyMap.keyboard do - ins(keyList[v],{COLOR.lB,k}) - end - for k,v in next,keyMap.joystick do - ins(keyList[v],{COLOR.lR,k}) - end + keyList={}for i=0,20 do keyList[i]={}end + for k,v in next,keyMap.keyboard do + ins(keyList[v],{COLOR.lB,k}) + end + for k,v in next,keyMap.joystick do + ins(keyList[v],{COLOR.lR,k}) + end end function scene.sceneInit() - selected=false - _freshKeyList() - BG.set('none') + selected=false + _freshKeyList() + BG.set('none') end function scene.sceneBack() - FILE.save(keyMap,'conf/key') + FILE.save(keyMap,'conf/key') end local forbbidenKeys={ - ["\\"]=true, - ["return"]=true, + ["\\"]=true, + ["return"]=true, } function scene.keyDown(key,isRep) - if isRep then return end - if key=="escape"then - if selected then - for k,v in next,keyMap.keyboard do - if v==selected then - keyMap.keyboard[k]=nil - end - end - _freshKeyList() - selected=false - SFX.play('finesseError',.5) - else - SCN.back() - end - elseif selected then - if not forbbidenKeys[key]then - keyMap.keyboard[key]=selected - _freshKeyList() - selected=false - SFX.play('reach',.5) - end - else - WIDGET.keyPressed(key) - end + if isRep then return end + if key=="escape"then + if selected then + for k,v in next,keyMap.keyboard do + if v==selected then + keyMap.keyboard[k]=nil + end + end + _freshKeyList() + selected=false + SFX.play('finesseError',.5) + else + SCN.back() + end + elseif selected then + if not forbbidenKeys[key]then + keyMap.keyboard[key]=selected + _freshKeyList() + selected=false + SFX.play('reach',.5) + end + else + WIDGET.keyPressed(key) + end end function scene.gamepadDown(key) - if key=="back"then - if selected then - for k,v in next,keyMap.joystick do - if v==selected then - keyMap.joystick[k]=nil - end - end - _freshKeyList() - selected=false - SFX.play('finesseError',.5) - else - SCN.back() - end - elseif selected then - keyMap.joystick[key]=selected - _freshKeyList() - selected=false - SFX.play('reach',.5) - else - WIDGET.gamepadPressed(key) - end + if key=="back"then + if selected then + for k,v in next,keyMap.joystick do + if v==selected then + keyMap.joystick[k]=nil + end + end + _freshKeyList() + selected=false + SFX.play('finesseError',.5) + else + SCN.back() + end + elseif selected then + keyMap.joystick[key]=selected + _freshKeyList() + selected=false + SFX.play('reach',.5) + else + WIDGET.gamepadPressed(key) + end end function scene.draw() - setFont(15) - gc.setColor(COLOR.Z) + setFont(15) + gc.setColor(COLOR.Z) - for i=0,20 do - for j=1,#keyList[i]do - local key=keyList[i][j] - local font=#key[2]==1 and 40 or #key[2]<6 and 30 or 15 - setFont(font) - mStr(key, - (i>10 and 940 or 210)+100*j, - i>10 and 60*(i-10)-23-font*.7 or - i>0 and 60*i-23-font*.7 or - 667-font*.7 - ) - end - end + for i=0,20 do + for j=1,#keyList[i]do + local key=keyList[i][j] + local font=#key[2]==1 and 40 or #key[2]<6 and 30 or 15 + setFont(font) + mStr(key, + (i>10 and 940 or 210)+100*j, + i>10 and 60*(i-10)-23-font*.7 or + i>0 and 60*i-23-font*.7 or + 667-font*.7 + ) + end + end - if selected then - gc.setColor(COLOR[TIME()%.26<.13 and'R'or'Y']) - local x,y=selected>10 and 910 or 270, selected>10 and 60*(selected-10)-50 or selected>0 and 60*selected-50 or 630 - setFont(40)gc.print("=",x,y) - setFont(10)gc.print("esc?",x,y+40) - end + if selected then + gc.setColor(COLOR[TIME()%.26<.13 and'R'or'Y']) + local x,y=selected>10 and 910 or 270, selected>10 and 60*(selected-10)-50 or selected>0 and 60*selected-50 or 630 + setFont(40)gc.print("=",x,y) + setFont(10)gc.print("esc?",x,y+40) + end end local function _setSel(i) - if selected==i then - selected=false - SFX.play('rotate',.5) - else - selected=i - SFX.play('lock',.5) - end + if selected==i then + selected=false + SFX.play('rotate',.5) + else + selected=i + SFX.play('lock',.5) + end end scene.widgetList={ - WIDGET.newKey{name="a1",x=160,y=40,w=200,h=60,code=function()_setSel(1)end}, - WIDGET.newKey{name="a2",x=160,y=100,w=200,h=60,code=function()_setSel(2)end}, - WIDGET.newKey{name="a3",x=160,y=160,w=200,h=60,code=function()_setSel(3)end}, - WIDGET.newKey{name="a4",x=160,y=220,w=200,h=60,code=function()_setSel(4)end}, - WIDGET.newKey{name="a5",x=160,y=280,w=200,h=60,code=function()_setSel(5)end}, - WIDGET.newKey{name="a6",x=160,y=340,w=200,h=60,code=function()_setSel(6)end}, - WIDGET.newKey{name="a7",x=160,y=400,w=200,h=60,code=function()_setSel(7)end}, - WIDGET.newKey{name="a8",x=160,y=460,w=200,h=60,code=function()_setSel(8)end}, - WIDGET.newKey{name="a9",x=160,y=520,w=200,h=60,code=function()_setSel(9)end}, - WIDGET.newKey{name="a10",x=160,y=580,w=200,h=60,code=function()_setSel(10)end}, + WIDGET.newKey{name="a1",x=160,y=40,w=200,h=60,code=function()_setSel(1)end}, + WIDGET.newKey{name="a2",x=160,y=100,w=200,h=60,code=function()_setSel(2)end}, + WIDGET.newKey{name="a3",x=160,y=160,w=200,h=60,code=function()_setSel(3)end}, + WIDGET.newKey{name="a4",x=160,y=220,w=200,h=60,code=function()_setSel(4)end}, + WIDGET.newKey{name="a5",x=160,y=280,w=200,h=60,code=function()_setSel(5)end}, + WIDGET.newKey{name="a6",x=160,y=340,w=200,h=60,code=function()_setSel(6)end}, + WIDGET.newKey{name="a7",x=160,y=400,w=200,h=60,code=function()_setSel(7)end}, + WIDGET.newKey{name="a8",x=160,y=460,w=200,h=60,code=function()_setSel(8)end}, + WIDGET.newKey{name="a9",x=160,y=520,w=200,h=60,code=function()_setSel(9)end}, + WIDGET.newKey{name="a10",x=160,y=580,w=200,h=60,code=function()_setSel(10)end}, - WIDGET.newKey{name="a11",x=800,y=40,w=200,h=60,code=function()_setSel(11)end}, - WIDGET.newKey{name="a12",x=800,y=100,w=200,h=60,code=function()_setSel(12)end}, - WIDGET.newKey{name="a13",x=800,y=160,w=200,h=60,code=function()_setSel(13)end}, - WIDGET.newKey{name="a14",x=800,y=220,w=200,h=60,code=function()_setSel(14)end}, - WIDGET.newKey{name="a15",x=800,y=280,w=200,h=60,code=function()_setSel(15)end}, - WIDGET.newKey{name="a16",x=800,y=340,w=200,h=60,code=function()_setSel(16)end}, - WIDGET.newKey{name="a17",x=800,y=400,w=200,h=60,code=function()_setSel(17)end}, - WIDGET.newKey{name="a18",x=800,y=460,w=200,h=60,code=function()_setSel(18)end}, - WIDGET.newKey{name="a19",x=800,y=520,w=200,h=60,code=function()_setSel(19)end}, - WIDGET.newKey{name="a20",x=800,y=580,w=200,h=60,code=function()_setSel(20)end}, + WIDGET.newKey{name="a11",x=800,y=40,w=200,h=60,code=function()_setSel(11)end}, + WIDGET.newKey{name="a12",x=800,y=100,w=200,h=60,code=function()_setSel(12)end}, + WIDGET.newKey{name="a13",x=800,y=160,w=200,h=60,code=function()_setSel(13)end}, + WIDGET.newKey{name="a14",x=800,y=220,w=200,h=60,code=function()_setSel(14)end}, + WIDGET.newKey{name="a15",x=800,y=280,w=200,h=60,code=function()_setSel(15)end}, + WIDGET.newKey{name="a16",x=800,y=340,w=200,h=60,code=function()_setSel(16)end}, + WIDGET.newKey{name="a17",x=800,y=400,w=200,h=60,code=function()_setSel(17)end}, + WIDGET.newKey{name="a18",x=800,y=460,w=200,h=60,code=function()_setSel(18)end}, + WIDGET.newKey{name="a19",x=800,y=520,w=200,h=60,code=function()_setSel(19)end}, + WIDGET.newKey{name="a20",x=800,y=580,w=200,h=60,code=function()_setSel(20)end}, - WIDGET.newKey{name="restart",x=160,y=670,w=200,h=60,code=function()_setSel(0)end}, + WIDGET.newKey{name="restart",x=160,y=670,w=200,h=60,code=function()_setSel(0)end}, - WIDGET.newButton{name="back",x=1140,y=640,w=190,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newButton{name="back",x=1140,y=640,w=190,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/setting_skin.lua b/parts/scenes/setting_skin.lua index e04eb4fb..4513a6fd 100644 --- a/parts/scenes/setting_skin.lua +++ b/parts/scenes/setting_skin.lua @@ -9,106 +9,106 @@ local minoRot0={} local scene={} function scene.sceneInit() - BG.set() - selRS=RSlist[SETTING.RS] - for i=1,7 do - minoRot0[i]=SETTING.face[i]*1.57 - minoRot[i]=minoRot0[i] - end + BG.set() + selRS=RSlist[SETTING.RS] + for i=1,7 do + minoRot0[i]=SETTING.face[i]*1.57 + minoRot[i]=minoRot0[i] + end end function scene.update() - for i=1,7 do - minoRot[i]=minoRot[i]*.8+minoRot0[i]*.2 - end + for i=1,7 do + minoRot[i]=minoRot[i]*.8+minoRot0[i]*.2 + end end function scene.draw() - local t=TIME() - gc.setColor(1,1,1) - local texture=SKIN.lib[SETTING.skinSet] - for n=1,7 do - gc.push('transform') - gc.translate(-10+140*n,330) - gc.rotate(minoRot[n]+sin(t*3-n*.5)*.08) - local color=SETTING.skin[n] - local B=BLOCKS[n][0] - local x,y=-45-selRS.centerPos[n][0][2]*30,15+selRS.centerPos[n][0][1]*30 - local col=#B[1] - for i=1,#B do for j=1,col do - if B[i][j]then - gc.draw(texture[color],x+30*j,y-30*i) - end - end end - if selRS.centerDisp[n]then - mDraw(selRS.centerTex) - end - gc.pop() - end - for i=1,5 do - gc.draw(texture[19+i],570+60*i,610+sin(2.6*t-i)*5,nil,2) - end - gc.draw(texture[17],930,610+sin(2.6*t-6)*5,nil,2) + local t=TIME() + gc.setColor(1,1,1) + local texture=SKIN.lib[SETTING.skinSet] + for n=1,7 do + gc.push('transform') + gc.translate(-10+140*n,330) + gc.rotate(minoRot[n]+sin(t*3-n*.5)*.08) + local color=SETTING.skin[n] + local B=BLOCKS[n][0] + local x,y=-45-selRS.centerPos[n][0][2]*30,15+selRS.centerPos[n][0][1]*30 + local col=#B[1] + for i=1,#B do for j=1,col do + if B[i][j]then + gc.draw(texture[color],x+30*j,y-30*i) + end + end end + if selRS.centerDisp[n]then + mDraw(selRS.centerTex) + end + gc.pop() + end + for i=1,5 do + gc.draw(texture[19+i],570+60*i,610+sin(2.6*t-i)*5,nil,2) + end + gc.draw(texture[17],930,610+sin(2.6*t-6)*5,nil,2) end local function _prevSkin(i) - SETTING.skin[i]=(SETTING.skin[i]-2)%16+1 + SETTING.skin[i]=(SETTING.skin[i]-2)%16+1 end local function _nextSkin(i) - SETTING.skin[i]=SETTING.skin[i]%16+1 + SETTING.skin[i]=SETTING.skin[i]%16+1 end local function _nextDir(i) - SETTING.face[i]=(SETTING.face[i]+1)%4 - minoRot0[i]=minoRot0[i]+1.5707963 - if minoRot0[5]>62 and not GAME.playing then - loadGame('marathon_bfmax',true) - end - SFX.play('rotate') + SETTING.face[i]=(SETTING.face[i]+1)%4 + minoRot0[i]=minoRot0[i]+1.5707963 + if minoRot0[5]>62 and not GAME.playing then + loadGame('marathon_bfmax',true) + end + SFX.play('rotate') end scene.widgetList={ - WIDGET.newText{name="title", x=80,y=50,font=70,align='L'}, + WIDGET.newText{name="title", x=80,y=50,font=70,align='L'}, - WIDGET.newSelector{name="skinSet",x=780,y=100,w=320,list=SKIN.getList(),disp=SETval('skinSet'),code=SETsto('skinSet')}, - WIDGET.newButton{name="prev1", x=130,y=220,w=80,h=65,fText="↑",code=function()_prevSkin(1)end}, - WIDGET.newButton{name="prev2", x=270,y=220,w=80,h=65,fText="↑",code=function()_prevSkin(2)end}, - WIDGET.newButton{name="prev3", x=410,y=220,w=80,h=65,fText="↑",code=function()_prevSkin(3)end}, - WIDGET.newButton{name="prev4", x=550,y=220,w=80,h=65,fText="↑",code=function()_prevSkin(4)end}, - WIDGET.newButton{name="prev5", x=690,y=220,w=80,h=65,fText="↑",code=function()_prevSkin(5)end}, - WIDGET.newButton{name="prev6", x=830,y=220,w=80,h=65,fText="↑",code=function()_prevSkin(6)end}, - WIDGET.newButton{name="prev7", x=970,y=220,w=80,h=65,fText="↑",code=function()_prevSkin(7)end}, + WIDGET.newSelector{name="skinSet",x=780,y=100,w=320,list=SKIN.getList(),disp=SETval('skinSet'),code=SETsto('skinSet')}, + WIDGET.newButton{name="prev1", x=130,y=220,w=80,h=65,fText="↑",code=function()_prevSkin(1)end}, + WIDGET.newButton{name="prev2", x=270,y=220,w=80,h=65,fText="↑",code=function()_prevSkin(2)end}, + WIDGET.newButton{name="prev3", x=410,y=220,w=80,h=65,fText="↑",code=function()_prevSkin(3)end}, + WIDGET.newButton{name="prev4", x=550,y=220,w=80,h=65,fText="↑",code=function()_prevSkin(4)end}, + WIDGET.newButton{name="prev5", x=690,y=220,w=80,h=65,fText="↑",code=function()_prevSkin(5)end}, + WIDGET.newButton{name="prev6", x=830,y=220,w=80,h=65,fText="↑",code=function()_prevSkin(6)end}, + WIDGET.newButton{name="prev7", x=970,y=220,w=80,h=65,fText="↑",code=function()_prevSkin(7)end}, - WIDGET.newButton{name="next1", x=130,y=440,w=80,h=65,fText="↓",code=function()_nextSkin(1)end}, - WIDGET.newButton{name="next2", x=270,y=440,w=80,h=65,fText="↓",code=function()_nextSkin(2)end}, - WIDGET.newButton{name="next3", x=410,y=440,w=80,h=65,fText="↓",code=function()_nextSkin(3)end}, - WIDGET.newButton{name="next4", x=550,y=440,w=80,h=65,fText="↓",code=function()_nextSkin(4)end}, - WIDGET.newButton{name="next5", x=690,y=440,w=80,h=65,fText="↓",code=function()_nextSkin(5)end}, - WIDGET.newButton{name="next6", x=830,y=440,w=80,h=65,fText="↓",code=function()_nextSkin(6)end}, - WIDGET.newButton{name="next7", x=970,y=440,w=80,h=65,fText="↓",code=function()_nextSkin(7)end}, + WIDGET.newButton{name="next1", x=130,y=440,w=80,h=65,fText="↓",code=function()_nextSkin(1)end}, + WIDGET.newButton{name="next2", x=270,y=440,w=80,h=65,fText="↓",code=function()_nextSkin(2)end}, + WIDGET.newButton{name="next3", x=410,y=440,w=80,h=65,fText="↓",code=function()_nextSkin(3)end}, + WIDGET.newButton{name="next4", x=550,y=440,w=80,h=65,fText="↓",code=function()_nextSkin(4)end}, + WIDGET.newButton{name="next5", x=690,y=440,w=80,h=65,fText="↓",code=function()_nextSkin(5)end}, + WIDGET.newButton{name="next6", x=830,y=440,w=80,h=65,fText="↓",code=function()_nextSkin(6)end}, + WIDGET.newButton{name="next7", x=970,y=440,w=80,h=65,fText="↓",code=function()_nextSkin(7)end}, - WIDGET.newButton{name="spin1", x=130,y=540,w=80,h=65,code=function()_nextDir(1)end}, - WIDGET.newButton{name="spin2", x=270,y=540,w=80,h=65,code=function()_nextDir(2)end}, - WIDGET.newButton{name="spin3", x=410,y=540,w=80,h=65,code=function()_nextDir(3)end}, - WIDGET.newButton{name="spin4", x=550,y=540,w=80,h=65,code=function()_nextDir(4)end}, - WIDGET.newButton{name="spin5", x=690,y=540,w=80,h=65,code=function()_nextDir(5)end}, - WIDGET.newButton{name="spin6", x=825,y=540,w=80,h=65,code=function()_nextDir(6)end}, - WIDGET.newButton{name="spin7", x=970,y=540,w=80,h=65,code=function()_nextDir(7)end}, + WIDGET.newButton{name="spin1", x=130,y=540,w=80,h=65,code=function()_nextDir(1)end}, + WIDGET.newButton{name="spin2", x=270,y=540,w=80,h=65,code=function()_nextDir(2)end}, + WIDGET.newButton{name="spin3", x=410,y=540,w=80,h=65,code=function()_nextDir(3)end}, + WIDGET.newButton{name="spin4", x=550,y=540,w=80,h=65,code=function()_nextDir(4)end}, + WIDGET.newButton{name="spin5", x=690,y=540,w=80,h=65,code=function()_nextDir(5)end}, + WIDGET.newButton{name="spin6", x=825,y=540,w=80,h=65,code=function()_nextDir(6)end}, + WIDGET.newButton{name="spin7", x=970,y=540,w=80,h=65,code=function()_nextDir(7)end}, - WIDGET.newButton{name="skinR", x=200,y=640,w=220,h=80,color='lV',font=35, - code=function() - SETTING.skin={1,7,11,3,14,4,9,1,7,2,6,10,2,13,5,9,15,10,11,3,10,2,16,8,4,10,13,2,8} - SFX.play('rotate') - end}, - WIDGET.newButton{name="faceR", x=480,y=640,w=220,h=80,color='lR',font=35, - code=function() - for i=1,29 do - SETTING.face[i]=0 - end - for i=1,7 do - minoRot0[i]=(int(minoRot0[i]/6.2831853)+(minoRot0[i]%6.2831853>4 and 1 or 0))*6.2831853 - end - SFX.play('hold') - end}, - WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newButton{name="skinR", x=200,y=640,w=220,h=80,color='lV',font=35, + code=function() + SETTING.skin={1,7,11,3,14,4,9,1,7,2,6,10,2,13,5,9,15,10,11,3,10,2,16,8,4,10,13,2,8} + SFX.play('rotate') + end}, + WIDGET.newButton{name="faceR", x=480,y=640,w=220,h=80,color='lR',font=35, + code=function() + for i=1,29 do + SETTING.face[i]=0 + end + for i=1,7 do + minoRot0[i]=(int(minoRot0[i]/6.2831853)+(minoRot0[i]%6.2831853>4 and 1 or 0))*6.2831853 + end + SFX.play('hold') + end}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/setting_sound.lua b/parts/scenes/setting_sound.lua index 38c2c61b..0d1c4dfc 100644 --- a/parts/scenes/setting_sound.lua +++ b/parts/scenes/setting_sound.lua @@ -11,93 +11,93 @@ local jump--Animation timer(10 to 0) local cv=SETTING.cv function scene.sceneInit() - last,jump=0,0 - cv=SETTING.cv - WIDGET.active.cv:reset() - BG.set() + last,jump=0,0 + cv=SETTING.cv + WIDGET.active.cv:reset() + BG.set() end function scene.sceneBack() - saveSettings() + saveSettings() end function scene.mouseDown(x,y) - if x>780 and x<980 and y>470 and jump==0 then - jump=10 - local t=TIME()-last - if t>1 then - if t>2.6 and t<3 and not GAME.playing then - loadGame('sprintSmooth',true) - else - VOC.play( - (t<1.5 or t>15)and"doubt"or - rnd()<.8 and"happy"or - "egg" - ) - last=TIME() - end - end - end + if x>780 and x<980 and y>470 and jump==0 then + jump=10 + local t=TIME()-last + if t>1 then + if t>2.6 and t<3 and not GAME.playing then + loadGame('sprintSmooth',true) + else + VOC.play( + (t<1.5 or t>15)and"doubt"or + rnd()<.8 and"happy"or + "egg" + ) + last=TIME() + end + end + end end function scene.touchDown(x,y) - scene.mouseDown(x,y) + scene.mouseDown(x,y) end function scene.update() - if jump>0 then jump=jump-1 end + if jump>0 then jump=jump-1 end end function scene.draw() - gc.setColor(1,1,1) - local t=TIME() - local x,y=800,340+10*sin(t*.5)+(jump-10)*jump*.3 - gc.translate(x,y) - if cv=="miya"then - gc.draw(IMG.miyaCH) - gc.setColor(1,1,1,.7) - gc.draw(IMG.miyaF1,4,47+4*sin(t*.9)) - gc.draw(IMG.miyaF2,42,107+5*sin(t)) - gc.draw(IMG.miyaF3,93,126+3*sin(t*.7)) - gc.draw(IMG.miyaF4,129,98+3*sin(t*.5)) - elseif cv=="naki"then - gc.draw(IMG.nakiCH,-30) - elseif cv=="xiaoya"then - gc.draw(IMG.xiaoyaCH,-30) - end - gc.translate(-x,-y) + gc.setColor(1,1,1) + local t=TIME() + local x,y=800,340+10*sin(t*.5)+(jump-10)*jump*.3 + gc.translate(x,y) + if cv=="miya"then + gc.draw(IMG.miyaCH) + gc.setColor(1,1,1,.7) + gc.draw(IMG.miyaF1,4,47+4*sin(t*.9)) + gc.draw(IMG.miyaF2,42,107+5*sin(t)) + gc.draw(IMG.miyaF3,93,126+3*sin(t*.7)) + gc.draw(IMG.miyaF4,129,98+3*sin(t*.5)) + elseif cv=="naki"then + gc.draw(IMG.nakiCH,-30) + elseif cv=="xiaoya"then + gc.draw(IMG.xiaoyaCH,-30) + end + gc.translate(-x,-y) end scene.widgetList={ - WIDGET.newText{name="title", x=640,y=15,font=80}, + WIDGET.newText{name="title", x=640, y=15,font=80}, - WIDGET.newButton{name="game", x=200, y=80,w=240,h=80,color='lC',font=35,code=swapScene('setting_game','swipeR')}, - WIDGET.newButton{name="graphic",x=1080, y=80,w=240,h=80,color='lC',font=35,code=swapScene('setting_video','swipeL')}, + WIDGET.newButton{name="game", x=200, y=80,w=240,h=80,color='lC',font=35,code=swapScene('setting_game','swipeR')}, + WIDGET.newButton{name="graphic",x=1080,y=80,w=240,h=80,color='lC',font=35,code=swapScene('setting_video','swipeL')}, - WIDGET.newSlider{name="bgm", x=300, y=190,w=420,color='lG',disp=SETval("bgm"),code=function(v)SETTING.bgm=v BGM.freshVolume()end}, - WIDGET.newSlider{name="sfx", x=300, y=260,w=420,color='lC',change=function()SFX.play('blip_1')end,disp=SETval("sfx"),code=SETsto("sfx")}, - WIDGET.newSlider{name="stereo", x=300, y=330,w=420,color='lC',change=function()SFX.play('move',1,-1)SFX.play('lock',1,1)end,disp=SETval("stereo"),code=SETsto("stereo"),hideF=function()return SETTING.sx==0 end}, - WIDGET.newSlider{name="spawn", x=300, y=400,w=420,color='lC',change=function()SFX.fplay('spawn_'..math.random(7),SETTING.sfx_spawn)end,disp=SETval("sfx_spawn"),code=SETsto("sfx_spawn")}, - WIDGET.newSlider{name="warn", x=300, y=470,w=420,color='lC',change=function()SFX.fplay('warning',SETTING.sfx_warn)end,disp=SETval("sfx_warn"),code=SETsto("sfx_warn")}, - WIDGET.newSlider{name="vib", x=300, y=540,w=420,color='lN',unit=10,change=function()VIB(2)end,disp=SETval("vib"),code=SETsto("vib")}, - WIDGET.newSlider{name="voc", x=300, y=610,w=420,color='lN',change=function()VOC.play('test')end,disp=SETval("voc"),code=SETsto("voc")}, + WIDGET.newSlider{name="bgm", x=300, y=190,w=420,color='lG',disp=SETval("bgm"),code=function(v)SETTING.bgm=v BGM.freshVolume()end}, + WIDGET.newSlider{name="sfx", x=300, y=260,w=420,color='lC',change=function()SFX.play('blip_1')end,disp=SETval("sfx"),code=SETsto("sfx")}, + WIDGET.newSlider{name="stereo", x=300, y=330,w=420,color='lC',change=function()SFX.play('move',1,-1)SFX.play('lock',1,1)end,disp=SETval("stereo"),code=SETsto("stereo"),hideF=function()return SETTING.sx==0 end}, + WIDGET.newSlider{name="spawn", x=300, y=400,w=420,color='lC',change=function()SFX.fplay('spawn_'..math.random(7),SETTING.sfx_spawn)end,disp=SETval("sfx_spawn"),code=SETsto("sfx_spawn")}, + WIDGET.newSlider{name="warn", x=300, y=470,w=420,color='lC',change=function()SFX.fplay('warning',SETTING.sfx_warn)end,disp=SETval("sfx_warn"),code=SETsto("sfx_warn")}, + WIDGET.newSlider{name="vib", x=300, y=540,w=420,color='lN',unit=10,change=function()VIB(2)end,disp=SETval("vib"),code=SETsto("vib")}, + WIDGET.newSlider{name="voc", x=300, y=610,w=420,color='lN',change=function()VOC.play('test')end,disp=SETval("voc"),code=SETsto("voc")}, - WIDGET.newKey{name="mute", x=1160, y=180,w=80,color='lR',fText=TEXTURE.mute, - code=function() - if SETTING.sfx+SETTING.sfx_spawn+SETTING.sfx_warn+SETTING.bgm+SETTING.vib+SETTING.voc==0 then - if not soundBeforeMute then soundBeforeMute={1,0,.4,.7,0,0}end - SETTING.sfx,SETTING.sfx_spawn,SETTING.sfx_warn,SETTING.bgm,SETTING.vib,SETTING.voc=unpack(soundBeforeMute) - soundBeforeMute=false - else - soundBeforeMute={ - SETTING.sfx,SETTING.sfx_spawn,SETTING.sfx_warn,SETTING.bgm,SETTING.vib,SETTING.voc} - SETTING.sfx,SETTING.sfx_spawn,SETTING.sfx_warn,SETTING.bgm,SETTING.vib,SETTING.voc=0,0,0,0,0,0 - end - BGM.freshVolume() - end}, - WIDGET.newSwitch{name="fine", x=1150, y=270,disp=SETval("fine"),code=function()SETTING.fine=not SETTING.fine if SETTING.fine then SFX.play('finesseError',.6)end end}, + WIDGET.newKey{name="mute", x=1160,y=180,w=80,color='lR',fText=TEXTURE.mute, + code=function() + if SETTING.sfx+SETTING.sfx_spawn+SETTING.sfx_warn+SETTING.bgm+SETTING.vib+SETTING.voc==0 then + if not soundBeforeMute then soundBeforeMute={1,0,.4,.7,0,0}end + SETTING.sfx,SETTING.sfx_spawn,SETTING.sfx_warn,SETTING.bgm,SETTING.vib,SETTING.voc=unpack(soundBeforeMute) + soundBeforeMute=false + else + soundBeforeMute={ + SETTING.sfx,SETTING.sfx_spawn,SETTING.sfx_warn,SETTING.bgm,SETTING.vib,SETTING.voc} + SETTING.sfx,SETTING.sfx_spawn,SETTING.sfx_warn,SETTING.bgm,SETTING.vib,SETTING.voc=0,0,0,0,0,0 + end + BGM.freshVolume() + end}, + WIDGET.newSwitch{name="fine", x=1150,y=270,disp=SETval("fine"),code=function()SETTING.fine=not SETTING.fine if SETTING.fine then SFX.play('finesseError',.6)end end}, - WIDGET.newSelector{name="cv", x=1100, y=380,w=200,list={'miya','naki','xiaoya'},disp=function()return cv end,code=function(i)cv=i end}, - WIDGET.newButton{name="apply", x=1100, y=460,w=180,h=80,code=function()SETTING.cv=cv VOC.loadAll()end,hideF=function()return SETTING.cv==cv end}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newSelector{name="cv", x=1100,y=380,w=200,list={'miya','naki','xiaoya'},disp=function()return cv end,code=function(i)cv=i end}, + WIDGET.newButton{name="apply", x=1100,y=460,w=180,h=80,code=function()SETTING.cv=cv VOC.loadAll()end,hideF=function()return SETTING.cv==cv end}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/setting_touch.lua b/parts/scenes/setting_touch.lua index 7beeca11..95ea8b77 100644 --- a/parts/scenes/setting_touch.lua +++ b/parts/scenes/setting_touch.lua @@ -9,128 +9,128 @@ local snapUnit=1 local selected--Button selected local function _save1() - FILE.save(VK_org,'conf/vkSave1') + FILE.save(VK_org,'conf/vkSave1') end local function _load1() - local D=FILE.load('conf/vkSave1') - if D then - TABLE.update(D,VK_org) - else - MES.new('error',text.noFile) - end + local D=FILE.load('conf/vkSave1') + if D then + TABLE.update(D,VK_org) + else + MES.new('error',text.noFile) + end end local function _save2() - FILE.save(VK_org,'conf/vkSave2') + FILE.save(VK_org,'conf/vkSave2') end local function _load2() - local D=FILE.load('conf/vkSave2') - if D then - TABLE.update(D,VK_org) - else - MES.new('error',text.noFile) - end + local D=FILE.load('conf/vkSave2') + if D then + TABLE.update(D,VK_org) + else + MES.new('error',text.noFile) + end end function scene.sceneInit() - BG.set('rainbow') - defaultSetSelect=1 - selected=false + BG.set('rainbow') + defaultSetSelect=1 + selected=false end function scene.sceneBack() - FILE.save(VK_org,'conf/virtualkey') + FILE.save(VK_org,'conf/virtualkey') end local function _onVK_org(x,y) - local dist,nearest=1e10 - for K=1,#VK_org do - local B=VK_org[K] - if B.ava then - local d1=(x-B.x)^2+(y-B.y)^2 - if d1=10 then - gc.setLineWidth(3) - gc.setColor(1,1,1,sin(TIME()*4)*.1+.1) - for i=x1,x2+snapUnit,snapUnit do - local x=i-i%snapUnit - gc.line(x,y1,x,y2) - end - for i=y1,y2+snapUnit,snapUnit do - local y=i-i%snapUnit - gc.line(x1,y,x2,y) - end - end + gc.setColor(COLOR.Z) + gc.setLineWidth(3) + gc.rectangle('line',490,65,300,610) + VK.preview(selected) + local x1,y1=SCR.xOy:inverseTransformPoint(0,0) + local x2,y2=SCR.xOy:inverseTransformPoint(SCR.w,SCR.h) + if snapUnit>=10 then + gc.setLineWidth(3) + gc.setColor(1,1,1,sin(TIME()*4)*.1+.1) + for i=x1,x2+snapUnit,snapUnit do + local x=i-i%snapUnit + gc.line(x,y1,x,y2) + end + for i=y1,y2+snapUnit,snapUnit do + local y=i-i%snapUnit + gc.line(x1,y,x2,y) + end + end end scene.widgetList={ - WIDGET.newButton{name="default",x=530,y=90,w=200,h=80,font=35, - code=function() - VK.changeSet(defaultSetSelect) - MES.new('check',"==[ "..defaultSetSelect.." ]==") - defaultSetSelect=defaultSetSelect%5+1 - selected=false - end}, - WIDGET.newSelector{name="snap", x=750,y=90,w=200,h=80,color='Y',list={1,10,20,40,60,80},disp=function()return snapUnit end,code=function(i)snapUnit=i end}, - WIDGET.newButton{name="option", x=530,y=190,w=200,h=80,fText=TEXTURE.more,code=function()SCN.go('setting_touchSwitch')end}, - WIDGET.newButton{name="back", x=750,y=190,w=200,h=80,fText=TEXTURE.back,code=backScene}, - WIDGET.newKey{name="save1", x=475,y=290,w=90,h=70,code=_save1}, - WIDGET.newKey{name="load1", x=585,y=290,w=90,h=70,code=_load1}, - WIDGET.newKey{name="save2", x=695,y=290,w=90,h=70,code=_save2}, - WIDGET.newKey{name="load2", x=805,y=290,w=90,h=70,code=_load2}, - WIDGET.newSlider{name="size", x=440,y=370,w=460,unit=19,font=40,show="vkSize", - disp=function() - return VK_org[selected].r/10-1 - end, - code=function(v) - if selected then - VK_org[selected].r=(v+1)*10 - end - end, - hideF=function() - return not selected - end}, - WIDGET.newKey{name="shape",x=640,y=600,w=200,h=80,code=function()SETTING.VKSkin=VK.nextShape()end}, + WIDGET.newButton{name="default",x=530,y=90,w=200,h=80,font=35, + code=function() + VK.changeSet(defaultSetSelect) + MES.new('check',"==[ "..defaultSetSelect.." ]==") + defaultSetSelect=defaultSetSelect%5+1 + selected=false + end}, + WIDGET.newSelector{name="snap", x=750,y=90,w=200,h=80,color='Y',list={1,10,20,40,60,80},disp=function()return snapUnit end,code=function(i)snapUnit=i end}, + WIDGET.newButton{name="option", x=530,y=190,w=200,h=80,fText=TEXTURE.more,code=function()SCN.go('setting_touchSwitch')end}, + WIDGET.newButton{name="back", x=750,y=190,w=200,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newKey{name="save1", x=475,y=290,w=90,h=70,code=_save1}, + WIDGET.newKey{name="load1", x=585,y=290,w=90,h=70,code=_load1}, + WIDGET.newKey{name="save2", x=695,y=290,w=90,h=70,code=_save2}, + WIDGET.newKey{name="load2", x=805,y=290,w=90,h=70,code=_load2}, + WIDGET.newSlider{name="size", x=440,y=370,w=460,unit=19,font=40,show="vkSize", + disp=function() + return VK_org[selected].r/10-1 + end, + code=function(v) + if selected then + VK_org[selected].r=(v+1)*10 + end + end, + hideF=function() + return not selected + end}, + WIDGET.newKey{name="shape", x=640,y=600,w=200,h=80,code=function()SETTING.VKSkin=VK.nextShape()end}, } return scene \ No newline at end of file diff --git a/parts/scenes/setting_touchSwitch.lua b/parts/scenes/setting_touchSwitch.lua index 49a38b76..3b817237 100644 --- a/parts/scenes/setting_touchSwitch.lua +++ b/parts/scenes/setting_touchSwitch.lua @@ -1,17 +1,17 @@ local scene={} function scene.sceneInit() - BG.set('matrix') + BG.set('matrix') end function scene.draw() - if SETTING.VKSwitch and SETTING.VKTrack then - love.graphics.setColor(1,1,1) - setFont(30) - mStr(text.VKTchW,140+500*SETTING.VKTchW,800-WIDGET.scrollPos) - mStr(text.VKOrgW,140+500*SETTING.VKTchW+500*SETTING.VKCurW,870-WIDGET.scrollPos) - mStr(text.VKCurW,640+500*SETTING.VKCurW,950-WIDGET.scrollPos) - end + if SETTING.VKSwitch and SETTING.VKTrack then + love.graphics.setColor(1,1,1) + setFont(30) + mStr(text.VKTchW,140+500*SETTING.VKTchW,800-WIDGET.scrollPos) + mStr(text.VKOrgW,140+500*SETTING.VKTchW+500*SETTING.VKCurW,870-WIDGET.scrollPos) + mStr(text.VKCurW,640+500*SETTING.VKCurW,950-WIDGET.scrollPos) + end end local function _VKAdisp(n)return function()return VK_org[n].ava end end @@ -21,41 +21,41 @@ local function _notTrack()return not(SETTING.VKSwitch and SETTING.VKTrack)end scene.widgetScrollHeight=340 scene.widgetList={ - WIDGET.newSwitch{name="b1", x=280, y=80, disp=_VKAdisp(1),code=_VKAcode(1)}, - WIDGET.newSwitch{name="b2", x=280, y=140, disp=_VKAdisp(2),code=_VKAcode(2)}, - WIDGET.newSwitch{name="b3", x=280, y=200, disp=_VKAdisp(3),code=_VKAcode(3)}, - WIDGET.newSwitch{name="b4", x=280, y=260, disp=_VKAdisp(4),code=_VKAcode(4)}, - WIDGET.newSwitch{name="b5", x=280, y=320, disp=_VKAdisp(5),code=_VKAcode(5)}, - WIDGET.newSwitch{name="b6", x=280, y=380, disp=_VKAdisp(6),code=_VKAcode(6)}, - WIDGET.newSwitch{name="b7", x=280, y=440, disp=_VKAdisp(7),code=_VKAcode(7)}, - WIDGET.newSwitch{name="b8", x=280, y=500, disp=_VKAdisp(8),code=_VKAcode(8)}, - WIDGET.newSwitch{name="b9", x=280, y=560, disp=_VKAdisp(9),code=_VKAcode(9)}, - WIDGET.newSwitch{name="b10", x=280, y=620, disp=_VKAdisp(10),code=_VKAcode(10)}, - WIDGET.newSwitch{name="b11", x=580, y=80, disp=_VKAdisp(11),code=_VKAcode(11)}, - WIDGET.newSwitch{name="b12", x=580, y=140, disp=_VKAdisp(12),code=_VKAcode(12)}, - WIDGET.newSwitch{name="b13", x=580, y=200, disp=_VKAdisp(13),code=_VKAcode(13)}, - WIDGET.newSwitch{name="b14", x=580, y=260, disp=_VKAdisp(14),code=_VKAcode(14)}, - WIDGET.newSwitch{name="b15", x=580, y=320, disp=_VKAdisp(15),code=_VKAcode(15)}, - WIDGET.newSwitch{name="b16", x=580, y=380, disp=_VKAdisp(16),code=_VKAcode(16)}, - WIDGET.newSwitch{name="b17", x=580, y=440, disp=_VKAdisp(17),code=_VKAcode(17)}, - WIDGET.newSwitch{name="b18", x=580, y=500, disp=_VKAdisp(18),code=_VKAcode(18)}, - WIDGET.newSwitch{name="b19", x=580, y=560, disp=_VKAdisp(19),code=_VKAcode(19)}, - WIDGET.newSwitch{name="b20", x=580, y=620, disp=_VKAdisp(20),code=_VKAcode(20)}, + WIDGET.newSwitch{name="b1", x=280, y=80, disp=_VKAdisp(1),code=_VKAcode(1)}, + WIDGET.newSwitch{name="b2", x=280, y=140, disp=_VKAdisp(2),code=_VKAcode(2)}, + WIDGET.newSwitch{name="b3", x=280, y=200, disp=_VKAdisp(3),code=_VKAcode(3)}, + WIDGET.newSwitch{name="b4", x=280, y=260, disp=_VKAdisp(4),code=_VKAcode(4)}, + WIDGET.newSwitch{name="b5", x=280, y=320, disp=_VKAdisp(5),code=_VKAcode(5)}, + WIDGET.newSwitch{name="b6", x=280, y=380, disp=_VKAdisp(6),code=_VKAcode(6)}, + WIDGET.newSwitch{name="b7", x=280, y=440, disp=_VKAdisp(7),code=_VKAcode(7)}, + WIDGET.newSwitch{name="b8", x=280, y=500, disp=_VKAdisp(8),code=_VKAcode(8)}, + WIDGET.newSwitch{name="b9", x=280, y=560, disp=_VKAdisp(9),code=_VKAcode(9)}, + WIDGET.newSwitch{name="b10", x=280, y=620, disp=_VKAdisp(10),code=_VKAcode(10)}, + WIDGET.newSwitch{name="b11", x=580, y=80, disp=_VKAdisp(11),code=_VKAcode(11)}, + WIDGET.newSwitch{name="b12", x=580, y=140, disp=_VKAdisp(12),code=_VKAcode(12)}, + WIDGET.newSwitch{name="b13", x=580, y=200, disp=_VKAdisp(13),code=_VKAcode(13)}, + WIDGET.newSwitch{name="b14", x=580, y=260, disp=_VKAdisp(14),code=_VKAcode(14)}, + WIDGET.newSwitch{name="b15", x=580, y=320, disp=_VKAdisp(15),code=_VKAcode(15)}, + WIDGET.newSwitch{name="b16", x=580, y=380, disp=_VKAdisp(16),code=_VKAcode(16)}, + WIDGET.newSwitch{name="b17", x=580, y=440, disp=_VKAdisp(17),code=_VKAcode(17)}, + WIDGET.newSwitch{name="b18", x=580, y=500, disp=_VKAdisp(18),code=_VKAcode(18)}, + WIDGET.newSwitch{name="b19", x=580, y=560, disp=_VKAdisp(19),code=_VKAcode(19)}, + WIDGET.newSwitch{name="b20", x=580, y=620, disp=_VKAdisp(20),code=_VKAcode(20)}, - WIDGET.newButton{name="norm", x=840, y=80, w=240,h=80, font=35,code=function()for i=1,20 do VK_org[i].ava=i<11 end end}, - WIDGET.newButton{name="pro", x=1120, y=80, w=240,h=80, font=35,code=function()for i=1,20 do VK_org[i].ava=true end end}, - WIDGET.newSwitch{name="hide", x=1150, y=200, font=40,disp=SETval("VKSwitch"),code=SETrev("VKSwitch")}, - WIDGET.newSwitch{name="icon", x=1150, y=300, font=40,disp=SETval("VKIcon"),code=SETrev("VKIcon"),hideF=_notShow}, - WIDGET.newSlider{name="sfx", x=830, y=380, w=400, font=35,change=function()SFX.play('virtualKey',SETTING.VKSFX)end,disp=SETval("VKSFX"),code=SETsto("VKSFX"),hideF=_notShow}, - WIDGET.newSlider{name="vib", x=830, y=450, w=400,unit=6,font=35,change=function()VIB(SETTING.VKVIB)end,disp=SETval("VKVIB"),code=SETsto("VKVIB"),hideF=_notShow}, - WIDGET.newSlider{name="alpha", x=830, y=520, w=400, font=40,disp=SETval("VKAlpha"),code=SETsto("VKAlpha"),hideF=_notShow}, + WIDGET.newButton{name="norm", x=840, y=80, w=240,h=80, font=35,code=function()for i=1,20 do VK_org[i].ava=i<11 end end}, + WIDGET.newButton{name="pro", x=1120, y=80, w=240,h=80, font=35,code=function()for i=1,20 do VK_org[i].ava=true end end}, + WIDGET.newSwitch{name="hide", x=1150, y=200, font=40,disp=SETval("VKSwitch"),code=SETrev("VKSwitch")}, + WIDGET.newSwitch{name="icon", x=1150, y=300, font=40,disp=SETval("VKIcon"),code=SETrev("VKIcon"),hideF=_notShow}, + WIDGET.newSlider{name="sfx", x=830, y=380, w=400, font=35,change=function()SFX.play('virtualKey',SETTING.VKSFX)end,disp=SETval("VKSFX"),code=SETsto("VKSFX"),hideF=_notShow}, + WIDGET.newSlider{name="vib", x=830, y=450, w=400,unit=6, font=35,change=function()VIB(SETTING.VKVIB)end,disp=SETval("VKVIB"),code=SETsto("VKVIB"),hideF=_notShow}, + WIDGET.newSlider{name="alpha", x=830, y=520, w=400, font=40,disp=SETval("VKAlpha"),code=SETsto("VKAlpha"),hideF=_notShow}, - WIDGET.newSwitch{name="track", x=360, y=720, font=35,disp=SETval("VKTrack"),code=SETrev("VKTrack"),hideF=_notShow}, - WIDGET.newSwitch{name="dodge", x=800, y=720, font=35,disp=SETval("VKDodge"),code=SETrev("VKDodge"),hideF=_notTrack}, - WIDGET.newSlider{name="tchW", x=140, y=860, w=1000, font=35,disp=SETval("VKTchW"),code=function(i)SETTING.VKTchW=i SETTING.VKCurW=math.max(SETTING.VKCurW,i)end,hideF=_notTrack}, - WIDGET.newSlider{name="curW", x=140, y=930, w=1000, font=35,disp=SETval("VKCurW"),code=function(i)SETTING.VKCurW=i SETTING.VKTchW=math.min(SETTING.VKTchW,i)end,hideF=_notTrack}, + WIDGET.newSwitch{name="track", x=360, y=720, font=35,disp=SETval("VKTrack"),code=SETrev("VKTrack"),hideF=_notShow}, + WIDGET.newSwitch{name="dodge", x=800, y=720, font=35,disp=SETval("VKDodge"),code=SETrev("VKDodge"),hideF=_notTrack}, + WIDGET.newSlider{name="tchW", x=140, y=860, w=1000, font=35,disp=SETval("VKTchW"),code=function(i)SETTING.VKTchW=i SETTING.VKCurW=math.max(SETTING.VKCurW,i)end,hideF=_notTrack}, + WIDGET.newSlider{name="curW", x=140, y=930, w=1000, font=35,disp=SETval("VKCurW"),code=function(i)SETTING.VKCurW=i SETTING.VKTchW=math.min(SETTING.VKTchW,i)end,hideF=_notTrack}, - WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/setting_video.lua b/parts/scenes/setting_video.lua index 56a48fe7..90cd8ac3 100644 --- a/parts/scenes/setting_video.lua +++ b/parts/scenes/setting_video.lua @@ -3,92 +3,92 @@ local gc=love.graphics local scene={} function scene.sceneBack() - saveSettings() + saveSettings() end local fakeBlock={{true}} function scene.draw() - local skinLib=SKIN.lib[SETTING.skinSet] - gc.push('transform') - gc.translate(720,149-WIDGET.scrollPos) - gc.scale(2) - gc.setColor(1,1,1) - PLY.draw.drawGhost[SETTING.ghostType](fakeBlock,0,0,SETTING.ghost,skinLib,math.floor(TIME()*3)%16+1) - gc.pop() + local skinLib=SKIN.lib[SETTING.skinSet] + gc.push('transform') + gc.translate(720,149-WIDGET.scrollPos) + gc.scale(2) + gc.setColor(1,1,1) + PLY.draw.drawGhost[SETTING.ghostType](fakeBlock,0,0,SETTING.ghost,skinLib,math.floor(TIME()*3)%16+1) + gc.pop() - gc.push('transform') - gc.setColor(1,1,1) - local T=skinLib[1] - gc.translate(0,1410-WIDGET.scrollPos) - gc.setShader(SHADER.blockSatur) - gc.draw(T,435,0)gc.draw(T,465,0)gc.draw(T,465,30)gc.draw(T,495,30) - gc.setShader(SHADER.fieldSatur) - for i=1,8 do - gc.draw(skinLib[i],330+30*i,100) - gc.draw(skinLib[i+8],330+30*i,130) - end - gc.setShader() - gc.pop() + gc.push('transform') + gc.setColor(1,1,1) + local T=skinLib[1] + gc.translate(0,1410-WIDGET.scrollPos) + gc.setShader(SHADER.blockSatur) + gc.draw(T,435,0)gc.draw(T,465,0)gc.draw(T,465,30)gc.draw(T,495,30) + gc.setShader(SHADER.fieldSatur) + for i=1,8 do + gc.draw(skinLib[i],330+30*i,100) + gc.draw(skinLib[i+8],330+30*i,130) + end + gc.setShader() + gc.pop() end scene.widgetScrollHeight=900 scene.widgetList={ - WIDGET.newText{name="title", x=640,y=15,font=80}, + WIDGET.newText{name="title", x=640,y=15,font=80}, - WIDGET.newButton{name="sound", x=200,y=80,w=240,h=80,color='lC',font=35,code=swapScene('setting_sound','swipeR')}, - WIDGET.newButton{name="game", x=1080,y=80,w=240,h=80,color='lC',font=35,code=swapScene('setting_game','swipeL')}, + WIDGET.newButton{name="sound", x=200,y=80,w=240,h=80,color='lC',font=35,code=swapScene('setting_sound','swipeR')}, + WIDGET.newButton{name="game", x=1080,y=80,w=240,h=80,color='lC',font=35,code=swapScene('setting_game','swipeL')}, - WIDGET.newSwitch{name="block", x=380,y=180,disp=SETval("block"),code=SETrev("block")}, - WIDGET.newSwitch{name="smooth", x=380,y=250,disp=SETval("smooth"),code=SETrev("smooth")}, - WIDGET.newSwitch{name="upEdge", x=380,y=320,disp=SETval("upEdge"),code=SETrev("upEdge")}, - WIDGET.newSwitch{name="bagLine", x=380,y=390,disp=SETval("bagLine"),code=SETrev("bagLine")}, + WIDGET.newSwitch{name="block", x=380,y=180,disp=SETval("block"),code=SETrev("block")}, + WIDGET.newSwitch{name="smooth", x=380,y=250,disp=SETval("smooth"),code=SETrev("smooth")}, + WIDGET.newSwitch{name="upEdge", x=380,y=320,disp=SETval("upEdge"),code=SETrev("upEdge")}, + WIDGET.newSwitch{name="bagLine", x=380,y=390,disp=SETval("bagLine"),code=SETrev("bagLine")}, - WIDGET.newSelector{name="ghostType",x=915,y=180,w=350,list={'color','gray','colorCell','grayCell','colorLine','grayLine'},disp=SETval("ghostType"),code=SETsto("ghostType")}, - WIDGET.newSlider{name="ghost", x=740,y=240,w=350,unit=1,disp=SETval("ghost"), show="percent",code=SETsto("ghost")}, - WIDGET.newSlider{name="center", x=740,y=300,w=350,unit=1,disp=SETval("center"), show="percent",code=SETsto("center")}, - WIDGET.newSlider{name="grid", x=740,y=360,w=350,unit=.4,disp=SETval("grid"), show="percent",code=SETsto("grid")}, - WIDGET.newSlider{name="lineNum", x=740,y=420,w=350,unit=1,disp=SETval("lineNum"), show="percent",code=SETsto("lineNum")}, + WIDGET.newSelector{name="ghostType", x=915,y=180,w=350,list={'color','gray','colorCell','grayCell','colorLine','grayLine'},disp=SETval("ghostType"),code=SETsto("ghostType")}, + WIDGET.newSlider{name="ghost", x=740,y=240,w=350,unit=1,disp=SETval("ghost"), show="percent",code=SETsto("ghost")}, + WIDGET.newSlider{name="center", x=740,y=300,w=350,unit=1,disp=SETval("center"), show="percent",code=SETsto("center")}, + WIDGET.newSlider{name="grid", x=740,y=360,w=350,unit=.4,disp=SETval("grid"), show="percent",code=SETsto("grid")}, + WIDGET.newSlider{name="lineNum", x=740,y=420,w=350,unit=1,disp=SETval("lineNum"), show="percent",code=SETsto("lineNum")}, - WIDGET.newSlider{name="lockFX", x=330,y=460,w=540,unit=5,disp=SETval("lockFX"), code=SETsto("lockFX")}, - WIDGET.newSlider{name="dropFX", x=330,y=520,w=540,unit=5,disp=SETval("dropFX"), code=SETsto("dropFX")}, - WIDGET.newSlider{name="moveFX", x=330,y=580,w=540,unit=5,disp=SETval("moveFX"), code=SETsto("moveFX")}, - WIDGET.newSlider{name="clearFX", x=330,y=640,w=540,unit=5,disp=SETval("clearFX"),code=SETsto("clearFX")}, - WIDGET.newSlider{name="splashFX", x=330,y=700,w=540,unit=5,disp=SETval("splashFX"),code=SETsto("splashFX")}, - WIDGET.newSlider{name="shakeFX", x=330,y=760,w=540,unit=5,disp=SETval("shakeFX"),code=SETsto("shakeFX")}, - WIDGET.newSlider{name="atkFX", x=330,y=820,w=540,unit=5,disp=SETval("atkFX"), code=SETsto("atkFX")}, - WIDGET.newSelector{name="frame", x=600,y=890,w=460,list={8,10,13,17,22,29,37,47,62,80,100},disp=SETval("frameMul"),code=SETsto("frameMul")}, + WIDGET.newSlider{name="lockFX", x=330,y=460,w=540,unit=5,disp=SETval("lockFX"), code=SETsto("lockFX")}, + WIDGET.newSlider{name="dropFX", x=330,y=520,w=540,unit=5,disp=SETval("dropFX"), code=SETsto("dropFX")}, + WIDGET.newSlider{name="moveFX", x=330,y=580,w=540,unit=5,disp=SETval("moveFX"), code=SETsto("moveFX")}, + WIDGET.newSlider{name="clearFX", x=330,y=640,w=540,unit=5,disp=SETval("clearFX"), code=SETsto("clearFX")}, + WIDGET.newSlider{name="splashFX", x=330,y=700,w=540,unit=5,disp=SETval("splashFX"), code=SETsto("splashFX")}, + WIDGET.newSlider{name="shakeFX", x=330,y=760,w=540,unit=5,disp=SETval("shakeFX"), code=SETsto("shakeFX")}, + WIDGET.newSlider{name="atkFX", x=330,y=820,w=540,unit=5,disp=SETval("atkFX"), code=SETsto("atkFX")}, + WIDGET.newSelector{name="frame", x=600,y=890,w=460,list={8,10,13,17,22,29,37,47,62,80,100},disp=SETval("frameMul"),code=SETsto("frameMul")}, - WIDGET.newSwitch{name="text", x=450,y=980,disp=SETval("text"), code=SETrev("text")}, - WIDGET.newSwitch{name="score", x=450,y=1030,disp=SETval("score"), code=SETrev("score")}, - WIDGET.newSwitch{name="bufferWarn", x=450,y=1100,disp=SETval("bufferWarn"), code=SETrev("bufferWarn")}, - WIDGET.newSwitch{name="showSpike", x=450,y=1150,disp=SETval("showSpike"), code=SETrev("showSpike")}, - WIDGET.newSwitch{name="nextPos", x=450,y=1220,disp=SETval("nextPos"), code=SETrev("nextPos")}, - WIDGET.newSwitch{name="highCam", x=450,y=1270,disp=SETval("highCam"), code=SETrev("highCam")}, - WIDGET.newSwitch{name="warn", x=450,y=1340,disp=SETval("warn"), code=SETrev("warn")}, + WIDGET.newSwitch{name="text", x=450,y=980,disp=SETval("text"), code=SETrev("text")}, + WIDGET.newSwitch{name="score", x=450,y=1030,disp=SETval("score"), code=SETrev("score")}, + WIDGET.newSwitch{name="bufferWarn", x=450,y=1100,disp=SETval("bufferWarn"), code=SETrev("bufferWarn")}, + WIDGET.newSwitch{name="showSpike", x=450,y=1150,disp=SETval("showSpike"), code=SETrev("showSpike")}, + WIDGET.newSwitch{name="nextPos", x=450,y=1220,disp=SETval("nextPos"), code=SETrev("nextPos")}, + WIDGET.newSwitch{name="highCam", x=450,y=1270,disp=SETval("highCam"), code=SETrev("highCam")}, + WIDGET.newSwitch{name="warn", x=450,y=1340,disp=SETval("warn"), code=SETrev("warn")}, - WIDGET.newSwitch{name="clickFX", x=950,y=980,disp=SETval("clickFX"), code=SETrev("clickFX")}, - WIDGET.newSwitch{name="power", x=950,y=1070,disp=SETval("powerInfo"), code=SETrev("powerInfo")}, - WIDGET.newSwitch{name="clean", x=950,y=1160,disp=SETval("cleanCanvas"),code=SETrev("cleanCanvas")}, - WIDGET.newSwitch{name="fullscreen", x=950,y=1250,disp=SETval("fullscreen"), code=switchFullscreen}, - WIDGET.newSwitch{name="bg", x=950,y=1340,disp=SETval("bg"), - code=function() - BG.set('none') - SETTING.bg=not SETTING.bg - BG.set() - end}, + WIDGET.newSwitch{name="clickFX", x=950,y=980,disp=SETval("clickFX"), code=SETrev("clickFX")}, + WIDGET.newSwitch{name="power", x=950,y=1070,disp=SETval("powerInfo"), code=SETrev("powerInfo")}, + WIDGET.newSwitch{name="clean", x=950,y=1160,disp=SETval("cleanCanvas"), code=SETrev("cleanCanvas")}, + WIDGET.newSwitch{name="fullscreen", x=950,y=1250,disp=SETval("fullscreen"), code=switchFullscreen}, + WIDGET.newSwitch{name="bg", x=950,y=1340,disp=SETval("bg"), + code=function() + BG.set('none') + SETTING.bg=not SETTING.bg + BG.set() + end}, - WIDGET.newSelector{name="blockSatur",x=800,y=1440,w=300,color='lN', - list={'normal','soft','gray','light','color'}, - disp=SETval("blockSatur"), - code=function(v)SETTING.blockSatur=v;applyBlockSatur(SETTING.blockSatur)end - }, - WIDGET.newSelector{name="fieldSatur",x=800,y=1540,w=300,color='lN', - list={'normal','soft','gray','light','color'}, - disp=SETval("fieldSatur"), - code=function(v)SETTING.fieldSatur=v;applyFieldSatur(SETTING.fieldSatur)end - }, + WIDGET.newSelector{name="blockSatur", x=800,y=1440,w=300,color='lN', + list={'normal','soft','gray','light','color'}, + disp=SETval("blockSatur"), + code=function(v)SETTING.blockSatur=v;applyBlockSatur(SETTING.blockSatur)end + }, + WIDGET.newSelector{name="fieldSatur", x=800,y=1540,w=300,color='lN', + list={'normal','soft','gray','light','color'}, + disp=SETval("fieldSatur"), + code=function(v)SETTING.fieldSatur=v;applyFieldSatur(SETTING.fieldSatur)end + }, - WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/sound.lua b/parts/scenes/sound.lua index 537420fa..771d30a0 100644 --- a/parts/scenes/sound.lua +++ b/parts/scenes/sound.lua @@ -3,110 +3,110 @@ local scene={} local mini,b2b,b3b,pc function scene.sceneInit() - mini,b2b,b3b,pc=false,false,false,false + mini,b2b,b3b,pc=false,false,false,false end local blockName={'z','s','j','l','t','o','i'} local lineCount={'single','double','triple','techrash'} function scene.keyDown(key,isRep) - if isRep then return end - if key=="1"then - mini=not mini - elseif key=="2"then - b2b=not b2b - if b2b then b3b=false end - elseif key=="3"then - b3b=not b3b - if b3b then b2b=false end - elseif key=="4"then - pc=not pc - elseif type(key)=='number'then - local CHN=VOC.getFreeChannel() - if mini then VOC.play('mini',CHN)end - if b2b then VOC.play('b2b',CHN) - elseif b3b then VOC.play('b3b',CHN) - end - if key>=10 then - VOC.play(blockName[math.floor(key/10)].."spin",CHN) - end - if lineCount[key%10]then VOC.play(lineCount[key%10],CHN)end - if pc then VOC.play('perfect_clear',CHN)end - elseif key=="tab"then - SCN.swapTo('music','none') - elseif key=="escape"then - SCN.back() - end + if isRep then return end + if key=="1"then + mini=not mini + elseif key=="2"then + b2b=not b2b + if b2b then b3b=false end + elseif key=="3"then + b3b=not b3b + if b3b then b2b=false end + elseif key=="4"then + pc=not pc + elseif type(key)=='number'then + local CHN=VOC.getFreeChannel() + if mini then VOC.play('mini',CHN)end + if b2b then VOC.play('b2b',CHN) + elseif b3b then VOC.play('b3b',CHN) + end + if key>=10 then + VOC.play(blockName[math.floor(key/10)].."spin",CHN) + end + if lineCount[key%10]then VOC.play(lineCount[key%10],CHN)end + if pc then VOC.play('perfect_clear',CHN)end + elseif key=="tab"then + SCN.swapTo('music','none') + elseif key=="escape"then + SCN.back() + end end scene.widgetList={ - WIDGET.newText{name="title", x=30, y=15,font=70,align='L'}, - WIDGET.newSlider{name="sfx", x=510, y=60,w=330,font=35,change=function()SFX.play('blip_1')end,disp=SETval("sfx"),sound=false,code=SETsto("sfx")}, - WIDGET.newSlider{name="voc", x=510, y=120,w=330,font=35,change=function()VOC.play('test')end,disp=SETval("voc"),sound=false,code=SETsto("voc")}, + WIDGET.newText{name="title", x=30, y=15,font=70,align='L'}, + WIDGET.newSlider{name="sfx", x=510, y=60,w=330,font=35,change=function()SFX.play('blip_1')end,disp=SETval("sfx"),sound=false,code=SETsto("sfx")}, + WIDGET.newSlider{name="voc", x=510, y=120,w=330,font=35,change=function()VOC.play('test')end,disp=SETval("voc"),sound=false,code=SETsto("voc")}, - WIDGET.newKey{name="move", x=110, y=140,w=160,h=50,font=20,sound=false,code=function()SFX.play('move')end}, - WIDGET.newKey{name="lock", x=110, y=205,w=160,h=50,font=20,sound=false,code=function()SFX.play('lock')end}, - WIDGET.newKey{name="drop", x=110, y=270,w=160,h=50,font=20,sound=false,code=function()SFX.play('drop')end}, - WIDGET.newKey{name="fall", x=110, y=335,w=160,h=50,font=20,sound=false,code=function()SFX.play('fall')end}, - WIDGET.newKey{name="rotate", x=110, y=400,w=160,h=50,font=20,sound=false,code=function()SFX.play('rotate')end}, - WIDGET.newKey{name="rotatekick",x=110, y=465,w=160,h=50,font=20,sound=false,code=function()SFX.play('rotatekick')end}, - WIDGET.newKey{name="hold", x=110, y=530,w=160,h=50,font=20,sound=false,code=function()SFX.play('hold')end}, - WIDGET.newKey{name="prerotate",x=110, y=595,w=160,h=50,font=20,sound=false,code=function()SFX.play('prerotate')end}, - WIDGET.newKey{name="prehold", x=110, y=660,w=160,h=50,font=20,sound=false,code=function()SFX.play('prehold')end}, + WIDGET.newKey{name="move", x=110, y=140,w=160,h=50,font=20,sound=false,code=function()SFX.play('move')end}, + WIDGET.newKey{name="lock", x=110, y=205,w=160,h=50,font=20,sound=false,code=function()SFX.play('lock')end}, + WIDGET.newKey{name="drop", x=110, y=270,w=160,h=50,font=20,sound=false,code=function()SFX.play('drop')end}, + WIDGET.newKey{name="fall", x=110, y=335,w=160,h=50,font=20,sound=false,code=function()SFX.play('fall')end}, + WIDGET.newKey{name="rotate", x=110, y=400,w=160,h=50,font=20,sound=false,code=function()SFX.play('rotate')end}, + WIDGET.newKey{name="rotatekick",x=110, y=465,w=160,h=50,font=20,sound=false,code=function()SFX.play('rotatekick')end}, + WIDGET.newKey{name="hold", x=110, y=530,w=160,h=50,font=20,sound=false,code=function()SFX.play('hold')end}, + WIDGET.newKey{name="prerotate", x=110, y=595,w=160,h=50,font=20,sound=false,code=function()SFX.play('prerotate')end}, + WIDGET.newKey{name="prehold", x=110, y=660,w=160,h=50,font=20,sound=false,code=function()SFX.play('prehold')end}, - WIDGET.newKey{name="clear1", x=280, y=140,w=160,h=50,font=20,sound=false,code=function()SFX.play('clear_1')end}, - WIDGET.newKey{name="clear2", x=280, y=205,w=160,h=50,font=20,sound=false,code=function()SFX.play('clear_2')end}, - WIDGET.newKey{name="clear3", x=280, y=270,w=160,h=50,font=20,sound=false,code=function()SFX.play('clear_3')end}, - WIDGET.newKey{name="clear4", x=280, y=335,w=160,h=50,font=20,sound=false,code=function()SFX.play('clear_4')end}, - WIDGET.newKey{name="spin0", x=280, y=400,w=160,h=50,font=20,sound=false,code=function()SFX.play('spin_0')end}, - WIDGET.newKey{name="spin1", x=280, y=465,w=160,h=50,font=20,sound=false,code=function()SFX.play('spin_1')end}, - WIDGET.newKey{name="spin2", x=280, y=530,w=160,h=50,font=20,sound=false,code=function()SFX.play('spin_2')end}, - WIDGET.newKey{name="spin3", x=280, y=595,w=160,h=50,font=20,sound=false,code=function()SFX.play('spin_3')end}, - WIDGET.newKey{name="_pc", x=280, y=660,w=160,h=50,font=20,sound=false,code=function()SFX.play('clear')end}, + WIDGET.newKey{name="clear1", x=280, y=140,w=160,h=50,font=20,sound=false,code=function()SFX.play('clear_1')end}, + WIDGET.newKey{name="clear2", x=280, y=205,w=160,h=50,font=20,sound=false,code=function()SFX.play('clear_2')end}, + WIDGET.newKey{name="clear3", x=280, y=270,w=160,h=50,font=20,sound=false,code=function()SFX.play('clear_3')end}, + WIDGET.newKey{name="clear4", x=280, y=335,w=160,h=50,font=20,sound=false,code=function()SFX.play('clear_4')end}, + WIDGET.newKey{name="spin0", x=280, y=400,w=160,h=50,font=20,sound=false,code=function()SFX.play('spin_0')end}, + WIDGET.newKey{name="spin1", x=280, y=465,w=160,h=50,font=20,sound=false,code=function()SFX.play('spin_1')end}, + WIDGET.newKey{name="spin2", x=280, y=530,w=160,h=50,font=20,sound=false,code=function()SFX.play('spin_2')end}, + WIDGET.newKey{name="spin3", x=280, y=595,w=160,h=50,font=20,sound=false,code=function()SFX.play('spin_3')end}, + WIDGET.newKey{name="_pc", x=280, y=660,w=160,h=50,font=20,sound=false,code=function()SFX.play('clear')end}, - WIDGET.newKey{name="_1", x=970, y=75,w=140,h=50,font=20,sound=false,code=pressKey(1)}, - WIDGET.newKey{name="_2", x=1130, y=75,w=140,h=50,font=20,sound=false,code=pressKey(2)}, - WIDGET.newKey{name="_3", x=970, y=140,w=140,h=50,font=20,sound=false,code=pressKey(3)}, - WIDGET.newKey{name="_4", x=1130, y=140,w=140,h=50,font=20,sound=false,code=pressKey(4)}, + WIDGET.newKey{name="_1", x=970, y=75,w=140,h=50,font=20,sound=false,code=pressKey(1)}, + WIDGET.newKey{name="_2", x=1130, y=75,w=140,h=50,font=20,sound=false,code=pressKey(2)}, + WIDGET.newKey{name="_3", x=970, y=140,w=140,h=50,font=20,sound=false,code=pressKey(3)}, + WIDGET.newKey{name="_4", x=1130, y=140,w=140,h=50,font=20,sound=false,code=pressKey(4)}, - WIDGET.newKey{name="z0", x=650, y=205,w=140,h=50,font=20,sound=false,code=pressKey(10)}, - WIDGET.newKey{name="z1", x=650, y=270,w=140,h=50,font=20,sound=false,code=pressKey(11)}, - WIDGET.newKey{name="z2", x=650, y=335,w=140,h=50,font=20,sound=false,code=pressKey(12)}, - WIDGET.newKey{name="z3", x=650, y=400,w=140,h=50,font=20,sound=false,code=pressKey(13)}, - WIDGET.newKey{name="t0", x=650, y=465,w=140,h=50,font=20,sound=false,code=pressKey(50)}, - WIDGET.newKey{name="t1", x=650, y=530,w=140,h=50,font=20,sound=false,code=pressKey(51)}, - WIDGET.newKey{name="t2", x=650, y=595,w=140,h=50,font=20,sound=false,code=pressKey(52)}, - WIDGET.newKey{name="t3", x=650, y=660,w=140,h=50,font=20,sound=false,code=pressKey(53)}, + WIDGET.newKey{name="z0", x=650, y=205,w=140,h=50,font=20,sound=false,code=pressKey(10)}, + WIDGET.newKey{name="z1", x=650, y=270,w=140,h=50,font=20,sound=false,code=pressKey(11)}, + WIDGET.newKey{name="z2", x=650, y=335,w=140,h=50,font=20,sound=false,code=pressKey(12)}, + WIDGET.newKey{name="z3", x=650, y=400,w=140,h=50,font=20,sound=false,code=pressKey(13)}, + WIDGET.newKey{name="t0", x=650, y=465,w=140,h=50,font=20,sound=false,code=pressKey(50)}, + WIDGET.newKey{name="t1", x=650, y=530,w=140,h=50,font=20,sound=false,code=pressKey(51)}, + WIDGET.newKey{name="t2", x=650, y=595,w=140,h=50,font=20,sound=false,code=pressKey(52)}, + WIDGET.newKey{name="t3", x=650, y=660,w=140,h=50,font=20,sound=false,code=pressKey(53)}, - WIDGET.newKey{name="s0", x=810, y=205,w=140,h=50,font=20,sound=false,code=pressKey(20)}, - WIDGET.newKey{name="s1", x=810, y=270,w=140,h=50,font=20,sound=false,code=pressKey(21)}, - WIDGET.newKey{name="s2", x=810, y=335,w=140,h=50,font=20,sound=false,code=pressKey(22)}, - WIDGET.newKey{name="s3", x=810, y=400,w=140,h=50,font=20,sound=false,code=pressKey(23)}, - WIDGET.newKey{name="o0", x=810, y=465,w=140,h=50,font=20,sound=false,code=pressKey(60)}, - WIDGET.newKey{name="o1", x=810, y=530,w=140,h=50,font=20,sound=false,code=pressKey(61)}, - WIDGET.newKey{name="o2", x=810, y=595,w=140,h=50,font=20,sound=false,code=pressKey(62)}, - WIDGET.newKey{name="o3", x=810, y=660,w=140,h=50,font=20,sound=false,code=pressKey(63)}, + WIDGET.newKey{name="s0", x=810, y=205,w=140,h=50,font=20,sound=false,code=pressKey(20)}, + WIDGET.newKey{name="s1", x=810, y=270,w=140,h=50,font=20,sound=false,code=pressKey(21)}, + WIDGET.newKey{name="s2", x=810, y=335,w=140,h=50,font=20,sound=false,code=pressKey(22)}, + WIDGET.newKey{name="s3", x=810, y=400,w=140,h=50,font=20,sound=false,code=pressKey(23)}, + WIDGET.newKey{name="o0", x=810, y=465,w=140,h=50,font=20,sound=false,code=pressKey(60)}, + WIDGET.newKey{name="o1", x=810, y=530,w=140,h=50,font=20,sound=false,code=pressKey(61)}, + WIDGET.newKey{name="o2", x=810, y=595,w=140,h=50,font=20,sound=false,code=pressKey(62)}, + WIDGET.newKey{name="o3", x=810, y=660,w=140,h=50,font=20,sound=false,code=pressKey(63)}, - WIDGET.newKey{name="j0", x=970, y=205,w=140,h=50,font=20,sound=false,code=pressKey(30)}, - WIDGET.newKey{name="j1", x=970, y=270,w=140,h=50,font=20,sound=false,code=pressKey(31)}, - WIDGET.newKey{name="j2", x=970, y=335,w=140,h=50,font=20,sound=false,code=pressKey(32)}, - WIDGET.newKey{name="j3", x=970, y=400,w=140,h=50,font=20,sound=false,code=pressKey(33)}, - WIDGET.newKey{name="i0", x=970, y=465,w=140,h=50,font=20,sound=false,code=pressKey(70)}, - WIDGET.newKey{name="i1", x=970, y=530,w=140,h=50,font=20,sound=false,code=pressKey(71)}, - WIDGET.newKey{name="i2", x=970, y=595,w=140,h=50,font=20,sound=false,code=pressKey(72)}, - WIDGET.newKey{name="i3", x=970, y=660,w=140,h=50,font=20,sound=false,code=pressKey(73)}, + WIDGET.newKey{name="j0", x=970, y=205,w=140,h=50,font=20,sound=false,code=pressKey(30)}, + WIDGET.newKey{name="j1", x=970, y=270,w=140,h=50,font=20,sound=false,code=pressKey(31)}, + WIDGET.newKey{name="j2", x=970, y=335,w=140,h=50,font=20,sound=false,code=pressKey(32)}, + WIDGET.newKey{name="j3", x=970, y=400,w=140,h=50,font=20,sound=false,code=pressKey(33)}, + WIDGET.newKey{name="i0", x=970, y=465,w=140,h=50,font=20,sound=false,code=pressKey(70)}, + WIDGET.newKey{name="i1", x=970, y=530,w=140,h=50,font=20,sound=false,code=pressKey(71)}, + WIDGET.newKey{name="i2", x=970, y=595,w=140,h=50,font=20,sound=false,code=pressKey(72)}, + WIDGET.newKey{name="i3", x=970, y=660,w=140,h=50,font=20,sound=false,code=pressKey(73)}, - WIDGET.newKey{name="l0", x=1130, y=205,w=140,h=50,font=20,sound=false,code=pressKey(40)}, - WIDGET.newKey{name="l1", x=1130, y=270,w=140,h=50,font=20,sound=false,code=pressKey(41)}, - WIDGET.newKey{name="l2", x=1130, y=335,w=140,h=50,font=20,sound=false,code=pressKey(42)}, - WIDGET.newKey{name="l3", x=1130, y=400,w=140,h=50,font=20,sound=false,code=pressKey(43)}, + WIDGET.newKey{name="l0", x=1130, y=205,w=140,h=50,font=20,sound=false,code=pressKey(40)}, + WIDGET.newKey{name="l1", x=1130, y=270,w=140,h=50,font=20,sound=false,code=pressKey(41)}, + WIDGET.newKey{name="l2", x=1130, y=335,w=140,h=50,font=20,sound=false,code=pressKey(42)}, + WIDGET.newKey{name="l3", x=1130, y=400,w=140,h=50,font=20,sound=false,code=pressKey(43)}, - WIDGET.newSwitch{name="mini", x=515, y=465,font=25,disp=function()return mini end,sound=false,code=pressKey"1"}, - WIDGET.newSwitch{name="b2b", x=515, y=530,font=25,disp=function()return b2b end,sound=false,code=pressKey"2"}, - WIDGET.newSwitch{name="b3b", x=515, y=595,font=25,disp=function()return b3b end,sound=false,code=pressKey"3"}, - WIDGET.newSwitch{name="pc", x=515, y=660,font=25,disp=function()return pc end,sound=false,code=pressKey"4"}, + WIDGET.newSwitch{name="mini", x=515, y=465,font=25,disp=function()return mini end,sound=false,code=pressKey"1"}, + WIDGET.newSwitch{name="b2b", x=515, y=530,font=25,disp=function()return b2b end,sound=false,code=pressKey"2"}, + WIDGET.newSwitch{name="b3b", x=515, y=595,font=25,disp=function()return b3b end,sound=false,code=pressKey"3"}, + WIDGET.newSwitch{name="pc", x=515, y=660,font=25,disp=function()return pc end,sound=false,code=pressKey"4"}, - WIDGET.newButton{name="music", x=1140, y=540,w=170,h=80,font=40,code=pressKey"tab"}, - WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newButton{name="music", x=1140, y=540,w=170,h=80,font=40,code=pressKey"tab"}, + WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/staff.lua b/parts/scenes/staff.lua index b8cd284a..dcebd659 100644 --- a/parts/scenes/staff.lua +++ b/parts/scenes/staff.lua @@ -11,96 +11,96 @@ local names local counter function scene.sceneInit() - time=0 - v=12 - BG.set() - names={} - counter=26 + time=0 + v=12 + BG.set() + names={} + counter=26 end function scene.mouseDown(x,y) - local T=40*math.min(time,45) - if not GAME.playing then - if x>230 and x<1050 then - if math.abs(y-800+T)<70 then - loadGame('sprintLock',true) - elseif math.abs(y-2160+T)<70 then - loadGame('sprintFix',true) - end - end - end + local T=40*math.min(time,45) + if not GAME.playing then + if x>230 and x<1050 then + if math.abs(y-800+T)<70 then + loadGame('sprintLock',true) + elseif math.abs(y-2160+T)<70 then + loadGame('sprintFix',true) + end + end + end end function scene.touchDown(x,y) - scene.mouseDown(x,y) + scene.mouseDown(x,y) end function scene.keyDown(key,isRep) - if isRep then return end - if key=="escape"then - SCN.back() - elseif not GAME.playing then - if key=="l"then - loadGame('sprintLock',true) - elseif key=="f"then - loadGame('sprintFix',true) - end - end + if isRep then return end + if key=="escape"then + SCN.back() + elseif not GAME.playing then + if key=="l"then + loadGame('sprintLock',true) + elseif key=="f"then + loadGame('sprintFix',true) + end + end end function scene.update(dt) - if(kb.isDown("space","return")or tc.getTouches()[1])and v<6.26 then - v=v+.26 - elseif v>1 then - v=v-.16 - end - time=time+v*dt - counter=counter-1 - if counter==0 then - local N=patron[rnd(#patron)] - local T=gc.newText(getFont(N.font),N.name) - local r=rnd()<.5 - ins(names,{ - text=T, - x=r and -T:getWidth()or SCR.w, - y=rnd()*(SCR.h-T:getHeight()), - w=T:getWidth(), - vx=(r and 1 or -1)*(1.626+rnd())*(SCR.w+T:getWidth())/SCR.w, - }) - counter=26 - end - for i=#names,1,-1 do - local N=names[i] - N.x=N.x+N.vx - if N.vx>0 and N.x>SCR.w or N.vx<0 and N.x<-N.w then - rem(names,i) - end - end + if(kb.isDown("space","return")or tc.getTouches()[1])and v<6.26 then + v=v+.26 + elseif v>1 then + v=v-.16 + end + time=time+v*dt + counter=counter-1 + if counter==0 then + local N=patron[rnd(#patron)] + local T=gc.newText(getFont(N.font),N.name) + local r=rnd()<.5 + ins(names,{ + text=T, + x=r and -T:getWidth()or SCR.w, + y=rnd()*(SCR.h-T:getHeight()), + w=T:getWidth(), + vx=(r and 1 or -1)*(1.626+rnd())*(SCR.w+T:getWidth())/SCR.w, + }) + counter=26 + end + for i=#names,1,-1 do + local N=names[i] + N.x=N.x+N.vx + if N.vx>0 and N.x>SCR.w or N.vx<0 and N.x<-N.w then + rem(names,i) + end + end end function scene.draw() - gc.replaceTransform(SCR.origin) - gc.setColor(1,1,1,.3) - for i=1,#names do - local N=names[i] - gc.draw(N.text,N.x,N.y) - end + gc.replaceTransform(SCR.origin) + gc.setColor(1,1,1,.3) + for i=1,#names do + local N=names[i] + gc.draw(N.text,N.x,N.y) + end - gc.replaceTransform(SCR.xOy) - gc.setColor(COLOR.Z) - local T=40*math.min(time,45) - local L=text.staff - setFont(40) - for i=1,#L do - mStr(L[i],640,800+70*i-T) - end - mDraw(TEXTURE.title_color,640,800-T,nil,.6) - mDraw(TEXTURE.title_color,640,2160-T,nil,.6) - if time>50 then gc.print("CLICK ME →",50,550,-.5)end + gc.replaceTransform(SCR.xOy) + gc.setColor(COLOR.Z) + local T=40*math.min(time,45) + local L=text.staff + setFont(40) + for i=1,#L do + mStr(L[i],640,800+70*i-T) + end + mDraw(TEXTURE.title_color,640,800-T,nil,.6) + mDraw(TEXTURE.title_color,640,2160-T,nil,.6) + if time>50 then gc.print("CLICK ME →",50,550,-.5)end end scene.widgetList={ - WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/stat.lua b/parts/scenes/stat.lua index 5091b567..9bd02922 100644 --- a/parts/scenes/stat.lua +++ b/parts/scenes/stat.lua @@ -12,107 +12,107 @@ local form--Form of clear & spins local item--Detail datas function scene.sceneInit() - local S=STAT - local X1,X2,Y1,Y2={0,0,0,0},{0,0,0,0},{},{} - for i=1,7 do - local s,c=S.spin[i],S.clear[i] - Y1[i]=s[1]+s[2]+s[3]+s[4] - Y2[i]=c[1]+c[2]+c[3]+c[4] - for j=1,4 do - X1[j]=X1[j]+s[j] - X2[j]=X2[j]+c[j] - end - end - form={ - A1=S.spin,A2=S.clear, - X1=X1,X2=X2, - Y1=Y1,Y2=Y2, - } - item={ - S.run, - S.game, - STRING.time(S.time), - S.key.." "..S.rotate.." "..S.hold, - S.piece.." "..S.row.." "..int(S.atk), - S.recv.." "..S.off.." "..S.pend, - S.dig.." "..int(S.digatk), - ("%.2f %.2f"):format(S.atk/S.row,S.digatk/S.dig), - S.b2b.." "..S.b3b, - S.pc.." "..S.hpc, - ("%d/%.2f%%"):format(S.extraPiece,S.finesseRate*20/S.piece), - } - for i=1,11 do - item[i]=text.stat[i].."\t"..item[i] - end + local S=STAT + local X1,X2,Y1,Y2={0,0,0,0},{0,0,0,0},{},{} + for i=1,7 do + local s,c=S.spin[i],S.clear[i] + Y1[i]=s[1]+s[2]+s[3]+s[4] + Y2[i]=c[1]+c[2]+c[3]+c[4] + for j=1,4 do + X1[j]=X1[j]+s[j] + X2[j]=X2[j]+c[j] + end + end + form={ + A1=S.spin,A2=S.clear, + X1=X1,X2=X2, + Y1=Y1,Y2=Y2, + } + item={ + S.run, + S.game, + STRING.time(S.time), + S.key.." "..S.rotate.." "..S.hold, + S.piece.." "..S.row.." "..int(S.atk), + S.recv.." "..S.off.." "..S.pend, + S.dig.." "..int(S.digatk), + ("%.2f %.2f"):format(S.atk/S.row,S.digatk/S.dig), + S.b2b.." "..S.b3b, + S.pc.." "..S.hpc, + ("%d/%.2f%%"):format(S.extraPiece,S.finesseRate*20/S.piece), + } + for i=1,11 do + item[i]=text.stat[i].."\t"..item[i] + end end function scene.draw() - local _,__=minoColor,SETTING.skin - local A,B=form.A1,form.A2 + local _,__=minoColor,SETTING.skin + local A,B=form.A1,form.A2 - setFont(25) - for x=1,7 do - gc_setColor(_[__[x]]) - mStr(text.block[x],80*x,40) - mStr(text.block[x],80*x,280) - for y=1,4 do - mStr(A[x][y],80*x,40+40*y) - mStr(B[x][y],80*x,280+40*y) - end - mStr(form.Y1[x],80*x,240) - mStr(form.Y2[x],80*x,480) - end + setFont(25) + for x=1,7 do + gc_setColor(_[__[x]]) + mStr(text.block[x],80*x,40) + mStr(text.block[x],80*x,280) + for y=1,4 do + mStr(A[x][y],80*x,40+40*y) + mStr(B[x][y],80*x,280+40*y) + end + mStr(form.Y1[x],80*x,240) + mStr(form.Y2[x],80*x,480) + end - A,B=form.X1,form.X2 - for y=1,4 do - gc_setColor(.5,.5,.5) - gc_print(y-1,620,40+40*y) - gc_print(y,620,280+40*y) - gc_setColor(1,1,1) - mStr(A[y],680,40+40*y) - mStr(B[y],680,280+40*y) - end + A,B=form.X1,form.X2 + for y=1,4 do + gc_setColor(.5,.5,.5) + gc_print(y-1,620,40+40*y) + gc_print(y,620,280+40*y) + gc_setColor(1,1,1) + mStr(A[y],680,40+40*y) + mStr(B[y],680,280+40*y) + end - setFont(20) - for i=1,11 do - gc_print(item[i],740,40*i+10) - end + setFont(20) + for i=1,11 do + gc_print(item[i],740,40*i+10) + end - gc_setLineWidth(2) - gc.rectangle('line',40,80,560,160,5) - gc.rectangle('line',40,320,560,160,5) - for x=1,6 do - x=80*x+40 - gc_line(x,80,x,240) - gc_line(x,320,x,480) - end - for y=1,3 do - gc_line(40,80+40*y,600,80+40*y) - gc_line(40,320+40*y,600,320+40*y) - end + gc_setLineWidth(2) + gc.rectangle('line',40,80,560,160,5) + gc.rectangle('line',40,320,560,160,5) + for x=1,6 do + x=80*x+40 + gc_line(x,80,x,240) + gc_line(x,320,x,480) + end + for y=1,3 do + gc_line(40,80+40*y,600,80+40*y) + gc_line(40,320+40*y,600,320+40*y) + end - local t=TIME() - gc_draw(TEXTURE.title,260,615,.2+.04*sin(t*3),.4,nil,580,118) + local t=TIME() + gc_draw(TEXTURE.title,260,615,.2+.04*sin(t*3),.4,nil,580,118) - local r=t*2 - local R=int(r)%7+1 - gc_setColor(1,1,1,1-abs(r%1*2-1)) - gc_draw(TEXTURE.miniBlock[R],680,50,t*10%6.2832,15,15,DSCP[R][0][2]+.5,#BLOCKS[R][0]-DSCP[R][0][1]-.5) - gc_draw(TEXTURE.miniBlock[R],680,300,0,15,15,DSCP[R][0][2]+.5,#BLOCKS[R][0]-DSCP[R][0][1]-.5) + local r=t*2 + local R=int(r)%7+1 + gc_setColor(1,1,1,1-abs(r%1*2-1)) + gc_draw(TEXTURE.miniBlock[R],680,50,t*10%6.2832,15,15,DSCP[R][0][2]+.5,#BLOCKS[R][0]-DSCP[R][0][1]-.5) + gc_draw(TEXTURE.miniBlock[R],680,300,0,15,15,DSCP[R][0][2]+.5,#BLOCKS[R][0]-DSCP[R][0][1]-.5) end scene.widgetList={ - WIDGET.newButton{name="path", x=820,y=540,w=250,h=80,font=25, - code=function() - if SYSTEM=="Windows"or SYSTEM=="Linux"then - love.system.openURL(SAVEDIR) - else - MES.new('info',SAVEDIR) - end - end - }, - WIDGET.newButton{name="save", x=820,y=640,w=250,h=80,font=25,code=goScene'savedata'}, - WIDGET.newButton{name="back", x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, + WIDGET.newButton{name="path",x=820,y=540,w=250,h=80,font=25, + code=function() + if SYSTEM=="Windows"or SYSTEM=="Linux"then + love.system.openURL(SAVEDIR) + else + MES.new('info',SAVEDIR) + end + end + }, + WIDGET.newButton{name="save",x=820,y=640,w=250,h=80,font=25,code=goScene'savedata'}, + WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,fText=TEXTURE.back,code=backScene}, } return scene \ No newline at end of file diff --git a/parts/scenes/test.lua b/parts/scenes/test.lua index 1af16474..f1820edd 100644 --- a/parts/scenes/test.lua +++ b/parts/scenes/test.lua @@ -6,95 +6,95 @@ local scene={} local backCounter local list,timer local function _push(mes) - ins(list,{mes,120}) - timer=1 + ins(list,{mes,120}) + timer=1 end function scene.sceneInit() - backCounter=5 - list={} - timer=0 + backCounter=5 + list={} + timer=0 end function scene.gamepadDown(key) - _push("[gamepadDown] <"..key..">") + _push("[gamepadDown] <"..key..">") end function scene.gamepadUp(key) - _push{COLOR.H,"[gamepadUp] <"..key..">"} + _push{COLOR.H,"[gamepadUp] <"..key..">"} end function scene.keyDown(key,isRep) - if isRep then return end - _push("[keyDown] <"..key..">") - if key=="escape"then - backCounter=backCounter-1 - if backCounter==0 then - SCN.back() - else - MES.new('info',backCounter) - end - end + if isRep then return end + _push("[keyDown] <"..key..">") + if key=="escape"then + backCounter=backCounter-1 + if backCounter==0 then + SCN.back() + else + MES.new('info',backCounter) + end + end end function scene.keyUp(key) - _push{COLOR.H,"[keyUp] <"..key..">"} + _push{COLOR.H,"[keyUp] <"..key..">"} end function scene.mouseClick(x,y) - SYSFX.newRipple(.5,x,y,50) - _push("[mouseClick]") + SYSFX.newRipple(.5,x,y,50) + _push("[mouseClick]") end function scene.mouseDown(x,y,k) - SYSFX.newShade(.5,x-10,y-10,20,20) - _push(("[mouseDown] <%d: %d, %d>"):format(k,x,y)) + SYSFX.newShade(.5,x-10,y-10,20,20) + _push(("[mouseDown] <%d: %d, %d>"):format(k,x,y)) end function scene.mouseMove(x,y) - SYSFX.newShade(.5,x-3,y-3,6,6) + SYSFX.newShade(.5,x-3,y-3,6,6) end function scene.mouseUp(x,y,k) - SYSFX.newRectRipple(1,x-10,y-10,20,20) - _push{COLOR.H,"[mouseUp] <"..k..">"} + SYSFX.newRectRipple(1,x-10,y-10,20,20) + _push{COLOR.H,"[mouseUp] <"..k..">"} end function scene.touchClick(x,y) - SYSFX.newRipple(.5,x,y,50) - _push("[touchClick]") + SYSFX.newRipple(.5,x,y,50) + _push("[touchClick]") end function scene.touchDown(x,y) - SYSFX.newShade(.5,x-10,y-10,20,20) - _push(("[touchDown] <%d, %d>"):format(x,y)) + SYSFX.newShade(.5,x-10,y-10,20,20) + _push(("[touchDown] <%d, %d>"):format(x,y)) end function scene.touchMove(x,y) - SYSFX.newShade(.5,x-3,y-3,6,6) + SYSFX.newShade(.5,x-3,y-3,6,6) end function scene.touchUp(x,y) - SYSFX.newRectRipple(1,x-10,y-10,20,20) - _push{COLOR.H,"[touchUp]"} + SYSFX.newRectRipple(1,x-10,y-10,20,20) + _push{COLOR.H,"[touchUp]"} end function scene.wheelMoved(dx,dy) - _push(("[wheelMoved] <%d, %d>"):format(dx,dy)) + _push(("[wheelMoved] <%d, %d>"):format(dx,dy)) end function scene.fileDropped(file) - _push(("[fileDropped] <%s>"):format(file:getFilename())) + _push(("[fileDropped] <%s>"):format(file:getFilename())) end function scene.directoryDropped(path) - _push(("[directoryDropped] <%s>"):format(path)) + _push(("[directoryDropped] <%s>"):format(path)) end function scene.update(dt) - if timer>0 then - timer=timer-dt/.526 - end - for i=#list,1,-1 do - list[i][2]=list[i][2]-1 - if list[i][2]==0 then - rem(list,i) - end - end + if timer>0 then + timer=timer-dt/.526 + end + for i=#list,1,-1 do + list[i][2]=list[i][2]-1 + if list[i][2]==0 then + rem(list,i) + end + end end function scene.draw() - setFont(15) - for i=1,#list do - gc.setColor(1,1,1,list[i][2]/30) - gc.print(list[i][1],20,20*i) - end + setFont(15) + for i=1,#list do + gc.setColor(1,1,1,list[i][2]/30) + gc.print(list[i][1],20,20*i) + end end scene.widgetList={ diff --git a/parts/shaders/alpha.glsl b/parts/shaders/alpha.glsl index 64dc8368..bde719c9 100644 --- a/parts/shaders/alpha.glsl +++ b/parts/shaders/alpha.glsl @@ -1,4 +1,4 @@ extern float a; vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){ - return vec4(1.,1.,1.,sign(Texel(tex,tex_coords).a)*a); + return vec4(1.,1.,1.,sign(Texel(tex,tex_coords).a)*a); } \ No newline at end of file diff --git a/parts/shaders/aura.glsl b/parts/shaders/aura.glsl index ba984ed8..3b2d416d 100644 --- a/parts/shaders/aura.glsl +++ b/parts/shaders/aura.glsl @@ -2,41 +2,41 @@ extern float w,h; extern float t; vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){ - float x=scr_coords.x/w; - float y=scr_coords.y/h; - float dx,dy; - vec3 V=vec3(0.); + float x=scr_coords.x/w; + float y=scr_coords.y/h; + float dx,dy; + vec3 V=vec3(0.); - dx=0.5+cos(t*3.*0.26)*0.4-x; - dy=0.5-sin(t*3.*0.62)*0.4-y; - dx=sqrt(dx*dx+dy*dy); - V.r=V.r+smoothstep(1.26,0.,dx); + dx=0.5+cos(t*3.*0.26)*0.4-x; + dy=0.5-sin(t*3.*0.62)*0.4-y; + dx=sqrt(dx*dx+dy*dy); + V.r=V.r+smoothstep(1.26,0.,dx); - dx=(0.5+cos(t*3.*0.32)*0.4)-x; - dy=(0.5-sin(t*3.*0.80)*0.4)-y; - dx=sqrt(dx*dx+dy*dy); - V.g=V.g+smoothstep(1.26,0.,dx); + dx=(0.5+cos(t*3.*0.32)*0.4)-x; + dy=(0.5-sin(t*3.*0.80)*0.4)-y; + dx=sqrt(dx*dx+dy*dy); + V.g=V.g+smoothstep(1.26,0.,dx); - dx=(0.5-cos(t*3.*0.49)*0.4)-x; - dy=(0.5+sin(t*3.*0.18)*0.4)-y; - dx=sqrt(dx*dx+dy*dy); - V.b=V.b+smoothstep(1.26,0.,dx); + dx=(0.5-cos(t*3.*0.49)*0.4)-x; + dy=(0.5+sin(t*3.*0.18)*0.4)-y; + dx=sqrt(dx*dx+dy*dy); + V.b=V.b+smoothstep(1.26,0.,dx); - dx=(0.5+cos(t*0.53)*0.4)-x; - dy=(0.5-sin(t*0.46)*0.4)-y; - dx=sqrt(dx*dx+dy*dy); - V.rg+=vec2(smoothstep(0.626,0.,dx)); + dx=(0.5+cos(t*0.53)*0.4)-x; + dy=(0.5-sin(t*0.46)*0.4)-y; + dx=sqrt(dx*dx+dy*dy); + V.rg+=vec2(smoothstep(0.626,0.,dx)); - dx=(0.5+cos(t*0.98)*0.4)-x; - dy=(0.5+sin(t*0.57)*0.4)-y; - dx=sqrt(dx*dx+dy*dy); - V.rb+=vec2(smoothstep(0.626,0.,dx)); + dx=(0.5+cos(t*0.98)*0.4)-x; + dy=(0.5+sin(t*0.57)*0.4)-y; + dx=sqrt(dx*dx+dy*dy); + V.rb+=vec2(smoothstep(0.626,0.,dx)); - dx=(0.5-cos(t*0.86)*0.4)-x; - dy=(0.5-sin(t*0.32)*0.4)-y; - dx=sqrt(dx*dx+dy*dy); - V.gb+=vec2(smoothstep(0.626,0.,dx)); + dx=(0.5-cos(t*0.86)*0.4)-x; + dy=(0.5-sin(t*0.32)*0.4)-y; + dx=sqrt(dx*dx+dy*dy); + V.gb+=vec2(smoothstep(0.626,0.,dx)); - dx=1.626*max(max(V.r,V.g),V.b); - return vec4(V/dx,0.4); + dx=1.626*max(max(V.r,V.g),V.b); + return vec4(V/dx,0.4); } \ No newline at end of file diff --git a/parts/shaders/blockSatur.glsl b/parts/shaders/blockSatur.glsl index d14412d4..c56877b2 100644 --- a/parts/shaders/blockSatur.glsl +++ b/parts/shaders/blockSatur.glsl @@ -1,10 +1,10 @@ extern float k,b; vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){ - vec4 texcolor=Texel(tex,tex_coords); - return vec4( - (b+texcolor.r*k)*color.r, - (b+texcolor.g*k)*color.g, - (b+texcolor.b*k)*color.b, - texcolor.a*color.a - ); + vec4 texcolor=Texel(tex,tex_coords); + return vec4( + (b+texcolor.r*k)*color.r, + (b+texcolor.g*k)*color.g, + (b+texcolor.b*k)*color.b, + texcolor.a*color.a + ); } \ No newline at end of file diff --git a/parts/shaders/fieldSatur.glsl b/parts/shaders/fieldSatur.glsl index d14412d4..c56877b2 100644 --- a/parts/shaders/fieldSatur.glsl +++ b/parts/shaders/fieldSatur.glsl @@ -1,10 +1,10 @@ extern float k,b; vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){ - vec4 texcolor=Texel(tex,tex_coords); - return vec4( - (b+texcolor.r*k)*color.r, - (b+texcolor.g*k)*color.g, - (b+texcolor.b*k)*color.b, - texcolor.a*color.a - ); + vec4 texcolor=Texel(tex,tex_coords); + return vec4( + (b+texcolor.r*k)*color.r, + (b+texcolor.g*k)*color.g, + (b+texcolor.b*k)*color.b, + texcolor.a*color.a + ); } \ No newline at end of file diff --git a/parts/shaders/grad1.glsl b/parts/shaders/grad1.glsl index d5b2954c..81ffc437 100644 --- a/parts/shaders/grad1.glsl +++ b/parts/shaders/grad1.glsl @@ -1,10 +1,10 @@ extern float t,w; vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){ - float x=scr_coords.x/w; - return vec4( - .8-x*.6, - .3+.2*sin(t), - .15+x*.7, - .4 - ); + float x=scr_coords.x/w; + return vec4( + .8-x*.6, + .3+.2*sin(t), + .15+x*.7, + .4 + ); } \ No newline at end of file diff --git a/parts/shaders/grad2.glsl b/parts/shaders/grad2.glsl index a39edd82..ef1483f9 100644 --- a/parts/shaders/grad2.glsl +++ b/parts/shaders/grad2.glsl @@ -1,10 +1,10 @@ extern float t,h; vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){ - float y=scr_coords.y/h; - return vec4( - .8-y*.6, - .2+y*.4, - .3+.1*sin(t), - .4 - ); + float y=scr_coords.y/h; + return vec4( + .8-y*.6, + .2+y*.4, + .3+.1*sin(t), + .4 + ); } \ No newline at end of file diff --git a/parts/shaders/lighter.glsl b/parts/shaders/lighter.glsl index 689c4e94..7bbdfbfd 100644 --- a/parts/shaders/lighter.glsl +++ b/parts/shaders/lighter.glsl @@ -1,9 +1,9 @@ vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){ - vec4 texcolor=Texel(tex,tex_coords); - return vec4( - pow(texcolor.r+.26,.7023), - pow(texcolor.g+.26,.7023), - pow(texcolor.b+.26,.7023), - texcolor.a*color.a - ); + vec4 texcolor=Texel(tex,tex_coords); + return vec4( + pow(texcolor.r+.26,.7023), + pow(texcolor.g+.26,.7023), + pow(texcolor.b+.26,.7023), + texcolor.a*color.a + ); } \ No newline at end of file diff --git a/parts/shaders/rgb1.glsl b/parts/shaders/rgb1.glsl index c25bda22..5367fcb6 100644 --- a/parts/shaders/rgb1.glsl +++ b/parts/shaders/rgb1.glsl @@ -1,11 +1,11 @@ extern float t,w,h; vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){ - float x=scr_coords.x/w; - float y=scr_coords.y/h; - return vec4( - .8-y*.7+.2*sin(t/6.26), - .2+y*.5+.15*sin(t/4.), - .2+x*.6-.1*sin(t/2.83), - .4 - ); + float x=scr_coords.x/w; + float y=scr_coords.y/h; + return vec4( + .8-y*.7+.2*sin(t/6.26), + .2+y*.5+.15*sin(t/4.), + .2+x*.6-.1*sin(t/2.83), + .4 + ); } \ No newline at end of file diff --git a/parts/shaders/rgb2.glsl b/parts/shaders/rgb2.glsl index 93d2f638..8c2f82bf 100644 --- a/parts/shaders/rgb2.glsl +++ b/parts/shaders/rgb2.glsl @@ -1,11 +1,11 @@ extern float t,w,h; vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){ - float x=scr_coords.x/w; - float y=scr_coords.y/h; - return vec4( - .8-y*.8-.1*sin(t/6.26), - .4+.1*sin(t/4.)*(y+2.)/(y+5.), - abs(.7-x*1.4+y*.5*sin(t/16.)), - .4 - ); + float x=scr_coords.x/w; + float y=scr_coords.y/h; + return vec4( + .8-y*.8-.1*sin(t/6.26), + .4+.1*sin(t/4.)*(y+2.)/(y+5.), + abs(.7-x*1.4+y*.5*sin(t/16.)), + .4 + ); } \ No newline at end of file diff --git a/parts/shaders/warning.glsl b/parts/shaders/warning.glsl index 5f11c242..6333e71c 100644 --- a/parts/shaders/warning.glsl +++ b/parts/shaders/warning.glsl @@ -1,6 +1,6 @@ extern float w,level; vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 scr_coords){ - float dx=abs(scr_coords.x/w-0.5); - float a=(dx*2.6-.626)*level; - return vec4(1.,0.,0.,a); + float dx=abs(scr_coords.x/w-0.5); + float a=(dx*2.6-.626)*level; + return vec4(1.,0.,0.,a); } \ No newline at end of file diff --git a/parts/skin.lua b/parts/skin.lua index 0bf9f211..740b4dbd 100644 --- a/parts/skin.lua +++ b/parts/skin.lua @@ -1,54 +1,54 @@ local SKIN={} function SKIN.init(list) - local Skins={} + local Skins={} - local simpList={} - for _,v in next,list do - table.insert(simpList,v.name) - Skins[v.name]=v.path - end - function SKIN.getList()return simpList end + local simpList={} + for _,v in next,list do + table.insert(simpList,v.name) + Skins[v.name]=v.path + end + function SKIN.getList()return simpList end - local gc=love.graphics - local function C(x,y) - local canvas=gc.newCanvas(x,y) - gc.setCanvas(canvas) - return canvas - end + local gc=love.graphics + local function C(x,y) + local canvas=gc.newCanvas(x,y) + gc.setCanvas(canvas) + return canvas + end - SKIN.lib,SKIN.libMini={},{} - local skinMeta={__index=function(self,name) - gc.push() - gc.origin() - local f1,f2=gc.getDefaultFilter() - gc.setDefaultFilter('nearest','nearest') - local I - local N=Skins[name] - if love.filesystem.getInfo(N)then - I=gc.newImage(N) - else - MES.new('warn',"No skin file: "..Skins[name]) - end - gc.setDefaultFilter(f1,f2) + SKIN.lib,SKIN.libMini={},{} + local skinMeta={__index=function(self,name) + gc.push() + gc.origin() + local f1,f2=gc.getDefaultFilter() + gc.setDefaultFilter('nearest','nearest') + local I + local N=Skins[name] + if love.filesystem.getInfo(N)then + I=gc.newImage(N) + else + MES.new('warn',"No skin file: "..Skins[name]) + end + gc.setDefaultFilter(f1,f2) - SKIN.lib[name],SKIN.libMini[name]={},{} - gc.setColor(1,1,1) - for y=0,2 do - for x=1,8 do - SKIN.lib[name][8*y+x]=C(30,30) - if I then gc.draw(I,30-30*x,-30*y)end + SKIN.lib[name],SKIN.libMini[name]={},{} + gc.setColor(1,1,1) + for y=0,2 do + for x=1,8 do + SKIN.lib[name][8*y+x]=C(30,30) + if I then gc.draw(I,30-30*x,-30*y)end - SKIN.libMini[name][8*y+x]=C(6,6) - if I then gc.draw(I,6-6*x,-6*y,nil,.2)end - end - end - gc.setCanvas() - gc.pop() - return self[name] - end} - setmetatable(SKIN.lib,skinMeta) - setmetatable(SKIN.libMini,skinMeta) + SKIN.libMini[name][8*y+x]=C(6,6) + if I then gc.draw(I,6-6*x,-6*y,nil,.2)end + end + end + gc.setCanvas() + gc.pop() + return self[name] + end} + setmetatable(SKIN.lib,skinMeta) + setmetatable(SKIN.libMini,skinMeta) - function SKIN.loadAll()SKIN.loadAll=nil for _,v in next,list do local _=SKIN.lib[v.name]end end + function SKIN.loadAll()SKIN.loadAll=nil for _,v in next,list do local _=SKIN.lib[v.name]end end end return SKIN \ No newline at end of file diff --git a/parts/texture.lua b/parts/texture.lua index 54977245..a2ee33dc 100644 --- a/parts/texture.lua +++ b/parts/texture.lua @@ -1,9 +1,9 @@ local gc=love.graphics local function NSC(x,y)--New & Set Canvas - local _=gc.newCanvas(x,y) - gc.setCanvas(_) - return _ + local _=gc.newCanvas(x,y) + gc.setCanvas(_) + return _ end local TEXTURE={} @@ -14,53 +14,53 @@ gc.setDefaultFilter('nearest','nearest') gc.setColor(1,1,1) TEXTURE.miniBlock={} for i=1,29 do - local b=BLOCKS[i][0] - TEXTURE.miniBlock[i]=NSC(#b[1],#b) - for y=1,#b do for x=1,#b[1]do - if b[y][x]then - gc.rectangle('fill',x-1,#b-y,1,1) - end - end end + local b=BLOCKS[i][0] + TEXTURE.miniBlock[i]=NSC(#b[1],#b) + for y=1,#b do for x=1,#b[1]do + if b[y][x]then + gc.rectangle('fill',x-1,#b-y,1,1) + end + end end end --Texture of puzzle mode gc.setLineWidth(2) TEXTURE.puzzleMark={} for i=1,17 do - TEXTURE.puzzleMark[i]=GC.DO{30,30, - {'setLW',2}, - {'setCL',minoColor[i][1],minoColor[i][2],minoColor[i][3],.7}, - {'dRect',5,5,20,20}, - {'dRect',10,10,10,10}, - } + TEXTURE.puzzleMark[i]=GC.DO{30,30, + {'setLW',2}, + {'setCL',minoColor[i][1],minoColor[i][2],minoColor[i][3],.7}, + {'dRect',5,5,20,20}, + {'dRect',10,10,10,10}, + } end for i=18,24 do - TEXTURE.puzzleMark[i]=GC.DO{30,30, - {'setCL',minoColor[i]}, - {'dRect',7,7,16,16}, - } + TEXTURE.puzzleMark[i]=GC.DO{30,30, + {'setCL',minoColor[i]}, + {'dRect',7,7,16,16}, + } end TEXTURE.puzzleMark[-1]=GC.DO{30,30, - {'setCL',1,1,1,.8}, - {'draw',GC.DO{30,30, - {'setLW',3}, - {'line',5,5,25,25}, - {'line',5,25,25,5}, - }} + {'setCL',1,1,1,.8}, + {'draw',GC.DO{30,30, + {'setLW',3}, + {'line',5,5,25,25}, + {'line',5,25,25,5}, + }} } --A simple pixel font TEXTURE.pixelNum={} for i=0,9 do - TEXTURE.pixelNum[i]=GC.DO{5,9, - {('1011011111'):byte(i+1)>48,'fRect',1,0,3,1},--up - {('0011111011'):byte(i+1)>48,'fRect',1,4,3,1},--middle - {('1011011011'):byte(i+1)>48,'fRect',1,8,3,1},--down - {('1000111011'):byte(i+1)>48,'fRect',0,1,1,3},--up-left - {('1111100111'):byte(i+1)>48,'fRect',4,1,1,3},--up-right - {('1010001010'):byte(i+1)>48,'fRect',0,5,1,3},--down-left - {('1101111111'):byte(i+1)>48,'fRect',4,5,1,3},--down-right - } + TEXTURE.pixelNum[i]=GC.DO{5,9, + {('1011011111'):byte(i+1)>48,'fRect',1,0,3,1},--up + {('0011111011'):byte(i+1)>48,'fRect',1,4,3,1},--middle + {('1011011011'):byte(i+1)>48,'fRect',1,8,3,1},--down + {('1000111011'):byte(i+1)>48,'fRect',0,1,1,3},--up-left + {('1111100111'):byte(i+1)>48,'fRect',4,1,1,3},--up-right + {('1010001010'):byte(i+1)>48,'fRect',0,5,1,3},--down-left + {('1101111111'):byte(i+1)>48,'fRect',4,5,1,3},--down-right + } end gc.setDefaultFilter('linear','linear') @@ -70,164 +70,164 @@ local titleTriangles={} for i=1,8 do titleTriangles[i]=love.math.triangulate(title[i])end TEXTURE.title=NSC(1160,236)--Middle: 580,118 for i=1,8 do - gc.translate(12*i,i==1 and 8 or 14) + gc.translate(12*i,i==1 and 8 or 14) - gc.setLineWidth(16) - gc.setColor(COLOR.Z) - gc.polygon('line',title[i]) + gc.setLineWidth(16) + gc.setColor(COLOR.Z) + gc.polygon('line',title[i]) - gc.setColor(.2,.2,.2) - for j=1,#titleTriangles[i]do - gc.polygon('fill',titleTriangles[i][j]) - end + gc.setColor(.2,.2,.2) + for j=1,#titleTriangles[i]do + gc.polygon('fill',titleTriangles[i][j]) + end - gc.translate(-12*i,i==1 and -8 or -14) + gc.translate(-12*i,i==1 and -8 or -14) end local titleColor={COLOR.lP,COLOR.lC,COLOR.lB,COLOR.lO,COLOR.lF,COLOR.lM,COLOR.lG,COLOR.lY} TEXTURE.title_color=NSC(1160,236) for i=1,8 do - gc.translate(12*i,i==1 and 8 or 14) + gc.translate(12*i,i==1 and 8 or 14) - gc.setLineWidth(16) - gc.setColor(COLOR.Z) - gc.polygon('line',title[i]) + gc.setLineWidth(16) + gc.setColor(COLOR.Z) + gc.polygon('line',title[i]) - gc.setLineWidth(4) - gc.setColor(COLOR.D) - for j=1,#titleTriangles[i]do - gc.polygon('fill',titleTriangles[i][j]) - end + gc.setLineWidth(4) + gc.setColor(COLOR.D) + for j=1,#titleTriangles[i]do + gc.polygon('fill',titleTriangles[i][j]) + end - gc.setColor(.2+.8*titleColor[i][1],.2+.8*titleColor[i][2],.2+.8*titleColor[i][3],.5) - gc.translate(-4,-4) - for j=1,#titleTriangles[i]do - gc.polygon('fill',titleTriangles[i][j]) - end - gc.translate(4,4) + gc.setColor(.2+.8*titleColor[i][1],.2+.8*titleColor[i][2],.2+.8*titleColor[i][3],.5) + gc.translate(-4,-4) + for j=1,#titleTriangles[i]do + gc.polygon('fill',titleTriangles[i][j]) + end + gc.translate(4,4) - gc.translate(-12*i,i==1 and -8 or -14) + gc.translate(-12*i,i==1 and -8 or -14) end --Sure mark TEXTURE.sure=GC.DO{48,64, - {'fRect',0,0,10,27}, - {'fRect',0,0,48,10}, - {'fRect',38,10,10,15}, - {'fRect',19,25,29,9}, - {'fRect',19,25,9,22}, - {'fRect',18,53,11,11}, + {'fRect',0,0,10,27}, + {'fRect',0,0,48,10}, + {'fRect',38,10,10,15}, + {'fRect',19,25,29,9}, + {'fRect',19,25,9,22}, + {'fRect',18,53,11,11}, } --Setting icon TEXTURE.setting=GC.DO{64,64, - {'setLW',8}, - {'dCirc',32,32,18}, - {'setLW',10}, - {'line',52,32,64,32}, - {'line',32,52,32,64}, - {'line',12,32,0,32}, - {'line',32,12,32,0}, - {'line',45,45,55,55}, - {'line',19,45,9,55}, - {'line',19,19,9,9}, - {'line',45,19,55,9}, + {'setLW',8}, + {'dCirc',32,32,18}, + {'setLW',10}, + {'line',52,32,64,32}, + {'line',32,52,32,64}, + {'line',12,32,0,32}, + {'line',32,12,32,0}, + {'line',45,45,55,55}, + {'line',19,45,9,55}, + {'line',19,19,9,9}, + {'line',45,19,55,9}, } --Music mark TEXTURE.music=GC.DO{64,64, - {'setLW',6}, - {'line',19,9,60,7}, - {'setLW',2}, - {'line',20,9,20,49}, - {'line',59,7,59,47}, - {'fElps',11,49,11,8}, - {'fElps',50,47,11,8}, + {'setLW',6}, + {'line',19,9,60,7}, + {'setLW',2}, + {'line',20,9,20,49}, + {'line',59,7,59,47}, + {'fElps',11,49,11,8}, + {'fElps',50,47,11,8}, } --Mute mark TEXTURE.mute=GC.DO{64,64, - {'mDraw',TEXTURE.music,32,32,0,.9}, - {'setLW',4}, - {'line',6,6,57,57}, + {'mDraw',TEXTURE.music,32,32,0,.9}, + {'setLW',4}, + {'line',6,6,57,57}, } --Language mark TEXTURE.language=GC.DO{64,64, - {'setLW',2}, - {'dCirc',32,32,30}, - {'line',2,31,62,31}, - {'line',31,2,31,62}, - {'dArc',10,31,40,-.8,.8}, - {'dArc',53,31,40,2.3,3.9}, + {'setLW',2}, + {'dCirc',32,32,30}, + {'line',2,31,62,31}, + {'line',31,2,31,62}, + {'dArc',10,31,40,-.8,.8}, + {'dArc',53,31,40,2.3,3.9}, } --Info. mark TEXTURE.info=GC.DO{50,50, - {'setLW',3}, - {'dCirc',25,25,22}, - {'fRect',22,11,6,6}, - {'fRect',22,20,6,20}, + {'setLW',3}, + {'dCirc',25,25,22}, + {'fRect',22,11,6,6}, + {'fRect',22,20,6,20}, } --Question mark TEXTURE.question=GC.DO{50,50, - {'setLW',3}, - {'dCirc',25,25,22}, - {'setFT',40}, - {'print','?',17,-2}, + {'setLW',3}, + {'dCirc',25,25,22}, + {'setFT',40}, + {'print','?',17,-2}, } --More mark TEXTURE.more=GC.DO{60,15, - {'fCirc',10,7,6}, - {'fCirc',30,7,6}, - {'fCirc',50,7,6}, + {'fCirc',10,7,6}, + {'fCirc',30,7,6}, + {'fCirc',50,7,6}, } --Back mark TEXTURE.back=GC.DO{60,55, - {'setLW',6}, - {'line',11,10,40,10}, - {'line',10,40,40,40}, - {'dArc',40,25,15,-1.6,1.6}, - {'setLW',4}, - {'line',20,50,10,40,20,30}, + {'setLW',6}, + {'line',11,10,40,10}, + {'line',10,40,40,40}, + {'dArc',40,25,15,-1.6,1.6}, + {'setLW',4}, + {'line',20,50,10,40,20,30}, } --Quit mark TEXTURE.quit=GC.DO{50,50, - {'setCL',1,1,1}, - {'draw',GC.DO{50,50, - {'setLW',7}, - {'line',5,5,45,45}, - {'line',5,45,45,5}, - }} + {'setCL',1,1,1}, + {'draw',GC.DO{50,50, + {'setLW',7}, + {'line',5,5,45,45}, + {'line',5,45,45,5}, + }} } --Quit mark (small) TEXTURE.quit_small=GC.DO{30,30, - {'setCL',1,1,1}, - {'draw',GC.DO{30,30, - {'setLW',4}, - {'line',2,2,28,28}, - {'line',2,28,28,2}, - }} + {'setCL',1,1,1}, + {'draw',GC.DO{30,30, + {'setLW',4}, + {'line',2,2,28,28}, + {'line',2,28,28,2}, + }} } TEXTURE.game={ - restart=GC.DO{32,32,{'setLW',3},{'dArc',16,16,11,.7,5.5},{'setLW',2.5},{'line',21,.7,24,8,16,11}}, - pause=GC.DO{18,23,{'fRect',0,0,3,23},{'fRect',15,0,3,23}}, + restart=GC.DO{32,32,{'setLW',3},{'dArc',16,16,11,.7,5.5},{'setLW',2.5},{'line',21,.7,24,8,16,11}}, + pause=GC.DO{18,23,{'fRect',0,0,3,23},{'fRect',15,0,3,23}}, } --Replay speed buttons TEXTURE.rep={ - rep0=GC.DO{50,50,{'fRect',11,8,8,34},{'fRect',31,8,8,34}}, - repP8=GC.DO{50,50,{'setFT',15},{'print',"0.125x",0,15}}, - repP2=GC.DO{50,50,{'setFT',25},{'print',"0.5x",0,8}}, - rep1=GC.DO{50,50,{'setFT',30},{'print',"1x",7,3}}, - rep2=GC.DO{50,50,{'setFT',30},{'print',"2x",7,3}}, - rep5=GC.DO{50,50,{'setFT',30},{'print',"5x",7,3}}, - step=GC.DO{50,50,{'setFT',30},{'fRect',12,7,4,36},{'setLW',4},{'line',25,14,41,25,25,36}}, + rep0=GC.DO{50,50,{'fRect',11,8,8,34},{'fRect',31,8,8,34}}, + repP8=GC.DO{50,50,{'setFT',15},{'print',"0.125x",0,15}}, + repP2=GC.DO{50,50,{'setFT',25},{'print',"0.5x",0,8}}, + rep1=GC.DO{50,50,{'setFT',30},{'print',"1x",7,3}}, + rep2=GC.DO{50,50,{'setFT',30},{'print',"2x",7,3}}, + rep5=GC.DO{50,50,{'setFT',30},{'print',"5x",7,3}}, + step=GC.DO{50,50,{'setFT',30},{'fRect',12,7,4,36},{'setLW',4},{'line',25,14,41,25,25,36}}, } gc.setCanvas() diff --git a/parts/updateLog.lua b/parts/updateLog.lua index cb06b176..a6c731c2 100644 --- a/parts/updateLog.lua +++ b/parts/updateLog.lua @@ -1,2021 +1,2021 @@ return[=[ 未来模式: - 任务生存; 对称; 大爆炸; 拼方形; 限高无尽挖掘; 连击练习; backfire对战; 7块回合制 - 经典模式分离(9/15/18/19/29); OSD; 强制Misdrop; 拼大于号; 仅4lPC - 极简教程/考试; 教学关; 术语问答; 涂色模式(模仿喷喷, designed by teatube) + 任务生存; 对称; 大爆炸; 拼方形; 限高无尽挖掘; 连击练习; backfire对战; 7块回合制 + 经典模式分离(9/15/18/19/29); OSD; 强制Misdrop; 拼大于号; 仅4lPC + 极简教程/考试; 教学关; 术语问答; 涂色模式(模仿喷喷, designed by teatube) 未来大游戏: - Puyo; Bubble; 2048; 花仙子方块 + Puyo; Bubble; 2048; 花仙子方块 未来Mod: - 修改颜色配置; 只显示场地边框线/顶线; 隐藏hold + 修改颜色配置; 只显示场地边框线/顶线; 隐藏hold 未来按键: - 移动左4~右5(+硬降) (共18键) - 临时启用瞬间移动; 临时禁用das - 深降到底; 空中锁定; 场地平移; 切换攻击模式 - 重置块; 丢弃块; 交换块 - 临时切换高镜头/低镜头 - 切换影子镜头/方块镜头 + 移动左4~右5(+硬降) (共18键) + 临时启用瞬间移动; 临时禁用das + 深降到底; 空中锁定; 场地平移; 切换攻击模式 + 重置块; 丢弃块; 交换块 + 临时切换高镜头/低镜头 + 切换影子镜头/方块镜头 未来小游戏: - Tetro-1010(四/五连块, 2C2N, 若干回合改变重力方向) - Tetra-link; 速算(前缀后缀表达式,二八十六进制) - 连连看; 求合体; 坦克大战; 扫雷; 接水管 + Tetro-1010(四/五连块, 2C2N, 若干回合改变重力方向) + Tetra-link; 速算(前缀后缀表达式,二八十六进制) + 连连看; 求合体; 坦克大战; 扫雷; 接水管 其他未来内容: - 大型任务树模式; 可调场地宽度; 可调攻击系统; 组队战; 实时统计数据可视化 - 重做模式选择UI; 重做模组UI; 高级自定义序列; 加速下落; spike相关统计数据 - 方块位移/旋转动画; 更好的手柄支持; 场地格子边缘线; 模式数据分析; C2规则 - 音效包; 手势操作; 特殊控件(虚拟摇杆等) - 区分各种消除(隔断/架空/混合/彩色/穿墙) - 更复杂的攻击(数量/可抵消延时/不可抵消延时/反击/攻击/防御/洞数/连接/炸弹/厚度) - 更细节的DAS选项; 成就系统; 拓展主题系统 - 工程编译到字节码; task-Z(新AI) - 等级系统; 收集向抽奖; 自适应UI - 自动跳帧; 多方块; 超60帧 + 大型任务树模式; 可调场地宽度; 可调攻击系统; 组队战; 实时统计数据可视化 + 重做模式选择UI; 重做模组UI; 高级自定义序列; 加速下落; spike相关统计数据 + 方块位移/旋转动画; 更好的手柄支持; 场地格子边缘线; 模式数据分析; C2规则 + 音效包; 手势操作; 特殊控件(虚拟摇杆等) + 区分各种消除(隔断/架空/混合/彩色/穿墙) + 更复杂的攻击(数量/可抵消延时/不可抵消延时/反击/攻击/防御/洞数/连接/炸弹/厚度) + 更细节的DAS选项; 成就系统; 拓展主题系统 + 工程编译到字节码; task-Z(新AI) + 等级系统; 收集向抽奖; 自适应UI + 自动跳帧; 多方块; 超60帧 0.16.2: 曲率引擎 Warp drive - 新增: - 新增ARS_Z旋转系统:简化复杂的测试逻辑,统一使用{右,左}(i块为{上,上2},五连块风格模仿) - 添加SRS_X旋转系统:基于SRS,I块和除了PQ的非四连块使用TRS的表 - 改动: - 增大场地晃动的阻力,看起来更舒服 - 平滑下落的消行动画曲线稍微拉直一些 - 消除目标线高度会在消行时跟随平滑下落动画 #208 - 代码: - 重做ai相关,新增BOT模块方便未来接入更多机器人 - 修改主循环帧率限制策略,尝试修复部分设备帧率不稳定(可能消耗更多性能) - 大规模整理ai相关代码 - 方块对象内记录旋转系统 - 大规模整理玩家创建特效相关方法 - 调整loadLib加载安卓so库的策略 - 修复: - master-ph模式录像回放时有不一致 #226 - cc旋转第一个i块会报错 - 回放模式下强制显示ghost时报错 - 复活时命数减少动画位置不正确 - 混战模式的被攻击线位置错误 - 小程序15p开盲打报错 - f11开关全屏时不会自动保存 #230 - 非sudomode下控制台#print非字符串报错 #231 + 新增: + 新增ARS_Z旋转系统:简化复杂的测试逻辑,统一使用{右,左}(i块为{上,上2},五连块风格模仿) + 添加SRS_X旋转系统:基于SRS,I块和除了PQ的非四连块使用TRS的表 + 改动: + 增大场地晃动的阻力,看起来更舒服 + 平滑下落的消行动画曲线稍微拉直一些 + 消除目标线高度会在消行时跟随平滑下落动画 #208 + 代码: + 重做ai相关,新增BOT模块方便未来接入更多机器人 + 修改主循环帧率限制策略,尝试修复部分设备帧率不稳定(可能消耗更多性能) + 大规模整理ai相关代码 + 方块对象内记录旋转系统 + 大规模整理玩家创建特效相关方法 + 调整loadLib加载安卓so库的策略 + 修复: + master-ph模式录像回放时有不一致 #226 + cc旋转第一个i块会报错 + 回放模式下强制显示ghost时报错 + 复活时命数减少动画位置不正确 + 混战模式的被攻击线位置错误 + 小程序15p开盲打报错 + f11开关全屏时不会自动保存 #230 + 非sudomode下控制台#print非字符串报错 #231 0.16.1: 深空 Deep space - 新增: - 新增行号显示(设置可调透明度) - 地图上未解锁的下一个模式会提前显示出来 - 新增SRS_plus旋转系统,添加简单的180度踢墙表(除I块使用TRS表外其他使用一个简单表) - 内置简易TAS工具(在控制台开启) #102 - 小程序别踩白块加入自定义颜色/音乐和一些练习用4k键型模式 - 新增破纪录自动保存录像的开关 #195 - 改动: - 回放模式下会尝试显示至多12next - 堆积模式重做,评判标准改为洞数 - 版面遮挡区域改为灰色 - bpm表改回类c2样式 - 移除kpm速度表 - 调整结算词尺寸 - 关闭msaa - 代码: - 整理框架代码 - 整理玩家绘制代码 - 修复: - 从剪切板导入地图进度不会新解锁任何模式 - 混战模式攻击模式指示器不见了 - rnd和his序列生成算法有小错误 - 回放的时候暂停按钮和播放控制按钮重叠 - 场地顶线之上的红色区域绘制范围不正确 #191 - 自定义游戏可以在一些情况下同时打开ai和任务 #211 - 退出自定义场地菜单重进后画笔设置会被恢复 #213 - MES模块弹出消息卡顿会导致消息浮空 #182 - 选中listBox时按空格会报错 - 暂停时设置能进入彩蛋模式 #206 - 一些画面细节问题 + 新增: + 新增行号显示(设置可调透明度) + 地图上未解锁的下一个模式会提前显示出来 + 新增SRS_plus旋转系统,添加简单的180度踢墙表(除I块使用TRS表外其他使用一个简单表) + 内置简易TAS工具(在控制台开启) #102 + 小程序别踩白块加入自定义颜色/音乐和一些练习用4k键型模式 + 新增破纪录自动保存录像的开关 #195 + 改动: + 回放模式下会尝试显示至多12next + 堆积模式重做,评判标准改为洞数 + 版面遮挡区域改为灰色 + bpm表改回类c2样式 + 移除kpm速度表 + 调整结算词尺寸 + 关闭msaa + 代码: + 整理框架代码 + 整理玩家绘制代码 + 修复: + 从剪切板导入地图进度不会新解锁任何模式 + 混战模式攻击模式指示器不见了 + rnd和his序列生成算法有小错误 + 回放的时候暂停按钮和播放控制按钮重叠 + 场地顶线之上的红色区域绘制范围不正确 #191 + 自定义游戏可以在一些情况下同时打开ai和任务 #211 + 退出自定义场地菜单重进后画笔设置会被恢复 #213 + MES模块弹出消息卡顿会导致消息浮空 #182 + 选中listBox时按空格会报错 + 暂停时设置能进入彩蛋模式 #206 + 一些画面细节问题 0.16.0: 空间站 Space station - 模式: - 新增堆叠模式 #142 - 新增 TSD-u - TSD-h 微调参数,并且在同一列只允许连续做最多三个T2 - 马拉松/干旱/全清挑战 添加倒计时线 #153 - 大师-ex 新增段位点显示 #149 - 大师-l/u难度名改为n/h - 大师-n 新增500~1000 - 大师-h 降低时间门槛至183秒 - 无尽-pc 降低最高评级要求至50,同时加快速度提升 - 隐形-n/h/l 降低S和A评级标准 - 加回一个隐藏模式的入口 - BGM: - 新增 Beat5th (用于竞速五连块) - 新增 Here (用于生存第四/五难度) - 新增 Shift (用于挖掘) - 新增 There (用于堆积) - 新增 Secret8th Remix (用于master-hard) - 调整 Nil (主菜单) - 旋转系统: - 支持非标/无旋转中心 - 每个旋转系统有自己独特的旋转中心样式 - 每个旋转系统可以单独设定每个方块是否显示旋转中心 - 新增 BiRS (Bias RS,实验性) - 新增 ASC,ASCplus (添加实验性180度踢墙) - 新增 Classic,Classic_plus (添加180度旋转) #173 - 调整 TRS中S5和Z5的踢墙表,增加Ospin时SZ按反的尝试 - 调整几个旋转系统的名字 - UI: - 大多直角改为圆角 - 大多数线条更细了 - 降低色彩饱和度 - 全新游戏内界面 - 全新可翻页暂停界面 - 更换更简洁的加载动画,合并开场动画 - 其他新增&改动: - 新增小亚(xiaoya)语音包 - 可以通过剪切板导入/导出录像 - 添加重开/暂停按钮位置设定 - 自定义游戏的序列任务场地等数据退出保存 - 减少AI与自定义序列同开的限制 #136 - 新增noInitSZO模式参数,自动跳过开局SZO(目前仅用于马拉松/20G模式) #121 - 第一次启动会自动进入语言设置菜单 #150 - 回放时版面遮挡会变成半透明 #143 - 开启msaa(反锯齿,实验性) - resetall命令最后一瞬间才删除文件 #133 - 修改debug模式鼠标位置显示方式 - 增加滑条控件测试声音的间隔 - 声音设置界面添加静音按钮 - 微调wing背景 - 更新历史附带github上的issue编号(如果有) - 代码: - 重构WS模块,可能解决部分联网游戏中的概率thread error问题 - 升级BGM/IMG/SKIN模块,资源不再需要启动时加载好,提升加载速度节约资源占用 - 鼠标松开时如果有选中的控件就不触发场景的鼠标松开/点击事件 - 优化游戏场景性能,移除回放按钮hideF函数 - 主循环略微优化 - 修复: - 只有屏幕宽度异常时自动刷新窗口尺寸 #120 - 录像回放速度和按钮状态刷新问题 #159 #160 - 20G并不禁用各种软降n格键 - das为0时预览动画不正确 - 存档转换时两个20G模式数据弄反了 - 游戏启动的时候检测配色不能为炸弹格 #147 - marathon_bfmax死亡判定不合适 #127 - 粘贴序列检测到损坏时后续操作出现问题 #89 - 控制台print命令输入非文件报错 #124 - 小程序cubefield的碰撞判定移出draw,解决低绘制帧率导致漏判定的问题 #138 - 部分模式往场地内部绘制信息时偏移不正确 #181 - 限制最大自定义序列长度(2600) #122 - 序列和任务超长导致渲染开销太大卡死 #137 - 触屏设置在窗口非默认长宽比时边缘网格缺失 - 有屏幕滚动的场景鼠标拖动时控件失焦 - 导入设置(包括剪切板和云存档)时部分设置不立刻生效 - 一些模式往场地绘制信息时遮罩不合适 + 模式: + 新增堆叠模式 #142 + 新增 TSD-u + TSD-h 微调参数,并且在同一列只允许连续做最多三个T2 + 马拉松/干旱/全清挑战 添加倒计时线 #153 + 大师-ex 新增段位点显示 #149 + 大师-l/u难度名改为n/h + 大师-n 新增500~1000 + 大师-h 降低时间门槛至183秒 + 无尽-pc 降低最高评级要求至50,同时加快速度提升 + 隐形-n/h/l 降低S和A评级标准 + 加回一个隐藏模式的入口 + BGM: + 新增 Beat5th (用于竞速五连块) + 新增 Here (用于生存第四/五难度) + 新增 Shift (用于挖掘) + 新增 There (用于堆积) + 新增 Secret8th Remix (用于master-hard) + 调整 Nil (主菜单) + 旋转系统: + 支持非标/无旋转中心 + 每个旋转系统有自己独特的旋转中心样式 + 每个旋转系统可以单独设定每个方块是否显示旋转中心 + 新增 BiRS (Bias RS,实验性) + 新增 ASC,ASCplus (添加实验性180度踢墙) + 新增 Classic,Classic_plus (添加180度旋转) #173 + 调整 TRS中S5和Z5的踢墙表,增加Ospin时SZ按反的尝试 + 调整几个旋转系统的名字 + UI: + 大多直角改为圆角 + 大多数线条更细了 + 降低色彩饱和度 + 全新游戏内界面 + 全新可翻页暂停界面 + 更换更简洁的加载动画,合并开场动画 + 其他新增&改动: + 新增小亚(xiaoya)语音包 + 可以通过剪切板导入/导出录像 + 添加重开/暂停按钮位置设定 + 自定义游戏的序列任务场地等数据退出保存 + 减少AI与自定义序列同开的限制 #136 + 新增noInitSZO模式参数,自动跳过开局SZO(目前仅用于马拉松/20G模式) #121 + 第一次启动会自动进入语言设置菜单 #150 + 回放时版面遮挡会变成半透明 #143 + 开启msaa(反锯齿,实验性) + resetall命令最后一瞬间才删除文件 #133 + 修改debug模式鼠标位置显示方式 + 增加滑条控件测试声音的间隔 + 声音设置界面添加静音按钮 + 微调wing背景 + 更新历史附带github上的issue编号(如果有) + 代码: + 重构WS模块,可能解决部分联网游戏中的概率thread error问题 + 升级BGM/IMG/SKIN模块,资源不再需要启动时加载好,提升加载速度节约资源占用 + 鼠标松开时如果有选中的控件就不触发场景的鼠标松开/点击事件 + 优化游戏场景性能,移除回放按钮hideF函数 + 主循环略微优化 + 修复: + 只有屏幕宽度异常时自动刷新窗口尺寸 #120 + 录像回放速度和按钮状态刷新问题 #159 #160 + 20G并不禁用各种软降n格键 + das为0时预览动画不正确 + 存档转换时两个20G模式数据弄反了 + 游戏启动的时候检测配色不能为炸弹格 #147 + marathon_bfmax死亡判定不合适 #127 + 粘贴序列检测到损坏时后续操作出现问题 #89 + 控制台print命令输入非文件报错 #124 + 小程序cubefield的碰撞判定移出draw,解决低绘制帧率导致漏判定的问题 #138 + 部分模式往场地内部绘制信息时偏移不正确 #181 + 限制最大自定义序列长度(2600) #122 + 序列和任务超长导致渲染开销太大卡死 #137 + 触屏设置在窗口非默认长宽比时边缘网格缺失 + 有屏幕滚动的场景鼠标拖动时控件失焦 + 导入设置(包括剪切板和云存档)时部分设置不立刻生效 + 一些模式往场地绘制信息时遮罩不合适 0.15.6: 强化装甲 Reinforced Armor - 新增: - 新BGM:Nil(用于主菜单) - 新BGM:Secret7th Remix(用于master-ultimate,by 柒栎流星) - 新模式:Attack竞速 - master-ultimate模式新增500~1000 - 支持调整录像回放速度和逐帧播放 - 方块和场地的亮度参数调整 - ghost样式预览 #95 - 模式地图支持按住ctrl或alt后方向键功能变为缩放 - 控制台新增resetall命令 #111 - 改动: - TRS中T的踢墙表2→1(2→3)新增-1,-1(+1,-1) #98 - 回放模式下显示隐形的当前方块和ghost #105 - ultra模式倒计时改为帧数 - 微调暂停界面布局 - 微调线框ghost样式 - 简化点击特效 - 调整Zen模式后三个模式位置 - 键盘可以控制地图缩放 #101 - 代码: - 修改几个master模式的内部名称 - 修复: - 录像回放成绩会进入排行 #96 - 不能加载开启了mod的录像 - IRS生效后不会自动松开旋转键 #114 - TRS中p和q进不去stsd洞 - 消除特效关闭后溅射特效不会显示 - 房间内非游戏状态下设置按钮可见性错误 - 设置界面的ui小问题 - 镜头上移(和垃圾行下压高度)会导致目标消除线位置不正确 #97 - 从暂停场景返回时会把当前时间计入当日游戏时间 - 从回放菜单进入回放时还显示重开按钮并且重开键有用 - 键盘控制滑条或者选择器时报错 - 切换场景时隐藏的控件闪过一帧 #116 + 新增: + 新BGM:Nil(用于主菜单) + 新BGM:Secret7th Remix(用于master-ultimate,by 柒栎流星) + 新模式:Attack竞速 + master-ultimate模式新增500~1000 + 支持调整录像回放速度和逐帧播放 + 方块和场地的亮度参数调整 + ghost样式预览 #95 + 模式地图支持按住ctrl或alt后方向键功能变为缩放 + 控制台新增resetall命令 #111 + 改动: + TRS中T的踢墙表2→1(2→3)新增-1,-1(+1,-1) #98 + 回放模式下显示隐形的当前方块和ghost #105 + ultra模式倒计时改为帧数 + 微调暂停界面布局 + 微调线框ghost样式 + 简化点击特效 + 调整Zen模式后三个模式位置 + 键盘可以控制地图缩放 #101 + 代码: + 修改几个master模式的内部名称 + 修复: + 录像回放成绩会进入排行 #96 + 不能加载开启了mod的录像 + IRS生效后不会自动松开旋转键 #114 + TRS中p和q进不去stsd洞 + 消除特效关闭后溅射特效不会显示 + 房间内非游戏状态下设置按钮可见性错误 + 设置界面的ui小问题 + 镜头上移(和垃圾行下压高度)会导致目标消除线位置不正确 #97 + 从暂停场景返回时会把当前时间计入当日游戏时间 + 从回放菜单进入回放时还显示重开按钮并且重开键有用 + 键盘控制滑条或者选择器时报错 + 切换场景时隐藏的控件闪过一帧 #116 0.15.5: 姿态调整 RCS Control - 新增: - 新增录像回放菜单,自动升级旧版本录像格式,可以看以前保存的录像了 - 可选六种阴影样式 - 攻击缓冲条中的攻击显示时间刻度(0.5秒一格) - 新BGM:Rectification(用于master-final的前500台) - 改动: - 玩家准备颜色改为天蓝色,连接成功改为半透明填充 - MES模块的默认消息类型会带上颜色 - 调整房间内准备状态文本颜色 - 优化sysFX模块绘制性能,新的点击特效 - 极简菜单开关放到屏幕外减少误触 - 减轻误硬降打断音量 - 代码: - REPLAY不再需要保存到本地的数据,每次启动自动刷新录像文件列表 - 字符串拓展模块和DATA模块新增方法 - 修复: - GC.DO模块创建超过系统限制大小的画布导致报错 - 玩家退出房间时移除键错误导致崩溃 + 新增: + 新增录像回放菜单,自动升级旧版本录像格式,可以看以前保存的录像了 + 可选六种阴影样式 + 攻击缓冲条中的攻击显示时间刻度(0.5秒一格) + 新BGM:Rectification(用于master-final的前500台) + 改动: + 玩家准备颜色改为天蓝色,连接成功改为半透明填充 + MES模块的默认消息类型会带上颜色 + 调整房间内准备状态文本颜色 + 优化sysFX模块绘制性能,新的点击特效 + 极简菜单开关放到屏幕外减少误触 + 减轻误硬降打断音量 + 代码: + REPLAY不再需要保存到本地的数据,每次启动自动刷新录像文件列表 + 字符串拓展模块和DATA模块新增方法 + 修复: + GC.DO模块创建超过系统限制大小的画布导致报错 + 玩家退出房间时移除键错误导致崩溃 0.15.4: 近地轨道 Low Earth Orbit - 新增: - 自定义房间支持设置密码,允许任何人开大房间 - 房间列表ui调整 - 新增误硬降打断延迟机制 - 改动: - 同时允许进入0.15.2/3/4版本的房间 - 自定义游戏重置功能会重置场地/序列/任务了 - 文件保存时一般不再弹出保存成功的消息 - 更好地响应系统长按 - 控件被隐藏时会自动失去焦点 - 微调输入框边框样式 - 修改自定义游戏默认背景和自定义房间默认bgm - 小程序tap不再认为鼠标左右键为同一个键 - 移除20G极限难度400~500背景 #86 - 所有mod都会让成绩无效 #90 - 代码: - MES模块升级,文件保存或json编解码失败时会有代码位置指示消息 - 修改房间准备状态变量修改条件,减少出现问题状态的可能性 - 控件模块升级,优化交互体验 - 略微优化ws模块性能 - 修复: - c4w模式一直响警报 - 1/30的概率死亡后濒死音效错误播放 - 服务器传来警告/错误信息时弹出消息的奇怪格式 - 序列编辑粘贴不当格式数据会导致后续错误 #89 - 开启3D方块时消行特效也会有两个叠在一起 - hold被禁用时虚拟按键不消失 - 科研模式评级错误 - 自定义模式进入消除模式后不再恢复正常无尽模式 #91 - 点击联网游戏按钮后可以切去其他场景然后引发问题 - ws模块连接流程可以被read打断 - ws模块trigChn无条件一直push占用内存 + 新增: + 自定义房间支持设置密码,允许任何人开大房间 + 房间列表ui调整 + 新增误硬降打断延迟机制 + 改动: + 同时允许进入0.15.2/3/4版本的房间 + 自定义游戏重置功能会重置场地/序列/任务了 + 文件保存时一般不再弹出保存成功的消息 + 更好地响应系统长按 + 控件被隐藏时会自动失去焦点 + 微调输入框边框样式 + 修改自定义游戏默认背景和自定义房间默认bgm + 小程序tap不再认为鼠标左右键为同一个键 + 移除20G极限难度400~500背景 #86 + 所有mod都会让成绩无效 #90 + 代码: + MES模块升级,文件保存或json编解码失败时会有代码位置指示消息 + 修改房间准备状态变量修改条件,减少出现问题状态的可能性 + 控件模块升级,优化交互体验 + 略微优化ws模块性能 + 修复: + c4w模式一直响警报 + 1/30的概率死亡后濒死音效错误播放 + 服务器传来警告/错误信息时弹出消息的奇怪格式 + 序列编辑粘贴不当格式数据会导致后续错误 #89 + 开启3D方块时消行特效也会有两个叠在一起 + hold被禁用时虚拟按键不消失 + 科研模式评级错误 + 自定义模式进入消除模式后不再恢复正常无尽模式 #91 + 点击联网游戏按钮后可以切去其他场景然后引发问题 + ws模块连接流程可以被read打断 + ws模块trigChn无条件一直push占用内存 0.15.3: 卫星 Satellite - 新增: - 开房支持自定义参数 - 房间内玩家框会按照排名排序,右侧显示数据,鼠标放上显示更多信息 - 新BGM:Moonbeam(用于pc挑战两个最难难度) - 云存档(统计-数据管理菜单) - 使用MES模块替换LOG模块 - 新模式:无摩擦(隐藏,在一级设置菜单) - 改动: - 滚轮也可以控制屏幕滚动 - 房间内消息提示标记样式修改 - 选语言界面按钮添加颜色 - 增加震动档位数 - ui在非默认长宽比下也会贴边了 - 简化staff场景键盘进隐藏的操作,移除赞助id颜色 - 更长的尝试连接ws时间 - 隐形模式背景更不干扰 - 优化注册菜单交互 - 移除省流模式 - 代码: - 升级SCR模块,整理大量坐标系变换代码 - 控制台添加切换/管理服务器的命令 - string/table扩展模块升级 - 收ws消息的task不再永久停留于任务队列 - 控件模块允许不提供控件名 - 修复: - NX模组不会让成绩无效 - 数据保存到统计的时机错误 - 加载没有翻译名称的模式时报错 - 输入框交互问题 - 加载不出的错误格式头像文件会导致崩溃 - 开启3D场地后shader覆盖了贴图透明度 - 软降das设为0时需要按住两帧才能触发0arr #76 - 复活和联网玩家进入挂起状态的触发顺序错误 - 非极简/非任务判负后仍继续检测后续其他判定 - ws连接失败时不能正确显示消息 - 联网房间从设置返回后背景错误 - 声音设置cv控件值不同步 - test场景不能退出 + 新增: + 开房支持自定义参数 + 房间内玩家框会按照排名排序,右侧显示数据,鼠标放上显示更多信息 + 新BGM:Moonbeam(用于pc挑战两个最难难度) + 云存档(统计-数据管理菜单) + 使用MES模块替换LOG模块 + 新模式:无摩擦(隐藏,在一级设置菜单) + 改动: + 滚轮也可以控制屏幕滚动 + 房间内消息提示标记样式修改 + 选语言界面按钮添加颜色 + 增加震动档位数 + ui在非默认长宽比下也会贴边了 + 简化staff场景键盘进隐藏的操作,移除赞助id颜色 + 更长的尝试连接ws时间 + 隐形模式背景更不干扰 + 优化注册菜单交互 + 移除省流模式 + 代码: + 升级SCR模块,整理大量坐标系变换代码 + 控制台添加切换/管理服务器的命令 + string/table扩展模块升级 + 收ws消息的task不再永久停留于任务队列 + 控件模块允许不提供控件名 + 修复: + NX模组不会让成绩无效 + 数据保存到统计的时机错误 + 加载没有翻译名称的模式时报错 + 输入框交互问题 + 加载不出的错误格式头像文件会导致崩溃 + 开启3D场地后shader覆盖了贴图透明度 + 软降das设为0时需要按住两帧才能触发0arr #76 + 复活和联网玩家进入挂起状态的触发顺序错误 + 非极简/非任务判负后仍继续检测后续其他判定 + ws连接失败时不能正确显示消息 + 联网房间从设置返回后背景错误 + 声音设置cv控件值不同步 + test场景不能退出 0.15.2: 天线 Antenna - 新增: - 新BGM:Memory(用于ultra) - 新BGM:Space(用于主菜单) - 新BGM:Exploration(用于排位战菜单) - 排位战菜单(只是菜单,没有功能) - 部分场景可以滚动屏幕(简化视频设置/触摸设置/自定义游戏界面) - 改动: - 观战结束后保留观战状态 - 移除initSkip - 修复音乐super7th的循环问题并减小低音部分音量 - 降低所有背景的亮度 - 返回按钮改为图标 - 控制台添加一个移除设置项的命令 - 代码: - 整理主循环代码,略微提升性能 - 修复: - 进入房间时其他玩家的准备状态显示不正确 - pc练习模式可以在场地未出现时落块 - 不能正确粘贴序列 - 节日判定表达式错误 + 新增: + 新BGM:Memory(用于ultra) + 新BGM:Space(用于主菜单) + 新BGM:Exploration(用于排位战菜单) + 排位战菜单(只是菜单,没有功能) + 部分场景可以滚动屏幕(简化视频设置/触摸设置/自定义游戏界面) + 改动: + 观战结束后保留观战状态 + 移除initSkip + 修复音乐super7th的循环问题并减小低音部分音量 + 降低所有背景的亮度 + 返回按钮改为图标 + 控制台添加一个移除设置项的命令 + 代码: + 整理主循环代码,略微提升性能 + 修复: + 进入房间时其他玩家的准备状态显示不正确 + pc练习模式可以在场地未出现时落块 + 不能正确粘贴序列 + 节日判定表达式错误 0.15.1: 耀斑 Flare - 新增: - 允许开局跳过若干next时,倒计时数字颜色会略有不同 - 改动: - 微调联网房间内准备前ui,修改键盘准备/观战快捷键 - 混战模式和联网对战允许开局跳块 - 优化爆发累计和缓冲预警的画面效果 - 优化开局倒计时画面效果 - 修复自定义-消除模式左侧信息显示问题 - 修复: - 一处cc库相关的报错 - [服务器]观战玩家会影响游戏结束判定 + 新增: + 允许开局跳过若干next时,倒计时数字颜色会略有不同 + 改动: + 微调联网房间内准备前ui,修改键盘准备/观战快捷键 + 混战模式和联网对战允许开局跳块 + 优化爆发累计和缓冲预警的画面效果 + 优化开局倒计时画面效果 + 修复自定义-消除模式左侧信息显示问题 + 修复: + 一处cc库相关的报错 + [服务器]观战玩家会影响游戏结束判定 0.15.0: 超新星 Supernova - 新增: - [双端]观战功能 - spike计数器 - 全新房间列表ui - 重新启用临界时间(基于帧) - 新增虚拟按键形状设置 - 改动: - 主菜单按钮行为更容易理解,添加连接音效和连接成功音效 - 移除next和hold栏上的文本 - 聊天窗交互更自然 - 词典添加游戏官网词条 - 修改默认空用户名 - 更新cc模块 - 代码: - 升级控件模块 - 升级本地和服务器提供的房间数据格式 - 修复: - 结算显示胜利者时可能报错 - "游戏中"标记会被带到别的房间 - 命令行执行空白字符串报错 #63 + 新增: + [双端]观战功能 + spike计数器 + 全新房间列表ui + 重新启用临界时间(基于帧) + 新增虚拟按键形状设置 + 改动: + 主菜单按钮行为更容易理解,添加连接音效和连接成功音效 + 移除next和hold栏上的文本 + 聊天窗交互更自然 + 词典添加游戏官网词条 + 修改默认空用户名 + 更新cc模块 + 代码: + 升级控件模块 + 升级本地和服务器提供的房间数据格式 + 修复: + 结算显示胜利者时可能报错 + "游戏中"标记会被带到别的房间 + 命令行执行空白字符串报错 #63 0.14.8: 冰激凌 Icecream - 新增: - 新增无尽pc挑战模式 - 联网对战游戏开始前可以显示其他玩家的连接状态 - 改动: - 增加自定义游戏锁延刷新次数挡位 - 减少生存模式最高两个难度的锁延刷新次数 - 代码: - 简化LOG模块用法 - textBox控件在隐藏时也会自动滚动 - 修复: - 聊天窗带空格的消息会被截断 + 新增: + 新增无尽pc挑战模式 + 联网对战游戏开始前可以显示其他玩家的连接状态 + 改动: + 增加自定义游戏锁延刷新次数挡位 + 减少生存模式最高两个难度的锁延刷新次数 + 代码: + 简化LOG模块用法 + textBox控件在隐藏时也会自动滚动 + 修复: + 聊天窗带空格的消息会被截断 0.14.7: 烈日 Burn - 新增: - 屏幕下方版本号常驻显示 - 全新动态玩家布局,房间内显示房间信息 - 房间内按回车键聊天 - 加入hisPool序列模式 - 新增垃圾行缓冲条总数警告 - 添加模式环境变量bufferLimit,攻击缓冲上限可以调整 - 添加模式环境变量heightLimit,允许超屏最大高度可以调整 - 添加模式环境变量initSkip,允许开局前用hold跳过若干个方块 - 玩家个人信息栏下部显示在线玩家数量 - 登录界面可选保存密码 - 添加两个虚拟按键预设槽位 - 改动: - 优化性能 - 词典新增两个方块游戏词条 - 换了个细一些的字体 - 超高场地默认不再判负 - 删除虚拟按键颜色 - 本地玩家也会显示用户名 - 单挑模式的bgm全都换成battle - 拆分全员准备和连接ws准备开局的提示 - 取消软件锁功能 - 简化击杀标记 - 控制台支持滚轮和键盘导航 - 缩短联网ping间隔和自我认定掉线时间 - 调整rnd出块算法的一些细节 - 更新naki立绘 - 代码: - 控件系统hide机制大改 - 场景模块支持拖拽文件(夹)事件 - 允许模式给每个玩家初始化多个任务 - 升级table扩展模块 - 修复: - 联网对战对手画面经常失去同步 - 本地混战模式ai死亡时报错 - hold会让锁延刷新次数超出上限 - netPlayer模块重大问题 - 低帧率下录像播放时间差会不断增加 + 新增: + 屏幕下方版本号常驻显示 + 全新动态玩家布局,房间内显示房间信息 + 房间内按回车键聊天 + 加入hisPool序列模式 + 新增垃圾行缓冲条总数警告 + 添加模式环境变量bufferLimit,攻击缓冲上限可以调整 + 添加模式环境变量heightLimit,允许超屏最大高度可以调整 + 添加模式环境变量initSkip,允许开局前用hold跳过若干个方块 + 玩家个人信息栏下部显示在线玩家数量 + 登录界面可选保存密码 + 添加两个虚拟按键预设槽位 + 改动: + 优化性能 + 词典新增两个方块游戏词条 + 换了个细一些的字体 + 超高场地默认不再判负 + 删除虚拟按键颜色 + 本地玩家也会显示用户名 + 单挑模式的bgm全都换成battle + 拆分全员准备和连接ws准备开局的提示 + 取消软件锁功能 + 简化击杀标记 + 控制台支持滚轮和键盘导航 + 缩短联网ping间隔和自我认定掉线时间 + 调整rnd出块算法的一些细节 + 更新naki立绘 + 代码: + 控件系统hide机制大改 + 场景模块支持拖拽文件(夹)事件 + 允许模式给每个玩家初始化多个任务 + 升级table扩展模块 + 修复: + 联网对战对手画面经常失去同步 + 本地混战模式ai死亡时报错 + hold会让锁延刷新次数超出上限 + netPlayer模块重大问题 + 低帧率下录像播放时间差会不断增加 0.14.6: 午 Noon - 新增: - 联网对战房间内添加设置入口,未准备就能修改设置 - 房间列表界面支持点选和平滑滚动 - 未获取到用户头像时显示默认方块头像(uid对应),设置添加省流开关(不加载头像) - 新BGM:Hope(用于master-ex) - 新背景:Blockfall(用于无尽和自定义游戏默认) - 新背景:Blockspace(用于master-ex) - 旧皮肤:Matte(MrZ) - 自定义游戏菜单新增重置按钮 - 自定义场地三个鼠标键均可自定义颜色 - 改动: - 存档管理功能移至命令行改为手动删文件清除,说明位于词典内 - 微调网战房间内ui,全员准备后会有提示 - 自定义场地三个鼠标键均可自定义颜色 - 简化进入控制台的方法,增加新命令 - 取消鼠标右键返回 - 更改游戏图标 - Ospin - 代码: - 升级doGC模块,调整命令集 - 升级控件模块,支持给部分控件开关声音,属性配置代码整理 - 整理代码习惯,常量字符串全部改用单引号 - 修复: - 触屏虚拟按键松开后按钮还亮着 - 旋转机制的一个错误设计导致高速经典转不动 - 科研模式不会结束游戏 - ospin表和JL测试顺序的问题 - 模式禁止mod也会显示开了什么mod - 谜题数据解析时错误解析最后的空白符 - blackhole和blockrain背景不适配大小屏幕 - 游戏结束相关文本问题 - Ospin + 新增: + 联网对战房间内添加设置入口,未准备就能修改设置 + 房间列表界面支持点选和平滑滚动 + 未获取到用户头像时显示默认方块头像(uid对应),设置添加省流开关(不加载头像) + 新BGM:Hope(用于master-ex) + 新背景:Blockfall(用于无尽和自定义游戏默认) + 新背景:Blockspace(用于master-ex) + 旧皮肤:Matte(MrZ) + 自定义游戏菜单新增重置按钮 + 自定义场地三个鼠标键均可自定义颜色 + 改动: + 存档管理功能移至命令行改为手动删文件清除,说明位于词典内 + 微调网战房间内ui,全员准备后会有提示 + 自定义场地三个鼠标键均可自定义颜色 + 简化进入控制台的方法,增加新命令 + 取消鼠标右键返回 + 更改游戏图标 + Ospin + 代码: + 升级doGC模块,调整命令集 + 升级控件模块,支持给部分控件开关声音,属性配置代码整理 + 整理代码习惯,常量字符串全部改用单引号 + 修复: + 触屏虚拟按键松开后按钮还亮着 + 旋转机制的一个错误设计导致高速经典转不动 + 科研模式不会结束游戏 + ospin表和JL测试顺序的问题 + 模式禁止mod也会显示开了什么mod + 谜题数据解析时错误解析最后的空白符 + blackhole和blockrain背景不适配大小屏幕 + 游戏结束相关文本问题 + Ospin 0.14.5: 晨 Morn - 新增: - 新增BGM:Empty(用于节日主题,by ERM) - 新增BGM:Battle(用于单挑L/U难度,by Aether) - 增加玩家个人信息显示框 - 音乐室显示音乐作者 - 新增开5人房的按钮 - 小程序dtw增加街机模式 - 改动: - 微调TRS中PQT5J5L5的踢墙表 - 加强消四,增加b2b点数(100→150) - 增强hpc攻击力(2→4),修改pc和hpc对b2b点数的影响 - 自定义游戏设置会自动保存,默认设置为无重力科研 - 调低竞速模式部分评价要求,科研模式通关条件改为100攻击(原200) - 调整master-ph命数奖励 - 对战背景改为主题默认背景 - 修改硬降音效 - 主菜单语言按钮改为地球图标,移到左上角 - 词典修改部分词条,调整词条顺序(意见来自群友 库德里尔) - 移除词典中两个不必要的个人词条 - 词典支持左右键翻页,添加触屏可用的翻页按钮 - "命令行"改名控制台 - 更新词典中的茶服域名 - 代码: - 文件模块升级 - 控件系统升级,部分控件的text属性改为任意可绘制对象 - 新增users模块用来管理网络用户缓存信息 - play场景改名game - 重构GAME.frame相关内容 - 大规模整理代码 - 修复: - 登录界面邮箱格式判定错误 - 调整主菜单点击联网游戏按钮代码的逻辑 - 没开ihs的时候提前hold会死 - 修复锁延刷新次数比显示(设置)的多一次 - 网络玩家倒计时阶段按键会让别人看到的录像播放不正确 - c4w模式回放时初始地形会不一样 - 上踢无限悬空 + 新增: + 新增BGM:Empty(用于节日主题,by ERM) + 新增BGM:Battle(用于单挑L/U难度,by Aether) + 增加玩家个人信息显示框 + 音乐室显示音乐作者 + 新增开5人房的按钮 + 小程序dtw增加街机模式 + 改动: + 微调TRS中PQT5J5L5的踢墙表 + 加强消四,增加b2b点数(100→150) + 增强hpc攻击力(2→4),修改pc和hpc对b2b点数的影响 + 自定义游戏设置会自动保存,默认设置为无重力科研 + 调低竞速模式部分评价要求,科研模式通关条件改为100攻击(原200) + 调整master-ph命数奖励 + 对战背景改为主题默认背景 + 修改硬降音效 + 主菜单语言按钮改为地球图标,移到左上角 + 词典修改部分词条,调整词条顺序(意见来自群友 库德里尔) + 移除词典中两个不必要的个人词条 + 词典支持左右键翻页,添加触屏可用的翻页按钮 + "命令行"改名控制台 + 更新词典中的茶服域名 + 代码: + 文件模块升级 + 控件系统升级,部分控件的text属性改为任意可绘制对象 + 新增users模块用来管理网络用户缓存信息 + play场景改名game + 重构GAME.frame相关内容 + 大规模整理代码 + 修复: + 登录界面邮箱格式判定错误 + 调整主菜单点击联网游戏按钮代码的逻辑 + 没开ihs的时候提前hold会死 + 修复锁延刷新次数比显示(设置)的多一次 + 网络玩家倒计时阶段按键会让别人看到的录像播放不正确 + c4w模式回放时初始地形会不一样 + 上踢无限悬空 0.14.4: 日出 Sunrise - 新增: - 添加触摸/点击特效开关 - 新增BGM:super7th(用于master-ph模式) - 新增BGM:vacuum(用于节日主题) - 改动: - 自定义场地默认使用智能画笔 - 对战房间的准备按钮颜色和文本会随状态改变 - 联网对战时禁用鼠标右键返回 - 添加触摸/点击特效开关 - 修改隐形模式BGM配置 - 更换催促等待提示音 - 不再接受过老版本的存档 - 修复: - 玩家死亡消息以服务器为准,录像不同步不再影响结算 - O块在变形后hold失去名字和颜色属性 - master-ph错误 - 注册时部分合法邮箱格式会被判错 - his序列模式算法错误 - 小程序2048出新格的逻辑错误 - 小程序15p盲打颜色配置错误 - 一个小程序入口名错误 + 新增: + 添加触摸/点击特效开关 + 新增BGM:super7th(用于master-ph模式) + 新增BGM:vacuum(用于节日主题) + 改动: + 自定义场地默认使用智能画笔 + 对战房间的准备按钮颜色和文本会随状态改变 + 联网对战时禁用鼠标右键返回 + 添加触摸/点击特效开关 + 修改隐形模式BGM配置 + 更换催促等待提示音 + 不再接受过老版本的存档 + 修复: + 玩家死亡消息以服务器为准,录像不同步不再影响结算 + O块在变形后hold失去名字和颜色属性 + master-ph错误 + 注册时部分合法邮箱格式会被判错 + his序列模式算法错误 + 小程序2048出新格的逻辑错误 + 小程序15p盲打颜色配置错误 + 一个小程序入口名错误 0.14.3: 曙光 Morning Twilight - 改动: - 尝试进联网菜单的两步都完成前再次点击按钮无效 - 自动登录时机修改为ws-app连接成功并且版本是最新 - 微调玩家准备相关的交互 - 进房固定1.26秒cd - 文本框控件不再有新消息提示音 - 修复: - 修复test场景触屏点击报错 + 改动: + 尝试进联网菜单的两步都完成前再次点击按钮无效 + 自动登录时机修改为ws-app连接成功并且版本是最新 + 微调玩家准备相关的交互 + 进房固定1.26秒cd + 文本框控件不再有新消息提示音 + 修复: + 修复test场景触屏点击报错 0.14.2: 破晓 Dawn - 新增: - 重新启用注册菜单 - 改动: - 优化一些联网对战相关内容 - 攻击特效从全局改为玩家设置项一部分 - 修复: - 一些联网对战问题 - 马拉松模式忘了删测试用代码 + 新增: + 重新启用注册菜单 + 改动: + 优化一些联网对战相关内容 + 攻击特效从全局改为玩家设置项一部分 + 修复: + 一些联网对战问题 + 马拉松模式忘了删测试用代码 0.14.1: 拂晓 Daybreak - 改动: - 为了更好的游戏体验,手机只能开单挑房,电脑开多人房(不建议),特殊用户可以开更大的房 - 增加联网对战模式的垃圾行上涨速度 - 修复: - 一些联网对战的bug + 改动: + 为了更好的游戏体验,手机只能开单挑房,电脑开多人房(不建议),特殊用户可以开更大的房 + 增加联网对战模式的垃圾行上涨速度 + 修复: + 一些联网对战的bug 0.14.0: 地平线 The Horizon - 新增: - 重新开放联网对战测试!!! - 主菜单UI更新,改变几个场景间的关系 - 场地晃动加入旋转分量 - 加入c2和mess序列模式,可以在自定义或mod中开启 - 新模式:Backfire(四个难度) - 新背景:BlackHole(用于Backfire) - 新增BGM:echo(用于Backfire), hang out(用于两个小程序) - 调整自定义场地的ui,可以看到鼠标不同按键对应画笔颜色 - 小程序DTW增加双押功能 - 新增绘制优化设置(手机开启可能加速,电脑花屏关闭可能解决) - 改动: - 错误处理机制大升级,更不容易闪退(CC爆炸除外) - 赞助名单移至staff场景并添加动画(已经在榜上的可以来定制颜色!) - 修改GM模式的名称和段位名以及修改连带内容,加高成绩上限,修复一个旧版本存档转换错误 - 更新存档版本时若需要会自动重启 - 鼠标按下时光标显示会变化 - 优化场地绘制交互,添加一个鼠标功能指示器 - 微调生存模式下落速度 - 修改时间字符串格式 - 词典不再大小写敏感 - 调整徽章图标,添加naki立绘 - 报错时会把traceback信息保存到日志文件便于debug - cmd添加一些测试用命令和一些文件管理命令,可以用于自行修复存档 - cmd添加复制粘贴剪切和tab补全,不再需要切焦点 - ws状态展示样式升级,只在debug模式下显示 - 代码: - 序列生成器改用协程实现 - THEME做成独立模块 - 玩家属性modeData地位提升 - 不再每次启动时强制删除存档目录内所有非文件夹内容 - 绘制玩家场地用的scissor换成stencil(支持旋转和变形) - 优化/大规模整理代码,网络相关全面升级 - 修复: - 物理hold可能会卡死和踢墙测试位置不正确 - 词典中c2序列生成器的说明错误 - 刚安装就用简洁模式玩会报错(修改成绩比较逻辑) - 报错提示的场景显示不正确 - 智能画笔问题 + 新增: + 重新开放联网对战测试!!! + 主菜单UI更新,改变几个场景间的关系 + 场地晃动加入旋转分量 + 加入c2和mess序列模式,可以在自定义或mod中开启 + 新模式:Backfire(四个难度) + 新背景:BlackHole(用于Backfire) + 新增BGM:echo(用于Backfire), hang out(用于两个小程序) + 调整自定义场地的ui,可以看到鼠标不同按键对应画笔颜色 + 小程序DTW增加双押功能 + 新增绘制优化设置(手机开启可能加速,电脑花屏关闭可能解决) + 改动: + 错误处理机制大升级,更不容易闪退(CC爆炸除外) + 赞助名单移至staff场景并添加动画(已经在榜上的可以来定制颜色!) + 修改GM模式的名称和段位名以及修改连带内容,加高成绩上限,修复一个旧版本存档转换错误 + 更新存档版本时若需要会自动重启 + 鼠标按下时光标显示会变化 + 优化场地绘制交互,添加一个鼠标功能指示器 + 微调生存模式下落速度 + 修改时间字符串格式 + 词典不再大小写敏感 + 调整徽章图标,添加naki立绘 + 报错时会把traceback信息保存到日志文件便于debug + cmd添加一些测试用命令和一些文件管理命令,可以用于自行修复存档 + cmd添加复制粘贴剪切和tab补全,不再需要切焦点 + ws状态展示样式升级,只在debug模式下显示 + 代码: + 序列生成器改用协程实现 + THEME做成独立模块 + 玩家属性modeData地位提升 + 不再每次启动时强制删除存档目录内所有非文件夹内容 + 绘制玩家场地用的scissor换成stencil(支持旋转和变形) + 优化/大规模整理代码,网络相关全面升级 + 修复: + 物理hold可能会卡死和踢墙测试位置不正确 + 词典中c2序列生成器的说明错误 + 刚安装就用简洁模式玩会报错(修改成绩比较逻辑) + 报错提示的场景显示不正确 + 智能画笔问题 0.13.3: 科技飞跃 Technological Advancements - 新增: - 地图UI升级,增加模式图标 - 自定义场地新增智能画笔 - 新增物理hold(暂时只在自定义开放) - 新增小程序:Dropper - 新增小程序:Cannon - 新增小程序:Reflect - 新增小程序:Polyforge - 新增小程序:Command Line - 新增BGM:dream(用于小程序Polyforge和无尽挖掘) - 新增BGM:venus(用于zen) - 改动: - 镜头移动微调,高处更容易看清 - 简化自定义模式选项 - 软件锁和新加载动画合并 - 计算器地位降为小程序,软件锁与加载动画合并 - 小程序Just Get Ten增加速打模式 - 主菜单机器人不再发出极简错误提示音 - 不再支持导入旧版本统计信息 - 代码: - 删除不用的安卓联网库文件 - 简化LANG模块的初始化方法 - 修复: - 一个老存档转换问题 - 重开后虚拟按键失效 + 新增: + 地图UI升级,增加模式图标 + 自定义场地新增智能画笔 + 新增物理hold(暂时只在自定义开放) + 新增小程序:Dropper + 新增小程序:Cannon + 新增小程序:Reflect + 新增小程序:Polyforge + 新增小程序:Command Line + 新增BGM:dream(用于小程序Polyforge和无尽挖掘) + 新增BGM:venus(用于zen) + 改动: + 镜头移动微调,高处更容易看清 + 简化自定义模式选项 + 软件锁和新加载动画合并 + 计算器地位降为小程序,软件锁与加载动画合并 + 小程序Just Get Ten增加速打模式 + 主菜单机器人不再发出极简错误提示音 + 不再支持导入旧版本统计信息 + 代码: + 删除不用的安卓联网库文件 + 简化LANG模块的初始化方法 + 修复: + 一个老存档转换问题 + 重开后虚拟按键失效 0.13.2+: 工作室搬迁 Moving the Studio - 新增: - 全新加载动画与资源加载机制 - 显示ai计算的下一块位置 - 改动: - 中文词典加入更多关键词 - 降低干旱-L的评级要求 - 代码: - 联网模块继续推进 - 进一步模块化 - ai协程化 - 修复: - CC闪退(可能修复) + 新增: + 全新加载动画与资源加载机制 + 显示ai计算的下一块位置 + 改动: + 中文词典加入更多关键词 + 降低干旱-L的评级要求 + 代码: + 联网模块继续推进 + 进一步模块化 + ai协程化 + 修复: + CC闪退(可能修复) 0.13.2: 节奏模式 Rhythm Mode - 新增: - 新增节奏模式(三个难度) - 加入deepDrop功能(暂时只在自定义开放) - 加入任意高度场地功能(暂时只在自定义开放) - 新增小游戏:Tapping speed test, Don't touch white - 新增BGM:warped(用于Ultra和Tech-L难度) - 简洁模式(给不需要专业级游戏的群体) - 新增zDay节日与新的主菜单音乐overzero - 改动: - 暂停信息的两个时间改为显示处理落率(掉帧率) - 微调游戏中重开和暂停按钮位置 - 调整马拉松-普通的速度曲线 - 调整虚拟按键碰撞力度 - 修改出块高度算法 - 调整Ospin音效 - 地图排版微调 - 词典交互优化,可以用中文查了 - 降低小游戏Just Get Ten出12之后难度,新增小节时间功能 - 增加小游戏2048盲打难度 - 缩短春节的判定范围 - 调整内存不足的提示信息 - badapple换成视频 - 更新法语翻译(by Mizu) - bright皮肤微调(by ScF) - 代码: - 联网函数全部重写,全部使用love原生库,暂时关闭联网入口 - 旋转中心和朝向信息放入方块对象中 - 拆分toolfunc文件 - 修改录像系统机制(自动删除所有之前存的无效录像) - 修复: - Ospin锁延刷新时机错误 - 刷新方块状态时20G软降触发条件不正确 - 锁延刷新机制一个细节错误 - 无限上踢bug - B2B spin6报错 - 网战开房名显示不出 - 一帧误差(网战不同步bug原因之一) - 3D方块和showinvis冲突 - 消除了炸弹垃圾行时hpc的一个判定错误 - 没开濒死特效时濒死音效也没有 - 一些系统给垃圾行的模式会爆炸 - 处理落率可以有两个负号 - 全解锁命令错误 + 新增: + 新增节奏模式(三个难度) + 加入deepDrop功能(暂时只在自定义开放) + 加入任意高度场地功能(暂时只在自定义开放) + 新增小游戏:Tapping speed test, Don't touch white + 新增BGM:warped(用于Ultra和Tech-L难度) + 简洁模式(给不需要专业级游戏的群体) + 新增zDay节日与新的主菜单音乐overzero + 改动: + 暂停信息的两个时间改为显示处理落率(掉帧率) + 微调游戏中重开和暂停按钮位置 + 调整马拉松-普通的速度曲线 + 调整虚拟按键碰撞力度 + 修改出块高度算法 + 调整Ospin音效 + 地图排版微调 + 词典交互优化,可以用中文查了 + 降低小游戏Just Get Ten出12之后难度,新增小节时间功能 + 增加小游戏2048盲打难度 + 缩短春节的判定范围 + 调整内存不足的提示信息 + badapple换成视频 + 更新法语翻译(by Mizu) + bright皮肤微调(by ScF) + 代码: + 联网函数全部重写,全部使用love原生库,暂时关闭联网入口 + 旋转中心和朝向信息放入方块对象中 + 拆分toolfunc文件 + 修改录像系统机制(自动删除所有之前存的无效录像) + 修复: + Ospin锁延刷新时机错误 + 刷新方块状态时20G软降触发条件不正确 + 锁延刷新机制一个细节错误 + 无限上踢bug + B2B spin6报错 + 网战开房名显示不出 + 一帧误差(网战不同步bug原因之一) + 3D方块和showinvis冲突 + 消除了炸弹垃圾行时hpc的一个判定错误 + 没开濒死特效时濒死音效也没有 + 一些系统给垃圾行的模式会爆炸 + 处理落率可以有两个负号 + 全解锁命令错误 0.13.0: 维度突破 New Dimension - 新增: - 联网对战测试 - 新logo与新标题图 - 新增五个ScF做的新皮肤,默认皮肤改为Crystal - 新增BGM:vapor(用于tsd), spring festival(节日主题) - 新增小游戏:2048, Just Get Ten - 新增背景:Cubes(用于马拉松-困难) - 新增大量tips - 新增4*5和4*6的pc练习模式超大题库,增加c4w模式初始场地情况 - 添加危险警告音效 - 新增3D方块效果 - 新键位设置UI - 移除重开键位改为重开按钮,添加2号功能键(同时修改默认按键和虚拟按键布局) - 新增说明书页面(入口位于帮助页面) - 取消暂停后有准备时间 - 音乐室显示播放进度条 - 彩色虚拟按键 - Português - 改动: - next和hold中太高的方块会缩小显示,影子的旋转中心图层下移 - 触屏限制每帧采样一次,略微优化触屏性能 - 隐形速度增加两个挡位,只能通过自定义/mod调出 - quest包含多场地,原格式失效(可手动修复) - 新增聊天框控件,用于联网场景和更新历史等需要显示长文本的地方 - 重开键和暂停键移动位置 - 主界面tips滚动显示 - 手机不再默认开启震动 - 主菜单/历史/结算页ui微调,游戏中暂停按钮小一点 - 游戏界面按鼠标右键不再会退出 - 词典略微升级,添加和修改了几个词条 - 代码: - 修改皮肤文件名和所有模式的内部名 - 更改虚拟按键可见性代码做成函数 - 语言/控件系统升级,方便未来设计 - 移除玩家的r和c属性 - 大规模整理玩家绘图代码 - 节日主题系统完善 - 修复: - pc练习模式以前一直在随机1~35题 - 自定义-高级中隐形时间选择器问题 - 粘贴quest后左下小场地画面状态错误 - 粘贴任务后光标位置错误 - 带着软件锁启动游戏进debug模式报错 - 游戏结束后还计算按键次数 - 极简成就刷新错误 - 对老版本存档更兼容 - 一堆没啥意义不想列出来的细节问题 + 新增: + 联网对战测试 + 新logo与新标题图 + 新增五个ScF做的新皮肤,默认皮肤改为Crystal + 新增BGM:vapor(用于tsd), spring festival(节日主题) + 新增小游戏:2048, Just Get Ten + 新增背景:Cubes(用于马拉松-困难) + 新增大量tips + 新增4*5和4*6的pc练习模式超大题库,增加c4w模式初始场地情况 + 添加危险警告音效 + 新增3D方块效果 + 新键位设置UI + 移除重开键位改为重开按钮,添加2号功能键(同时修改默认按键和虚拟按键布局) + 新增说明书页面(入口位于帮助页面) + 取消暂停后有准备时间 + 音乐室显示播放进度条 + 彩色虚拟按键 + Português + 改动: + next和hold中太高的方块会缩小显示,影子的旋转中心图层下移 + 触屏限制每帧采样一次,略微优化触屏性能 + 隐形速度增加两个挡位,只能通过自定义/mod调出 + quest包含多场地,原格式失效(可手动修复) + 新增聊天框控件,用于联网场景和更新历史等需要显示长文本的地方 + 重开键和暂停键移动位置 + 主界面tips滚动显示 + 手机不再默认开启震动 + 主菜单/历史/结算页ui微调,游戏中暂停按钮小一点 + 游戏界面按鼠标右键不再会退出 + 词典略微升级,添加和修改了几个词条 + 代码: + 修改皮肤文件名和所有模式的内部名 + 更改虚拟按键可见性代码做成函数 + 语言/控件系统升级,方便未来设计 + 移除玩家的r和c属性 + 大规模整理玩家绘图代码 + 节日主题系统完善 + 修复: + pc练习模式以前一直在随机1~35题 + 自定义-高级中隐形时间选择器问题 + 粘贴quest后左下小场地画面状态错误 + 粘贴任务后光标位置错误 + 带着软件锁启动游戏进debug模式报错 + 游戏结束后还计算按键次数 + 极简成就刷新错误 + 对老版本存档更兼容 + 一堆没啥意义不想列出来的细节问题 0.12.X: 圣诞快乐 Merry Christmas - 新增: - 新增BGM:mXmas(节日主题) - 改动: - 调整magicblock的音质 - 升级i2的踢墙表 - 修复: - o1旋转后锁定报错 - 自定义模式开ai报错 - 非20G高重力块穿模 + 新增: + 新增BGM:mXmas(节日主题) + 改动: + 调整magicblock的音质 + 升级i2的踢墙表 + 修复: + o1旋转后锁定报错 + 自定义模式开ai报错 + 非20G高重力块穿模 0.12.25: N连块 N-mino - 新增: - 加入1~3连块 - 新增BGM:Magicblock(用于混战模式) - 极简连击计数器显示AP和FC的颜色 - 两个ScF做的新皮肤,Penta皮肤微调 - 自定义序列添加随机生成一包的按钮,调整ui支持1~3连块 - 节日彩蛋系统,新背景飘雪 - 改动: - 暂停界面排版升级 - 快速重开不再有入场动画 - 五连块颜色调整 - 调整一些模式的bgm - 高速经典模式隐藏180度旋转键 - 代码: - 玩家属性imgY更名ghoY - 删除mino文件,较小规模代码整理 - 一些性能优化 + 新增: + 加入1~3连块 + 新增BGM:Magicblock(用于混战模式) + 极简连击计数器显示AP和FC的颜色 + 两个ScF做的新皮肤,Penta皮肤微调 + 自定义序列添加随机生成一包的按钮,调整ui支持1~3连块 + 节日彩蛋系统,新背景飘雪 + 改动: + 暂停界面排版升级 + 快速重开不再有入场动画 + 五连块颜色调整 + 调整一些模式的bgm + 高速经典模式隐藏180度旋转键 + 代码: + 玩家属性imgY更名ghoY + 删除mino文件,较小规模代码整理 + 一些性能优化 0.12.9: 修复更新 Fixup Update - 改动: - 玩家出场动画加速 - 代码: - 几处细节调整 - 修复: - 开局硬降后卡顿 + 改动: + 玩家出场动画加速 + 代码: + 几处细节调整 + 修复: + 开局硬降后卡顿 0.12.8: 皮肤调整 Better Skins - 改动: - 攻击力统计算法修改 - b3b触发点和上限都减小200,变为800和1000 - 新增/删除几个方块皮肤 - 调整部分皮肤亮度 - 代码: - 尝试让文件读取更安全 - 尝试修正读取老版本存档的错误 - 修复: - 手机第一次安装永远进不去 - 每次启动游戏统计信息的消除信息必定丢失 - 游戏结束后两个码表显示不正确 + 改动: + 攻击力统计算法修改 + b3b触发点和上限都减小200,变为800和1000 + 新增/删除几个方块皮肤 + 调整部分皮肤亮度 + 代码: + 尝试让文件读取更安全 + 尝试修正读取老版本存档的错误 + 修复: + 手机第一次安装永远进不去 + 每次启动游戏统计信息的消除信息必定丢失 + 游戏结束后两个码表显示不正确 0.12.7: 视野 Sight - 新增: - 场地遮挡和场地反转的mod完成 - 改动: - 回合制模式垃圾上涨速度调快 - 代码: - 调整转换存档/加载文件的逻辑 - COLOR模块小升级 - 修复: - win和linux缺库不会再闪退了 - 许多神秘小错误 + 新增: + 场地遮挡和场地反转的mod完成 + 改动: + 回合制模式垃圾上涨速度调快 + 代码: + 调整转换存档/加载文件的逻辑 + COLOR模块小升级 + 修复: + win和linux缺库不会再闪退了 + 许多神秘小错误 0.12.6: 系统升级 System Update - 新增: - 开局时玩家有入场动画 - 录像保存初版(读取回放还没做) - 改动: - 移除词典内的ospin操作表 - 游戏开始开始两秒后或者确实结束后才计入统计数据 - 所有小游戏入口移至词典 - 极限马拉松入口隐藏 - 移除maxNext设置项 - 代码: - FILE模块修改,将所有文件换后缀放文件夹分类整理方便管理 - "远程玩家"进入可用测试阶段 - 全局变量ACCOUNT改名USER - 垃圾行计时速度从GAME移至gameEnv - 淘汰sceneTemp技术 - 修复: - 修正游戏中途退出时结算不正确 - 修正保存文件搞反静音模式是否print + 新增: + 开局时玩家有入场动画 + 录像保存初版(读取回放还没做) + 改动: + 移除词典内的ospin操作表 + 游戏开始开始两秒后或者确实结束后才计入统计数据 + 所有小游戏入口移至词典 + 极限马拉松入口隐藏 + 移除maxNext设置项 + 代码: + FILE模块修改,将所有文件换后缀放文件夹分类整理方便管理 + "远程玩家"进入可用测试阶段 + 全局变量ACCOUNT改名USER + 垃圾行计时速度从GAME移至gameEnv + 淘汰sceneTemp技术 + 修复: + 修正游戏中途退出时结算不正确 + 修正保存文件搞反静音模式是否print 0.12.5: 漏洞修复 Bug Fix - 新内容: - 玩家自动排版机制 - das打断设置 - 改动: - 两个干旱和400L/1000L评级标准调整 - 优化聊天室交互 - 网格从开关改为可调透明度 - 使用安全区域显示系统时间 - 计算器添加画面效果彩蛋 - 代码: - 多媒体模块全体高度封装大型升级 - language模块独立 - 玩家ui的场地y坐标取消70的偏移 - 修复: - 开局提前hold+硬降会死 - 游戏暂停去设置回来背景错误 - 回放时暂停还会计算暂停时间 - 聊天室清空按钮不显示 - 两个无尽模式无条件解锁 - 两个防守模式波数封顶后不动 + 新内容: + 玩家自动排版机制 + das打断设置 + 改动: + 两个干旱和400L/1000L评级标准调整 + 优化聊天室交互 + 网格从开关改为可调透明度 + 使用安全区域显示系统时间 + 计算器添加画面效果彩蛋 + 代码: + 多媒体模块全体高度封装大型升级 + language模块独立 + 玩家ui的场地y坐标取消70的偏移 + 修复: + 开局提前hold+硬降会死 + 游戏暂停去设置回来背景错误 + 回放时暂停还会计算暂停时间 + 聊天室清空按钮不显示 + 两个无尽模式无条件解锁 + 两个防守模式波数封顶后不动 0.12.4: 网战预备 Before Net Battle - 新内容: - 允许用户登录 - 聊天室功能开放测试 - 健康游戏时间提醒 - 改动: - 无移动/无旋转模式改为彩蛋模式,入口隐藏 - 录像回放时键盘不完全失效 - Mod选择界面微调 - 优化部分系统和小游戏的UI - 代码: - 重写/改造大量模块 - 修复: - 统计时间计算错误(近似双倍) - 数据导入后不会立刻保存 - 无数小bug + 新内容: + 允许用户登录 + 聊天室功能开放测试 + 健康游戏时间提醒 + 改动: + 无移动/无旋转模式改为彩蛋模式,入口隐藏 + 录像回放时键盘不完全失效 + Mod选择界面微调 + 优化部分系统和小游戏的UI + 代码: + 重写/改造大量模块 + 修复: + 统计时间计算错误(近似双倍) + 数据导入后不会立刻保存 + 无数小bug 0.12.3: 矩形 Rectangles - 新内容: - 新增小游戏:Cubefield - 合并/删除多余的mod,新增几个mod - 新增方块溅射特效 - 改动: - 游戏开始时会列出启用的mod - 游戏暂停时展示使用的mod和成绩是否有效 - mod选择界面更美观 - PC挑战简单模式允许O-spin - 井字棋棋子形状调整 - 代码: - mod系统调整 - 修复: - 自定义模式用不了mod - 两个c2踢墙表都有问题 - CC切换20G模式时报错 - 进入过井字棋后音乐模块损坏 - 打开mod后虚拟按键显示不正常 + 新内容: + 新增小游戏:Cubefield + 合并/删除多余的mod,新增几个mod + 新增方块溅射特效 + 改动: + 游戏开始时会列出启用的mod + 游戏暂停时展示使用的mod和成绩是否有效 + mod选择界面更美观 + PC挑战简单模式允许O-spin + 井字棋棋子形状调整 + 代码: + mod系统调整 + 修复: + 自定义模式用不了mod + 两个c2踢墙表都有问题 + CC切换20G模式时报错 + 进入过井字棋后音乐模块损坏 + 打开mod后虚拟按键显示不正常 0.12.2: Mod更新 Mod Update - 新内容: - 新增mod系统,包含各种花式功能(开启后不记录成绩) - 新增多hold系统 - 新增旋转系统选择 - 新增五联块极简判定 - 新增小游戏:战略井字棋 - 改动: - A to Z小游戏更难用输入法作弊 - 降低PC练习/进攻练习的难度和评级标准 - 提高PC挑战模式评级要求 - AIRS改名并支持无踢墙180度转,PC训练模式改用此旋转系统 - 攻击缓冲区从20增加到26 - 模式地图20G路线微调 - 代码: - 控件系统更强大 - 源代码文件分类更清晰 - Zframework大规模重构,更容易重用 - 重构next和hold系统 - 调整部分显示字号 - 修复: - 部分旋转系统旋转O后锁定就报错 - 音效室Zspin按钮没声音 + 新内容: + 新增mod系统,包含各种花式功能(开启后不记录成绩) + 新增多hold系统 + 新增旋转系统选择 + 新增五联块极简判定 + 新增小游戏:战略井字棋 + 改动: + A to Z小游戏更难用输入法作弊 + 降低PC练习/进攻练习的难度和评级标准 + 提高PC挑战模式评级要求 + AIRS改名并支持无踢墙180度转,PC训练模式改用此旋转系统 + 攻击缓冲区从20增加到26 + 模式地图20G路线微调 + 代码: + 控件系统更强大 + 源代码文件分类更清晰 + Zframework大规模重构,更容易重用 + 重构next和hold系统 + 调整部分显示字号 + 修复: + 部分旋转系统旋转O后锁定就报错 + 音效室Zspin按钮没声音 0.12.1: 漏洞修复 Bug Fix - 新内容: - 新增BGM:sugar fairy(用于马拉松极限) - 改动: - 手机也可以玩A to Z了 - 自定义默认开启 - 两个C2踢墙表调整 - 代码: - 三个音频模块的加载表移至模块外 - 修复: - C4W报错,场地行颜色不对 - 部分安卓手机主菜单报错 + 新内容: + 新增BGM:sugar fairy(用于马拉松极限) + 改动: + 手机也可以玩A to Z了 + 自定义默认开启 + 两个C2踢墙表调整 + 代码: + 三个音频模块的加载表移至模块外 + 修复: + C4W报错,场地行颜色不对 + 部分安卓手机主菜单报错 0.12.0: 全局更新+ Global Update Plus - 新内容: - 注册测试(不对所有人开放) - 新增小游戏A to Z - 新增数据导出/导入界面(从统计界面进入) - 新增BGM:Truth(用于PC挑战) - 新背景:Tunnel(用于GM模式) - 新意义不明瞎眼皮肤:Crack - 多语音包系统(新增naki语音) - 新增C2,C2-sym,Classic旋转系统(暂时不可设置) - 新增自定义场地多页面功能(暂不支持多页复制) - Français & Español - 改动: - 经典模式更多规则还原,难度大幅增加 - 取消对部分旧存档转换支持 - 移除两个无尽模式的评级要求改为沙盒关卡 - 部分中文tip上色 - 旋转中心贴图微调 - 从自定义界面回到主菜单时BGM恢复 - badapple画质提升 - 代码: - 重构场景系统/背景系统/控件系统/语言系统/玩家类/模式地图(动画升级) - 大量代码规范化,Zframework更容易重用 - 修复: - 无数错误 + 新内容: + 注册测试(不对所有人开放) + 新增小游戏A to Z + 新增数据导出/导入界面(从统计界面进入) + 新增BGM:Truth(用于PC挑战) + 新背景:Tunnel(用于GM模式) + 新意义不明瞎眼皮肤:Crack + 多语音包系统(新增naki语音) + 新增C2,C2-sym,Classic旋转系统(暂时不可设置) + 新增自定义场地多页面功能(暂不支持多页复制) + Français & Español + 改动: + 经典模式更多规则还原,难度大幅增加 + 取消对部分旧存档转换支持 + 移除两个无尽模式的评级要求改为沙盒关卡 + 部分中文tip上色 + 旋转中心贴图微调 + 从自定义界面回到主菜单时BGM恢复 + badapple画质提升 + 代码: + 重构场景系统/背景系统/控件系统/语言系统/玩家类/模式地图(动画升级) + 大量代码规范化,Zframework更容易重用 + 修复: + 无数错误 0.11.6: 多彩更新II Bountful Update II - 新内容: - 所有皮肤颜色细节大改,新增配色至16种,新增炸弹垃圾行(暂时没有应用) - 游戏结束后大字显示关卡评级 - 全新神秘加载画面 - 全新攻击特效 - 新模式:20G-Phantasm - 新功能:音效室 - badapple背景(超低画质超低帧率警告) - 改动: - 挖掘相关模式垃圾行尽量不出在同一列 - 复活后有一秒等待时间 - 调整单挑模式评级要求,降低两个无尽模式评分要求 - hold后文字变红 - 键盘编辑序列体验优化,可以更改x格子可见性 - 支持模式篡改皮肤和初始朝向 - 序列生成代码优化,序列用完或任务失败不扣生命直接判负 - 代码: - 简化语言文件,添加新语言更方便,优化语言初始化 - 皮肤文件分段加载,拼图提示贴图独立加载 - 更改profile开启方式,不再和计算器组合功能键冲突 - 调整玩家加载代码 - 修复: - 20G极限400台背景代码报错 - 取消暂停后背景回到初始状态 - 马拉松-困难没有reach音效 + 新内容: + 所有皮肤颜色细节大改,新增配色至16种,新增炸弹垃圾行(暂时没有应用) + 游戏结束后大字显示关卡评级 + 全新神秘加载画面 + 全新攻击特效 + 新模式:20G-Phantasm + 新功能:音效室 + badapple背景(超低画质超低帧率警告) + 改动: + 挖掘相关模式垃圾行尽量不出在同一列 + 复活后有一秒等待时间 + 调整单挑模式评级要求,降低两个无尽模式评分要求 + hold后文字变红 + 键盘编辑序列体验优化,可以更改x格子可见性 + 支持模式篡改皮肤和初始朝向 + 序列生成代码优化,序列用完或任务失败不扣生命直接判负 + 代码: + 简化语言文件,添加新语言更方便,优化语言初始化 + 皮肤文件分段加载,拼图提示贴图独立加载 + 更改profile开启方式,不再和计算器组合功能键冲突 + 调整玩家加载代码 + 修复: + 20G极限400台背景代码报错 + 取消暂停后背景回到初始状态 + 马拉松-困难没有reach音效 0.11.5: 自定义页面更新 Custom Menu Update - 新内容: - 新自定义页面:可预览场地,显示序列/任务情况 - 新背景:welcome(用于final和生存极限) - 新控件:文本框(用于登录等功能) - 用户注册/登录界面(暂时没有任何功能) - 英语版词典 - 改动: - 不再频繁切默认BGM,体验更好 - 移除自制虚拟键盘控件,手机端改用系统键盘,词典加入选择词条的上下键 - 词典调整,搜索动画改好看 - CC使用新参数,AI平衡再调整 - 调整最后两个隐形模式通关条件 - 模式地图评级文本支持多语言,地图排版微调 - 极简提示音预览 - 删除yygq语言统计数据参与的tips - 代码: - 优化性能:ai思考和绘制玩家场地 - 整理代码,变量整理,许多全局变量名改为大写 - 修复: - CC报错(大概也许) - 顶替CC的9S大幅加速 - 回合制会自然下落,ai不会卡住了 + 新内容: + 新自定义页面:可预览场地,显示序列/任务情况 + 新背景:welcome(用于final和生存极限) + 新控件:文本框(用于登录等功能) + 用户注册/登录界面(暂时没有任何功能) + 英语版词典 + 改动: + 不再频繁切默认BGM,体验更好 + 移除自制虚拟键盘控件,手机端改用系统键盘,词典加入选择词条的上下键 + 词典调整,搜索动画改好看 + CC使用新参数,AI平衡再调整 + 调整最后两个隐形模式通关条件 + 模式地图评级文本支持多语言,地图排版微调 + 极简提示音预览 + 删除yygq语言统计数据参与的tips + 代码: + 优化性能:ai思考和绘制玩家场地 + 整理代码,变量整理,许多全局变量名改为大写 + 修复: + CC报错(大概也许) + 顶替CC的9S大幅加速 + 回合制会自然下落,ai不会卡住了 0.11.4: 网络库更新 Network Update - 新内容: - 新块序:回声 - 新模式:无移动/无旋转40行 - 新模式:纯单消马拉松 - 改动: - 使用aegistudio的新网络库获取公告,无连接/拉取超时不会卡死了 - 增加公告/最新版本文字显示时长 - 极简评级要求改为通关且至少放了5个方块 - 极简等第文本区分语言 - demo玩家不触发极简错误音 - CC操作速度加强 - 地图布局微调 - 词典控件排版微调,键盘透明度降低 - 软件锁在加载资源前启动 - 代码: - 按键禁用加入模式环境变量 - modes.lua文件模式扁平化 - 规范加载外部库代码 - 修复: - 粘贴错误任务代码崩溃 - 计算器e键非法输入报错 - ios打不开词典部分定式词条 + 新内容: + 新块序:回声 + 新模式:无移动/无旋转40行 + 新模式:纯单消马拉松 + 改动: + 使用aegistudio的新网络库获取公告,无连接/拉取超时不会卡死了 + 增加公告/最新版本文字显示时长 + 极简评级要求改为通关且至少放了5个方块 + 极简等第文本区分语言 + demo玩家不触发极简错误音 + CC操作速度加强 + 地图布局微调 + 词典控件排版微调,键盘透明度降低 + 软件锁在加载资源前启动 + 代码: + 按键禁用加入模式环境变量 + modes.lua文件模式扁平化 + 规范加载外部库代码 + 修复: + 粘贴错误任务代码崩溃 + 计算器e键非法输入报错 + ios打不开词典部分定式词条 0.11.3: 新极简系统 New Finesse System - 新内容: - 增加极简连击系统并且极简点数计算系统大改 - 新增BGM:Storm(用于防守/生存) - 非极简不播放锁定音效 - 主界面AI试玩有音效 - 改动: - 词典新增大量内容 - 修复词典打开链接,新增大家的b站空间链接 - BGM大规模调整 - 高重力分数倍率增加一档 - 自定义模式自由选择BGM - 代码: - 玩家新增sound属性开关声效 - 修复模式hook函数通关后TICK任务丢失 - 修复: - mini判定不能触发 - 挖掘模式rank判定条件错误 - 回放时同时按两个键kpm变无穷 - 科研模式可以同时触发胜利和失败 + 新内容: + 增加极简连击系统并且极简点数计算系统大改 + 新增BGM:Storm(用于防守/生存) + 非极简不播放锁定音效 + 主界面AI试玩有音效 + 改动: + 词典新增大量内容 + 修复词典打开链接,新增大家的b站空间链接 + BGM大规模调整 + 高重力分数倍率增加一档 + 自定义模式自由选择BGM + 代码: + 玩家新增sound属性开关声效 + 修复模式hook函数通关后TICK任务丢失 + 修复: + mini判定不能触发 + 挖掘模式rank判定条件错误 + 回放时同时按两个键kpm变无穷 + 科研模式可以同时触发胜利和失败 0.11.2: 弹球小游戏 Pong - 新内容: - Pong - 公开小游戏入口 - 词典支持跳转超链接 - 新增BGM:Waterfall(用于特种40L) - 新模式:挖掘10/40/100/400/1000 - 改动: - 修改查询机制,增加词条,优化词典体验 - 优化字号使用,字体预加载 - 减小字体文件体积(9.1M→7.8M) - 增加Wspin - 修复: - 0arr水平移动优先于20G - 消四任务结算错误 - 自定义序列/任务删除后光标穿模 - 混战第一把不显示功能键的虚拟按键 - Ospin小错误 - 无评价也能解锁下一关 - 词典内输入特殊符号报错/查询错误 - 马拉松-普通目标行数显示错误 - 9S机器人极简错误 - 报错界面执行代码无效 + 新内容: + Pong + 公开小游戏入口 + 词典支持跳转超链接 + 新增BGM:Waterfall(用于特种40L) + 新模式:挖掘10/40/100/400/1000 + 改动: + 修改查询机制,增加词条,优化词典体验 + 优化字号使用,字体预加载 + 减小字体文件体积(9.1M→7.8M) + 增加Wspin + 修复: + 0arr水平移动优先于20G + 消四任务结算错误 + 自定义序列/任务删除后光标穿模 + 混战第一把不显示功能键的虚拟按键 + Ospin小错误 + 无评价也能解锁下一关 + 词典内输入特殊符号报错/查询错误 + 马拉松-普通目标行数显示错误 + 9S机器人极简错误 + 报错界面执行代码无效 0.11.1: 小Z更新 Dictionary Update - 新内容: - 新增:小Z词典 - 自定义模式入口移至主菜单 - 游戏结束时显示评级 - 修改下落/操作速度的加分机制 - 联网公告+版本更新检测 - 新控件:虚拟键盘 - 改动: - 修改分数文字上浮速度曲线 - 主界面demoPlay落块计算速度加分 - PC任务判定修改 - 移除LOG.print消息平滑上拉动画 - 移除debug界面复制日志按钮 - 报错界面可以执行任意代码救急 - 代码: - 控件系统增强 - 旋转中心表从require改为全局 - 修改LOG.print的message模式输出颜色 - TASK模块代码整理,删除老旧代码 - 修复: - 盲打还会显示落块分数 - 游戏结束时不到D评级报错 - TSD模式判定错误 - any1~4任务不能完成 - 粘贴场地有残留 - 修复混战模式目标切换的问题 - 修复场地最上显示不全 - 按键设置使用反斜杠后保存失败 + 新内容: + 新增:小Z词典 + 自定义模式入口移至主菜单 + 游戏结束时显示评级 + 修改下落/操作速度的加分机制 + 联网公告+版本更新检测 + 新控件:虚拟键盘 + 改动: + 修改分数文字上浮速度曲线 + 主界面demoPlay落块计算速度加分 + PC任务判定修改 + 移除LOG.print消息平滑上拉动画 + 移除debug界面复制日志按钮 + 报错界面可以执行任意代码救急 + 代码: + 控件系统增强 + 旋转中心表从require改为全局 + 修改LOG.print的message模式输出颜色 + TASK模块代码整理,删除老旧代码 + 修复: + 盲打还会显示落块分数 + 游戏结束时不到D评级报错 + TSD模式判定错误 + any1~4任务不能完成 + 粘贴场地有残留 + 修复混战模式目标切换的问题 + 修复场地最上显示不全 + 按键设置使用反斜杠后保存失败 0.11.0: 谜题更新 Puzzle Update - 新内容: - 自定义游戏支持复制所有【题目】信息 - 自定义任务(各种消除),可开关强制完成 - 自定义游戏设置重新分页+排版 - 新增显示落块分数 - 计算器支持小数点和科学计数法 - 改动: - 攻击算法大幅改动 - 命数超过3使用缩略显示 - 自定义序列/任务连续同种方块使用缩略显示 - 软件锁场景层次更改,可以从设置进入 - 自定义序列中光标位置可循环 - 修改序列的导出格式 - 方块透明度改为显示开关 - 隐形WTF模式会提示玩家打开生成音效,回放场地可见 - LOG.print输出字体随屏幕大小变化 - debug页面新增复制日志信息和输出屏幕信息 - debug模式光标坐标显示必定整数 - debug功能键增加 - 代码: - color模块新增生成随机色,生成彩虹色功能 - 修复: - 修复科研极简+模式不能消四 - 焦点选择器控件上时按方向键闪退 - 干旱2进入就报错 - O4或I4后游戏崩溃 + 新内容: + 自定义游戏支持复制所有【题目】信息 + 自定义任务(各种消除),可开关强制完成 + 自定义游戏设置重新分页+排版 + 新增显示落块分数 + 计算器支持小数点和科学计数法 + 改动: + 攻击算法大幅改动 + 命数超过3使用缩略显示 + 自定义序列/任务连续同种方块使用缩略显示 + 软件锁场景层次更改,可以从设置进入 + 自定义序列中光标位置可循环 + 修改序列的导出格式 + 方块透明度改为显示开关 + 隐形WTF模式会提示玩家打开生成音效,回放场地可见 + LOG.print输出字体随屏幕大小变化 + debug页面新增复制日志信息和输出屏幕信息 + debug模式光标坐标显示必定整数 + debug功能键增加 + 代码: + color模块新增生成随机色,生成彩虹色功能 + 修复: + 修复科研极简+模式不能消四 + 焦点选择器控件上时按方向键闪退 + 干旱2进入就报错 + O4或I4后游戏崩溃 0.10.11: 自定义游戏更新 Custom-game Update - 新内容: - 全新自定义游戏设置界面 - 新模式:MPH竞速 - 新控件:选择器 (用于调整自定义游戏的选项) - 当前方块透明度可调 - 改动: - 小游戏开关排版调整,使用qwer切换选项,增加舒尔特方格特效开关 - 0next时不显示生成预览 - 垃圾行缓冲槽显示微调 - 科研模式目标改为200行攻击 - 虚拟按键最大尺寸增加 - 画面设置布局微调 - 代码: - 玩家方法reach_winCheck改为check_lineReach,新增攻击达标检测函数 - 玩家上次消行信息lastClear属性改为表,包含更多信息 - 整理并重写部分玩家draw_norm代码 - 整理游戏设置变量 - 20G移出gameEnv属性 - 修复: - 修复回放录像时间轴错开一帧 - 对CC崩溃进行一定保护,游戏可能不会闪退 - 背景lightning2的方块显示错误 - 科研模式显示的攻击改为一位小数 + 新内容: + 全新自定义游戏设置界面 + 新模式:MPH竞速 + 新控件:选择器 (用于调整自定义游戏的选项) + 当前方块透明度可调 + 改动: + 小游戏开关排版调整,使用qwer切换选项,增加舒尔特方格特效开关 + 0next时不显示生成预览 + 垃圾行缓冲槽显示微调 + 科研模式目标改为200行攻击 + 虚拟按键最大尺寸增加 + 画面设置布局微调 + 代码: + 玩家方法reach_winCheck改为check_lineReach,新增攻击达标检测函数 + 玩家上次消行信息lastClear属性改为表,包含更多信息 + 整理并重写部分玩家draw_norm代码 + 整理游戏设置变量 + 20G移出gameEnv属性 + 修复: + 修复回放录像时间轴错开一帧 + 对CC崩溃进行一定保护,游戏可能不会闪退 + 背景lightning2的方块显示错误 + 科研模式显示的攻击改为一位小数 0.10.10: 画面优化 Graphics Update - 新内容: - 超屏视野:场地超高时镜头上移 - 生成预览:显示下一个Next的基准生成位置 - 新皮肤:gem(notypey) - 新皮肤:brick_light(notypey) - 新皮肤:cartoon_cup(earety) - 改动: - 卡块spin判定无须最后一步旋转(spin-5可以实现了!) - 重开长按操作提示 - 优化两个小游戏体验 - 设置界面左右切换动画调整 - 音乐室再装修 - ai难度再调整 - 可以显示CC加载失败详细信息 - 进入场景时滑条数字可见 - 代码: - 删除两个多余的文件(6.5MB) - 皮肤/音效/BGM文件缺失时不崩溃,只弹出警告 - LOG.print取消"short"输出方式 - 目标行数线加入玩家绘图方法 - win下提醒用户删掉存档内CCloader,声明两个全局变量 - 修复: - 手机锁屏再解锁后可能屏幕方向错误(0.10.1没完全好,这次好了) - 修复软降n格报错 - 进攻-极限 显示垃圾行数量错误 + 新内容: + 超屏视野:场地超高时镜头上移 + 生成预览:显示下一个Next的基准生成位置 + 新皮肤:gem(notypey) + 新皮肤:brick_light(notypey) + 新皮肤:cartoon_cup(earety) + 改动: + 卡块spin判定无须最后一步旋转(spin-5可以实现了!) + 重开长按操作提示 + 优化两个小游戏体验 + 设置界面左右切换动画调整 + 音乐室再装修 + ai难度再调整 + 可以显示CC加载失败详细信息 + 进入场景时滑条数字可见 + 代码: + 删除两个多余的文件(6.5MB) + 皮肤/音效/BGM文件缺失时不崩溃,只弹出警告 + LOG.print取消"short"输出方式 + 目标行数线加入玩家绘图方法 + win下提醒用户删掉存档内CCloader,声明两个全局变量 + 修复: + 手机锁屏再解锁后可能屏幕方向错误(0.10.1没完全好,这次好了) + 修复软降n格报错 + 进攻-极限 显示垃圾行数量错误 0.10.9: 舒尔特方格 Schulte Grid - 新内容: - 舒尔特方格 - 15p可关闭滑动轨迹显示 - 隐形模式回放时方块不会完全隐藏 - 画图界面新增顶起一行和消除满行功能 - 把音乐室装修得更好看了 - 新增BGM:Down - 修改BGM:Rockblock - 改动: - 优化15p开关排版和机制 - 不允许使用瞬移操作的模式虚拟按键也不显示 - 单挑评分标准适配三条命 - 调整ai难度 - 部分弹出消息改用LOG.print输出到屏幕左上角 - 缺失字体文件时使用引擎自带字体 - 代码: - 整理player.lua文件 - 整理scr变量相关代码 - 所有音乐重新转码,BGM文件夹不再追踪 - LOG.print新增"short"输出方式,仅显示一个时长很短的不重要提示信息 - 修复: - CC死后不能正常复活 - 部分背景不能正确显示 + 新内容: + 舒尔特方格 + 15p可关闭滑动轨迹显示 + 隐形模式回放时方块不会完全隐藏 + 画图界面新增顶起一行和消除满行功能 + 把音乐室装修得更好看了 + 新增BGM:Down + 修改BGM:Rockblock + 改动: + 优化15p开关排版和机制 + 不允许使用瞬移操作的模式虚拟按键也不显示 + 单挑评分标准适配三条命 + 调整ai难度 + 部分弹出消息改用LOG.print输出到屏幕左上角 + 缺失字体文件时使用引擎自带字体 + 代码: + 整理player.lua文件 + 整理scr变量相关代码 + 所有音乐重新转码,BGM文件夹不再追踪 + LOG.print新增"short"输出方式,仅显示一个时长很短的不重要提示信息 + 修复: + CC死后不能正常复活 + 部分背景不能正确显示 0.10.8: 全局更新 Global Update - 新内容: - 单挑模式玩家和电脑各三条生命,剩余生命数显示在场地右下角 - 新增复活动画 - 改动: - 15p入口由软件锁改为主界面(自己试着找找看吧)(未来会开放) - 优化15p体验,新增滑动操作开关和键盘反向 - 优化滑条信息显示 - 鼠标点击按钮后不失去焦点 - 增大解锁400L模式难度(1.5pps左右) - 码表指针不透明度增加 - 代码: - 整理场景代码,同场景代码全部放到scenes.lua文件 - 增加日志模块log.lua,允许在游戏内显示debug信息 - 玩家绘制代码调整 + 新内容: + 单挑模式玩家和电脑各三条生命,剩余生命数显示在场地右下角 + 新增复活动画 + 改动: + 15p入口由软件锁改为主界面(自己试着找找看吧)(未来会开放) + 优化15p体验,新增滑动操作开关和键盘反向 + 优化滑条信息显示 + 鼠标点击按钮后不失去焦点 + 增大解锁400L模式难度(1.5pps左右) + 码表指针不透明度增加 + 代码: + 整理场景代码,同场景代码全部放到scenes.lua文件 + 增加日志模块log.lua,允许在游戏内显示debug信息 + 玩家绘制代码调整 0.10.7: 15P更新 15puzzle update - 新内容: - ghost和center透明度可调 - 15puzzle(软件锁界面输入815/1524/2435进入)(已经弃用) - 改动: - 大多数滑条都会显示当前值 - 滑条交互机制优化 - 部分控件重排版 - 更新计划改为中文 - 代码: - 部分设置值域改为[0%,100%] - 整理场景代码,同场景代码整合(部分) - 攻击特效和徽章特效并入SYSFX - 修复: - 修复挖掘模式涨行不刷新ghost - 控制设置页面预览显示bug - 在倒计时阶段按一些按键会报错 + 新内容: + ghost和center透明度可调 + 15puzzle(软件锁界面输入815/1524/2435进入)(已经弃用) + 改动: + 大多数滑条都会显示当前值 + 滑条交互机制优化 + 部分控件重排版 + 更新计划改为中文 + 代码: + 部分设置值域改为[0%,100%] + 整理场景代码,同场景代码整合(部分) + 攻击特效和徽章特效并入SYSFX + 修复: + 修复挖掘模式涨行不刷新ghost + 控制设置页面预览显示bug + 在倒计时阶段按一些按键会报错 0.10.6: CC更新 Cold Clear update - 新内容: - 全平台支持新版CC(也许) - 改动: - 修改UVRY的踢墙表 - 修复: - O卡住的时候旋转不刷新锁定延迟 - CC在发现重力过大后hold即报错 + 新内容: + 全平台支持新版CC(也许) + 改动: + 修改UVRY的踢墙表 + 修复: + O卡住的时候旋转不刷新锁定延迟 + CC在发现重力过大后hold即报错 0.10.5: 特效更新 FX update - 新内容: - 瞬移特效独立为瞬降和移动(旋转)特效,增加移动特效滑条,各特效范围均为0~5 - 增加两个莫名其妙的背景(放在无尽和限时打分) - 把之前不小心弄丢的自制蓝屏报错界面捡回来了 - 改动: - 雷达图OPM参数改为ADPM - 调整J/L/I的踢墙表 - 根据锁延刷新模式决定锁延指示条颜色 - 增加无尽挖掘连挖提示,挖完后下一波立即升起 - new English translation by @MattMayuga#8789 - 修改100/400/1000L的评级要求 - 软件锁界面出现时机调整,按钮位置调整 - 调整混战模式倍率影响边框颜色的范围 - 软件锁也可显示tip - 代码: - 重命名大多数背景 - 重构create___FX函数 - 修复: - 加载部分老版本存档报错 - 几个设置大标题样式不统一 - 有消行延迟+出块等待时连续硬降出现神秘现象 - 垃圾行上涨不刷新ghost - 粘贴序列后光标位置错误 - 不能用键盘复制粘贴序列 - 每次启动游戏ai是一样的块序 + 新内容: + 瞬移特效独立为瞬降和移动(旋转)特效,增加移动特效滑条,各特效范围均为0~5 + 增加两个莫名其妙的背景(放在无尽和限时打分) + 把之前不小心弄丢的自制蓝屏报错界面捡回来了 + 改动: + 雷达图OPM参数改为ADPM + 调整J/L/I的踢墙表 + 根据锁延刷新模式决定锁延指示条颜色 + 增加无尽挖掘连挖提示,挖完后下一波立即升起 + new English translation by @MattMayuga#8789 + 修改100/400/1000L的评级要求 + 软件锁界面出现时机调整,按钮位置调整 + 调整混战模式倍率影响边框颜色的范围 + 软件锁也可显示tip + 代码: + 重命名大多数背景 + 重构create___FX函数 + 修复: + 加载部分老版本存档报错 + 几个设置大标题样式不统一 + 有消行延迟+出块等待时连续硬降出现神秘现象 + 垃圾行上涨不刷新ghost + 粘贴序列后光标位置错误 + 不能用键盘复制粘贴序列 + 每次启动游戏ai是一样的块序 0.10.4: 漏洞修复 Bug Fix - 代码: - 修改场景模块方法名 - 软件锁变量名从lock改为appLock - 使用linter整理代码 - 重构锁延相关代码,freshgho,freshLockDelay,freshMinY合并为freshBlock - 修复: - BPM120~180之间分数计算不正确 - 进不指定锁延的模式就报错 - 锁延机制错误(这次真修好了) - 游戏结束后马上暂停并解除还会自动暂停(之前没修好) - 提前硬降失效 + 代码: + 修改场景模块方法名 + 软件锁变量名从lock改为appLock + 使用linter整理代码 + 重构锁延相关代码,freshgho,freshLockDelay,freshMinY合并为freshBlock + 修复: + BPM120~180之间分数计算不正确 + 进不指定锁延的模式就报错 + 锁延机制错误(这次真修好了) + 游戏结束后马上暂停并解除还会自动暂停(之前没修好) + 提前硬降失效 0.10.3: 软件锁 APP Lock - 新内容: - 设置增加软件锁选项,打开游戏后进入伪装界面 - 改动: - 剩余锁延重置次数指示器改为长方形 - debug界面改为重置界面,进入方法修改 - 游戏设置页面布局更改 - 语音音量条改为无刻度 - 取消快速重开设置,游戏过程中长按重开,结束后开局一秒内点击重开 - 修复: - 无尽挖掘报错 - 极简错误提示声音太小 - 修复回放也计入排行榜 - 回放时暂停不打断玩家操作 - c4w练习的lunatic分数bug + 新内容: + 设置增加软件锁选项,打开游戏后进入伪装界面 + 改动: + 剩余锁延重置次数指示器改为长方形 + debug界面改为重置界面,进入方法修改 + 游戏设置页面布局更改 + 语音音量条改为无刻度 + 取消快速重开设置,游戏过程中长按重开,结束后开局一秒内点击重开 + 修复: + 无尽挖掘报错 + 极简错误提示声音太小 + 修复回放也计入排行榜 + 回放时暂停不打断玩家操作 + c4w练习的lunatic分数bug 0.10.2: 锁延修复 Lock Delay Fixed - 改动: - 锁延机制再修正 - "失败"改为"游戏结束" - 修复: - 纠正部分rank文件转换错误 - 模式文件使用玩家的随机器以正确回放 - 游戏结束后马上暂停并解除还会自动暂停 - 改设置后回放错误 - 字库缺字 + 改动: + 锁延机制再修正 + "失败"改为"游戏结束" + 修复: + 纠正部分rank文件转换错误 + 模式文件使用玩家的随机器以正确回放 + 游戏结束后马上暂停并解除还会自动暂停 + 改设置后回放错误 + 字库缺字 0.10.1: 细节更新 Details update - 新内容: - 新语言:就这? - 新语言配套阴阳怪气Tips - 光标点击动画 - 锁延机制修正 - 锁延和可刷新次数可视化 - 两个新皮肤 - 改动: - BGM重新分配 - rockblock音乐微调 - 无刻度滑条 - 音量曲线调整 - 代码: - 玩家act函数addL/R更名zangiL/R - 玩家属性y_img更名imgY - 旋转中心坐标向左下修正负一 - 修复: - 改设置后回放错误 - 0.10.0的错误序列生成器 - 按R重开后濒死预警不消失 - GM模式通关一直触发win - 手机端屏幕方向错误(也许修复了) - 控制设置das/arr预览错误 + 新内容: + 新语言:就这? + 新语言配套阴阳怪气Tips + 光标点击动画 + 锁延机制修正 + 锁延和可刷新次数可视化 + 两个新皮肤 + 改动: + BGM重新分配 + rockblock音乐微调 + 无刻度滑条 + 音量曲线调整 + 代码: + 玩家act函数addL/R更名zangiL/R + 玩家属性y_img更名imgY + 旋转中心坐标向左下修正负一 + 修复: + 改设置后回放错误 + 0.10.0的错误序列生成器 + 按R重开后濒死预警不消失 + GM模式通关一直触发win + 手机端屏幕方向错误(也许修复了) + 控制设置das/arr预览错误 0.10.0: 回放更新 Replay Update - 新内容: - 更新后跳转到此页面 - 单局回放,要是有cc会出问题,以后再说 - 支持复制场地+序列 - 修改连击攻击力算法,调整mini的属性 - 自定义序列显示方块颜色 - 自定义序列菜单ui调整 - 新控件:简化按钮 (用于自定义序列等菜单) - 改动: - Chinese update log - 控件动效优化 - 极简错误音效调整 - 模电HBM历史性同框 - spin消3的分数下调 - 暂停界面数据显示格式和布局微调 - 初心/上级20G评级要求改动,清除高分榜 - 100L/400L评级要求改动 - 这个页面更易读了 - 代码: - 帧率控制代码调整,运行可能更流畅(反正不会比以前卡) - 修改部分玩家方法名 - 注释更规范了 - 修复: - 一些文本小错误 - 自定义序列相关的闪退 - 按键跟踪设置界面闪退 - 五连块成绩排序错误 - pc训练方块ghost浮空 - i平放顶层消1的奇怪行为 - 玩家掉出屏幕过程中绘制场地时剪裁不正确 - 限时打分的时间条和hold重合 + 新内容: + 更新后跳转到此页面 + 单局回放,要是有cc会出问题,以后再说 + 支持复制场地+序列 + 修改连击攻击力算法,调整mini的属性 + 自定义序列显示方块颜色 + 自定义序列菜单ui调整 + 新控件:简化按钮 (用于自定义序列等菜单) + 改动: + Chinese update log + 控件动效优化 + 极简错误音效调整 + 模电HBM历史性同框 + spin消3的分数下调 + 暂停界面数据显示格式和布局微调 + 初心/上级20G评级要求改动,清除高分榜 + 100L/400L评级要求改动 + 这个页面更易读了 + 代码: + 帧率控制代码调整,运行可能更流畅(反正不会比以前卡) + 修改部分玩家方法名 + 注释更规范了 + 修复: + 一些文本小错误 + 自定义序列相关的闪退 + 按键跟踪设置界面闪退 + 五连块成绩排序错误 + pc训练方块ghost浮空 + i平放顶层消1的奇怪行为 + 玩家掉出屏幕过程中绘制场地时剪裁不正确 + 限时打分的时间条和hold重合 0.9.2: Global Update - new: - independent spawning volume setting - select widgets with arrow keys - display last played mode on title screen - new blind mode (extremely hard) - mode map changed - [debug page] - change: - three little better backgrounds instead of stupid rainbow - kick list of i-piece little changed - no extremly huge radar chart in pause page - new in-game layout - new setting page layout - fixed: - error in infinite-dig - CC's sudden death sometimes - missing the top line when paste field - error when AI used all nexts - error when play default-bag game after played with custom sequence + new: + independent spawning volume setting + select widgets with arrow keys + display last played mode on title screen + new blind mode (extremely hard) + mode map changed + [debug page] + change: + three little better backgrounds instead of stupid rainbow + kick list of i-piece little changed + no extremly huge radar chart in pause page + new in-game layout + new setting page layout + fixed: + error in infinite-dig + CC's sudden death sometimes + missing the top line when paste field + error when AI used all nexts + error when play default-bag game after played with custom sequence 0.9.1: Piece Spawn SFX - new: - piece spawn SFX - fixed: - error when moving [nothing] when arr>0 - error when complete master-advanced + new: + piece spawn SFX + fixed: + error when moving [nothing] when arr>0 + error when complete master-advanced 0.9.0: Custom Sequence Update - new: - custom sequence - new sequence type: loop & fixed - many new tips - more powerful watermark - die animation in non-royale mode - better in-game layout - changed: - mode name shown at the top of screen - faster & harder attacker-ultimate - time-based-rank for master-advanced - little easier to get S in PC challenge (easy mode) - easier to get S in infinite mode, c4w, PC - harder to unlock sprint-400/1000 - harder to get high rank of sprint-1000 - harder drought-lunatic - code: - file sorted - task system rewrited, now perfect (maybe) - remove scissors/blendMode setting in drawing players - fixed: - screen orientation sometimes error after wake up the phone - hard move won't deactive "spin" - do not clear dead enemies' field - show ghost's center when ghost is off - error when get a PC in drought-lunatic + new: + custom sequence + new sequence type: loop & fixed + many new tips + more powerful watermark + die animation in non-royale mode + better in-game layout + changed: + mode name shown at the top of screen + faster & harder attacker-ultimate + time-based-rank for master-advanced + little easier to get S in PC challenge (easy mode) + easier to get S in infinite mode, c4w, PC + harder to unlock sprint-400/1000 + harder to get high rank of sprint-1000 + harder drought-lunatic + code: + file sorted + task system rewrited, now perfect (maybe) + remove scissors/blendMode setting in drawing players + fixed: + screen orientation sometimes error after wake up the phone + hard move won't deactive "spin" + do not clear dead enemies' field + show ghost's center when ghost is off + error when get a PC in drought-lunatic 0.8.24: Bug Fixed - new: - ready to refuse auto-formating stats. if update from versions too old - changed: - little changing of pentomino wallkick list - fixed: - incorrect color of P/Q - rank of petomino may be [custom] + new: + ready to refuse auto-formating stats. if update from versions too old + changed: + little changing of pentomino wallkick list + fixed: + incorrect color of P/Q + rank of petomino may be [custom] 0.8.23: Details Update - new: - new hidden BGM: Hay what kind of feeling - now can reset all data (hidden) - changed: - show "offset" in stat (only in total stat page) - 6 more X-spin-wallkick added - fixed: - speed dial do not moving - do not show 20+ combo + new: + new hidden BGM: Hay what kind of feeling + now can reset all data (hidden) + changed: + show "offset" in stat (only in total stat page) + 6 more X-spin-wallkick added + fixed: + speed dial do not moving + do not show 20+ combo 0.8.22: Shader Update - new: - new background: aura (using shader) - new BGM: Far - X-spin added - visual effects for when the player is in danger - staff page added - changed: - remake several backgrounds with shader, instead of image - kick-list of pentomino optimized - all backgounds fix screen correctly (maybe) - won't show "open saving folder" button on mobile devices - wallkick of J/L-180° spin changed - reset all settings - code: - player generator optimized by Gompyn, FinnTenzor - player system moduled - fixed: - rotating x do not fresh lock delay - error after reset skin/dir. in pentomino mode - some times error when any AI exists (wrong kickList code) + new: + new background: aura (using shader) + new BGM: Far + X-spin added + visual effects for when the player is in danger + staff page added + changed: + remake several backgrounds with shader, instead of image + kick-list of pentomino optimized + all backgounds fix screen correctly (maybe) + won't show "open saving folder" button on mobile devices + wallkick of J/L-180° spin changed + reset all settings + code: + player generator optimized by Gompyn, FinnTenzor + player system moduled + fixed: + rotating x do not fresh lock delay + error after reset skin/dir. in pentomino mode + some times error when any AI exists (wrong kickList code) 0.8.21: Bug Fixed - changed: - shape of speed dial changed - range of FX values changed - shape of speed dial changed - fixed: - error in modes with ai (rotate O in its rotation system, cause some strange error) + changed: + shape of speed dial changed + range of FX values changed + shape of speed dial changed + fixed: + error in modes with ai (rotate O in its rotation system, cause some strange error) 0.8.19/20: Fantastic Global Update+ - new: - new clearing FX - pentomino with new rotation system (testing) - new PC training mode with over 1000 quiz - new English translation by @MattMayuga#8789 - new language: ??? - language-setting page - [C B A S SS]→[D C B A S] - powerinfo switch - changed: - resume/quit key changed on pause page (quit with Q, resume with esc) - warning when back to pause page from setting page - some FX based on real time - tiny change (almost nothing) changed for powerInfo - page turing of in-game update log changed - readable update log of 0.8+ ver - some new "tips" - add ENG ver. document(not in game) - code: - swap id of J/L - wall-kick list easier to read - no utf8 char in code/comments - less global variables - light module optimized (but not used) - code optimized - fixed: - impossible to get SS in attacker mode + new: + new clearing FX + pentomino with new rotation system (testing) + new PC training mode with over 1000 quiz + new English translation by @MattMayuga#8789 + new language: ??? + language-setting page + [C B A S SS]→[D C B A S] + powerinfo switch + changed: + resume/quit key changed on pause page (quit with Q, resume with esc) + warning when back to pause page from setting page + some FX based on real time + tiny change (almost nothing) changed for powerInfo + page turing of in-game update log changed + readable update log of 0.8+ ver + some new "tips" + add ENG ver. document(not in game) + code: + swap id of J/L + wall-kick list easier to read + no utf8 char in code/comments + less global variables + light module optimized (but not used) + code optimized + fixed: + impossible to get SS in attacker mode 0.8.18: Details Update+ - new: - adjustable virtualkey SFX & VIB - changed: - add discord link in ENG mode - change par time/piece of sprint/battle/round mode - info on pause page more clearly - faster spaceBG rendering - updateLog editted - code: - delete all removable "goto"s! - callback system moduled, main.lua easy to read + new: + adjustable virtualkey SFX & VIB + changed: + add discord link in ENG mode + change par time/piece of sprint/battle/round mode + info on pause page more clearly + faster spaceBG rendering + updateLog editted + code: + delete all removable "goto"s! + callback system moduled, main.lua easy to read 0.8.17: Details Update - new: - bag seperating line switch - better radar chart & statistics on pause page - new generator method for drought mode, more difficult to finish - virtualkey pressing SFX - changed: - combo counter changed - rule of infinite dig changed - no drop/lock FX in two hardest hidden modes, make them harder - TSD-easy will auto finish when reach 20TSDs - solo/round AI setting changed - show text when entering debug mode - SFX when enter recording mode - remove full speed loading - code: - launching sound divided to SFX&VOC two parts - delete many "goto"s - vocal system moduled - language system moduled, easier to add new languages - fixed: - forgot to load language - error animation in control setting - error when paste map containing darkgreen block - moving block when changing target in t49/t99 - font error in patron list - do not reset pause count when restart + new: + bag seperating line switch + better radar chart & statistics on pause page + new generator method for drought mode, more difficult to finish + virtualkey pressing SFX + changed: + combo counter changed + rule of infinite dig changed + no drop/lock FX in two hardest hidden modes, make them harder + TSD-easy will auto finish when reach 20TSDs + solo/round AI setting changed + show text when entering debug mode + SFX when enter recording mode + remove full speed loading + code: + launching sound divided to SFX&VOC two parts + delete many "goto"s + vocal system moduled + language system moduled, easier to add new languages + fixed: + forgot to load language + error animation in control setting + error when paste map containing darkgreen block + moving block when changing target in t49/t99 + font error in patron list + do not reset pause count when restart 0.8.16: Fantastic Global Update - new: - new statistic page with: - Radar chart which shows some important info. of player's performance - count each clear/spin for each piece(old data will be splited averagely) - linux version! - welcome vocal by MrZ - rank label on mode icon(C→B→A→S→SS) - new J/L-spin: R→2/L→2(0,-1) - new O-spin-J/L method! - new tele-ospin method! - support out frame of skins with transparent pixels - DAS system remade, no bugs any more!(probably) - Initial hold/rotate/move switch! - display ms in control setting - super secret option - changed: - cannot initial hold in a row any more - new randomizer for drought2 - half-clear judging method changed - new background system(well, it doesn't look much different but space BG) - now can loading at full speed with Dblclick/space/enter - add alipay paycode to help page - better sequence randomizer - code: - first shader applied for white frame of falling block - many many module packed, easy to manage - bgm module changed, probably no bug - 4 devMode now - fixed: - error when set to max 0 next - I sequence initializing error when face setting changed - DAS error + new: + new statistic page with: + Radar chart which shows some important info. of player's performance + count each clear/spin for each piece(old data will be splited averagely) + linux version! + welcome vocal by MrZ + rank label on mode icon(C→B→A→S→SS) + new J/L-spin: R→2/L→2(0,-1) + new O-spin-J/L method! + new tele-ospin method! + support out frame of skins with transparent pixels + DAS system remade, no bugs any more!(probably) + Initial hold/rotate/move switch! + display ms in control setting + super secret option + changed: + cannot initial hold in a row any more + new randomizer for drought2 + half-clear judging method changed + new background system(well, it doesn't look much different but space BG) + now can loading at full speed with Dblclick/space/enter + add alipay paycode to help page + better sequence randomizer + code: + first shader applied for white frame of falling block + many many module packed, easy to manage + bgm module changed, probably no bug + 4 devMode now + fixed: + error when set to max 0 next + I sequence initializing error when face setting changed + DAS error 0.8.15: Bug Fixed - new: - can switch line-clear text now - new attack way "Clear"(half-clear) - give every update a name! - changed: - animation time of lock effect little changed - bone block of ball-skin changed - I change target more slowly - uthor.dignity-=1 - fixed: - 180° I spin kicklist error - I will kill itself when spawn dir. of mino changed - error when reach 400 in 20G(Lunatic) - error block color in modes with starting field + new: + can switch line-clear text now + new attack way "Clear"(half-clear) + give every update a name! + changed: + animation time of lock effect little changed + bone block of ball-skin changed + I change target more slowly + uthor.dignity-=1 + fixed: + 180° I spin kicklist error + I will kill itself when spawn dir. of mino changed + error when reach 400 in 20G(Lunatic) + error block color in modes with starting field 0.8.14: Cool FX - new: - click/tap/any-key to skip loading animation - lock animation - changed: - display scene info when error - code: - many optimization - fixed: - error when attack - error garbage line color - error in finesse checking - some times error when touch screen - touch/press release with no press, then error + new: + click/tap/any-key to skip loading animation + lock animation + changed: + display scene info when error + code: + many optimization + fixed: + error when attack + error garbage line color + error in finesse checking + some times error when touch screen + touch/press release with no press, then error 0.8.13: O-spin Update++ - new: - a independent page to set DAS/ARR, with an animation for preview - changed: - new virtualkey animation - freer drawing mode(Incompatible with old ver.) - combo&b3b attack changed - score of spins little changed - fixed: - wrong behavior in pause scene - ospin error in 0.8.12 - memory leakage in t49/t99 - unnatural behavior of widgets + new: + a independent page to set DAS/ARR, with an animation for preview + changed: + new virtualkey animation + freer drawing mode(Incompatible with old ver.) + combo&b3b attack changed + score of spins little changed + fixed: + wrong behavior in pause scene + ospin error in 0.8.12 + memory leakage in t49/t99 + unnatural behavior of widgets 0.8.12: Bountful Update - new: - layout setting: skin system with customizable block color/direction - more information when pause - block has more color(7→11) - skin: smooth(MrZ), contrast(MrZ), steel(kulumi), ball(shaw) - changed: - BGM secret7's Inst. changed - more stable space background - stat format changed when pause/stat menu - opaque background in pause when playing, transparent after game - canceled invalid game - easier to unlock custom mode - some text changed - code: - better line-clear process - merge event.lua to player.lua - new skin image format - same format for all file - better virtualkey-scanning opportunity, bit faster when many AI - some player-method name changed - fixed: - an error of pause button - score may be float number - many syntax errors of texts - crash when paste illegal data to drawing mode - stage reset problem in t49/t99 - wrong info in tech-L/U/U+ mode + new: + layout setting: skin system with customizable block color/direction + more information when pause + block has more color(7→11) + skin: smooth(MrZ), contrast(MrZ), steel(kulumi), ball(shaw) + changed: + BGM secret7's Inst. changed + more stable space background + stat format changed when pause/stat menu + opaque background in pause when playing, transparent after game + canceled invalid game + easier to unlock custom mode + some text changed + code: + better line-clear process + merge event.lua to player.lua + new skin image format + same format for all file + better virtualkey-scanning opportunity, bit faster when many AI + some player-method name changed + fixed: + an error of pause button + score may be float number + many syntax errors of texts + crash when paste illegal data to drawing mode + stage reset problem in t49/t99 + wrong info in tech-L/U/U+ mode 0.8.11: Total Update - changed: - better rule of checking invalid game - can setting when pause - opaque background when pause - code: - many code optimized(moduled) - fixed: - receive attack when paused in survivor mode - error when pasteboard has block_13 - must hold R to restart when finished the game - sth about screen size - some O-spin error - error line counting when pc(full b2b) + changed: + better rule of checking invalid game + can setting when pause + opaque background when pause + code: + many code optimized(moduled) + fixed: + receive attack when paused in survivor mode + error when pasteboard has block_13 + must hold R to restart when finished the game + sth about screen size + some O-spin error + error line counting when pc(full b2b) 0.8.10: Cool Update - new: - new BGM:Distortion(master-final) - all background darker - cooler error page - fixed: - error when finish master/ultra mode - shakeFX no effect when below 3 + new: + new BGM:Distortion(master-final) + all background darker + cooler error page + fixed: + error when finish master/ultra mode + shakeFX no effect when below 3 0.8.9: System Detail Update - new: - invalid game when pause too much - quick play re-added - new BGM: Oxygen(c4w&pc training) - changed: - space background little changed + new: + invalid game when pause too much + quick play re-added + new BGM: Oxygen(c4w&pc training) + changed: + space background little changed 0.8.8+: Bug-Fix Update - fixed many fatal bugs + fixed many fatal bugs 0.8.8: Space BG Update - new: - background now is cool space with "planets" and "stars", instead of falling tetrominoes - no black side in any screen size - adjustable waiting time before start - ajustable maxnext count - marked the modes with limited das/arr - new error page and a new voice - add many fatal bugs - changed: - simple records with date - tiny change in rotate system(JL pistol-spin) - better board copy/paste - an unlock-all easter egg - fixed: - press invisible func key - some mode error + new: + background now is cool space with "planets" and "stars", instead of falling tetrominoes + no black side in any screen size + adjustable waiting time before start + ajustable maxnext count + marked the modes with limited das/arr + new error page and a new voice + add many fatal bugs + changed: + simple records with date + tiny change in rotate system(JL pistol-spin) + better board copy/paste + an unlock-all easter egg + fixed: + press invisible func key + some mode error 0.8.7: Game Detail Update - new: - support 2^n G falling speed - changed: - better user experience in mode selecting - speed of marathon mode changed - code: - shorter clipboard string(when air above) - attack system/score system little changed - fixed: - wrong behaviour of rank system - error when enter some mode(again!) + new: + support 2^n G falling speed + changed: + better user experience in mode selecting + speed of marathon mode changed + code: + shorter clipboard string(when air above) + attack system/score system little changed + fixed: + wrong behaviour of rank system + error when enter some mode(again!) 0.8.6: System Detail Update - new: - can adjust gamepad keysetting - add SFX when enter game - changed: - map GUI little adjusted - event system little changed(no control when scene swapping) - fixed: - wrong behaviour of rank system - error when enter some mode + new: + can adjust gamepad keysetting + add SFX when enter game + changed: + map GUI little adjusted + event system little changed(no control when scene swapping) + fixed: + wrong behaviour of rank system + error when enter some mode 0.8.5-: Exploration Update - new: - mode map!Brandly new GUI for mode selecting - mode unlock system, not that scary for noob - every mode has rank calculating method(may some mistakes/inappropriate number) - save 10 best recoreds for each mode - can save/share custom map now - "new mode": Big Bang - changed: - button appearance changed - better widget performence - remove Qplay - fixed: - many bugs + new: + mode map!Brandly new GUI for mode selecting + mode unlock system, not that scary for noob + every mode has rank calculating method(may some mistakes/inappropriate number) + save 10 best recoreds for each mode + can save/share custom map now + "new mode": Big Bang + changed: + button appearance changed + better widget performence + remove Qplay + fixed: + many bugs 0.8.4: Miya Update+ - changed: - vocal more natural(important, may cause new bug) - a bit better performence on mobile devices - fixed: - some fatal bugs + changed: + vocal more natural(important, may cause new bug) + a bit better performence on mobile devices + fixed: + some fatal bugs 0.8.3: Miya Update - new: - new widget appearence - cuter miya + new: + new widget appearence + cuter miya 0.8.2: Graphics Update - new: - miya figure added - new widget appearence - changed: - GUI adjusted - fixed: - some bugs + new: + miya figure added + new widget appearence + changed: + GUI adjusted + fixed: + some bugs 0.8.1: Power Info Update - changed: - more FX level - better battery info displaying - 3 next in GMroll - fixed: - some bugs + changed: + more FX level + better battery info displaying + 3 next in GMroll + fixed: + some bugs 0.8.0: Small Update - new: - better update log from now on(2020.5.2) - changed: - more details - code: - remade text system - fixed: - some bugs + new: + better update log from now on(2020.5.2) + changed: + more details + code: + remade text system + fixed: + some bugs 0.7.35: Bug Fixed - yeah, only bug fixed + yeah, only bug fixed 0.7.34: Voice Update+ - replace most voice - shaking FX more natural + replace most voice + shaking FX more natural 0.7.33+: Bot Update - MORE POWERFUL 9-stack AI - add stereo-setting slider - code optimized - bug fixed + MORE POWERFUL 9-stack AI + add stereo-setting slider + code optimized + bug fixed 0.7.32: Virtualkey Update+ - Blind-GM now show section directly - easier&more standard classic mode - can switch Virtualkey's auto dodging - in-game setting - code optimized - bug fixed + Blind-GM now show section directly + easier&more standard classic mode + can switch Virtualkey's auto dodging + in-game setting + code optimized + bug fixed 0.7.31: Stereo Update - stereo system - fixed a problem in finesse calculating + stereo system + fixed a problem in finesse calculating 0.7.30: Virtualkey Update - auto-tracking virtual key, adjustable parameters! - can switch on/off virtuakeys - add 7 more key - better finesse rate calculating - block generating position on Y-axis changed - new icon for android - can use preset in custom mode with keyboard - adjusted GUI - many bug fixed + auto-tracking virtual key, adjustable parameters! + can switch on/off virtuakeys + add 7 more key + better finesse rate calculating + block generating position on Y-axis changed + new icon for android + can use preset in custom mode with keyboard + adjusted GUI + many bug fixed 0.7.28: Finesse Update - add fineese check(almost useful) - code optimized + add fineese check(almost useful) + code optimized 0.7.27: O-spin Update+ - super O transform system - optimized system(no used) - bug fixed + super O transform system + optimized system(no used) + bug fixed 0.7.26: Bug Fixed - new skin - import light lib - many bug fixed + new skin + import light lib + many bug fixed 0.7.25: Demo Update - demo play at main menu - ALMOST reconstructed WHOLE PLAYER SYSTEM, NEED TEST - many bug fixed + demo play at main menu + ALMOST reconstructed WHOLE PLAYER SYSTEM, NEED TEST + many bug fixed 0.7.23/24: Sound Update - all bgm remade - more settings with brand new GUI! - new mode: Master-Final - new modes: attacker & defender(not survivor!) - add restart button when pause - Code Clear added, face it bravely!(Windows only) - change falling animation - new GUI details - louder sound - code optimized - many bugs fixed + all bgm remade + more settings with brand new GUI! + new mode: Master-Final + new modes: attacker & defender(not survivor!) + add restart button when pause + Code Clear added, face it bravely!(Windows only) + change falling animation + new GUI details + louder sound + code optimized + many bugs fixed 0.7.22: Graphics Update - scoring system - smooth dropping - can change FX level - new attaking FX - new bone skin - battery info/time display - in-game update log(this page) - fast game - much many more better GUI details - add EXTRA level of survivor mode - adjust difficulty of Tech mode - compressed setting/data - support 10% step alpha of virtual key - many code optimized&bugs fixed + scoring system + smooth dropping + can change FX level + new attaking FX + new bone skin + battery info/time display + in-game update log(this page) + fast game + much many more better GUI details + add EXTRA level of survivor mode + adjust difficulty of Tech mode + compressed setting/data + support 10% step alpha of virtual key + many code optimized&bugs fixed 0.7.21: Title Update - new title image - more GUI details - many bugs fixed + new title image + more GUI details + many bugs fixed 0.7.20: Music Room Update - add music room - change block/space apperance in draw mode - field shake animation - default sets of custom options - can set BG/BGM in custom mode - bug fixed + add music room + change block/space apperance in draw mode + field shake animation + default sets of custom options + can set BG/BGM in custom mode + bug fixed 0.7.19: Voice Update - voice system added(voice by Miya) - support macOS! - new mode: C4W training - rendering of royale mode optimized again - add "free cell" in draw mode - add 2 new block skins - new difficulty in infinite mode - new background/sound effect in master mode - bug fixed + voice system added(voice by Miya) + support macOS! + new mode: C4W training + rendering of royale mode optimized again + add "free cell" in draw mode + add 2 new block skins + new difficulty in infinite mode + new background/sound effect in master mode + bug fixed 0.7.18: Skin Update - 3 new block skins!(one skin origional by Miya(nya~)) - better restarting(to prevent mistakenly touching) - switch display of puzzle mode - adjust UI - code optimized - default custom options changed to as infinite mode + 3 new block skins!(one skin origional by Miya(nya~)) + better restarting(to prevent mistakenly touching) + switch display of puzzle mode + adjust UI + code optimized + default custom options changed to as infinite mode 0.7.17: Pause Update - display game stats when pause - more options in statistics - better pausing - adjust difficulty of Tech mode - adjust difficulty of PC training mode - adjust vibrate level for mobile devices - little optimized - bugs fixed + display game stats when pause + more options in statistics + better pausing + adjust difficulty of Tech mode + adjust difficulty of PC training mode + adjust vibrate level for mobile devices + little optimized + bugs fixed 0.7.16: Game Detail Update - change rules of custom puzzle mode - change rules of TSD mode - better pausing - speed optimized - adjust difficulty of dig mode - bugs fixed + change rules of custom puzzle mode + change rules of TSD mode + better pausing + speed optimized + adjust difficulty of dig mode + bugs fixed 0.7.15: Puzzle Update - can make puzzle by drawing mode - can pause game with animation - change icon of "Functional key" - speed optimized - bugs fixed + can make puzzle by drawing mode + can pause game with animation + change icon of "Functional key" + speed optimized + bugs fixed 0.7.14: Creativity Update - drawing mode in custom game - adjustable virtual keys with mouse - speed optimized - rotate also create shade + drawing mode in custom game + adjustable virtual keys with mouse + speed optimized + rotate also create shade 0.7.13+: Small Update - change difficulty of survivor mode - little game rule change - bugs fixed(AI control error) + change difficulty of survivor mode + little game rule change + bugs fixed(AI control error) 0.7.13: - new: - Chinese game name: 方块研究所 - SUPER COOL instant moving effect - new b2b bar style & animation - new transition animation - changed: - change difficulty of master mode - adjust delay algorithm(probably cause controlfeel changing, please reset your DAS setting) - code reconstructed - debug key change to F8 - fixed: - error when sequence mode is his - error game area size of custom opponent + new: + Chinese game name: 方块研究所 + SUPER COOL instant moving effect + new b2b bar style & animation + new transition animation + changed: + change difficulty of master mode + adjust delay algorithm(probably cause controlfeel changing, please reset your DAS setting) + code reconstructed + debug key change to F8 + fixed: + error when sequence mode is his + error game area size of custom opponent 0.7.12: Global Update - AI learned to switch attack mode - seperate master mode from marathon mode - master mode more interesting - countdown line in sprint mode - smooth BGM swapping - new garbage buffer - new harddrop&lock SFX feel - a bit change of rotate system - grid switch - swap target by combo key/press - some Chinese translaton editted - [reconstruct event system] + AI learned to switch attack mode + seperate master mode from marathon mode + master mode more interesting + countdown line in sprint mode + smooth BGM swapping + new garbage buffer + new harddrop&lock SFX feel + a bit change of rotate system + grid switch + swap target by combo key/press + some Chinese translaton editted + [reconstruct event system] 0.7.11: Global Update - some Chinese translaton editted - add bone block in 2 hardest marathon(new block-fresh system) - play sound when get badges in royale mode - change b2b indicator display method - more difficulty of blind mode - colorful garbage lines - clearer attacking pointer - fix 6 next in classic mode - add QR code in help page - change some detials + some Chinese translaton editted + add bone block in 2 hardest marathon(new block-fresh system) + play sound when get badges in royale mode + change b2b indicator display method + more difficulty of blind mode + colorful garbage lines + clearer attacking pointer + fix 6 next in classic mode + add QR code in help page + change some detials 0.7.10: Small Update - full Chinese translation - add Classic mode - change O spin's behaviour - bugs fixed + full Chinese translation + add Classic mode + change O spin's behaviour + bugs fixed 0.7.9: O-spin Update - O spin is a lie - better attacking pointer - language system - change rotate system - change BGM&BG set - code optimized - bugs fixed + O spin is a lie + better attacking pointer + language system + change rotate system + change BGM&BG set + code optimized + bugs fixed 0.7.8: Performance Update - GPU usage decreased much more than before - add virtual key animation - display player's rank after death in royale mode - fix sequence error of PC training mode - adjust difficulty of suvivor mode - code optimized - bugs fixed + GPU usage decreased much more than before + add virtual key animation + display player's rank after death in royale mode + fix sequence error of PC training mode + adjust difficulty of suvivor mode + code optimized + bugs fixed 0.7.7: Mode Update - add dig mode - add survivor mode - combine some modes - change some GUI - more SFXs - bugs fixed + add dig mode + add survivor mode + combine some modes + change some GUI + more SFXs + bugs fixed 0.7.6: Mode Update - new font - add DIFFICULTY selection - virtual keys give visual feedback(PC/phone) - add vibration - add default set of visual keys - add tech mode - add drought mode - better GUI&change speed&BGM in royale mode - more FXs in royale mode - fix all attacking bug of royale mode - change sequence of TSD-only mode to bag7 + new font + add DIFFICULTY selection + virtual keys give visual feedback(PC/phone) + add vibration + add default set of visual keys + add tech mode + add drought mode + better GUI&change speed&BGM in royale mode + more FXs in royale mode + fix all attacking bug of royale mode + change sequence of TSD-only mode to bag7 0.7.5: Global Update - reduce difficuly of PC training mode, and add more patterns - reduce difficuly of death mode - add PC challenge mode - swapping attack mode for royale mode(AI always use 'Random') - royale mode use less GPU - new GUI of royale mode - add intro scene - soft scene swapping - adjust other details - change game icon - adjust GUI of royale mode - change sequence of TSD-only mode - royale mode use LESS GPU + reduce difficuly of PC training mode, and add more patterns + reduce difficuly of death mode + add PC challenge mode + swapping attack mode for royale mode(AI always use 'Random') + royale mode use less GPU + new GUI of royale mode + add intro scene + soft scene swapping + adjust other details + change game icon + adjust GUI of royale mode + change sequence of TSD-only mode + royale mode use LESS GPU 0.7.4: Bug Update - add a lot of bugs + add a lot of bugs 0.7.3: Game Detail Update - add infinite target in custom - fix TSD-only mode result+1 when finishing with a wrong clear - change sequence generator of TSD-only mode - GUI position editted - Fix Screen flow - smarter AI + add infinite target in custom + fix TSD-only mode result+1 when finishing with a wrong clear + change sequence generator of TSD-only mode + GUI position editted + Fix Screen flow + smarter AI 0.7.2: Mode Update - add PC training mode - add TSD-only mode - remove non-sense s/z spin double - GUI position editted - grid BG changed - smarter AI + add PC training mode + add TSD-only mode + remove non-sense s/z spin double + GUI position editted + grid BG changed + smarter AI ]=] \ No newline at end of file diff --git a/parts/users.lua b/parts/users.lua index 1f4a30b7..e90314bf 100644 --- a/parts/users.lua +++ b/parts/users.lua @@ -1,91 +1,91 @@ local gc,fs=love.graphics,love.filesystem local emptyUser={ - username="Stacker", - motto="", - hash="", - new=false, + username="Stacker", + motto="", + hash="", + new=false, } local defaultAvatar={} for i=1,29 do - local img=TEXTURE.miniBlock[i] - defaultAvatar[i]=GC.DO{128,128, - {'clear',.1,.1,.1}, - {'draw',img,63,63,.2,30,30,img:getWidth()/2,img:getHeight()/2}, - } + local img=TEXTURE.miniBlock[i] + defaultAvatar[i]=GC.DO{128,128, + {'clear',.1,.1,.1}, + {'draw',img,63,63,.2,30,30,img:getWidth()/2,img:getHeight()/2}, + } end local errorAvatar=GC.DO{128,128, - {'setCL',1,.2,.15}, - {'setLW',10}, - {'line',10,10,117,117}, - {'line',10,117,117,10}, + {'setCL',1,.2,.15}, + {'setLW',10}, + {'line',10,10,117,117}, + {'line',10,117,117,10}, } local function _loadAvatar(path) - local success,img=pcall(gc.newImage,path) - if success then - local canvas=gc.newCanvas(128,128) - gc.push() - gc.origin() - gc.setColor(1,1,1) - gc.setCanvas(canvas) - mDraw(img,64,64,nil,128/math.max(img:getWidth(),img:getHeight())) - gc.setCanvas() - gc.pop() - return canvas - else - return errorAvatar - end + local success,img=pcall(gc.newImage,path) + if success then + local canvas=gc.newCanvas(128,128) + gc.push() + gc.origin() + gc.setColor(1,1,1) + gc.setCanvas(canvas) + mDraw(img,64,64,nil,128/math.max(img:getWidth(),img:getHeight())) + gc.setCanvas() + gc.pop() + return canvas + else + return errorAvatar + end end local db_img={} local db=setmetatable({},{__index=function(self,uid) - if not uid then return emptyUser end - local file="cache/user"..uid..".dat" - local d=fs.getInfo(file)and JSON.decode(fs.read(file))or TABLE.copy(emptyUser) - rawset(self,uid,d) - db_img[uid]= - type(d.hash)=='string'and #d.hash>0 and fs.getInfo("cache/"..d.hash)and - _loadAvatar("cache/"..d.hash)or - defaultAvatar[(uid-26)%29+1] - return d + if not uid then return emptyUser end + local file="cache/user"..uid..".dat" + local d=fs.getInfo(file)and JSON.decode(fs.read(file))or TABLE.copy(emptyUser) + rawset(self,uid,d) + db_img[uid]= + type(d.hash)=='string'and #d.hash>0 and fs.getInfo("cache/"..d.hash)and + _loadAvatar("cache/"..d.hash)or + defaultAvatar[(uid-26)%29+1] + return d end}) local USERS={} function USERS.updateUserData(data) - local uid=data.uid - db[uid].username=data.username - db[uid].motto=data.motto - fs.write("cache/user"..uid..".dat",JSON.encode{ - username=data.username, - motto=data.motto, - hash=data.hash or db[uid].hash, - }) - if data.avatar then - fs.write("cache/"..data.hash,love.data.decode('string','base64',data.avatar:sub(data.avatar:find(",")+1))) - db_img[uid]=_loadAvatar("cache/"..data.hash) - db[uid].hash=type(data.hash)=='string'and #data.hash>0 and data.hash - end + local uid=data.uid + db[uid].username=data.username + db[uid].motto=data.motto + fs.write("cache/user"..uid..".dat",JSON.encode{ + username=data.username, + motto=data.motto, + hash=data.hash or db[uid].hash, + }) + if data.avatar then + fs.write("cache/"..data.hash,love.data.decode('string','base64',data.avatar:sub(data.avatar:find(",")+1))) + db_img[uid]=_loadAvatar("cache/"..data.hash) + db[uid].hash=type(data.hash)=='string'and #data.hash>0 and data.hash + end end function USERS.getUsername(uid)return db[uid].username end function USERS.getMotto(uid)return db[uid].motto end function USERS.getHash(uid)return db[uid].hash or""end function USERS.getAvatar(uid) - if uid then - if not db[uid].new then - NET.getUserInfo(uid) - db[uid].new=true - end - return db_img[uid] - else - return defaultAvatar[1] - end + if uid then + if not db[uid].new then + NET.getUserInfo(uid) + db[uid].new=true + end + return db_img[uid] + else + return defaultAvatar[1] + end end function USERS.forceFreshAvatar() - for _,U in next,db do - U.new=false - end + for _,U in next,db do + U.new=false + end end return USERS \ No newline at end of file diff --git a/parts/virtualKey.lua b/parts/virtualKey.lua index b6debe17..3937e5c4 100644 --- a/parts/virtualKey.lua +++ b/parts/virtualKey.lua @@ -8,100 +8,105 @@ local VK_org=VK_org local skin=1 local buttonImages={ - GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98},{'dCirc',100,100,90}}, - GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98,8},{'dCirc',100,100,90,8}}, - GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98,6},{'dCirc',100,100,90,6}}, - GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98,4},{'dCirc',100,100,89,4}}, - GC.DO{200,200,{'setLW',4},{'dRect',31,31,138,138},{'dRect',39,39,122,122}}, + GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98},{'dCirc',100,100,90}}, + GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98,8},{'dCirc',100,100,90,8}}, + GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98,6},{'dCirc',100,100,90,6}}, + GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98,4},{'dCirc',100,100,89,4}}, + GC.DO{200,200,{'setLW',4},{'dRect',31,31,138,138},{'dRect',39,39,122,122}}, } local rippleImages={ - GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98}}, - GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98,8}}, - GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98,6}}, - GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98,4}}, - GC.DO{200,200,{'setLW',4},{'dRect',31,31,138,138}}, + GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98}}, + GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98,8}}, + GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98,6}}, + GC.DO{200,200,{'setLW',4},{'dCirc',100,100,98,4}}, + GC.DO{200,200,{'setLW',4},{'dRect',31,31,138,138}}, } local holdImages={ - GC.DO{200,200,{'fCirc',100,100,86}}, - GC.DO{200,200,{'fCirc',100,100,86,8}}, - GC.DO{200,200,{'fCirc',100,100,85,6}}, - GC.DO{200,200,{'fCirc',100,100,83,4}}, - GC.DO{200,200,{'fRect',43,43,114,114}}, + GC.DO{200,200,{'fCirc',100,100,86}}, + GC.DO{200,200,{'fCirc',100,100,86,8}}, + GC.DO{200,200,{'fCirc',100,100,85,6}}, + GC.DO{200,200,{'fCirc',100,100,83,4}}, + GC.DO{200,200,{'fRect',43,43,114,114}}, } local virtualkeySet={ - { - {id=1, x=80, y=720-200, r=80},--moveLeft - {id=2, x=320, y=720-200, r=80},--moveRight - {id=3, x=1280-80, y=720-200, r=80},--rotRight - {id=4, x=1280-200, y=720-80, r=80},--rotLeft - {id=5, x=1280-200, y=720-320, r=80},--rot180 - {id=6, x=200, y=720-320, r=80},--hardDrop - {id=7, x=200, y=720-80, r=80},--softDrop - {id=8, x=1280-320, y=720-200, r=80},--hold - {id=9, x=80, y=280, r=80},--func1 - {id=10, x=1280-80, y=280, r=80},--func2 - },--Farter's tetr.js set - { - {id=1, x=1280-320, y=720-200, r=80},--moveLeft - {id=2, x=1280-80, y=720-200, r=80},--moveRight - {id=3, x=200, y=720-80, r=80},--rotRight - {id=4, x=80, y=720-200, r=80},--rotLeft - {id=5, x=200, y=720-320, r=80},--rot180 - {id=6, x=1280-200, y=720-320, r=80},--hardDrop - {id=7, x=1280-200, y=720-80, r=80},--softDrop - {id=8, x=320, y=720-200, r=80},--hold - {id=9, x=1280-80, y=280, r=80},--func1 - {id=10, x=80, y=280, r=80},--func2 - },--Mirrored tetr.js set - { - {id=1, x=80, y=720-80, r=80},--moveLeft - {id=2, x=240, y=720-80, r=80},--moveRight - {id=3, x=1280-240, y=720-80, r=80},--rotRight - {id=4, x=1280-400, y=720-80, r=80},--rotLeft - {id=5, x=1280-240, y=720-240, r=80},--rot180 - {id=6, x=1280-80, y=720-80, r=80},--hardDrop - {id=7, x=1280-80, y=720-240, r=80},--softDrop - {id=8, x=1280-80, y=720-400, r=80},--hold - {id=9, x=80, y=720-240, r=80},--func1 - {id=10, x=240, y=720-240, r=80},--func2 - },--Author's set, not recommend - { - {id=1, x=1280-400, y=720-80, r=80},--moveLeft - {id=2, x=1280-80, y=720-80, r=80},--moveRight - {id=3, x=240, y=720-80, r=80},--rotRight - {id=4, x=80, y=720-80, r=80},--rotLeft - {id=5, x=240, y=720-240, r=80},--rot180 - {id=6, x=1280-240, y=720-240, r=80},--hardDrop - {id=7, x=1280-240, y=720-80, r=80},--softDrop - {id=8, x=400, y=720-80, r=80},--hold - {id=9, x=80, y=720-240, r=80},--func1 - {id=10, x=80, y=720-400, r=80},--func2 - },--Keyboard set - { - {id=9, x=70, y=50,r=30},--func1 - {id=10, x=130, y=50,r=30},--func2 - {id=4, x=190, y=50,r=30},--rotLeft - {id=3, x=250, y=50,r=30},--rotRight - {id=5, x=310, y=50,r=30},--rot180 - {id=1, x=370, y=50,r=30},--moveLeft - {id=2, x=430, y=50,r=30},--moveRight - {id=8, x=490, y=50,r=30},--hold - {id=7, x=550, y=50,r=30},--softDrop - {id=6, x=610, y=50,r=30},--hardDrop - {id=11, x=670, y=50,r=30},--insLeft - {id=12, x=730, y=50,r=30},--insRight - {id=13, x=790, y=50,r=30},--insDown - {id=14, x=850, y=50,r=30},--down1 - {id=15, x=910, y=50,r=30},--down4 - {id=16, x=970, y=50,r=30},--down10 - {id=17, x=1030, y=50,r=30},--dropLeft - {id=18, x=1090, y=50,r=30},--dropRight - {id=19, x=1150, y=50,r=30},--zangiLeft - {id=20, x=1210, y=50,r=30},--zangiRight - },--PC key feedback(top&in a row) + { + {id=1, x=80, y=-200, r=80},--moveLeft + {id=2, x=320, y=-200, r=80},--moveRight + {id=3, x=-80, y=-200, r=80},--rotRight + {id=4, x=-200, y=-80, r=80},--rotLeft + {id=5, x=-200, y=-320, r=80},--rot180 + {id=6, x=200, y=-320, r=80},--hardDrop + {id=7, x=200, y=-80, r=80},--softDrop + {id=8, x=-320, y=-200, r=80},--hold + {id=9, x=80, y=280, r=80},--func1 + {id=10, x=-80, y=280, r=80},--func2 + },--Farter's tetr.js set + { + {id=1, x=-320, y=-200, r=80},--moveLeft + {id=2, x=-80, y=-200, r=80},--moveRight + {id=3, x=200, y=-80, r=80},--rotRight + {id=4, x=80, y=-200, r=80},--rotLeft + {id=5, x=200, y=-320, r=80},--rot180 + {id=6, x=-200, y=-320, r=80},--hardDrop + {id=7, x=-200, y=-80, r=80},--softDrop + {id=8, x=320, y=-200, r=80},--hold + {id=9, x=-80, y=280, r=80},--func1 + {id=10, x=80, y=280, r=80},--func2 + },--Mirrored tetr.js set + { + {id=1, x=80, y=-80, r=80},--moveLeft + {id=2, x=240, y=-80, r=80},--moveRight + {id=3, x=-240, y=-80, r=80},--rotRight + {id=4, x=-400, y=-80, r=80},--rotLeft + {id=5, x=-240, y=-240, r=80},--rot180 + {id=6, x=-80, y=-80, r=80},--hardDrop + {id=7, x=-80, y=-240, r=80},--softDrop + {id=8, x=-80, y=-400, r=80},--hold + {id=9, x=80, y=-240, r=80},--func1 + {id=10, x=240, y=-240, r=80},--func2 + },--Author's set, not recommend + { + {id=1, x=-400, y=-80, r=80},--moveLeft + {id=2, x=-80, y=-80, r=80},--moveRight + {id=3, x=240, y=-80, r=80},--rotRight + {id=4, x=80, y=-80, r=80},--rotLeft + {id=5, x=240, y=-240, r=80},--rot180 + {id=6, x=-240, y=-240, r=80},--hardDrop + {id=7, x=-240, y=-80, r=80},--softDrop + {id=8, x=400, y=-80, r=80},--hold + {id=9, x=80, y=-240, r=80},--func1 + {id=10, x=80, y=-400, r=80},--func2 + },--Keyboard set + { + {id=9, x=70, y=50, r=30},--func1 + {id=10, x=130, y=50, r=30},--func2 + {id=4, x=190, y=50, r=30},--rotLeft + {id=3, x=250, y=50, r=30},--rotRight + {id=5, x=310, y=50, r=30},--rot180 + {id=1, x=370, y=50, r=30},--moveLeft + {id=2, x=430, y=50, r=30},--moveRight + {id=8, x=490, y=50, r=30},--hold + {id=7, x=550, y=50, r=30},--softDrop + {id=6, x=610, y=50, r=30},--hardDrop + {id=11, x=670, y=50, r=30},--insLeft + {id=12, x=730, y=50, r=30},--insRight + {id=13, x=790, y=50, r=30},--insDown + {id=14, x=850, y=50, r=30},--down1 + {id=15, x=910, y=50, r=30},--down4 + {id=16, x=970, y=50, r=30},--down10 + {id=17, x=1030, y=50, r=30},--dropLeft + {id=18, x=1090, y=50, r=30},--dropRight + {id=19, x=1150, y=50, r=30},--zangiLeft + {id=20, x=1210, y=50, r=30},--zangiRight + },--PC key feedback(top&in a row) } - +for _,set in next,virtualkeySet do + for _,key in next,set do + if key.x<0 then key.x=1280+key.x end + if key.y<0 then key.x=720+key.y end + end +end --Virtualkey icons local VKIcon={} gc.setDefaultFilter('nearest','nearest') @@ -116,179 +121,179 @@ local VK={keys=keys} function VK.on(x,y) - local dist,nearest=1e10 - for id,B in next,keys do - if B.ava then - local d1=(x-B.x)^2+(y-B.y)^2 - if d10 then - b.x=b.x+(b.x-B.x)*d*b.r*2.6e-5 - b.y=b.y+(b.y-B.y)*d*b.r*2.6e-5 - end - end - end - end - SFX.play('virtualKey',SETTING.VKSFX) - VIB(SETTING.VKVIB) + --Button collision (not accurate) + if SETTING.VKDodge then + for _,b in next,keys do + local d=B.r+b.r-((B.x-b.x)^2+(B.y-b.y)^2)^.5--Hit depth(Neg means distance) + if d>0 then + b.x=b.x+(b.x-B.x)*d*b.r*2.6e-5 + b.y=b.y+(b.y-B.y)*d*b.r*2.6e-5 + end + end + end + end + SFX.play('virtualKey',SETTING.VKSFX) + VIB(SETTING.VKVIB) end function VK.press(id) - keys[id].isDown=true - keys[id].pressTime=10 + keys[id].isDown=true + keys[id].pressTime=10 end function VK.release(id) - keys[id].isDown=false + keys[id].isDown=false end function VK.setShape(s) - skin=s + skin=s end function VK.nextShape() - skin=skin%#buttonImages+1 - return skin + skin=skin%#buttonImages+1 + return skin end function VK.switchKey(id,on) - keys[id].ava=on + keys[id].ava=on end function VK.restore() - for i=1,#VK_org do - local B,O=keys[i],VK_org[i] - B.ava=O.ava - B.x=O.x - B.y=O.y - B.r=O.r - B.isDown=false - B.pressTime=0 - end - for id,v in next,PLAYERS[1].keyAvailable do - if not v then - keys[id].ava=false - end - end + for i=1,#VK_org do + local B,O=keys[i],VK_org[i] + B.ava=O.ava + B.x=O.x + B.y=O.y + B.r=O.r + B.isDown=false + B.pressTime=0 + end + for id,v in next,PLAYERS[1].keyAvailable do + if not v then + keys[id].ava=false + end + end end function VK.changeSet(id) - local set=virtualkeySet[id] - for i=1,#VK_org do VK_org[i].ava=false end - for n=1,#set do - local vk=set[n] - local B=VK_org[vk.id] - B.ava,B.x,B.y,B.r=true,vk.x,vk.y,vk.r - end + local set=virtualkeySet[id] + for i=1,#VK_org do VK_org[i].ava=false end + for n=1,#set do + local vk=set[n] + local B=VK_org[vk.id] + B.ava,B.x,B.y,B.r=true,vk.x,vk.y,vk.r + end end function VK.update() - if SETTING.VKSwitch then - for _,B in next,keys do - if B.pressTime>0 then - B.pressTime=B.pressTime-1 - end - end - end + if SETTING.VKSwitch then + for _,B in next,keys do + if B.pressTime>0 then + B.pressTime=B.pressTime-1 + end + end + end end function VK.draw() - if not SETTING.VKSwitch then return end - local a=SETTING.VKAlpha - local buttonImage=buttonImages[skin] - local rippleImage=rippleImages[skin] - local holdImage=holdImages[skin] - if SETTING.VKIcon then - for i,B in next,keys do - if B.ava then - local r=B.r - --Button outline - gc_setColor(1,1,1,a) - gc_setLineWidth(r*.07) - gc_draw(buttonImage,B.x,B.y,nil,r*.01,nil,100,100) + if not SETTING.VKSwitch then return end + local a=SETTING.VKAlpha + local buttonImage=buttonImages[skin] + local rippleImage=rippleImages[skin] + local holdImage=holdImages[skin] + if SETTING.VKIcon then + for i,B in next,keys do + if B.ava then + local r=B.r + --Button outline + gc_setColor(1,1,1,a) + gc_setLineWidth(r*.07) + gc_draw(buttonImage,B.x,B.y,nil,r*.01,nil,100,100) - --Icon - local _=B.pressTime - gc_setColor(1,1,1,a) - gc_draw(VKIcon[i],B.x,B.y,nil,r*.024+_*.06,nil,18,18) + --Icon + local _=B.pressTime + gc_setColor(1,1,1,a) + gc_draw(VKIcon[i],B.x,B.y,nil,r*.024+_*.06,nil,18,18) - --Ripple - if _>0 then - gc_setColor(1,1,1,a*_*.08) - local d=r*(1.4-_*.04) - gc_draw(rippleImage,B.x,B.y,nil,d*.01,nil,100,100) - end + --Ripple + if _>0 then + gc_setColor(1,1,1,a*_*.08) + local d=r*(1.4-_*.04) + gc_draw(rippleImage,B.x,B.y,nil,d*.01,nil,100,100) + end - --Glow when press - if B.isDown then - gc_setColor(1,1,1,a*.4) - gc_draw(holdImage,B.x,B.y,nil,r*.01,nil,100,100) - end - end - end - else - for _,B in next,keys do - if B.ava then - local r=B.r - gc_setColor(1,1,1,a) - gc_setLineWidth(r*.07) - gc_draw(buttonImage,B.x,B.y,nil,r*.01,nil,100,100) - local _=B.pressTime - if _>0 then - gc_setColor(1,1,1,a*_*.08) - gc_draw(holdImage,B.x,B.y,nil,r*.01,nil,100,100) - local d=r*(1.4-_*.04) - gc_draw(rippleImage,B.x,B.y,nil,d*.01,nil,100,100) - end - end - end - end + --Glow when press + if B.isDown then + gc_setColor(1,1,1,a*.4) + gc_draw(holdImage,B.x,B.y,nil,r*.01,nil,100,100) + end + end + end + else + for _,B in next,keys do + if B.ava then + local r=B.r + gc_setColor(1,1,1,a) + gc_setLineWidth(r*.07) + gc_draw(buttonImage,B.x,B.y,nil,r*.01,nil,100,100) + local _=B.pressTime + if _>0 then + gc_setColor(1,1,1,a*_*.08) + gc_draw(holdImage,B.x,B.y,nil,r*.01,nil,100,100) + local d=r*(1.4-_*.04) + gc_draw(rippleImage,B.x,B.y,nil,d*.01,nil,100,100) + end + end + end + end end function VK.preview(selected) - if not SETTING.VKSwitch then return end - local buttonImage=buttonImages[skin] - local holdImage=holdImages[skin] - for i,B in next,VK_org do - if B.ava then - local r=B.r - gc_setColor(1,1,1,SETTING.VKAlpha) - gc_setLineWidth(r*.07) - gc_draw(buttonImage,B.x,B.y,nil,r*.01,nil,100,100) - if selected==i and TIME()%.26<.13 then - gc_setColor(1,1,1,SETTING.VKAlpha*.62) - gc_draw(holdImage,B.x,B.y,nil,r*.01,nil,100,100) - end - if SETTING.VKIcon then - gc_setColor(1,1,1,SETTING.VKAlpha) - gc_draw(VKIcon[i],B.x,B.y,nil,r*.024,nil,18,18) - end - end - end + if not SETTING.VKSwitch then return end + local buttonImage=buttonImages[skin] + local holdImage=holdImages[skin] + for i,B in next,VK_org do + if B.ava then + local r=B.r + gc_setColor(1,1,1,SETTING.VKAlpha) + gc_setLineWidth(r*.07) + gc_draw(buttonImage,B.x,B.y,nil,r*.01,nil,100,100) + if selected==i and TIME()%.26<.13 then + gc_setColor(1,1,1,SETTING.VKAlpha*.62) + gc_draw(holdImage,B.x,B.y,nil,r*.01,nil,100,100) + end + if SETTING.VKIcon then + gc_setColor(1,1,1,SETTING.VKAlpha) + gc_draw(VKIcon[i],B.x,B.y,nil,r*.024,nil,18,18) + end + end + end end return VK \ No newline at end of file diff --git a/version.lua b/version.lua index fe0a3993..4e3f9b5e 100644 --- a/version.lua +++ b/version.lua @@ -1,7 +1,7 @@ return{ - ["apkCode"]=363, - ["code"]=1602, - ["string"]="V0.16.2@DEV", - ["room"]="V1.1", - ["name"]="曲率引擎 Warp drive", + ["apkCode"]=363, + ["code"]=1602, + ["string"]="V0.16.2@DEV", + ["room"]="V1.1", + ["name"]="曲率引擎 Warp drive", } \ No newline at end of file