Alpha V0.7.22
BIN
BGM/blank.ogg
BIN
BGM/cruelty.ogg
BIN
BGM/end.ogg
BIN
BGM/final.ogg
BIN
BGM/infinite.ogg
BIN
BGM/newera.ogg
BIN
BGM/push.ogg
BIN
BGM/race.ogg
BIN
BGM/reason.ogg
BIN
BGM/way.ogg
BIN
SFX/blip_1.ogg
BIN
SFX/blip_2.ogg
BIN
SFX/button.ogg
BIN
SFX/clear_1.ogg
BIN
SFX/clear_2.ogg
BIN
SFX/clear_3.ogg
BIN
SFX/clear_4.ogg
BIN
SFX/collect.ogg
BIN
SFX/drop.ogg
BIN
SFX/fall.ogg
BIN
SFX/hold.ogg
BIN
SFX/lock.ogg
BIN
SFX/prehold.ogg
BIN
SFX/reach.ogg
BIN
SFX/ready.ogg
BIN
SFX/ren_1.ogg
BIN
SFX/ren_10.ogg
BIN
SFX/ren_11.ogg
BIN
SFX/ren_2.ogg
BIN
SFX/ren_3.ogg
BIN
SFX/ren_4.ogg
BIN
SFX/ren_5.ogg
BIN
SFX/ren_6.ogg
BIN
SFX/ren_7.ogg
BIN
SFX/ren_8.ogg
BIN
SFX/ren_9.ogg
BIN
SFX/ren_mega.ogg
BIN
SFX/rotate.ogg
BIN
SFX/spin_0.ogg
BIN
SFX/spin_1.ogg
BIN
SFX/spin_2.ogg
BIN
SFX/spin_3.ogg
BIN
SFX/start.ogg
BIN
SFX/swipe.ogg
BIN
SFX/win.ogg
28
ai.lua
@@ -8,8 +8,10 @@
|
|||||||
4deepShape
|
4deepShape
|
||||||
BlockedWells;
|
BlockedWells;
|
||||||
]]
|
]]
|
||||||
dirCount={1,1,3,3,3,0,1}
|
local abs=math.abs
|
||||||
spinOffset={
|
|
||||||
|
local dirCount={1,1,3,3,3,0,1}
|
||||||
|
local spinOffset={
|
||||||
{1,0,0},--S
|
{1,0,0},--S
|
||||||
{1,0,0},--Z
|
{1,0,0},--Z
|
||||||
{1,0,0},--L
|
{1,0,0},--L
|
||||||
@@ -24,7 +26,7 @@ spinOffset={
|
|||||||
6~10:hD,sD,H,A,R,
|
6~10:hD,sD,H,A,R,
|
||||||
11~13:LL,RR,DD
|
11~13:LL,RR,DD
|
||||||
]]
|
]]
|
||||||
FCL={
|
local FCL={
|
||||||
[1]={
|
[1]={
|
||||||
{{11},{11,2},{1},{},{2},{2,2},{12,1},{12}},
|
{{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}},
|
{{11,4},{11,3},{11,2,3},{4},{3},{2,3},{2,2,3},{12,4},{12,3}},
|
||||||
@@ -46,15 +48,15 @@ FCL={
|
|||||||
FCL[2]=FCL[1]
|
FCL[2]=FCL[1]
|
||||||
FCL[4]=FCL[3]
|
FCL[4]=FCL[3]
|
||||||
FCL[5]=FCL[3]
|
FCL[5]=FCL[3]
|
||||||
clearScore={[0]=0,0,2,4,12}
|
local clearScore={[0]=0,0,2,4,12}
|
||||||
function ifoverlapAI(f,bk,x,y)
|
local function ifoverlapAI(f,bk,x,y)
|
||||||
if y<1 then return true end
|
if y<1 then return true end
|
||||||
if y>#f then return end
|
if y>#f then return end
|
||||||
for i=1,#bk do for j=1,#bk[1]do
|
for i=1,#bk do for j=1,#bk[1]do
|
||||||
if f[y+i-1]and bk[i][j]and f[y+i-1][x+j-1]>0 then return true end
|
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 end
|
||||||
end
|
end
|
||||||
function resetField(f0,f,start)
|
local function resetField(f0,f,start)
|
||||||
::L::if f[start]then
|
::L::if f[start]then
|
||||||
removeRow(f,start)
|
removeRow(f,start)
|
||||||
goto L
|
goto L
|
||||||
@@ -66,7 +68,7 @@ function resetField(f0,f,start)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function getScore(field,bn,cb,cx,cy)
|
local function getScore(field,bn,cb,cx,cy)
|
||||||
local score=0
|
local score=0
|
||||||
local highest=0
|
local highest=0
|
||||||
local height=getNewRow(0)
|
local height=getNewRow(0)
|
||||||
@@ -109,7 +111,8 @@ function getScore(field,bn,cb,cx,cy)
|
|||||||
h1=0
|
h1=0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
ins(freeRow,height)
|
freeRow[#freeRow+1]=height
|
||||||
|
freeRow.L=freeRow.L+1
|
||||||
score=
|
score=
|
||||||
#field*20
|
#field*20
|
||||||
-cy*35
|
-cy*35
|
||||||
@@ -163,12 +166,15 @@ function AI_getControls(ctrl)
|
|||||||
removeRow(Tfield,1)
|
removeRow(Tfield,1)
|
||||||
goto L
|
goto L
|
||||||
end--Release cache
|
end--Release cache
|
||||||
|
local p=#ctrl+1
|
||||||
if best.hold then
|
if best.hold then
|
||||||
ins(ctrl,8)
|
ctrl[p]=8
|
||||||
|
p=p+1
|
||||||
end
|
end
|
||||||
local l=FCL[best.bn][best.dir+1][best.x]
|
local l=FCL[best.bn][best.dir+1][best.x]
|
||||||
for i=1,#l do
|
for i=1,#l do
|
||||||
ins(ctrl,l[i])
|
ctrl[p]=l[i]
|
||||||
|
p=p+1
|
||||||
end
|
end
|
||||||
ins(ctrl,6)
|
ctrl[p]=6
|
||||||
end
|
end
|
||||||
824
call&sys.lua
@@ -1,824 +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()
|
|
||||||
BGM("blank")
|
|
||||||
collectgarbage()
|
|
||||||
end,
|
|
||||||
music=function()
|
|
||||||
sel=1
|
|
||||||
BGM()
|
|
||||||
end,
|
|
||||||
mode=function()
|
|
||||||
curBG="none"
|
|
||||||
saveData()
|
|
||||||
modeSel=modeSel or 1
|
|
||||||
levelSel=levelSel or 3
|
|
||||||
BGM("blank")
|
|
||||||
end,
|
|
||||||
custom=function()
|
|
||||||
optSel=optSel or 1
|
|
||||||
curBG=customRange.bg[customSel[12]]
|
|
||||||
BGM(customRange.bgm[customSel[13]])
|
|
||||||
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
|
|
||||||
|
|
||||||
local mouseDown,mouseMove,mouseUp,wheelmoved={},{},{},{}
|
|
||||||
local touchDown,touchUp,touchMove={},{},{}
|
|
||||||
local keyDown,keyUp={},{}
|
|
||||||
local gamepadDown,gamepadUp={},{}
|
|
||||||
function mouseDown.intro(x,y,k)
|
|
||||||
if k==2 then
|
|
||||||
back()
|
|
||||||
else
|
|
||||||
gotoScene("main")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
function touchDown.intro(id,x,y)
|
|
||||||
gotoScene("main")
|
|
||||||
end
|
|
||||||
function keyDown.intro(key)
|
|
||||||
if key=="escape"then
|
|
||||||
back()
|
|
||||||
else
|
|
||||||
gotoScene("main")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
function gamepadDown.intro(key)
|
|
||||||
if key=="back"then
|
|
||||||
back()
|
|
||||||
else
|
|
||||||
gotoScene("main")
|
|
||||||
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
|
|
||||||
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 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 keyDown.music(key)
|
|
||||||
if key=="down"then
|
|
||||||
sel=sel%#musicID+1
|
|
||||||
elseif key=="up"then
|
|
||||||
sel=(sel-2)%#musicID+1
|
|
||||||
elseif key=="return"or key=="space"then
|
|
||||||
BGM(musicID[sel])
|
|
||||||
elseif key=="escape"then
|
|
||||||
back()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function keyDown.custom(key)
|
|
||||||
if key=="left"then
|
|
||||||
customSel[optSel]=(customSel[optSel]-2)%#customRange[customID[optSel]]+1
|
|
||||||
if optSel==12 then
|
|
||||||
curBG=customRange.bg[customSel[12]]
|
|
||||||
elseif optSel==13 then
|
|
||||||
BGM(customRange.bgm[customSel[13]])
|
|
||||||
end
|
|
||||||
elseif key=="right"then
|
|
||||||
customSel[optSel]=customSel[optSel]%#customRange[customID[optSel]]+1
|
|
||||||
if optSel==12 then
|
|
||||||
curBG=customRange.bg[customSel[optSel]]
|
|
||||||
elseif optSel==13 then
|
|
||||||
BGM(customRange.bgm[customSel[optSel]])
|
|
||||||
end
|
|
||||||
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 mouseDown.draw(x,y,k)
|
|
||||||
mouseMove.draw(x,y)
|
|
||||||
end
|
|
||||||
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 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 touchDown.draw(id,x,y)
|
|
||||||
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 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 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 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
|
|
||||||
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
|
|
||||||
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
|
|
||||||
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 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 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 keyDown.pause(key)
|
|
||||||
if key=="escape"then
|
|
||||||
back()
|
|
||||||
elseif key=="return"or key=="space"then
|
|
||||||
resumeGame()
|
|
||||||
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
|
|
||||||
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
|
|
||||||
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
|
|
||||||
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 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
|
|
||||||
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
|
|
||||||
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 system~="Android" and not f 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()%3.1416*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())
|
|
||||||
if not wd.isMinimized()then
|
|
||||||
readyDrawFrame=readyDrawFrame+setting.frameMul
|
|
||||||
if readyDrawFrame>=100 then
|
|
||||||
readyDrawFrame=readyDrawFrame-100
|
|
||||||
love.draw()
|
|
||||||
gc.present()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
::L::if Timer()-frameT<1/60 then goto L end
|
|
||||||
frameT=Timer()
|
|
||||||
tm.sleep(.001)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
24
class.lua
@@ -1,18 +1,24 @@
|
|||||||
Task={}
|
Task={}
|
||||||
|
local rem=table.remove
|
||||||
|
|
||||||
metatable_task={__index=Task}
|
metatable_task={__index=Task}
|
||||||
function newTask(code,P,data)
|
function newTask(code,P,data)
|
||||||
|
local id=#Task+1
|
||||||
local obj={
|
local obj={
|
||||||
code=code,
|
code=code,
|
||||||
P=P,
|
P=P,
|
||||||
data=data,
|
data=data,
|
||||||
|
id=id,
|
||||||
}
|
}
|
||||||
setmetatable(obj,metatable_task)
|
setmetatable(obj,metatable_task)
|
||||||
ins(Task,obj)
|
Task[id]=obj
|
||||||
end
|
end
|
||||||
function clearTask(opt)
|
function clearTask(opt)
|
||||||
if opt=="all"then
|
if opt=="all"then
|
||||||
while Task[1]do
|
local i=#Task
|
||||||
rem(Task,i)
|
while i>0 do
|
||||||
|
Task[i]=nil
|
||||||
|
i=i-1
|
||||||
end
|
end
|
||||||
elseif opt=="play"then
|
elseif opt=="play"then
|
||||||
for i=#Task,1,-1 do
|
for i=#Task,1,-1 do
|
||||||
@@ -22,7 +28,7 @@ function clearTask(opt)
|
|||||||
end
|
end
|
||||||
else--Player table
|
else--Player table
|
||||||
for i=#Task,1,-1 do
|
for i=#Task,1,-1 do
|
||||||
if Task[i].P==P then
|
if Task[i].P==opt then
|
||||||
rem(Task,i)
|
rem(Task,i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -30,8 +36,12 @@ function clearTask(opt)
|
|||||||
end
|
end
|
||||||
function Task:update()
|
function Task:update()
|
||||||
if(not self.P or self.P and scene=="play")and self:code(self.P,self.data)then
|
if(not self.P or self.P and scene=="play")and self:code(self.P,self.data)then
|
||||||
for i=#Task,1,-1 do
|
local e=#Task
|
||||||
if Task[i]==self then rem(Task,i)return end
|
for i=1,e do
|
||||||
end--Destroy
|
if Task[i]==self then
|
||||||
|
Task[e],Task[i]=nil,Task[e]
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
39
conf.lua
@@ -1,23 +1,23 @@
|
|||||||
|
gameVersion="Alpha V0.7.22"
|
||||||
function love.conf(t)
|
function love.conf(t)
|
||||||
local X=nil
|
|
||||||
t.identity="Techmino"--Save directory name
|
t.identity="Techmino"--Save directory name
|
||||||
t.appendidentity=X--If search files in source before save directory
|
|
||||||
t.version="11.1"
|
t.version="11.1"
|
||||||
t.console=X
|
t.console=X
|
||||||
t.accelerometerjoystick=X--If exposing accelerometer on iOS and Android as a Joystick
|
|
||||||
t.gammacorrect=X
|
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
|
t.audio.mixwithsystem=true--Switch on to keep sysBGM
|
||||||
|
|
||||||
local W=t.window
|
local W=t.window
|
||||||
W.title="Techmino V0.7.21"
|
W.title="Techmino "..gameVersion
|
||||||
W.icon="/image/icon.png"
|
W.icon="/image/icon.png"
|
||||||
W.width,W.height=1280,720
|
W.width,W.height=1280,720
|
||||||
W.minwidth,W.minheight=640,360
|
W.minwidth,W.minheight=640,360
|
||||||
W.borderless=X
|
W.borderless=X
|
||||||
W.resizable=true
|
W.resizable=1
|
||||||
W.fullscreentype="desktop"--Choose between "desktop" fullscreen or "exclusive" fullscreen mode (string)
|
W.fullscreentype="desktop"--"exclusive"
|
||||||
W.fullscreen=X
|
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.msaa=X--The number of samples to use with multi-sampled antialiasing (number)
|
||||||
W.depth=X--Bits per sample in the depth buffer
|
W.depth=X--Bits per sample in the depth buffer
|
||||||
W.stencil=1--The number of bits per sample in the stencil 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
|
W.x,W.y=nil
|
||||||
|
|
||||||
local M=t.modules
|
local M=t.modules
|
||||||
M.window=true
|
M.window,M.system,M.event=1,1,1
|
||||||
M.system=true
|
M.audio,M.sound=1,1
|
||||||
M.audio=true
|
M.math,M.data=1,1
|
||||||
M.data=true
|
M.timer,M.graphics,M.font,M.image=1,1,1,1
|
||||||
M.event=true
|
M.mouse,M.touch,M.keyboard,M.joystick=1,1,1,1
|
||||||
M.font=true
|
M.physics,M.thread,M.video=X
|
||||||
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
|
|
||||||
end
|
end
|
||||||
265
dataList.lua
@@ -1,6 +1,11 @@
|
|||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local setFont=setFont
|
local setFont=setFont
|
||||||
|
local int,rnd,max,min=math.floor,math.random,math.max,math.min
|
||||||
|
local format=string.format
|
||||||
|
local ins,rem=table.insert,table.remove
|
||||||
|
local function newNext(n)
|
||||||
|
P.next[#P.next+1]={bk=blocks[n][0],id=n,color=P.gameEnv.bone and 8 or n,name=n}
|
||||||
|
end
|
||||||
local PCbase={
|
local PCbase={
|
||||||
{3,3,3,0,0,0,0,0,2,2},
|
{3,3,3,0,0,0,0,0,2,2},
|
||||||
{3,6,6,0,0,0,0,2,2,5},
|
{3,6,6,0,0,0,0,2,2,5},
|
||||||
@@ -32,6 +37,21 @@ local death_fall={10,9,8,7,6}
|
|||||||
local pc_drop={50,45,40,35,30,26,22,18,15,12}
|
local pc_drop={50,45,40,35,30,26,22,18,15,12}
|
||||||
local pc_lock={55,50,45,40,36,32,30}
|
local pc_lock={55,50,45,40,36,32,30}
|
||||||
local pc_fall={18,16,14,12,10,9,8,7,6}
|
local pc_fall={18,16,14,12,10,9,8,7,6}
|
||||||
|
local blockColor=blockColor
|
||||||
|
local function throwBadge(S,R)--Sender/Receiver
|
||||||
|
local x1,y1,x2,y2
|
||||||
|
if S.small then
|
||||||
|
x1,y1=S.centerX,S.centerY
|
||||||
|
else
|
||||||
|
x1,y1=S.x+308*S.size,S.y+450*S.size
|
||||||
|
end
|
||||||
|
if R.small then
|
||||||
|
x2,y2=R.centerX,R.centerY
|
||||||
|
else
|
||||||
|
x2,y2=R.x+66*R.size,R.y+344*R.size
|
||||||
|
end
|
||||||
|
FX.badge[#FX.badge+1]={x1,y1,x2,y2,t=0}
|
||||||
|
end
|
||||||
loadmode={
|
loadmode={
|
||||||
sprint=function()
|
sprint=function()
|
||||||
createPlayer(1,340,15)
|
createPlayer(1,340,15)
|
||||||
@@ -74,7 +94,7 @@ loadmode={
|
|||||||
end,
|
end,
|
||||||
survivor=function()
|
survivor=function()
|
||||||
createPlayer(1,340,15)
|
createPlayer(1,340,15)
|
||||||
newTask(Event_task[curMode.lv==1 and"survivor_easy"or curMode.lv==2 and"survivor_normal"or curMode.lv==3 and"survivor_hard"or curMode.lv==4 and"survivor_lunatic"or curMode.lv==5 and"survivor_ultimate"],P)
|
newTask(Event_task[curMode.lv==1 and"survivor_easy"or curMode.lv==2 and"survivor_normal"or curMode.lv==3 and"survivor_hard"or curMode.lv==4 and"survivor_lunatic"or curMode.lv==5 and"survivor_ultimate"or curMode.lv==6 and"survivor_extra"],P)
|
||||||
pushSpeed=curMode.lv>2 and 2 or 1
|
pushSpeed=curMode.lv>2 and 2 or 1
|
||||||
end,
|
end,
|
||||||
tech=function()
|
tech=function()
|
||||||
@@ -101,7 +121,6 @@ loadmode={
|
|||||||
createPlayer(1,340,15)
|
createPlayer(1,340,15)
|
||||||
P=players[1]
|
P=players[1]
|
||||||
Event.newPC()
|
Event.newPC()
|
||||||
P.freshNext()
|
|
||||||
end,
|
end,
|
||||||
pcchallenge=function()
|
pcchallenge=function()
|
||||||
createPlayer(1,340,15)
|
createPlayer(1,340,15)
|
||||||
@@ -170,14 +189,14 @@ loadmode={
|
|||||||
createPlayer(2,965,360,.5,modeEnv.opponent)
|
createPlayer(2,965,360,.5,modeEnv.opponent)
|
||||||
end
|
end
|
||||||
preField.h=20
|
preField.h=20
|
||||||
::R::
|
repeat
|
||||||
for i=1,10 do
|
for i=1,10 do
|
||||||
if preField[preField.h][i]>0 or curMode.lv==2 and preField[preField.h][i]==-1 then
|
if preField[preField.h][i]>0 or curMode.lv==2 and preField[preField.h][i]==-1 then
|
||||||
goto L
|
goto L
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
preField.h=preField.h-1
|
preField.h=preField.h-1
|
||||||
if preField.h>0 then goto R end
|
until preField.h==0
|
||||||
::L::
|
::L::
|
||||||
if curMode.lv==1 then
|
if curMode.lv==1 then
|
||||||
for _,P in next,players.alive do
|
for _,P in next,players.alive do
|
||||||
@@ -196,12 +215,12 @@ loadmode={
|
|||||||
mesDisp={
|
mesDisp={
|
||||||
--Default:font=35,white
|
--Default:font=35,white
|
||||||
sprint=function()
|
sprint=function()
|
||||||
setFont(70)
|
setFont(65)
|
||||||
local r=max(P.gameEnv.target-P.stat.row,0)
|
local r=max(P.gameEnv.target-P.stat.row,0)
|
||||||
mStr(r,-82,260)
|
mStr(r,-82,265)
|
||||||
if r<21 and r>0 then
|
if r<21 and r>0 then
|
||||||
gc.setLineWidth(3)
|
gc.setLineWidth(4)
|
||||||
gc.setColor(1,.5,.5)
|
gc.setColor(1,r>10 and 0 or rnd(),.5)
|
||||||
gc.line(0,600-30*r,300,600-30*r)
|
gc.line(0,600-30*r,300,600-30*r)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
@@ -235,7 +254,7 @@ mesDisp={
|
|||||||
infinite=function()
|
infinite=function()
|
||||||
setFont(50)
|
setFont(50)
|
||||||
mStr(P.stat.atk,-82,310)
|
mStr(P.stat.atk,-82,310)
|
||||||
mStr(format("%.2f",2.5*P.stat.atk/P.stat.piece),-82,420)
|
mStr(format("%.2f",P.stat.atk/P.stat.row),-82,420)
|
||||||
setFont(20)
|
setFont(20)
|
||||||
mStr("Attack",-82,363)
|
mStr("Attack",-82,363)
|
||||||
mStr("Efficiency",-82,475)
|
mStr("Efficiency",-82,475)
|
||||||
@@ -250,6 +269,11 @@ mesDisp={
|
|||||||
setFont(25)
|
setFont(25)
|
||||||
mStr("Rows",-82,300)
|
mStr("Rows",-82,300)
|
||||||
mStr("Techrash",-82,420)
|
mStr("Techrash",-82,420)
|
||||||
|
if curMode.lv==6 then
|
||||||
|
mStr("Point",-82,180)
|
||||||
|
setFont(60)
|
||||||
|
mStr(P.modeData.point*.1,-82,110)
|
||||||
|
end
|
||||||
setFont(80)
|
setFont(80)
|
||||||
mStr(P.stat.row,-82,220)
|
mStr(P.stat.row,-82,220)
|
||||||
mStr(P.stat.clear_4,-82,340)
|
mStr(P.stat.clear_4,-82,340)
|
||||||
@@ -269,13 +293,14 @@ mesDisp={
|
|||||||
tech=function()
|
tech=function()
|
||||||
setFont(50)
|
setFont(50)
|
||||||
mStr(P.stat.atk,-82,310)
|
mStr(P.stat.atk,-82,310)
|
||||||
mStr(format("%.2f",2.5*P.stat.atk/P.stat.piece),-82,420)
|
mStr(format("%.2f",P.stat.atk/P.stat.row),-82,420)
|
||||||
setFont(20)
|
setFont(20)
|
||||||
mStr("Attack",-82,363)
|
mStr("Attack",-82,363)
|
||||||
mStr("Efficiency",-82,475)
|
mStr("Efficiency",-82,475)
|
||||||
end,
|
end,
|
||||||
c4wtrain=function()
|
c4wtrain=function()
|
||||||
setFont(50)
|
setFont(50)
|
||||||
|
mStr(max(200-P.stat.row,0),-82,220)
|
||||||
mStr(P.combo,-82,310)
|
mStr(P.combo,-82,310)
|
||||||
mStr(P.modeData.point,-82,400)
|
mStr(P.modeData.point,-82,400)
|
||||||
setFont(20)
|
setFont(20)
|
||||||
@@ -295,6 +320,9 @@ mesDisp={
|
|||||||
mStr(P.stat.pc,-82,350)
|
mStr(P.stat.pc,-82,350)
|
||||||
setFont(50)
|
setFont(50)
|
||||||
mStr(max(100-P.stat.row,0),-82,250)
|
mStr(max(100-P.stat.row,0),-82,250)
|
||||||
|
gc.setColor(.5,.5,.5)
|
||||||
|
local y=72*(7-(P.stat.piece+1)%7)-36
|
||||||
|
gc.line(320,y,442,y)
|
||||||
end,
|
end,
|
||||||
techmino49=function()
|
techmino49=function()
|
||||||
setFont(40)
|
setFont(40)
|
||||||
@@ -333,22 +361,26 @@ mesDisp={
|
|||||||
custom=function()
|
custom=function()
|
||||||
setFont(25)
|
setFont(25)
|
||||||
mStr("Rows",-82,300)
|
mStr("Rows",-82,300)
|
||||||
setFont(80)
|
setFont(65)
|
||||||
mStr(P.stat.row,-82,220)
|
mStr(P.stat.row,-82,225)
|
||||||
if P.gameEnv.target<1e4 then
|
if P.gameEnv.target<1e4 then
|
||||||
setFont(75)
|
setFont(75)
|
||||||
mStr(max(P.gameEnv.target-P.stat.row,0),-82,280)
|
mStr(max(P.gameEnv.target-P.stat.row,0),-82,280)
|
||||||
end
|
end
|
||||||
if curMode.lv==2 and P.modeData.event==0 then
|
if P.gameEnv.puzzle and P.modeData.event==0 then
|
||||||
gc.setColor(1,1,1,.6)
|
|
||||||
gc.setLineWidth(3)
|
gc.setLineWidth(3)
|
||||||
for y=1,preField.h do for x=1,10 do
|
for y=1,preField.h do for x=1,10 do
|
||||||
local B=preField[y][x]
|
local B=preField[y][x]
|
||||||
if B>0 then
|
if B>7 then
|
||||||
gc.setColor(blockColor[B])
|
gc.setColor(blockColor[B])
|
||||||
|
gc.rectangle("line",30*x-23,607-30*y,16,16)
|
||||||
|
elseif B>0 then
|
||||||
|
local c=blockColor[B]
|
||||||
|
gc.setColor(c[1],c[2],c[3],.6)
|
||||||
gc.rectangle("line",30*x-25,605-30*y,20,20)
|
gc.rectangle("line",30*x-25,605-30*y,20,20)
|
||||||
|
gc.rectangle("line",30*x-20,610-30*y,10,10)
|
||||||
elseif B==0 then
|
elseif B==0 then
|
||||||
gc.setColor(.8,.8,.8,.6)
|
gc.setColor(1,1,1,.4)
|
||||||
gc.line(30*x-25,605-30*y,30*x-5,625-30*y)
|
gc.line(30*x-25,605-30*y,30*x-5,625-30*y)
|
||||||
gc.line(30*x-25,625-30*y,30*x-5,605-30*y)
|
gc.line(30*x-25,625-30*y,30*x-5,605-30*y)
|
||||||
end
|
end
|
||||||
@@ -380,13 +412,13 @@ Event={
|
|||||||
end
|
end
|
||||||
if P.human then
|
if P.human then
|
||||||
gamefinished=true
|
gamefinished=true
|
||||||
newTask(Event_task.finish,P)
|
|
||||||
SFX("win")
|
SFX("win")
|
||||||
VOICE("win")
|
VOICE("win")
|
||||||
if modeEnv.royaleMode then
|
if modeEnv.royaleMode then
|
||||||
BGM("8-bit happiness")
|
BGM("8-bit happiness")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
newTask(Event_task.finish,P)
|
||||||
showText(P,text.win,"beat",90,nil,.4,curMode.id~="custom")
|
showText(P,text.win,"beat",90,nil,.4,curMode.id~="custom")
|
||||||
end,
|
end,
|
||||||
lose=function()
|
lose=function()
|
||||||
@@ -398,7 +430,9 @@ Event={
|
|||||||
clearTask(P)
|
clearTask(P)
|
||||||
for i=1,#players.alive do
|
for i=1,#players.alive do
|
||||||
if players.alive[i]==P then
|
if players.alive[i]==P then
|
||||||
rem(players.alive,i)
|
for k=i,#players.alive do
|
||||||
|
players.alive[k]=players.alive[k+1]
|
||||||
|
end
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -410,10 +444,10 @@ Event={
|
|||||||
P.strength=0
|
P.strength=0
|
||||||
if P.lastRecv then
|
if P.lastRecv then
|
||||||
local A,i=P,0
|
local A,i=P,0
|
||||||
::L::
|
repeat
|
||||||
A,i=A.lastRecv,i+1
|
A,i=A.lastRecv,i+1
|
||||||
if A and not A.alive and A~=P and i<3 then goto L end
|
until not A or A.alive or A==P or i==3
|
||||||
if A and A~=P then
|
if A and A.alive then
|
||||||
if P.id==1 or A.id==1 then
|
if P.id==1 or A.id==1 then
|
||||||
P.killMark=A.id==1
|
P.killMark=A.id==1
|
||||||
end
|
end
|
||||||
@@ -486,7 +520,7 @@ Event={
|
|||||||
master_reach_lunatic=function()
|
master_reach_lunatic=function()
|
||||||
local t=P.modeData.point
|
local t=P.modeData.point
|
||||||
local c=#P.clearing
|
local c=#P.clearing
|
||||||
if t%100==99 and c==0 then goto L end
|
if t%100==99 and c==0 then return end
|
||||||
t=t+(c<3 and c+1 or c==3 and 5 or 7)
|
t=t+(c<3 and c+1 or c==3 and 5 or 7)
|
||||||
if int(t*.01)>P.modeData.event then
|
if int(t*.01)>P.modeData.event then
|
||||||
P.modeData.event=P.modeData.event+1
|
P.modeData.event=P.modeData.event+1
|
||||||
@@ -494,7 +528,7 @@ Event={
|
|||||||
P.modeData.event=4
|
P.modeData.event=4
|
||||||
P.modeData.point=500
|
P.modeData.point=500
|
||||||
Event.win()
|
Event.win()
|
||||||
goto L
|
return
|
||||||
else
|
else
|
||||||
local s=P.modeData.event+1
|
local s=P.modeData.event+1
|
||||||
curBG=s==2 and"game1"or s==3 and"game2"or s==4 and"game3"or s==5 and"game4"
|
curBG=s==2 and"game1"or s==3 and"game2"or s==4 and"game3"or s==5 and"game4"
|
||||||
@@ -510,12 +544,11 @@ Event={
|
|||||||
end
|
end
|
||||||
P.modeData.point=t
|
P.modeData.point=t
|
||||||
if t%100==99 then SFX("blip_1")end
|
if t%100==99 then SFX("blip_1")end
|
||||||
::L::
|
|
||||||
end,
|
end,
|
||||||
master_reach_ultimate=function()
|
master_reach_ultimate=function()
|
||||||
local t=P.modeData.point
|
local t=P.modeData.point
|
||||||
local c=#P.clearing
|
local c=#P.clearing
|
||||||
if t%100==99 and c==0 then goto L end
|
if t%100==99 and c==0 then return end
|
||||||
t=t+(c<3 and c+1 or c==3 and 5 or 7)
|
t=t+(c<3 and c+1 or c==3 and 5 or 7)
|
||||||
if int(t*.01)>P.modeData.event then
|
if int(t*.01)>P.modeData.event then
|
||||||
P.modeData.event=P.modeData.event+1
|
P.modeData.event=P.modeData.event+1
|
||||||
@@ -524,7 +557,7 @@ Event={
|
|||||||
P.modeData.event=4
|
P.modeData.event=4
|
||||||
P.modeData.point=500
|
P.modeData.point=500
|
||||||
Event.win()
|
Event.win()
|
||||||
goto L
|
return
|
||||||
else
|
else
|
||||||
local s=P.modeData.event+1
|
local s=P.modeData.event+1
|
||||||
curBG=s==2 and"game3"or s==3 and"game4"or s==4 and"game5"or s==5 and"game6"
|
curBG=s==2 and"game3"or s==3 and"game4"or s==4 and"game5"or s==5 and"game6"
|
||||||
@@ -539,7 +572,6 @@ Event={
|
|||||||
end
|
end
|
||||||
P.modeData.point=t
|
P.modeData.point=t
|
||||||
if t%100==99 then SFX("blip_1")end
|
if t%100==99 then SFX("blip_1")end
|
||||||
::L::
|
|
||||||
end,
|
end,
|
||||||
classic_reach=function()
|
classic_reach=function()
|
||||||
P.gameEnv.target=P.gameEnv.target+10
|
P.gameEnv.target=P.gameEnv.target+10
|
||||||
@@ -555,6 +587,14 @@ Event={
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
GM_reach=function()
|
||||||
|
local R=#P.clearing
|
||||||
|
if R==4 then R=10 end
|
||||||
|
P.modeData.point=P.modeData.point+R
|
||||||
|
if P.stat.time>=53.5 then
|
||||||
|
Event.win()
|
||||||
|
end
|
||||||
|
end,
|
||||||
tsd_reach=function()
|
tsd_reach=function()
|
||||||
if P.lastClear~=52 then
|
if P.lastClear~=52 then
|
||||||
Event.lose()
|
Event.lose()
|
||||||
@@ -565,6 +605,8 @@ Event={
|
|||||||
tech_reach_easy=function()
|
tech_reach_easy=function()
|
||||||
if P.b2b<40 then
|
if P.b2b<40 then
|
||||||
Event.lose()
|
Event.lose()
|
||||||
|
elseif P.stat.row==3 then
|
||||||
|
Event.win()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
tech_reach_hard=function()
|
tech_reach_hard=function()
|
||||||
@@ -579,22 +621,38 @@ Event={
|
|||||||
end,
|
end,
|
||||||
c4w_reach=function()
|
c4w_reach=function()
|
||||||
for i=1,#P.clearing do
|
for i=1,#P.clearing do
|
||||||
ins(P.field,getNewRow(10))
|
P.field[#P.field+1]=getNewRow(10)
|
||||||
ins(P.visTime,getNewRow(20))
|
P.visTime[#P.visTime+1]=getNewRow(20)
|
||||||
for i=4,7 do P.field[#P.field][i]=0 end
|
for i=4,7 do P.field[#P.field][i]=0 end
|
||||||
end
|
end
|
||||||
if #P.clearing==0 then
|
if #P.clearing==0 then
|
||||||
if curMode.lv==2 then
|
if curMode.lv==2 then
|
||||||
Event.lose()
|
Event.lose()
|
||||||
end
|
end
|
||||||
elseif P.combo>P.modeData.point then
|
else
|
||||||
P.modeData.point=P.combo
|
if P.combo>P.modeData.point then
|
||||||
|
P.modeData.point=P.combo
|
||||||
|
end
|
||||||
|
if P.stat.row>=200 then
|
||||||
|
Event.win()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
newPC=function()
|
newPC=function()
|
||||||
local P=players[1]
|
|
||||||
if P.stat.piece%4==0 then
|
if P.stat.piece%4==0 then
|
||||||
if #P.field==#P.clearing then
|
if #P.field==#P.clearing then
|
||||||
|
P.modeData.event=P.modeData.event==0 and 1 or 0
|
||||||
|
local r=rnd(#PClist)
|
||||||
|
local f=P.modeData.event==0
|
||||||
|
for i=1,4 do
|
||||||
|
local b=PClist[r][i]
|
||||||
|
if f then
|
||||||
|
if b<3 then b=3-b
|
||||||
|
elseif b<5 then b=7-b
|
||||||
|
end
|
||||||
|
end
|
||||||
|
newNext(b)
|
||||||
|
end
|
||||||
P.counter=P.stat.piece==0 and 20 or 0
|
P.counter=P.stat.piece==0 and 20 or 0
|
||||||
newTask(Event_task.PC,P)
|
newTask(Event_task.PC,P)
|
||||||
if curMode.lv==2 then
|
if curMode.lv==2 then
|
||||||
@@ -604,17 +662,30 @@ Event={
|
|||||||
P.gameEnv.lock=pc_lock[s]or 20
|
P.gameEnv.lock=pc_lock[s]or 20
|
||||||
P.gameEnv.fall=pc_fall[s]or 5
|
P.gameEnv.fall=pc_fall[s]or 5
|
||||||
if s==10 then
|
if s==10 then
|
||||||
showText(P,text.maxspeed,"appear",80,-140)
|
showText(P,text.maxspeed,"appear",100,-140,.6)
|
||||||
else
|
else
|
||||||
showText(P,text.speedup,"appear",30,-140)
|
showText(P,text.speedup,"appear",40,-140)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Event.lose()
|
Event.lose()
|
||||||
end
|
end
|
||||||
|
elseif P.curY+P.r>5-P.stat.row%4+#P.clearing then
|
||||||
|
Event.lose()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
puzzleCheck=function()
|
||||||
|
for y=1,20 do
|
||||||
|
local L=P.field[y]
|
||||||
|
for x=1,10 do
|
||||||
|
local a,b=preField[y][x],L and L[x]or 0
|
||||||
|
if a~=-1 and(a==0 and b>0 or a<8 and a~=b or a>7 and b==0)then return end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
P.modeData.event=1
|
||||||
|
Event.win()
|
||||||
|
end
|
||||||
}
|
}
|
||||||
Event_task={
|
Event_task={
|
||||||
finish=function(self,P)
|
finish=function(self,P)
|
||||||
@@ -678,10 +749,10 @@ Event_task={
|
|||||||
if not P.control then return end
|
if not P.control then return end
|
||||||
P.counter=P.counter+1
|
P.counter=P.counter+1
|
||||||
if P.counter>=max(60,150-2*P.modeData.event)and P.atkBuffer.sum<4 then
|
if P.counter>=max(60,150-2*P.modeData.event)and P.atkBuffer.sum<4 then
|
||||||
ins(P.atkBuffer,{pos=rnd(10),amount=1,countdown=30,cd0=30,time=0,sent=false,lv=1})
|
P.atkBuffer[#P.atkBuffer+1]={pos=rnd(10),amount=1,countdown=30,cd0=30,time=0,sent=false,lv=1}
|
||||||
P.atkBuffer.sum=P.atkBuffer.sum+1
|
P.atkBuffer.sum=P.atkBuffer.sum+1
|
||||||
P.stat.recv=P.stat.recv+1
|
P.stat.recv=P.stat.recv+1
|
||||||
if P.modeData.event==45 then showText(P,text.maxspeed,"appear",80,-140)end
|
if P.modeData.event==45 then showText(P,text.maxspeed,"appear",100,-140,.6)end
|
||||||
P.counter=0
|
P.counter=0
|
||||||
P.modeData.event=P.modeData.event+1
|
P.modeData.event=P.modeData.event+1
|
||||||
end
|
end
|
||||||
@@ -691,14 +762,14 @@ Event_task={
|
|||||||
P.counter=P.counter+1
|
P.counter=P.counter+1
|
||||||
if P.counter>=max(90,180-2*P.modeData.event)and P.atkBuffer.sum<8 then
|
if P.counter>=max(90,180-2*P.modeData.event)and P.atkBuffer.sum<8 then
|
||||||
local d=P.modeData.event+1
|
local d=P.modeData.event+1
|
||||||
if d%4==0 then ins(P.atkBuffer,{pos=rnd(10),amount=1,countdown=60,cd0=60,time=0,sent=false,lv=1})
|
P.atkBuffer[#P.atkBuffer+1]=
|
||||||
elseif d%4==1 then ins(P.atkBuffer,{pos=rnd(10),amount=2,countdown=70,cd0=70,time=0,sent=false,lv=1})
|
d%4==0 and{pos=rnd(10),amount=1,countdown=60,cd0=60,time=0,sent=false,lv=1}or
|
||||||
elseif d%4==2 then ins(P.atkBuffer,{pos=rnd(10),amount=3,countdown=80,cd0=80,time=0,sent=false,lv=2})
|
d%4==1 and{pos=rnd(10),amount=2,countdown=70,cd0=70,time=0,sent=false,lv=1}or
|
||||||
elseif d%4==3 then ins(P.atkBuffer,{pos=rnd(10),amount=4,countdown=90,cd0=90,time=0,sent=false,lv=3})
|
d%4==2 and{pos=rnd(10),amount=3,countdown=80,cd0=80,time=0,sent=false,lv=2}or
|
||||||
end
|
d%4==3 and{pos=rnd(10),amount=4,countdown=90,cd0=90,time=0,sent=false,lv=3}
|
||||||
P.atkBuffer.sum=P.atkBuffer.sum+d%4+1
|
P.atkBuffer.sum=P.atkBuffer.sum+d%4+1
|
||||||
P.stat.recv=P.stat.recv+d%4+1
|
P.stat.recv=P.stat.recv+d%4+1
|
||||||
if P.modeData.event==45 then showText(P,text.maxspeed,"appear",80,-140)end
|
if P.modeData.event==45 then showText(P,text.maxspeed,"appear",100,-140,.6)end
|
||||||
P.counter=0
|
P.counter=0
|
||||||
P.modeData.event=d
|
P.modeData.event=d
|
||||||
end
|
end
|
||||||
@@ -707,15 +778,15 @@ Event_task={
|
|||||||
if not P.control then return end
|
if not P.control then return end
|
||||||
P.counter=P.counter+1
|
P.counter=P.counter+1
|
||||||
if P.counter>=max(60,180-2*P.modeData.event)and P.atkBuffer.sum<15 then
|
if P.counter>=max(60,180-2*P.modeData.event)and P.atkBuffer.sum<15 then
|
||||||
if P.modeData.event%3<2 then
|
P.atkBuffer[#P.atkBuffer+1]=
|
||||||
ins(P.atkBuffer,{pos=rnd(10),amount=1,countdown=0,cd0=0,time=0,sent=false,lv=1})
|
P.modeData.event%3<2 and
|
||||||
else
|
{pos=rnd(10),amount=1,countdown=0,cd0=0,time=0,sent=false,lv=1}
|
||||||
ins(P.atkBuffer,{pos=rnd(10),amount=3,countdown=60,cd0=60,time=0,sent=false,lv=2})
|
or
|
||||||
end
|
{pos=rnd(10),amount=3,countdown=60,cd0=60,time=0,sent=false,lv=2}
|
||||||
local R=(P.modeData.event%3<2 and 1 or 3)
|
local R=(P.modeData.event%3<2 and 1 or 3)
|
||||||
P.atkBuffer.sum=P.atkBuffer.sum+R
|
P.atkBuffer.sum=P.atkBuffer.sum+R
|
||||||
P.stat.recv=P.stat.recv+R
|
P.stat.recv=P.stat.recv+R
|
||||||
if P.modeData.event==45 then showText(P,text.maxspeed,"appear",80,-140)end
|
if P.modeData.event==45 then showText(P,text.maxspeed,"appear",100,-140,.6)end
|
||||||
P.counter=0
|
P.counter=0
|
||||||
P.modeData.event=P.modeData.event+1
|
P.modeData.event=P.modeData.event+1
|
||||||
end
|
end
|
||||||
@@ -725,10 +796,10 @@ Event_task={
|
|||||||
P.counter=P.counter+1
|
P.counter=P.counter+1
|
||||||
if P.counter>=max(60,150-P.modeData.event)and P.atkBuffer.sum<20 then
|
if P.counter>=max(60,150-P.modeData.event)and P.atkBuffer.sum<20 then
|
||||||
local t=max(60,90-P.modeData.event)
|
local t=max(60,90-P.modeData.event)
|
||||||
ins(P.atkBuffer,{pos=rnd(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3})
|
P.atkBuffer[#P.atkBuffer+1]={pos=rnd(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||||
P.atkBuffer.sum=P.atkBuffer.sum+4
|
P.atkBuffer.sum=P.atkBuffer.sum+4
|
||||||
P.stat.recv=P.stat.recv+4
|
P.stat.recv=P.stat.recv+4
|
||||||
if P.modeData.event==60 then showText(P,text.maxspeed,"appear",80,-140)end
|
if P.modeData.event==60 then showText(P,text.maxspeed,"appear",100,-140,.6)end
|
||||||
P.counter=0
|
P.counter=0
|
||||||
P.modeData.event=P.modeData.event+1
|
P.modeData.event=P.modeData.event+1
|
||||||
end
|
end
|
||||||
@@ -738,17 +809,52 @@ Event_task={
|
|||||||
P.counter=P.counter+1
|
P.counter=P.counter+1
|
||||||
if P.counter>=max(300,600-10*P.modeData.event)and P.atkBuffer.sum<20 then
|
if P.counter>=max(300,600-10*P.modeData.event)and P.atkBuffer.sum<20 then
|
||||||
local t=max(300,480-12*P.modeData.event)
|
local t=max(300,480-12*P.modeData.event)
|
||||||
ins(P.atkBuffer,{pos=rnd(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=2})
|
local p=#P.atkBuffer+1
|
||||||
ins(P.atkBuffer,{pos=rnd(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3})
|
P.atkBuffer[p] ={pos=rnd(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=2}
|
||||||
ins(P.atkBuffer,{pos=rnd(10),amount=6,countdown=1.2*t,cd0=1.2*t,time=0,sent=false,lv=4})
|
P.atkBuffer[p+1]={pos=rnd(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||||
ins(P.atkBuffer,{pos=rnd(10),amount=6,countdown=1.5*t,cd0=1.5*t,time=0,sent=false,lv=5})
|
P.atkBuffer[p+2]={pos=rnd(10),amount=6,countdown=1.2*t,cd0=1.2*t,time=0,sent=false,lv=4}
|
||||||
|
P.atkBuffer[p+3]={pos=rnd(10),amount=6,countdown=1.5*t,cd0=1.5*t,time=0,sent=false,lv=5}
|
||||||
P.atkBuffer.sum=P.atkBuffer.sum+20
|
P.atkBuffer.sum=P.atkBuffer.sum+20
|
||||||
P.stat.recv=P.stat.recv+4
|
P.stat.recv=P.stat.recv+20
|
||||||
P.counter=0
|
P.counter=0
|
||||||
if P.modeData.event==31 then showText(P,text.maxspeed,"appear",80,-140)end
|
if P.modeData.event==31 then showText(P,text.maxspeed,"appear",100,-140,.6)end
|
||||||
P.modeData.event=P.modeData.event+1
|
P.modeData.event=P.modeData.event+1
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
survivor_extra=function(self,P)
|
||||||
|
if not P.control then return end
|
||||||
|
if P.atkBuffer.sum<3 then
|
||||||
|
local p=#P.atkBuffer+1
|
||||||
|
local T=P.modeData.event
|
||||||
|
if T<15 then
|
||||||
|
local t=1200-20*T--1200~900
|
||||||
|
P.atkBuffer[p] ={pos=rnd(5,6),amount=10,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||||
|
P.atkBuffer[p+1]={pos=rnd(4,7),amount=10,countdown=t,cd0=t,time=0,sent=false,lv=4}
|
||||||
|
elseif T<30 then
|
||||||
|
local t=900-20*(T-15)--900~600
|
||||||
|
P.atkBuffer[p] ={pos=rnd(3,8),amount=10,countdown=t,cd0=t,time=0,sent=false,lv=4}
|
||||||
|
P.atkBuffer[p+1]={pos=rnd(4,7),amount=12,countdown=t,cd0=t,time=0,sent=false,lv=5}
|
||||||
|
else
|
||||||
|
local t=max(480,720-16*(T-30))--720~480
|
||||||
|
P.atkBuffer[p] ={pos=rnd(2)*9-8,amount=12,countdown=t,cd0=t,time=0,sent=false,lv=5}
|
||||||
|
P.atkBuffer[p+1]={pos=rnd(3,8),amount=12,countdown=t,cd0=t,time=0,sent=false,lv=5}
|
||||||
|
end
|
||||||
|
P.atkBuffer.sum=P.atkBuffer.sum+20
|
||||||
|
P.stat.recv=P.stat.recv+20
|
||||||
|
P.modeData.event=P.modeData.event+1
|
||||||
|
if P.modeData.event==15 then
|
||||||
|
showText(P,text.awesome,"appear",100,-140,.6)
|
||||||
|
elseif P.modeData.event==16 then
|
||||||
|
pushSpeed=4
|
||||||
|
elseif P.modeData.event==30 then
|
||||||
|
showText(P,text.continue,"appear",100,-140,.6)
|
||||||
|
elseif P.modeData.event==31 then
|
||||||
|
pushSpeed=6
|
||||||
|
elseif P.modeData.event==45 then
|
||||||
|
showText(P,text.maxspeed,"appear",100,-140,.6)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
PC=function(self,P)
|
PC=function(self,P)
|
||||||
P.counter=P.counter+1
|
P.counter=P.counter+1
|
||||||
if P.counter==21 then
|
if P.counter==21 then
|
||||||
@@ -960,10 +1066,10 @@ defaultModeEnv={
|
|||||||
{
|
{
|
||||||
_20G=true,
|
_20G=true,
|
||||||
drop=0,lock=15,
|
drop=0,lock=15,
|
||||||
wait=10,
|
wait=10,fall=15,
|
||||||
fall=15,
|
|
||||||
visible="fast",
|
visible="fast",
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
|
target=1,reach=Event.GM_reach,
|
||||||
arr=1,
|
arr=1,
|
||||||
bg="game3",bgm="secret8th",
|
bg="game3",bgm="secret8th",
|
||||||
},
|
},
|
||||||
@@ -1001,7 +1107,7 @@ defaultModeEnv={
|
|||||||
bg="game2",bgm="secret8th",
|
bg="game2",bgm="secret8th",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
drop=5,lock=60,
|
drop=6,lock=60,
|
||||||
fall=10,
|
fall=10,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
bg="game3",bgm="secret7th",
|
bg="game3",bgm="secret7th",
|
||||||
@@ -1012,13 +1118,19 @@ defaultModeEnv={
|
|||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
bg="rgb",bgm="secret7th",
|
bg="rgb",bgm="secret7th",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
drop=3,lock=60,
|
||||||
|
fall=8,
|
||||||
|
freshLimit=15,
|
||||||
|
bg="game4",bgm="push",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
tech={
|
tech={
|
||||||
{
|
{
|
||||||
oncehold=false,
|
oncehold=false,
|
||||||
drop=1e99,lock=1e99,
|
drop=1e99,lock=1e99,
|
||||||
target=1,reach=Event.tech_reach_easy,
|
target=1,reach=Event.tech_reach_easy,
|
||||||
bg="matrix",bgm="way",
|
bg="matrix",bgm="newera",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
oncehold=false,
|
oncehold=false,
|
||||||
@@ -1029,18 +1141,23 @@ defaultModeEnv={
|
|||||||
{
|
{
|
||||||
drop=10,lock=60,
|
drop=10,lock=60,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
target=1,reach=Event.tech_reach_hard,
|
target=1,reach=Event.tech_reach_easy,
|
||||||
bg="matrix",bgm="way",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
drop=3,lock=40,
|
|
||||||
target=1,
|
|
||||||
freshLimit=15,
|
|
||||||
reach=Event.tech_reach_hard,
|
|
||||||
bg="matrix",bgm="secret8th",
|
bg="matrix",bgm="secret8th",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
drop=1,lock=40,
|
drop=30,lock=60,
|
||||||
|
freshLimit=15,
|
||||||
|
target=1,reach=Event.tech_reach_ultimate,
|
||||||
|
bg="matrix",bgm="secret8th",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
_20G=true,lock=60,
|
||||||
|
freshLimit=15,
|
||||||
|
target=1,reach=Event.tech_reach_hard,
|
||||||
|
bg="matrix",bgm="secret7th",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
_20G=true,lock=60,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
target=1,reach=Event.tech_reach_ultimate,
|
target=1,reach=Event.tech_reach_ultimate,
|
||||||
bg="matrix",bgm="secret7th",
|
bg="matrix",bgm="secret7th",
|
||||||
@@ -1065,7 +1182,7 @@ defaultModeEnv={
|
|||||||
hold=false,
|
hold=false,
|
||||||
drop=150,lock=150,
|
drop=150,lock=150,
|
||||||
fall=20,
|
fall=20,
|
||||||
sequence="pc",
|
sequence="none",
|
||||||
target=0,reach=Event.newPC,
|
target=0,reach=Event.newPC,
|
||||||
ospin=false,
|
ospin=false,
|
||||||
bg="rgb",bgm="newera",
|
bg="rgb",bgm="newera",
|
||||||
@@ -1075,7 +1192,7 @@ defaultModeEnv={
|
|||||||
hold=false,
|
hold=false,
|
||||||
drop=60,lock=60,
|
drop=60,lock=60,
|
||||||
fall=20,
|
fall=20,
|
||||||
sequence="pc",
|
sequence="none",
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
target=0,reach=Event.newPC,
|
target=0,reach=Event.newPC,
|
||||||
ospin=false,
|
ospin=false,
|
||||||
@@ -1160,8 +1277,8 @@ defaultModeEnv={
|
|||||||
reach=Event.win,
|
reach=Event.win,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Fkey=true,
|
Fkey=true,puzzle=true,
|
||||||
reach=Event.win,
|
target=0,reach=Event.puzzleCheck,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
955
gamefunc.lua
BIN
image/block.png
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 404 B |
|
Before Width: | Height: | Size: 882 B |
|
Before Width: | Height: | Size: 973 B |
BIN
image/mess/charge.png
Normal file
|
After Width: | Height: | Size: 140 B |
|
Before Width: | Height: | Size: 423 B |
|
Before Width: | Height: | Size: 421 B |
BIN
image/mess/power.png
Normal file
|
After Width: | Height: | Size: 147 B |
|
Before Width: | Height: | Size: 44 KiB |
@@ -1,3 +1,5 @@
|
|||||||
|
local SWC={[true]="开",[false]="关"}
|
||||||
|
local BK="返回"
|
||||||
return{
|
return{
|
||||||
atkModeName={"随机","徽章","击杀","反击"},
|
atkModeName={"随机","徽章","击杀","反击"},
|
||||||
royale_remain=function(n)return"剩余 "..n.." 名玩家"end,
|
royale_remain=function(n)return"剩余 "..n.." 名玩家"end,
|
||||||
@@ -14,6 +16,8 @@ return{
|
|||||||
hold="暂存",next="下一个",
|
hold="暂存",next="下一个",
|
||||||
|
|
||||||
stage={"关卡 1","关卡 2","关卡 3","关卡 4","关卡 5",},
|
stage={"关卡 1","关卡 2","关卡 3","关卡 4","关卡 5",},
|
||||||
|
awesome="精彩。",
|
||||||
|
continue="继续。",
|
||||||
maxspeed="最高速度",
|
maxspeed="最高速度",
|
||||||
speedup="速度加快",
|
speedup="速度加快",
|
||||||
|
|
||||||
@@ -95,6 +99,7 @@ return{
|
|||||||
"整个游戏都是MrZ完成的!",
|
"整个游戏都是MrZ完成的!",
|
||||||
"大满贯10连击消四全清!",
|
"大满贯10连击消四全清!",
|
||||||
"<方块研究所>有一个Nspire-CX版本!",
|
"<方块研究所>有一个Nspire-CX版本!",
|
||||||
|
"B2B2B???",
|
||||||
"B2B2B2B存在吗?",
|
"B2B2B2B存在吗?",
|
||||||
"MEGACMB!",
|
"MEGACMB!",
|
||||||
"ALLSPIN!",
|
"ALLSPIN!",
|
||||||
@@ -112,7 +117,7 @@ return{
|
|||||||
"本游戏难度上限很高,做好心理准备",
|
"本游戏难度上限很高,做好心理准备",
|
||||||
"方块可以不是个休闲游戏",
|
"方块可以不是个休闲游戏",
|
||||||
"调到特殊的日期也不会发生什么的",
|
"调到特殊的日期也不会发生什么的",
|
||||||
"[随机文本]",
|
"3.1415926535897932384",
|
||||||
},
|
},
|
||||||
stat={
|
stat={
|
||||||
"游戏运行次数:",
|
"游戏运行次数:",
|
||||||
@@ -150,6 +155,7 @@ return{
|
|||||||
group="官方QQ群",
|
group="官方QQ群",
|
||||||
ButtonText={
|
ButtonText={
|
||||||
main={
|
main={
|
||||||
|
qplay="快速开始",
|
||||||
play="开始",
|
play="开始",
|
||||||
setting="设置",
|
setting="设置",
|
||||||
music="音乐室",
|
music="音乐室",
|
||||||
@@ -164,13 +170,14 @@ return{
|
|||||||
right="→",
|
right="→",
|
||||||
start="开始",
|
start="开始",
|
||||||
custom="自定义(C)",
|
custom="自定义(C)",
|
||||||
back="返回",
|
back=BK,
|
||||||
},
|
},
|
||||||
music={
|
music={
|
||||||
|
bgm=function()return"音乐:"..SWC[setting.bgm]end,
|
||||||
up="↑",
|
up="↑",
|
||||||
play="播放",
|
play="播放",
|
||||||
down="↓",
|
down="↓",
|
||||||
back="返回",
|
back=BK,
|
||||||
},
|
},
|
||||||
custom={
|
custom={
|
||||||
up="↑",
|
up="↑",
|
||||||
@@ -185,25 +192,25 @@ return{
|
|||||||
set3="无尽",
|
set3="无尽",
|
||||||
set4="隐形",
|
set4="隐形",
|
||||||
set5="极限",
|
set5="极限",
|
||||||
back="返回",
|
back=BK,
|
||||||
},
|
},
|
||||||
draw={
|
draw={
|
||||||
any="不定",
|
any="不定",
|
||||||
block1="■",
|
block1="Z",
|
||||||
block2="■",
|
block2="S",
|
||||||
block3="■",
|
block3="L",
|
||||||
block4="■",
|
block4="J",
|
||||||
block5="■",
|
block5="T",
|
||||||
block6="■",
|
block6="O",
|
||||||
block7="■",
|
block7="I",
|
||||||
gb1="■",
|
gb1="■",
|
||||||
gb2="■",
|
gb2="■",
|
||||||
gb3="■",
|
gb3="■",
|
||||||
gb4="■",
|
gb4="■",
|
||||||
gb5="■",
|
gb5="■",
|
||||||
space="×",
|
space="×",
|
||||||
clear="清空",
|
clear="清除",
|
||||||
back="返回",
|
back=BK,
|
||||||
},
|
},
|
||||||
play={
|
play={
|
||||||
pause="暂停",
|
pause="暂停",
|
||||||
@@ -213,12 +220,12 @@ return{
|
|||||||
quit="退出",
|
quit="退出",
|
||||||
},
|
},
|
||||||
setting={
|
setting={
|
||||||
ghost=function()return setting.ghost and"阴影:开"or"阴影:关"end,
|
ghost=function()return"阴影:"..SWC[setting.ghost]end,
|
||||||
center=function()return setting.center and"旋转中心:开"or"旋转中心:关"end,
|
center=function()return"旋转中心:"..SWC[setting.center]end,
|
||||||
grid=function()return setting.grid and"网格:开"or"网格:关"end,
|
grid=function()return"网格:"..SWC[setting.grid]end,
|
||||||
swap=function()return setting.swap and"目标选择:组合键"or"目标选择:循环"end,
|
swap=function()return setting.swap and"目标选择:组合键"or"目标选择:循环"end,
|
||||||
fxs=function()return setting.fxs and"特效:开"or"特效:关"end,
|
fxs=function()return setting.fxs>0 and"特效等级:"..setting.fxs or"特效 关"end,
|
||||||
bg=function()return setting.bg and"背景:开"or"背景:关"end,
|
bg=function()return"背景:"..SWC[setting.bg]end,
|
||||||
dasD="-",dasU="+",
|
dasD="-",dasU="+",
|
||||||
arrD="-",arrU="+",
|
arrD="-",arrU="+",
|
||||||
sddasD="-",sddasU="+",
|
sddasD="-",sddasU="+",
|
||||||
@@ -226,35 +233,42 @@ return{
|
|||||||
ctrl="控制设置",
|
ctrl="控制设置",
|
||||||
touch="触摸设置",
|
touch="触摸设置",
|
||||||
lang=function()return langName[setting.lang]end,
|
lang=function()return langName[setting.lang]end,
|
||||||
sfx=function()return setting.sfx and"音效:开"or"音效:关"end,
|
sfx=function()return"音效:"..SWC[setting.sfx]end,
|
||||||
bgm=function()return setting.bgm and"音乐:开"or"音乐:关"end,
|
bgm=function()return"音乐:"..SWC[setting.bgm]end,
|
||||||
vib=function()return "震动:"..setting.vib end,
|
vib=function()return "震动:"..setting.vib end,
|
||||||
voc=function()return setting.voc and"语音:开"or"语音:关"end,
|
voc=function()return"语音:"..SWC[setting.voc]end,
|
||||||
fullscreen=function()return setting.fullscreen and"全屏:开"or"全屏:关"end,
|
fullscreen=function()return"全屏:"..SWC[setting.fullscreen]end,
|
||||||
bgblock=function()return setting.bgblock and"背景动画:开"or"背景动画:关"end,
|
bgblock=function()return"背景动画:"..SWC[setting.bgblock]end,
|
||||||
frame=function()return"绘制帧:"..setting.frameMul.."%"end,
|
frame=function()return"绘制帧:"..setting.frameMul.."%"end,
|
||||||
skin="切换方块皮肤",
|
skin="皮肤",
|
||||||
|
smo=function()return"平滑下落:"..SWC[setting.smo]end,
|
||||||
back="保存&返回",
|
back="保存&返回",
|
||||||
},
|
},
|
||||||
setting2={
|
setting2={
|
||||||
back="返回",
|
back=BK,
|
||||||
},
|
},
|
||||||
setting3={
|
setting3={
|
||||||
back="返回",
|
back=BK,
|
||||||
hide=function()return setting.virtualkeySwitch and"隐藏虚拟按键"or"显示虚拟按键"end,
|
hide=function()return setting.virtualkeySwitch and"隐藏虚拟按键"or"显示虚拟按键"end,
|
||||||
default="默认组合",
|
default="默认组合",
|
||||||
snap=function()return text.snapLevelName[snapLevel]end,
|
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="大小",
|
||||||
},
|
},
|
||||||
help={
|
help={
|
||||||
back="返回",
|
his="历史",
|
||||||
qq="作者QQ",
|
qq="作者QQ",
|
||||||
|
back=BK,
|
||||||
|
},
|
||||||
|
history={
|
||||||
|
prev="←",
|
||||||
|
next="→",
|
||||||
|
back=BK,
|
||||||
},
|
},
|
||||||
stat={
|
stat={
|
||||||
back="返回",
|
|
||||||
path="打开存储目录",
|
path="打开存储目录",
|
||||||
|
back=BK,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}--文
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
local SWC={[true]="开",[false]="关"}
|
||||||
|
local BK="返回"
|
||||||
return{
|
return{
|
||||||
atkModeName={"随机","徽章","击杀","反击"},
|
atkModeName={"随机","徽章","击杀","反击"},
|
||||||
royale_remain=function(n)return"剩余 "..n.." 名玩家"end,
|
royale_remain=function(n)return"剩余 "..n.." 名玩家"end,
|
||||||
@@ -14,6 +16,8 @@ return{
|
|||||||
hold="暂存",next="下一个",
|
hold="暂存",next="下一个",
|
||||||
|
|
||||||
stage={"关卡 1","关卡 2","关卡 3","关卡 4","关卡 5",},
|
stage={"关卡 1","关卡 2","关卡 3","关卡 4","关卡 5",},
|
||||||
|
awesome="精彩。",
|
||||||
|
continue="继续。",
|
||||||
maxspeed="最高速度",
|
maxspeed="最高速度",
|
||||||
speedup="速度加快",
|
speedup="速度加快",
|
||||||
|
|
||||||
@@ -95,6 +99,7 @@ return{
|
|||||||
"整个游戏都是MrZ完成的!",
|
"整个游戏都是MrZ完成的!",
|
||||||
"大满贯10连击消四全清!",
|
"大满贯10连击消四全清!",
|
||||||
"<方块研究所>有一个Nspire-CX版本!",
|
"<方块研究所>有一个Nspire-CX版本!",
|
||||||
|
"B2B2B???",
|
||||||
"B2B2B2B存在吗?",
|
"B2B2B2B存在吗?",
|
||||||
"MEGACMB!",
|
"MEGACMB!",
|
||||||
"ALLSPIN!",
|
"ALLSPIN!",
|
||||||
@@ -112,7 +117,7 @@ return{
|
|||||||
"本游戏难度上限很高,做好心理准备",
|
"本游戏难度上限很高,做好心理准备",
|
||||||
"方块可以不是个休闲游戏",
|
"方块可以不是个休闲游戏",
|
||||||
"调到特殊的日期也不会发生什么的",
|
"调到特殊的日期也不会发生什么的",
|
||||||
"[随机文本]",
|
"3.1415926535897932384",
|
||||||
},
|
},
|
||||||
stat={
|
stat={
|
||||||
"游戏运行次数:",
|
"游戏运行次数:",
|
||||||
@@ -150,6 +155,7 @@ return{
|
|||||||
group="官方QQ群",
|
group="官方QQ群",
|
||||||
ButtonText={
|
ButtonText={
|
||||||
main={
|
main={
|
||||||
|
qplay="快速开始",
|
||||||
play="开始",
|
play="开始",
|
||||||
setting="设置",
|
setting="设置",
|
||||||
music="音乐室",
|
music="音乐室",
|
||||||
@@ -164,13 +170,14 @@ return{
|
|||||||
right="→",
|
right="→",
|
||||||
start="开始",
|
start="开始",
|
||||||
custom="自定义(C)",
|
custom="自定义(C)",
|
||||||
back="返回",
|
back=BK,
|
||||||
},
|
},
|
||||||
music={
|
music={
|
||||||
|
bgm=function()return"音乐:"..SWC[setting.bgm]end,
|
||||||
up="↑",
|
up="↑",
|
||||||
play="播放",
|
play="播放",
|
||||||
down="↓",
|
down="↓",
|
||||||
back="返回",
|
back=BK,
|
||||||
},
|
},
|
||||||
custom={
|
custom={
|
||||||
up="↑",
|
up="↑",
|
||||||
@@ -185,25 +192,25 @@ return{
|
|||||||
set3="无尽",
|
set3="无尽",
|
||||||
set4="隐形",
|
set4="隐形",
|
||||||
set5="极限",
|
set5="极限",
|
||||||
back="返回",
|
back=BK,
|
||||||
},
|
},
|
||||||
draw={
|
draw={
|
||||||
any="不定",
|
any="不定",
|
||||||
block1="■",
|
block1="Z",
|
||||||
block2="■",
|
block2="S",
|
||||||
block3="■",
|
block3="L",
|
||||||
block4="■",
|
block4="J",
|
||||||
block5="■",
|
block5="T",
|
||||||
block6="■",
|
block6="O",
|
||||||
block7="■",
|
block7="I",
|
||||||
gb1="■",
|
gb1="■",
|
||||||
gb2="■",
|
gb2="■",
|
||||||
gb3="■",
|
gb3="■",
|
||||||
gb4="■",
|
gb4="■",
|
||||||
gb5="■",
|
gb5="■",
|
||||||
space="×",
|
space="×",
|
||||||
clear="清空",
|
clear="清除",
|
||||||
back="返回",
|
back=BK,
|
||||||
},
|
},
|
||||||
play={
|
play={
|
||||||
pause="暂停",
|
pause="暂停",
|
||||||
@@ -213,12 +220,12 @@ return{
|
|||||||
quit="退出",
|
quit="退出",
|
||||||
},
|
},
|
||||||
setting={
|
setting={
|
||||||
ghost=function()return setting.ghost and"阴影:开"or"阴影:关"end,
|
ghost=function()return"阴影:"..SWC[setting.ghost]end,
|
||||||
center=function()return setting.center and"旋转中心:开"or"旋转中心:关"end,
|
center=function()return"旋转中心:"..SWC[setting.center]end,
|
||||||
grid=function()return setting.grid and"网格:开"or"网格:关"end,
|
grid=function()return"网格:"..SWC[setting.grid]end,
|
||||||
swap=function()return setting.swap and"目标选择:组合键"or"目标选择:循环"end,
|
swap=function()return setting.swap and"目标选择:组合键"or"目标选择:循环"end,
|
||||||
fxs=function()return setting.fxs and"特效:开"or"特效:关"end,
|
fxs=function()return setting.fxs>0 and"特效等级:"..setting.fxs or"特效 关"end,
|
||||||
bg=function()return setting.bg and"背景:开"or"背景:关"end,
|
bg=function()return"背景:"..SWC[setting.bg]end,
|
||||||
dasD="-",dasU="+",
|
dasD="-",dasU="+",
|
||||||
arrD="-",arrU="+",
|
arrD="-",arrU="+",
|
||||||
sddasD="-",sddasU="+",
|
sddasD="-",sddasU="+",
|
||||||
@@ -226,35 +233,42 @@ return{
|
|||||||
ctrl="控制设置",
|
ctrl="控制设置",
|
||||||
touch="触摸设置",
|
touch="触摸设置",
|
||||||
lang=function()return langName[setting.lang]end,
|
lang=function()return langName[setting.lang]end,
|
||||||
sfx=function()return setting.sfx and"音效:开"or"音效:关"end,
|
sfx=function()return"音效:"..SWC[setting.sfx]end,
|
||||||
bgm=function()return setting.bgm and"音乐:开"or"音乐:关"end,
|
bgm=function()return"音乐:"..SWC[setting.bgm]end,
|
||||||
vib=function()return "震动:"..setting.vib end,
|
vib=function()return "震动:"..setting.vib end,
|
||||||
voc=function()return setting.voc and"语音:开"or"语音:关"end,
|
voc=function()return"语音:"..SWC[setting.voc]end,
|
||||||
fullscreen=function()return setting.fullscreen and"全屏:开"or"全屏:关"end,
|
fullscreen=function()return"全屏:"..SWC[setting.fullscreen]end,
|
||||||
bgblock=function()return setting.bgblock and"背景动画:开"or"背景动画:关"end,
|
bgblock=function()return"背景动画:"..SWC[setting.bgblock]end,
|
||||||
frame=function()return"绘制帧:"..setting.frameMul.."%"end,
|
frame=function()return"绘制帧:"..setting.frameMul.."%"end,
|
||||||
skin="切换方块皮肤",
|
skin="皮肤",
|
||||||
|
smo=function()return"平滑下落:"..SWC[setting.smo]end,
|
||||||
back="保存&返回",
|
back="保存&返回",
|
||||||
},
|
},
|
||||||
setting2={
|
setting2={
|
||||||
back="返回",
|
back=BK,
|
||||||
},
|
},
|
||||||
setting3={
|
setting3={
|
||||||
back="返回",
|
back=BK,
|
||||||
hide=function()return setting.virtualkeySwitch and"隐藏虚拟按键"or"显示虚拟按键"end,
|
hide=function()return setting.virtualkeySwitch and"隐藏虚拟按键"or"显示虚拟按键"end,
|
||||||
default="默认组合",
|
default="默认组合",
|
||||||
snap=function()return text.snapLevelName[snapLevel]end,
|
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="大小",
|
||||||
},
|
},
|
||||||
help={
|
help={
|
||||||
back="返回",
|
his="历史",
|
||||||
qq="作者QQ",
|
qq="作者QQ",
|
||||||
|
back=BK,
|
||||||
|
},
|
||||||
|
history={
|
||||||
|
prev="←",
|
||||||
|
next="→",
|
||||||
|
back=BK,
|
||||||
},
|
},
|
||||||
stat={
|
stat={
|
||||||
back="返回",
|
|
||||||
path="打开存储目录",
|
path="打开存储目录",
|
||||||
|
back=BK,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}--部分译文
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
local SWC={[true]="ON",[false]="OFF"}
|
||||||
|
local BK="Back"
|
||||||
return{
|
return{
|
||||||
atkModeName={"Random","Badges","K.O.s","Counters"},
|
atkModeName={"Random","Badges","K.O.s","Counters"},
|
||||||
royale_remain=function(n)return n.." Players Remain"end,
|
royale_remain=function(n)return n.." Players Remain"end,
|
||||||
@@ -14,6 +16,8 @@ return{
|
|||||||
hold="Hold",next="Next",
|
hold="Hold",next="Next",
|
||||||
|
|
||||||
stage={"STAGE 1","STAGE 2","STAGE 3","STAGE 4","STAGE 5",},
|
stage={"STAGE 1","STAGE 2","STAGE 3","STAGE 4","STAGE 5",},
|
||||||
|
awesome="Awesome.",
|
||||||
|
continue="Continue.",
|
||||||
maxspeed="Max speed",
|
maxspeed="Max speed",
|
||||||
speedup="Speed up",
|
speedup="Speed up",
|
||||||
|
|
||||||
@@ -95,6 +99,7 @@ return{
|
|||||||
"The WHOLE game is made by MrZ!",
|
"The WHOLE game is made by MrZ!",
|
||||||
"Back to Back 10 combo Techrash PC!",
|
"Back to Back 10 combo Techrash PC!",
|
||||||
"Techmino has a Nspire-CX edition!",
|
"Techmino has a Nspire-CX edition!",
|
||||||
|
"B2B2B???",
|
||||||
"Is B2B2B2B possible?",
|
"Is B2B2B2B possible?",
|
||||||
"MEGACMB!",
|
"MEGACMB!",
|
||||||
"ALLSPIN!",
|
"ALLSPIN!",
|
||||||
@@ -112,7 +117,7 @@ return{
|
|||||||
"This game can be very hard,be mentally perpared",
|
"This game can be very hard,be mentally perpared",
|
||||||
"This in not a casual game",
|
"This in not a casual game",
|
||||||
"Nothing will happen when some special day come",
|
"Nothing will happen when some special day come",
|
||||||
"[random text]",
|
"3.1415926535897932384",
|
||||||
},
|
},
|
||||||
stat={
|
stat={
|
||||||
"Games run:",
|
"Games run:",
|
||||||
@@ -150,6 +155,7 @@ return{
|
|||||||
group="Official QQ Group",
|
group="Official QQ Group",
|
||||||
ButtonText={
|
ButtonText={
|
||||||
main={
|
main={
|
||||||
|
qplay="Qplay",
|
||||||
play="Play",
|
play="Play",
|
||||||
setting="Settings",
|
setting="Settings",
|
||||||
music="Music room",
|
music="Music room",
|
||||||
@@ -164,13 +170,14 @@ return{
|
|||||||
right="→",
|
right="→",
|
||||||
start="Start",
|
start="Start",
|
||||||
custom="Custom(C)",
|
custom="Custom(C)",
|
||||||
back="Back",
|
back=BK,
|
||||||
},
|
},
|
||||||
music={
|
music={
|
||||||
|
bgm=function()return"BGM:"..SWC[setting.bgm]end,
|
||||||
up="↑",
|
up="↑",
|
||||||
play="Play",
|
play="Play",
|
||||||
down="↓",
|
down="↓",
|
||||||
back="Back",
|
back=BK,
|
||||||
},
|
},
|
||||||
custom={
|
custom={
|
||||||
up="↑",
|
up="↑",
|
||||||
@@ -184,26 +191,26 @@ return{
|
|||||||
set2="1v1",
|
set2="1v1",
|
||||||
set3="infinite",
|
set3="infinite",
|
||||||
set4="blind",
|
set4="blind",
|
||||||
set5="classic",
|
set5="master",
|
||||||
back="Back",
|
back=BK,
|
||||||
},
|
},
|
||||||
draw={
|
draw={
|
||||||
any="ANY",
|
any="ANY",
|
||||||
block1="■",
|
block1="Z",
|
||||||
block2="■",
|
block2="S",
|
||||||
block3="■",
|
block3="L",
|
||||||
block4="■",
|
block4="J",
|
||||||
block5="■",
|
block5="T",
|
||||||
block6="■",
|
block6="O",
|
||||||
block7="■",
|
block7="I",
|
||||||
gb1="■",
|
gb1="■",
|
||||||
gb2="■",
|
gb2="■",
|
||||||
gb3="■",
|
gb3="■",
|
||||||
gb4="■",
|
gb4="■",
|
||||||
gb5="■",
|
gb5="■",
|
||||||
space="×",
|
space="×",
|
||||||
clear="CLEAR",
|
clear="Clear",
|
||||||
back="Back",
|
back=BK,
|
||||||
},
|
},
|
||||||
play={
|
play={
|
||||||
pause="Pause",
|
pause="Pause",
|
||||||
@@ -213,12 +220,12 @@ return{
|
|||||||
quit="Quit",
|
quit="Quit",
|
||||||
},
|
},
|
||||||
setting={
|
setting={
|
||||||
ghost=function()return setting.ghost and"Ghost:ON"or"Ghost:OFF"end,
|
ghost=function()return"Ghost:"..SWC[setting.ghost]end,
|
||||||
center=function()return setting.center and"Center:ON"or"Center:OFF"end,
|
center=function()return"Center:"..SWC[setting.center]end,
|
||||||
grid=function()return setting.grid and"Grid:ON"or"Grid:OFF"end,
|
grid=function()return"Grid:"..SWC[setting.grid]end,
|
||||||
swap=function()return setting.swap and"Swap:comboKey"or"Swap:loop"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,
|
fxs=function()return setting.fxs>0 and"FX level:"..setting.fxs or"NO FX"end,
|
||||||
bg=function()return setting.bg and"BG:ON"or"BG:OFF"end,
|
bg=function()return"BG:"..SWC[setting.bg]end,
|
||||||
dasD="-",dasU="+",
|
dasD="-",dasU="+",
|
||||||
arrD="-",arrU="+",
|
arrD="-",arrU="+",
|
||||||
sddasD="-",sddasU="+",
|
sddasD="-",sddasU="+",
|
||||||
@@ -226,35 +233,42 @@ return{
|
|||||||
ctrl="Control settings",
|
ctrl="Control settings",
|
||||||
touch="Touch settings",
|
touch="Touch settings",
|
||||||
lang=function()return langName[setting.lang]end,
|
lang=function()return langName[setting.lang]end,
|
||||||
sfx=function()return setting.sfx and"SFX:ON"or"SFX:OFF"end,
|
sfx=function()return"SFX:"..SWC[setting.sfx]end,
|
||||||
bgm=function()return setting.bgm and"BGM:ON"or"BGM:OFF"end,
|
bgm=function()return"BGM:"..SWC[setting.bgm]end,
|
||||||
voc=function()return setting.voc and"VOC:ON"or"VOC:OFF"end,
|
voc=function()return"VOC:"..SWC[setting.voc]end,
|
||||||
vib=function()return "VIB:"..setting.vib end,
|
vib=function()return "VIB:"..setting.vib end,
|
||||||
fullscreen=function()return setting.fullscreen and"Fullscreen:ON"or"Fullscreen:OFF"end,
|
fullscreen=function()return"Fullscreen:"..SWC[setting.fullscreen]end,
|
||||||
bgblock=function()return setting.bgblock and"BG animation:ON"or"BG animation:OFF"end,
|
bgblock=function()return"BG animation:"..SWC[setting.bgblock]end,
|
||||||
frame=function()return"FrameDraw:"..setting.frameMul.."%"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",
|
back="Save&Back",
|
||||||
},
|
},
|
||||||
setting2={
|
setting2={
|
||||||
back="Back",
|
back=BK,
|
||||||
},
|
},
|
||||||
setting3={
|
setting3={
|
||||||
back="Back",
|
back=BK,
|
||||||
hide=function()return setting.virtualkeySwitch and"Hide Virtual Key"or"Show Virtual Key"end,
|
hide=function()return setting.virtualkeySwitch and"Hide Virtual Key"or"Show Virtual Key"end,
|
||||||
default="Defaults",
|
default="Defaults",
|
||||||
snap=function()return text.snapLevelName[snapLevel]end,
|
snap=function()return text.snapLevelName[snapLevel]end,
|
||||||
alpha=function()return percent0to5[setting.virtualkeyAlpha]end,
|
alpha=function()return setting.virtualkeyAlpha.."0%"end,
|
||||||
icon="Icon",
|
icon="Icon",
|
||||||
size="Size",
|
size="Size",
|
||||||
},
|
},
|
||||||
help={
|
help={
|
||||||
back="Back",
|
his="History",
|
||||||
qq="Author's qq",
|
qq="Author's qq",
|
||||||
|
back=BK,
|
||||||
|
},
|
||||||
|
history={
|
||||||
|
prev="←",
|
||||||
|
next="→",
|
||||||
|
back=BK,
|
||||||
},
|
},
|
||||||
stat={
|
stat={
|
||||||
back="Back",
|
|
||||||
path="Open Data Folder",
|
path="Open Data Folder",
|
||||||
|
back=BK,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
126
list.lua
@@ -2,6 +2,8 @@ local gc=love.graphics
|
|||||||
local tc,kb=love.touch,love.keyboard
|
local tc,kb=love.touch,love.keyboard
|
||||||
local sys=love.system
|
local sys=love.system
|
||||||
local fs=love.filesystem
|
local fs=love.filesystem
|
||||||
|
local mobile=mobile
|
||||||
|
|
||||||
actName={"moveLeft","moveRight","rotRight","rotLeft","rotFlip","hardDrop","softDrop","hold","func","restart","insLeft","insRight","insDown"}
|
actName={"moveLeft","moveRight","rotRight","rotLeft","rotFlip","hardDrop","softDrop","hold","func","restart","insLeft","insRight","insDown"}
|
||||||
color={
|
color={
|
||||||
red={1,0,0},
|
red={1,0,0},
|
||||||
@@ -44,8 +46,8 @@ blockColor={
|
|||||||
color.yellow,
|
color.yellow,
|
||||||
color.cyan,
|
color.cyan,
|
||||||
color.darkGreen,
|
color.darkGreen,
|
||||||
color.darkGrey,
|
|
||||||
color.grey,
|
color.grey,
|
||||||
|
color.lightGrey,
|
||||||
color.darkPurple,
|
color.darkPurple,
|
||||||
color.darkRed,
|
color.darkRed,
|
||||||
color.darkGreen,
|
color.darkGreen,
|
||||||
@@ -155,7 +157,6 @@ customRange={
|
|||||||
RCPB={10,33,200,33,105,5,105,60}
|
RCPB={10,33,200,33,105,5,105,60}
|
||||||
snapLevelValue={1,10,20,40,60,80}
|
snapLevelValue={1,10,20,40,60,80}
|
||||||
up0to4={[0]="000%UP","025%UP","050%UP","075%UP","100%UP",}
|
up0to4={[0]="000%UP","025%UP","050%UP","075%UP","100%UP",}
|
||||||
percent0to5={[0]="0%","20%","40%","60%","80%","100%",}
|
|
||||||
|
|
||||||
modeID={
|
modeID={
|
||||||
[0]="custom",
|
[0]="custom",
|
||||||
@@ -173,8 +174,8 @@ modeLevel={
|
|||||||
tsd={"NORMAL","HARD"},
|
tsd={"NORMAL","HARD"},
|
||||||
blind={"EASY","HARD","HARD+","LUNATIC","ULTIMATE","GM"},
|
blind={"EASY","HARD","HARD+","LUNATIC","ULTIMATE","GM"},
|
||||||
dig={"NORMAL","LUNATIC"},
|
dig={"NORMAL","LUNATIC"},
|
||||||
survivor={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE"},
|
survivor={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE","EXTRA"},
|
||||||
tech={"NORMAL","NORMAL+","HARD","LUNATIC","ULTIMATE"},
|
tech={"NORMAL","NORMAL+","HARD","HARD+","LUNATIC","LUNATIC+",},
|
||||||
c4wtrain={"NORMAL","LUNATIC"},
|
c4wtrain={"NORMAL","LUNATIC"},
|
||||||
pctrain={"NORMAL","EXTRA"},
|
pctrain={"NORMAL","EXTRA"},
|
||||||
pcchallenge={"NORMAL","HARD","LUNATIC"},
|
pcchallenge={"NORMAL","HARD","LUNATIC"},
|
||||||
@@ -260,9 +261,9 @@ local virtualkeySet={
|
|||||||
},--PC key feedback
|
},--PC key feedback
|
||||||
}
|
}
|
||||||
local customSet={
|
local customSet={
|
||||||
{20,20,1,1,7,1,1,1,3,4,1,3,3},
|
{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},
|
{18,20,1,1,7,1,1,1,8,3,8,3,3},
|
||||||
{22,22,1,1,7,3,1,3,8,4,1,8,7},
|
{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},
|
{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},
|
{23,11,8,11,4,1,2,1,8,3,1,4,9},
|
||||||
}
|
}
|
||||||
@@ -277,34 +278,49 @@ Buttons={
|
|||||||
load={},
|
load={},
|
||||||
intro={},
|
intro={},
|
||||||
main={
|
main={
|
||||||
play= {x=380,y=300,w=240, h=240,rgb=color.red, f=70,code=function()gotoScene("mode")end,down="stat",right="setting"},
|
qplay= {x=160,y=300,w=150, h=150, rgb=color.lightRed, f=40,code=function()loadGame(modeSel,levelSel)end,down="stat",right="play"},
|
||||||
setting={x=640,y=300,w=240, h=240,rgb=color.lightBlue, f=55,code=function()gotoScene("setting")end,down="stat",left="play",right="music"},
|
play= {x=380,y=300,w=240, h=240, rgb=color.red, f=70,code=function()gotoScene("mode")end,down="stat",left="qplay",right="setting"},
|
||||||
music= {x=900,y=300,w=240, h=240,rgb=color.lightCyan, f=42,code=function()gotoScene("music")end,down="help",left="setting",right="quit"},
|
setting={x=640,y=300,w=240, h=240, rgb=color.lightBlue,f=55,code=function()gotoScene("setting")end,down="stat",left="play",right="music"},
|
||||||
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"},
|
music= {x=900,y=300,w=240, h=240, rgb=color.lightCyan,f=42,code=function()gotoScene("music")end,down="help",left="setting",right="quit"},
|
||||||
help= {x=900,y=560,w=240, h=240,rgb=color.yellow, f=55,code=function()gotoScene("help")end,up="music",left="stat",right="quit"},
|
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"},
|
||||||
quit= {x=1180,y=620,w=120,h=120,rgb=color.lightGrey, f=50,code=function()gotoScene("quit")end,up="setting",left="help"},
|
help= {x=900,y=560,w=240, h=240, rgb=color.yellow, f=55,code=function()gotoScene("help")end,up="music",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"},
|
||||||
},
|
},
|
||||||
mode={
|
mode={
|
||||||
up= {x=1000,y=210,w=200,h=140, rgb=color.white, f=80, code=function()love.keypressed("up")end, hide=function()return modeSel==1 end,},
|
up= {x=1000,y=210,w=200,h=140, rgb=color.white, f=80, code=function()love.keypressed("up")end, hide=function()return modeSel==1 end,},
|
||||||
down= {x=1000,y=430,w=200,h=140, rgb=color.white, f=80, code=function()love.keypressed("down")end, hide=function()return modeSel==#modeID end,},
|
down= {x=1000,y=430,w=200,h=140, rgb=color.white, f=80, code=function()love.keypressed("down")end, hide=function()return modeSel==#modeID end,},
|
||||||
left= {x=190, y=160,w=100,h=80, rgb=color.white, code=function()love.keypressed("left")end, hide=function()return levelSel==1 end,},
|
left= {x=190, y=160,w=100,h=80, rgb=color.white, code=function()love.keypressed("left")end, hide=function()return levelSel==1 end,},
|
||||||
right= {x=350, y=160,w=100,h=80, rgb=color.white, code=function()love.keypressed("right")end,hide=function()return levelSel==#modeLevel[modeID[modeSel]]end,},
|
right= {x=350, y=160,w=100,h=80, rgb=color.white, code=function()love.keypressed("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()
|
start= {x=1000,y=600,w=250,h=100, rgb=color.green, f=50, code=function()loadGame(modeSel,levelSel)end},
|
||||||
loadGame(modeSel,levelSel)end},
|
|
||||||
custom= {x=275, y=420,w=200,h=90, rgb=color.yellow, code=function()gotoScene("custom")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},
|
back= {x=640, y=630,w=230,h=90, rgb=color.white, f=45, code=back},
|
||||||
},
|
},
|
||||||
music={
|
music={
|
||||||
up= {x=1100,y=200,w=120,h=120, rgb=color.white,f=40,code=function()sel=(sel-2)%#musicID+1 end},
|
bgm= {x=1100,y=80, w=160, h=80, rgb=color.white,code=function()BGM()setting.bgm=not setting.bgm end},
|
||||||
play= {x=1100,y=340,w=120,h=120, rgb=color.white,f=40,code=function()BGM(musicID[sel])end},
|
up= {x=1100,y=200, w=120, h=120, rgb=color.white,f=40,hide=function()return not setting.bgm end,code=function()sel=(sel-2)%#musicID+1 end},
|
||||||
down= {x=1100,y=480,w=120,h=120, rgb=color.white,f=50,code=function()sel=sel%#musicID+1 end},
|
play= {x=1100,y=340, w=120, h=120, rgb=color.white,f=40,hide=function()return not setting.bgm end,code=function()BGM(musicID[sel])end},
|
||||||
back= {x=640, y=630,w=230,h=90, rgb=color.white,f=45,code=back},
|
down= {x=1100,y=480, w=120, h=120, rgb=color.white,f=50,hide=function()return not setting.bgm end,code=function()sel=sel%#musicID+1 end},
|
||||||
|
back= {x=640, y=630, w=230, h=90, rgb=color.white,f=45,code=back},
|
||||||
},
|
},
|
||||||
custom={
|
custom={
|
||||||
up= {x=1000,y=220, w=100,h=100, rgb=color.white,f=50, code=function()optSel=(optSel-2)%#customID+1 end},
|
up= {x=1000,y=220, w=100,h=100, rgb=color.white,f=50, code=function()sel=(sel-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},
|
down= {x=1000,y=460, w=100,h=100, rgb=color.white,f=50, code=function()sel=sel%#customID+1 end},
|
||||||
left= {x=880, y=340, w=100,h=100, rgb=color.white,f=50, code=function()customSel[optSel]=(customSel[optSel]-2)%#customRange[customID[optSel]]+1 end},
|
left= {x=880, y=340, w=100,h=100, rgb=color.white,f=50, code=function()
|
||||||
right= {x=1120,y=340, w=100,h=100, rgb=color.white,f=50, code=function()customSel[optSel]=customSel[optSel]%#customRange[customID[optSel]]+1 end},
|
customSel[sel]=(customSel[sel]-2)%#customRange[customID[sel]]+1
|
||||||
|
if sel==12 then
|
||||||
|
curBG=customRange.bg[customSel[12]]
|
||||||
|
elseif sel==13 then
|
||||||
|
BGM(customRange.bgm[customSel[13]])
|
||||||
|
end
|
||||||
|
end},
|
||||||
|
right= {x=1120,y=340, w=100,h=100, rgb=color.white,f=50, code=function()
|
||||||
|
customSel[sel]=customSel[sel]%#customRange[customID[sel]]+1
|
||||||
|
if sel==12 then
|
||||||
|
curBG=customRange.bg[customSel[12]]
|
||||||
|
elseif sel==13 then
|
||||||
|
BGM(customRange.bgm[customSel[13]])
|
||||||
|
end
|
||||||
|
end},
|
||||||
start1= {x=880, y=580, w=220,h=70, rgb=color.green, code=function()loadGame(0,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},
|
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},
|
draw= {x=1000,y=90, w=190,h=85, rgb=color.cyan, code=function()gotoScene("draw")end},
|
||||||
@@ -331,8 +347,8 @@ Buttons={
|
|||||||
gb5= {x=1120,y=500,w=120,h=120, f=65, rgb=color.darkGreen,code=function()pen=13 end},
|
gb5= {x=1120,y=500,w=120,h=120, f=65, rgb=color.darkGreen,code=function()pen=13 end},
|
||||||
space= {x=840, y=640,w=120,h=120, f=70, rgb=color.grey, code=function()pen=0 end},
|
space= {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()
|
clear= {x=1120,y=640,w=120,h=120, f=45, rgb=color.white, code=function()
|
||||||
if clearSureTime>0 then
|
if clearSureTime>15 then
|
||||||
for y=1,20 do for x=1,10 do preField[y][x]=0 end end
|
for y=1,20 do for x=1,10 do preField[y][x]=-1 end end
|
||||||
clearSureTime=0
|
clearSureTime=0
|
||||||
else
|
else
|
||||||
clearSureTime=50
|
clearSureTime=50
|
||||||
@@ -352,8 +368,8 @@ Buttons={
|
|||||||
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"},
|
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"},
|
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"},
|
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"},
|
fxs= {x=290, y=230, w=210, h=60, rgb=color.white,code=function()setting.fxs=(setting.fxs+1)%4 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"},
|
bg= {x=505, y=230, w=210, h=60, rgb=color.white,code=function()setting.bg=not setting.bg end,up="swap",down="arrD",left="fxs",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"},
|
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"},
|
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"},
|
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"},
|
||||||
@@ -363,51 +379,39 @@ Buttons={
|
|||||||
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"},
|
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"},
|
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"},
|
||||||
|
|
||||||
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"},
|
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"},
|
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()
|
lang= {x=580,y=510, w=150, h=60,rgb=color.red, code=function()
|
||||||
setting.lang=setting.lang%#langName+1
|
setting.lang=setting.lang%#langName+1
|
||||||
swapLanguage(setting.lang)
|
swapLanguage(setting.lang)
|
||||||
end,up="sdarrU",down="back",left="touch",right="skin"},
|
end,up="sdarrU",down="back",left="touch",right="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"},
|
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= {x=940,y=90, w=160, h=60, rgb=color.white,code=function()BGM()setting.bgm=not setting.bgm BGM("blank")end,down="voc",left="sfx"},
|
||||||
BGM()
|
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",right="voc"},
|
||||||
setting.bgm=not setting.bgm
|
voc= {x=940,y=160, w=160, h=60,rgb=color.white,code=function()setting.voc=not setting.voc end,up="sfx",down="fullscreen",left="vib"},
|
||||||
BGM("blank")
|
fullscreen= {x=850,y=230,w=340, h=60,rgb=color.white, code=function()
|
||||||
end,down="voc",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",right="voc"},
|
|
||||||
voc= {x=940,y=160, w=160, h=60,rgb=color.white,
|
|
||||||
hide=function()return true end,
|
|
||||||
code=function()
|
|
||||||
setting.voc=not setting.voc
|
|
||||||
end,up="sfx",down="fullscreen",left="vib"},
|
|
||||||
fullscreen= {x=850,y=230, w=340,h=60,rgb=color.white, code=function()
|
|
||||||
setting.fullscreen=not setting.fullscreen
|
setting.fullscreen=not setting.fullscreen
|
||||||
love.window.setFullscreen(setting.fullscreen)
|
love.window.setFullscreen(setting.fullscreen)
|
||||||
if not setting.fullscreen then
|
if not setting.fullscreen then
|
||||||
love.resize(gc.getWidth(),gc.getHeight())
|
love.resize(gc.getWidth(),gc.getHeight())
|
||||||
end
|
end
|
||||||
end,up="vib",down="bgblock",left="bg"},
|
end,up="vib",down="bgblock",left="bg"},
|
||||||
bgblock={x=850,y=300, w=340,h=60,rgb=color.white, code=function()
|
bgblock={x=850,y=300, w=340, h=60,rgb=color.white, code=function()
|
||||||
setting.bgblock=not setting.bgblock
|
setting.bgblock=not setting.bgblock
|
||||||
if not setting.bgblock then
|
--if not setting.bgblock then for i=1,16 do BGblockList[i].v=3*BGblockList[i].v end end
|
||||||
for i=1,16 do
|
|
||||||
BGblockList[i].v=3*BGblockList[i].v
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,up="fullscreen",down="frame",left="arrU"},
|
end,up="fullscreen",down="frame",left="arrU"},
|
||||||
frame= {x=850,y=370, w=340,h=60,rgb=color.white, code=function()
|
frame= {x=850,y=370, w=340, h=60,rgb=color.white, code=function()
|
||||||
setting.frameMul=setting.frameMul+(setting.frameMul<50 and 5 or 10)
|
setting.frameMul=setting.frameMul+(setting.frameMul<50 and 5 or 10)
|
||||||
if setting.frameMul>100 then setting.frameMul=25 end
|
if setting.frameMul>100 then setting.frameMul=25 end
|
||||||
end,up="bgblock",down="skin",left="sdarrU"},
|
end,up="bgblock",down="skin",left="sdarrU"},
|
||||||
skin= {x=850,y=440, w=340,h=60,rgb=color.white, code=function()
|
skin= {x=740,y=440, w=120, h=60,rgb=color.white, code=function()
|
||||||
setting.skin=setting.skin%6+1
|
setting.skin=setting.skin%6+1
|
||||||
changeBlockSkin(setting.skin)
|
changeBlockSkin(setting.skin)
|
||||||
end,up="frame",down="back",left="ctrl"},
|
end,up="frame",down="back",left="ctrl",right="smo"},
|
||||||
|
smo= {x=920,y=440, w=200, h=60,f=27,rgb=color.white, code=function()
|
||||||
|
setting.smo=not setting.smo
|
||||||
|
end,up="frame",down="back",left="skin"},
|
||||||
back= {x=640,y=620, w=300,h=70,rgb=color.white, code=back,up="lang"},
|
back= {x=640,y=620, w=300,h=70,rgb=color.white, code=back,up="lang"},
|
||||||
},
|
},
|
||||||
setting2={--Control setting
|
setting2={--Control setting
|
||||||
@@ -429,7 +433,7 @@ Buttons={
|
|||||||
snapLevel=snapLevel%6+1
|
snapLevel=snapLevel%6+1
|
||||||
end},
|
end},
|
||||||
alpha={x=830,y=310,w=170,h=80,f=45,code=function()
|
alpha={x=830,y=310,w=170,h=80,f=45,code=function()
|
||||||
setting.virtualkeyAlpha=(setting.virtualkeyAlpha+1)%6
|
setting.virtualkeyAlpha=(setting.virtualkeyAlpha+1)%11
|
||||||
--Adjust virtualkey alpha
|
--Adjust virtualkey alpha
|
||||||
end},
|
end},
|
||||||
icon={x=450,y=410,w=170,h=80,f=45,code=function()
|
icon={x=450,y=410,w=170,h=80,f=45,code=function()
|
||||||
@@ -446,12 +450,18 @@ Buttons={
|
|||||||
end},
|
end},
|
||||||
},
|
},
|
||||||
help={
|
help={
|
||||||
back={x=640,y=590,w=180,h=60,rgb=color.white,code=back,right="qq"},
|
his={x=1050,y=520,w=230,h=60,rgb=color.white,code=function()gotoScene("history")end,down="qq",left="back"},
|
||||||
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"},
|
qq={x=1050,y=600,w=230,h=60,hide=function()return mobile end,rgb=color.white,code=function()sys.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end,up="his",left="back"},
|
||||||
|
back={x=640,y=600,w=180,h=60,rgb=color.white,code=back,up="his",right="qq"},
|
||||||
|
},
|
||||||
|
history={
|
||||||
|
prev= {x=75, y=320,w=100, h=300, rgb=color.white,hide=function()return sel==1 end,code=function()sel=sel-1 end},
|
||||||
|
next= {x=1205,y=320,w=100, h=300, rgb=color.white,hide=function()return sel==#updateLog end,code=function()sel=sel+1 end},
|
||||||
|
back= {x=640, y=640,w=200,h=70, rgb=color.white,code=back},
|
||||||
},
|
},
|
||||||
stat={
|
stat={
|
||||||
|
path={x=980,y=590,w=250,h=60,f=30,rgb=color.white,hide=function()return mobile end,code=function()sys.openURL(fs.getSaveDirectory())end,left="back"},
|
||||||
back={x=640,y=590,w=180,h=60,rgb=color.white,code=back,right="path"},
|
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"},
|
|
||||||
},
|
},
|
||||||
sel=nil,--selected button id(integer)
|
sel=nil,--selected button id(integer)
|
||||||
}
|
}
|
||||||
294
paint.lua
@@ -1,8 +1,12 @@
|
|||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local mt=love.math
|
local mt=love.math
|
||||||
|
local gmatch=string.gmatch
|
||||||
local setFont=setFont
|
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={
|
local attackColor={
|
||||||
{color.darkGrey,color.white},
|
{color.darkGrey,color.white},
|
||||||
{color.grey,color.white},
|
{color.grey,color.white},
|
||||||
@@ -20,10 +24,11 @@ local frameColor={
|
|||||||
local modeLevelColor={
|
local modeLevelColor={
|
||||||
EASY=color.cyan,
|
EASY=color.cyan,
|
||||||
NORMAL=color.green,
|
NORMAL=color.green,
|
||||||
["NORMAL+"]=color.darkGreen,
|
|
||||||
HARD=color.magenta,
|
HARD=color.magenta,
|
||||||
["HARD+"]=color.darkMagenta,
|
|
||||||
LUNATIC=color.red,
|
LUNATIC=color.red,
|
||||||
|
["NORMAL+"]=color.darkGreen,
|
||||||
|
["HARD+"]=color.darkMagenta,
|
||||||
|
["LUNATIC+"]=color.darkRed,
|
||||||
EXTRA=color.lightMagenta,
|
EXTRA=color.lightMagenta,
|
||||||
ULTIMATE=color.lightYellow,
|
ULTIMATE=color.lightYellow,
|
||||||
|
|
||||||
@@ -36,7 +41,7 @@ local modeLevelColor={
|
|||||||
["40L"]=color.green,
|
["40L"]=color.green,
|
||||||
["100L"]=color.orange,
|
["100L"]=color.orange,
|
||||||
["400L"]=color.red,
|
["400L"]=color.red,
|
||||||
["1000L"]=color.darkRed,
|
["1000L"]=color.lightGrey,
|
||||||
}
|
}
|
||||||
local dataOptL={"key","rotate","hold",nil,nil,nil,"send","recv","pend"}
|
local dataOptL={"key","rotate","hold",nil,nil,nil,"send","recv","pend"}
|
||||||
local function dataOpt(i)
|
local function dataOpt(i)
|
||||||
@@ -102,8 +107,9 @@ end
|
|||||||
FX={
|
FX={
|
||||||
flash=0,--Black screen(frame)
|
flash=0,--Black screen(frame)
|
||||||
shake=0,--Screen shake(frame)
|
shake=0,--Screen shake(frame)
|
||||||
beam={},--Attack beam
|
attack={},--Attack beam
|
||||||
badge={},--badge thrown
|
badge={},--badge thrown
|
||||||
|
|
||||||
appear=function(t,a)
|
appear=function(t,a)
|
||||||
setFont(t.font)
|
setFont(t.font)
|
||||||
gc.setColor(1,1,1,a)
|
gc.setColor(1,1,1,a)
|
||||||
@@ -172,17 +178,17 @@ FX={
|
|||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
function drawDial(x,y,speed)
|
local function drawDial(x,y,speed)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
mStr(int(speed),x,y-18)
|
mStr(int(speed),x,y-18)
|
||||||
gc.draw(dialCircle,x,y,nil,nil,nil,32,32)
|
gc.draw(dialCircle,x,y,nil,nil,nil,32,32)
|
||||||
gc.setColor(1,1,1,.6)
|
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)
|
gc.draw(dialNeedle,x,y,2.094+(speed<=175 and .02094*speed or 4.712-52.36/(speed-125)),nil,nil,5,4)
|
||||||
end
|
end
|
||||||
function drawPixel(y,x,id)
|
local function drawPixel(y,x,id)
|
||||||
gc.draw(blockSkin[id],30*x-30,600-30*y)
|
gc.draw(blockSkin[id],30*x-30,600-30*y)
|
||||||
end
|
end
|
||||||
function drawAtkPointer(x,y)
|
local function drawAtkPointer(x,y)
|
||||||
local t=sin(Timer()*20)
|
local t=sin(Timer()*20)
|
||||||
gc.setColor(.2,.7+t*.2,1,.6+t*.4)
|
gc.setColor(.2,.7+t*.2,1,.6+t*.4)
|
||||||
gc.circle("fill",x,y,25,6)
|
gc.circle("fill",x,y,25,6)
|
||||||
@@ -191,19 +197,18 @@ function drawAtkPointer(x,y)
|
|||||||
gc.circle("line",x,y,30*(1+a),6)
|
gc.circle("line",x,y,30*(1+a),6)
|
||||||
end
|
end
|
||||||
|
|
||||||
function VirtualkeyPreview()
|
local function VirtualkeyPreview()
|
||||||
for i=1,#virtualkey do
|
for i=1,#virtualkey do
|
||||||
local c=sel==i and .8 or 1
|
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]
|
local b=virtualkey[i]
|
||||||
gc.setLineWidth(b[4]*.07)
|
gc.setLineWidth(b[4]*.07)
|
||||||
gc.circle("line",b[1],b[2],b[4]-5)
|
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
|
if setting.virtualkeyIcon then gc.draw(virtualkeyIcon[i],b[1],b[2],nil,b[4]*.025,nil,18,18)end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function drawVirtualkey()
|
local function drawVirtualkey()
|
||||||
local a=setting.virtualkeyAlpha*.2
|
local a=setting.virtualkeyAlpha*.1
|
||||||
local P=players[1]
|
|
||||||
for i=1,#virtualkey do
|
for i=1,#virtualkey do
|
||||||
if i~=9 or modeEnv.Fkey then
|
if i~=9 or modeEnv.Fkey then
|
||||||
local p,b=virtualkeyDown[i],virtualkey[i]
|
local p,b=virtualkeyDown[i],virtualkey[i]
|
||||||
@@ -221,43 +226,48 @@ function drawVirtualkey()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Pnt={BG={}}
|
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.none()
|
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)
|
gc.clear(.15,.15,.15)
|
||||||
end
|
end,
|
||||||
function Pnt.BG.grey()
|
grey=function()
|
||||||
gc.clear(.3,.3,.3)
|
gc.clear(.3,.3,.3)
|
||||||
end
|
end,
|
||||||
function Pnt.BG.glow()
|
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
|
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)
|
gc.clear(t,t,t)
|
||||||
end
|
end,
|
||||||
function Pnt.BG.game1()
|
game1=function()
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
gc.draw(background1,640,360,Timer()*.15,12,nil,64,64)
|
gc.draw(background1,640,360,Timer()*.15,12,nil,64,64)
|
||||||
end
|
end,
|
||||||
function Pnt.BG.game2()
|
game2=function()
|
||||||
gc.setColor(1,.5,.5)
|
gc.setColor(1,.5,.5)
|
||||||
gc.draw(background1,640,360,Timer()*.2,12,nil,64,64)
|
gc.draw(background1,640,360,Timer()*.2,12,nil,64,64)
|
||||||
end
|
end,
|
||||||
function Pnt.BG.game3()
|
game3=function()
|
||||||
gc.setColor(.6,.6,1)
|
gc.setColor(.6,.6,1)
|
||||||
gc.draw(background1,640,360,Timer()*.25,12,nil,64,64)
|
gc.draw(background1,640,360,Timer()*.25,12,nil,64,64)
|
||||||
end
|
end,
|
||||||
function Pnt.BG.game4()
|
game4=function()
|
||||||
gc.setColor(.1,.5,.5)
|
gc.setColor(.1,.5,.5)
|
||||||
local x=Timer()%4*320
|
local x=Timer()%4*320
|
||||||
gc.draw(background2,x,0,nil,10)
|
gc.draw(background2,x,0,nil,10)
|
||||||
gc.draw(background2,x-1280,0,nil,10)
|
gc.draw(background2,x-1280,0,nil,10)
|
||||||
end
|
end,
|
||||||
function Pnt.BG.game5()
|
game5=function()
|
||||||
local t=2.5-Timer()%20%6%2.5
|
local t=2.5-Timer()%20%6%2.5
|
||||||
if t<.5 then gc.clear(t,t,t)
|
if t<.5 then gc.clear(t,t,t)
|
||||||
else gc.clear(0,0,0)
|
else gc.clear(0,0,0)
|
||||||
end
|
end
|
||||||
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
|
game6=function()
|
||||||
function Pnt.BG.game6()
|
|
||||||
local t=1.2-Timer()%10%3%1.2
|
local t=1.2-Timer()%10%3%1.2
|
||||||
if t<.5 then gc.clear(t,t,t)
|
if t<.5 then gc.clear(t,t,t)
|
||||||
else gc.clear(0,0,0)
|
else gc.clear(0,0,0)
|
||||||
@@ -265,22 +275,21 @@ function Pnt.BG.game6()
|
|||||||
gc.setColor(.3,.3,.3)
|
gc.setColor(.3,.3,.3)
|
||||||
local r=7-int(Timer()*.5)%7
|
local r=7-int(Timer()*.5)%7
|
||||||
gc.draw(mouseBlock[r],640,360,Timer()%3.1416*6,400,400,scs[r][2]-.5,#blocks[r][0]-scs[r][1]+.5)
|
gc.draw(mouseBlock[r],640,360,Timer()%3.1416*6,400,400,scs[r][2]-.5,#blocks[r][0]-scs[r][1]+.5)
|
||||||
end
|
end,
|
||||||
function Pnt.BG.rgb()
|
rgb=function()
|
||||||
gc.clear(
|
gc.clear(
|
||||||
sin(Timer()*1.2)*.15+.5,
|
sin(Timer()*1.2)*.15+.5,
|
||||||
sin(Timer()*1.5)*.15+.5,
|
sin(Timer()*1.5)*.15+.5,
|
||||||
sin(Timer()*1.9)*.15+.5
|
sin(Timer()*1.9)*.15+.5
|
||||||
)
|
)
|
||||||
end
|
end,
|
||||||
function Pnt.BG.strap()
|
strap=function()
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
local x=Timer()%32*40
|
local x=Timer()%32*40
|
||||||
gc.draw(background2,x,0,nil,10)
|
gc.draw(background2,x,0,nil,10)
|
||||||
gc.draw(background2,x-1280,0,nil,10)
|
gc.draw(background2,x-1280,0,nil,10)
|
||||||
end
|
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
|
matrix=function()
|
||||||
function Pnt.BG.matrix()
|
|
||||||
gc.clear(.15,.15,.15)
|
gc.clear(.15,.15,.15)
|
||||||
for i=0,15 do
|
for i=0,15 do
|
||||||
for j=0,8 do
|
for j=0,8 do
|
||||||
@@ -289,7 +298,8 @@ function Pnt.BG.matrix()
|
|||||||
gc.rectangle("fill",80*i,80*j,80,80)
|
gc.rectangle("fill",80*i,80*j,80,80)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
function Pnt.load()
|
function Pnt.load()
|
||||||
gc.setLineWidth(4)
|
gc.setLineWidth(4)
|
||||||
@@ -322,12 +332,15 @@ function Pnt.main()
|
|||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
gc.draw(titleImage,280,30,nil,1.3)
|
gc.draw(titleImage,280,30,nil,1.3)
|
||||||
setFont(30)
|
setFont(30)
|
||||||
gc.print("Alpha V0.7.21",290,125)
|
gc.print(gameVersion,290,125)
|
||||||
gc.print(system,845,95)
|
gc.print(system,845,95)
|
||||||
|
setFont(35)
|
||||||
|
mStr(modeLevel[modeID[modeSel]][levelSel],160,180)
|
||||||
|
mStr(text.modeName[modeSel],160,380)
|
||||||
end
|
end
|
||||||
function Pnt.mode()
|
function Pnt.mode()
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
gc.draw(titleImage,830,30)
|
gc.draw(titleImage,810,30)
|
||||||
setFont(40)
|
setFont(40)
|
||||||
gc.setColor(modeLevelColor[modeLevel[modeID[modeSel]][levelSel]]or color.white)
|
gc.setColor(modeLevelColor[modeLevel[modeID[modeSel]][levelSel]]or color.white)
|
||||||
mStr(modeLevel[modeID[modeSel]][levelSel],270,215)
|
mStr(modeLevel[modeID[modeSel]][levelSel],270,215)
|
||||||
@@ -364,7 +377,7 @@ function Pnt.music()
|
|||||||
end
|
end
|
||||||
function Pnt.custom()
|
function Pnt.custom()
|
||||||
gc.setColor(1,1,1,.3+sin(Timer()*8)*.2)
|
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(.8,.8,.8)gc.draw(drawableText.custom,20,20)
|
||||||
gc.setColor(1,1,1)gc.draw(drawableText.custom,22,23)
|
gc.setColor(1,1,1)gc.draw(drawableText.custom,22,23)
|
||||||
setFont(40)
|
setFont(40)
|
||||||
@@ -436,11 +449,9 @@ function Pnt.play()
|
|||||||
if j==P.clearing[h]and P.falling>-1 then
|
if j==P.clearing[h]and P.falling>-1 then
|
||||||
h=h-1
|
h=h-1
|
||||||
else
|
else
|
||||||
for i=1,10 do
|
for i=1,10 do if F[j][i]>0 then
|
||||||
if F[j][i]>0 then
|
gc.draw(blockSkinmini[F[j][i]],6*i-6,120-6*j)
|
||||||
gc.draw(blockSkinmini[F[j][i]],6*i-6,120-6*j)
|
end end
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end--Field
|
end--Field
|
||||||
if P.alive then
|
if P.alive then
|
||||||
@@ -480,21 +491,22 @@ function Pnt.play()
|
|||||||
gc.setColor(1,1,1,.2)
|
gc.setColor(1,1,1,.2)
|
||||||
for x=1,9 do gc.line(30*x,-10,30*x,600)end
|
for x=1,9 do gc.line(30*x,-10,30*x,600)end
|
||||||
for y=0,19 do
|
for y=0,19 do
|
||||||
y=30*y+P.fieldBeneath
|
y=30*(y-int(P.fieldBeneath/30))+P.fieldBeneath
|
||||||
gc.line(0,y,300,y)
|
gc.line(0,y,300,y)
|
||||||
end
|
end
|
||||||
if P.fieldBeneath>20 then
|
|
||||||
gc.line(0,P.fieldBeneath-30,300,P.fieldBeneath-30)
|
|
||||||
end
|
|
||||||
end--Grid lines
|
end--Grid lines
|
||||||
gc.translate(0,P.fieldBeneath)
|
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)
|
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 dy=setting.smo and(P.y_img~=P.curY and min(P.dropDelay,8e98)/P.gameEnv.drop or min(P.lockDelay,8e98)/P.gameEnv.lock)^4*30 or 0
|
||||||
|
local dy,stepY=0,setting.smo and (1-(P.falling/P.gameEnv.fall)^3)*30 or 0
|
||||||
local h=#P.clearing
|
local h=#P.clearing
|
||||||
for j=int(P.fieldBeneath/30+1),#P.field do
|
for j=int(P.fieldBeneath/30+1),#P.field do
|
||||||
if j==P.clearing[h]and P.falling>-1 then
|
if j==P.clearing[h]and P.falling>-1 then
|
||||||
h=h-1
|
h=h-1
|
||||||
|
dy=dy+stepY
|
||||||
|
gc.translate(0,stepY)
|
||||||
gc.setColor(1,1,1,P.falling/P.gameEnv.fall)
|
gc.setColor(1,1,1,P.falling/P.gameEnv.fall)
|
||||||
gc.rectangle("fill",0,600-30*j,320,30)
|
gc.rectangle("fill",0,600-30*j,320,30-stepY)
|
||||||
else
|
else
|
||||||
for i=1,10 do
|
for i=1,10 do
|
||||||
if P.field[j][i]>0 then
|
if P.field[j][i]>0 then
|
||||||
@@ -504,6 +516,7 @@ function Pnt.play()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end--Field
|
end--Field
|
||||||
|
gc.translate(0,-dy)
|
||||||
for i=1,#P.shade do
|
for i=1,#P.shade do
|
||||||
local S=P.shade[i]
|
local S=P.shade[i]
|
||||||
gc.setColor(1,1,1,S[1]*.12)
|
gc.setColor(1,1,1,S[1]*.12)
|
||||||
@@ -522,6 +535,8 @@ function Pnt.play()
|
|||||||
end
|
end
|
||||||
end end
|
end end
|
||||||
end--Ghost
|
end--Ghost
|
||||||
|
local dy=setting.smo and(P.y_img~=P.curY and min(P.dropDelay,8e98)/P.gameEnv.drop or min(P.lockDelay,8e98)/P.gameEnv.lock)^4*30 or 0
|
||||||
|
gc.translate(0,-dy)
|
||||||
if P.gameEnv.block then
|
if P.gameEnv.block then
|
||||||
gc.setColor(1,1,1,P.lockDelay/P.gameEnv.lock)
|
gc.setColor(1,1,1,P.lockDelay/P.gameEnv.lock)
|
||||||
for i=1,P.r do for j=1,P.c do
|
for i=1,P.r do for j=1,P.c do
|
||||||
@@ -540,95 +555,102 @@ function Pnt.play()
|
|||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
local x=30*(P.curX+P.sc[2]-1)-30+15
|
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.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.setColor(1,1,1,.5)
|
||||||
gc.draw(spinCenter,x,600-30*(P.y_img+P.sc[1]-1)+15,nil,nil,nil,4,4)
|
gc.draw(spinCenter,x,600-30*(P.y_img+P.sc[1]-1)+15,nil,nil,nil,4,4)
|
||||||
|
goto E
|
||||||
end--Rotate center
|
end--Rotate center
|
||||||
|
gc.translate(0,dy)
|
||||||
end
|
end
|
||||||
--Draw game field
|
::E::
|
||||||
gc.setScissor()--In-playField mask
|
gc.setScissor()--In-playField things
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
gc.draw(PTC.dust[p])
|
gc.draw(PTC.dust[p])
|
||||||
gc.translate(0,-P.fieldBeneath)
|
gc.translate(0,-P.fieldBeneath)
|
||||||
gc.setLineWidth(3)
|
gc.setBlendMode("replace","alphamultiply")--SPEED UPUP(?)
|
||||||
gc.rectangle("line",-1,-11,302,612)--Draw boarder
|
gc.setLineWidth(2)
|
||||||
|
gc.rectangle("line",-1,-11,302,612)--Draw boarder
|
||||||
gc.setLineWidth(2)
|
gc.rectangle("line",301,0,15,601)--Draw atkBuffer boarder
|
||||||
gc.rectangle("line",301,0,16,601.5)--Draw atkBuffer boarder
|
local h=0
|
||||||
local h=0
|
for i=1,#P.atkBuffer do
|
||||||
for i=1,#P.atkBuffer do
|
local A=P.atkBuffer[i]
|
||||||
local a=P.atkBuffer[i]
|
local bar=A.amount*30
|
||||||
local bar=a.amount*30
|
if h+bar>600 then bar=600-h end
|
||||||
if h+bar>600 then bar=600-h end
|
if not A.sent then
|
||||||
if not a.sent then
|
if A.time<20 then
|
||||||
if a.time<20 then
|
bar=bar*(20*A.time)^.5*.05
|
||||||
bar=bar*(20*a.time)^.5*.05
|
--Appear
|
||||||
--Appear
|
end
|
||||||
end
|
if A.countdown>0 then
|
||||||
if a.countdown>0 then
|
gc.setColor(attackColor[A.lv][1])
|
||||||
gc.setColor(attackColor[a.lv][1])
|
gc.rectangle("fill",303,599-h,11,-bar+3)
|
||||||
gc.rectangle("fill",304,599-h,11,-bar+3)
|
gc.setColor(attackColor[A.lv][2])
|
||||||
gc.setColor(attackColor[a.lv][2])
|
gc.rectangle("fill",303,599-h+(-bar+3),11,-(-bar+3)*(1-A.countdown/A.cd0))
|
||||||
gc.rectangle("fill",304,599-h+(-bar+3),11,-(-bar+3)*(1-a.countdown/a.cd0))
|
--Timing
|
||||||
--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
|
else
|
||||||
local t=sin((Timer()-i)*30)*.5+.5
|
gc.setColor(attackColor[A.lv][1])
|
||||||
local c1,c2=attackColor[a.lv][1],attackColor[a.lv][2]
|
bar=bar*(20-A.time)*.05
|
||||||
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+2)
|
||||||
gc.rectangle("fill",304,599-h,11,-bar+3)
|
--Disappear
|
||||||
--Warning
|
|
||||||
end
|
end
|
||||||
else
|
h=h+bar
|
||||||
gc.setColor(attackColor[a.lv][1])
|
end--Buffer line
|
||||||
bar=bar*(20-a.time)*.05
|
local a,b=P.b2b,P.b2b1 if a>b then a,b=b,a end
|
||||||
gc.rectangle("fill",304,599-h,11,-bar+2)
|
gc.setColor(.8,1,.2)
|
||||||
--Disappear
|
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
|
end
|
||||||
h=h+bar
|
gc.setColor(1,1,1)
|
||||||
end--Buffer line
|
gc.rectangle("line",-16,-3,15,604)--Draw b2b bar boarder
|
||||||
local a,b=P.b2b,P.b2b1 if a>b then a,b=b,a end
|
--B2B indictator
|
||||||
gc.setColor(.8,1,.2)
|
gc.translate(-P.fieldOffX,-P.fieldOffY)
|
||||||
gc.rectangle("fill",-15,599.5,11,-b*.5)
|
gc.setBlendMode("alpha")
|
||||||
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.translate(-P.fieldOffX,-P.fieldOffY)
|
|
||||||
|
|
||||||
if P.gameEnv.hold then
|
if P.gameEnv.hold then
|
||||||
gc.setColor(1,1,1)
|
|
||||||
mDraw(drawableText.hold,-82,-10)
|
mDraw(drawableText.hold,-82,-10)
|
||||||
|
if P.holded then gc.setColor(.6,.6,.6)end
|
||||||
for i=1,#P.hold.bk do
|
for i=1,#P.hold.bk do
|
||||||
for j=1,#P.hold.bk[1] do
|
local B=P.hold.bk
|
||||||
if P.hold.bk[i][j]then
|
for j=1,#B[1]do
|
||||||
drawPixel(i+17.5-#P.hold.bk*.5,j-2.7-#P.hold.bk[1]*.5,P.holded and 9 or P.hold.color)
|
if B[i][j]then
|
||||||
|
drawPixel(i+17.5-#B*.5,j-2.7-#B[1]*.5,P.hold.color)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end--Hold
|
end--Hold
|
||||||
|
gc.setColor(1,1,1)
|
||||||
mDraw(drawableText.next,381,-10)
|
mDraw(drawableText.next,381,-10)
|
||||||
local N=1
|
local N=1
|
||||||
::L::
|
::L::
|
||||||
|
if N<=P.gameEnv.next and P.next[N]then
|
||||||
local b,c=P.next[N].bk,P.next[N].color
|
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
|
for i=1,#b do for j=1,#b[1] do
|
||||||
if b[i][j]then
|
if b[i][j]then
|
||||||
drawPixel(i+20-2.4*N-#b*.5,j+12.7-#b[1]*.5,c)
|
drawPixel(i+20-2.4*N-#b*.5,j+12.7-#b[1]*.5,c)
|
||||||
end
|
end
|
||||||
end end
|
end end
|
||||||
N=N+1
|
N=N+1
|
||||||
if N<=P.gameEnv.next and P.next[N]then goto L end
|
goto L
|
||||||
|
end
|
||||||
--Next
|
--Next
|
||||||
gc.setColor(.8,.8,.8)
|
gc.setColor(.8,.8,.8)
|
||||||
gc.draw(drawableText.modeName,-135,-65)
|
gc.draw(drawableText.modeName,-135,-65)
|
||||||
gc.draw(drawableText.levelName,437-drawableText.levelName:getWidth(),-65)
|
gc.draw(drawableText.levelName,437-drawableText.levelName:getWidth(),-65)
|
||||||
|
gc.setColor(1,1,1)
|
||||||
if frame<180 then
|
if frame<180 then
|
||||||
local count=179-frame
|
local count=179-frame
|
||||||
gc.push("transform")
|
gc.push("transform")
|
||||||
gc.translate(155,220)
|
gc.translate(155,220)
|
||||||
gc.setColor(1,1,1)
|
|
||||||
setFont(100)
|
setFont(100)
|
||||||
if count%60>45 then gc.scale(1+(count%60-45)^2*.01,1)end
|
if count%60>45 then gc.scale(1+(count%60-45)^2*.01,1)end
|
||||||
mStr(int(count/60+1),0,0)
|
mStr(int(count/60+1),0,0)
|
||||||
@@ -637,19 +659,18 @@ function Pnt.play()
|
|||||||
for i=1,#P.bonus do
|
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))
|
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
|
end--Effects
|
||||||
|
setFont(30)
|
||||||
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
|
|
||||||
|
|
||||||
gc.setColor(1,1,1)
|
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.bpm,390,490)
|
||||||
gc.draw(drawableText.kpm,350,583)
|
gc.draw(drawableText.kpm,350,583)
|
||||||
setFont(30)
|
setFont(30)
|
||||||
drawDial(360,520,P.dropSpeed)
|
drawDial(360,520,P.dropSpeed)
|
||||||
drawDial(405,575,P.keySpeed)
|
drawDial(405,575,P.keySpeed)
|
||||||
--Speed dials
|
--Speed dials
|
||||||
|
gc.setColor(1,1,1)
|
||||||
|
if mesDisp[curMode.id]then mesDisp[curMode.id]()end--Other messages
|
||||||
if modeEnv.royaleMode then
|
if modeEnv.royaleMode then
|
||||||
if P.atkMode then
|
if P.atkMode then
|
||||||
gc.setColor(1,.8,0,P.swappingAtkMode*.02)
|
gc.setColor(1,.8,0,P.swappingAtkMode*.02)
|
||||||
@@ -661,17 +682,42 @@ function Pnt.play()
|
|||||||
gc.pop()
|
gc.pop()
|
||||||
end
|
end
|
||||||
end--Draw players
|
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.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 setting.virtualkeySwitch then drawVirtualkey()end
|
||||||
if modeEnv.royaleMode then
|
if modeEnv.royaleMode then
|
||||||
for i=1,#FX.badge do
|
for i=1,#FX.badge do
|
||||||
local b=FX.badge[i]
|
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.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
|
end
|
||||||
P=players[1]
|
P=players[1]
|
||||||
gc.setLineWidth(5)
|
gc.setLineWidth(5)
|
||||||
@@ -690,6 +736,8 @@ function Pnt.play()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if restartCount>0 then
|
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.setColor(0,0,0,restartCount/17)
|
||||||
gc.rectangle("fill",0,0,1280,720)
|
gc.rectangle("fill",0,0,1280,720)
|
||||||
end
|
end
|
||||||
@@ -803,4 +851,14 @@ function Pnt.stat()
|
|||||||
gc.print(statOpt(i),720,30*i-5)
|
gc.print(statOpt(i),720,30*i-5)
|
||||||
end
|
end
|
||||||
gc.draw(titleImage,260,600,.2+.07*sin(Timer()*3),nil,nil,212,35)
|
gc.draw(titleImage,260,600,.2+.07*sin(Timer()*3),nil,nil,212,35)
|
||||||
end
|
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
|
||||||
30
texture.lua
@@ -44,34 +44,14 @@ PTC.dust0:setColors(1,1,1,.5,1,1,1,0)
|
|||||||
c:release()
|
c:release()
|
||||||
--Dust particles
|
--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")
|
gc.setDefaultFilter("linear","linear")
|
||||||
titleImage=N("/image/mess/title.png")
|
titleImage=N("/image/mess/title.png")
|
||||||
dialCircle=N("/image/mess/dialCircle.png")
|
dialCircle=N("/image/mess/dialCircle.png")
|
||||||
dialNeedle=N("/image/mess/dialNeedle.png")
|
dialNeedle=N("/image/mess/dialNeedle.png")
|
||||||
badgeIcon=N("/image/mess/badge.png")
|
badgeIcon=N("/image/mess/badge.png")
|
||||||
spinCenter=N("/image/mess/spinCenter.png")
|
spinCenter=N("/image/mess/spinCenter.png")
|
||||||
lightBulb=N("/image/mess/lightBulb.png")
|
batteryImage=N("/image/mess/power.png")
|
||||||
light=N("/image/mess/light.png")
|
chargeImage=N("/image/mess/charge.png")
|
||||||
|
|
||||||
background1=N("/image/BG/bg1.jpg")
|
background1=N("/image/BG/bg1.jpg")
|
||||||
background2=N("/image/BG/bg2.png")
|
background2=N("/image/BG/bg2.png")
|
||||||
@@ -79,13 +59,11 @@ groupCode=N("/image/mess/groupcode.png")
|
|||||||
payCode=N("/image/mess/paycode.png")
|
payCode=N("/image/mess/paycode.png")
|
||||||
drawableText={
|
drawableText={
|
||||||
question=T(100,"?"),
|
question=T(100,"?"),
|
||||||
bpm=T(15,"BPM"),
|
bpm=T(15,"BPM"),kpm=T(15,"KPM"),
|
||||||
kpm=T(15,"KPM"),
|
|
||||||
|
|
||||||
modeName=T(30),levelName=T(30),
|
modeName=T(30),levelName=T(30),
|
||||||
next=T(40),hold=T(40),
|
next=T(40),hold=T(40),
|
||||||
pause=T(120),
|
pause=T(120),finish=T(120),
|
||||||
finish=T(120),
|
|
||||||
custom=T(80),
|
custom=T(80),
|
||||||
keyboard=T(25),joystick=T(25),
|
keyboard=T(25),joystick=T(25),
|
||||||
setting2Help=T(25),
|
setting2Help=T(25),
|
||||||
|
|||||||
87
timer.lua
@@ -1,8 +1,10 @@
|
|||||||
local wd=love.window
|
local wd=love.window
|
||||||
local Timer=love.timer.getTime
|
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={}
|
return{
|
||||||
function Tmr.load()
|
load=function()
|
||||||
local t=Timer()
|
local t=Timer()
|
||||||
::R::
|
::R::
|
||||||
if loading==1 then
|
if loading==1 then
|
||||||
@@ -47,26 +49,24 @@ function Tmr.load()
|
|||||||
gotoScene("intro","none")
|
gotoScene("intro","none")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end,
|
||||||
function Tmr.intro()
|
intro=function()
|
||||||
count=count+1
|
count=count+1
|
||||||
if count==200 then count=80 end
|
if count==200 then count=80 end
|
||||||
end
|
end,
|
||||||
function Tmr.draw()
|
draw=function()
|
||||||
if clearSureTime>0 then clearSureTime=clearSureTime-1 end
|
if clearSureTime>0 then clearSureTime=clearSureTime-1 end
|
||||||
end
|
end,
|
||||||
function Tmr.play(dt)
|
play=function(dt)
|
||||||
frame=frame+1
|
frame=frame+1
|
||||||
stat.time=stat.time+dt
|
stat.time=stat.time+dt
|
||||||
for i=#FX.beam,1,-1 do
|
for i=#FX.attack,1,-1 do
|
||||||
local b=FX.beam[i]
|
local b=FX.attack[i]
|
||||||
b.t=b.t+1
|
b.t=b.t+1
|
||||||
local t0=b.t*.025--t in [0,1]
|
local t0=b.t*.025--t in [0,1]
|
||||||
local t=(sin(1.5*(2*t0-1))+1)*.5
|
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
|
if t0==1 then
|
||||||
rem(FX.beam,i)
|
rem(FX.attack,i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
for i=#FX.badge,1,-1 do
|
for i=#FX.badge,1,-1 do
|
||||||
@@ -81,13 +81,23 @@ function Tmr.play(dt)
|
|||||||
virtualkeyPressTime[i]=virtualkeyPressTime[i]-1
|
virtualkeyPressTime[i]=virtualkeyPressTime[i]-1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
PTC.attack[1]:update(dt)
|
local E=#FX.attack
|
||||||
PTC.attack[2]:update(dt)
|
for i=E,1,-1 do
|
||||||
PTC.attack[3]:update(dt)
|
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<180 then
|
||||||
if frame==179 then
|
if frame==179 then
|
||||||
gameStart()
|
gameStart()
|
||||||
elseif frame%60==0 then
|
elseif frame==60 or frame==120 then
|
||||||
SFX("ready")
|
SFX("ready")
|
||||||
end
|
end
|
||||||
for p=1,#players do
|
for p=1,#players do
|
||||||
@@ -106,6 +116,7 @@ function Tmr.play(dt)
|
|||||||
clearTask("play")
|
clearTask("play")
|
||||||
updateStat()
|
updateStat()
|
||||||
resetGameData()
|
resetGameData()
|
||||||
|
return
|
||||||
end
|
end
|
||||||
elseif restartCount>0 then
|
elseif restartCount>0 then
|
||||||
restartCount=max(restartCount-2,0)
|
restartCount=max(restartCount-2,0)
|
||||||
@@ -133,9 +144,9 @@ function Tmr.play(dt)
|
|||||||
P.ai.controlDelay=P.ai.controlDelay-1
|
P.ai.controlDelay=P.ai.controlDelay-1
|
||||||
if P.ai.controlDelay==0 then
|
if P.ai.controlDelay==0 then
|
||||||
if #P.ai.controls>0 then
|
if #P.ai.controls>0 then
|
||||||
pressKey(P.ai.controls[1],P)
|
local C=P.ai.controls
|
||||||
releaseKey(P.ai.controls[1],P)
|
pressKey(C[1],P)releaseKey(C[1],P)
|
||||||
rem(P.ai.controls,1)
|
local k=#C for i=1,k do C[i]=C[i+1]end--table.remove(C,1)
|
||||||
P.ai.controlDelay=P.ai.controlDelay0+1
|
P.ai.controlDelay=P.ai.controlDelay0+1
|
||||||
else
|
else
|
||||||
AI_getControls(P.ai.controls)
|
AI_getControls(P.ai.controls)
|
||||||
@@ -143,7 +154,7 @@ function Tmr.play(dt)
|
|||||||
if Timer()-P.modeData.point>P.modeData.event then
|
if Timer()-P.modeData.point>P.modeData.event then
|
||||||
P.modeData.point=Timer()
|
P.modeData.point=Timer()
|
||||||
P.modeData.event=P.ai.controlDelay0+rnd(2,10)
|
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)
|
changeAtkMode(rnd()<.85 and 1 or #P.atker>3 and 4 or rnd()<.3 and 2 or 3)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -192,9 +203,9 @@ function Tmr.play(dt)
|
|||||||
removeRow(P.field,P.clearing[i])
|
removeRow(P.field,P.clearing[i])
|
||||||
removeRow(P.visTime,P.clearing[i])
|
removeRow(P.visTime,P.clearing[i])
|
||||||
end
|
end
|
||||||
::L::
|
for i=1,#P.clearing do
|
||||||
rem(P.clearing)
|
P.clearing[i]=nil
|
||||||
if P.clearing[1]then goto L end
|
end
|
||||||
end
|
end
|
||||||
if P.waiting>=0 then
|
if P.waiting>=0 then
|
||||||
P.waiting=P.waiting-1
|
P.waiting=P.waiting-1
|
||||||
@@ -207,7 +218,9 @@ function Tmr.play(dt)
|
|||||||
if P.dropDelay>=0 then goto stop end
|
if P.dropDelay>=0 then goto stop end
|
||||||
end
|
end
|
||||||
drop()
|
drop()
|
||||||
P.dropDelay=P.gameEnv.drop
|
if P.y_img~=P.curY then
|
||||||
|
P.dropDelay=P.gameEnv.drop
|
||||||
|
end
|
||||||
if P.freshTime<=P.gameEnv.freshLimit then
|
if P.freshTime<=P.gameEnv.freshLimit then
|
||||||
P.lockDelay=P.gameEnv.lock
|
P.lockDelay=P.gameEnv.lock
|
||||||
end
|
end
|
||||||
@@ -241,9 +254,9 @@ function Tmr.play(dt)
|
|||||||
removeRow(P.field,P.clearing[i])
|
removeRow(P.field,P.clearing[i])
|
||||||
removeRow(P.visTime,P.clearing[i])
|
removeRow(P.visTime,P.clearing[i])
|
||||||
end
|
end
|
||||||
::L::
|
for i=1,#P.clearing do
|
||||||
rem(P.clearing)
|
P.clearing[i]=nil
|
||||||
if P.clearing[1]then goto L end
|
end
|
||||||
end::stop::
|
end::stop::
|
||||||
if P.endCounter<40 then
|
if P.endCounter<40 then
|
||||||
for j=1,#P.field do for i=1,10 do
|
for j=1,#P.field do for i=1,10 do
|
||||||
@@ -253,10 +266,17 @@ function Tmr.play(dt)
|
|||||||
if P.b2b1>0 then P.b2b1=max(0,P.b2b1*.92-1)end
|
if P.b2b1>0 then P.b2b1=max(0,P.b2b1*.92-1)end
|
||||||
--Dead
|
--Dead
|
||||||
end
|
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
|
for i=#P.shade,1,-1 do
|
||||||
local S=P.shade[i]
|
local S=P.shade[i]
|
||||||
S[1]=S[1]-1
|
S[1]=S[1]-1+setting.fxs*.25
|
||||||
if S[1]==0 then
|
if S[1]<=0 then
|
||||||
rem(P.shade,i)
|
rem(P.shade,i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -296,12 +316,13 @@ function Tmr.play(dt)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if modeEnv.royaleMode and frame%120==0 then freshMostDangerous()end
|
if modeEnv.royaleMode and frame%120==0 then freshMostDangerous()end
|
||||||
end
|
end,
|
||||||
function Tmr.pause(dt)
|
pause=function(dt)
|
||||||
if not gamefinished then
|
if not gamefinished then
|
||||||
pauseTime=pauseTime+dt
|
pauseTime=pauseTime+dt
|
||||||
end
|
end
|
||||||
if pauseTimer<50 and not wd.isMinimized()then
|
if pauseTimer<50 and not wd.isMinimized()then
|
||||||
pauseTimer=pauseTimer+1
|
pauseTimer=pauseTimer+1
|
||||||
end
|
end
|
||||||
end
|
end,
|
||||||
|
}
|
||||||
100
toolfunc.lua
@@ -2,15 +2,20 @@ local tm=love.timer
|
|||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local kb=love.keyboard
|
local kb=love.keyboard
|
||||||
local setFont=setFont
|
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 toN,toS=tonumber,tostring
|
||||||
|
local concat=table.concat
|
||||||
|
|
||||||
local function splitS(s,sep)
|
local function splitS(s,sep)
|
||||||
local t={}
|
local t,n={},1
|
||||||
::L::
|
repeat
|
||||||
local i=find(s,sep)or #s+1
|
local p=find(s,sep)or #s+1
|
||||||
ins(t,sub(s,1,i-1))
|
t[n]=sub(s,1,p-1)
|
||||||
s=sub(s,i+#sep)
|
n=n+1
|
||||||
if #s~=0 then goto L end
|
s=sub(s,p+#sep)
|
||||||
|
until #s==0
|
||||||
return t
|
return t
|
||||||
end
|
end
|
||||||
function mStr(s,x,y)
|
function mStr(s,x,y)
|
||||||
@@ -25,19 +30,21 @@ function getNewRow(val)
|
|||||||
for i=1,10 do
|
for i=1,10 do
|
||||||
t[i]=val
|
t[i]=val
|
||||||
end
|
end
|
||||||
--clear a row and move to active list
|
freeRow.L=freeRow.L-1
|
||||||
if #freeRow==0 then
|
--get a row from buffer
|
||||||
|
if not freeRow[1]then
|
||||||
for i=1,10 do
|
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
|
end
|
||||||
|
freeRow.L=freeRow.L+10
|
||||||
end
|
end
|
||||||
--prepare new rows
|
--prepare new rows
|
||||||
return t
|
return t
|
||||||
end
|
end
|
||||||
function removeRow(t,k)
|
function removeRow(t,k)
|
||||||
ins(freeRow,rem(t,k))
|
freeRow[#freeRow+1]=rem(t,k)
|
||||||
|
freeRow.L=freeRow.L+1
|
||||||
end
|
end
|
||||||
|
|
||||||
--Single-usage funcs
|
--Single-usage funcs
|
||||||
langName={"中文","全中文","English"}
|
langName={"中文","全中文","English"}
|
||||||
local langID={"chi","chi_full","eng"}
|
local langID={"chi","chi_full","eng"}
|
||||||
@@ -118,7 +125,7 @@ function SFX(s,v)
|
|||||||
end
|
end
|
||||||
function VOICE(s,n)
|
function VOICE(s,n)
|
||||||
if setting.voc then
|
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
|
if #voicePlaying==1 then
|
||||||
voicePlaying[1]:play()
|
voicePlaying[1]:play()
|
||||||
end
|
end
|
||||||
@@ -227,6 +234,7 @@ local prevMenu={
|
|||||||
setting2="setting",
|
setting2="setting",
|
||||||
setting3="setting",
|
setting3="setting",
|
||||||
help="main",
|
help="main",
|
||||||
|
history="help",
|
||||||
stat="main",
|
stat="main",
|
||||||
}prevMenu.pause=prevMenu.play
|
}prevMenu.pause=prevMenu.play
|
||||||
function back()
|
function back()
|
||||||
@@ -263,51 +271,54 @@ local dataOpt={
|
|||||||
"atk","send","recv","pend",
|
"atk","send","recv","pend",
|
||||||
"clear_1","clear_2","clear_3","clear_4",
|
"clear_1","clear_2","clear_3","clear_4",
|
||||||
"spin_0","spin_1","spin_2","spin_3",
|
"spin_0","spin_1","spin_2","spin_3",
|
||||||
"b2b","b3b","pc",
|
"b2b","b3b","pc","score",
|
||||||
}
|
}
|
||||||
function loadData()
|
function loadData()
|
||||||
userData:open("r")
|
userData:open("r")
|
||||||
--local t=splitS(love.math.decompress(userdata,"zlib"),"\r\n")
|
local t=userData:read()
|
||||||
local t=splitS(userData:read(),"\r\n")
|
if not find(t,"spin")then
|
||||||
|
t=love.data.decompress("string","zlib",t)
|
||||||
|
end
|
||||||
|
t=splitS(t,"\r\n")
|
||||||
userData:close()
|
userData:close()
|
||||||
for i=1,#t do
|
for i=1,#t do
|
||||||
local i=t[i]
|
local p=find(t[i],"=")
|
||||||
if find(i,"=")then
|
if p then
|
||||||
local t=sub(i,1,find(i,"=")-1)
|
local t,v=sub(t[i],1,p-1),sub(t[i],p+1)
|
||||||
local v=sub(i,find(i,"=")+1)
|
|
||||||
if t=="gametime"then t="time"end
|
if t=="gametime"then t="time"end
|
||||||
for i=1,#dataOpt do
|
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
|
end
|
||||||
goto E
|
|
||||||
::L::
|
|
||||||
v=toN(v)if not v or v<0 then v=0 end
|
|
||||||
stat[t]=v
|
|
||||||
::E::
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function saveData()
|
function saveData()
|
||||||
local t={}
|
local t={}
|
||||||
for i=1,#dataOpt do
|
for i=1,#dataOpt do
|
||||||
ins(t,dataOpt[i].."="..toS(stat[dataOpt[i]]))
|
t[i]=dataOpt[i].."="..toS(stat[dataOpt[i]])
|
||||||
end
|
end
|
||||||
t=concat(t,"\r\n")
|
t=concat(t,"\r\n")
|
||||||
--t=love.math.compress(t,"zlib"):getString()
|
t=love.data.compress("string","zlib",t)
|
||||||
userData:open("w")
|
userData:open("w")
|
||||||
userData:write(t)
|
userData:write(t)
|
||||||
userData:close()
|
userData:close()
|
||||||
end
|
end
|
||||||
function loadSetting()
|
function loadSetting()
|
||||||
userSetting:open("r")
|
userSetting:open("r")
|
||||||
--local t=splitS(love.math.decompress(userdata,"zlib"),"\r\n")
|
local t=userSetting:read()
|
||||||
local t=splitS(userSetting:read(),"\r\n")
|
if not find(t,"virtual")then
|
||||||
|
t=love.data.decompress("string","zlib",t)
|
||||||
|
end
|
||||||
|
t=splitS(t,"\r\n")
|
||||||
userSetting:close()
|
userSetting:close()
|
||||||
for i=1,#t do
|
for i=1,#t do
|
||||||
local i=t[i]
|
local p=find(t[i],"=")
|
||||||
if find(i,"=")then
|
if p then
|
||||||
local t=sub(i,1,find(i,"=")-1)
|
local t,v=sub(t[i],1,p-1),sub(t[i],p+1)
|
||||||
local v=sub(i,find(i,"=")+1)
|
|
||||||
if t=="sfx"or t=="bgm"or t=="bgblock"or t=="voc"then
|
if t=="sfx"or t=="bgm"or t=="bgblock"or t=="voc"then
|
||||||
setting[t]=v=="true"
|
setting[t]=v=="true"
|
||||||
elseif t=="vib"then
|
elseif t=="vib"then
|
||||||
@@ -326,15 +337,15 @@ function loadSetting()
|
|||||||
elseif t=="virtualkey"then
|
elseif t=="virtualkey"then
|
||||||
v=splitS(v,"/")
|
v=splitS(v,"/")
|
||||||
for i=1,10 do
|
for i=1,10 do
|
||||||
if not v[i]then goto c end
|
if v[i]then
|
||||||
virtualkey[i]=splitS(v[i],",")
|
virtualkey[i]=splitS(v[i],",")
|
||||||
for j=1,4 do
|
for j=1,4 do
|
||||||
virtualkey[i][j]=toN(virtualkey[i][j])
|
virtualkey[i][j]=toN(virtualkey[i][j])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
::c::
|
|
||||||
end
|
end
|
||||||
elseif t=="virtualkeyAlpha"then
|
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
|
elseif t=="virtualkeyIcon"or t=="virtualkeySwitch"then
|
||||||
setting[t]=v=="true"
|
setting[t]=v=="true"
|
||||||
elseif t=="frameMul"then
|
elseif t=="frameMul"then
|
||||||
@@ -342,8 +353,10 @@ function loadSetting()
|
|||||||
elseif t=="das"or t=="arr"or t=="sddas"or t=="sdarr"then
|
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
|
v=toN(v)if not v or v<0 then v=0 end
|
||||||
setting[t]=int(v)
|
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"
|
setting[t]=v=="true"
|
||||||
|
elseif t=="fxs"then
|
||||||
|
setting[t]=toN(v:match("[0123]"))or 0
|
||||||
elseif t=="lang"then
|
elseif t=="lang"then
|
||||||
setting[t]=toN(v:match("[123]"))or 1
|
setting[t]=toN(v:match("[123]"))or 1
|
||||||
elseif t=="skin"then
|
elseif t=="skin"then
|
||||||
@@ -364,7 +377,7 @@ local saveOpt={
|
|||||||
"vib","voc",
|
"vib","voc",
|
||||||
"fullscreen",
|
"fullscreen",
|
||||||
"bgblock",
|
"bgblock",
|
||||||
"skin",
|
"skin","smo",
|
||||||
"virtualkeyAlpha",
|
"virtualkeyAlpha",
|
||||||
"virtualkeyIcon",
|
"virtualkeyIcon",
|
||||||
"virtualkeySwitch",
|
"virtualkeySwitch",
|
||||||
@@ -387,10 +400,11 @@ function saveSetting()
|
|||||||
"virtualkey="..toS(concat(vk,"/")),
|
"virtualkey="..toS(concat(vk,"/")),
|
||||||
}
|
}
|
||||||
for i=1,#saveOpt do
|
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
|
end
|
||||||
t=concat(t,"\r\n")
|
t=concat(t,"\r\n")
|
||||||
--t=love.math.compress(t,"zlib"):getString()
|
t=love.data.compress("string","zlib",t)
|
||||||
userSetting:open("w")
|
userSetting:open("w")
|
||||||
userSetting:write(t)
|
userSetting:write(t)
|
||||||
userSetting:close()
|
userSetting:close()
|
||||||
|
|||||||
196
updateLog.lua
Normal file
@@ -0,0 +1,196 @@
|
|||||||
|
return{
|
||||||
|
[=[Future outlook:
|
||||||
|
"classic" rule
|
||||||
|
backfire mode
|
||||||
|
Encrypt source code(JIT to byte code)
|
||||||
|
game recording
|
||||||
|
virtual key switch(all keys)
|
||||||
|
easier CTWC
|
||||||
|
fineese/bigbang mode
|
||||||
|
more FXs
|
||||||
|
TTT mode
|
||||||
|
smarter AI
|
||||||
|
infinite 1v1
|
||||||
|
square mode
|
||||||
|
3d features
|
||||||
|
layer-feeling
|
||||||
|
more animation]=],[=[
|
||||||
|
0.7.22:
|
||||||
|
scoring system
|
||||||
|
smooth dropping
|
||||||
|
can change FX level
|
||||||
|
new attaking FX
|
||||||
|
new bone skin
|
||||||
|
baattery 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]=]
|
||||||
|
}
|
||||||