Compare commits

..

4 Commits

Author SHA1 Message Date
MrZ_26
a29fa973a6 Alpha V0.7.23test5 2020-02-04 19:35:50 +08:00
MrZ_26
7b797baf6a Alpha V0.7.22 2020-02-04 19:35:33 +08:00
MrZ_26
b354604c77 Alpha V0.7.21 2020-02-04 19:35:09 +08:00
MrZ_26
5eea97dd8b Alpha V0.7.20 2020-02-04 19:34:54 +08:00
82 changed files with 3827 additions and 2441 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
BGM/shining terminal.ogg Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

247
ai.lua
View File

@@ -8,8 +8,78 @@
4deepShape
BlockedWells;
]]
dirCount={1,1,3,3,3,0,1}
spinOffset={
local int,ceil,min,abs,rnd=math.floor,math.ceil,math.min,math.abs,math.random
local ins,rem=table.insert,table.remove
local Timer=love.timer.getTime
-- controlname:
-- 1~5:mL,mR,rR,rL,rF,
-- 6~10:hD,sD,H,A,R,
-- 11~13:LL,RR,DD
local blockPos={4,4,4,4,4,5,4}
local scs={{1,2},{1,2},{1,2},{1,2},{1,2},{1.5,1.5},{0.5,2.5}}
-------------------------------------------------Cold clear
local CCblockID={4,3,5,6,1,2,0}
if system~="Windows"then goto SKIP end
require("CCloader")
BOT={
getConf= cc.get_default_config ,--()options,weights
--setConf= cc.set_options ,--(options,hold,20g,bag7)
new= cc.launch_async ,--(options,weights)bot
addNext= cc.add_next_piece_async ,--(bot,piece)
update= cc.reset_async ,--(bot,field,b2b,combo)
think= cc.request_next_move ,--(bot)
getMove= cc.poll_next_move ,--(bot)success,hold,move
ifDead= cc.is_dead_async ,--(bot)dead
destroy= cc.destroy_async ,--(bot)
setHold= cc.set_hold ,--(opt,bool)
set20G= cc.set_20g ,--(opt,bool)
setBag= cc.set_bag7 ,--(opt,bool)
setNode= cc.set_max_nodes ,--(opt,bool)
free= cc.free ,--(opt/wei)
}
function CC_updateField(P)
local F,i={},1
for y=1,#P.field do
for x=1,10 do
F[i],i=P.field[y][x]>0,i+1
end
end
while i<400 do
F[i],i=false,i+1
end
BOT.update(P.AI_bot,F,P.b2b>=100,P.combo)
end
function CC_switch20G(P)
P.AIdata._20G=true
P.AI_keys={}
BOT.destroy(P.AI_bot)
local opt,wei=BOT.getConf()
BOT.setHold(opt,P.AIdata.hold)
BOT.set20G(opt,P.AIdata._20G)
BOT.setBag(opt,P.AIdata.bag7)
BOT.setNode(opt,P.AIdata.node)
P.AI_bot=BOT.new(opt,wei)
BOT.free(opt)BOT.free(wei)
for i=1,P.AIdata.next do
BOT.addNext(P.AI_bot,CCblockID[P.next[i].id])
end
CC_updateField(P)
P.hold={bk={{}},id=0,color=0,name=0}P.holded=false
P.cur=rem(P.next,1)
P.sc,P.dir=scs[P.cur.id],0
P.r,P.c=#P.cur.bk,#P.cur.bk[1]
P.curX,P.curY=blockPos[P.cur.id],21+ceil(P.fieldBeneath/30)-P.r+min(int(#P.field*.2),2)
P.freshNext()
BOT.addNext(P.AI_bot,CCblockID[P.next[P.AIdata.next].id])
collectgarbage()
end
::SKIP::
-------------------------------------------------⑨Stack setup
local dirCount={1,1,3,3,3,0,1}
local spinOffset={
{1,0,0},--S
{1,0,0},--Z
{1,0,0},--L
@@ -18,13 +88,7 @@ spinOffset={
{0,0,0},--O
{2,0,1},--I
}for i=1,7 do spinOffset[i][0]=0 end
--[[
controlname:
1~5:mL,mR,rR,rL,rF,
6~10:hD,sD,H,A,R,
11~13:LL,RR,DD
]]
FCL={
local FCL={
[1]={
{{11},{11,2},{1},{},{2},{2,2},{12,1},{12}},
{{11,4},{11,3},{11,2,3},{4},{3},{2,3},{2,2,3},{12,4},{12,3}},
@@ -46,15 +110,15 @@ FCL={
FCL[2]=FCL[1]
FCL[4]=FCL[3]
FCL[5]=FCL[3]
clearScore={[0]=0,0,2,4,12}
function ifoverlapAI(f,bk,x,y)
local clearScore={[0]=0,0,2,4,12}
local function ifoverlapAI(f,bk,x,y)
if y<1 then return true end
if y>#f then return 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
function resetField(f0,f,start)
local function resetField(f0,f,start)
::L::if f[start]then
removeRow(f,start)
goto L
@@ -66,7 +130,7 @@ function resetField(f0,f,start)
end
end
end
function getScore(field,bn,cb,cx,cy)
local function getScore(field,cb,cy)
local score=0
local highest=0
local height=getNewRow(0)
@@ -109,7 +173,8 @@ function getScore(field,bn,cb,cx,cy)
h1=0
end
end
ins(freeRow,height)
freeRow[#freeRow+1]=height
freeRow.L=freeRow.L+1
score=
#field*20
-cy*35
@@ -120,55 +185,111 @@ function getScore(field,bn,cb,cx,cy)
if mh1>3 then score=score-40-mh1*30 end
return score
end
function AI_getControls(ctrl)
local Tfield={}--test field
local field_org=P.field
for i=1,#field_org do
Tfield[i]=getNewRow(0)
for j=1,10 do
Tfield[i][j]=field_org[i][j]
end
end
local best={x=1,dir=0,hold=false,score=-9e99}
for ifhold=0,P.gameEnv.hold and 1 or 0 do
local bn=ifhold==0 and P.cur.id or P.hold.id>0 and P.hold.id or P.next[1].id
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
::L::if not ifoverlapAI(Tfield,cb,cx,cy-1)then
cy=cy-1
goto L
end--move to bottom
for i=1,#cb do
local y=cy+i-1
if not Tfield[y]then Tfield[y]=getNewRow(0)end
for j=1,#cb[1]do
if cb[i][j]then
Tfield[y][cx+j-1]=1
end
end
end--simulate lock
local score=getScore(Tfield,bn,cb,cx,cy)
if score>best.score then
best={bn=bn,x=cx,dir=dir,hold=ifhold==1,score=score}
-------------------------------------------------
AI_think={
["9S"]={
function(ctrl)
local Tfield={}--test field
local field_org=P.field
for i=1,#field_org do
Tfield[i]=getNewRow(0)
for j=1,10 do
Tfield[i][j]=field_org[i][j]
end
end
local best={x=1,dir=0,hold=false,score=-9e99}
for ifhold=0,P.gameEnv.hold and 1 or 0 do
local bn=ifhold==0 and P.cur.id or P.hold.id>0 and P.hold.id or P.next[1].id
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
::L::if not ifoverlapAI(Tfield,cb,cx,cy-1)then
cy=cy-1
goto L
end--move to bottom
for i=1,#cb do
local y=cy+i-1
if not Tfield[y]then Tfield[y]=getNewRow(0)end
for j=1,#cb[1]do
if cb[i][j]then
Tfield[y][cx+j-1]=1
end
end
end--simulate lock
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
resetField(field_org,Tfield,cy)
end
end
end
::L::
if #Tfield>0 then
removeRow(Tfield,1)
goto L
end--Release cache
if best.hold then
ins(ctrl,8)
end
local l=FCL[best.bn][best.dir+1][best.x]
for i=1,#l do
ins(ctrl,l[i])
end
ins(ctrl,6)
end
::L::
if #Tfield>0 then
removeRow(Tfield,1)
goto L
end--Release cache
local p=#ctrl+1
if best.hold then
ctrl[p]=8
p=p+1
end
local l=FCL[best.bn][best.dir+1][best.x]
for i=1,#l do
ctrl[p]=l[i]
p=p+1
end
ctrl[p]=6
return 2
end,
function()
P.AI_delay=P.AI_delay0
if Timer()-P.modeData.point>P.modeData.event then
P.modeData.point=Timer()
P.modeData.event=P.AI_delay0+rnd(2,10)
changeAtkMode(rnd()<.85 and 1 or #P.atker>3 and 4 or rnd()<.3 and 2 or 3)
end
return 1
end,
},
["CC"]={
function()
if P.AI_needFresh then
CC_updateField(P)
P.AI_needFresh=false
end
BOT.think(P.AI_bot)
return 2
end,
function(ctrl)
if BOT.ifDead(P.AI_bot)then ins(ctrl,6)return 3 end
local success,hold,move=BOT.getMove(P.AI_bot)
if success then
if hold then ctrl[1]=8 end--Hold
while move[1]do
local m=rem(move,1)
if m<4 then
ins(ctrl,m+1)
elseif not P.AIdata._20G then
ins(ctrl,13)
end
end
ins(ctrl,6)
return 3
else
return 2--stay this stage
end
end,
function()
P.AI_delay=P.AI_delay0
if Timer()-P.modeData.point>P.modeData.event then
P.modeData.point=Timer()
P.modeData.event=P.AI_delay0+rnd(2,10)
changeAtkMode(rnd()<.85 and 1 or #P.atker>3 and 4 or rnd()<.3 and 2 or 3)
end
return 1
end,
},
}--AI think stage

View File

@@ -1,794 +0,0 @@
local gc,tm=love.graphics,love.timer
local ms,kb,tc=love.mouse,love.keyboard,love.touch
local wd=love.window
local setFont=setFont
local Timer=tm.getTime
local scr=scr
local xOy=love.math.newTransform()
local focus=true
local mx,my,mouseShow=-20,-20,false
local touching=nil--1st touching ID
local sceneInit={
load=function()
loading=1--Loading mode
loadnum=1--Loading counter
loadprogress=0--Loading bar(0~1)
loadTip=text.tips[rnd(#text.tips)]
end,
intro=function()
count=0
BGM("blank")
end,
main=function()
collectgarbage()
end,
mode=function()
curBG="none"
saveData()
modeSel=modeSel or 1
levelSel=levelSel or 3
BGM("blank")
end,
custom=function()
optSel=optSel or 1
curBG="matrix"
BGM("blank")
end,
draw=function()
curBG="none"
kb.setKeyRepeat(true)
clearSureTime=0
pen,sx,sy=1,1,1
end,
play=function()
restartCount=0
if needResetGameData then
resetGameData()
needResetGameData=nil
end
end,
pause=function()
end,
setting=function()
curBG="none"
end,
setting2=function()
curBoard=1
keyboardSet=1
joystickSet=1
keyboardSetting=false
joystickSetting=false
end,--Control settings
setting3=function()
curBG="game1"
defaultSel=1
sel=nil
snapLevel=1
end,--Touch setting
help=function()
end,
stat=function()
end,
quit=function()
love.event.quit()
end,
}
BGblockList={}for i=1,16 do BGblockList[i]={v=0}end
local BGblock={tm=150,next=7,ct=0}
local function getNewBlock()
BGblock.ct=BGblock.ct+1
if BGblock.ct==17 then BGblock.ct=1 end
local t=BGblockList[BGblock.ct]
t.bn,t.size=BGblock.next,2+3*rnd()
t.b=blocks[t.bn][rnd(0,3)]
t.x=rnd(-#t.b[1]*t.size*30+100,1180)
t.y=-#t.b*30*t.size
t.v=t.size*(1+rnd())
BGblock.next=BGblock.next%7+1
return t
end
function onVirtualkey(x,y)
local d2,nearest,distance
for K=1,#virtualkey do
local b=virtualkey[K]
d2=(x-b[1])^2+(y-b[2])^2
if d2<b[3]then
if not nearest or d2<distance then
nearest,distance=K,d2
end
end
end
return nearest
end
function buttonControl_key(i)
if i=="up"or i=="down"or i=="left"or i=="right"then
if Buttons.sel then
Buttons.sel=Buttons[scene][Buttons.sel[i]]or Buttons.sel
else
Buttons.sel=select(2,next(Buttons[scene]))
end
elseif i=="space"or i=="return"then
if not sceneSwaping and Buttons.sel then
Buttons.sel.alpha=1
Buttons.sel.code()
SFX("button")
VOICE("nya")
end
end
end
function buttonControl_gamepad(i)
if i=="dpup"or i=="dpdown"or i=="dpleft"or i=="dpright"then
if Buttons.sel then
Buttons.sel=Buttons[scene][Buttons.sel[i=="dpup"and"up"or i=="dpdown"and"down"or i=="dpleft"and"left"or"right"]]or Buttons.sel
else
Buttons.sel=select(2,next(Buttons[scene]))
end
elseif i=="start"then
if not sceneSwaping and Buttons.sel then
Buttons.sel.alpha=1
Buttons.sel.code()
SFX("button")
VOICE("nya")
end
end
end
mouseDown={}
function mouseDown.intro(x,y,k)
if k==2 then
back()
else
gotoScene("main")
end
end
function mouseDown.draw(x,y,k)
mouseMove.draw(x,y)
end
function mouseDown.setting3(x,y,k)
if k==2 then back()end
for K=1,#virtualkey do
local b=virtualkey[K]
if (x-b[1])^2+(y-b[2])^2<b[3]then
sel=K
end
end
end
mouseMove={}
function mouseMove.draw(x,y,dx,dy)
sx,sy=int((x-200)/30)+1,20-int((y-60)/30)
if sx<1 or sx>10 then sx=nil end
if sy<1 or sy>20 then sy=nil end
if sx and sy and ms.isDown(1,2,3)then
preField[sy][sx]=ms.isDown(1)and pen or ms.isDown(2)and 0 or -1
end
end
function mouseMove.setting3(x,y,dx,dy)
if sel and ms.isDown(1)then
local b=virtualkey[sel]
b[1],b[2]=b[1]+dx,b[2]+dy
end
end
mouseUp={}
function mouseUp.setting3(x,y,k)
if sel then
local b=virtualkey[sel]
local k=snapLevelValue[snapLevel]
b[1],b[2]=int(b[1]/k+.5)*k,int(b[2]/k+.5)*k
end
end
wheelmoved={}
function wheelmoved.draw(x,y)
if y<0 then
pen=pen+1
if pen==8 then pen=9 elseif pen==14 then pen=0 end
else
pen=pen-1
if pen==8 then pen=7 elseif pen==-1 then pen=13 end
end
end
function wheelmoved.mode(x,y)
modeSel=min(max(modeSel+(y>0 and -1 or 1),1),#modeID)
levelSel=ceil(#modeLevel[modeID[modeSel]]*.5)
end
touchDown={}
function touchDown.intro(id,x,y)
gotoScene("main")
end
function touchDown.draw(id,x,y)
end
function touchDown.setting3(id,x,y)
for K=1,#virtualkey do
local b=virtualkey[K]
if (x-b[1])^2+(y-b[2])^2<b[3]then
sel=K
end
end
end
function touchDown.play(id,x,y)
if setting.virtualkeySwitch then
local t=onVirtualkey(x,y)
if t then
pressKey(t,players[1])
end
end
end
touchUp={}
function touchUp.setting3(id,x,y)
if sel then
x,y=xOy:inverseTransformPoint(x,y)
if sel then
local b=virtualkey[sel]
local k=snapLevelValue[snapLevel]
b[1],b[2]=int(b[1]/k+.5)*k,int(b[2]/k+.5)*k
end
end
end
function touchUp.play(id,x,y)
if setting.virtualkeySwitch then
local t=onVirtualkey(x,y)
if t then
releaseKey(t,players[1])
end
end
end
touchMove={}
function touchMove.setting3(id,x,y,dx,dy)
if sel then
local b=virtualkey[sel]
b[1],b[2]=b[1]+dx,b[2]+dy
end
end
function touchMove.draw(id,x,y,dx,dy)
sx,sy=int((x-200)/30)+1,20-int((y-60)/30)
if sx<1 or sx>10 then sx=nil end
if sy<1 or sy>20 then sy=nil end
if sx and sy then
preField[sy][sx]=pen
end
end
function touchMove.play(id,x,y,dx,dy)
if setting.virtualkeySwitch then
local l=tc.getTouches()
for n=1,#virtualkey do
local b=virtualkey[n]
for i=1,#l do
local x,y=xOy:inverseTransformPoint(tc.getPosition(l[i]))
if(x-b[1])^2+(y-b[2])^2<=b[3]then goto L end
end
releaseKey(n,players[1])
::L::
end
end
end
keyDown={}
function keyDown.intro(key)
if key=="escape"then
back()
else
gotoScene("main")
end
end
function keyDown.mode(key)
if key=="down"then
if modeSel<#modeID then
modeSel=modeSel+1
levelSel=ceil(#modeLevel[modeID[modeSel]]*.5)
end
elseif key=="up"then
if modeSel>1 then
modeSel=modeSel-1
levelSel=ceil(#modeLevel[modeID[modeSel]]*.5)
end
elseif key=="left"then
if levelSel>1 then
levelSel=levelSel-1
end
elseif key=="right"then
if levelSel<#modeLevel[modeID[modeSel]]then
levelSel=levelSel+1
end
elseif key=="return"then
loadGame(modeSel,levelSel)
elseif key=="c"then
gotoScene("custom")
elseif key=="escape"then
back()
end
end
function keyDown.custom(key)
if key=="left"then
local k=customID[optSel]
customSel[k]=(customSel[k]-2)%#customRange[k]+1
elseif key=="right"then
local k=customID[optSel]
customSel[k]=customSel[k]%#customRange[k]+1
elseif key=="down"then
optSel=optSel%#customID+1
elseif key=="up"then
optSel=(optSel-2)%#customID+1
elseif key=="d"then
gotoScene("draw")
elseif key=="return"then
loadGame(0,1)
elseif key=="space"then
loadGame(0,2)
elseif key=="escape"then
back()
end
end
function keyDown.draw(key)
if key=="delete"then
Buttons.draw.clear.code()
elseif key=="up"or key=="down"or key=="left"or key=="right"then
if not sx then sx=1 end
if not sy then sy=1 end
if key=="up"and sy<20 then sy=sy+1
elseif key=="down"and sy>1 then sy=sy-1
elseif key=="left"and sx>1 then sx=sx-1
elseif key=="right"and sx<10 then sx=sx+1
end
if kb.isDown("space")then
preField[sy][sx]=pen
end
elseif key=="space"then
if sx and sy then
preField[sy][sx]=pen
end
elseif key=="tab"then
pen=-1
elseif key=="backspace"then
pen=0
elseif key=="escape"then
back()
else
pen=find("123qwea#sdzxc",key)or pen
end
end
function keyDown.setting2(key)
if key=="escape"then
if keyboardSetting then
keyboardSetting=false
else
back()
end
elseif keyboardSetting then
for l=1,8 do
for y=1,13 do
if setting.keyMap[l][y]==key then
setting.keyMap[l][y]=""
end
end
end
setting.keyMap[curBoard][keyboardSet]=key
keyboardSetting=false
elseif key=="return"then
keyboardSetting=true
elseif key=="up"then
keyboardSet=max(keyboardSet-1,1)
elseif key=="down"then
keyboardSet=min(keyboardSet+1,13)
elseif key=="left"then
curBoard=max(curBoard-1,1)
elseif key=="right"then
curBoard=min(curBoard+1,8)
end
end
function keyDown.play(key)
if key=="escape"and not sceneSwaping then
return(frame<180 and back or pauseGame)()
end
local m=setting.keyMap
for p=1,human do
for k=1,12 do
if key==m[2*p-1][k]or key==m[2*p][k]then
pressKey(k,players[p])
return
end
end
end
end
function keyDown.pause(key)
if key=="escape"then
back()
elseif key=="return"or key=="space"then
resumeGame()
end
end
keyUp={}
function keyUp.play(key)
local m=setting.keyMap
for p=1,human do
for k=1,12 do
if key==m[2*p-1][k]or key==m[2*p][k]then
releaseKey(k,players[p])
return
end
end
end
end
gamepadDown={}
function gamepadDown.intro(key)
if key=="back"then
back()
else
gotoScene("main")
end
end
function gamepadDown.mode(key)
if key=="dpdown"then
if modeSel<#modeID then modeSel=modeSel+1 end
elseif key=="dpup"then
if modeSel>1 then modeSel=modeSel-1 end
elseif key=="start"then
loadGame(modeSel,levelSel)
elseif key=="back"then
back()
end
end
function gamepadDown.setting2(key)
if key=="back"then
if joystickSetting then
joystickSetting=false
else
back()
end
elseif joystickSetting then
for l=9,16 do
for y=1,12 do
if setting.keyMap[l][y]==key then
setting.keyMap[l][y]=""
end
end
end
setting.keyMap[8+curBoard][joystickSet]=key
joystickSetting=false
elseif key=="start"then
joystickSetting=true
elseif key=="up"then
joystickSet=max(joystickSet-1,1)
elseif key=="down"then
joystickSet=min(joystickSet+1,12)
elseif key=="left"then
curBoard=max(curBoard-1,1)
elseif key=="right"then
curBoard=min(curBoard+1,8)
end
end
function gamepadDown.play(key)
if key=="back"then back()return end
local m=setting.keyMap
for p=1,human do
for k=1,12 do
if key==m[2*p+7][k]or key==m[2*p+8][k]then
pressKey(k,players[p])
return
end
end
end
end
gamepadUp={}
function gamepadUp.play(key)
local m=setting.keyMap
for p=1,human do
for k=1,12 do
if key==m[2*p+7][k]or key==m[2*p+8][k]then
releaseKey(k,players[p])
return
end
end
end
end
function love.mousepressed(x,y,k,t,num)
if t then return end
mouseShow=true
mx,my=xOy:inverseTransformPoint(x,y)
if mouseDown[scene]then
mouseDown[scene](mx,my,k)
elseif k==2 then
back()
end
if k==1 then
if not sceneSwaping and Buttons.sel then
local B=Buttons.sel
B.code()
B.alpha=1
Buttons.sel=nil
love.mousemoved(x,y,0,0)
SFX("button")
VOICE("nya")
VIB(1)
end
end
end
function love.mousemoved(x,y,dx,dy,t)
if t then return end
mouseShow=true
mx,my=xOy:inverseTransformPoint(x,y)
Buttons.sel=nil
if mouseMove[scene]then
mouseMove[scene](mx,my,dx/scr.k,dy/scr.k)
end
for _,B in next,Buttons[scene]do
if not(B.hide and B.hide())then
if abs(mx-B.x)<B.w*.5 and abs(my-B.y)<B.h*.5 then
Buttons.sel=B
return
end
end
end
end
function love.mousereleased(x,y,k,t,num)
if t then return end
mx,my=xOy:inverseTransformPoint(x,y)
if mouseUp[scene]then
mouseUp[scene](mx,my,k)
end
end
function love.wheelmoved(x,y)
if wheelmoved[scene]then wheelmoved[scene](x,y)end
end
function love.touchpressed(id,x,y)
mouseShow=false
if not touching then
touching=id
love.touchmoved(id,x,y,0,0)
end
if touchDown[scene]then
touchDown[scene](id,xOy:inverseTransformPoint(x,y))
end
end
function love.touchreleased(id,x,y)
if id==touching then
touching=nil
if Buttons.sel then
local B=Buttons.sel
B.code()
B.alpha=1
Buttons.sel=nil
SFX("button")
VOICE("nya")
VIB(1)
end
Buttons.sel=nil
end
if touchUp[scene]then
touchUp[scene](id,xOy:inverseTransformPoint(x,y))
end
end
function love.touchmoved(id,x,y,dx,dy)
x,y=xOy:inverseTransformPoint(x,y)
if touchMove[scene]then
touchMove[scene](id,x,y,dx/scr.k,dy/scr.k)
end
Buttons.sel=nil
for _,B in next,Buttons[scene]do
if not(B.hide and B.hide())then
if abs(x-B.x)<B.w*.5 and abs(y-B.y)<B.h*.5 then
Buttons.sel=B
return
end
end
end
if not Buttons.sel then
touching=nil
end
end
function love.keypressed(i)
mouseShow=false
if i=="f8"then devMode=not devMode end
if devMode then
if i=="k"then
P=players.alive[rnd(#players.alive)]
P.lastRecv=players[1]
Event.lose()
--Test code here
elseif i=="q"then
local B=Buttons.sel if B then print(format("x=%d,y=%d,w=%d,h=%d",B.x,B.y,B.w,B.h))end
elseif Buttons.sel then
local B=Buttons.sel
if i=="left"then B.x=B.x-10
elseif i=="right"then B.x=B.x+10
elseif i=="up"then B.y=B.y-10
elseif i=="down"then B.y=B.y+10
elseif i==","then B.w=B.w-10
elseif i=="."then B.w=B.w+10
elseif i=="/"then B.h=B.h-10
elseif i=="'"then B.h=B.h+10
end
end
else
if keyDown[scene]then keyDown[scene](i)
elseif i=="escape"or i=="back"then back()
else buttonControl_key(i)
end
end
end
function love.keyreleased(i)
if keyUp[scene]then keyUp[scene](i)
end
end
function love.gamepadpressed(joystick,i)
mouseShow=false
if gamepadDown[scene]then return gamepadDown[scene](i)
elseif i=="back"then back()
else buttonControl_gamepad(i)
end
end
function love.gamepadreleased(joystick,i)
if gamepadUp[scene]then gamepadUp[scene](i)
end
end
--[[
function love.joystickpressed(js,k)end
function love.joystickaxis(js,axis,valend
function love.joystickhat(js,hat,dirend
function love.sendData(data)end
function love.receiveData(id,data)end
]]
function love.lowmemory()
collectgarbage()
end
function love.resize(w,h)
scr.w,scr.h,scr.r=w,h,h/w
if scr.r>=.5625 then
scr.k=w/1280
scr.x,scr.y=0,(h-w*9/16)*.5
else
scr.k=h/720
scr.x,scr.y=(w-h*16/9)*.5,0
end
gc.origin()
xOy=xOy:setTransformation(w*.5,h*.5,nil,scr.k,nil,640,360)
gc.replaceTransform(xOy)
collectgarbage()
end
function love.focus(f)
if not f and wd.isMinimized()and scene=="play"then pauseGame()end
end
function love.update(dt)
-- if players then for k,v in pairs(players[1])do
-- if rawget(_G,k)and k~="next"and k~="hold"and k~="stat"then print(k,_G[v])end
-- end end--check player data flew(debugging)
for i=#BGblock,1,-1 do
BGblock[i].y=BGblock[i].y+BGblock[i].v
if BGblock[i].y>720 then rem(BGblock,i)end
end
if setting.bgblock then
BGblock.tm=BGblock.tm-1
if BGblock.tm==0 then
ins(BGblock,getNewBlock())
BGblock.tm=rnd(20,30)
end
end
if sceneSwaping then
sceneSwaping.time=sceneSwaping.time-1
if sceneSwaping.time==sceneSwaping.mid then
for k,B in next,Buttons[scene]do
B.alpha=0
end--Reset buttons' alpha
Buttons.sel=nil
scene=sceneSwaping.tar
sceneInit[scene]()
elseif sceneSwaping.time==0 then
sceneSwaping=nil
end
end
if Tmr[scene]then
Tmr[scene](dt)
end
for i=#Task,1,-1 do
Task[i]:update()
end
if voicePlaying[1]then
if not voicePlaying[1]:isPlaying()then
rem(voicePlaying,1)
end
if voicePlaying[1] and not voicePlaying[1]:isPlaying()then voicePlaying[1]:play()end
end
for k,B in next,Buttons[scene]do
local t=B==Buttons.sel and .4 or 0
B.alpha=abs(B.alpha-t)>.02 and(B.alpha+(B.alpha<t and .02 or -.02))or t
if B.alpha>t then B.alpha=B.alpha-.02 elseif B.alpha<t then B.alpha=B.alpha+.02 end
end--update Buttons
end
local scs={1,2,1,2,1,2,1,2,1,2,1.5,1.5,.5,2.5}
function love.draw()
gc.discard()--SPEED UPUPUP!
Pnt.BG[setting.bg and curBG or"grey"]()
gc.setColor(1,1,1,.2)
for n=1,#BGblock do
local b,img=BGblock[n].b,blockSkin[BGblock[n].bn]
local size=BGblock[n].size
for i=1,#b do for j=1,#b[1]do
if b[i][j]then
gc.draw(img,BGblock[n].x+(j-1)*30*size,BGblock[n].y+(i-1)*30*size,nil,size)
end
end end
end
if Pnt[scene]then Pnt[scene]()end
for k,B in next,Buttons[scene]do
if not(B.hide and B.hide())then
local C=B.rgb or color.white
gc.setColor(C[1],C[2],C[3],B.alpha)
gc.rectangle("fill",B.x-B.w*.5,B.y-B.h*.5,B.w,B.h)
gc.setColor(C)
gc.setLineWidth(3)gc.rectangle("line",B.x-B.w*.5,B.y-B.h*.5,B.w,B.h,4)
gc.setColor(C[1],C[2],C[3],.3)
gc.setLineWidth(5)gc.rectangle("line",B.x-B.w*.5,B.y-B.h*.5,B.w,B.h,4)
local t=B.t
local y0
if t then
if type(t)=="function"then t=t()end
setFont(B.f or 40)
y0=B.y-currentFont*.64
gc.printf(t,B.x-201,y0+2,400,"center")
gc.printf(t,B.x-199,y0+2,400,"center")
gc.printf(t,B.x-201,y0,400,"center")
gc.printf(t,B.x-199,y0,400,"center")
gc.setColor(C)
mStr(t,B.x,y0+1)
end
end
end--Draw buttons
if mouseShow and not touching then
local r=Timer()*.5
gc.setColor(1,1,1,min(1-abs(1-r%1*2),.3))
r=int(r)%7+1
gc.draw(mouseBlock[r],mx,my,Timer()%pi*4,20,20,scs[2*r]-.5,#blocks[r][0]-scs[2*r-1]+.5)
gc.setColor(1,1,1,.5)gc.circle("fill",mx,my,5)
gc.setColor(1,1,1)gc.circle("fill",mx,my,3)
end--Awesome mouse!
if sceneSwaping then sceneSwaping.draw()end--Swaping animation
if scr.r~=.5625 then
gc.setColor(0,0,0)
if scr.r>.5625 then
local d=(scr.h-scr.w*9/16)*.5/scr.k
gc.rectangle("fill",0,0,1280,-d)
gc.rectangle("fill",0,720,1280,d)
else--high
local d=(scr.w-scr.h*16/9)*.5/scr.k
gc.rectangle("fill",0,0,-d,720)
gc.rectangle("fill",1280,0,d,720)
end--wide
end--Black side
setFont(20)gc.setColor(1,1,1)
gc.print(tm.getFPS(),5,700)
if devMode then
gc.print(mx.." "..my,5,640)
gc.print(#freeRow or 0,5,660)
gc.print(gcinfo(),5,680)
end
end
function love.run()
local frameT=Timer()
local readyDrawFrame=0
local PUMP,POLL=love.event.pump,love.event.poll
love.resize(gc.getWidth(),gc.getHeight())
scene="load"sceneInit.load()--System Launch
return function()
PUMP()
for N,a,b,c,d,e in POLL()do
if N=="quit"then return 0
elseif love[N]then love[N](a,b,c,d,e)end
end
tm.step()
love.update(tm.getDelta())
readyDrawFrame=readyDrawFrame+setting.frameMul
if readyDrawFrame>=100 then
readyDrawFrame=readyDrawFrame-100
love.draw()
gc.present()
end
::L::if Timer()-frameT<1/60 then goto L end
frameT=Timer()
tm.sleep(.001)
end
end

View File

@@ -1,18 +1,31 @@
local rem=table.remove
Task={}
metatable_task={__index=Task}
function Task:update()
if(not self.P or self.P and scene=="play")and self:code(self.P,self.data)then
local e=#Task
for i=1,e do
if Task[i]==self then
Task[e],Task[i]=nil,Task[e]
return
end
end
end
end
function newTask(code,P,data)
local obj={
Task[#Task+1]={
update=Task.update,
code=code,
P=P,
data=data,
}
setmetatable(obj,metatable_task)
ins(Task,obj)
end
function clearTask(opt)
if opt=="all"then
while Task[1]do
rem(Task,i)
local i=#Task
while i>0 do
Task[i]=nil
i=i-1
end
elseif opt=="play"then
for i=#Task,1,-1 do
@@ -22,16 +35,28 @@ function clearTask(opt)
end
else--Player table
for i=#Task,1,-1 do
if Task[i].P==P then
if Task[i].P==opt then
rem(Task,i)
end
end
end
end
function Task:update()
if(not self.P or self.P and scene=="play")and self:code(self.P,self.data)then
for i=#Task,1,-1 do
if Task[i]==self then rem(Task,i)return end
end--Destroy
end
function newButton(x,y,w,h,color,font,code,hide,up,down,left,right)
return{
type="button",
x=x-w*.5,y=y-h*.5,w=w,h=h,
color=color,font=font,
code=code,hide=hide,
up=up,down=down,left=left,right=right,
}
end
function newSlider(x,y,w,unit,color,font,code,hide,up,down,left,right)
return{
type="slider",
x=x,y=y,w=w,unit=unit,
color=color,font=font,
code=code,hide=hide,
up=up,down=down,left=left,right=right,
}
end

View File

@@ -1,23 +1,23 @@
gameVersion="Alpha V0.7.23"
function love.conf(t)
local X=nil
t.identity="Techmino"--Save directory name
t.appendidentity=X--If search files in source before save directory
t.version="11.1"
t.console=X
t.accelerometerjoystick=X--If exposing accelerometer on iOS and Android as a Joystick
t.gammacorrect=X
t.appendidentity=X--If search files in source before save directory
t.accelerometerjoystick=X--If exposing accelerometer on iOS and Android as a Joystick
t.audio.mixwithsystem=true--Switch on to keep sysBGM
local W=t.window
W.title="Techmino V0.7.19"
W.title="Techmino "..gameVersion
W.icon="/image/icon.png"
W.width,W.height=1280,720
W.minwidth,W.minheight=640,360
W.borderless=X
W.resizable=true
W.fullscreentype="desktop"--Choose between "desktop" fullscreen or "exclusive" fullscreen mode (string)
W.resizable=1
W.fullscreentype="desktop"--"exclusive"
W.fullscreen=X
W.vsync=0--0→∞fps
W.vsync=X--0→∞fps
W.msaa=X--The number of samples to use with multi-sampled antialiasing (number)
W.depth=X--Bits per sample in the depth buffer
W.stencil=1--The number of bits per sample in the stencil buffer
@@ -26,23 +26,10 @@ function love.conf(t)
W.x,W.y=nil
local M=t.modules
M.window=true
M.system=true
M.audio=true
M.data=true
M.event=true
M.font=true
M.graphics=true
M.image=true
M.joystick=true
M.keyboard=true
M.math=true
M.mouse=true
M.sound=true
M.timer=true
M.touch=true
M.physics=X
M.thread=X
M.video=X
M.window,M.system,M.event=1,1,1
M.audio,M.sound=1,1
M.math,M.data=1,1
M.timer,M.graphics,M.font,M.image=1,1,1,1
M.mouse,M.touch,M.keyboard,M.joystick=1,1,1,1
M.physics,M.thread,M.video=X
end

File diff suppressed because it is too large Load Diff

BIN
font.ttf

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 882 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 973 B

BIN
image/mess/charge.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 421 B

BIN
image/mess/power.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 972 B

View File

@@ -1,3 +1,5 @@
local SWC={[true]="",[false]=""}
local BK="返回"
return{
atkModeName={"随机","徽章","击杀","反击"},
royale_remain=function(n)return"剩余 "..n.." 名玩家"end,
@@ -13,7 +15,10 @@ return{
PC="Perfect Clear",
hold="暂存",next="下一个",
stage={"关卡 1","关卡 2","关卡 3","关卡 4","关卡 5",},
stage=function(n)return"关卡 "..n end,
great="Great!",
awesome="Awesome.",
continue="Continue.",
maxspeed="最高速度",
speedup="速度加快",
@@ -36,9 +41,11 @@ return{
target="目标行数:",
freshLimit="锁延刷新次数:",
opponent="对手速度等级:",
bg="背景:",
bgm="背景音乐:",
},
customVal={
drop={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,"","[20G]"},
drop={"[20G]",1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,""},
lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,""},
wait=nil,
fall=nil,
@@ -48,7 +55,7 @@ return{
visible={"可见","半隐","全隐","瞬隐"},
target={10,20,40,100,200,500,1000,""},
freshLimit={0,8,15,""},
opponent={"无电脑",1,2,3,4,5,6,7,8,9,10,11},
opponent={"无电脑","9S Lv1","9S Lv2","9S Lv3","9S Lv4","9S Lv5","CC Lv1","CC Lv2","CC Lv3","CC Lv4","CC Lv5","CC Lv6"},
},
softdropdas="软降DAS:",
softdroparr="软降ARR:",
@@ -56,12 +63,14 @@ return{
keyboard="键盘",joystick="手柄",
space="空格",enter="回车",
setting2Help="方向键选择/翻页,回车修改,esc返回",
musicRoom="音乐室",
nowPlaying="正在播放:",
actName={"左移:","右移:","顺时针旋转:","逆时针旋转:","180°旋转","硬降:","软降:","暂存:","功能键:","重新开始:","左瞬移:","右瞬移:","软降到底:"},
modeName={
[0]="自定义",
"竞速","马拉松","大师","经典","","无尽","单挑","仅TSD","隐形","挖掘","生存","科研",
"竞速","马拉松","大师","经典","","无尽","单挑","回合制","仅TSD","隐形",
"挖掘","生存","防守","进攻","科研",
"C4W练习","全清训练","全清挑战","49人混战","99人混战","干旱","多人",
},
modeInfo={
@@ -72,10 +81,13 @@ return{
zen="无重力消除200行",
infinite="科研沙盒",
solo="打败AI",
round="下棋",
tsd="尽可能做TSD",
blind="最强大脑",
dig="核能挖掘机",
survivor="防守练习",
survivor="你能存活多久?",
defender="防守练习",
attacker="进攻练习",
tech="尽可能不要普通消除",
c4wtrain="无 限 连 击",
pctrain="熟悉全清定式的组合",
@@ -88,10 +100,11 @@ return{
load={"加载语音ing","加载音乐ing","加载音效ing","加载完成",},
tips={
"不是动画真的在加载!",
"不是动画,真的在加载!",
"整个游戏都是MrZ完成的!",
"大满贯10连击消四全清!",
"<方块研究所>有一个Nspire-CX版本!",
"B2B2B???",
"B2B2B2B存在吗?",
"MEGACMB!",
"ALLSPIN!",
@@ -100,7 +113,7 @@ return{
"Miya:喵!",
"225238922,哔哩哔哩 干杯~",
"适度游戏益脑,沉迷游戏伤身,合理安排时间,享受健康生活",
"合群了就会消失但是消失不代表没有意义",
"合群了就会消失,但是消失不代表没有意义",
"学会使用两个旋转键,三个更好",
"更小的DAS和ARR拥有更高的操作上限",
"注意到\"旋转\"到底对方块做了些什么吗?",
@@ -109,7 +122,7 @@ return{
"本游戏难度上限很高,做好心理准备",
"方块可以不是个休闲游戏",
"调到特殊的日期也不会发生什么的",
"[随机文本]",
"3.1415926535897932384",
},
stat={
"游戏运行次数:",
@@ -139,71 +152,86 @@ return{
"使用LOVE2D引擎",
"作者:MrZ 邮箱:1046101471@qq.com",
"程序:MrZ 美术:MrZ 音乐:MrZ 音效:MrZ 语音:Miya",
"使用工具:VScode,GFIE,Beepbox,Goldwave",
"特别感谢:Farter,196,Teatube,Flyz,T830,[所有测试人员]和 你!",
"使用工具:VScode,GFIE,Beepbox,Goldwave,Cold_Clear",
"特别感谢:Farter,Flyz,196,Teatube,T830,[所有测试人员]和 你!",
"错误或者建议请附带相关信息发送到作者邮箱~",
},
support="支持作者",
group="官方QQ群",
ButtonText={
main={
qplay="快速开始",
play="开始",
setting="设置",
music="音乐室",
stat="统计信息",
help="帮助",
quit="退出",
},
mode={
up="Λ",
down="v",
left="<",
right=">",
up="",
down="",
left="",
right="",
start="开始",
custom="自定义(C)",
back="返回",
back=BK,
},
music={
bgm=function()return"音乐:"..SWC[setting.bgm]end,
up="",
play="播放",
down="",
back=BK,
},
custom={
up="Λ",
down="v",
left="<",
right=">",
up="",
down="",
left="",
right="",
start1="消除开始",
start2="拼图开始",
draw="画图(D)",
back="返回",
set1="40行",
set2="1v1",
set3="无尽",
set4="隐形",
set5="极限",
back=BK,
},
draw={
free="不定",
block1="",
block2="",
block3="",
block4="",
block5="",
block6="",
block7="",
any="不定",
block1="Z",
block2="S",
block3="L",
block4="J",
block5="T",
block6="O",
block7="I",
gb1="",
gb2="",
gb3="",
gb4="",
gb5="",
erase="×",
clear="",
back="返回",
space="×",
clear="",
back=BK,
},
play={
pause="暂停",
},
pause={
resume="继续",
restart="重新开始",
quit="退出",
},
setting={
ghost=function()return setting.ghost and"阴影:开"or"阴影:关"end,
center=function()return setting.center and"旋转中心:开"or"旋转中心:关"end,
grid=function()return setting.grid and"网格:开"or"网格:关"end,
ghost=function()return"阴影:"..SWC[setting.ghost]end,
center=function()return"旋转中心:"..SWC[setting.center]end,
grid=function()return"网格:"..SWC[setting.grid]end,
swap=function()return setting.swap and"目标选择:组合键"or"目标选择:循环"end,
fxs=function()return setting.fxs and"特效:"or"特效:关"end,
bg=function()return setting.bg and"背景:"or"背景:关"end,
fxs=function()return setting.fxs>0 and"特效等级:"..setting.fxs or"特效:关"end,
bg=function()return"背景:"..SWC[setting.bg]end,
dasD="-",dasU="+",
arrD="-",arrU="+",
sddasD="-",sddasU="+",
@@ -211,35 +239,42 @@ return{
ctrl="控制设置",
touch="触摸设置",
lang=function()return langName[setting.lang]end,
sfx=function()return setting.sfx and"音效:"or"音效:关"end,
bgm=function()return setting.bgm and"音乐:"or"音乐:关"end,
sfx=function()return"音效:"..SWC[setting.sfx]end,
bgm=function()return"音乐:"..SWC[setting.bgm]end,
vib=function()return "震动:"..setting.vib end,
voc=function()return setting.voc and"语音:"or"语音:关"end,
fullscreen=function()return setting.fullscreen and"全屏:开"or"全屏:关"end,
bgblock=function()return setting.bgblock and"背景动画:开"or"背景动画:关"end,
voc=function()return"语音:"..SWC[setting.voc]end,
fullscreen=function()return"全屏:"..SWC[setting.fullscreen]end,
bgblock=function()return"背景动画:"..SWC[setting.bgblock]end,
frame=function()return"绘制帧:"..setting.frameMul.."%"end,
skin="切换方块皮肤",
skin="皮肤",
smo=function()return"平滑下落:"..SWC[setting.smo]end,
back="保存&返回",
},
setting2={
back="返回",
back=BK,
},
setting3={
back="返回",
hide=function()return setting.virtualkeySwitch and"隐藏虚拟按键"or"显示虚拟按键"end,
default="默认组合",
snap=function()return text.snapLevelName[snapLevel]end,
alpha=function()return percent0to5[setting.virtualkeyAlpha]end,
alpha=function()return setting.virtualkeyAlpha.."0%"end,
icon="图标",
size="大小",
back=BK,
},
help={
back="返回",
his="历史",
qq="作者QQ",
back=BK,
},
history={
prev="",
next="",
back=BK,
},
stat={
back="返回",
path="打开存储目录",
back=BK,
},
},
}
}--文

View File

@@ -1,3 +1,5 @@
local SWC={[true]="",[false]=""}
local BK="返回"
return{
atkModeName={"随机","徽章","击杀","反击"},
royale_remain=function(n)return"剩余 "..n.." 名玩家"end,
@@ -13,7 +15,10 @@ return{
PC="场地全清",
hold="暂存",next="下一个",
stage={"关卡 1","关卡 2","关卡 3","关卡 4","关卡 5",},
stage=function(n)return"关卡 "..n end,
great="不错!",
awesome="精彩。",
continue="继续。",
maxspeed="最高速度",
speedup="速度加快",
@@ -36,9 +41,11 @@ return{
target="目标行数:",
freshLimit="锁延刷新次数:",
opponent="对手速度等级:",
bg="背景:",
bgm="背景音乐:",
},
customVal={
drop={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,"","[20G]"},
drop={"[20G]",1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,""},
lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,""},
wait=nil,
fall=nil,
@@ -48,7 +55,7 @@ return{
visible={"可见","半隐","全隐","瞬隐"},
target={10,20,40,100,200,500,1000,""},
freshLimit={0,8,15,""},
opponent={"无电脑",1,2,3,4,5,6,7,8,9,10,11},
opponent={"无电脑","9S Lv1","9S Lv2","9S Lv3","9S Lv4","9S Lv5","CC Lv1","CC Lv2","CC Lv3","CC Lv4","CC Lv5","CC Lv6"},
},
softdropdas="软降DAS:",
softdroparr="软降ARR:",
@@ -56,12 +63,14 @@ return{
keyboard="键盘",joystick="手柄",
space="空格",enter="回车",
setting2Help="方向键选择/翻页,回车修改,esc返回",
musicRoom="音乐室",
nowPlaying="正在播放:",
actName={"左移:","右移:","顺时针旋转:","逆时针旋转:","180°旋转","硬降:","软降:","暂存:","功能键:","重新开始:","左瞬移:","右瞬移:","软降到底:"},
modeName={
[0]="自定义",
"竞速","马拉松","大师","经典","","无尽","单挑","仅TSD","隐形","挖掘","生存","科研",
"竞速","马拉松","大师","经典","","无尽","单挑","回合制","仅TSD","隐形",
"挖掘","生存","防守","进攻","科研",
"C4W练习","全清训练","全清挑战","49人混战","99人混战","干旱","多人",
},
modeInfo={
@@ -72,10 +81,13 @@ return{
zen="无重力消除200行",
infinite="科研沙盒",
solo="打败AI",
round="下棋",
tsd="尽可能做T旋双清",
blind="最强大脑",
dig="核能挖掘机",
survivor="防守练习",
survivor="你能存活多久?",
defender="防守练习",
attacker="进攻练习",
tech="尽可能不要普通消除!",
c4wtrain="无 限 连 击",
pctrain="熟悉全清定式的组合",
@@ -88,10 +100,11 @@ return{
load={"加载语音ing","加载音乐ing","加载音效ing","加载完成",},
tips={
"不是动画真的在加载!",
"不是动画,真的在加载!",
"整个游戏都是MrZ完成的!",
"大满贯10连击消四全清!",
"<方块研究所>有一个Nspire-CX版本!",
"B2B2B???",
"B2B2B2B存在吗?",
"MEGACMB!",
"ALLSPIN!",
@@ -100,7 +113,7 @@ return{
"Miya:喵!",
"225238922,哔哩哔哩 干杯~",
"适度游戏益脑,沉迷游戏伤身,合理安排时间,享受健康生活",
"合群了就会消失但是消失不代表没有意义",
"合群了就会消失,但是消失不代表没有意义",
"学会使用两个旋转键,三个更好",
"更小的DAS和ARR拥有更高的操作上限",
"注意到\"旋转\"到底对方块做了些什么吗?",
@@ -109,7 +122,7 @@ return{
"本游戏难度上限很高,做好心理准备",
"方块可以不是个休闲游戏",
"调到特殊的日期也不会发生什么的",
"[随机文本]",
"3.1415926535897932384",
},
stat={
"游戏运行次数:",
@@ -139,71 +152,86 @@ return{
"使用LOVE2D引擎",
"作者:MrZ 邮箱:1046101471@qq.com",
"程序:MrZ 美术:MrZ 音乐:MrZ 音效:MrZ 语音:Miya",
"使用工具:VScode,GFIE,Beepbox,Goldwave",
"特别感谢:Farter,Teatube,196,Flyz,T830,[所有测试人员]和 你!",
"使用工具:VScode,GFIE,Beepbox,Goldwave,Cold_Clear",
"特别感谢:Farter,Flyz,196,Teatube,T830,[所有测试人员]和 你!",
"错误或者建议请附带相关信息发送到作者邮箱~",
},
support="支持作者",
group="官方QQ群",
ButtonText={
main={
qplay="快速开始",
play="开始",
setting="设置",
music="音乐室",
stat="统计信息",
help="帮助",
quit="退出",
},
mode={
up="Λ",
down="v",
left="<",
right=">",
up="",
down="",
left="",
right="",
start="开始",
custom="自定义(C)",
back="返回",
back=BK,
},
music={
bgm=function()return"音乐:"..SWC[setting.bgm]end,
up="",
play="播放",
down="",
back=BK,
},
custom={
up="Λ",
down="v",
left="<",
right=">",
up="",
down="",
left="",
right="",
start1="消除开始",
start2="拼图开始",
draw="画图(D)",
back="返回",
set1="40行",
set2="1v1",
set3="无尽",
set4="隐形",
set5="极限",
back=BK,
},
draw={
free="不定",
block1="",
block2="",
block3="",
block4="",
block5="",
block6="",
block7="",
any="不定",
block1="Z",
block2="S",
block3="L",
block4="J",
block5="T",
block6="O",
block7="I",
gb1="",
gb2="",
gb3="",
gb4="",
gb5="",
erase="×",
clear="",
back="返回",
space="×",
clear="",
back=BK,
},
play={
pause="暂停",
},
pause={
resume="继续",
restart="重新开始",
quit="退出",
},
setting={
ghost=function()return setting.ghost and"阴影:开"or"阴影:关"end,
center=function()return setting.center and"旋转中心:开"or"旋转中心:关"end,
grid=function()return setting.grid and"网格:开"or"网格:关"end,
ghost=function()return"阴影:"..SWC[setting.ghost]end,
center=function()return"旋转中心:"..SWC[setting.center]end,
grid=function()return"网格:"..SWC[setting.grid]end,
swap=function()return setting.swap and"目标选择:组合键"or"目标选择:循环"end,
fxs=function()return setting.fxs and"特效:"or"特效:关"end,
bg=function()return setting.bg and"背景:"or"背景:关"end,
fxs=function()return setting.fxs>0 and"特效等级:"..setting.fxs or"特效:关"end,
bg=function()return"背景:"..SWC[setting.bg]end,
dasD="-",dasU="+",
arrD="-",arrU="+",
sddasD="-",sddasU="+",
@@ -211,35 +239,42 @@ return{
ctrl="控制设置",
touch="触摸设置",
lang=function()return langName[setting.lang]end,
sfx=function()return setting.sfx and"音效:"or"音效:关"end,
bgm=function()return setting.bgm and"音乐:"or"音乐:关"end,
sfx=function()return"音效:"..SWC[setting.sfx]end,
bgm=function()return"音乐:"..SWC[setting.bgm]end,
vib=function()return "震动:"..setting.vib end,
voc=function()return setting.voc and"语音:"or"语音:关"end,
fullscreen=function()return setting.fullscreen and"全屏:开"or"全屏:关"end,
bgblock=function()return setting.bgblock and"背景动画:开"or"背景动画:关"end,
voc=function()return"语音:"..SWC[setting.voc]end,
fullscreen=function()return"全屏:"..SWC[setting.fullscreen]end,
bgblock=function()return"背景动画:"..SWC[setting.bgblock]end,
frame=function()return"绘制帧:"..setting.frameMul.."%"end,
skin="切换方块皮肤",
skin="皮肤",
smo=function()return"平滑下落:"..SWC[setting.smo]end,
back="保存&返回",
},
setting2={
back="返回",
back=BK,
},
setting3={
back="返回",
hide=function()return setting.virtualkeySwitch and"隐藏虚拟按键"or"显示虚拟按键"end,
default="默认组合",
snap=function()return text.snapLevelName[snapLevel]end,
alpha=function()return percent0to5[setting.virtualkeyAlpha]end,
alpha=function()return setting.virtualkeyAlpha.."0%"end,
icon="图标",
size="大小",
back=BK,
},
help={
back="返回",
his="历史",
qq="作者QQ",
back=BK,
},
history={
prev="",
next="",
back=BK,
},
stat={
back="返回",
path="打开存储目录",
back=BK,
},
},
}
}--部分译文

View File

@@ -1,3 +1,5 @@
local SWC={[true]="ON",[false]="OFF"}
local BK="Back"
return{
atkModeName={"Random","Badges","K.O.s","Counters"},
royale_remain=function(n)return n.." Players Remain"end,
@@ -13,7 +15,10 @@ return{
PC="Perfect Clear",
hold="Hold",next="Next",
stage={"STAGE 1","STAGE 2","STAGE 3","STAGE 4","STAGE 5",},
stage=function(n)return"STAGE "..n end,
great="Great!",
awesome="Awesome.",
continue="Continue.",
maxspeed="Max speed",
speedup="Speed up",
@@ -22,7 +27,7 @@ return{
pause="PAUSE",
finish="FINISH",
pauseTime="Pause time",
custom="Custom Game",
customOption={
drop="Drop delay:",
@@ -36,9 +41,11 @@ return{
target="Line limit:",
freshLimit="Lock fresh limit:",
opponent="Opponent speed:",
bg="Background:",
bgm="BGM:",
},
customVal={
drop={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,"","[20G]"},
drop={"[20G]",1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,""},
lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,""},
wait=nil,
fall=nil,
@@ -48,20 +55,22 @@ return{
visible={"normal","time","invisible","sudden"},
target={10,20,40,100,200,500,1000,""},
freshLimit={0,8,15,""},
opponent={"No CPU",1,2,3,4,5,6,7,8,9,10,11},
opponent={"No CPU","9S Lv1","9S Lv2","9S Lv3","9S Lv4","9S Lv5","CC Lv1","CC Lv2","CC Lv3","CC Lv4","CC Lv5","CC Lv6"},
},
softdropdas="softdropDAS:",
softdroparr="softdropARR:",
softdropdas="Down DAS:",
softdroparr="Down ARR:",
snapLevelName={"Free pos","Snap-10","Snap-20","Snap-40","Snap-60","Snap-80"},
keyboard="Keyboard",joystick="Joystick",
space="Space",enter="Enter",
setting2Help="Arrowkey to select/change slot,Enter to change,Esc back",
musicRoom="Music Room",
nowPlaying="Now Playing:",
actName={"Move Left:","Move Right:","Rotate Right:","Rotate Left:","Rotate Flip:","Hard Drop:","Soft Drop:","Hold:","Function:","Restart:","Instant Left:","Instant Right:","Ins Down:"},
modeName={
[0]="Custom",
"Sprint","Marathon","Master","Classic","Zen","Infinite","1v1","TSD-only","Blind","Dig","Survivor","Tech",
"Sprint","Marathon","Master","Classic","Zen","Infinite","1v1","Round","TSD-only","Blind",
"Dig","Survivor","Defender","Attacker","Tech",
"C4W Train","PC Train","PC Challenge","Techmino49","Techmino99","Drought","Hotseat",
},
modeInfo={
@@ -72,10 +81,13 @@ return{
zen="Clear 200 Lines without gravity",
infinite="Infinite game,infinite happiness",
solo="Beat AI",
round="Chess?",
tsd="Make more T-spin-doubles",
blind="Invisible board",
dig="Downstack!",
survivor="Hand them!",
survivor="Survive Longer!",
defender="Hand them!",
attacker="Attacking better then defending",
tech="Don't do normal clear",
c4wtrain="Infinite combo",
pctrain="Let's learn some PCs",
@@ -92,6 +104,7 @@ return{
"The WHOLE game is made by MrZ!",
"Back to Back 10 combo Techrash PC!",
"Techmino has a Nspire-CX edition!",
"B2B2B???",
"Is B2B2B2B possible?",
"MEGACMB!",
"ALLSPIN!",
@@ -109,7 +122,7 @@ return{
"This game can be very hard,be mentally perpared",
"This in not a casual game",
"Nothing will happen when some special day come",
"[random text]",
"3.1415926535897932384",
},
stat={
"Games run:",
@@ -139,71 +152,86 @@ return{
"Powered by LOVE2D",
"Author:MrZ E-mail:1046101471@qq.com",
"Programe:MrZ Art:MrZ Music:MrZ SFX:MrZ VOICE:Miya",
"Tool used:VScode,GFIE,Beepbox,Goldwave",
"Special thanks:Farter,Teatube,196,Flyz,T830,[all test staff] and YOU!",
"Tool used:VScode,GFIE,Beepbox,Goldwave,Cold_Clear",
"Special thanks:Farter,Flyz,196,Teatube,T830,[all test staff] and YOU!",
"Any bugs/suggestions to my E-mail.",
},
support="Support Author",
group="Official QQ Group",
ButtonText={
main={
qplay="Qplay",
play="Play",
setting="Settings",
music="Music room",
stat="Statistics",
help="Help",
quit="Quit",
},
mode={
up="Λ",
down="v",
left="<",
right=">",
up="",
down="",
left="",
right="",
start="Start",
custom="Custom(C)",
back="Back",
back=BK,
},
music={
bgm=function()return"BGM:"..SWC[setting.bgm]end,
up="",
play="Play",
down="",
back=BK,
},
custom={
up="Λ",
down="v",
left="<",
right=">",
up="",
down="",
left="",
right="",
start1="Clear Start",
start2="Puzzle Start",
draw="Draw(D)",
back="Back",
set1="40L",
set2="1v1",
set3="infinite",
set4="blind",
set5="master",
back=BK,
},
draw={
free="FREE",
block1="",
block2="",
block3="",
block4="",
block5="",
block6="",
block7="",
any="ANY",
block1="Z",
block2="S",
block3="L",
block4="J",
block5="T",
block6="O",
block7="I",
gb1="",
gb2="",
gb3="",
gb4="",
gb5="",
erase="×",
clear="CLEAR",
back="Back",
space="×",
clear="Clear",
back=BK,
},
play={
pause="Pause",
},
pause={
resume="Resume",
restart="Restart",
quit="Quit",
},
setting={
ghost=function()return setting.ghost and"Ghost:ON"or"Ghost:OFF"end,
center=function()return setting.center and"Center:ON"or"Center:OFF"end,
grid=function()return setting.grid and"Grid:ON"or"Grid:OFF"end,
ghost=function()return"Ghost:"..SWC[setting.ghost]end,
center=function()return"Center:"..SWC[setting.center]end,
grid=function()return"Grid:"..SWC[setting.grid]end,
swap=function()return setting.swap and"Swap:comboKey"or"Swap:loop"end,
fxs=function()return setting.fxs and"FXs:ON"or"FXs:OFF"end,
bg=function()return setting.bg and"BG:ON"or"BG:OFF"end,
fxs=function()return setting.fxs>0 and"FX level:"..setting.fxs or"NO FX"end,
bg=function()return"BG:"..SWC[setting.bg]end,
dasD="-",dasU="+",
arrD="-",arrU="+",
sddasD="-",sddasU="+",
@@ -211,35 +239,42 @@ return{
ctrl="Control settings",
touch="Touch settings",
lang=function()return langName[setting.lang]end,
sfx=function()return setting.sfx and"SFX:ON"or"SFX:OFF"end,
bgm=function()return setting.bgm and"BGM:ON"or"BGM:OFF"end,
voc=function()return setting.voc and"VOC:ON"or"VOC:OFF"end,
sfx=function()return"SFX:"..SWC[setting.sfx]end,
bgm=function()return"BGM:"..SWC[setting.bgm]end,
voc=function()return"VOC:"..SWC[setting.voc]end,
vib=function()return "VIB:"..setting.vib end,
fullscreen=function()return setting.fullscreen and"Fullscreen:ON"or"Fullscreen:OFF"end,
bgblock=function()return setting.bgblock and"BG animation:ON"or"BG animation:OFF"end,
fullscreen=function()return"Fullscreen:"..SWC[setting.fullscreen]end,
bgblock=function()return"BG animation:"..SWC[setting.bgblock]end,
frame=function()return"FrameDraw:"..setting.frameMul.."%"end,
skin="Change Block Skin",
skin="Skin",
smo=function()return"SmoothDrop:"..SWC[setting.smo]end,
back="Save&Back",
},
setting2={
back="Back",
back=BK,
},
setting3={
back="Back",
hide=function()return setting.virtualkeySwitch and"Hide Virtual Key"or"Show Virtual Key"end,
default="Defaults",
snap=function()return text.snapLevelName[snapLevel]end,
alpha=function()return percent0to5[setting.virtualkeyAlpha]end,
alpha=function()return setting.virtualkeyAlpha.."0%"end,
icon="Icon",
size="Size",
back=BK,
},
help={
back="Back",
his="History",
qq="Author's qq",
back=BK,
},
history={
prev="",
next="",
back=BK,
},
stat={
back="Back",
path="Open Data Folder",
back=BK,
},
}
}

348
list.lua
View File

@@ -2,6 +2,8 @@ local gc=love.graphics
local tc,kb=love.touch,love.keyboard
local sys=love.system
local fs=love.filesystem
local mobile=system=="Android"or system=="iOS"
actName={"moveLeft","moveRight","rotRight","rotLeft","rotFlip","hardDrop","softDrop","hold","func","restart","insLeft","insRight","insDown"}
color={
red={1,0,0},
@@ -44,15 +46,14 @@ blockColor={
color.yellow,
color.cyan,
color.darkGreen,
color.darkGrey,
color.grey,
color.lightGrey,
color.darkPurple,
color.darkRed,
color.darkGreen,
}
sfx={
"button","swipe",
"ready","start","win","fail","collect",
"move","rotate","rotatekick","hold",
"prerotate","prehold",
@@ -78,6 +79,7 @@ bgm={
"secret8th",
"rockblock",
"8-bit happiness",
"shining terminal",
"end",
}
voiceList={
@@ -86,6 +88,7 @@ voiceList={
"spin","spin_","mini","b2b","b3b","pc",
"win","lose","voc_nya","nya",
}
voiceBank={}
voice={
Z={"Z_1","Z_2"},
S={"S_1","S_2"},
@@ -110,21 +113,35 @@ voice={
nya={"nya_1","nya_2","nya_3","nya_4"},
}
musicID={
"blank",
"way",
"race",
"newera",
"push",
"reason",
"infinite",
"secret7th",
"secret8th",
"shining terminal",
"rockblock",
"8-bit happiness",
"cruelty",
"final",
"end",
}
customID={
"drop",
"lock",
"wait",
"fall",
"next",
"hold",
"sequence",
"visible",
"drop","lock",
"wait","fall",
"next","hold",
"sequence","visible",
"target",
"freshLimit",
"opponent",
"bg","bgm",
}
customRange={
drop={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99,-1},
drop={0,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},
@@ -134,50 +151,55 @@ customRange={
visible={"show","time","fast","none"},
target={10,20,40,100,200,500,1000,1e99},
freshLimit={0,8,15,1e99},
opponent={0,60,30,20,15,10,7,5,4,3,2,1},
opponent={0,1,2,3,4,5,11,12,13,14,15,16},
bg={"none","game1","game2","game3","strap","rgb","glow","matrix"},
bgm={"blank","way","race","newera","push","reason","infinite","secret7th","secret8th","rockblock"},
}
RCPB={10,33,200,33,105,5,105,60}
snapLevelValue={1,10,20,40,60,80}
up0to4={[0]="000%UP","025%UP","050%UP","075%UP","100%UP",}
percent0to5={[0]="0%","20%","40%","60%","80%","100%",}
modeID={
[0]="custom",
"sprint","marathon","master","classic","zen","infinite","solo","tsd","blind","dig","survivor","tech",
"sprint","marathon","master","classic","zen","infinite","solo","round","tsd","blind",
"dig","survivor","defender","attacker","tech",
"c4wtrain","pctrain","pcchallenge","techmino49","techmino99","drought","hotseat",
}
modeLevel={
sprint={"10L","20L","40L","100L","400L","1000L"},
marathon={"EASY","NORMAL","HARD"},
master={"LUNATIC","ULTIMATE"},
master={"LUNATIC","ULTIMATE","FINAL"},
classic={"CTWC"},
zen={"NORMAL"},
infinite={"NORMAL","EXTRA"},
solo={"EASY","NORMAL","HARD","LUNATIC"},
solo={"EASY","EASY+","NORMAL","NORMAL+","HARD","HARD+","LUNATIC","LUNATIC+","ULTIMATE"},
round={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE"},
tsd={"NORMAL","HARD"},
blind={"EASY","HARD","HARD+","LUNATIC","ULTIMATE","GM"},
dig={"NORMAL","LUNATIC"},
survivor={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE"},
tech={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE"},
survivor={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE","EXTRA"},
defender={"NORMAL","LUNATIC"},
attacker={"HARD","ULTIMATE"},
tech={"NORMAL","NORMAL+","HARD","HARD+","LUNATIC","LUNATIC+",},
c4wtrain={"NORMAL","LUNATIC"},
pctrain={"NORMAL","EXTRA"},
pcchallenge={"NORMAL","HARD","LUNATIC"},
techmino49={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE"},
techmino99={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE"},
techmino49={"EASY","HARD","ULTIMATE"},
techmino99={"EASY","HARD","ULTIMATE"},
drought={"NORMAL","MESS"},
hotseat={"2P","3P","4P",},
custom={"Normal","Puzzle"},
}
local t,f=true,false
local O,_=true,false
blocks={
{[0]={{f,t,t},{t,t,f}},{{t,f},{t,t},{f,t}}},
{[0]={{t,t,f},{f,t,t}},{{f,t},{t,t},{t,f}}},
{[0]={{t,t,t},{f,f,t}},{{t,t},{t,f},{t,f}},{{t,f,f},{t,t,t}},{{f,t},{f,t},{t,t}}},
{[0]={{t,t,t},{t,f,f}},{{t,f},{t,f},{t,t}},{{f,f,t},{t,t,t}},{{t,t},{f,t},{f,t}}},
{[0]={{t,t,t},{f,t,f}},{{t,f},{t,t},{t,f}},{{f,t,f},{t,t,t}},{{f,t},{t,t},{f,t}}},
{[0]={{t,t},{t,t}},{{t,t},{t,t}}},
{[0]={{t,t,t,t}},{{t},{t},{t},{t}}},
{[0]={{_,O,O},{O,O,_}},{{O,_},{O,O},{_,O}}},
{[0]={{O,O,_},{_,O,O}},{{_,O},{O,O},{O,_}}},
{[0]={{O,O,O},{_,_,O}},{{O,O},{O,_},{O,_}},{{O,_,_},{O,O,O}},{{_,O},{_,O},{O,O}}},
{[0]={{O,O,O},{O,_,_}},{{O,_},{O,_},{O,O}},{{_,_,O},{O,O,O}},{{O,O},{_,O},{_,O}}},
{[0]={{O,O,O},{_,O,_}},{{O,_},{O,O},{O,_}},{{_,O,_},{O,O,O}},{{_,O},{O,O},{_,O}}},
{[0]={{O,O},{O,O}},{{O,O},{O,O}}},
{[0]={{O,O,O,O}},{{O},{O},{O},{O}}},
}
local l={1,2,6,7}for i=1,4 do blocks[l[i]][2],blocks[l[i]][3]=blocks[l[i]][0],blocks[l[i]][1]end
for i=1,7 do blocks[i+7]=blocks[i]end
@@ -244,176 +266,206 @@ local virtualkeySet={
{1200-770,40,1600,40},--restart
},--PC key feedback
}
Buttons={
local customSet={
{20,20,1,1,7,1,1,1,3,4,1,2,3},
{18,20,1,1,7,1,1,1,8,3,8,3,3},
{22,22,1,1,7,3,1,1,8,4,1,7,7},
{20,20,1,1,7,1,1,3,8,3,1,7,8},
{23,11,8,11,4,1,2,1,8,3,1,4,9},
}
local function useDefaultSet(n)
for i=1,#customSet[n]do
customSel[i]=customSet[n][i]
end
curBG=customRange.bg[customSel[12]]
BGM(customRange.bgm[customSel[13]])
end
Widget={
load={},
intro={},
main={
play= {x=380,y=300,w=240,h=240,rgb=color.red, f=70,code=function()gotoScene("mode")end,down="stat",right="setting"},
setting={x=640,y=300,w=240,h=240,rgb=color.lightBlue, f=55,code=function()gotoScene("setting")end,down="stat",left="play",right="help"},
stat= {x=640,y=560,w=240,h=240,rgb=color.cyan, f=55,code=function()gotoScene("stat")end,up="setting",left="play",right="help"},
help= {x=900,y=560,w=240,h=240,rgb=color.yellow, f=55,code=function()gotoScene("help")end,up="setting",left="stat",right="quit"},
quit= {x=1180,y=620,w=120,h=120,rgb=color.lightGrey, f=50,code=function()gotoScene("quit")end,up="setting",left="help"},
qplay= newButton(160, 300,150,150,color.lightRed, 40,function()loadGame(modeSel,levelSel)end, nil, nil, "stat", nil, "play" ),
play= newButton(380, 300,240,240,color.red, 70,function()gotoScene("mode")end, nil, nil, "stat", "qplay", "setting" ),
setting=newButton(640, 300,240,240,color.lightBlue,55,function()gotoScene("setting")end, nil, nil, "stat", "play", "music" ),
music= newButton(900, 300,240,240,color.lightCyan,42,function()gotoScene("music")end, nil, nil, "help", "setting", "quit" ),
stat= newButton(640, 560,240,240,color.cyan, 55,function()gotoScene("stat")end, nil, "setting", nil, "play", "help" ),
help= newButton(900, 560,240,240,color.yellow, 55,function()gotoScene("help")end, nil, "music", nil, "stat", "quit" ),
quit= newButton(1180, 620,120,120,color.lightGrey,50,function()gotoScene("quit")end, nil, "music", nil, "help", nil ),
},
mode={
up= {x=1000,y=210,w=200,h=140, rgb=color.white, f=64, code=function()keyDown.mode("up")end, hide=function()return modeSel==1 end,},
down= {x=1000,y=430,w=200,h=140, rgb=color.white, f=80, code=function()keyDown.mode("down")end, hide=function()return modeSel==#modeID end,},
left= {x=190, y=160,w=100,h=80, rgb=color.white, code=function()keyDown.mode("left")end, hide=function()return levelSel==1 end,},
right= {x=350, y=160,w=100,h=80, rgb=color.white, code=function()keyDown.mode("right")end,hide=function()return levelSel==#modeLevel[modeID[modeSel]]end,},
start={ x=1000, y=600,w=250,h=100, rgb=color.green, f=50, code=function()
loadGame(modeSel,levelSel)end},
custom= {x=275, y=420,w=200,h=90, rgb=color.yellow, code=function()gotoScene("custom")end},
back= {x=640, y=630,w=230,h=90, rgb=color.white, f=45, code=back},
up= newButton(1000, 210,200,140,color.white, 80,function()love.keypressed("up")end,function()return modeSel==1 end),
down= newButton(1000, 430,200,140,color.white, 80,function()love.keypressed("down")end,function()return modeSel==#modeID end),
left= newButton(190, 160,100,80, color.white, 40,function()love.keypressed("left")end,function()return levelSel==1 end),
right= newButton(350, 160,100,80, color.white, 40,function()love.keypressed("right")end,function()return levelSel==#modeLevel[modeID[modeSel]]end),
start= newButton(1000, 600,250,100,color.green, 50,function()loadGame(modeSel,levelSel)end),
custom= newButton(275, 420,200,90, color.yellow, 40,function()gotoScene("custom")end),
back= newButton(640, 630,230,90, color.white, 45,back),
},
music={
bgm= newButton(1100, 80, 160,80, color.white,40,function()BGM()setting.bgm=not setting.bgm end),
up= newButton(1100, 200, 120,120,color.white,60,function()love.keypressed("up")end, function()return not setting.bgm end),
play= newButton(1100, 340, 120,120,color.white,40,function()love.keypressed("space")end, function()return not setting.bgm end),
down= newButton(1100, 480, 120,120,color.white,60,function()love.keypressed("down")end, function()return not setting.bgm end),
back= newButton(640, 630, 230,90, color.white,45,back),
},
custom={
up= {x=1000,y=220, w=100, h=100, rgb=color.white, code=function()optSel=(optSel-2)%#customID+1 end},
down= {x=1000,y=460, w=100, h=100, rgb=color.white,f=50, code=function()optSel=optSel%#customID+1 end},
left= {x=880, y=340, w=100, h=100, rgb=color.white,f=50, code=function()local k=customID[optSel]customSel[k]=(customSel[k]-2)%#customRange[k]+1 end},
right= {x=1120,y=340, w=100, h=100, rgb=color.white,f=50, code=function()local k=customID[optSel]customSel[k]=customSel[k]%#customRange[k]+1 end},
start1= {x=880, y=580, w=220, h=70, rgb=color.green, code=function()loadGame(0,1)end},
start2= {x=1120,y=580, w=220, h=70, rgb=color.lightPurple, code=function()loadGame(0,2)end},
draw= {x=1000,y=90, w=190, h=85, rgb=color.cyan, code=function()gotoScene("draw")end},
back= {x=640, y=630 ,w=180, h=60, rgb=color.white, code=back},
up= newButton(1000, 220, 100,100,color.white, 50,function()sel=(sel-2)%#customID+1 end),
down= newButton(1000, 460, 100,100,color.white, 50,function()sel=sel%#customID+1 end),
left= newButton(880, 340, 100,100,color.white, 50,function()love.keypressed("left")end),
right= newButton(1120, 340, 100,100,color.white, 50,function()love.keypressed("right")end),
start1= newButton(880, 580, 220,70, color.green, 40,function()loadGame(0,1)end),
start2= newButton(1120, 580, 220,70, color.lightPurple, 40,function()loadGame(0,2)end),
draw= newButton(1000, 90, 190,85, color.cyan, 40,function()gotoScene("draw")end),
set1= newButton(640, 160, 240,75, color.lightRed, 40,function()useDefaultSet(1)end),
set2= newButton(640, 250, 240,75, color.lightRed, 40,function()useDefaultSet(2)end),
set3= newButton(640, 340, 240,75, color.lightRed, 40,function()useDefaultSet(3)end),
set4= newButton(640, 430, 240,75, color.lightRed, 40,function()useDefaultSet(4)end),
set5= newButton(640, 520, 240,75, color.lightRed, 40,function()useDefaultSet(5)end),
back= newButton(640, 630, 180,60, color.white, 40,back),
},
draw={
free= {x=700, y=80,w=120,h=120, f=45, rgb=color.lightGrey,code=function()pen=-1 end},
block1= {x=840, y=80,w=120,h=120, f=65, rgb=color.red, code=function()pen=1 end},
block2= {x=980, y=80,w=120,h=120, f=65, rgb=color.green, code=function()pen=2 end},
block3= {x=1120,y=80,w=120,h=120, f=65, rgb=color.orange, code=function()pen=3 end},
block4= {x=840, y=220,w=120,h=120, f=65, rgb=color.blue, code=function()pen=4 end},
block5= {x=980, y=220,w=120,h=120, f=65, rgb=color.magenta, code=function()pen=5 end},
block6= {x=1120,y=220,w=120,h=120, f=65, rgb=color.yellow, code=function()pen=6 end},
block7= {x=840, y=360,w=120,h=120, f=65, rgb=color.cyan, code=function()pen=7 end},
gb1= {x=980, y=360,w=120,h=120, f=65, rgb=color.darkGrey, code=function()pen=9 end},
gb2= {x=1120,y=360,w=120,h=120, f=65, rgb=color.grey, code=function()pen=10 end},
gb3= {x=840, y=500,w=120,h=120, f=65, rgb=color.darkPurple,code=function()pen=11 end},
gb4= {x=980, y=500,w=120,h=120, f=65, rgb=color.darkRed, code=function()pen=12 end},
gb5= {x=1120,y=500,w=120,h=120, f=65, rgb=color.darkGreen,code=function()pen=13 end},
erase= {x=840, y=640,w=120,h=120, f=70, rgb=color.grey, code=function()pen=0 end},
clear= {x=1120,y=640,w=120,h=120, f=45, rgb=color.white, code=function()
if clearSureTime>0 then
for y=1,20 do for x=1,10 do preField[y][x]=0 end end
clearSureTime=0
else
clearSureTime=50
end
end},
back= {x=1235,y=45,w=80,h=80, f=35, rgb=color.white, code=back},
any= newButton(700, 80, 120,120,color.lightGrey, 45,function()pen=0 end),
block1= newButton(840, 80, 120,120,color.red, 65,function()pen=1 end),
block2= newButton(980, 80, 120,120,color.green, 65,function()pen=2 end),
block3= newButton(1120, 80, 120,120,color.orange, 65,function()pen=3 end),
block4= newButton(840, 220, 120,120,color.blue, 65,function()pen=4 end),
block5= newButton(980, 220, 120,120,color.magenta, 65,function()pen=5 end),
block6= newButton(1120, 220, 120,120,color.yellow, 65,function()pen=6 end),
block7= newButton(840, 360, 120,120,color.cyan, 65,function()pen=7 end),
gb1= newButton(980, 360, 120,120,color.darkGrey, 65,function()pen=9 end),
gb2= newButton(1120, 360, 120,120,color.grey, 65,function()pen=10 end),
gb3= newButton(840, 500, 120,120,color.darkPurple, 65,function()pen=11 end),
gb4= newButton(980, 500, 120,120,color.darkRed, 65,function()pen=12 end),
gb5= newButton(1120, 500, 120,120,color.darkGreen, 65,function()pen=13 end),
space= newButton(840, 640, 120,120,color.grey, 70,function()pen=-1 end),
clear= newButton(1120, 640, 120,120,color.white, 45,function()love.keypressed("delete")end),
back= newButton(1235, 45, 80, 80, color.white, 35,back),
},
play={
pause={x=1235,y=45,w=80,h=80,rgb=color.white,f=30,code=pauseGame},
pause= newButton(1235,45,80,80,color.white,30,pauseGame),
},
pause={
resume= {x=640,y=400,w=240,h=100, rgb=color.white,f=50,code=resumeGame},
quit= {x=640,y=550,w=240,h=100, rgb=color.white,f=50,code=back},
resume= newButton(640,290,240,100,color.white,50,resumeGame),
restart=newButton(640,445,240,100,color.white,50,function()
clearTask("play")
updateStat()
resetGameData()
gotoScene("play","none")
end),
quit= newButton(640,600,240,100,color.white,50,back),
},
setting={--Normal setting
ghost= {x=290, y=90, w=210, h=60, rgb=color.white,code=function()setting.ghost=not setting.ghost end,down="grid",right="center"},
center= {x=505, y=90, w=210, h=60, rgb=color.white,code=function()setting.center=not setting.center end,down="swap",left="ghost",right="sfx"},
grid= {x=290, y=160, w=210, h=60, rgb=color.white,code=function()setting.grid=not setting.grid end,up="ghost",down="fxs",right="swap"},
swap= {x=505, y=160, w=210, h=60,f=28, rgb=color.white,code=function()setting.swap=not setting.swap end,up="center",down="bg",left="grid",right="vib"},
fxs= {x=290, y=230, w=210, h=60, rgb=color.white,code=function()setting.fxs=not setting.fxs end,up="grid",down="dasU",right="bg"},
bg= {x=505, y=230, w=210, h=60, rgb=color.white,code=function()setting.bg=not setting.bg end,up="swap",down="arrD",right="fullscreen"},
dasD= {x=210, y=300, w=50, h=50, rgb=color.white,code=function()setting.das=(setting.das-1)%31 end,up="fxs",down="sddasD",right="dasU"},
dasU= {x=370, y=300, w=50, h=50, rgb=color.white,code=function()setting.das=(setting.das+1)%31 end,up="fxs",down="sddasU",left="dasD",right="arrD"},
arrD= {x=425, y=300, w=50, h=50, rgb=color.white,code=function()setting.arr=(setting.arr-1)%16 end,up="bg",down="sdarrD",left="dasU",right="arrU"},
arrU= {x=585, y=300, w=50, h=50, rgb=color.white,code=function()setting.arr=(setting.arr+1)%16 end,up="bg",down="sdarrU",left="arrD",right="bgblock"},--3~6
sddasD= {x=210, y=370, w=50, h=50, rgb=color.white,code=function()setting.sddas=(setting.sddas-1)%11 end,up="dasD",down="ctrl",right="sddasU"},
sddasU= {x=370, y=370, w=50, h=50, rgb=color.white,code=function()setting.sddas=(setting.sddas+1)%11 end,up="dasU",down="ctrl",left="sddasD",right="sdarrD"},
sdarrD= {x=425, y=370, w=50, h=50, rgb=color.white,code=function()setting.sdarr=(setting.sdarr-1)%4 end,up="arrD",down="ctrl",left="sddasU",right="sdarrU"},
sdarrU= {x=585, y=370, w=50, h=50, rgb=color.white,code=function()setting.sdarr=(setting.sdarr+1)%4 end,up="arrU",down="ctrl",left="sdarrD",right="frame"},
ghost= newButton(290, 90, 210,60,color.white,40,function()setting.ghost=not setting.ghost end, nil, nil, "grid", nil, "center" ),
center= newButton(505, 90, 210,60,color.white,40,function()setting.center=not setting.center end, nil, nil, "swap", "ghost", "sfx" ),
grid= newButton(290, 160,210,60,color.white,40,function()setting.grid=not setting.grid end, nil, "ghost", "fxs", nil, "swap" ),
swap= newButton(505, 160,210,60,color.white,28,function()setting.swap=not setting.swap end, nil, "center", "bg", "grid", "vib" ),
fxs= newButton(290, 230,210,60,color.white,40,function()setting.fxs=(setting.fxs+1)%4 end, nil, "grid", "dasU", nil, "bg" ),
bg= newButton(505, 230,210,60,color.white,40,function()setting.bg=not setting.bg end, nil, "swap", "arrD", "fxs", "fullscreen" ),
dasD= newButton(210, 300,50, 50,color.white,40,function()setting.das=(setting.das-1)%31 end, nil, "fxs", "sddasD", nil, "dasU" ),
dasU= newButton(370, 300,50, 50,color.white,40,function()setting.das=(setting.das+1)%31 end, nil, "fxs", "sddasU", "dasD", "arrD" ),
arrD= newButton(425, 300,50, 50,color.white,40,function()
setting.arr=(setting.arr-1)%16
if setting.arr>setting.das then
setting.das=setting.arr
Widget.setting.dasU.alpha,Widget.setting.dasD.alpha=1,1
SFX("blip_1",.4)
end
end,nil,"bg","sdarrD","dasU","arrU"),
arrU= newButton(585, 300,50, 50,color.white,40,function()
setting.arr=(setting.arr+1)%16
if setting.arr>setting.das then
setting.das=setting.arr
Widget.setting.dasU.alpha,Widget.setting.dasD.alpha=1,1
SFX("blip_1",.4)
end
end,nil,"bg","sdarrU","arrD","bgblock"),
sddasD= newButton(210, 370,50, 50,color.white,40,function()setting.sddas=(setting.sddas-1)%11 end, nil, "dasD", "ctrl", nil, "sddasU" ),
sddasU= newButton(370, 370,50, 50,color.white,40,function()setting.sddas=(setting.sddas+1)%11 end, nil, "dasU", "ctrl", "sddasD", "sdarrD" ),
sdarrD= newButton(425, 370,50, 50,color.white,40,function()setting.sdarr=(setting.sdarr-1)%4 end, nil, "arrD", "ctrl", "sddasU", "sdarrU" ),
sdarrU= newButton(585, 370,50, 50,color.white,40,function()setting.sdarr=(setting.sdarr+1)%4 end, nil, "arrU", "ctrl", "sdarrD", "frame" ),
ctrl= {x=340,y=440, w=310,h=60,rgb=color.green, code=function()gotoScene("setting2")end,up="sddasU",down="touch",left="lang",right="skin"},
touch= {x=340,y=510, w=310,h=60,rgb=color.yellow,code=function()gotoScene("setting3")end,up="ctrl",down="back",right="lang"},
lang= {x=580,y=510, w=150,h=60,rgb=color.red, code=function()
ctrl= newButton(340,440, 310,60,color.green,40, function()gotoScene("setting2")end, nil, "sddasU", "touch", "lang", "skin" ),
touch= newButton(340,510, 310,60,color.yellow,40, function()gotoScene("setting3")end, nil, "ctrl", "back", nil, "lang" ),
lang= newButton(580,510, 150,60,color.red,40, function()
setting.lang=setting.lang%#langName+1
swapLanguage(setting.lang)
end,up="sdarrU",down="back",left="touch",right="skin"},
end,nil,"sdarrU","back","touch","skin"),
sfx= {x=760,y=90, w=160, h=60, rgb=color.white,code=function()setting.sfx=not setting.sfx end,down="vib",left="center",right="bgm"},
bgm= {x=940,y=90, w=160, h=60, rgb=color.white,code=function()
BGM()
setting.bgm=not setting.bgm
BGM("blank")
end,down="vib",left="sfx"},
vib= {x=760,y=160, w=160, h=60,rgb=color.white, code=function()
setting.vib=(setting.vib+1)%6
VIB(1)
end,up="sfx",down="fullscreen",left="swap"},
voc= {x=940,y=160, w=160, h=60,rgb=color.white,
hide=function()
return not(kb.isDown("m")or false)
end,
code=function()
setting.voc=not setting.voc
if setting.voc then VOICE("voc_nya")end
end,up="sfx",down="fullscreen",left="vib"},
fullscreen= {x=850,y=230, w=340,h=60,rgb=color.white, code=function()
sfx= newButton(760,90, 160,60,color.white,40, function()setting.sfx=not setting.sfx end, nil, nil, "vib", "center", "bgm" ),
bgm= newButton(940,90, 160,60,color.white,40, function()BGM()setting.bgm=not setting.bgm BGM("blank")end, nil, nil, "voc", "sfx", nil ),
vib= newButton(760,160, 160,60,color.white,40, function()setting.vib=(setting.vib+1)%6 VIB(1)end, nil, "sfx", "fullscreen", "swap", "voc" ),
voc= newButton(940,160, 160,60,color.white,40, function()setting.voc=not setting.voc end, nil, "sfx", "fullscreen", "vib", nil ),
fullscreen= newButton(850,230, 340,60,color.white,40, function()
setting.fullscreen=not setting.fullscreen
love.window.setFullscreen(setting.fullscreen)
if not setting.fullscreen then
love.resize(gc.getWidth(),gc.getHeight())
love.resize(gc.getWidth(),gc.getHeight())
end
end,up="vib",down="bgblock",left="bg"},
bgblock={x=850,y=300, w=340,h=60,rgb=color.white, code=function()
setting.bgblock=not setting.bgblock
if not setting.bgblock then
for i=1,16 do
BGblockList[i].v=3*BGblockList[i].v
end
end
end,up="fullscreen",down="frame",left="arrU"},
frame= {x=850,y=370, w=340,h=60,rgb=color.white, code=function()
end,nil,"vib","bgblock","bg",nil),
bgblock= newButton(850,300, 340,60,color.white,40, function()
setting.bgblock=not setting.bgblock--if not setting.bgblock then for i=1,16 do BGblockList[i].v=3*BGblockList[i].v end end
end,nil,"fullscreen","frame","arrU",nil),
frame= newButton(850,370, 340,60,color.white,40, function()
setting.frameMul=setting.frameMul+(setting.frameMul<50 and 5 or 10)
if setting.frameMul>100 then setting.frameMul=25 end
end,up="bgblock",down="skin",left="sdarrU"},
skin= {x=850,y=440, w=340,h=60,rgb=color.white, code=function()
end,nil,"bgblock","skin","sdarrU",nil),
skin= newButton(740,440, 120,60,color.white,40, function()
setting.skin=setting.skin%6+1
changeBlockSkin(setting.skin)
end,up="frame",down="back",left="ctrl"},
back= {x=640,y=620, w=300,h=70,rgb=color.white, code=back,up="lang"},
end,nil,"frame","back","ctrl","smo"),
smo= newButton(920,440, 200,60,color.white,27, function()
setting.smo=not setting.smo
end,nil,"frame","back","skin",nil),
back= newButton(640,620, 300,70,color.white,40, back,nil,nil,"lang",nil,nil),
},
setting2={--Control setting
back={x=840,y=630,w=180,h=60,rgb=color.white,code=back},
back=newButton(840,630,180,60,color.white,40,back),
},
setting3={--Touch setting
back={x=640,y=410,w=170,h=80,f=45,code=back},
hide={x=640,y=210,w=500,h=80,f=45,code=function()
hide= newButton(640,210,500,80,color.white,45,function()
setting.virtualkeySwitch=not setting.virtualkeySwitch
end},
default={x=450,y=310,w=170,h=80,code=function()
end),
default=newButton(450,310,170,80,color.white,40,function()
for K=1,#virtualkey do
local b,b0=virtualkey[K],virtualkeySet[defaultSel][K]
b[1],b[2],b[3],b[4]=b0[1],b0[2],b0[3],b0[4]
end--Default virtualkey
defaultSel=defaultSel%5+1
end},
snap={x=640,y=310,w=170,h=80,code=function()
end),
snap= newButton(640,310,170,80,color.white,40,function()
snapLevel=snapLevel%6+1
end},
alpha={x=830,y=310,w=170,h=80,f=45,code=function()
setting.virtualkeyAlpha=(setting.virtualkeyAlpha+1)%6
end),
alpha= newButton(830,310,170,80,color.white,45,function()
setting.virtualkeyAlpha=(setting.virtualkeyAlpha+1)%11
--Adjust virtualkey alpha
end},
icon={x=450,y=410,w=170,h=80,f=45,code=function()
end),
icon= newButton(450,410,170,80,color.white,45,function()
setting.virtualkeyIcon=not setting.virtualkeyIcon
--Switch virtualkey icon
end},
size={x=830,y=410,w=170,h=80,f=45,code=function()
end),
size= newButton(830,410,170,80,color.white,45,function()
if sel then
local b=virtualkey[sel]
b[4]=b[4]+10
if b[4]==150 then b[4]=40 end
b[3]=b[4]^2
end
end},
end),
back= newButton(640,410,170,80,color.white,45,back),
},
help={
back={x=640,y=590,w=180,h=60,rgb=color.white,code=back,right="qq"},
qq={x=980,y=590,w=230,h=60,hide=function()return system=="Android"end,rgb=color.white,code=function()sys.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end,left="back"},
his= newButton(1050, 520,230,60,color.white,40,function()gotoScene("history")end, nil, nil, "qq", "back", nil),
qq= newButton(1050, 600,230,60,color.white,40,function()sys.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end, function()return mobile end,"his", nil, "back", nil),
back= newButton(640, 600,180,60,color.white,40,back, nil, "his", nil, nil, "qq"),
},
history={
prev= newButton(75, 320,100,300,color.white,40,function()love.keypressed("left")end,function()return sel==1 end),
next= newButton(1205, 320,100,300,color.white,40,function()love.keypressed("right")end,function()return sel==#updateLog end),
back= newButton(640, 640,200,70, color.white,40,back),
},
stat={
back={x=640,y=590,w=180,h=60,rgb=color.white,code=back,right="path"},
path={x=980,y=590,w=250,h=60,f=30,hide=function()return system=="Android"end,rgb=color.white,code=function()sys.openURL(fs.getSaveDirectory())end,left="back"},
path= newButton(980,590,250,60,color.white,30,function()sys.openURL(fs.getSaveDirectory())end,function()return mobile end,nil,nil,"back",nil),
back= newButton(640,590,180,60,color.white,40,back,nil,nil,nil,nil,"path"),
},
sel=nil,--selected button id(integer)
sel=nil,--selected widget id
}

1040
main.lua

File diff suppressed because it is too large Load Diff

393
paint.lua
View File

@@ -1,8 +1,12 @@
local gc=love.graphics
local mt=love.math
local gmatch=string.gmatch
local setFont=setFont
local Timer=love.timer.getTime
local int,abs,rnd,max,min,sin=math.floor,math.abs,math.random,math.max,math.min,math.sin
local format=string.format
local Timer=love.timer.getTime
local scr=scr
local attackColor={
{color.darkGrey,color.white},
{color.grey,color.white},
@@ -21,10 +25,14 @@ local modeLevelColor={
EASY=color.cyan,
NORMAL=color.green,
HARD=color.magenta,
["HARD+"]=color.darkMagenta,
LUNATIC=color.red,
EXTRA=color.lightMagenta,
ULTIMATE=color.lightYellow,
FINAL=color.lightGrey,
["EASY+"]=color.darkCyan,
["NORMAL+"]=color.darkGreen,
["HARD+"]=color.darkMagenta,
["LUNATIC+"]=color.darkRed,
MESS=color.lightGrey,
GM=color.blue,
@@ -35,7 +43,7 @@ local modeLevelColor={
["40L"]=color.green,
["100L"]=color.orange,
["400L"]=color.red,
["1000L"]=color.darkRed,
["1000L"]=color.lightGrey,
}
local dataOptL={"key","rotate","hold",nil,nil,nil,"send","recv","pend"}
local function dataOpt(i)
@@ -101,8 +109,9 @@ end
FX={
flash=0,--Black screen(frame)
shake=0,--Screen shake(frame)
beam={},--Attack beam
attack={},--Attack beam
badge={},--badge thrown
appear=function(t,a)
setFont(t.font)
gc.setColor(1,1,1,a)
@@ -171,17 +180,17 @@ FX={
end,
}
function drawDial(x,y,speed)
local function drawDial(x,y,speed)
gc.setColor(1,1,1)
mStr(int(speed),x,y-18)
gc.draw(dialCircle,x,y,nil,nil,nil,32,32)
gc.setColor(1,1,1,.6)
gc.draw(dialNeedle,x,y,2.094+(speed<=175 and .02094*speed or 4.712-52.36/(speed-125)),nil,nil,5,4)
end
function drawPixel(y,x,id)
local function drawPixel(y,x,id)
gc.draw(blockSkin[id],30*x-30,600-30*y)
end
function drawAtkPointer(x,y)
local function drawAtkPointer(x,y)
local t=sin(Timer()*20)
gc.setColor(.2,.7+t*.2,1,.6+t*.4)
gc.circle("fill",x,y,25,6)
@@ -190,19 +199,18 @@ function drawAtkPointer(x,y)
gc.circle("line",x,y,30*(1+a),6)
end
function VirtualkeyPreview()
local function VirtualkeyPreview()
for i=1,#virtualkey do
local c=sel==i and .8 or 1
gc.setColor(c,c,c,setting.virtualkeyAlpha*.2)
gc.setColor(c,c,c,setting.virtualkeyAlpha*.1)
local b=virtualkey[i]
gc.setLineWidth(b[4]*.07)
gc.circle("line",b[1],b[2],b[4]-5)
if setting.virtualkeyIcon then gc.draw(virtualkeyIcon[i],b[1],b[2],nil,b[4]*.025,nil,18,18)end
end
end
function drawVirtualkey()
local a=setting.virtualkeyAlpha*.2
local P=players[1]
local function drawVirtualkey()
local a=setting.virtualkeyAlpha*.1
for i=1,#virtualkey do
if i~=9 or modeEnv.Fkey then
local p,b=virtualkeyDown[i],virtualkey[i]
@@ -220,66 +228,70 @@ function drawVirtualkey()
end
end
Pnt={BG={}}
function Pnt.BG.none()
local scs={{1,2},nil,nil,nil,nil,{1.5,1.5},{0.5,2.5}}for i=2,5 do scs[i]=scs[1]end
local matrixT={}for i=0,15 do matrixT[i]={}for j=0,8 do matrixT[i][j]=mt.noise(i,j)+2 end end
local Pnt={}
Pnt.BG={
none=function()
gc.clear(.15,.15,.15)
end
function Pnt.BG.grey()
end,
grey=function()
gc.clear(.3,.3,.3)
end
function Pnt.BG.glow()
end,
lightGrey=function()
gc.clear(.5,.5,.5)
end,
glow=function()
local t=((sin(Timer()*.5)+sin(Timer()*.7)+sin(Timer()*.9+1)+sin(Timer()*1.5)+sin(Timer()*2+3))+5)*.05
gc.clear(t,t,t)
end
function Pnt.BG.game1()
end,
game1=function()
gc.setColor(1,1,1)
gc.draw(background1,640,360,Timer()*.15,12,nil,64,64)
end
function Pnt.BG.game2()
end,--Rainbow
game2=function()
gc.setColor(1,.5,.5)
gc.draw(background1,640,360,Timer()*.2,12,nil,64,64)
end
function Pnt.BG.game3()
end,--Red rainbow
game3=function()
gc.setColor(.6,.6,1)
gc.draw(background1,640,360,Timer()*.25,12,nil,64,64)
end
function Pnt.BG.game4()
end,--Blue rainbow
game4=function()
gc.setColor(.1,.5,.5)
local x=Timer()%4*320
gc.draw(background2,x,0,nil,10)
gc.draw(background2,x-1280,0,nil,10)
end
function Pnt.BG.game5()
end,--Fast strap
game5=function()
local t=2.5-Timer()%20%6%2.5
if t<.5 then gc.clear(t,t,t)
else gc.clear(0,0,0)
end
end
local scs={{1,2},nil,nil,nil,nil,{1.5,1.5},{0.5,2.5}}for i=2,5 do scs[i]=scs[1]end
function Pnt.BG.game6()
end,--Lightning
game6=function()
local t=1.2-Timer()%10%3%1.2
if t<.5 then gc.clear(t,t,t)
else gc.clear(0,0,0)
end
gc.setColor(.3,.3,.3)
local r=7-int(Timer()*.5)%7
gc.draw(mouseBlock[r],640,360,Timer()%pi*6,400,400,scs[r][2]-.5,#blocks[r][0]-scs[r][1]+.5)
end
function Pnt.BG.rgb()
gc.draw(mouseBlock[r],640,360,Timer()%3.1416*6,400,400,scs[r][2]-.5,#blocks[r][0]-scs[r][1]+.5)
end,--Fast lightning&spining tetromino
rgb=function()
gc.clear(
sin(Timer()*1.2)*.15+.5,
sin(Timer()*1.5)*.15+.5,
sin(Timer()*1.9)*.15+.5
)
end
function Pnt.BG.strap()
end,
strap=function()
gc.setColor(1,1,1)
local x=Timer()%32*40
gc.draw(background2,x,0,nil,10)
gc.draw(background2,x-1280,0,nil,10)
end
local matrixT={}for i=0,15 do matrixT[i]={}for j=0,8 do matrixT[i][j]=mt.noise(i,j)+2 end end
function Pnt.BG.matrix()
end,
matrix=function()
gc.clear(.15,.15,.15)
for i=0,15 do
for j=0,8 do
@@ -288,7 +300,8 @@ function Pnt.BG.matrix()
gc.rectangle("fill",80*i,80*j,80,80)
end
end
end
end,
}
function Pnt.load()
gc.setLineWidth(4)
@@ -319,12 +332,17 @@ function Pnt.intro()
end
function Pnt.main()
gc.setColor(1,1,1)
gc.draw(titleImage,300,30)
gc.draw(titleImage,280,30,nil,1.3)
setFont(30)
gc.print("Alpha V0.7.19",290,140)
gc.print(system,800,110)
gc.print(gameVersion,290,125)
gc.print(system,845,95)
setFont(35)
mStr(modeLevel[modeID[modeSel]][levelSel],160,180)
mStr(text.modeName[modeSel],160,380)
end
function Pnt.mode()
gc.setColor(1,1,1)
gc.draw(titleImage,810,30)
setFont(40)
gc.setColor(modeLevelColor[modeLevel[modeID[modeSel]][levelSel]]or color.white)
mStr(modeLevel[modeID[modeSel]][levelSel],270,215)
@@ -343,9 +361,25 @@ function Pnt.mode()
end
end
end
function Pnt.music()
gc.setColor(1,1,1,.3+sin(Timer()*5)*.2)
gc.rectangle("fill",45,98+30*sel,250,30)
gc.setColor(.8,.8,.8)
gc.draw(drawableText.musicRoom,20,20)
gc.setColor(1,1,1)
gc.draw(drawableText.musicRoom,22,23)
gc.draw(drawableText.nowPlaying,490,110)
setFont(35)
for i=1,#musicID do
gc.print(musicID[i],50,90+30*i)
end
setFont(50)
gc.setColor(sin(Timer()*.5)*.2+.8,sin(Timer()*.7)*.2+.8,sin(Timer())*.2+.8)
mStr(bgmPlaying or"",630,180)
end
function Pnt.custom()
gc.setColor(1,1,1,.3+sin(Timer()*8)*.2)
gc.rectangle("fill",25,95+40*optSel,465,40)
gc.rectangle("fill",25,95+40*sel,465,40)
gc.setColor(.8,.8,.8)gc.draw(drawableText.custom,20,20)
gc.setColor(1,1,1)gc.draw(drawableText.custom,22,23)
setFont(40)
@@ -354,9 +388,9 @@ function Pnt.custom()
local y=90+40*i
gc.printf(text.customOption[k],30,y,320,"right")
if text.customVal[k]then
gc.print(text.customVal[k][customSel[k]],350,y)
gc.print(text.customVal[k][customSel[i]],350,y)
else
gc.print(customRange[k][customSel[k]],350,y)
gc.print(customRange[k][customSel[i]],350,y)
end
end
end
@@ -392,10 +426,7 @@ function Pnt.draw()
gc.setLineWidth(13)
gc.setColor(blockColor[pen])
gc.rectangle("line",945,605,70,70)
elseif pen==0 then
gc.setColor(.8,.8,.8)
gc.draw(drawableText.x,950,560)
else
elseif pen==-1 then
gc.setLineWidth(5)
gc.setColor(.9,.9,.9)
gc.line(960,620,1000,660)
@@ -414,17 +445,11 @@ function Pnt.play()
gc.push("transform")
gc.origin()
gc.setColor(1,1,1,P.result and max(20-P.endCounter,0)*.05 or 1)
local h=#P.clearing
for j=1,#P.field do
if j==P.clearing[h]and P.falling>-1 then
h=h-1
else
for i=1,10 do
if P.field[j][i]>0 then
gc.draw(blockSkinmini[P.field[j][i]],6*i-6,120-6*j)
end
end
end
local F=P.field
for j=1,#F do
for i=1,10 do if F[j][i]>0 then
gc.draw(blockSkinmini[F[j][i]],6*i-6,120-6*j)
end end
end--Field
if P.alive then
gc.setLineWidth(2)
@@ -443,6 +468,7 @@ function Pnt.play()
end
gc.pop()
gc.setCanvas()
--draw content
end
gc.setColor(1,1,1)
gc.draw(P.canvas,P.x,P.y,nil,P.size*10)
@@ -451,36 +477,43 @@ function Pnt.play()
gc.setColor(1,0,0,min(P.endCounter,25)*.04)
gc.circle("line",P.centerX,P.centerY,(840-20*min(P.endCounter,30))*P.size)
end
--draw Canvas
else
gc.push("transform")
gc.translate(P.x,P.y)gc.scale(P.size)--Position
gc.setColor(0,0,0,.6)gc.rectangle("fill",0,0,600,690)--Background
gc.setLineWidth(7)
gc.setColor(frameColor[P.strength])gc.rectangle("line",0,0,600,690,3)--Big frame
gc.translate(150,70)
gc.translate(150+P.fieldOffX,70+P.fieldOffY)
if P.gameEnv.grid then
gc.setLineWidth(1)
gc.setColor(1,1,1,.2)
for x=1,9 do gc.line(30*x,-10,30*x,600)end
for y=0,19 do gc.line(0,30*y,300,30*y)end
for y=0,19 do
y=30*(y-int(P.fieldBeneath/30))+P.fieldBeneath
gc.line(0,y,300,y)
end
end--Grid lines
gc.translate(0,P.fieldBeneath)
gc.setScissor(scr.x+P.absFieldX*scr.k,scr.y+P.absFieldY*scr.k,300*P.size*scr.k,610*P.size*scr.k)
local h=#P.clearing
local dy,stepY=0,setting.smo and(P.falling/(P.gameEnv.fall+1))^2.5*30 or 30
local h=1
for j=int(P.fieldBeneath/30+1),#P.field do
if j==P.clearing[h]and P.falling>-1 then
h=h-1
while j==P.clearing[h]and P.falling>-1 do
h=h+1
dy=dy+stepY
gc.translate(0,-stepY)
gc.setColor(1,1,1,P.falling/P.gameEnv.fall)
gc.rectangle("fill",0,600-30*j,320,30)
else
for i=1,10 do
if P.field[j][i]>0 then
gc.setColor(1,1,1,min(P.visTime[j][i]*.05,1))
drawPixel(j,i,P.field[j][i])
end
gc.rectangle("fill",0,630-30*j,320,stepY)
end
for i=1,10 do
if P.field[j][i]>0 then
gc.setColor(1,1,1,min(P.visTime[j][i]*.05,1))
drawPixel(j,i,P.field[j][i])
end
end
end--Field
gc.translate(0,dy)
for i=1,#P.shade do
local S=P.shade[i]
gc.setColor(1,1,1,S[1]*.12)
@@ -499,8 +532,28 @@ function Pnt.play()
end
end end
end--Ghost
-- local dy=setting.smo and(P.y_img~=P.curY and or 1)^4*30 or 0
local dy
if setting.smo then
if P.y_img~=P.curY then
dy=(min(P.dropDelay,1e99)/P.gameEnv.drop-1)*30
else
dy=0
end
--[[
if P.y_img~=P.curY then
dy=(min(P.dropDelay,8e98)/P.gameEnv.drop)^4*30
else
dy=(min(P.lockDelay,8e98)/P.gameEnv.lock)^(P.gameEnv._20G and 3 or 7)*30
end
]]
else
dy=0
end
gc.translate(0,-dy)
local trans=P.lockDelay/P.gameEnv.lock
if P.gameEnv.block then
gc.setColor(1,1,1,P.lockDelay/P.gameEnv.lock)
gc.setColor(1,1,1,trans)
for i=1,P.r do for j=1,P.c do
if P.cur.bk[i][j]then
gc.rectangle("fill",30*(j+P.curX-1)-33,597-30*(i+P.curY-1),36,36)
@@ -514,97 +567,105 @@ function Pnt.play()
end end--Block
end
if P.gameEnv.center then
gc.setColor(1,1,1)
gc.setColor(1,1,1,trans)
local x=30*(P.curX+P.sc[2]-1)-30+15
gc.draw(spinCenter,x,600-30*(P.curY+P.sc[1]-1)+15,nil,nil,nil,4,4)
gc.translate(0,dy)
gc.setColor(1,1,1,.5)
gc.draw(spinCenter,x,600-30*(P.y_img+P.sc[1]-1)+15,nil,nil,nil,4,4)
goto E
end--Rotate center
gc.translate(0,dy)
end
--Draw game field
gc.setScissor()--In-playField mask
gc.translate(0,-P.fieldBeneath)
::E::
gc.setScissor()--In-playField things
gc.setColor(1,1,1)
gc.draw(PTC.dust[p])
gc.setLineWidth(3)
gc.rectangle("line",-1,-11,302,612)--Draw boarder
gc.setLineWidth(2)
gc.rectangle("line",301,0,16,601.5)--Draw atkBuffer boarder
local h=0
for i=1,#P.atkBuffer do
local a=P.atkBuffer[i]
local bar=a.amount*30
if h+bar>600 then bar=600-h end
if not a.sent then
if a.time<20 then
bar=bar*(20*a.time)^.5*.05
--Appear
end
if a.countdown>0 then
gc.setColor(attackColor[a.lv][1])
gc.rectangle("fill",304,599-h,11,-bar+3)
gc.setColor(attackColor[a.lv][2])
gc.rectangle("fill",304,599-h+(-bar+3),11,-(-bar+3)*(1-a.countdown/a.cd0))
--Timing
gc.translate(0,-P.fieldBeneath)
gc.setBlendMode("replace","alphamultiply")--SPEED UPUP(?)
gc.setLineWidth(2)
gc.rectangle("line",-1,-11,302,612)--Draw boarder
gc.rectangle("line",301,0,15,601)--Draw atkBuffer boarder
local h=0
for i=1,#P.atkBuffer do
local A=P.atkBuffer[i]
local bar=A.amount*30
if h+bar>600 then bar=600-h end
if not A.sent then
if A.time<20 then
bar=bar*(20*A.time)^.5*.05
--Appear
end
if A.countdown>0 then
gc.setColor(attackColor[A.lv][1])
gc.rectangle("fill",303,599-h,11,-bar+3)
gc.setColor(attackColor[A.lv][2])
gc.rectangle("fill",303,599-h+(-bar+3),11,-(-bar+3)*(1-A.countdown/A.cd0))
--Timing
else
local t=sin((Timer()-i)*30)*.5+.5
local c1,c2=attackColor[A.lv][1],attackColor[A.lv][2]
gc.setColor(c1[1]*t+c2[1]*(1-t),c1[2]*t+c2[2]*(1-t),c1[3]*t+c2[3]*(1-t))
gc.rectangle("fill",303,599-h,11,-bar+3)
--Warning
end
else
local t=sin((Timer()-i)*30)*.5+.5
local c1,c2=attackColor[a.lv][1],attackColor[a.lv][2]
gc.setColor(c1[1]*t+c2[1]*(1-t),c1[2]*t+c2[2]*(1-t),c1[3]*t+c2[3]*(1-t))
gc.rectangle("fill",304,599-h,11,-bar+3)
--Warning
gc.setColor(attackColor[A.lv][1])
bar=bar*(20-A.time)*.05
gc.rectangle("fill",303,599-h,11,-bar+2)
--Disappear
end
else
gc.setColor(attackColor[a.lv][1])
bar=bar*(20-a.time)*.05
gc.rectangle("fill",304,599-h,11,-bar+2)
--Disappear
h=h+bar
end--Buffer line
local a,b=P.b2b,P.b2b1 if a>b then a,b=b,a end
gc.setColor(.8,1,.2)
gc.rectangle("fill",-14,599,11,-b*.5)
gc.setColor(P.b2b<40 and color.white or P.b2b<=1e3 and color.lightRed or color.lightBlue)
gc.rectangle("fill",-14,599,11,-a*.5)
if Timer()%1<.5 then
gc.rectangle("fill",-15,b<40 and 578.5 or 98.5,13,3)
end
h=h+bar
end--Buffer line
local a,b=P.b2b,P.b2b1 if a>b then a,b=b,a end
gc.setColor(.8,1,.2)
gc.rectangle("fill",-15,599.5,11,-b*.5)
gc.setColor(P.b2b<40 and color.white or P.b2b<=1e3 and color.lightRed or color.lightBlue)
gc.rectangle("fill",-15,599.5,11,-a*.5)
gc.setColor(1,1,1,.5+sin(Timer()*30)*.5)
gc.rectangle("fill",-16,b<40 and 578.5 or 98.5,13,3)
gc.setColor(1,1,1)
gc.rectangle("line",-17,-3,16,604.5)--Draw b2b bar boarder
--B2B indictator
gc.setColor(1,1,1)
gc.rectangle("line",-16,-3,15,604)--Draw b2b bar boarder
--B2B indictator
gc.translate(-P.fieldOffX,-P.fieldOffY)
gc.setBlendMode("alpha")
if P.gameEnv.hold then
gc.setColor(1,1,1)
mDraw(drawableText.hold,-82,-10)
if P.holded then gc.setColor(.6,.6,.6)end
for i=1,#P.hold.bk do
for j=1,#P.hold.bk[1] do
if P.hold.bk[i][j]then
drawPixel(i+17.5-#P.hold.bk*.5,j-2.7-#P.hold.bk[1]*.5,P.holded and 9 or P.hold.color)
local B=P.hold.bk
for j=1,#B[1]do
if B[i][j]then
drawPixel(i+17.5-#B*.5,j-2.7-#B[1]*.5,P.hold.color)
end
end
end
end--Hold
gc.setColor(1,1,1)
mDraw(drawableText.next,381,-10)
local N=1
::L::
if N<=P.gameEnv.next and P.next[N]then
local b,c=P.next[N].bk,P.next[N].color
gc.setColor(1,1,1)
for i=1,#b do for j=1,#b[1] do
if b[i][j]then
drawPixel(i+20-2.4*N-#b*.5,j+12.7-#b[1]*.5,c)
end
end end
N=N+1
if N<=P.gameEnv.next and P.next[N]then goto L end
goto L
end
--Next
gc.setColor(.8,.8,.8)
gc.draw(drawableText.modeName,-135,-65)
gc.draw(drawableText.levelName,437-drawableText.levelName:getWidth(),-65)
gc.setColor(1,1,1)
if frame<180 then
local count=179-frame
gc.push("transform")
gc.translate(155,220)
gc.setColor(1,1,1)
setFont(100)
if count%60>45 then gc.scale(1+(count%60-45)^2*.01,1)end
mStr(int(count/60+1),0,0)
@@ -613,19 +674,18 @@ function Pnt.play()
for i=1,#P.bonus do
P.bonus[i]:draw(min((30-abs(P.bonus[i].t-30))*.05,1)*(not P.bonus[i].inf and #P.field>(9-P.bonus[i].dy*.0333)and .7 or 1))
end--Effects
gc.setColor(1,1,1)
setFont(35)
mStr(format("%.2f",P.stat.time),-82,520)--Draw time
if mesDisp[curMode.id]then mesDisp[curMode.id]()end--Draw other message
setFont(30)
gc.setColor(1,1,1)
mStr(format("%.2f",P.stat.time),-82,518)--Time
mStr(P.score1,-82,560)--Score
gc.draw(drawableText.bpm,390,490)
gc.draw(drawableText.kpm,350,583)
setFont(30)
drawDial(360,520,P.dropSpeed)
drawDial(405,575,P.keySpeed)
--Speed dials
gc.setColor(1,1,1)
if mesDisp[curMode.id]then mesDisp[curMode.id]()end--Other messages
if modeEnv.royaleMode then
if P.atkMode then
gc.setColor(1,.8,0,P.swappingAtkMode*.02)
@@ -637,17 +697,42 @@ function Pnt.play()
gc.pop()
end
end--Draw players
gc.setLineWidth(5)
for i=1,#FX.attack do
local A=FX.attack[i]
gc.push("transform")
local a=A.a
if A.t<20 then
gc.translate(A.x1,A.y1)
a=a*A.t*.05
elseif A.t<80 then
local t=((A.t-20)*.016667)t=(3-2*t)*t*t
gc.translate(A.x1*(1-t)+A.x2*t,A.y1*(1-t)+A.y2*t)
else
gc.translate(A.x2,A.y2)
a=a*(5-A.t*.05)
end
gc.rotate(A.t*.1)
gc.setColor(A.r,A.g,A.b,a*.5)
gc.circle("line",0,0,A.rad,A.corner)
gc.setColor(A.r,A.g,A.b,a)
gc.circle("fill",0,0,A.rad,A.corner)
gc.pop()
end
gc.setColor(1,1,1)
gc.draw(PTC.attack[1])
gc.draw(PTC.attack[2])
gc.draw(PTC.attack[3])
if setting.virtualkeySwitch then drawVirtualkey()end
if modeEnv.royaleMode then
for i=1,#FX.badge do
local b=FX.badge[i]
local t=b.t<10 and 0 or b.t<50 and .5+sin(1.5*(b.t/20-1.5))*.5 or 1
gc.setColor(1,1,1,b.t<10 and b.t*.1 or b.t<50 and 1 or(60-b.t)*.1)
gc.draw(badgeIcon,b[1]+(b[3]-b[1])*t,b[2]+(b[4]-b[2])*t,nil,nil,nil,14,14)
if b.t<10 then
gc.draw(badgeIcon,b[1]-14,b[2]-14)
elseif b.t<50 then
local t=((b.t-10)*.025)t=(3-2*t)*t*t
gc.draw(badgeIcon,b[1]*(1-t)+b[3]*t-14,b[2]*(1-t)+b[4]*t-14)
else
gc.draw(badgeIcon,b[3]-14,b[4]-14)
end
end
P=players[1]
gc.setLineWidth(5)
@@ -666,6 +751,8 @@ function Pnt.play()
end
end
if restartCount>0 then
gc.setColor(1,.7,.7,.5+restartCount*.02)
gc.arc("fill",640,360,735,-1.5708,restartCount*0.3696-1.5708)
gc.setColor(0,0,0,restartCount/17)
gc.rectangle("fill",0,0,1280,720)
end
@@ -689,19 +776,19 @@ function Pnt.pause()
end
setFont(40)
if system~="Android"then
mStr(text.space.."/"..text.enter,640,300)
gc.print("ESC",610,598)
mStr(text.space.."/"..text.enter,640,335)
gc.print("ESC",610,509)
end
mDraw(gamefinished and drawableText.finish or drawableText.pause,640,140-12*(5-pauseTimer*.1)^2)
mDraw(gamefinished and drawableText.finish or drawableText.pause,640,60-10*(5-pauseTimer*.1)^1.5)
end
function Pnt.setting()
gc.setColor(1,1,1)
setFont(35)
mStr("DAS:"..setting.das,290,278)
mStr("ARR:"..setting.arr,506,278)
setFont(18)
mStr(text.softdropdas..setting.sddas,290,361)
mStr(text.softdroparr..setting.sdarr,506,361)
setFont(21)
mStr(text.softdropdas..setting.sddas,290,357)
mStr(text.softdroparr..setting.sdarr,506,357)
gc.draw(blockSkin[7-int(Timer()*2)%7],820,480,nil,2)
end
function Pnt.setting2()
@@ -759,7 +846,7 @@ function Pnt.help()
for i=1,11 do
gc.printf(text.help[i],140,15+43*i,1000,"center")
end
gc.draw(titleImage,180,600,.2,.7+.05*sin(Timer()*2),nil,140,100)
gc.draw(titleImage,250,600,.2,1+.05*sin(Timer()*2),nil,212,35)
gc.setLineWidth(5)
gc.rectangle("line",17,17,260,260)
gc.rectangle("line",1077,17,186,186)
@@ -778,5 +865,15 @@ function Pnt.stat()
gc.print(text.stat[i],400,30*i-5)
gc.print(statOpt(i),720,30*i-5)
end
gc.draw(titleImage,260,570,.2+.07*sin(Timer()*3),.8,nil,250,60)
end
gc.draw(titleImage,260,600,.2+.07*sin(Timer()*3),nil,nil,212,35)
end
function Pnt.history()
gc.setColor(.2,.2,.2,.7)
gc.rectangle("fill",150,35,980,530)
gc.setColor(1,1,1)
gc.setLineWidth(4)
gc.rectangle("line",150,35,980,530)
setFont(25)
gc.print(updateLog[sel],160,40)
end
return Pnt

View File

@@ -44,34 +44,14 @@ PTC.dust0:setColors(1,1,1,.5,1,1,1,0)
c:release()
--Dust particles
PTC.attack={}
PTC.attack[1]=gc.newParticleSystem(N("/image/mess/atk1.png"),200)
PTC.attack[1]:setParticleLifetime(.25)
PTC.attack[1]:setEmissionRate(0)
PTC.attack[1]:setSpin(10)
PTC.attack[1]:setColors(1,1,1,.7,1,1,1,0)
PTC.attack[2]=gc.newParticleSystem(N("/image/mess/atk2.png"),200)
PTC.attack[2]:setParticleLifetime(.3)
PTC.attack[2]:setEmissionRate(0)
PTC.attack[2]:setSpin(8)
PTC.attack[2]:setColors(1,1,1,.7,1,1,1,0)
PTC.attack[3]=gc.newParticleSystem(N("/image/mess/atk3.png"),200)
PTC.attack[3]:setParticleLifetime(.4)
PTC.attack[3]:setEmissionRate(0)
PTC.attack[3]:setSpin(6)
PTC.attack[3]:setColors(1,1,1,.7,1,1,1,0)
--Attack particles
gc.setDefaultFilter("linear","linear")
titleImage=N("/image/mess/title.png")
dialCircle=N("/image/mess/dialCircle.png")
dialNeedle=N("/image/mess/dialNeedle.png")
badgeIcon=N("/image/mess/badge.png")
spinCenter=N("/image/mess/spinCenter.png")
lightBulb=N("/image/mess/lightBulb.png")
light=N("/image/mess/light.png")
batteryImage=N("/image/mess/power.png")
chargeImage=N("/image/mess/charge.png")
background1=N("/image/BG/bg1.jpg")
background2=N("/image/BG/bg2.png")
@@ -79,16 +59,15 @@ groupCode=N("/image/mess/groupcode.png")
payCode=N("/image/mess/paycode.png")
drawableText={
question=T(100,"?"),
x=T(110,"×"),
bpm=T(15,"BPM"),
kpm=T(15,"KPM"),
bpm=T(15,"BPM"),kpm=T(15,"KPM"),
modeName=T(30),levelName=T(30),
next=T(40),hold=T(40),
pause=T(120),
finish=T(120),
pause=T(120),finish=T(120),
custom=T(80),
keyboard=T(25),joystick=T(25),
setting2Help=T(25),
musicRoom=T(80),
nowPlaying=T(50),
}
c=gc.setCanvas()

197
timer.lua
View File

@@ -1,8 +1,12 @@
local wd=love.window
local Timer=love.timer.getTime
local int,abs,rnd,max,min,sin=math.floor,math.abs,math.random,math.max,math.min,math.sin
local ins,rem=table.insert,table.remove
Tmr={}
function Tmr.load()
return{
load=function()
local t=Timer()
::R::
if loading==1 then
if loadnum<=#voiceList then
local N=voiceList[loadnum]
@@ -45,26 +49,24 @@ function Tmr.load()
gotoScene("intro","none")
end
end
end
function Tmr.intro()
end,
intro=function()
count=count+1
if count==200 then count=80 end
end
function Tmr.draw()
end,
draw=function()
if clearSureTime>0 then clearSureTime=clearSureTime-1 end
end
function Tmr.play(dt)
end,
play=function(dt)
frame=frame+1
stat.time=stat.time+dt
for i=#FX.beam,1,-1 do
local b=FX.beam[i]
for i=#FX.attack,1,-1 do
local b=FX.attack[i]
b.t=b.t+1
local t0=b.t*.025--t in [0,1]
local t=(sin(1.5*(2*t0-1))+1)*.5
PTC.attack[b.lv]:setPosition(b[1]+(b[3]-b[1])*t,b[2]+(b[4]-b[2])*t)
PTC.attack[b.lv]:emit(1)
if t0==1 then
rem(FX.beam,i)
rem(FX.attack,i)
end
end
for i=#FX.badge,1,-1 do
@@ -79,19 +81,33 @@ function Tmr.play(dt)
virtualkeyPressTime[i]=virtualkeyPressTime[i]-1
end
end
PTC.attack[1]:update(dt)
PTC.attack[2]:update(dt)
PTC.attack[3]:update(dt)
local E=#FX.attack
for i=E,1,-1 do
local A=FX.attack[i]
A.t=A.t+1
if A.t>=100 then
for j=i,E do
FX.attack[j]=FX.attack[j+1]
end--remove [i]
elseif A.t>80 then
A.rad=A.rad*1.08+.2
end
end
if frame<180 then
if frame==179 then
gameStart()
elseif frame%60==0 then
elseif frame==60 or frame==120 then
SFX("ready")
end
for p=1,#players do
P=players[p]
if P.keyPressing[1]or P.keyPressing[2]then
P.moving=P.moving+(P.moving>0 and 1 or -1)
if P.keyPressing[1]then
if P.moving>0 then P.moving=0 end
P.moving=P.moving-1
elseif P.keyPressing[2]then
if P.moving<0 then P.moving=0 end
P.moving=P.moving+1
else
P.moving=0
end
@@ -104,6 +120,7 @@ function Tmr.play(dt)
clearTask("play")
updateStat()
resetGameData()
return
end
elseif restartCount>0 then
restartCount=max(restartCount-2,0)
@@ -127,23 +144,15 @@ function Tmr.play(dt)
end
end
if P.ai and P.waiting==-1 then
P.ai.controlDelay=P.ai.controlDelay-1
if P.ai.controlDelay==0 then
if #P.ai.controls>0 then
pressKey(P.ai.controls[1],P)
releaseKey(P.ai.controls[1],P)
rem(P.ai.controls,1)
P.ai.controlDelay=P.ai.controlDelay0+1
else
AI_getControls(P.ai.controls)
P.ai.controlDelay=P.ai.controlDelay0+2
if Timer()-P.modeData.point>P.modeData.event then
P.modeData.point=Timer()
P.modeData.event=P.ai.controlDelay0+rnd(2,10)
changeAtkMode(rnd()<.85 and 1 or #P.atker>3 and 4 or rnd()<.35 and 2 or 3)
end
end
if not P.human and P.control and P.waiting==-1 then
local C=P.AI_keys
P.AI_delay=P.AI_delay-1
if not C[1]then
P.AI_stage=AI_think[P.AI_mode][P.AI_stage](C)
elseif P.AI_delay<=0 then
pressKey(C[1],P)releaseKey(C[1],P)
local k=#C for i=1,k do C[i]=C[i+1]end--table.remove(C,1)
P.AI_delay=P.AI_delay0*2
end
end
if not P.keepVisible then
@@ -151,21 +160,38 @@ function Tmr.play(dt)
if P.visTime[j][i]>0 then P.visTime[j][i]=P.visTime[j][i]-1 end
end end
end--Fresh visible time
if P.keyPressing[1]or P.keyPressing[2]then
P.moving=P.moving+(P.moving>0 and 1 or -1)
local d=abs(P.moving)-P.gameEnv.das
if d>1 then
if P.gameEnv.arr>0 then
if d%P.gameEnv.arr==0 then
act[P.moving>0 and"moveRight"or"moveLeft"](true)
if P.moving<0 then
if P.keyPressing[1]then
if -P.moving<=P.gameEnv.das then
P.moving=P.moving-1
elseif P.waiting==-1 then
local x=P.curX
if P.gameEnv.arr>0 then
act.moveLeft(true)
else
act.insLeft()
end
else
act[P.moving>0 and"insRight"or"insLeft"]()
if x~=P.curX then P.moving=P.moving+P.gameEnv.arr-1 end
end
else
P.moving=0
end
elseif P.moving>0 then
if P.keyPressing[2]then
if P.moving<=P.gameEnv.das then
P.moving=P.moving+1
elseif P.waiting==-1 then
local x=P.curX
if P.gameEnv.arr>0 then
act.moveRight(true)
else
act.insRight()
end
if x~=P.curX then P.moving=P.moving-P.gameEnv.arr+1 end
end
else
P.moving=0
end
else
P.moving=0
end
if P.keyPressing[7]and not P.keyPressing[9]then
local d=abs(P.downing)-P.gameEnv.sddas
@@ -184,16 +210,17 @@ function Tmr.play(dt)
end
if P.falling>=0 then
P.falling=P.falling-1
if P.falling>=0 then goto stop end
if P.human and P.gameEnv.fall>0 and #P.field>P.clearing[1]then SFX("fall")end
for i=1,#P.clearing do
removeRow(P.field,P.clearing[i])
removeRow(P.visTime,P.clearing[i])
if P.falling>=0 then
goto stop
else
local L=#P.clearing
if P.human and P.gameEnv.fall>0 and #P.field+L>P.clearing[L]then SFX("fall")end
for i=1,L do
P.clearing[i]=nil
end
end
::L::
rem(P.clearing)
if P.clearing[1]then goto L end
end
if not P.control then goto stop end
if P.waiting>=0 then
P.waiting=P.waiting-1
if P.waiting==-1 then resetblock()end
@@ -202,10 +229,18 @@ function Tmr.play(dt)
if P.curY~=P.y_img then
if P.dropDelay>=0 then
P.dropDelay=P.dropDelay-1
if P.dropDelay>=0 then goto stop end
if P.dropDelay>0 then goto stop end
end
P.curY=P.curY-1
P.spinLast=false
if P.y_img~=P.curY then
P.dropDelay=P.gameEnv.drop
elseif P.AI_mode=="CC"then
P.AI_needFresh=true
if not P.AIdata._20G and P.gameEnv.drop<P.AI_delay0*.5 then
CC_switch20G(P)
end
end
drop()
P.dropDelay=P.gameEnv.drop
if P.freshTime<=P.gameEnv.freshLimit then
P.lockDelay=P.gameEnv.lock
end
@@ -213,6 +248,9 @@ function Tmr.play(dt)
P.lockDelay=P.lockDelay-1
if P.lockDelay>=0 then goto stop end
drop()
if P.AI_mode=="CC"then
P.AI_needFresh=true
end
end
::stop::
if P.b2b1==P.b2b then
@@ -233,15 +271,15 @@ function Tmr.play(dt)
end
if P.falling>=0 then
P.falling=P.falling-1
if P.falling>=0 then goto stop end
if P.human and P.gameEnv.fall>0 and #P.field>P.clearing[1]then SFX("fall")end
for i=1,#P.clearing do
removeRow(P.field,P.clearing[i])
removeRow(P.visTime,P.clearing[i])
if P.falling>=0 then
goto stop
else
local L=#P.clearing
if P.human and P.gameEnv.fall>0 and #P.field+L>P.clearing[L]then SFX("fall")end
for i=1,L do
P.clearing[i]=nil
end
end
::L::
rem(P.clearing)
if P.clearing[1]then goto L end
end::stop::
if P.endCounter<40 then
for j=1,#P.field do for i=1,10 do
@@ -251,13 +289,26 @@ function Tmr.play(dt)
if P.b2b1>0 then P.b2b1=max(0,P.b2b1*.92-1)end
--Dead
end
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
for i=#P.shade,1,-1 do
local S=P.shade[i]
S[1]=S[1]-1
if S[1]==0 then
S[1]=S[1]-1+setting.fxs*.25
if S[1]<=0 then
rem(P.shade,i)
end
end
if P.fieldOffY>0 then
P.fieldOffY=P.fieldOffY-(P.fieldOffY>3 and 2 or 1)
end
if P.fieldOffX~=0 then
P.fieldOffX=P.fieldOffX-(P.fieldOffX>0 and 1 or -1)
end
for i=#P.bonus,1,-1 do
local b=P.bonus[i]
if b.inf then
@@ -269,6 +320,7 @@ function Tmr.play(dt)
if b.t>=60 then rem(P.bonus,i)end
end
end
for i=#P.atkBuffer,1,-1 do
local atk=P.atkBuffer[i]
atk.time=atk.time+1
@@ -288,12 +340,13 @@ function Tmr.play(dt)
end
end
if modeEnv.royaleMode and frame%120==0 then freshMostDangerous()end
end
function Tmr.pause(dt)
end,
pause=function(dt)
if not gamefinished then
pauseTime=pauseTime+dt
end
if pauseTimer<50 and not wd.isMinimized()then
pauseTimer=pauseTimer+1
end
end
end,
}

View File

@@ -2,15 +2,20 @@ local tm=love.timer
local gc=love.graphics
local kb=love.keyboard
local setFont=setFont
local int,abs,rnd,max,min=math.floor,math.abs,math.random,math.max,math.min
local sub,find=string.sub,string.find
local ins,rem=table.insert,table.remove
local toN,toS=tonumber,tostring
local concat=table.concat
local function splitS(s,sep)
local t={}
::L::
local i=find(s,sep)or #s+1
ins(t,sub(s,1,i-1))
s=sub(s,i+#sep)
if #s~=0 then goto L end
local t,n={},1
repeat
local p=find(s,sep)or #s+1
t[n]=sub(s,1,p-1)
n=n+1
s=sub(s,p+#sep)
until #s==0
return t
end
function mStr(s,x,y)
@@ -20,24 +25,42 @@ function mDraw(s,x,y)
gc.draw(s,x-s:getWidth()*.5,y)
end
function destroyPlayers()
if players then
for _,P in next,players do if P.id then
while P.field[1]do
removeRow(P.field)
removeRow(P.visTime)
end
if P.AI_mode=="CC"then
BOT.free(P.bot_opt)
BOT.free(P.bot_wei)
BOT.destroy(P.AI_bot)
P.AI_mode=nil
end
end end
end
end
function getNewRow(val)
local t=rem(freeRow)
for i=1,10 do
t[i]=val
end
--clear a row and move to active list
if #freeRow==0 then
freeRow.L=freeRow.L-1
--get a row from buffer
if not freeRow[1]then
for i=1,10 do
ins(freeRow,{0,0,0,0,0,0,0,0,0,0})
freeRow[i]={0,0,0,0,0,0,0,0,0,0}
end
freeRow.L=freeRow.L+10
end
--prepare new rows
return t
end
function removeRow(t,k)
ins(freeRow,rem(t,k))
freeRow[#freeRow+1]=rem(t,k)
freeRow.L=freeRow.L+1
end
--Single-usage funcs
langName={"中文","全中文","English"}
local langID={"chi","chi_full","eng"}
@@ -50,14 +73,18 @@ local drawableTextLoad={
"keyboard",
"joystick",
"setting2Help",
"musicRoom",
"nowPlaying",
}
function swapLanguage(l)
text=require("language/"..langID[l])
Buttons.sel=nil
for S,L in next,Buttons do
for N,B in next,L do
B.alpha=0
B.t=text.ButtonText[S][N]
Widget.sel=nil
for S,L in next,Widget do
for N,W in next,L do
if W.type=="button"then
W.alpha=0
W.text=text.ButtonText[S][N]
end
end
end
gc.push("transform")
@@ -92,7 +119,7 @@ function changeBlockSkin(n)
gc.setCanvas()
end
local vibrateLevel={0,.02,.03,.04,.05,.06,.07,.08}
local vibrateLevel={0,.015,.02,.03,.04,.05,.06,.07,.08,.09}
function VIB(t)
if setting.vib>0 then
love.system.vibrate(vibrateLevel[setting.vib+t])
@@ -116,25 +143,32 @@ function SFX(s,v)
end
function VOICE(s,n)
if setting.voc then
ins(voicePlaying,voice[s][n or rnd(#voice[s])])
voicePlaying[#voicePlaying+1]=voice[s][n or rnd(#voice[s])]
if #voicePlaying==1 then
voicePlaying[1]:play()
end
end
end
function BGM(s)
if setting.bgm and bgmPlaying~=s then
if bgmPlaying then newTask(Event_task.bgmFadeOut,nil,bgmPlaying)end
for i=1,#Task do
if Task[i].code==Event_task.bgmFadeIn then
Task[i].code=Event_task.bgmFadeOut
if setting.bgm then
if bgmPlaying~=s then
if bgmPlaying then newTask(Event_task.bgmFadeOut,nil,bgmPlaying)end
for i=#Task,1,-1 do
local T=Task[i]
if T.code==Event_task.bgmFadeIn then
T.code=Event_task.bgmFadeOut
elseif T.code==Event_task.bgmFadeOut and T.data==s then
rem(Task,i)
end
end
if s then
newTask(Event_task.bgmFadeIn,nil,s)
bgm[s]:play()
end
bgmPlaying=s
else
if bgmPlaying then bgm[bgmPlaying]:play()end
end
if s then
newTask(Event_task.bgmFadeIn,nil,s)
bgm[s]:play()
end
bgmPlaying=s
end
end
@@ -187,7 +221,7 @@ function gotoScene(s,style)
time=swap[style][1],mid=swap[style][2],
draw=swap[style].d
}
Buttons.sel=nil
Widget.sel=nil
if style~="none"then
SFX("swipe")
end
@@ -202,27 +236,28 @@ local prevMenu={
load=love.event.quit,
intro="quit",
main="intro",
music="main",
mode="main",
custom="mode",
draw=function()
kb.setKeyRepeat(false)
gotoScene("custom")
end,
ready="mode",
play=function()
kb.setKeyRepeat(true)
updateStat()
clearTask("play")
gotoScene(curMode.id~="custom"and"mode"or"custom","deck")
end,
pause=null,
help="main",
stat="main",
pause=nil,
setting=function()
saveSetting()
gotoScene("main")
end,
setting2="setting",
setting3="setting",
help="main",
history="help",
stat="main",
}prevMenu.pause=prevMenu.play
function back()
local t=prevMenu[scene]
@@ -236,7 +271,6 @@ function pauseGame()
pauseTimer=0--Pause timer for animation
if not gamefinished then
pauseCount=pauseCount+1
if bgmPlaying then bgm[bgmPlaying]:pause()end
end
for i=1,#players.alive do
local l=players.alive[i].keyPressing
@@ -249,7 +283,6 @@ function pauseGame()
gotoScene("pause","none")
end
function resumeGame()
if bgmPlaying then bgm[bgmPlaying]:play()end
gotoScene("play","fade")
end
local dataOpt={
@@ -258,51 +291,54 @@ local dataOpt={
"atk","send","recv","pend",
"clear_1","clear_2","clear_3","clear_4",
"spin_0","spin_1","spin_2","spin_3",
"b2b","b3b","pc",
"b2b","b3b","pc","score",
}
function loadData()
userData:open("r")
--local t=splitS(love.math.decompress(userdata,"zlib"),"\r\n")
local t=splitS(userData:read(),"\r\n")
local t=userData:read()
if not find(t,"spin")then
t=love.data.decompress("string","zlib",t)
end
t=splitS(t,"\r\n")
userData:close()
for i=1,#t do
local i=t[i]
if find(i,"=")then
local t=sub(i,1,find(i,"=")-1)
local v=sub(i,find(i,"=")+1)
local p=find(t[i],"=")
if p then
local t,v=sub(t[i],1,p-1),sub(t[i],p+1)
if t=="gametime"then t="time"end
for i=1,#dataOpt do
if t==dataOpt[i]then goto L end
if t==dataOpt[i]then
v=toN(v)if not v or v<0 then v=0 end
stat[t]=v
break
end
end
goto E
::L::
v=toN(v)if not v or v<0 then v=0 end
stat[t]=v
::E::
end
end
end
function saveData()
local t={}
for i=1,#dataOpt do
ins(t,dataOpt[i].."="..toS(stat[dataOpt[i]]))
t[i]=dataOpt[i].."="..toS(stat[dataOpt[i]])
end
t=concat(t,"\r\n")
--t=love.math.compress(t,"zlib"):getString()
t=love.data.compress("string","zlib",t)
userData:open("w")
userData:write(t)
userData:close()
end
function loadSetting()
userSetting:open("r")
--local t=splitS(love.math.decompress(userdata,"zlib"),"\r\n")
local t=splitS(userSetting:read(),"\r\n")
local t=userSetting:read()
if not find(t,"virtual")then
t=love.data.decompress("string","zlib",t)
end
t=splitS(t,"\r\n")
userSetting:close()
for i=1,#t do
local i=t[i]
if find(i,"=")then
local t=sub(i,1,find(i,"=")-1)
local v=sub(i,find(i,"=")+1)
local p=find(t[i],"=")
if p then
local t,v=sub(t[i],1,p-1),sub(t[i],p+1)
if t=="sfx"or t=="bgm"or t=="bgblock"or t=="voc"then
setting[t]=v=="true"
elseif t=="vib"then
@@ -321,15 +357,15 @@ function loadSetting()
elseif t=="virtualkey"then
v=splitS(v,"/")
for i=1,10 do
if not v[i]then goto c end
virtualkey[i]=splitS(v[i],",")
for j=1,4 do
virtualkey[i][j]=toN(virtualkey[i][j])
if v[i]then
virtualkey[i]=splitS(v[i],",")
for j=1,4 do
virtualkey[i][j]=toN(virtualkey[i][j])
end
end
::c::
end
elseif t=="virtualkeyAlpha"then
setting.virtualkeyAlpha=int(abs(toN(v)))
setting.virtualkeyAlpha=min(int(abs(toN(v))),10)
elseif t=="virtualkeyIcon"or t=="virtualkeySwitch"then
setting[t]=v=="true"
elseif t=="frameMul"then
@@ -337,8 +373,10 @@ function loadSetting()
elseif t=="das"or t=="arr"or t=="sddas"or t=="sdarr"then
v=toN(v)if not v or v<0 then v=0 end
setting[t]=int(v)
elseif t=="ghost"or t=="center"or t=="grid"or t=="swap"or t=="fxs"or t=="bg"then
elseif t=="ghost"or t=="center"or t=="grid"or t=="swap"or t=="bg"or t=="smo"then
setting[t]=v=="true"
elseif t=="fxs"then
setting[t]=toN(v:match("[0123]"))or 0
elseif t=="lang"then
setting[t]=toN(v:match("[123]"))or 1
elseif t=="skin"then
@@ -359,7 +397,7 @@ local saveOpt={
"vib","voc",
"fullscreen",
"bgblock",
"skin",
"skin","smo",
"virtualkeyAlpha",
"virtualkeyIcon",
"virtualkeySwitch",
@@ -382,10 +420,11 @@ function saveSetting()
"virtualkey="..toS(concat(vk,"/")),
}
for i=1,#saveOpt do
ins(t,saveOpt[i].."="..toS(setting[saveOpt[i]]))
t[i+2]=saveOpt[i].."="..toS(setting[saveOpt[i]])
--not always i+2!
end
t=concat(t,"\r\n")
--t=love.math.compress(t,"zlib"):getString()
t=love.data.compress("string","zlib",t)
userSetting:open("w")
userSetting:write(t)
userSetting:close()

209
updateLog.lua Normal file
View File

@@ -0,0 +1,209 @@
return{
[=[Future outlook:
Brand New GUI:
custom restart method
custom block color/direction
custom sequence
virtual key switch(all keys)
Normal Things:
demo play at main menu
any screen size
CC smarter(think of gaebage buffer)
fineese/bigbang mode & easier CTWC
new AI:task-Z
game recording
TTT mode
Hard Things:
Encrypt source code(JIT to byte code)
infinite 1v1
square mode
more FXs & 3d features & animations]=],[=[
0.7.23:
remake all BGM!
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:
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:
new title image
more GUI details
many bugs fixed]=],[=[
0.7.20:
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:
Secret option!
macOS version!
add C4W train mode
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:
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:
display game stats when pause
more options in statistics
better pausing
adjust difficulty of Tech mode
adjust difficulty of PC train mode
adjust vibrate level for mobile devices
little optimized
bugs fixed]=],[=[
0.7.16:
bugs fixed
change rules of custom puzzle mode
change rules of TSD mode
better pausing
speed optimized
adjust difficulty of dig mode
0.7.15:
can make puzzle by drawing mode
can pause game with animation
change icon of "Functional key"
speed optimized
bugs fixed]=],[=[
0.7.14:
drawing mode in custom game
can adjust virtual keys with mouse
speed optimized
rotate also create shade
0.7.13+:
change difficulty of survivor mode
little game rule change
bugs fixed(AI control error)
0.7.13:
Chniese game name:方块研究所
SUPER COOL instant moving effect
new b2b bar style & animation
new transition animation
change difficulty of master mode
adjust delay algorithm(probably cause controlfeel changing,please reset your DAS setting)
code reconstructed
bugs fixed(error when seq=his,size of custom oppo)
debug key change to F8]=],[=[
0.7.12:
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:
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:
更完全的中文翻译
add Classic mode
change O spin's behaviour
fix bugs
0.7.9:
O spin is a lie
better attacking pointer
language system
change rotate system
change BGM&BG set
code optimized
fix bugs]=],[=[
0.7.8:
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 train mode
adjust difficulty of suvivor mode
code optimized
fix bugs
0.7.7:
add dig mode
add survivor mode
combine some modes
change some GUI
more SFXs
fix bugs]=],[=[
0.7.6:
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:
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:
add a lot of bugs
0.7.3:
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:
add PC training mode
add TSD-only mode
remove non-sense s/z spin double
GUI position editted
grid BG changed
smarter AI]=]
}