Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5eea97dd8b | ||
|
|
f0a118e714 |
BIN
BGM/8-bit happiness.ogg
Normal file
BIN
BGM/8-bit happiness.ogg
Normal file
Binary file not shown.
BIN
SFX/ren_mega.ogg
Normal file
BIN
SFX/ren_mega.ogg
Normal file
Binary file not shown.
BIN
VOICE/I_1.ogg
Normal file
BIN
VOICE/I_1.ogg
Normal file
Binary file not shown.
BIN
VOICE/I_2.ogg
Normal file
BIN
VOICE/I_2.ogg
Normal file
Binary file not shown.
BIN
VOICE/J_1.ogg
Normal file
BIN
VOICE/J_1.ogg
Normal file
Binary file not shown.
BIN
VOICE/J_2.ogg
Normal file
BIN
VOICE/J_2.ogg
Normal file
Binary file not shown.
BIN
VOICE/L_1.ogg
Normal file
BIN
VOICE/L_1.ogg
Normal file
Binary file not shown.
BIN
VOICE/L_2.ogg
Normal file
BIN
VOICE/L_2.ogg
Normal file
Binary file not shown.
BIN
VOICE/O_1.ogg
Normal file
BIN
VOICE/O_1.ogg
Normal file
Binary file not shown.
BIN
VOICE/O_2.ogg
Normal file
BIN
VOICE/O_2.ogg
Normal file
Binary file not shown.
BIN
VOICE/PC_1.ogg
Normal file
BIN
VOICE/PC_1.ogg
Normal file
Binary file not shown.
BIN
VOICE/S_1.ogg
Normal file
BIN
VOICE/S_1.ogg
Normal file
Binary file not shown.
BIN
VOICE/S_2.ogg
Normal file
BIN
VOICE/S_2.ogg
Normal file
Binary file not shown.
BIN
VOICE/T_1.ogg
Normal file
BIN
VOICE/T_1.ogg
Normal file
Binary file not shown.
BIN
VOICE/T_2.ogg
Normal file
BIN
VOICE/T_2.ogg
Normal file
Binary file not shown.
BIN
VOICE/Z_1.ogg
Normal file
BIN
VOICE/Z_1.ogg
Normal file
Binary file not shown.
BIN
VOICE/Z_2.ogg
Normal file
BIN
VOICE/Z_2.ogg
Normal file
Binary file not shown.
BIN
VOICE/b2b_1.ogg
Normal file
BIN
VOICE/b2b_1.ogg
Normal file
Binary file not shown.
BIN
VOICE/b2b_2.ogg
Normal file
BIN
VOICE/b2b_2.ogg
Normal file
Binary file not shown.
BIN
VOICE/b2b_3.ogg
Normal file
BIN
VOICE/b2b_3.ogg
Normal file
Binary file not shown.
BIN
VOICE/b3b_1.ogg
Normal file
BIN
VOICE/b3b_1.ogg
Normal file
Binary file not shown.
BIN
VOICE/double_1.ogg
Normal file
BIN
VOICE/double_1.ogg
Normal file
Binary file not shown.
BIN
VOICE/double_2.ogg
Normal file
BIN
VOICE/double_2.ogg
Normal file
Binary file not shown.
BIN
VOICE/double_3.ogg
Normal file
BIN
VOICE/double_3.ogg
Normal file
Binary file not shown.
BIN
VOICE/lose_1.ogg
Normal file
BIN
VOICE/lose_1.ogg
Normal file
Binary file not shown.
BIN
VOICE/lose_2.ogg
Normal file
BIN
VOICE/lose_2.ogg
Normal file
Binary file not shown.
BIN
VOICE/lose_3.ogg
Normal file
BIN
VOICE/lose_3.ogg
Normal file
Binary file not shown.
BIN
VOICE/mini_1.ogg
Normal file
BIN
VOICE/mini_1.ogg
Normal file
Binary file not shown.
BIN
VOICE/nya_1.ogg
Normal file
BIN
VOICE/nya_1.ogg
Normal file
Binary file not shown.
BIN
VOICE/nya_11.ogg
Normal file
BIN
VOICE/nya_11.ogg
Normal file
Binary file not shown.
BIN
VOICE/nya_12.ogg
Normal file
BIN
VOICE/nya_12.ogg
Normal file
Binary file not shown.
BIN
VOICE/nya_13.ogg
Normal file
BIN
VOICE/nya_13.ogg
Normal file
Binary file not shown.
BIN
VOICE/nya_2.ogg
Normal file
BIN
VOICE/nya_2.ogg
Normal file
Binary file not shown.
BIN
VOICE/nya_21.ogg
Normal file
BIN
VOICE/nya_21.ogg
Normal file
Binary file not shown.
BIN
VOICE/nya_22.ogg
Normal file
BIN
VOICE/nya_22.ogg
Normal file
Binary file not shown.
BIN
VOICE/nya_3.ogg
Normal file
BIN
VOICE/nya_3.ogg
Normal file
Binary file not shown.
BIN
VOICE/nya_31.ogg
Normal file
BIN
VOICE/nya_31.ogg
Normal file
Binary file not shown.
BIN
VOICE/nya_4.ogg
Normal file
BIN
VOICE/nya_4.ogg
Normal file
Binary file not shown.
BIN
VOICE/nya_o0.ogg
Normal file
BIN
VOICE/nya_o0.ogg
Normal file
Binary file not shown.
BIN
VOICE/nya_o1.ogg
Normal file
BIN
VOICE/nya_o1.ogg
Normal file
Binary file not shown.
BIN
VOICE/nya_o2.ogg
Normal file
BIN
VOICE/nya_o2.ogg
Normal file
Binary file not shown.
BIN
VOICE/nya_o3.ogg
Normal file
BIN
VOICE/nya_o3.ogg
Normal file
Binary file not shown.
BIN
VOICE/nya_o4.ogg
Normal file
BIN
VOICE/nya_o4.ogg
Normal file
Binary file not shown.
BIN
VOICE/nya_o5.ogg
Normal file
BIN
VOICE/nya_o5.ogg
Normal file
Binary file not shown.
BIN
VOICE/single_1.ogg
Normal file
BIN
VOICE/single_1.ogg
Normal file
Binary file not shown.
BIN
VOICE/single_2.ogg
Normal file
BIN
VOICE/single_2.ogg
Normal file
Binary file not shown.
BIN
VOICE/single_3.ogg
Normal file
BIN
VOICE/single_3.ogg
Normal file
Binary file not shown.
BIN
VOICE/spin-_1.ogg
Normal file
BIN
VOICE/spin-_1.ogg
Normal file
Binary file not shown.
BIN
VOICE/spin-_2.ogg
Normal file
BIN
VOICE/spin-_2.ogg
Normal file
Binary file not shown.
BIN
VOICE/spin_1.ogg
Normal file
BIN
VOICE/spin_1.ogg
Normal file
Binary file not shown.
BIN
VOICE/spin_2.ogg
Normal file
BIN
VOICE/spin_2.ogg
Normal file
Binary file not shown.
BIN
VOICE/spin_3.ogg
Normal file
BIN
VOICE/spin_3.ogg
Normal file
Binary file not shown.
BIN
VOICE/spin_4.ogg
Normal file
BIN
VOICE/spin_4.ogg
Normal file
Binary file not shown.
BIN
VOICE/spin_5.ogg
Normal file
BIN
VOICE/spin_5.ogg
Normal file
Binary file not shown.
BIN
VOICE/triple_1.ogg
Normal file
BIN
VOICE/triple_1.ogg
Normal file
Binary file not shown.
BIN
VOICE/triple_2.ogg
Normal file
BIN
VOICE/triple_2.ogg
Normal file
Binary file not shown.
BIN
VOICE/tts_1.ogg
Normal file
BIN
VOICE/tts_1.ogg
Normal file
Binary file not shown.
BIN
VOICE/win_1.ogg
Normal file
BIN
VOICE/win_1.ogg
Normal file
Binary file not shown.
BIN
VOICE/win_2.ogg
Normal file
BIN
VOICE/win_2.ogg
Normal file
Binary file not shown.
BIN
VOICE/这游戏有问题.ogg
Normal file
BIN
VOICE/这游戏有问题.ogg
Normal file
Binary file not shown.
407
call&sys.lua
407
call&sys.lua
@@ -22,8 +22,13 @@ local sceneInit={
|
|||||||
BGM("blank")
|
BGM("blank")
|
||||||
end,
|
end,
|
||||||
main=function()
|
main=function()
|
||||||
|
BGM("blank")
|
||||||
collectgarbage()
|
collectgarbage()
|
||||||
end,
|
end,
|
||||||
|
music=function()
|
||||||
|
sel=1
|
||||||
|
BGM()
|
||||||
|
end,
|
||||||
mode=function()
|
mode=function()
|
||||||
curBG="none"
|
curBG="none"
|
||||||
saveData()
|
saveData()
|
||||||
@@ -115,7 +120,8 @@ function buttonControl_key(i)
|
|||||||
if not sceneSwaping and Buttons.sel then
|
if not sceneSwaping and Buttons.sel then
|
||||||
Buttons.sel.alpha=1
|
Buttons.sel.alpha=1
|
||||||
Buttons.sel.code()
|
Buttons.sel.code()
|
||||||
sysSFX("button")
|
SFX("button")
|
||||||
|
VOICE("nya")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -130,12 +136,16 @@ function buttonControl_gamepad(i)
|
|||||||
if not sceneSwaping and Buttons.sel then
|
if not sceneSwaping and Buttons.sel then
|
||||||
Buttons.sel.alpha=1
|
Buttons.sel.alpha=1
|
||||||
Buttons.sel.code()
|
Buttons.sel.code()
|
||||||
sysSFX("button")
|
SFX("button")
|
||||||
|
VOICE("nya")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
mouseDown={}
|
mouseDown,mouseMove,mouseUp,wheelmoved={},{},{},{}
|
||||||
|
touchDown,touchUp,touchMove={},{},{}
|
||||||
|
keyDown,keyUp={},{}
|
||||||
|
gamepadDown,gamepadUp={},{}
|
||||||
function mouseDown.intro(x,y,k)
|
function mouseDown.intro(x,y,k)
|
||||||
if k==2 then
|
if k==2 then
|
||||||
back()
|
back()
|
||||||
@@ -143,126 +153,9 @@ function mouseDown.intro(x,y,k)
|
|||||||
gotoScene("main")
|
gotoScene("main")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function mouseDown.draw(x,y,k)
|
|
||||||
mouseMove.draw(x,y)
|
|
||||||
end
|
|
||||||
function mouseDown.setting3(x,y,k)
|
|
||||||
if k==2 then back()end
|
|
||||||
for K=1,#virtualkey do
|
|
||||||
local b=virtualkey[K]
|
|
||||||
if (x-b[1])^2+(y-b[2])^2<b[3]then
|
|
||||||
sel=K
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
mouseMove={}
|
|
||||||
function mouseMove.draw(x,y,dx,dy)
|
|
||||||
sx,sy=int((x-200)/30)+1,20-int((y-60)/30)
|
|
||||||
if sx<1 or sx>10 then sx=nil end
|
|
||||||
if sy<1 or sy>20 then sy=nil end
|
|
||||||
if sx and sy and ms.isDown(1,2)then
|
|
||||||
preField[sy][sx]=ms.isDown(1)and pen or 0
|
|
||||||
end
|
|
||||||
end
|
|
||||||
function mouseMove.setting3(x,y,dx,dy)
|
|
||||||
if sel and ms.isDown(1)then
|
|
||||||
local b=virtualkey[sel]
|
|
||||||
b[1],b[2]=b[1]+dx,b[2]+dy
|
|
||||||
end
|
|
||||||
end
|
|
||||||
mouseUp={}
|
|
||||||
function mouseUp.setting3(x,y,k)
|
|
||||||
if sel then
|
|
||||||
local b=virtualkey[sel]
|
|
||||||
local k=snapLevelValue[snapLevel]
|
|
||||||
b[1],b[2]=int(b[1]/k+.5)*k,int(b[2]/k+.5)*k
|
|
||||||
end
|
|
||||||
end
|
|
||||||
wheelmoved={}
|
|
||||||
function wheelmoved.draw(x,y)
|
|
||||||
if y<0 then
|
|
||||||
pen=pen+1
|
|
||||||
if pen==8 then pen=9 elseif pen==14 then pen=0 end
|
|
||||||
else
|
|
||||||
pen=pen-1
|
|
||||||
if pen==8 then pen=7 elseif pen==-1 then pen=13 end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
function wheelmoved.mode(x,y)
|
|
||||||
modeSel=min(max(modeSel+(y>0 and -1 or 1),1),#modeID)
|
|
||||||
levelSel=ceil(#modeLevel[modeID[modeSel]]*.5)
|
|
||||||
end
|
|
||||||
touchDown={}
|
|
||||||
function touchDown.intro(id,x,y)
|
function touchDown.intro(id,x,y)
|
||||||
gotoScene("main")
|
gotoScene("main")
|
||||||
end
|
end
|
||||||
function touchDown.draw(id,x,y)
|
|
||||||
end
|
|
||||||
function touchDown.setting3(id,x,y)
|
|
||||||
for K=1,#virtualkey do
|
|
||||||
local b=virtualkey[K]
|
|
||||||
if (x-b[1])^2+(y-b[2])^2<b[3]then
|
|
||||||
sel=K
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
function touchDown.play(id,x,y)
|
|
||||||
if setting.virtualkeySwitch then
|
|
||||||
local t=onVirtualkey(x,y)
|
|
||||||
if t then
|
|
||||||
pressKey(t,players[1])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
touchUp={}
|
|
||||||
function touchUp.setting3(id,x,y)
|
|
||||||
if sel then
|
|
||||||
x,y=xOy:inverseTransformPoint(x,y)
|
|
||||||
if sel then
|
|
||||||
local b=virtualkey[sel]
|
|
||||||
local k=snapLevelValue[snapLevel]
|
|
||||||
b[1],b[2]=int(b[1]/k+.5)*k,int(b[2]/k+.5)*k
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
function touchUp.play(id,x,y)
|
|
||||||
if setting.virtualkeySwitch then
|
|
||||||
local t=onVirtualkey(x,y)
|
|
||||||
if t then
|
|
||||||
releaseKey(t,players[1])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
touchMove={}
|
|
||||||
function touchMove.setting3(id,x,y,dx,dy)
|
|
||||||
if sel then
|
|
||||||
local b=virtualkey[sel]
|
|
||||||
b[1],b[2]=b[1]+dx,b[2]+dy
|
|
||||||
end
|
|
||||||
end
|
|
||||||
function touchMove.draw(id,x,y,dx,dy)
|
|
||||||
sx,sy=int((x-200)/30)+1,20-int((y-60)/30)
|
|
||||||
if sx<1 or sx>10 then sx=nil end
|
|
||||||
if sy<1 or sy>20 then sy=nil end
|
|
||||||
if sx and sy then
|
|
||||||
preField[sy][sx]=pen
|
|
||||||
end
|
|
||||||
end
|
|
||||||
function touchMove.play(id,x,y,dx,dy)
|
|
||||||
if setting.virtualkeySwitch then
|
|
||||||
local l=tc.getTouches()
|
|
||||||
for n=1,#virtualkey do
|
|
||||||
local b=virtualkey[n]
|
|
||||||
for i=1,#l do
|
|
||||||
local x,y=xOy:inverseTransformPoint(tc.getPosition(l[i]))
|
|
||||||
if(x-b[1])^2+(y-b[2])^2<=b[3]then goto L end
|
|
||||||
end
|
|
||||||
releaseKey(n,players[1])
|
|
||||||
::L::
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
keyDown={}
|
|
||||||
function keyDown.intro(key)
|
function keyDown.intro(key)
|
||||||
if key=="escape"then
|
if key=="escape"then
|
||||||
back()
|
back()
|
||||||
@@ -270,6 +163,18 @@ function keyDown.intro(key)
|
|||||||
gotoScene("main")
|
gotoScene("main")
|
||||||
end
|
end
|
||||||
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)
|
function keyDown.mode(key)
|
||||||
if key=="down"then
|
if key=="down"then
|
||||||
if modeSel<#modeID then
|
if modeSel<#modeID then
|
||||||
@@ -297,13 +202,35 @@ function keyDown.mode(key)
|
|||||||
back()
|
back()
|
||||||
end
|
end
|
||||||
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)
|
function keyDown.custom(key)
|
||||||
if key=="left"then
|
if key=="left"then
|
||||||
local k=customID[optSel]
|
customSel[optSel]=(customSel[optSel]-2)%#customRange[customID[optSel]]+1
|
||||||
customSel[k]=(customSel[k]-2)%#customRange[k]+1
|
|
||||||
elseif key=="right"then
|
elseif key=="right"then
|
||||||
local k=customID[optSel]
|
customSel[optSel]=customSel[optSel]%#customRange[customID[optSel]]+1
|
||||||
customSel[k]=customSel[k]%#customRange[k]+1
|
|
||||||
elseif key=="down"then
|
elseif key=="down"then
|
||||||
optSel=optSel%#customID+1
|
optSel=optSel%#customID+1
|
||||||
elseif key=="up"then
|
elseif key=="up"then
|
||||||
@@ -318,6 +245,37 @@ function keyDown.custom(key)
|
|||||||
back()
|
back()
|
||||||
end
|
end
|
||||||
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)
|
function keyDown.draw(key)
|
||||||
if key=="delete"then
|
if key=="delete"then
|
||||||
Buttons.draw.clear.code()
|
Buttons.draw.clear.code()
|
||||||
@@ -336,6 +294,8 @@ function keyDown.draw(key)
|
|||||||
if sx and sy then
|
if sx and sy then
|
||||||
preField[sy][sx]=pen
|
preField[sy][sx]=pen
|
||||||
end
|
end
|
||||||
|
elseif key=="tab"then
|
||||||
|
pen=-1
|
||||||
elseif key=="backspace"then
|
elseif key=="backspace"then
|
||||||
pen=0
|
pen=0
|
||||||
elseif key=="escape"then
|
elseif key=="escape"then
|
||||||
@@ -344,6 +304,7 @@ function keyDown.draw(key)
|
|||||||
pen=find("123qwea#sdzxc",key)or pen
|
pen=find("123qwea#sdzxc",key)or pen
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function keyDown.setting2(key)
|
function keyDown.setting2(key)
|
||||||
if key=="escape"then
|
if key=="escape"then
|
||||||
if keyboardSetting then
|
if keyboardSetting then
|
||||||
@@ -373,58 +334,6 @@ function keyDown.setting2(key)
|
|||||||
curBoard=min(curBoard+1,8)
|
curBoard=min(curBoard+1,8)
|
||||||
end
|
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 keyDown.pause(key)
|
|
||||||
if key=="escape"then
|
|
||||||
back()
|
|
||||||
elseif key=="return"or key=="space"then
|
|
||||||
resumeGame()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
keyUp={}
|
|
||||||
function keyUp.play(key)
|
|
||||||
local m=setting.keyMap
|
|
||||||
for p=1,human do
|
|
||||||
for k=1,12 do
|
|
||||||
if key==m[2*p-1][k]or key==m[2*p][k]then
|
|
||||||
releaseKey(k,players[p])
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
gamepadDown={}
|
|
||||||
function gamepadDown.intro(key)
|
|
||||||
if key=="back"then
|
|
||||||
back()
|
|
||||||
else
|
|
||||||
gotoScene("main")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
function gamepadDown.mode(key)
|
|
||||||
if key=="dpdown"then
|
|
||||||
if modeSel<#modeID then modeSel=modeSel+1 end
|
|
||||||
elseif key=="dpup"then
|
|
||||||
if modeSel>1 then modeSel=modeSel-1 end
|
|
||||||
elseif key=="start"then
|
|
||||||
loadGame(modeSel,levelSel)
|
|
||||||
elseif key=="back"then
|
|
||||||
back()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
function gamepadDown.setting2(key)
|
function gamepadDown.setting2(key)
|
||||||
if key=="back"then
|
if key=="back"then
|
||||||
if joystickSetting then
|
if joystickSetting then
|
||||||
@@ -454,6 +363,117 @@ function gamepadDown.setting2(key)
|
|||||||
curBoard=min(curBoard+1,8)
|
curBoard=min(curBoard+1,8)
|
||||||
end
|
end
|
||||||
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)
|
function gamepadDown.play(key)
|
||||||
if key=="back"then back()return end
|
if key=="back"then back()return end
|
||||||
local m=setting.keyMap
|
local m=setting.keyMap
|
||||||
@@ -466,7 +486,6 @@ function gamepadDown.play(key)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
gamepadUp={}
|
|
||||||
function gamepadUp.play(key)
|
function gamepadUp.play(key)
|
||||||
local m=setting.keyMap
|
local m=setting.keyMap
|
||||||
for p=1,human do
|
for p=1,human do
|
||||||
@@ -480,6 +499,8 @@ function gamepadUp.play(key)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function love.mousepressed(x,y,k,t,num)
|
function love.mousepressed(x,y,k,t,num)
|
||||||
if t then return end
|
if t then return end
|
||||||
mouseShow=true
|
mouseShow=true
|
||||||
@@ -496,7 +517,8 @@ function love.mousepressed(x,y,k,t,num)
|
|||||||
B.alpha=1
|
B.alpha=1
|
||||||
Buttons.sel=nil
|
Buttons.sel=nil
|
||||||
love.mousemoved(x,y,0,0)
|
love.mousemoved(x,y,0,0)
|
||||||
sysSFX("button")
|
SFX("button")
|
||||||
|
VOICE("nya")
|
||||||
VIB(1)
|
VIB(1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -547,7 +569,8 @@ function love.touchreleased(id,x,y)
|
|||||||
B.code()
|
B.code()
|
||||||
B.alpha=1
|
B.alpha=1
|
||||||
Buttons.sel=nil
|
Buttons.sel=nil
|
||||||
sysSFX("button")
|
SFX("button")
|
||||||
|
VOICE("nya")
|
||||||
VIB(1)
|
VIB(1)
|
||||||
end
|
end
|
||||||
Buttons.sel=nil
|
Buttons.sel=nil
|
||||||
@@ -581,7 +604,8 @@ function love.keypressed(i)
|
|||||||
if devMode then
|
if devMode then
|
||||||
if i=="k"then
|
if i=="k"then
|
||||||
P=players.alive[rnd(#players.alive)]
|
P=players.alive[rnd(#players.alive)]
|
||||||
Event_gameover.lose()
|
P.lastRecv=players[1]
|
||||||
|
Event.lose()
|
||||||
--Test code here
|
--Test code here
|
||||||
elseif i=="q"then
|
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
|
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
|
||||||
@@ -639,12 +663,13 @@ function love.resize(w,h)
|
|||||||
scr.k=h/720
|
scr.k=h/720
|
||||||
scr.x,scr.y=(w-h*16/9)*.5,0
|
scr.x,scr.y=(w-h*16/9)*.5,0
|
||||||
end
|
end
|
||||||
|
gc.origin()
|
||||||
xOy=xOy:setTransformation(w*.5,h*.5,nil,scr.k,nil,640,360)
|
xOy=xOy:setTransformation(w*.5,h*.5,nil,scr.k,nil,640,360)
|
||||||
gc.replaceTransform(xOy)
|
gc.replaceTransform(xOy)
|
||||||
collectgarbage()
|
collectgarbage()
|
||||||
end
|
end
|
||||||
function love.focus(f)
|
function love.focus(f)
|
||||||
if not f and wd.isMinimized()and scene=="play"then pauseGame()end
|
if system~="Android" and not f and scene=="play"then pauseGame()end
|
||||||
end
|
end
|
||||||
function love.update(dt)
|
function love.update(dt)
|
||||||
-- if players then for k,v in pairs(players[1])do
|
-- if players then for k,v in pairs(players[1])do
|
||||||
@@ -680,6 +705,12 @@ function love.update(dt)
|
|||||||
for i=#Task,1,-1 do
|
for i=#Task,1,-1 do
|
||||||
Task[i]:update()
|
Task[i]:update()
|
||||||
end
|
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
|
for k,B in next,Buttons[scene]do
|
||||||
local t=B==Buttons.sel and .4 or 0
|
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
|
B.alpha=abs(B.alpha-t)>.02 and(B.alpha+(B.alpha<t and .02 or -.02))or t
|
||||||
@@ -729,7 +760,7 @@ function love.draw()
|
|||||||
local r=Timer()*.5
|
local r=Timer()*.5
|
||||||
gc.setColor(1,1,1,min(1-abs(1-r%1*2),.3))
|
gc.setColor(1,1,1,min(1-abs(1-r%1*2),.3))
|
||||||
r=int(r)%7+1
|
r=int(r)%7+1
|
||||||
gc.draw(mouseBlock[r],mx,my,Timer()%pi*4,20,20,scs[2*r]-.5,#blocks[r][0]-scs[2*r-1]+.5)
|
gc.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,.5)gc.circle("fill",mx,my,5)
|
||||||
gc.setColor(1,1,1)gc.circle("fill",mx,my,3)
|
gc.setColor(1,1,1)gc.circle("fill",mx,my,3)
|
||||||
end--Awesome mouse!
|
end--Awesome mouse!
|
||||||
@@ -768,11 +799,13 @@ function love.run()
|
|||||||
end
|
end
|
||||||
tm.step()
|
tm.step()
|
||||||
love.update(tm.getDelta())
|
love.update(tm.getDelta())
|
||||||
readyDrawFrame=readyDrawFrame+setting.frameMul
|
if not wd.isMinimized()then
|
||||||
if readyDrawFrame>=100 then
|
readyDrawFrame=readyDrawFrame+setting.frameMul
|
||||||
readyDrawFrame=readyDrawFrame-100
|
if readyDrawFrame>=100 then
|
||||||
love.draw()
|
readyDrawFrame=readyDrawFrame-100
|
||||||
gc.present()
|
love.draw()
|
||||||
|
gc.present()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
::L::if Timer()-frameT<1/60 then goto L end
|
::L::if Timer()-frameT<1/60 then goto L end
|
||||||
frameT=Timer()
|
frameT=Timer()
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ function clearTask(opt)
|
|||||||
end
|
end
|
||||||
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
|
for i=#Task,1,-1 do
|
||||||
if Task[i]==self then rem(Task,i)return end
|
if Task[i]==self then rem(Task,i)return end
|
||||||
end--Destroy
|
end--Destroy
|
||||||
|
|||||||
2
conf.lua
2
conf.lua
@@ -9,7 +9,7 @@ function love.conf(t)
|
|||||||
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.18"
|
W.title="Techmino V0.7.20"
|
||||||
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
|
||||||
|
|||||||
502
dataList.lua
502
dataList.lua
@@ -50,6 +50,12 @@ loadmode={
|
|||||||
end,
|
end,
|
||||||
infinite=function()
|
infinite=function()
|
||||||
createPlayer(1,340,15)
|
createPlayer(1,340,15)
|
||||||
|
if curMode.lv==2 then
|
||||||
|
pushSpeed=1
|
||||||
|
for i=1,5 do
|
||||||
|
garbageRise(10,1,rnd(10))
|
||||||
|
end
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
solo=function()
|
solo=function()
|
||||||
createPlayer(1,340,15)
|
createPlayer(1,340,15)
|
||||||
@@ -74,6 +80,23 @@ loadmode={
|
|||||||
tech=function()
|
tech=function()
|
||||||
createPlayer(1,340,15)
|
createPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
|
c4wtrain=function()
|
||||||
|
createPlayer(1,340,15)
|
||||||
|
local F=P.field
|
||||||
|
for i=1,22 do
|
||||||
|
F[i]=getNewRow(10)
|
||||||
|
P.visTime[i]=getNewRow(20)
|
||||||
|
for x=4,7 do F[i][x]=0 end
|
||||||
|
end
|
||||||
|
local r=rnd(6)
|
||||||
|
if r==1 then F[1][5],F[1][4],F[2][4]=10,10,10
|
||||||
|
elseif r==2 then F[1][6],F[1][7],F[2][7]=10,10,10
|
||||||
|
elseif r==3 then F[1][4],F[2][4],F[2][5]=10,10,10
|
||||||
|
elseif r==4 then F[1][7],F[2][7],F[2][6]=10,10,10
|
||||||
|
elseif r==5 then F[1][4],F[1][5],F[1][6]=10,10,10
|
||||||
|
elseif r==6 then F[1][7],F[1][6],F[1][5]=10,10,10
|
||||||
|
end
|
||||||
|
end,
|
||||||
pctrain=function()
|
pctrain=function()
|
||||||
createPlayer(1,340,15)
|
createPlayer(1,340,15)
|
||||||
P=players[1]
|
P=players[1]
|
||||||
@@ -88,18 +111,16 @@ loadmode={
|
|||||||
if curMode.lv==5 then players[1].gameEnv.drop=15 end
|
if curMode.lv==5 then players[1].gameEnv.drop=15 end
|
||||||
local n,min,max=2,curMode.lv,35-6*curMode.lv
|
local n,min,max=2,curMode.lv,35-6*curMode.lv
|
||||||
for i=1,4 do for j=1,6 do
|
for i=1,4 do for j=1,6 do
|
||||||
createPlayer(n,78*i-54,115*j-98,.18,rnd(min,max))
|
createPlayer(n,78*i-54,115*j-98,.09,rnd(min,max))
|
||||||
n=n+1
|
n=n+1
|
||||||
end end
|
end end
|
||||||
for i=9,12 do for j=1,6 do
|
for i=9,12 do for j=1,6 do
|
||||||
createPlayer(n,78*i+267,115*j-98,.18,rnd(min,max))
|
createPlayer(n,78*i+267,115*j-98,.09,rnd(min,max))
|
||||||
n=n+1
|
n=n+1
|
||||||
end end
|
end end
|
||||||
--AIs
|
|
||||||
|
|
||||||
end,
|
end,
|
||||||
techmino99=function()
|
techmino99=function()
|
||||||
createPlayer(1,340,15)--Player
|
createPlayer(1,340,15)
|
||||||
if curMode.lv==5 then players[1].gameEnv.drop=15 end
|
if curMode.lv==5 then players[1].gameEnv.drop=15 end
|
||||||
local n,min,max=2
|
local n,min,max=2
|
||||||
if curMode.lv==1 then min,max=5,32
|
if curMode.lv==1 then min,max=5,32
|
||||||
@@ -109,15 +130,13 @@ loadmode={
|
|||||||
elseif curMode.lv==5 then min,max=1,12
|
elseif curMode.lv==5 then min,max=1,12
|
||||||
end
|
end
|
||||||
for i=1,7 do for j=1,7 do
|
for i=1,7 do for j=1,7 do
|
||||||
createPlayer(n,46*i-36,97*j-72,.135,rnd(min,max))
|
createPlayer(n,46*i-36,97*j-72,.068,rnd(min,max))
|
||||||
n=n+1
|
n=n+1
|
||||||
end end
|
end end
|
||||||
for i=15,21 do for j=1,7 do
|
for i=15,21 do for j=1,7 do
|
||||||
createPlayer(n,46*i+264,97*j-72,.135,rnd(min,max))
|
createPlayer(n,46*i+264,97*j-72,.068,rnd(min,max))
|
||||||
n=n+1
|
n=n+1
|
||||||
end end
|
end end
|
||||||
--AIs
|
|
||||||
|
|
||||||
end,
|
end,
|
||||||
drought=function()
|
drought=function()
|
||||||
createPlayer(1,340,15)
|
createPlayer(1,340,15)
|
||||||
@@ -140,10 +159,10 @@ loadmode={
|
|||||||
custom=function()
|
custom=function()
|
||||||
for i=1,#customID do
|
for i=1,#customID do
|
||||||
local k=customID[i]
|
local k=customID[i]
|
||||||
modeEnv[k]=customRange[k][customSel[k]]
|
modeEnv[k]=customRange[k][customSel[i]]
|
||||||
end
|
end
|
||||||
modeEnv._20G=modeEnv.drop==-1
|
modeEnv._20G=modeEnv.drop==-1
|
||||||
modeEnv.oncehold=customSel.hold==1
|
modeEnv.oncehold=customSel[6]==1
|
||||||
createPlayer(1,340,15)
|
createPlayer(1,340,15)
|
||||||
if modeEnv.opponent==0 then
|
if modeEnv.opponent==0 then
|
||||||
else
|
else
|
||||||
@@ -151,27 +170,27 @@ loadmode={
|
|||||||
createPlayer(2,965,360,.5,modeEnv.opponent)
|
createPlayer(2,965,360,.5,modeEnv.opponent)
|
||||||
end
|
end
|
||||||
preField.h=20
|
preField.h=20
|
||||||
::R::
|
::R::
|
||||||
for i=1,10 do
|
for i=1,10 do
|
||||||
if preField[preField.h][i]>0 then
|
if preField[preField.h][i]>0 or curMode.lv==2 and preField[preField.h][i]==-1 then
|
||||||
if curMode.lv==1 then
|
goto L
|
||||||
goto L
|
|
||||||
elseif curMode.lv==2 then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
preField.h=preField.h-1
|
preField.h=preField.h-1
|
||||||
if preField.h>0 then goto R end
|
if preField.h>0 then goto R end
|
||||||
::L::
|
::L::
|
||||||
for _,P in next,players.alive do
|
if curMode.lv==1 then
|
||||||
local t=P.showTime*3
|
for _,P in next,players.alive do
|
||||||
for y=1,preField.h do
|
local t=P.showTime*3
|
||||||
P.field[y]=getNewRow(0)
|
for y=1,preField.h do
|
||||||
P.visTime[y]=getNewRow(t)
|
P.field[y]=getNewRow(0)
|
||||||
for x=1,10 do P.field[y][x]=preField[y][x]end
|
P.visTime[y]=getNewRow(t)
|
||||||
|
for x=1,10 do P.field[y][x]=preField[y][x]end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
modeEnv.bg=customRange.bg[customSel[12]]
|
||||||
|
modeEnv.bgm=customRange.bgm[customSel[13]]
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
mesDisp={
|
mesDisp={
|
||||||
@@ -255,6 +274,14 @@ mesDisp={
|
|||||||
mStr("Attack",-82,363)
|
mStr("Attack",-82,363)
|
||||||
mStr("Efficiency",-82,475)
|
mStr("Efficiency",-82,475)
|
||||||
end,
|
end,
|
||||||
|
c4wtrain=function()
|
||||||
|
setFont(50)
|
||||||
|
mStr(P.combo,-82,310)
|
||||||
|
mStr(P.modeData.point,-82,400)
|
||||||
|
setFont(20)
|
||||||
|
mStr("combo",-82,358)
|
||||||
|
mStr("max combo",-82,450)
|
||||||
|
end,
|
||||||
pctrain=function()
|
pctrain=function()
|
||||||
setFont(22)
|
setFont(22)
|
||||||
mStr("Perfect Clear",-82,412)
|
mStr("Perfect Clear",-82,412)
|
||||||
@@ -304,6 +331,10 @@ mesDisp={
|
|||||||
mStr(max(100-P.stat.row,0),-82,280)
|
mStr(max(100-P.stat.row,0),-82,280)
|
||||||
end,
|
end,
|
||||||
custom=function()
|
custom=function()
|
||||||
|
setFont(25)
|
||||||
|
mStr("Rows",-82,300)
|
||||||
|
setFont(80)
|
||||||
|
mStr(P.stat.row,-82,220)
|
||||||
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)
|
||||||
@@ -312,140 +343,20 @@ mesDisp={
|
|||||||
gc.setColor(1,1,1,.6)
|
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
|
||||||
if preField[y][x]>0 then
|
local B=preField[y][x]
|
||||||
gc.setColor(blockColor[preField[y][x]])
|
if B>0 then
|
||||||
|
gc.setColor(blockColor[B])
|
||||||
gc.rectangle("line",30*x-25,605-30*y,20,20)
|
gc.rectangle("line",30*x-25,605-30*y,20,20)
|
||||||
|
elseif B==0 then
|
||||||
|
gc.setColor(.8,.8,.8,.6)
|
||||||
|
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)
|
||||||
end
|
end
|
||||||
end end
|
end end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
Event={
|
Event={
|
||||||
marathon_reach=function()
|
|
||||||
local s=int(P.stat.row*.1)
|
|
||||||
if s>=20 then
|
|
||||||
P.stat.row=200
|
|
||||||
Event_gameover.win()
|
|
||||||
else
|
|
||||||
P.gameEnv.drop=marathon_drop[s]
|
|
||||||
if s==18 then P.gameEnv._20G=true end
|
|
||||||
P.gameEnv.target=s*10+10
|
|
||||||
SFX("reach")
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
master_reach_lunatic=function()
|
|
||||||
local t=P.modeData.point
|
|
||||||
local c=#P.clearing
|
|
||||||
if t%100==99 and c==0 then goto L end
|
|
||||||
t=t+(c<3 and c+1 or c==3 and 5 or 7)
|
|
||||||
if int(t*.01)>P.modeData.event then
|
|
||||||
P.modeData.event=P.modeData.event+1
|
|
||||||
if P.modeData.event==5 then
|
|
||||||
P.modeData.event=4
|
|
||||||
P.modeData.point=500
|
|
||||||
Event_gameover.win()
|
|
||||||
goto L
|
|
||||||
else
|
|
||||||
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"
|
|
||||||
P.gameEnv.lock=rush_lock[s]
|
|
||||||
P.gameEnv.wait=rush_wait[s]
|
|
||||||
P.gameEnv.fall=rush_fall[s]
|
|
||||||
P.gameEnv.das=10-s
|
|
||||||
if s==3 then P.gameEnv.arr=2 end
|
|
||||||
if s==5 then P.gameEnv.bone=true end
|
|
||||||
showText(P,text.stage[s],"fly",80,-120)
|
|
||||||
SFX("reach")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
P.modeData.point=t
|
|
||||||
if t%100==99 then SFX("blip_1")end
|
|
||||||
::L::
|
|
||||||
end,
|
|
||||||
master_reach_ultimate=function()
|
|
||||||
local t=P.modeData.point
|
|
||||||
local c=#P.clearing
|
|
||||||
if t%100==99 and c==0 then goto L end
|
|
||||||
t=t+(c<3 and c+1 or c==3 and 5 or 7)
|
|
||||||
if int(t*.01)>P.modeData.event then
|
|
||||||
P.modeData.event=P.modeData.event+1
|
|
||||||
if P.modeData.event==5 then
|
|
||||||
curBG="game5"
|
|
||||||
P.modeData.event=4
|
|
||||||
P.modeData.point=500
|
|
||||||
Event_gameover.win()
|
|
||||||
goto L
|
|
||||||
else
|
|
||||||
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"
|
|
||||||
P.gameEnv.lock=death_lock[s]
|
|
||||||
P.gameEnv.wait=death_wait[s]
|
|
||||||
P.gameEnv.fall=death_fall[s]
|
|
||||||
P.gameEnv.das=int(7.3-s*.4)
|
|
||||||
if s==4 then P.gameEnv.bone=true end
|
|
||||||
showText(P,text.stage[s],"fly",80,-120)
|
|
||||||
SFX("reach")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
P.modeData.point=t
|
|
||||||
if t%100==99 then SFX("blip_1")end
|
|
||||||
::L::
|
|
||||||
end,
|
|
||||||
classic_reach=function()
|
|
||||||
P.gameEnv.target=P.gameEnv.target+10
|
|
||||||
if P.gameEnv.target==100 then
|
|
||||||
P.gameEnv.drop,P.gameEnv.lock=0,0
|
|
||||||
end
|
|
||||||
SFX("reach")
|
|
||||||
end,
|
|
||||||
tsd_reach=function()
|
|
||||||
if P.lastClear~=52 then
|
|
||||||
Event_gameover.lose()
|
|
||||||
elseif #P.clearing>0 then
|
|
||||||
P.modeData.event=P.modeData.event+1
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
tech_reach_easy=function()
|
|
||||||
if P.b2b<40 then
|
|
||||||
Event_gameover.lose()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
tech_reach_hard=function()
|
|
||||||
if #P.clearing>0 and P.lastClear<10 then
|
|
||||||
Event_gameover.lose()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
tech_reach_ultimate=function()
|
|
||||||
if #P.clearing>0 and P.lastClear<10 or P.lastClear==74 then
|
|
||||||
Event_gameover.lose()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
newPC=function()
|
|
||||||
local P=players[1]
|
|
||||||
if P.stat.piece%4==0 then
|
|
||||||
if #P.field==#P.clearing then
|
|
||||||
P.counter=P.stat.piece==0 and 20 or 0
|
|
||||||
newTask(Event_task.PC,P)
|
|
||||||
if curMode.lv==2 then
|
|
||||||
local s=P.stat.pc*.5
|
|
||||||
if int(s)==s and s>0 then
|
|
||||||
P.gameEnv.drop=pc_drop[s]or 10
|
|
||||||
P.gameEnv.lock=pc_lock[s]or 20
|
|
||||||
P.gameEnv.fall=pc_fall[s]or 5
|
|
||||||
if s==10 then
|
|
||||||
showText(P,text.maxspeed,"appear",80,-140)
|
|
||||||
else
|
|
||||||
showText(P,text.speedup,"appear",30,-140)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
else
|
|
||||||
Event_gameover.lose()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
Event_gameover={
|
|
||||||
win=function()
|
win=function()
|
||||||
P.alive=false
|
P.alive=false
|
||||||
P.control=false
|
P.control=false
|
||||||
@@ -457,7 +368,7 @@ Event_gameover={
|
|||||||
P.rank=1
|
P.rank=1
|
||||||
P.result="WIN"
|
P.result="WIN"
|
||||||
changeAtk(P)
|
changeAtk(P)
|
||||||
BGM("end")
|
BGM("8-bit happiness")
|
||||||
end
|
end
|
||||||
for i=1,#P.atkBuffer do
|
for i=1,#P.atkBuffer do
|
||||||
P.atkBuffer[i].sent=true
|
P.atkBuffer[i].sent=true
|
||||||
@@ -471,9 +382,10 @@ Event_gameover={
|
|||||||
if P.id==1 then
|
if P.id==1 then
|
||||||
gamefinished=true
|
gamefinished=true
|
||||||
newTask(Event_task.finish,P)
|
newTask(Event_task.finish,P)
|
||||||
|
SFX("win")
|
||||||
|
VOICE("win")
|
||||||
end
|
end
|
||||||
showText(P,text.win,"beat",90,nil,.4,curMode.id~="custom")
|
showText(P,text.win,"beat",90,nil,.4,curMode.id~="custom")
|
||||||
SFX("win")
|
|
||||||
end,
|
end,
|
||||||
lose=function()
|
lose=function()
|
||||||
P.alive=false
|
P.alive=false
|
||||||
@@ -511,7 +423,7 @@ Event_gameover={
|
|||||||
end
|
end
|
||||||
P.lastRecv=A
|
P.lastRecv=A
|
||||||
if P.id==1 or A.id==1 then
|
if P.id==1 or A.id==1 then
|
||||||
newTask(Event_task.throwBadge,nil,{P,max(3,P.badge)*4})
|
newTask(Event_task.throwBadge,A,{P,max(3,P.badge)*4})
|
||||||
end
|
end
|
||||||
freshMostBadge()
|
freshMostBadge()
|
||||||
end
|
end
|
||||||
@@ -541,15 +453,14 @@ Event_gameover={
|
|||||||
showText(P,text.lose,"appear",90,nil,nil,true)
|
showText(P,text.lose,"appear",90,nil,nil,true)
|
||||||
if P.id==1 then
|
if P.id==1 then
|
||||||
gamefinished=true
|
gamefinished=true
|
||||||
|
if modeEnv.royaleMode then BGM("end")end
|
||||||
SFX("fail")
|
SFX("fail")
|
||||||
if modeEnv.royaleMode then
|
VOICE("lose")
|
||||||
BGM("end")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
if #players.alive==1 then
|
if #players.alive==1 then
|
||||||
local t=P
|
local t=P
|
||||||
P=players.alive[1]
|
P=players.alive[1]
|
||||||
Event_gameover.win()
|
Event.win()
|
||||||
P=t
|
P=t
|
||||||
end
|
end
|
||||||
if #players>1 then
|
if #players>1 then
|
||||||
@@ -558,16 +469,163 @@ Event_gameover={
|
|||||||
newTask(Event_task.finish,P)
|
newTask(Event_task.finish,P)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
marathon_reach=function()
|
||||||
|
local s=int(P.stat.row*.1)
|
||||||
|
if s>=20 then
|
||||||
|
P.stat.row=200
|
||||||
|
Event.win()
|
||||||
|
else
|
||||||
|
P.gameEnv.drop=marathon_drop[s]
|
||||||
|
if s==18 then P.gameEnv._20G=true end
|
||||||
|
P.gameEnv.target=s*10+10
|
||||||
|
SFX("reach")
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
master_reach_lunatic=function()
|
||||||
|
local t=P.modeData.point
|
||||||
|
local c=#P.clearing
|
||||||
|
if t%100==99 and c==0 then goto L end
|
||||||
|
t=t+(c<3 and c+1 or c==3 and 5 or 7)
|
||||||
|
if int(t*.01)>P.modeData.event then
|
||||||
|
P.modeData.event=P.modeData.event+1
|
||||||
|
if P.modeData.event==5 then
|
||||||
|
P.modeData.event=4
|
||||||
|
P.modeData.point=500
|
||||||
|
Event.win()
|
||||||
|
goto L
|
||||||
|
else
|
||||||
|
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"
|
||||||
|
P.gameEnv.lock=rush_lock[s]
|
||||||
|
P.gameEnv.wait=rush_wait[s]
|
||||||
|
P.gameEnv.fall=rush_fall[s]
|
||||||
|
P.gameEnv.das=10-s
|
||||||
|
if s==3 then P.gameEnv.arr=2 end
|
||||||
|
if s==5 then P.gameEnv.bone=true end
|
||||||
|
showText(P,text.stage[s],"fly",80,-120)
|
||||||
|
SFX("reach")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
P.modeData.point=t
|
||||||
|
if t%100==99 then SFX("blip_1")end
|
||||||
|
::L::
|
||||||
|
end,
|
||||||
|
master_reach_ultimate=function()
|
||||||
|
local t=P.modeData.point
|
||||||
|
local c=#P.clearing
|
||||||
|
if t%100==99 and c==0 then goto L end
|
||||||
|
t=t+(c<3 and c+1 or c==3 and 5 or 7)
|
||||||
|
if int(t*.01)>P.modeData.event then
|
||||||
|
P.modeData.event=P.modeData.event+1
|
||||||
|
if P.modeData.event==5 then
|
||||||
|
curBG="game5"
|
||||||
|
P.modeData.event=4
|
||||||
|
P.modeData.point=500
|
||||||
|
Event.win()
|
||||||
|
goto L
|
||||||
|
else
|
||||||
|
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"
|
||||||
|
P.gameEnv.lock=death_lock[s]
|
||||||
|
P.gameEnv.wait=death_wait[s]
|
||||||
|
P.gameEnv.fall=death_fall[s]
|
||||||
|
P.gameEnv.das=int(7.3-s*.4)
|
||||||
|
if s==4 then
|
||||||
|
P.gameEnv.bone=true
|
||||||
|
newTask(Event_task.bgmWarp,P,120)
|
||||||
|
end
|
||||||
|
showText(P,text.stage[s],"fly",80,-120)
|
||||||
|
SFX("reach")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
P.modeData.point=t
|
||||||
|
if t%100==99 then SFX("blip_1")end
|
||||||
|
::L::
|
||||||
|
end,
|
||||||
|
classic_reach=function()
|
||||||
|
P.gameEnv.target=P.gameEnv.target+10
|
||||||
|
if P.gameEnv.target==100 then
|
||||||
|
P.gameEnv.drop,P.gameEnv.lock=0,0
|
||||||
|
end
|
||||||
|
SFX("reach")
|
||||||
|
end,
|
||||||
|
infinite_check=function()
|
||||||
|
for i=1,#P.clearing do
|
||||||
|
if P.clearing[i]<6 then
|
||||||
|
garbageRise(10,1,rnd(10))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
tsd_reach=function()
|
||||||
|
if P.lastClear~=52 then
|
||||||
|
Event.lose()
|
||||||
|
elseif #P.clearing>0 then
|
||||||
|
P.modeData.event=P.modeData.event+1
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
tech_reach_easy=function()
|
||||||
|
if P.b2b<40 then
|
||||||
|
Event.lose()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
tech_reach_hard=function()
|
||||||
|
if #P.clearing>0 and P.lastClear<10 then
|
||||||
|
Event.lose()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
tech_reach_ultimate=function()
|
||||||
|
if #P.clearing>0 and P.lastClear<10 or P.lastClear==74 then
|
||||||
|
Event.lose()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
c4w_reach=function()
|
||||||
|
for i=1,#P.clearing do
|
||||||
|
ins(P.field,getNewRow(10))
|
||||||
|
ins(P.visTime,getNewRow(20))
|
||||||
|
for i=4,7 do P.field[#P.field][i]=0 end
|
||||||
|
end
|
||||||
|
if #P.clearing==0 then
|
||||||
|
if curMode.lv==2 then
|
||||||
|
Event.lose()
|
||||||
|
end
|
||||||
|
elseif P.combo>P.modeData.point then
|
||||||
|
P.modeData.point=P.combo
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
newPC=function()
|
||||||
|
local P=players[1]
|
||||||
|
if P.stat.piece%4==0 then
|
||||||
|
if #P.field==#P.clearing then
|
||||||
|
P.counter=P.stat.piece==0 and 20 or 0
|
||||||
|
newTask(Event_task.PC,P)
|
||||||
|
if curMode.lv==2 then
|
||||||
|
local s=P.stat.pc*.5
|
||||||
|
if int(s)==s and s>0 then
|
||||||
|
P.gameEnv.drop=pc_drop[s]or 10
|
||||||
|
P.gameEnv.lock=pc_lock[s]or 20
|
||||||
|
P.gameEnv.fall=pc_fall[s]or 5
|
||||||
|
if s==10 then
|
||||||
|
showText(P,text.maxspeed,"appear",80,-140)
|
||||||
|
else
|
||||||
|
showText(P,text.speedup,"appear",30,-140)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Event.lose()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
Event_task={
|
Event_task={
|
||||||
finish=function(P)
|
finish=function(self,P)
|
||||||
P.endCounter=P.endCounter+1
|
P.endCounter=P.endCounter+1
|
||||||
if P.endCounter>120 then
|
if P.endCounter>120 then
|
||||||
pauseGame()
|
pauseGame()
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
lose=function(P)
|
lose=function(self,P)
|
||||||
P.endCounter=P.endCounter+1
|
P.endCounter=P.endCounter+1
|
||||||
if P.endCounter>80 then
|
if P.endCounter>80 then
|
||||||
for i=1,#P.field do
|
for i=1,#P.field do
|
||||||
@@ -589,35 +647,35 @@ Event_task={
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
throwBadge=function(P,data)
|
throwBadge=function(self,A,data)
|
||||||
data[2]=data[2]-1
|
data[2]=data[2]-1
|
||||||
if data[2]%4==0 then
|
if data[2]%4==0 then
|
||||||
throwBadge(data[1],data[1].lastRecv)
|
throwBadge(data[1],data[1].lastRecv)
|
||||||
if data[2]%8==0 then
|
if not A.ai and data[2]%8==0 then
|
||||||
sysSFX("collect")
|
SFX("collect")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if data[2]<=0 then return true end
|
if data[2]<=0 then return true end
|
||||||
end,
|
end,
|
||||||
dig_normal=function(P)
|
dig_normal=function(self,P)
|
||||||
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(90,180-P.modeData.event)then
|
if P.counter>=max(90,180-P.modeData.event)then
|
||||||
garbageRise(10,1,rnd(10))
|
|
||||||
P.counter=0
|
P.counter=0
|
||||||
|
garbageRise(10,1,rnd(10))
|
||||||
P.modeData.event=P.modeData.event+1
|
P.modeData.event=P.modeData.event+1
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
dig_lunatic=function(P)
|
dig_lunatic=function(self,P)
|
||||||
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(45,80-.3*P.modeData.event)then
|
if P.counter>=max(45,80-.3*P.modeData.event)then
|
||||||
garbageRise(11+P.modeData.event%3,1,rnd(10))
|
|
||||||
P.counter=0
|
P.counter=0
|
||||||
|
garbageRise(11+P.modeData.event%3,1,rnd(10))
|
||||||
P.modeData.event=P.modeData.event+1
|
P.modeData.event=P.modeData.event+1
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
survivor_easy=function(P)
|
survivor_easy=function(self,P)
|
||||||
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)then
|
if P.counter>=max(60,150-2*P.modeData.event)then
|
||||||
@@ -627,7 +685,7 @@ Event_task={
|
|||||||
P.modeData.event=P.modeData.event+1
|
P.modeData.event=P.modeData.event+1
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
survivor_normal=function(P)
|
survivor_normal=function(self,P)
|
||||||
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(90,180-2*P.modeData.event)then
|
if P.counter>=max(90,180-2*P.modeData.event)then
|
||||||
@@ -645,7 +703,7 @@ Event_task={
|
|||||||
P.modeData.event=P.modeData.event+1
|
P.modeData.event=P.modeData.event+1
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
survivor_hard=function(P)
|
survivor_hard=function(self,P)
|
||||||
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)then
|
if P.counter>=max(60,180-2*P.modeData.event)then
|
||||||
@@ -661,7 +719,7 @@ Event_task={
|
|||||||
P.modeData.event=P.modeData.event+1
|
P.modeData.event=P.modeData.event+1
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
survivor_lunatic=function(P)
|
survivor_lunatic=function(self,P)
|
||||||
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-P.modeData.event)then
|
if P.counter>=max(60,150-P.modeData.event)then
|
||||||
@@ -674,7 +732,7 @@ Event_task={
|
|||||||
P.modeData.event=P.modeData.event+1
|
P.modeData.event=P.modeData.event+1
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
survivor_ultimate=function(P)
|
survivor_ultimate=function(self,P)
|
||||||
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(300,600-10*P.modeData.event)then
|
if P.counter>=max(300,600-10*P.modeData.event)then
|
||||||
@@ -690,7 +748,7 @@ Event_task={
|
|||||||
P.modeData.event=P.modeData.event+1
|
P.modeData.event=P.modeData.event+1
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
PC=function(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
|
||||||
local t=P.stat.pc%2
|
local t=P.stat.pc%2
|
||||||
@@ -711,48 +769,59 @@ Event_task={
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
bgmFadeOut=function(_,id)
|
bgmFadeOut=function(self,_,id)
|
||||||
bgm[id]:setVolume(max(bgm[id]:getVolume()-.03,0))
|
bgm[id]:setVolume(max(bgm[id]:getVolume()-.03,0))
|
||||||
if bgm[id]:getVolume()==0 then
|
if bgm[id]:getVolume()==0 then
|
||||||
bgm[id]:stop()
|
bgm[id]:stop()
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
bgmFadeIn=function(_,id)
|
bgmFadeIn=function(self,_,id)
|
||||||
bgm[id]:setVolume(min(bgm[id]:getVolume()+.03,1))
|
bgm[id]:setVolume(min(bgm[id]:getVolume()+.03,1))
|
||||||
if bgm[id]:getVolume()==1 then return true end
|
if bgm[id]:getVolume()==1 then return true end
|
||||||
end,
|
end,
|
||||||
|
bgmWarp=function(self)
|
||||||
|
if bgmPlaying then
|
||||||
|
self.data=self.data-1
|
||||||
|
if self.data==0 then
|
||||||
|
self.data=rnd(120,180)
|
||||||
|
bgm[bgmPlaying]:seek(max(bgm[bgmPlaying]:tell()-1,0))
|
||||||
|
end
|
||||||
|
else
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
}
|
}
|
||||||
defaultModeEnv={
|
defaultModeEnv={
|
||||||
sprint={
|
sprint={
|
||||||
{
|
{
|
||||||
drop=60,target=10,
|
drop=60,lock=60,
|
||||||
reach=Event_gameover.win,
|
target=10,reach=Event.win,
|
||||||
bg="strap",bgm="race",
|
bg="strap",bgm="race",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
drop=60,target=20,
|
drop=60,lock=60,
|
||||||
reach=Event_gameover.win,
|
target=20,reach=Event.win,
|
||||||
bg="strap",bgm="race",
|
bg="strap",bgm="race",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
drop=60,target=40,
|
drop=60,lock=60,
|
||||||
reach=Event_gameover.win,
|
target=40,reach=Event.win,
|
||||||
bg="strap",bgm="race",
|
bg="strap",bgm="race",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
drop=60,target=100,
|
drop=60,lock=60,
|
||||||
reach=Event_gameover.win,
|
target=100,reach=Event.win,
|
||||||
bg="strap",bgm="race",
|
bg="strap",bgm="race",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
drop=60,target=400,
|
drop=60,lock=60,
|
||||||
reach=Event_gameover.win,
|
target=400,reach=Event.win,
|
||||||
bg="strap",bgm="push",
|
bg="strap",bgm="push",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
drop=60,target=1000,
|
drop=60,lock=60,
|
||||||
reach=Event_gameover.win,
|
target=1000,reach=Event.win,
|
||||||
bg="strap",bgm="push",
|
bg="strap",bgm="push",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -809,7 +878,7 @@ defaultModeEnv={
|
|||||||
{
|
{
|
||||||
drop=1e99,lock=1e99,
|
drop=1e99,lock=1e99,
|
||||||
oncehold=false,
|
oncehold=false,
|
||||||
target=200,reach=Event_gameover.win,
|
target=200,reach=Event.win,
|
||||||
bg="strap",bgm="infinite",
|
bg="strap",bgm="infinite",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -819,6 +888,12 @@ defaultModeEnv={
|
|||||||
oncehold=false,
|
oncehold=false,
|
||||||
bg="glow",bgm="infinite",
|
bg="glow",bgm="infinite",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
drop=1e99,lock=1e99,
|
||||||
|
oncehold=false,
|
||||||
|
target=1,reach=Event.infinite_check,
|
||||||
|
bg="glow",bgm="infinite",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
solo={
|
solo={
|
||||||
{
|
{
|
||||||
@@ -860,7 +935,6 @@ defaultModeEnv={
|
|||||||
{
|
{
|
||||||
fall=10,lock=60,
|
fall=10,lock=60,
|
||||||
center=false,
|
center=false,
|
||||||
ghost=false,
|
|
||||||
visible="none",
|
visible="none",
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
bg="rgb",bgm="secret7th",
|
bg="rgb",bgm="secret7th",
|
||||||
@@ -868,6 +942,7 @@ defaultModeEnv={
|
|||||||
{
|
{
|
||||||
fall=5,lock=60,
|
fall=5,lock=60,
|
||||||
center=false,
|
center=false,
|
||||||
|
ghost=false,
|
||||||
visible="none",
|
visible="none",
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
bg="rgb",bgm="secret8th",
|
bg="rgb",bgm="secret8th",
|
||||||
@@ -946,18 +1021,18 @@ defaultModeEnv={
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
oncehold=false,
|
oncehold=false,
|
||||||
drop=30,lock=60,
|
drop=1e99,lock=1e99,
|
||||||
target=1,reach=Event.tech_reach_easy,
|
target=1,reach=Event.tech_reach_ultimate,
|
||||||
|
bg="matrix",bgm="newera",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
drop=10,lock=60,
|
||||||
|
freshLimit=15,
|
||||||
|
target=1,reach=Event.tech_reach_hard,
|
||||||
bg="matrix",bgm="way",
|
bg="matrix",bgm="way",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
drop=8,lock=60,
|
drop=3,lock=40,
|
||||||
freshLimit=15,
|
|
||||||
target=1,reach=Event.tech_reach_hard,
|
|
||||||
bg="matrix",bgm="secret8th",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
drop=4,lock=40,
|
|
||||||
target=1,
|
target=1,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
reach=Event.tech_reach_hard,
|
reach=Event.tech_reach_hard,
|
||||||
@@ -970,6 +1045,19 @@ defaultModeEnv={
|
|||||||
bg="matrix",bgm="secret7th",
|
bg="matrix",bgm="secret7th",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
c4wtrain={
|
||||||
|
{
|
||||||
|
freshLimit=15,
|
||||||
|
target=0,reach=Event.c4w_reach,
|
||||||
|
bg="rgb",bgm="newera",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
drop=5,lock=30,
|
||||||
|
freshLimit=15,
|
||||||
|
target=0,reach=Event.c4w_reach,
|
||||||
|
bg="rgb",bgm="newera",
|
||||||
|
},
|
||||||
|
},
|
||||||
pctrain={
|
pctrain={
|
||||||
{
|
{
|
||||||
next=4,
|
next=4,
|
||||||
@@ -997,20 +1085,20 @@ defaultModeEnv={
|
|||||||
{
|
{
|
||||||
oncehold=false,
|
oncehold=false,
|
||||||
drop=300,lock=1e99,
|
drop=300,lock=1e99,
|
||||||
target=100,reach=Event_gameover.win,
|
target=100,reach=Event.win,
|
||||||
ospin=false,
|
ospin=false,
|
||||||
bg="rgb",bgm="newera",
|
bg="rgb",bgm="newera",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
drop=60,lock=120,fall=10,
|
drop=60,lock=120,fall=10,
|
||||||
target=100,reach=Event_gameover.win,
|
target=100,reach=Event.win,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
ospin=false,
|
ospin=false,
|
||||||
bg="rgb",bgm="infinite",
|
bg="rgb",bgm="infinite",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
drop=20,lock=60,fall=20,
|
drop=20,lock=60,fall=20,
|
||||||
target=100,reach=Event_gameover.win,
|
target=100,reach=Event.win,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
ospin=false,
|
ospin=false,
|
||||||
bg="rgb",bgm="infinite",
|
bg="rgb",bgm="infinite",
|
||||||
@@ -1045,7 +1133,7 @@ defaultModeEnv={
|
|||||||
drop=20,lock=60,
|
drop=20,lock=60,
|
||||||
sequence="drought1",
|
sequence="drought1",
|
||||||
target=100,
|
target=100,
|
||||||
reach=Event_gameover.win,
|
reach=Event.win,
|
||||||
ospin=false,
|
ospin=false,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
bg="glow",bgm="reason",
|
bg="glow",bgm="reason",
|
||||||
@@ -1054,7 +1142,7 @@ defaultModeEnv={
|
|||||||
drop=20,lock=60,
|
drop=20,lock=60,
|
||||||
sequence="drought2",
|
sequence="drought2",
|
||||||
target=100,
|
target=100,
|
||||||
reach=Event_gameover.win,
|
reach=Event.win,
|
||||||
ospin=false,
|
ospin=false,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
bg="glow",bgm="reason",
|
bg="glow",bgm="reason",
|
||||||
@@ -1068,13 +1156,11 @@ defaultModeEnv={
|
|||||||
},
|
},
|
||||||
custom={
|
custom={
|
||||||
{
|
{
|
||||||
reach=Event_gameover.win,
|
reach=Event.win,
|
||||||
bg="none",bgm="reason",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Fkey=true,
|
Fkey=true,
|
||||||
reach=Event_gameover.win,
|
reach=Event.win,
|
||||||
bg="none",bgm="reason",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
194
gamefunc.lua
194
gamefunc.lua
@@ -1,3 +1,4 @@
|
|||||||
|
local gc=love.graphics
|
||||||
local blockPos={4,4,4,4,4,5,4}
|
local blockPos={4,4,4,4,4,5,4}
|
||||||
local renATK={[0]=0,0,0,1,1,2,2,3,3,4,4}--3 else
|
local renATK={[0]=0,0,0,1,1,2,2,3,3,4,4}--3 else
|
||||||
local b2bPoint={50,100,180}
|
local b2bPoint={50,100,180}
|
||||||
@@ -6,6 +7,8 @@ local testScore={[-1]=1,[-2]=0,[-3]=1,2,2,2}
|
|||||||
local visible_opt={show=1e99,time=300,fast=20,none=5}
|
local visible_opt={show=1e99,time=300,fast=20,none=5}
|
||||||
local reAtk={0,0,1,1,1,2,2,3,3}
|
local reAtk={0,0,1,1,1,2,2,3,3}
|
||||||
local reDef={0,1,1,2,3,3,4,4,5}
|
local reDef={0,1,1,2,3,3,4,4,5}
|
||||||
|
local blockName={"Z","S","L","J","T","O","I"}
|
||||||
|
local clearName={"single","double","triple"}
|
||||||
local spin_n={[0]="spin_0","spin_1","spin_2","spin_3"}
|
local spin_n={[0]="spin_0","spin_1","spin_2","spin_3"}
|
||||||
local clear_n={"clear_1","clear_2","clear_3","clear_4"}
|
local clear_n={"clear_1","clear_2","clear_3","clear_4"}
|
||||||
local ren_n={}for i=1,11 do ren_n[i]="ren_"..i end
|
local ren_n={}for i=1,11 do ren_n[i]="ren_"..i end
|
||||||
@@ -130,7 +133,7 @@ local freshMethod={
|
|||||||
end,
|
end,
|
||||||
drought2=function()
|
drought2=function()
|
||||||
if #P.next<6 then
|
if #P.next<6 then
|
||||||
local bag={1,1,1,2,2,2,3,3,3,4,4,4,6,6,6,5,7}
|
local bag={1,1,1,1,2,2,2,2,6,6,6,6,3,3,4,4,5,7}
|
||||||
::L::
|
::L::
|
||||||
newNext(rem(bag,rnd(#bag)))
|
newNext(rem(bag,rnd(#bag)))
|
||||||
if bag[1]then goto L end
|
if bag[1]then goto L end
|
||||||
@@ -147,7 +150,7 @@ local shadeColor={
|
|||||||
{0,1,1,.3},
|
{0,1,1,.3},
|
||||||
}
|
}
|
||||||
local function createShade(x1,y1,x2,y2)--x1<x2,y1>y2
|
local function createShade(x1,y1,x2,y2)--x1<x2,y1>y2
|
||||||
if not P.small and P.showTime>=20 and setting.fxs and y1>=y2 then
|
if P.gameEnv.block and y1>=y2 then
|
||||||
ins(P.shade,{5,P.cur.color,x1,y1,x2,y2})
|
ins(P.shade,{5,P.cur.color,x1,y1,x2,y2})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -230,11 +233,11 @@ function resetGameData()
|
|||||||
while freeRow[p]do
|
while freeRow[p]do
|
||||||
rem(freeRow)
|
rem(freeRow)
|
||||||
end
|
end
|
||||||
sysSFX("ready")
|
SFX("ready")
|
||||||
collectgarbage()
|
collectgarbage()
|
||||||
end
|
end
|
||||||
function gameStart()
|
function gameStart()
|
||||||
sysSFX("start")
|
SFX("start")
|
||||||
for P=1,#players do
|
for P=1,#players do
|
||||||
P=players[P]
|
P=players[P]
|
||||||
_G.P=P
|
_G.P=P
|
||||||
@@ -251,13 +254,16 @@ function createPlayer(id,x,y,size,AIspeed,data)
|
|||||||
ins(players.alive,P)
|
ins(players.alive,P)
|
||||||
P.index={__index=P}
|
P.index={__index=P}
|
||||||
P.x,P.y,P.size=x,y,size or 1
|
P.x,P.y,P.size=x,y,size or 1
|
||||||
P.small=P.size<.3
|
P.fieldOffX,P.fieldOffY=0,0
|
||||||
|
P.small=P.size<.1
|
||||||
if P.small then
|
if P.small then
|
||||||
P.centerX,P.centerY=P.x+150*P.size,P.y+300*P.size
|
P.centerX,P.centerY=P.x+300*P.size,P.y+600*P.size
|
||||||
P.size=P.size*5
|
P.canvas=gc.newCanvas(60,120)
|
||||||
|
P.frameWait=rnd(30,120)
|
||||||
else
|
else
|
||||||
P.centerX,P.centerY=P.x+300*P.size,P.y+670*P.size
|
P.centerX,P.centerY=P.x+300*P.size,P.y+670*P.size
|
||||||
P.absFieldPos={P.x+150*P.size,P.y+60*P.size}
|
P.absFieldX=P.x+150*P.size
|
||||||
|
P.absFieldY=P.y+60*P.size
|
||||||
end
|
end
|
||||||
|
|
||||||
if AIspeed then
|
if AIspeed then
|
||||||
@@ -267,6 +273,7 @@ function createPlayer(id,x,y,size,AIspeed,data)
|
|||||||
controlDelay0=AIspeed,
|
controlDelay0=AIspeed,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
P.human=true
|
||||||
human=human+1
|
human=human+1
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -383,7 +390,9 @@ function garbageSend(S,R,send,time)
|
|||||||
lv=min(int(send^.69),5),
|
lv=min(int(send^.69),5),
|
||||||
})
|
})
|
||||||
R.stat.recv=R.stat.recv+send
|
R.stat.recv=R.stat.recv+send
|
||||||
if R.id==1 then sysSFX(send<4 and "blip_1"or"blip_2",min(send+1,5)*.1)end
|
if R.human then
|
||||||
|
SFX(send<4 and "blip_1"or"blip_2",min(send+1,5)*.1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function garbageRelease()
|
function garbageRelease()
|
||||||
@@ -406,11 +415,12 @@ function garbageRise(color,amount,pos)
|
|||||||
P.field[1][pos]=0
|
P.field[1][pos]=0
|
||||||
end
|
end
|
||||||
P.fieldBeneath=P.fieldBeneath+amount*30
|
P.fieldBeneath=P.fieldBeneath+amount*30
|
||||||
P.curY,P.y_img=P.curY+amount,P.y_img+amount
|
P.curY=P.curY+amount
|
||||||
|
freshgho()
|
||||||
for i=1,#P.clearing do
|
for i=1,#P.clearing do
|
||||||
P.clearing[i]=P.clearing[i]+amount
|
P.clearing[i]=P.clearing[i]+amount
|
||||||
end
|
end
|
||||||
if #P.field>40 then Event_gameover.lose()end
|
if #P.field>40 then Event.lose()end
|
||||||
end
|
end
|
||||||
function createBeam(S,R,lv)--Player id
|
function createBeam(S,R,lv)--Player id
|
||||||
local x1,y1,x2,y2
|
local x1,y1,x2,y2
|
||||||
@@ -420,23 +430,23 @@ function createBeam(S,R,lv)--Player id
|
|||||||
x1,y1=S.x+(30*(P.curX+P.sc[2]-1)-30+15+150)*S.size,S.y+(600-30*(P.curY+P.sc[1]-1)+15+70)*S.size
|
x1,y1=S.x+(30*(P.curX+P.sc[2]-1)-30+15+150)*S.size,S.y+(600-30*(P.curY+P.sc[1]-1)+15+70)*S.size
|
||||||
end
|
end
|
||||||
if R.small then
|
if R.small then
|
||||||
x2,y2=R.x+150*R.size*.2,R.y+300*R.size*.2
|
x2,y2=R.centerX,R.centerY
|
||||||
else
|
else
|
||||||
x2,y2=R.x+308*R.size,R.y+450*R.size
|
x2,y2=R.x+308*R.size,R.y+450*R.size
|
||||||
end
|
end
|
||||||
ins(FX.beam,{x1,y1,x2,y2,t=0,lv=lv})
|
ins(FX.beam,{x1,y1,x2,y2,t=0,lv=lv})
|
||||||
end
|
end
|
||||||
function throwBadge(S,R)--Player id
|
function throwBadge(S,R)--Sender/Receiver
|
||||||
local x1,y1,x2,y2
|
local x1,y1,x2,y2
|
||||||
if S.small then
|
if S.small then
|
||||||
x1,y1=S.x+30*S.size,S.y+60*S.size
|
x1,y1=S.centerX,S.centerY
|
||||||
else
|
else
|
||||||
x1,y1=S.x+308*S.size,S.y+450*S.size
|
x1,y1=S.x+308*S.size,S.y+450*S.size
|
||||||
end
|
end
|
||||||
if R.small then
|
if R.small then
|
||||||
x2,y2=R.x+30*R.size,R.y+60*R.size
|
x2,y2=R.centerX,R.centerY
|
||||||
else
|
else
|
||||||
x2,y2=R.x+73*R.size,R.y+345*R.size
|
x2,y2=R.x+70*R.size,R.y+344*R.size
|
||||||
end
|
end
|
||||||
ins(FX.badge,{x1,y1,x2,y2,t=0})
|
ins(FX.badge,{x1,y1,x2,y2,t=0})
|
||||||
end
|
end
|
||||||
@@ -570,7 +580,10 @@ function freshgho()
|
|||||||
goto L
|
goto L
|
||||||
end
|
end
|
||||||
if P.curY>P.y_img then
|
if P.curY>P.y_img then
|
||||||
createShade(P.curX,P.curY+1,P.curX+P.c-1,P.y_img+P.r-1)
|
if P.human and setting.fxs then
|
||||||
|
createShade(P.curX,P.curY+1,P.curX+P.c-1,P.y_img+P.r-1)
|
||||||
|
P.fieldOffY=4
|
||||||
|
end
|
||||||
P.curY=P.y_img
|
P.curY=P.y_img
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@@ -642,7 +655,7 @@ function resetblock()
|
|||||||
P.curX=P.curX+(P.moving>0 and 1 or -1)
|
P.curX=P.curX+(P.moving>0 and 1 or -1)
|
||||||
end--Initial SYSs
|
end--Initial SYSs
|
||||||
|
|
||||||
if ifoverlap(P.cur.bk,P.curX,P.curY)then lock()Event_gameover.lose()end
|
if ifoverlap(P.cur.bk,P.curX,P.curY)then lock()Event.lose()end
|
||||||
freshgho()
|
freshgho()
|
||||||
if P.keyPressing[6]then act.hardDrop()P.keyPressing[6]=false end
|
if P.keyPressing[6]then act.hardDrop()P.keyPressing[6]=false end
|
||||||
end
|
end
|
||||||
@@ -650,7 +663,9 @@ function spin(d,ifpre)
|
|||||||
local idir=(P.dir+d)%4
|
local idir=(P.dir+d)%4
|
||||||
if P.cur.id==6 then
|
if P.cur.id==6 then
|
||||||
freshLockDelay()
|
freshLockDelay()
|
||||||
SFX(ifpre and"prerotate"or"rotate")
|
if P.human then
|
||||||
|
SFX(ifpre and"prerotate"or"rotate")
|
||||||
|
end
|
||||||
if P.gameEnv.ospin and P.freshTime>10 then
|
if P.gameEnv.ospin and P.freshTime>10 then
|
||||||
if d==1 then
|
if d==1 then
|
||||||
if P.curY==P.y_img and solid(P.curX+2,P.curY+1)and solid(P.curX+2,P.curY)and solid(P.curX-1,P.curY+1)and not solid(P.curX-1,P.curY)then
|
if P.curY==P.y_img and solid(P.curX+2,P.curY+1)and solid(P.curX+2,P.curY)and solid(P.curX-1,P.curY+1)and not solid(P.curX-1,P.curY)then
|
||||||
@@ -708,14 +723,18 @@ function spin(d,ifpre)
|
|||||||
end
|
end
|
||||||
goto quit
|
goto quit
|
||||||
::spin::
|
::spin::
|
||||||
createShade(P.curX,P.curY+P.r-1,P.curX+P.c-1,P.curY)
|
if P.human and setting.fxs then
|
||||||
|
createShade(P.curX,P.curY+P.r-1,P.curX+P.c-1,P.curY)
|
||||||
|
end
|
||||||
P.curX,P.curY,P.dir=ix,iy,idir
|
P.curX,P.curY,P.dir=ix,iy,idir
|
||||||
P.sc,P.cur.bk=scs[P.cur.id][idir],icb
|
P.sc,P.cur.bk=scs[P.cur.id][idir],icb
|
||||||
P.r,P.c=ir,ic
|
P.r,P.c=ir,ic
|
||||||
P.spinLast=t==2 and testScore[-d]or 2
|
P.spinLast=t==2 and testScore[-d]or 2
|
||||||
freshgho()
|
freshgho()
|
||||||
freshLockDelay()
|
freshLockDelay()
|
||||||
SFX(ifpre and"prerotate"or ifoverlap(P.cur.bk,P.curX,P.curY+1)and ifoverlap(P.cur.bk,P.curX-1,P.curY)and ifoverlap(P.cur.bk,P.curX+1,P.curY)and"rotatekick"or"rotate")
|
if P.human then
|
||||||
|
SFX(ifpre and"prerotate"or ifoverlap(P.cur.bk,P.curX,P.curY+1)and ifoverlap(P.cur.bk,P.curX-1,P.curY)and ifoverlap(P.cur.bk,P.curX+1,P.curY)and"rotatekick"or"rotate")
|
||||||
|
end
|
||||||
P.stat.rotate=P.stat.rotate+1
|
P.stat.rotate=P.stat.rotate+1
|
||||||
::quit::
|
::quit::
|
||||||
end
|
end
|
||||||
@@ -738,9 +757,11 @@ function hold(ifpre)
|
|||||||
|
|
||||||
freshgho()
|
freshgho()
|
||||||
P.dropDelay,P.lockDelay,P.freshTime=P.gameEnv.drop,P.gameEnv.lock,max(P.freshTime-5,0)
|
P.dropDelay,P.lockDelay,P.freshTime=P.gameEnv.drop,P.gameEnv.lock,max(P.freshTime-5,0)
|
||||||
if ifoverlap(P.cur.bk,P.curX,P.curY)then lock()Event_gameover.lose()end
|
if ifoverlap(P.cur.bk,P.curX,P.curY)then lock()Event.lose()end
|
||||||
|
|
||||||
SFX(ifpre and"prehold"or"hold")
|
if P.human then
|
||||||
|
SFX(ifpre and"prehold"or"hold")
|
||||||
|
end
|
||||||
P.stat.hold=P.stat.hold+1
|
P.stat.hold=P.stat.hold+1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -791,11 +812,17 @@ function drop()
|
|||||||
sendTime=100
|
sendTime=100
|
||||||
exblock=exblock+1
|
exblock=exblock+1
|
||||||
P.stat.b3b=P.stat.b3b+1
|
P.stat.b3b=P.stat.b3b+1
|
||||||
|
if P.human then
|
||||||
|
VOICE("b3b")
|
||||||
|
end
|
||||||
elseif P.b2b>=40 then
|
elseif P.b2b>=40 then
|
||||||
showText(P,text.techrashB2B,"drive",80,-30)
|
showText(P,text.techrashB2B,"drive",80,-30)
|
||||||
sendTime=80
|
sendTime=80
|
||||||
send=5
|
send=5
|
||||||
P.stat.b2b=P.stat.b2b+1
|
P.stat.b2b=P.stat.b2b+1
|
||||||
|
if P.human then
|
||||||
|
VOICE("b2b")
|
||||||
|
end
|
||||||
else
|
else
|
||||||
showText(P,text.techrash,"stretch",80,-30)
|
showText(P,text.techrash,"stretch",80,-30)
|
||||||
sendTime=60
|
sendTime=60
|
||||||
@@ -804,6 +831,9 @@ function drop()
|
|||||||
P.b2b=P.b2b+120
|
P.b2b=P.b2b+120
|
||||||
P.lastClear=74
|
P.lastClear=74
|
||||||
P.stat.clear_4=P.stat.clear_4+1
|
P.stat.clear_4=P.stat.clear_4+1
|
||||||
|
if P.human then
|
||||||
|
VOICE("tts")
|
||||||
|
end
|
||||||
elseif cc>0 then
|
elseif cc>0 then
|
||||||
local clearKey=clear_n
|
local clearKey=clear_n
|
||||||
if dospin then
|
if dospin then
|
||||||
@@ -812,10 +842,16 @@ function drop()
|
|||||||
send=b2bATK[cc]+1
|
send=b2bATK[cc]+1
|
||||||
exblock=exblock+1
|
exblock=exblock+1
|
||||||
P.stat.b3b=P.stat.b3b+1
|
P.stat.b3b=P.stat.b3b+1
|
||||||
|
if P.human then
|
||||||
|
VOICE("b3b")
|
||||||
|
end
|
||||||
elseif P.b2b>=40 then
|
elseif P.b2b>=40 then
|
||||||
showText(P,text.b2b..text.spin[P.cur.name]..text.clear[cc],"spin",40,-30)
|
showText(P,text.b2b..text.spin[P.cur.name]..text.clear[cc],"spin",40,-30)
|
||||||
send=b2bATK[cc]
|
send=b2bATK[cc]
|
||||||
P.stat.b2b=P.stat.b2b+1
|
P.stat.b2b=P.stat.b2b+1
|
||||||
|
if P.human then
|
||||||
|
VOICE("b2b")
|
||||||
|
end
|
||||||
else
|
else
|
||||||
showText(P,text.spin[P.cur.name]..text.clear[cc],"spin",50,-30)
|
showText(P,text.spin[P.cur.name]..text.clear[cc],"spin",50,-30)
|
||||||
send=2*cc
|
send=2*cc
|
||||||
@@ -826,12 +862,19 @@ function drop()
|
|||||||
send=ceil(send*.5)
|
send=ceil(send*.5)
|
||||||
sendTime=sendTime+60
|
sendTime=sendTime+60
|
||||||
P.b2b=P.b2b+b2bPoint[cc]*.8
|
P.b2b=P.b2b+b2bPoint[cc]*.8
|
||||||
|
if P.human then
|
||||||
|
VOICE("mini")
|
||||||
|
end
|
||||||
else
|
else
|
||||||
P.b2b=P.b2b+b2bPoint[cc]
|
P.b2b=P.b2b+b2bPoint[cc]
|
||||||
end
|
end
|
||||||
P.lastClear=P.cur.id*10+cc
|
P.lastClear=P.cur.id*10+cc
|
||||||
clearKey=spin_n
|
clearKey=spin_n
|
||||||
SFX(spin_n[cc])
|
if P.human then
|
||||||
|
SFX(spin_n[cc])
|
||||||
|
VOICE(blockName[P.cur.name])
|
||||||
|
VOICE("spin_")
|
||||||
|
end
|
||||||
elseif #P.clearing<#P.field then
|
elseif #P.clearing<#P.field then
|
||||||
P.b2b=max(P.b2b-250,0)
|
P.b2b=max(P.b2b-250,0)
|
||||||
showText(P,text.clear[cc],"appear",32+cc*3,-30,(8-cc)*.3)
|
showText(P,text.clear[cc],"appear",32+cc*3,-30,(8-cc)*.3)
|
||||||
@@ -840,13 +883,20 @@ function drop()
|
|||||||
P.lastClear=cc
|
P.lastClear=cc
|
||||||
end
|
end
|
||||||
P.stat[clearKey[cc]]=P.stat[clearKey[cc]]+1
|
P.stat[clearKey[cc]]=P.stat[clearKey[cc]]+1
|
||||||
|
if P.human then
|
||||||
|
VOICE(clearName[cc])
|
||||||
|
end
|
||||||
else
|
else
|
||||||
P.combo=0
|
P.combo=0
|
||||||
if dospin then
|
if dospin then
|
||||||
showText(P,text.spin[P.cur.name],"appear",50,-30)
|
showText(P,text.spin[P.cur.name],"appear",50,-30)
|
||||||
SFX("spin_0")
|
|
||||||
P.b2b=P.b2b+20
|
P.b2b=P.b2b+20
|
||||||
P.stat.spin_0=P.stat.spin_0+1
|
P.stat.spin_0=P.stat.spin_0+1
|
||||||
|
if P.human then
|
||||||
|
SFX("spin_0")
|
||||||
|
VOICE(blockName[P.cur.name])
|
||||||
|
VOICE("spin")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
send=send+(renATK[P.combo]or 4)
|
send=send+(renATK[P.combo]or 4)
|
||||||
@@ -858,16 +908,20 @@ function drop()
|
|||||||
if P.stat.row>4 then P.b2b=1200 end
|
if P.stat.row>4 then P.b2b=1200 end
|
||||||
P.stat.pc=P.stat.pc+1
|
P.stat.pc=P.stat.pc+1
|
||||||
P.lastClear=P.cur.id*10+5
|
P.lastClear=P.cur.id*10+5
|
||||||
SFX("perfectclear")
|
if P.human then
|
||||||
|
SFX("perfectclear")
|
||||||
|
VOICE("pc")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if P.combo>2 then
|
if P.combo>2 then
|
||||||
showText(P,text.cmb[min(P.combo,20)],P.combo<10 and"appear"or"flicker",20+P.combo*3,60)
|
showText(P,text.cmb[min(P.combo,20)],P.combo<10 and"appear"or"flicker",20+min(P.combo,25)*3,60)
|
||||||
end
|
end
|
||||||
sendTime=sendTime+20*P.combo
|
sendTime=sendTime+20*P.combo
|
||||||
if cc>0 then
|
if P.human and cc>0 then
|
||||||
SFX(clear_n[cc])
|
SFX(clear_n[cc])
|
||||||
SFX(ren_n[min(P.combo,11)])
|
SFX(ren_n[min(P.combo,11)])
|
||||||
if P.id==1 then VIB(cc)end
|
if P.combo>14 then SFX("ren_mega",(P.combo-10)*.1)end
|
||||||
|
VIB(cc)
|
||||||
end
|
end
|
||||||
if P.b2b>1200 then P.b2b=1200 end
|
if P.b2b>1200 then P.b2b=1200 end
|
||||||
|
|
||||||
@@ -925,7 +979,7 @@ function drop()
|
|||||||
garbageSend(P,randomTarget(P),send,sendTime)
|
garbageSend(P,randomTarget(P),send,sendTime)
|
||||||
end
|
end
|
||||||
P.stat.send=P.stat.send+send
|
P.stat.send=P.stat.send+send
|
||||||
if P.id==1 and send>3 then sysSFX("emit",min(send,8)*.125)end
|
if P.human and send>3 then SFX("emit",min(send,8)*.125)end
|
||||||
end
|
end
|
||||||
elseif cc==0 then
|
elseif cc==0 then
|
||||||
if P.b2b>1000 then
|
if P.b2b>1000 then
|
||||||
@@ -938,7 +992,9 @@ function drop()
|
|||||||
P.gameEnv.reach()
|
P.gameEnv.reach()
|
||||||
end
|
end
|
||||||
P.spinLast=dospin and cc>0
|
P.spinLast=dospin and cc>0
|
||||||
SFX("lock")
|
if P.human then
|
||||||
|
SFX("lock")
|
||||||
|
end
|
||||||
else
|
else
|
||||||
P.curY=P.curY-1
|
P.curY=P.curY-1
|
||||||
P.spinLast=false
|
P.spinLast=false
|
||||||
@@ -1011,7 +1067,7 @@ act={
|
|||||||
P.curX=P.curX-1
|
P.curX=P.curX-1
|
||||||
freshgho()
|
freshgho()
|
||||||
freshLockDelay()
|
freshLockDelay()
|
||||||
if P.curY==P.y_img then SFX("move")end
|
if P.human and P.curY==P.y_img then SFX("move")end
|
||||||
P.spinLast=false
|
P.spinLast=false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1027,7 +1083,7 @@ act={
|
|||||||
P.curX=P.curX+1
|
P.curX=P.curX+1
|
||||||
freshgho()
|
freshgho()
|
||||||
freshLockDelay()
|
freshLockDelay()
|
||||||
if P.curY==P.y_img then SFX("move")end
|
if P.human and P.curY==P.y_img then SFX("move")end
|
||||||
P.spinLast=false
|
P.spinLast=false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1040,12 +1096,17 @@ act={
|
|||||||
changeAtkMode(3)
|
changeAtkMode(3)
|
||||||
else
|
else
|
||||||
if P.waiting==-1 then
|
if P.waiting==-1 then
|
||||||
if P.curY-P.y_img>0 then
|
if P.curY~=P.y_img then
|
||||||
createShade(P.curX,P.curY+1,P.curX+P.c-1,P.y_img+P.r-1)
|
if P.human and setting.fxs then
|
||||||
|
createShade(P.curX,P.curY+1,P.curX+P.c-1,P.y_img+P.r-1)
|
||||||
|
P.fieldOffY=5
|
||||||
|
end
|
||||||
P.curY=P.y_img
|
P.curY=P.y_img
|
||||||
P.spinLast=false
|
P.spinLast=false
|
||||||
SFX("drop")
|
if P.human then
|
||||||
if P.id==1 then VIB(0)end
|
SFX("drop")
|
||||||
|
VIB(0)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
P.lockDelay=-1
|
P.lockDelay=-1
|
||||||
drop()
|
drop()
|
||||||
@@ -1079,22 +1140,18 @@ act={
|
|||||||
P.swappingAtkMode=30
|
P.swappingAtkMode=30
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if curMode.id=="custom"and curMode.lv==2 then
|
if curMode.id=="custom"and curMode.lv==2 and P.stat.row>0 then
|
||||||
if #P.field>=preField.h then
|
for y=1,20 do
|
||||||
for y=1,preField.h do
|
local L=P.field[y]
|
||||||
for x=1,10 do
|
for x=1,10 do
|
||||||
local a,b=preField[y][x],P.field[y][x]
|
local a,b=preField[y][x],L and L[x]or 0
|
||||||
if a==0 and b>0 or a<8 and a~=b or a>7 and b==0 then
|
if a~=-1 and(a==0 and b>0 or a<8 and a~=b or a>7 and b==0)then goto change end
|
||||||
P.modeData.event=1-P.modeData.event
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
P.modeData.event=1
|
|
||||||
Event_gameover.win()
|
|
||||||
else
|
|
||||||
P.modeData.event=1-P.modeData.event
|
|
||||||
end
|
end
|
||||||
|
P.modeData.event=0
|
||||||
|
Event.win()
|
||||||
|
::change::
|
||||||
|
P.modeData.event=1-P.modeData.event
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
@@ -1106,29 +1163,48 @@ act={
|
|||||||
end,
|
end,
|
||||||
insDown=function()
|
insDown=function()
|
||||||
if P.curY~=P.y_img then
|
if P.curY~=P.y_img then
|
||||||
createShade(P.curX,P.curY+1,P.curX+P.c-1,P.y_img+P.r-1)
|
if P.human and setting.fxs then
|
||||||
|
createShade(P.curX,P.curY+1,P.curX+P.c-1,P.y_img+P.r-1)
|
||||||
|
end
|
||||||
P.curY,P.lockDelay,P.spinLast=P.y_img,P.gameEnv.lock,false
|
P.curY,P.lockDelay,P.spinLast=P.y_img,P.gameEnv.lock,false
|
||||||
|
if P.human and setting.fxs then
|
||||||
|
P.fieldOffY=4
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
insLeft=function()
|
insLeft=function()
|
||||||
local x0=cx
|
local x0=P.curX
|
||||||
::L::if not ifoverlap(P.cur.bk,P.curX-1,P.curY)then
|
::L::if not ifoverlap(P.cur.bk,P.curX-1,P.curY)then
|
||||||
P.curX=P.curX-1
|
P.curX=P.curX-1
|
||||||
createShade(P.curX+1,P.curY+P.r-1,P.curX+1,P.curY)
|
if P.human and setting.fxs then
|
||||||
|
createShade(P.curX+1,P.curY+P.r-1,P.curX+1,P.curY)
|
||||||
|
end
|
||||||
freshgho()
|
freshgho()
|
||||||
goto L
|
goto L
|
||||||
end
|
end
|
||||||
if x0~=cx then freshLockDelay()end
|
if x0~=P.curX then
|
||||||
|
if P.human and setting.fxs and P.curX==1 then
|
||||||
|
P.fieldOffX=-4
|
||||||
|
end
|
||||||
|
freshLockDelay()
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
insRight=function()
|
insRight=function()
|
||||||
local x0=cx
|
local x0=P.curX
|
||||||
::L::if not ifoverlap(P.cur.bk,P.curX+1,P.curY)then
|
::L::if not ifoverlap(P.cur.bk,P.curX+1,P.curY)then
|
||||||
P.curX=P.curX+1
|
P.curX=P.curX+1
|
||||||
createShade(P.curX+P.c-1,P.curY+P.r-1,P.curX+P.c-1,P.curY)
|
if P.human and setting.fxs then
|
||||||
|
createShade(P.curX+P.c-1,P.curY+P.r-1,P.curX+P.c-1,P.curY)
|
||||||
|
end
|
||||||
freshgho()
|
freshgho()
|
||||||
goto L
|
goto L
|
||||||
end
|
end
|
||||||
if x0~=cx then freshLockDelay()end
|
if x0~=P.curX then
|
||||||
|
if P.human and setting.fxs and P.curX+P.c==11 then
|
||||||
|
P.fieldOffX=4
|
||||||
|
end
|
||||||
|
freshLockDelay()
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
down1=function()
|
down1=function()
|
||||||
if P.curY~=P.y_img then
|
if P.curY~=P.y_img then
|
||||||
@@ -1146,6 +1222,6 @@ act={
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
quit=function()Event_gameover.lose()end,
|
quit=function()Event.lose()end,
|
||||||
--System movements
|
--System movements
|
||||||
}
|
}
|
||||||
BIN
image/block.png
BIN
image/block.png
Binary file not shown.
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 24 KiB |
@@ -36,6 +36,8 @@ return{
|
|||||||
target="目标行数:",
|
target="目标行数:",
|
||||||
freshLimit="锁延刷新次数:",
|
freshLimit="锁延刷新次数:",
|
||||||
opponent="对手速度等级:",
|
opponent="对手速度等级:",
|
||||||
|
bg="背景:",
|
||||||
|
bgm="背景音乐:",
|
||||||
},
|
},
|
||||||
customVal={
|
customVal={
|
||||||
drop={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,"∞","[20G]"},
|
drop={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,"∞","[20G]"},
|
||||||
@@ -56,13 +58,14 @@ return{
|
|||||||
keyboard="键盘",joystick="手柄",
|
keyboard="键盘",joystick="手柄",
|
||||||
space="空格",enter="回车",
|
space="空格",enter="回车",
|
||||||
setting2Help="方向键选择/翻页,回车修改,esc返回",
|
setting2Help="方向键选择/翻页,回车修改,esc返回",
|
||||||
|
musicRoom="音乐室",
|
||||||
|
nowPlaying="正在播放:",
|
||||||
|
|
||||||
actName={"左移:","右移:","顺时针旋转:","逆时针旋转:","180°旋转","硬降:","软降:","暂存:","功能键:","重新开始:","左瞬移:","右瞬移:","软降到底:"},
|
actName={"左移:","右移:","顺时针旋转:","逆时针旋转:","180°旋转","硬降:","软降:","暂存:","功能键:","重新开始:","左瞬移:","右瞬移:","软降到底:"},
|
||||||
modeName={
|
modeName={
|
||||||
[0]="自定义",
|
[0]="自定义",
|
||||||
"竞速","马拉松","大师","经典","禅","无尽","单挑","仅TSD","隐形","挖掘","生存","科研",
|
"竞速","马拉松","大师","经典","禅","无尽","单挑","仅TSD","隐形","挖掘","生存","科研",
|
||||||
"全清训练","全清挑战","49人混战","99人混战","干旱","多人",
|
"C4W练习","全清训练","全清挑战","49人混战","99人混战","干旱","多人",
|
||||||
},
|
},
|
||||||
modeInfo={
|
modeInfo={
|
||||||
sprint="挑战世界纪录",
|
sprint="挑战世界纪录",
|
||||||
@@ -77,6 +80,7 @@ return{
|
|||||||
dig="核能挖掘机",
|
dig="核能挖掘机",
|
||||||
survivor="防守练习",
|
survivor="防守练习",
|
||||||
tech="尽可能不要普通消除",
|
tech="尽可能不要普通消除",
|
||||||
|
c4wtrain="无 限 连 击",
|
||||||
pctrain="熟悉全清定式的组合",
|
pctrain="熟悉全清定式的组合",
|
||||||
pcchallenge="100行内尽可能多PC",
|
pcchallenge="100行内尽可能多PC",
|
||||||
techmino49="49人混战",
|
techmino49="49人混战",
|
||||||
@@ -85,7 +89,7 @@ return{
|
|||||||
hotseat="友尽模式",
|
hotseat="友尽模式",
|
||||||
},
|
},
|
||||||
|
|
||||||
load={"加载材质ing","加载音乐ing","加载音效ing","加载完成",},
|
load={"加载语音ing","加载音乐ing","加载音效ing","加载完成",},
|
||||||
tips={
|
tips={
|
||||||
"不是动画,真的在加载!",
|
"不是动画,真的在加载!",
|
||||||
"整个游戏都是MrZ完成的!",
|
"整个游戏都是MrZ完成的!",
|
||||||
@@ -107,6 +111,8 @@ return{
|
|||||||
"不要在上课时玩游戏!",
|
"不要在上课时玩游戏!",
|
||||||
"本游戏难度上限很高,做好心理准备",
|
"本游戏难度上限很高,做好心理准备",
|
||||||
"方块可以不是个休闲游戏",
|
"方块可以不是个休闲游戏",
|
||||||
|
"调到特殊的日期也不会发生什么的",
|
||||||
|
"[随机文本]",
|
||||||
},
|
},
|
||||||
stat={
|
stat={
|
||||||
"游戏运行次数:",
|
"游戏运行次数:",
|
||||||
@@ -135,9 +141,9 @@ return{
|
|||||||
"",
|
"",
|
||||||
"使用LOVE2D引擎",
|
"使用LOVE2D引擎",
|
||||||
"作者:MrZ 邮箱:1046101471@qq.com",
|
"作者:MrZ 邮箱:1046101471@qq.com",
|
||||||
"程序:MrZ 美术:MrZ 音乐:MrZ 音效:MrZ",
|
"程序:MrZ 美术:MrZ 音乐:MrZ 音效:MrZ 语音:Miya",
|
||||||
"使用工具:VScode,GFIE,Beepbox,Goldwave",
|
"使用工具:VScode,GFIE,Beepbox,Goldwave",
|
||||||
"特别感谢:Farter,Teatube,196,Flyz,T830,[所有测试人员]和 你!",
|
"特别感谢:Farter,196,Teatube,Flyz,T830,[所有测试人员]和 你!",
|
||||||
"错误或者建议请附带相关信息发送到作者邮箱~",
|
"错误或者建议请附带相关信息发送到作者邮箱~",
|
||||||
},
|
},
|
||||||
support="支持作者",
|
support="支持作者",
|
||||||
@@ -146,6 +152,7 @@ return{
|
|||||||
main={
|
main={
|
||||||
play="开始",
|
play="开始",
|
||||||
setting="设置",
|
setting="设置",
|
||||||
|
music="音乐室",
|
||||||
stat="统计信息",
|
stat="统计信息",
|
||||||
help="帮助",
|
help="帮助",
|
||||||
quit="退出",
|
quit="退出",
|
||||||
@@ -159,17 +166,29 @@ return{
|
|||||||
custom="自定义(C)",
|
custom="自定义(C)",
|
||||||
back="返回",
|
back="返回",
|
||||||
},
|
},
|
||||||
|
music={
|
||||||
|
up="↑",
|
||||||
|
play="播放",
|
||||||
|
down="↓",
|
||||||
|
back="返回",
|
||||||
|
},
|
||||||
custom={
|
custom={
|
||||||
up="Λ",
|
up="↑",
|
||||||
down="v",
|
down="↓",
|
||||||
left="<",
|
left="<",
|
||||||
right=">",
|
right=">",
|
||||||
start1="消除开始",
|
start1="消除开始",
|
||||||
start2="拼图开始",
|
start2="拼图开始",
|
||||||
draw="画图(D)",
|
draw="画图(D)",
|
||||||
|
set1="40行",
|
||||||
|
set2="1v1",
|
||||||
|
set3="无尽",
|
||||||
|
set4="隐形",
|
||||||
|
set5="极限",
|
||||||
back="返回",
|
back="返回",
|
||||||
},
|
},
|
||||||
draw={
|
draw={
|
||||||
|
any="不定",
|
||||||
block1="■",
|
block1="■",
|
||||||
block2="■",
|
block2="■",
|
||||||
block3="■",
|
block3="■",
|
||||||
@@ -182,7 +201,7 @@ return{
|
|||||||
gb3="■",
|
gb3="■",
|
||||||
gb4="■",
|
gb4="■",
|
||||||
gb5="■",
|
gb5="■",
|
||||||
erase="×",
|
space="×",
|
||||||
clear="清空",
|
clear="清空",
|
||||||
back="返回",
|
back="返回",
|
||||||
},
|
},
|
||||||
@@ -209,7 +228,8 @@ return{
|
|||||||
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 setting.sfx and"音效:开"or"音效:关"end,
|
||||||
bgm=function()return setting.bgm and"音乐:开"or"音乐:关"end,
|
bgm=function()return setting.bgm and"音乐:开"or"音乐:关"end,
|
||||||
vib=function()return "震动强度:"..setting.vib end,
|
vib=function()return "震动:"..setting.vib end,
|
||||||
|
voc=function()return setting.voc and"语音:开"or"语音:关"end,
|
||||||
fullscreen=function()return setting.fullscreen and"全屏:开"or"全屏:关"end,
|
fullscreen=function()return setting.fullscreen and"全屏:开"or"全屏:关"end,
|
||||||
bgblock=function()return setting.bgblock and"背景动画:开"or"背景动画:关"end,
|
bgblock=function()return setting.bgblock and"背景动画:开"or"背景动画:关"end,
|
||||||
frame=function()return"绘制帧:"..setting.frameMul.."%"end,
|
frame=function()return"绘制帧:"..setting.frameMul.."%"end,
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ return{
|
|||||||
target="目标行数:",
|
target="目标行数:",
|
||||||
freshLimit="锁延刷新次数:",
|
freshLimit="锁延刷新次数:",
|
||||||
opponent="对手速度等级:",
|
opponent="对手速度等级:",
|
||||||
|
bg="背景:",
|
||||||
|
bgm="背景音乐:",
|
||||||
},
|
},
|
||||||
customVal={
|
customVal={
|
||||||
drop={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,"∞","[20G]"},
|
drop={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,"∞","[20G]"},
|
||||||
@@ -56,13 +58,14 @@ return{
|
|||||||
keyboard="键盘",joystick="手柄",
|
keyboard="键盘",joystick="手柄",
|
||||||
space="空格",enter="回车",
|
space="空格",enter="回车",
|
||||||
setting2Help="方向键选择/翻页,回车修改,esc返回",
|
setting2Help="方向键选择/翻页,回车修改,esc返回",
|
||||||
|
musicRoom="音乐室",
|
||||||
|
nowPlaying="正在播放:",
|
||||||
|
|
||||||
actName={"左移:","右移:","顺时针旋转:","逆时针旋转:","180°旋转","硬降:","软降:","暂存:","功能键:","重新开始:","左瞬移:","右瞬移:","软降到底:"},
|
actName={"左移:","右移:","顺时针旋转:","逆时针旋转:","180°旋转","硬降:","软降:","暂存:","功能键:","重新开始:","左瞬移:","右瞬移:","软降到底:"},
|
||||||
modeName={
|
modeName={
|
||||||
[0]="自定义",
|
[0]="自定义",
|
||||||
"竞速","马拉松","大师","经典","禅","无尽","单挑","仅TSD","隐形","挖掘","生存","科研",
|
"竞速","马拉松","大师","经典","禅","无尽","单挑","仅TSD","隐形","挖掘","生存","科研",
|
||||||
"全清训练","全清挑战","49人混战","99人混战","干旱","多人",
|
"C4W练习","全清训练","全清挑战","49人混战","99人混战","干旱","多人",
|
||||||
},
|
},
|
||||||
modeInfo={
|
modeInfo={
|
||||||
sprint="挑战世界纪录",
|
sprint="挑战世界纪录",
|
||||||
@@ -77,6 +80,7 @@ return{
|
|||||||
dig="核能挖掘机",
|
dig="核能挖掘机",
|
||||||
survivor="防守练习",
|
survivor="防守练习",
|
||||||
tech="尽可能不要普通消除!",
|
tech="尽可能不要普通消除!",
|
||||||
|
c4wtrain="无 限 连 击",
|
||||||
pctrain="熟悉全清定式的组合",
|
pctrain="熟悉全清定式的组合",
|
||||||
pcchallenge="100行内尽可能多全清",
|
pcchallenge="100行内尽可能多全清",
|
||||||
techmino49="49人混战",
|
techmino49="49人混战",
|
||||||
@@ -85,9 +89,9 @@ return{
|
|||||||
hotseat="友尽模式",
|
hotseat="友尽模式",
|
||||||
},
|
},
|
||||||
|
|
||||||
load={"加载材质ing","加载音乐ing","加载音效ing","加载完成",},
|
load={"加载语音ing","加载音乐ing","加载音效ing","加载完成",},
|
||||||
tips={
|
tips={
|
||||||
"不是动画,真的在加载!",
|
"不是动画,真的在加载!",
|
||||||
"整个游戏都是MrZ完成的!",
|
"整个游戏都是MrZ完成的!",
|
||||||
"大满贯10连击消四全清!",
|
"大满贯10连击消四全清!",
|
||||||
"<方块研究所>有一个Nspire-CX版本!",
|
"<方块研究所>有一个Nspire-CX版本!",
|
||||||
@@ -99,7 +103,7 @@ return{
|
|||||||
"Miya:喵!",
|
"Miya:喵!",
|
||||||
"225238922,哔哩哔哩 干杯~",
|
"225238922,哔哩哔哩 干杯~",
|
||||||
"适度游戏益脑,沉迷游戏伤身,合理安排时间,享受健康生活",
|
"适度游戏益脑,沉迷游戏伤身,合理安排时间,享受健康生活",
|
||||||
"合群了就会消失,但是消失不代表没有意义",
|
"合群了就会消失,但是消失不代表没有意义",
|
||||||
"学会使用两个旋转键,三个更好",
|
"学会使用两个旋转键,三个更好",
|
||||||
"更小的DAS和ARR拥有更高的操作上限",
|
"更小的DAS和ARR拥有更高的操作上限",
|
||||||
"注意到\"旋转\"到底对方块做了些什么吗?",
|
"注意到\"旋转\"到底对方块做了些什么吗?",
|
||||||
@@ -107,6 +111,8 @@ return{
|
|||||||
"不要在上课时玩游戏!",
|
"不要在上课时玩游戏!",
|
||||||
"本游戏难度上限很高,做好心理准备",
|
"本游戏难度上限很高,做好心理准备",
|
||||||
"方块可以不是个休闲游戏",
|
"方块可以不是个休闲游戏",
|
||||||
|
"调到特殊的日期也不会发生什么的",
|
||||||
|
"[随机文本]",
|
||||||
},
|
},
|
||||||
stat={
|
stat={
|
||||||
"游戏运行次数:",
|
"游戏运行次数:",
|
||||||
@@ -135,7 +141,7 @@ return{
|
|||||||
"",
|
"",
|
||||||
"使用LOVE2D引擎",
|
"使用LOVE2D引擎",
|
||||||
"作者:MrZ 邮箱:1046101471@qq.com",
|
"作者:MrZ 邮箱:1046101471@qq.com",
|
||||||
"程序:MrZ 美术:MrZ 音乐:MrZ 音效:MrZ",
|
"程序:MrZ 美术:MrZ 音乐:MrZ 音效:MrZ 语音:Miya",
|
||||||
"使用工具:VScode,GFIE,Beepbox,Goldwave",
|
"使用工具:VScode,GFIE,Beepbox,Goldwave",
|
||||||
"特别感谢:Farter,Teatube,196,Flyz,T830,[所有测试人员]和 你!",
|
"特别感谢:Farter,Teatube,196,Flyz,T830,[所有测试人员]和 你!",
|
||||||
"错误或者建议请附带相关信息发送到作者邮箱~",
|
"错误或者建议请附带相关信息发送到作者邮箱~",
|
||||||
@@ -146,6 +152,7 @@ return{
|
|||||||
main={
|
main={
|
||||||
play="开始",
|
play="开始",
|
||||||
setting="设置",
|
setting="设置",
|
||||||
|
music="音乐室",
|
||||||
stat="统计信息",
|
stat="统计信息",
|
||||||
help="帮助",
|
help="帮助",
|
||||||
quit="退出",
|
quit="退出",
|
||||||
@@ -159,17 +166,29 @@ return{
|
|||||||
custom="自定义(C)",
|
custom="自定义(C)",
|
||||||
back="返回",
|
back="返回",
|
||||||
},
|
},
|
||||||
|
music={
|
||||||
|
up="↑",
|
||||||
|
play="播放",
|
||||||
|
down="↓",
|
||||||
|
back="返回",
|
||||||
|
},
|
||||||
custom={
|
custom={
|
||||||
up="Λ",
|
up="↑",
|
||||||
down="v",
|
down="↓",
|
||||||
left="<",
|
left="<",
|
||||||
right=">",
|
right=">",
|
||||||
start1="消除开始",
|
start1="消除开始",
|
||||||
start2="拼图开始",
|
start2="拼图开始",
|
||||||
draw="画图(D)",
|
draw="画图(D)",
|
||||||
|
set1="40行",
|
||||||
|
set2="1v1",
|
||||||
|
set3="无尽",
|
||||||
|
set4="隐形",
|
||||||
|
set5="极限",
|
||||||
back="返回",
|
back="返回",
|
||||||
},
|
},
|
||||||
draw={
|
draw={
|
||||||
|
any="不定",
|
||||||
block1="■",
|
block1="■",
|
||||||
block2="■",
|
block2="■",
|
||||||
block3="■",
|
block3="■",
|
||||||
@@ -182,7 +201,7 @@ return{
|
|||||||
gb3="■",
|
gb3="■",
|
||||||
gb4="■",
|
gb4="■",
|
||||||
gb5="■",
|
gb5="■",
|
||||||
erase="×",
|
space="×",
|
||||||
clear="清空",
|
clear="清空",
|
||||||
back="返回",
|
back="返回",
|
||||||
},
|
},
|
||||||
@@ -209,7 +228,8 @@ return{
|
|||||||
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 setting.sfx and"音效:开"or"音效:关"end,
|
||||||
bgm=function()return setting.bgm and"音乐:开"or"音乐:关"end,
|
bgm=function()return setting.bgm and"音乐:开"or"音乐:关"end,
|
||||||
vib=function()return "震动强度:"..setting.vib end,
|
vib=function()return "震动:"..setting.vib end,
|
||||||
|
voc=function()return setting.voc and"语音:开"or"语音:关"end,
|
||||||
fullscreen=function()return setting.fullscreen and"全屏:开"or"全屏:关"end,
|
fullscreen=function()return setting.fullscreen and"全屏:开"or"全屏:关"end,
|
||||||
bgblock=function()return setting.bgblock and"背景动画:开"or"背景动画:关"end,
|
bgblock=function()return setting.bgblock and"背景动画:开"or"背景动画:关"end,
|
||||||
frame=function()return"绘制帧:"..setting.frameMul.."%"end,
|
frame=function()return"绘制帧:"..setting.frameMul.."%"end,
|
||||||
@@ -237,4 +257,4 @@ return{
|
|||||||
path="打开存储目录",
|
path="打开存储目录",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}--文
|
}
|
||||||
@@ -36,6 +36,8 @@ return{
|
|||||||
target="Line limit:",
|
target="Line limit:",
|
||||||
freshLimit="Lock fresh limit:",
|
freshLimit="Lock fresh limit:",
|
||||||
opponent="Opponent speed:",
|
opponent="Opponent speed:",
|
||||||
|
bg="Background:",
|
||||||
|
bgm="BGM:",
|
||||||
},
|
},
|
||||||
customVal={
|
customVal={
|
||||||
drop={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,"∞","[20G]"},
|
drop={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,"∞","[20G]"},
|
||||||
@@ -50,19 +52,20 @@ return{
|
|||||||
freshLimit={0,8,15,"∞"},
|
freshLimit={0,8,15,"∞"},
|
||||||
opponent={"No CPU",1,2,3,4,5,6,7,8,9,10,11},
|
opponent={"No CPU",1,2,3,4,5,6,7,8,9,10,11},
|
||||||
},
|
},
|
||||||
softdropdas="softdropDAS:",
|
softdropdas="Down DAS:",
|
||||||
softdroparr="softdropARR:",
|
softdroparr="Down ARR:",
|
||||||
snapLevelName={"Free pos","Snap-10","Snap-20","Snap-40","Snap-60","Snap-80"},
|
snapLevelName={"Free pos","Snap-10","Snap-20","Snap-40","Snap-60","Snap-80"},
|
||||||
keyboard="Keyboard",joystick="Joystick",
|
keyboard="Keyboard",joystick="Joystick",
|
||||||
space="Space",enter="Enter",
|
space="Space",enter="Enter",
|
||||||
setting2Help="Arrowkey to select/change slot,Enter to change,Esc back",
|
setting2Help="Arrowkey to select/change slot,Enter to change,Esc back",
|
||||||
|
musicRoom="Music Room",
|
||||||
|
nowPlaying="Now Playing:",
|
||||||
|
|
||||||
actName={"Move Left:","Move Right:","Rotate Right:","Rotate Left:","Rotate Flip:","Hard Drop:","Soft Drop:","Hold:","Function:","Restart:","Instant Left:","Instant Right:","Ins Down:"},
|
actName={"Move Left:","Move Right:","Rotate Right:","Rotate Left:","Rotate Flip:","Hard Drop:","Soft Drop:","Hold:","Function:","Restart:","Instant Left:","Instant Right:","Ins Down:"},
|
||||||
modeName={
|
modeName={
|
||||||
[0]="Custom",
|
[0]="Custom",
|
||||||
"Sprint","Marathon","Master","Classic","Zen","Infinite","1v1","TSD-only","Blind","Dig","Survivor","Tech",
|
"Sprint","Marathon","Master","Classic","Zen","Infinite","1v1","TSD-only","Blind","Dig","Survivor","Tech",
|
||||||
"PC Train","PC Challenge","Techmino49","Techmino99","Drought","Hotseat",
|
"C4W Train","PC Train","PC Challenge","Techmino49","Techmino99","Drought","Hotseat",
|
||||||
},
|
},
|
||||||
modeInfo={
|
modeInfo={
|
||||||
sprint="Speed run",
|
sprint="Speed run",
|
||||||
@@ -77,6 +80,7 @@ return{
|
|||||||
dig="Downstack!",
|
dig="Downstack!",
|
||||||
survivor="Hand them!",
|
survivor="Hand them!",
|
||||||
tech="Don't do normal clear",
|
tech="Don't do normal clear",
|
||||||
|
c4wtrain="Infinite combo",
|
||||||
pctrain="Let's learn some PCs",
|
pctrain="Let's learn some PCs",
|
||||||
pcchallenge="Make PCs in 100 Lines",
|
pcchallenge="Make PCs in 100 Lines",
|
||||||
techmino49="Melee fight with 48 AIs",
|
techmino49="Melee fight with 48 AIs",
|
||||||
@@ -85,7 +89,7 @@ return{
|
|||||||
hotseat="",
|
hotseat="",
|
||||||
},
|
},
|
||||||
|
|
||||||
load={"Loading textures","Loading BGM","Loading SFX","Finished",},
|
load={"Loading VOICE","Loading BGM","Loading SFX","Finished",},
|
||||||
tips={
|
tips={
|
||||||
"Not animation,real loading!",
|
"Not animation,real loading!",
|
||||||
"The WHOLE game is made by MrZ!",
|
"The WHOLE game is made by MrZ!",
|
||||||
@@ -107,6 +111,8 @@ return{
|
|||||||
"Do not play game in class!",
|
"Do not play game in class!",
|
||||||
"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",
|
||||||
|
"[random text]",
|
||||||
},
|
},
|
||||||
stat={
|
stat={
|
||||||
"Games run:",
|
"Games run:",
|
||||||
@@ -135,7 +141,7 @@ return{
|
|||||||
"",
|
"",
|
||||||
"Powered by LOVE2D",
|
"Powered by LOVE2D",
|
||||||
"Author:MrZ E-mail:1046101471@qq.com",
|
"Author:MrZ E-mail:1046101471@qq.com",
|
||||||
"Programe:MrZ Art:MrZ Music:MrZ SFX:MrZ",
|
"Programe:MrZ Art:MrZ Music:MrZ SFX:MrZ VOICE:Miya",
|
||||||
"Tool used:VScode,GFIE,Beepbox,Goldwave",
|
"Tool used:VScode,GFIE,Beepbox,Goldwave",
|
||||||
"Special thanks:Farter,Teatube,196,Flyz,T830,[all test staff] and YOU!",
|
"Special thanks:Farter,Teatube,196,Flyz,T830,[all test staff] and YOU!",
|
||||||
"Any bugs/suggestions to my E-mail.",
|
"Any bugs/suggestions to my E-mail.",
|
||||||
@@ -146,6 +152,7 @@ return{
|
|||||||
main={
|
main={
|
||||||
play="Play",
|
play="Play",
|
||||||
setting="Settings",
|
setting="Settings",
|
||||||
|
music="Music room",
|
||||||
stat="Statistics",
|
stat="Statistics",
|
||||||
help="Help",
|
help="Help",
|
||||||
quit="Quit",
|
quit="Quit",
|
||||||
@@ -159,17 +166,29 @@ return{
|
|||||||
custom="Custom(C)",
|
custom="Custom(C)",
|
||||||
back="Back",
|
back="Back",
|
||||||
},
|
},
|
||||||
|
music={
|
||||||
|
up="↑",
|
||||||
|
play="Play",
|
||||||
|
down="↓",
|
||||||
|
back="Back",
|
||||||
|
},
|
||||||
custom={
|
custom={
|
||||||
up="Λ",
|
up="↑",
|
||||||
down="v",
|
down="↓",
|
||||||
left="<",
|
left="<",
|
||||||
right=">",
|
right=">",
|
||||||
start1="Clear Start",
|
start1="Clear Start",
|
||||||
start2="Puzzle Start",
|
start2="Puzzle Start",
|
||||||
draw="Draw(D)",
|
draw="Draw(D)",
|
||||||
|
set1="40L",
|
||||||
|
set2="1v1",
|
||||||
|
set3="infinite",
|
||||||
|
set4="blind",
|
||||||
|
set5="classic",
|
||||||
back="Back",
|
back="Back",
|
||||||
},
|
},
|
||||||
draw={
|
draw={
|
||||||
|
any="ANY",
|
||||||
block1="■",
|
block1="■",
|
||||||
block2="■",
|
block2="■",
|
||||||
block3="■",
|
block3="■",
|
||||||
@@ -182,8 +201,8 @@ return{
|
|||||||
gb3="■",
|
gb3="■",
|
||||||
gb4="■",
|
gb4="■",
|
||||||
gb5="■",
|
gb5="■",
|
||||||
erase="×",
|
space="×",
|
||||||
clear="Clear",
|
clear="CLEAR",
|
||||||
back="Back",
|
back="Back",
|
||||||
},
|
},
|
||||||
play={
|
play={
|
||||||
@@ -209,7 +228,8 @@ return{
|
|||||||
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 setting.sfx and"SFX:ON"or"SFX:OFF"end,
|
||||||
bgm=function()return setting.bgm and"BGM:ON"or"BGM:OFF"end,
|
bgm=function()return setting.bgm and"BGM:ON"or"BGM:OFF"end,
|
||||||
vib=function()return "Vibrate level:"..setting.vib end,
|
voc=function()return setting.voc and"VOC:ON"or"VOC:OFF"end,
|
||||||
|
vib=function()return "VIB:"..setting.vib end,
|
||||||
fullscreen=function()return setting.fullscreen and"Fullscreen:ON"or"Fullscreen:OFF"end,
|
fullscreen=function()return setting.fullscreen and"Fullscreen:ON"or"Fullscreen:OFF"end,
|
||||||
bgblock=function()return setting.bgblock and"BG animation:ON"or"BG animation:OFF"end,
|
bgblock=function()return setting.bgblock and"BG animation:ON"or"BG animation:OFF"end,
|
||||||
frame=function()return"FrameDraw:"..setting.frameMul.."%"end,
|
frame=function()return"FrameDraw:"..setting.frameMul.."%"end,
|
||||||
|
|||||||
159
list.lua
159
list.lua
@@ -1,4 +1,5 @@
|
|||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
|
local tc,kb=love.touch,love.keyboard
|
||||||
local sys=love.system
|
local sys=love.system
|
||||||
local fs=love.filesystem
|
local fs=love.filesystem
|
||||||
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"}
|
||||||
@@ -51,13 +52,12 @@ blockColor={
|
|||||||
}
|
}
|
||||||
sfx={
|
sfx={
|
||||||
"button","swipe",
|
"button","swipe",
|
||||||
|
|
||||||
"ready","start","win","fail","collect",
|
"ready","start","win","fail","collect",
|
||||||
"move","rotate","rotatekick","hold",
|
"move","rotate","rotatekick","hold",
|
||||||
"prerotate","prehold",
|
"prerotate","prehold",
|
||||||
"lock","drop","fall",
|
"lock","drop","fall",
|
||||||
"reach",
|
"reach",
|
||||||
"ren_1","ren_2","ren_3","ren_4","ren_5","ren_6","ren_7","ren_8","ren_9","ren_10","ren_11",
|
"ren_1","ren_2","ren_3","ren_4","ren_5","ren_6","ren_7","ren_8","ren_9","ren_10","ren_11","ren_mega",
|
||||||
"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",
|
||||||
"emit","blip_1","blip_2",
|
"emit","blip_1","blip_2",
|
||||||
@@ -76,21 +76,65 @@ bgm={
|
|||||||
"secret7th",
|
"secret7th",
|
||||||
"secret8th",
|
"secret8th",
|
||||||
"rockblock",
|
"rockblock",
|
||||||
|
"8-bit happiness",
|
||||||
"end",
|
"end",
|
||||||
}
|
}
|
||||||
|
voiceList={
|
||||||
|
"Z","S","L","J","T","O","I",
|
||||||
|
"single","double","triple","tts",
|
||||||
|
"spin","spin_","mini","b2b","b3b","pc",
|
||||||
|
"win","lose","voc_nya","nya",
|
||||||
|
}
|
||||||
|
voiceBank={}
|
||||||
|
voice={
|
||||||
|
Z={"Z_1","Z_2"},
|
||||||
|
S={"S_1","S_2"},
|
||||||
|
J={"J_1","J_2"},
|
||||||
|
L={"L_1","L_2"},
|
||||||
|
T={"T_1","T_2"},
|
||||||
|
O={"O_1","O_2"},
|
||||||
|
I={"I_1","I_2"},
|
||||||
|
single={"single_1","single_2","single_3"},
|
||||||
|
double={"double_1","double_2","double_3"},
|
||||||
|
triple={"triple_1","triple_2"},
|
||||||
|
tts={"tts_1"},
|
||||||
|
spin={"spin_1","spin_2","spin_3","spin_4","spin_5"},
|
||||||
|
spin_={"spin-_1","spin-_2"},
|
||||||
|
mini={"mini_1"},
|
||||||
|
b2b={"b2b_1","b2b_2"},
|
||||||
|
b3b={"b3b_1"},
|
||||||
|
pc={"PC_1"},
|
||||||
|
win={"win_1","win_2"},
|
||||||
|
lose={"lose_1","lose_2","lose_3"},
|
||||||
|
voc_nya={"nya_11","nya_12","nya_13","nya_21","nya_22"},
|
||||||
|
nya={"nya_1","nya_2","nya_3","nya_4"},
|
||||||
|
}
|
||||||
|
|
||||||
|
musicID={
|
||||||
|
"blank",
|
||||||
|
"way",
|
||||||
|
"race",
|
||||||
|
"newera",
|
||||||
|
"push",
|
||||||
|
"reason",
|
||||||
|
"infinite",
|
||||||
|
"cruelty",
|
||||||
|
"final",
|
||||||
|
"secret7th",
|
||||||
|
"secret8th",
|
||||||
|
"rockblock",
|
||||||
|
"8-bit happiness",
|
||||||
|
"end",
|
||||||
|
}
|
||||||
customID={
|
customID={
|
||||||
"drop",
|
"drop","lock",
|
||||||
"lock",
|
"wait","fall",
|
||||||
"wait",
|
"next","hold",
|
||||||
"fall",
|
"sequence","visible",
|
||||||
"next",
|
|
||||||
"hold",
|
|
||||||
"sequence",
|
|
||||||
"visible",
|
|
||||||
"target",
|
"target",
|
||||||
"freshLimit",
|
"freshLimit",
|
||||||
"opponent",
|
"opponent",
|
||||||
|
"bg","bgm",
|
||||||
}
|
}
|
||||||
customRange={
|
customRange={
|
||||||
drop={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99,-1},
|
drop={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99,-1},
|
||||||
@@ -104,6 +148,8 @@ customRange={
|
|||||||
target={10,20,40,100,200,500,1000,1e99},
|
target={10,20,40,100,200,500,1000,1e99},
|
||||||
freshLimit={0,8,15,1e99},
|
freshLimit={0,8,15,1e99},
|
||||||
opponent={0,60,30,20,15,10,7,5,4,3,2,1},
|
opponent={0,60,30,20,15,10,7,5,4,3,2,1},
|
||||||
|
bg={"none","game1","game2","game3","strap","rgb","grid","glow","matrix"},
|
||||||
|
bgm={"blank","way","race","newera","push","reason","infinite","secret7th","secret8th","rockblock"},
|
||||||
}
|
}
|
||||||
|
|
||||||
RCPB={10,33,200,33,105,5,105,60}
|
RCPB={10,33,200,33,105,5,105,60}
|
||||||
@@ -114,7 +160,7 @@ percent0to5={[0]="0%","20%","40%","60%","80%","100%",}
|
|||||||
modeID={
|
modeID={
|
||||||
[0]="custom",
|
[0]="custom",
|
||||||
"sprint","marathon","master","classic","zen","infinite","solo","tsd","blind","dig","survivor","tech",
|
"sprint","marathon","master","classic","zen","infinite","solo","tsd","blind","dig","survivor","tech",
|
||||||
"pctrain","pcchallenge","techmino49","techmino99","drought","hotseat",
|
"c4wtrain","pctrain","pcchallenge","techmino49","techmino99","drought","hotseat",
|
||||||
}
|
}
|
||||||
modeLevel={
|
modeLevel={
|
||||||
sprint={"10L","20L","40L","100L","400L","1000L"},
|
sprint={"10L","20L","40L","100L","400L","1000L"},
|
||||||
@@ -122,13 +168,14 @@ modeLevel={
|
|||||||
master={"LUNATIC","ULTIMATE"},
|
master={"LUNATIC","ULTIMATE"},
|
||||||
classic={"CTWC"},
|
classic={"CTWC"},
|
||||||
zen={"NORMAL"},
|
zen={"NORMAL"},
|
||||||
infinite={"NORMAL"},
|
infinite={"NORMAL","EXTRA"},
|
||||||
solo={"EASY","NORMAL","HARD","LUNATIC"},
|
solo={"EASY","NORMAL","HARD","LUNATIC"},
|
||||||
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"},
|
||||||
tech={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE"},
|
tech={"NORMAL","NORMAL+","HARD","LUNATIC","ULTIMATE"},
|
||||||
|
c4wtrain={"NORMAL","LUNATIC"},
|
||||||
pctrain={"NORMAL","EXTRA"},
|
pctrain={"NORMAL","EXTRA"},
|
||||||
pcchallenge={"NORMAL","HARD","LUNATIC"},
|
pcchallenge={"NORMAL","HARD","LUNATIC"},
|
||||||
techmino49={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE"},
|
techmino49={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE"},
|
||||||
@@ -137,15 +184,15 @@ modeLevel={
|
|||||||
hotseat={"2P","3P","4P",},
|
hotseat={"2P","3P","4P",},
|
||||||
custom={"Normal","Puzzle"},
|
custom={"Normal","Puzzle"},
|
||||||
}
|
}
|
||||||
local t,f=true,false
|
local O,_=true,false
|
||||||
blocks={
|
blocks={
|
||||||
{[0]={{f,t,t},{t,t,f}},{{t,f},{t,t},{f,t}}},
|
{[0]={{_,O,O},{O,O,_}},{{O,_},{O,O},{_,O}}},
|
||||||
{[0]={{t,t,f},{f,t,t}},{{f,t},{t,t},{t,f}}},
|
{[0]={{O,O,_},{_,O,O}},{{_,O},{O,O},{O,_}}},
|
||||||
{[0]={{t,t,t},{f,f,t}},{{t,t},{t,f},{t,f}},{{t,f,f},{t,t,t}},{{f,t},{f,t},{t,t}}},
|
{[0]={{O,O,O},{_,_,O}},{{O,O},{O,_},{O,_}},{{O,_,_},{O,O,O}},{{_,O},{_,O},{O,O}}},
|
||||||
{[0]={{t,t,t},{t,f,f}},{{t,f},{t,f},{t,t}},{{f,f,t},{t,t,t}},{{t,t},{f,t},{f,t}}},
|
{[0]={{O,O,O},{O,_,_}},{{O,_},{O,_},{O,O}},{{_,_,O},{O,O,O}},{{O,O},{_,O},{_,O}}},
|
||||||
{[0]={{t,t,t},{f,t,f}},{{t,f},{t,t},{t,f}},{{f,t,f},{t,t,t}},{{f,t},{t,t},{f,t}}},
|
{[0]={{O,O,O},{_,O,_}},{{O,_},{O,O},{O,_}},{{_,O,_},{O,O,O}},{{_,O},{O,O},{_,O}}},
|
||||||
{[0]={{t,t},{t,t}},{{t,t},{t,t}}},
|
{[0]={{O,O},{O,O}},{{O,O},{O,O}}},
|
||||||
{[0]={{t,t,t,t}},{{t},{t},{t},{t}}},
|
{[0]={{O,O,O,O}},{{O},{O},{O},{O}}},
|
||||||
}
|
}
|
||||||
local l={1,2,6,7}for i=1,4 do blocks[l[i]][2],blocks[l[i]][3]=blocks[l[i]][0],blocks[l[i]][1]end
|
local l={1,2,6,7}for i=1,4 do blocks[l[i]][2],blocks[l[i]][3]=blocks[l[i]][0],blocks[l[i]][1]end
|
||||||
for i=1,7 do blocks[i+7]=blocks[i]end
|
for i=1,7 do blocks[i+7]=blocks[i]end
|
||||||
@@ -212,14 +259,27 @@ local virtualkeySet={
|
|||||||
{1200-770,40,1600,40},--restart
|
{1200-770,40,1600,40},--restart
|
||||||
},--PC key feedback
|
},--PC key feedback
|
||||||
}
|
}
|
||||||
|
local customSet={
|
||||||
|
{20,20,1,1,7,1,1,1,3,4,1,1,1},
|
||||||
|
{18,20,1,1,7,1,1,1,8,3,8,1,1},
|
||||||
|
{22,22,1,1,7,3,1,3,8,4,1,1,1},
|
||||||
|
{20,20,1,1,7,1,1,3,8,3,1,1,1},
|
||||||
|
{23,11,8,11,4,1,2,1,8,3,1,1,1},
|
||||||
|
}
|
||||||
|
local function useDefaultSet(n)
|
||||||
|
for i=1,#customSet[n]do
|
||||||
|
customSel[i]=customSet[n][i]
|
||||||
|
end
|
||||||
|
end
|
||||||
Buttons={
|
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"},
|
play= {x=380,y=300,w=240, h=240,rgb=color.red, f=70,code=function()gotoScene("mode")end,down="stat",right="setting"},
|
||||||
setting={x=640,y=300,w=240,h=240,rgb=color.lightBlue, f=55,code=function()gotoScene("setting")end,down="stat",left="play",right="help"},
|
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="setting",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"},
|
||||||
|
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"},
|
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={
|
||||||
@@ -227,22 +287,34 @@ Buttons={
|
|||||||
down= {x=1000,y=430,w=200,h=140, rgb=color.white, f=80, code=function()keyDown.mode("down")end, hide=function()return modeSel==#modeID end,},
|
down= {x=1000,y=430,w=200,h=140, rgb=color.white, f=80, code=function()keyDown.mode("down")end, hide=function()return modeSel==#modeID end,},
|
||||||
left= {x=190, y=160,w=100,h=80, rgb=color.white, code=function()keyDown.mode("left")end, hide=function()return levelSel==1 end,},
|
left= {x=190, y=160,w=100,h=80, rgb=color.white, code=function()keyDown.mode("left")end, hide=function()return levelSel==1 end,},
|
||||||
right= {x=350, y=160,w=100,h=80, rgb=color.white, code=function()keyDown.mode("right")end,hide=function()return levelSel==#modeLevel[modeID[modeSel]]end,},
|
right= {x=350, y=160,w=100,h=80, rgb=color.white, code=function()keyDown.mode("right")end,hide=function()return levelSel==#modeLevel[modeID[modeSel]]end,},
|
||||||
start={ x=1000, y=600,w=250,h=100, rgb=color.green, f=50, code=function()
|
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={
|
||||||
|
up= {x=1100,y=200,w=120,h=120, rgb=color.white,f=50,code=function()sel=(sel-2)%#musicID+1 end},
|
||||||
|
play= {x=1100,y=340,w=120,h=120, rgb=color.white,f=40,code=function()BGM(musicID[sel])end},
|
||||||
|
down= {x=1100,y=480,w=120,h=120, rgb=color.white,f=50,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, code=function()optSel=(optSel-2)%#customID+1 end},
|
up= {x=1000,y=220, w=100,h=100, rgb=color.white, code=function()optSel=(optSel-2)%#customID+1 end},
|
||||||
down= {x=1000,y=460, w=100, h=100, rgb=color.white,f=50, code=function()optSel=optSel%#customID+1 end},
|
down= {x=1000,y=460, w=100,h=100, rgb=color.white,f=50, code=function()optSel=optSel%#customID+1 end},
|
||||||
left= {x=880, y=340, w=100, h=100, rgb=color.white,f=50, code=function()local k=customID[optSel]customSel[k]=(customSel[k]-2)%#customRange[k]+1 end},
|
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},
|
||||||
right= {x=1120,y=340, w=100, h=100, rgb=color.white,f=50, code=function()local k=customID[optSel]customSel[k]=customSel[k]%#customRange[k]+1 end},
|
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},
|
||||||
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},
|
||||||
back= {x=640, y=630 ,w=180, h=60, rgb=color.white, code=back},
|
set1= {x=640, y=160, w=240,h=75, rgb=color.lightRed, code=function()useDefaultSet(1)end},
|
||||||
|
set2= {x=640, y=250, w=240,h=75, rgb=color.lightRed, code=function()useDefaultSet(2)end},
|
||||||
|
set3= {x=640, y=340, w=240,h=75, rgb=color.lightRed, code=function()useDefaultSet(3)end},
|
||||||
|
set4= {x=640, y=430, w=240,h=75, rgb=color.lightRed, code=function()useDefaultSet(4)end},
|
||||||
|
set5= {x=640, y=520, w=240,h=75, rgb=color.lightRed, code=function()useDefaultSet(5)end},
|
||||||
|
back= {x=640, y=630, w=180,h=60, rgb=color.white, code=back},
|
||||||
},
|
},
|
||||||
draw={
|
draw={
|
||||||
|
any= {x=700, y=80,w=120,h=120, f=45, rgb=color.lightGrey,code=function()pen=-1 end},
|
||||||
block1= {x=840, y=80,w=120,h=120, f=65, rgb=color.red, code=function()pen=1 end},
|
block1= {x=840, y=80,w=120,h=120, f=65, rgb=color.red, code=function()pen=1 end},
|
||||||
block2= {x=980, y=80,w=120,h=120, f=65, rgb=color.green, code=function()pen=2 end},
|
block2= {x=980, y=80,w=120,h=120, f=65, rgb=color.green, code=function()pen=2 end},
|
||||||
block3= {x=1120,y=80,w=120,h=120, f=65, rgb=color.orange, code=function()pen=3 end},
|
block3= {x=1120,y=80,w=120,h=120, f=65, rgb=color.orange, code=function()pen=3 end},
|
||||||
@@ -255,8 +327,8 @@ Buttons={
|
|||||||
gb3= {x=840, y=500,w=120,h=120, f=65, rgb=color.darkPurple,code=function()pen=11 end},
|
gb3= {x=840, y=500,w=120,h=120, f=65, rgb=color.darkPurple,code=function()pen=11 end},
|
||||||
gb4= {x=980, y=500,w=120,h=120, f=65, rgb=color.darkRed, code=function()pen=12 end},
|
gb4= {x=980, y=500,w=120,h=120, f=65, rgb=color.darkRed, code=function()pen=12 end},
|
||||||
gb5= {x=1120,y=500,w=120,h=120, f=65, rgb=color.darkGreen,code=function()pen=13 end},
|
gb5= {x=1120,y=500,w=120,h=120, f=65, rgb=color.darkGreen,code=function()pen=13 end},
|
||||||
erase= {x=840, y=640,w=120,h=120, f=70, rgb=color.grey, code=function()pen=0 end},
|
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, 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>0 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]=0 end end
|
||||||
clearSureTime=0
|
clearSureTime=0
|
||||||
@@ -301,11 +373,18 @@ Buttons={
|
|||||||
BGM()
|
BGM()
|
||||||
setting.bgm=not setting.bgm
|
setting.bgm=not setting.bgm
|
||||||
BGM("blank")
|
BGM("blank")
|
||||||
end,down="vib",left="sfx"},
|
end,down="voc",left="sfx"},
|
||||||
vib= {x=850,y=160, w=340,h=60,rgb=color.white, code=function()
|
vib= {x=760,y=160, w=160, h=60,rgb=color.white, code=function()
|
||||||
setting.vib=(setting.vib+1)%6
|
setting.vib=(setting.vib+1)%6
|
||||||
VIB(1)
|
VIB(1)
|
||||||
end,up="sfx",down="fullscreen",left="swap"},
|
end,up="sfx",down="fullscreen",left="swap",right="voc"},
|
||||||
|
voc= {x=940,y=160, w=160, h=60,rgb=color.white,
|
||||||
|
hide=function()
|
||||||
|
return not(kb.isDown("m")or false)
|
||||||
|
end,
|
||||||
|
code=function()
|
||||||
|
setting.voc=not setting.voc
|
||||||
|
end,up="sfx",down="fullscreen",left="vib"},
|
||||||
fullscreen= {x=850,y=230, w=340,h=60,rgb=color.white, code=function()
|
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)
|
||||||
@@ -326,7 +405,7 @@ Buttons={
|
|||||||
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=850,y=440, w=340,h=60,rgb=color.white, code=function()
|
||||||
setting.skin=setting.skin%4+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"},
|
||||||
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"},
|
||||||
|
|||||||
41
main.lua
41
main.lua
@@ -1,7 +1,7 @@
|
|||||||
local gc,tm=love.graphics,love.timer
|
local gc,tm=love.graphics,love.timer
|
||||||
local ms,kb=love.mouse,love.keyboard
|
local ms,kb=love.mouse,love.keyboard
|
||||||
local fs,sys=love.filesystem,love.system
|
local fs,sys=love.filesystem,love.system
|
||||||
int,ceil,abs,rnd,max,min,sin,cos,atan,pi=math.floor,math.ceil,math.abs,math.random,math.max,math.min,math.sin,math.cos,math.atan,math.pi
|
int,ceil,abs,rnd,max,min,sin,cos,atan=math.floor,math.ceil,math.abs,math.random,math.max,math.min,math.sin,math.cos,math.atan
|
||||||
sub,gsub,find,format,byte,char=string.sub,string.gsub,string.find,string.format,string.byte,string.char
|
sub,gsub,find,format,byte,char=string.sub,string.gsub,string.find,string.format,string.byte,string.char
|
||||||
ins,rem,concat=table.insert,table.remove,table.concat
|
ins,rem,concat=table.insert,table.remove,table.concat
|
||||||
-- sort=table.sort
|
-- sort=table.sort
|
||||||
@@ -13,6 +13,7 @@ scr={x=0,y=0,w=gc.getWidth(),h=gc.getHeight(),k=1}
|
|||||||
scene=""
|
scene=""
|
||||||
bgmPlaying=nil
|
bgmPlaying=nil
|
||||||
curBG="none"
|
curBG="none"
|
||||||
|
voicePlaying={}
|
||||||
|
|
||||||
local F=false
|
local F=false
|
||||||
kb.setKeyRepeat(F)
|
kb.setKeyRepeat(F)
|
||||||
@@ -51,17 +52,10 @@ gameEnv0={
|
|||||||
freshLimit=1e99,target=1e99,reach=null,
|
freshLimit=1e99,target=1e99,reach=null,
|
||||||
bg="none",bgm="race"
|
bg="none",bgm="race"
|
||||||
}
|
}
|
||||||
customSel={
|
customSel={22,22,1,1,7,3,1,1,8,4,1,1,1}
|
||||||
drop=22,lock=22,
|
preField={h=20}
|
||||||
wait=1,fall=1,
|
for i=1,18 do preField[i]={0,0,0,0,0,0,0,0,0,0}end
|
||||||
next=7,hold=3,
|
for i=19,20 do preField[i]={-1,-1,-1,-1,-1,-1,-1,-1,-1,-1}end
|
||||||
sequence=1,
|
|
||||||
visible=1,
|
|
||||||
target=8,
|
|
||||||
freshLimit=4,
|
|
||||||
opponent=1,
|
|
||||||
}
|
|
||||||
preField={h=20}for i=1,20 do preField[i]={0,0,0,0,0,0,0,0,0,0}end
|
|
||||||
freeRow={}
|
freeRow={}
|
||||||
for i=1,40 do
|
for i=1,40 do
|
||||||
freeRow[i]={0,0,0,0,0,0,0,0,0,0}
|
freeRow[i]={0,0,0,0,0,0,0,0,0,0}
|
||||||
@@ -75,7 +69,8 @@ setting={
|
|||||||
sddas=0,sdarr=2,
|
sddas=0,sdarr=2,
|
||||||
lang=1,
|
lang=1,
|
||||||
|
|
||||||
sfx=true,bgm=true,vib=3,
|
sfx=true,bgm=true,
|
||||||
|
vib=3,voc=false,
|
||||||
fullscreen=F,
|
fullscreen=F,
|
||||||
bgblock=true,
|
bgblock=true,
|
||||||
skin=1,
|
skin=1,
|
||||||
@@ -142,16 +137,16 @@ virtualkey={
|
|||||||
virtualkeyDown={F,F,F,F,F,F,F,F,F,F,F,F,F}
|
virtualkeyDown={F,F,F,F,F,F,F,F,F,F,F,F,F}
|
||||||
virtualkeyPressTime={0,0,0,0,0,0,0,0,0,0,0,0,0}
|
virtualkeyPressTime={0,0,0,0,0,0,0,0,0,0,0,0,0}
|
||||||
--User Data&User Setting
|
--User Data&User Setting
|
||||||
require"toolfunc"
|
require("toolfunc")
|
||||||
require"list"
|
require("list")
|
||||||
require"class"
|
require("class")
|
||||||
require"gamefunc"
|
require("gamefunc")
|
||||||
require"ai"
|
require("ai")
|
||||||
require"timer"
|
require("timer")
|
||||||
require"paint"
|
require("paint")
|
||||||
require"call&sys"
|
require("call&sys")
|
||||||
require"dataList"
|
require("dataList")
|
||||||
require"texture"
|
require("texture")
|
||||||
|
|
||||||
userData,userSetting=fs.newFile("userdata"),fs.newFile("usersetting")
|
userData,userSetting=fs.newFile("userdata"),fs.newFile("usersetting")
|
||||||
if fs.getInfo("userdata")then
|
if fs.getInfo("userdata")then
|
||||||
|
|||||||
133
paint.lua
133
paint.lua
@@ -20,6 +20,7 @@ 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,
|
["HARD+"]=color.darkMagenta,
|
||||||
LUNATIC=color.red,
|
LUNATIC=color.red,
|
||||||
@@ -263,7 +264,7 @@ function Pnt.BG.game6()
|
|||||||
end
|
end
|
||||||
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()%pi*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()
|
function Pnt.BG.rgb()
|
||||||
gc.clear(
|
gc.clear(
|
||||||
@@ -321,7 +322,7 @@ function Pnt.main()
|
|||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
gc.draw(titleImage,300,30)
|
gc.draw(titleImage,300,30)
|
||||||
setFont(30)
|
setFont(30)
|
||||||
gc.print("Alpha V0.7.18",290,140)
|
gc.print("Alpha V0.7.20",290,140)
|
||||||
gc.print(system,800,110)
|
gc.print(system,800,110)
|
||||||
end
|
end
|
||||||
function Pnt.mode()
|
function Pnt.mode()
|
||||||
@@ -343,6 +344,22 @@ function Pnt.mode()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
function Pnt.music()
|
||||||
|
gc.setColor(1,1,1,.3+sin(Timer()*5)*.2)
|
||||||
|
gc.rectangle("fill",45,98+30*sel,237,30)
|
||||||
|
gc.setColor(.8,.8,.8)
|
||||||
|
gc.draw(drawableText.musicRoom,20,20)
|
||||||
|
gc.setColor(1,1,1)
|
||||||
|
gc.draw(drawableText.musicRoom,22,23)
|
||||||
|
gc.draw(drawableText.nowPlaying,520,83)
|
||||||
|
setFont(35)
|
||||||
|
for i=1,#musicID do
|
||||||
|
gc.print(musicID[i],50,90+30*i)
|
||||||
|
end
|
||||||
|
setFont(50)
|
||||||
|
gc.setColor(sin(Timer()*.5)*.2+.8,sin(Timer()*.7)*.2+.8,sin(Timer())*.2+.8)
|
||||||
|
gc.print(bgmPlaying or"",600,140)
|
||||||
|
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*optSel,465,40)
|
||||||
@@ -354,9 +371,9 @@ function Pnt.custom()
|
|||||||
local y=90+40*i
|
local y=90+40*i
|
||||||
gc.printf(text.customOption[k],30,y,320,"right")
|
gc.printf(text.customOption[k],30,y,320,"right")
|
||||||
if text.customVal[k]then
|
if text.customVal[k]then
|
||||||
gc.print(text.customVal[k][customSel[k]],350,y)
|
gc.print(text.customVal[k][customSel[i]],350,y)
|
||||||
else
|
else
|
||||||
gc.print(customRange[k][customSel[k]],350,y)
|
gc.print(customRange[k][customSel[i]],350,y)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -369,9 +386,14 @@ function Pnt.draw()
|
|||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
gc.setLineWidth(3)
|
gc.setLineWidth(3)
|
||||||
gc.rectangle("line",-2,-2,304,604)
|
gc.rectangle("line",-2,-2,304,604)
|
||||||
|
gc.setLineWidth(2)
|
||||||
for y=1,20 do for x=1,10 do
|
for y=1,20 do for x=1,10 do
|
||||||
if preField[y][x]>0 then
|
local B=preField[y][x]
|
||||||
drawPixel(y,x,preField[y][x])
|
if B>0 then
|
||||||
|
drawPixel(y,x,B)
|
||||||
|
elseif B==0 then
|
||||||
|
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)
|
||||||
end
|
end
|
||||||
end end
|
end end
|
||||||
if sx and sy then
|
if sx and sy then
|
||||||
@@ -387,63 +409,70 @@ function Pnt.draw()
|
|||||||
gc.setLineWidth(13)
|
gc.setLineWidth(13)
|
||||||
gc.setColor(blockColor[pen])
|
gc.setColor(blockColor[pen])
|
||||||
gc.rectangle("line",945,605,70,70)
|
gc.rectangle("line",945,605,70,70)
|
||||||
else
|
elseif pen==0 then
|
||||||
gc.setColor(.8,.8,.8)
|
gc.setLineWidth(5)
|
||||||
gc.draw(drawableText.x,950,560)
|
gc.setColor(.9,.9,.9)
|
||||||
|
gc.line(960,620,1000,660)
|
||||||
|
gc.line(960,660,1000,620)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function Pnt.play()
|
function Pnt.play()
|
||||||
for p=1,#players do
|
for p=1,#players do
|
||||||
P=players[p]
|
P=players[p]
|
||||||
if P.small then
|
if P.small then
|
||||||
gc.push("transform")
|
P.frameWait=P.frameWait-1
|
||||||
gc.translate(P.x,P.y)gc.scale(P.size)--Position
|
if P.frameWait==0 then
|
||||||
gc.setColor(0,0,0,.4)gc.rectangle("fill",0,0,60,120)--Background
|
P.frameWait=8
|
||||||
gc.translate(0,P.fieldBeneath*.2)
|
gc.setCanvas(P.canvas)
|
||||||
gc.setScissor(scr.x+P.x*scr.k,scr.y+P.y*scr.k,60*P.size*scr.k,120*P.size*scr.k)
|
gc.clear(0,0,0,.4)
|
||||||
gc.setColor(1,1,1,P.result and max(20-P.endCounter,0)*.05 or 1)
|
gc.push("transform")
|
||||||
local h=#P.clearing
|
gc.origin()
|
||||||
for j=int(P.fieldBeneath/30+1),#P.field do
|
gc.setColor(1,1,1,P.result and max(20-P.endCounter,0)*.05 or 1)
|
||||||
if j==P.clearing[h]and P.falling>-1 then
|
local h=#P.clearing
|
||||||
h=h-1
|
local F=P.field
|
||||||
else
|
for j=1,#F do
|
||||||
for i=1,10 do
|
if j==P.clearing[h]and P.falling>-1 then
|
||||||
if P.field[j][i]>0 then
|
h=h-1
|
||||||
gc.draw(blockSkinmini[P.field[j][i]],6*i-6,120-6*j)
|
else
|
||||||
|
for i=1,10 do
|
||||||
|
if F[j][i]>0 then
|
||||||
|
gc.draw(blockSkinmini[F[j][i]],6*i-6,120-6*j)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end--Field
|
||||||
|
if P.alive then
|
||||||
|
gc.setLineWidth(2)
|
||||||
|
gc.setColor(frameColor[P.strength])gc.rectangle("line",1,1,58,118)
|
||||||
|
end--Draw boarder
|
||||||
|
if modeEnv.royaleMode then
|
||||||
|
gc.setColor(1,1,1)
|
||||||
|
for i=1,P.strength do
|
||||||
|
gc.draw(badgeIcon,12*i-7,4,nil,.5)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end--Field
|
if P.result then
|
||||||
gc.setScissor()
|
gc.setColor(1,1,1,min(P.endCounter,60)*.01)
|
||||||
gc.translate(0,-P.fieldBeneath*.2)
|
setFont(22)mStr(P.result,32,47)
|
||||||
if P.alive then
|
setFont(20)mStr(P.rank,30,82)
|
||||||
gc.setLineWidth(2)
|
|
||||||
gc.setColor(frameColor[P.strength])gc.rectangle("line",-1,-1,62,122)
|
|
||||||
end--Draw boarder
|
|
||||||
if modeEnv.royaleMode then
|
|
||||||
gc.setColor(1,1,1)
|
|
||||||
for i=1,P.strength do
|
|
||||||
gc.draw(badgeIcon,12*i-7,4,nil,.5)
|
|
||||||
end
|
end
|
||||||
|
gc.pop()
|
||||||
|
gc.setCanvas()
|
||||||
end
|
end
|
||||||
if P.result then
|
gc.setColor(1,1,1)
|
||||||
gc.setColor(1,1,1,min(P.endCounter,60)*.01)
|
gc.draw(P.canvas,P.x,P.y,nil,P.size*10)
|
||||||
setFont(22)mStr(P.result,32,47)
|
if P.killMark then
|
||||||
setFont(20)mStr(P.rank,30,82)
|
gc.setLineWidth(3)
|
||||||
if P.killMark then
|
gc.setColor(1,0,0,min(P.endCounter,25)*.04)
|
||||||
gc.setLineWidth(4)
|
gc.circle("line",P.centerX,P.centerY,(840-20*min(P.endCounter,30))*P.size)
|
||||||
gc.setColor(1,0,0,min(P.endCounter,25)*.04)
|
|
||||||
gc.circle("line",31,60,84-2*min(P.endCounter,30))
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
gc.pop()
|
|
||||||
else
|
else
|
||||||
gc.push("transform")
|
gc.push("transform")
|
||||||
gc.translate(P.x,P.y)gc.scale(P.size)--Position
|
gc.translate(P.x,P.y)gc.scale(P.size)--Position
|
||||||
gc.setColor(0,0,0,.6)gc.rectangle("fill",0,0,600,690)--Background
|
gc.setColor(0,0,0,.6)gc.rectangle("fill",0,0,600,690)--Background
|
||||||
gc.setLineWidth(7)
|
gc.setLineWidth(7)
|
||||||
gc.setColor(frameColor[P.strength])gc.rectangle("line",0,0,600,690,3)--Big frame
|
gc.setColor(frameColor[P.strength])gc.rectangle("line",0,0,600,690,3)--Big frame
|
||||||
gc.translate(150,70)
|
gc.translate(150+P.fieldOffX,70+P.fieldOffY)
|
||||||
if P.gameEnv.grid then
|
if P.gameEnv.grid then
|
||||||
gc.setLineWidth(1)
|
gc.setLineWidth(1)
|
||||||
gc.setColor(1,1,1,.2)
|
gc.setColor(1,1,1,.2)
|
||||||
@@ -451,7 +480,7 @@ function Pnt.play()
|
|||||||
for y=0,19 do gc.line(0,30*y,300,30*y)end
|
for y=0,19 do gc.line(0,30*y,300,30*y)end
|
||||||
end--Grid lines
|
end--Grid lines
|
||||||
gc.translate(0,P.fieldBeneath)
|
gc.translate(0,P.fieldBeneath)
|
||||||
gc.setScissor(scr.x+P.absFieldPos[1]*scr.k,scr.y+P.absFieldPos[2]*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 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
|
||||||
@@ -507,13 +536,12 @@ function Pnt.play()
|
|||||||
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)
|
||||||
end--Rotate center
|
end--Rotate center
|
||||||
end
|
end
|
||||||
gc.setColor(1,1,1)
|
|
||||||
gc.draw(PTC.dust[p])
|
|
||||||
--Draw game field
|
--Draw game field
|
||||||
gc.setScissor()--In-playField mask
|
gc.setScissor()--In-playField mask
|
||||||
gc.translate(0,-P.fieldBeneath)
|
gc.translate(0,-P.fieldBeneath)
|
||||||
gc.setLineWidth(3)
|
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
|
gc.draw(PTC.dust[p])
|
||||||
|
gc.setLineWidth(3)
|
||||||
gc.rectangle("line",-1,-11,302,612)--Draw boarder
|
gc.rectangle("line",-1,-11,302,612)--Draw boarder
|
||||||
|
|
||||||
gc.setLineWidth(2)
|
gc.setLineWidth(2)
|
||||||
@@ -559,6 +587,7 @@ function Pnt.play()
|
|||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
gc.rectangle("line",-17,-3,16,604.5)--Draw b2b bar boarder
|
gc.rectangle("line",-17,-3,16,604.5)--Draw b2b bar boarder
|
||||||
--B2B indictator
|
--B2B indictator
|
||||||
|
gc.translate(-P.fieldOffX,-P.fieldOffY)
|
||||||
|
|
||||||
if P.gameEnv.hold then
|
if P.gameEnv.hold then
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
@@ -686,9 +715,9 @@ function Pnt.setting()
|
|||||||
setFont(35)
|
setFont(35)
|
||||||
mStr("DAS:"..setting.das,290,278)
|
mStr("DAS:"..setting.das,290,278)
|
||||||
mStr("ARR:"..setting.arr,506,278)
|
mStr("ARR:"..setting.arr,506,278)
|
||||||
setFont(18)
|
setFont(21)
|
||||||
mStr(text.softdropdas..setting.sddas,290,361)
|
mStr(text.softdropdas..setting.sddas,290,357)
|
||||||
mStr(text.softdroparr..setting.sdarr,506,361)
|
mStr(text.softdroparr..setting.sdarr,506,357)
|
||||||
gc.draw(blockSkin[7-int(Timer()*2)%7],820,480,nil,2)
|
gc.draw(blockSkin[7-int(Timer()*2)%7],820,480,nil,2)
|
||||||
end
|
end
|
||||||
function Pnt.setting2()
|
function Pnt.setting2()
|
||||||
|
|||||||
@@ -79,15 +79,17 @@ 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,"?"),
|
||||||
x=T(110,"×"),
|
|
||||||
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),
|
||||||
custom=T(80),
|
custom=T(80),
|
||||||
keyboard=T(25),joystick=T(25),
|
keyboard=T(25),joystick=T(25),
|
||||||
setting2Help=T(25),
|
setting2Help=T(25),
|
||||||
|
musicRoom=T(80),
|
||||||
|
nowPlaying=T(50),
|
||||||
}
|
}
|
||||||
c=gc.setCanvas()
|
c=gc.setCanvas()
|
||||||
38
timer.lua
38
timer.lua
@@ -3,20 +3,26 @@ local Timer=love.timer.getTime
|
|||||||
|
|
||||||
Tmr={}
|
Tmr={}
|
||||||
function Tmr.load()
|
function Tmr.load()
|
||||||
|
local t=Timer()
|
||||||
|
::R::
|
||||||
if loading==1 then
|
if loading==1 then
|
||||||
loadnum=loadnum+1
|
if loadnum<=#voiceList then
|
||||||
loadprogress=loadnum/10
|
local N=voiceList[loadnum]
|
||||||
if loadnum==5 then
|
for i=1,#voice[N]do
|
||||||
--require("texture")
|
voice[N][i]=love.audio.newSource("VOICE/"..voice[N][i]..".ogg","static")
|
||||||
elseif loadnum==10 then
|
end
|
||||||
loadnum=1
|
loadprogress=loadnum/#voiceList
|
||||||
|
loadnum=loadnum+1
|
||||||
|
else
|
||||||
loading=2
|
loading=2
|
||||||
|
loadnum=1
|
||||||
end
|
end
|
||||||
elseif loading==2 then
|
elseif loading==2 then
|
||||||
if loadnum<=#bgm then
|
if loadnum<=#bgm then
|
||||||
bgm[bgm[loadnum]]=love.audio.newSource("/BGM/"..bgm[loadnum]..".ogg","stream")
|
local N=bgm[loadnum]
|
||||||
bgm[bgm[loadnum]]:setLooping(true)
|
bgm[N]=love.audio.newSource("/BGM/"..N..".ogg","stream")
|
||||||
bgm[bgm[loadnum]]:setVolume(0)
|
bgm[N]:setLooping(true)
|
||||||
|
bgm[N]:setVolume(0)
|
||||||
loadprogress=loadnum/#bgm
|
loadprogress=loadnum/#bgm
|
||||||
loadnum=loadnum+1
|
loadnum=loadnum+1
|
||||||
else
|
else
|
||||||
@@ -32,7 +38,7 @@ function Tmr.load()
|
|||||||
else
|
else
|
||||||
for i=1,#sfx do sfx[i]=nil end
|
for i=1,#sfx do sfx[i]=nil end
|
||||||
loading=4
|
loading=4
|
||||||
loadnum=0
|
loadnum=1
|
||||||
end
|
end
|
||||||
elseif loading==4 then
|
elseif loading==4 then
|
||||||
loadnum=loadnum+1
|
loadnum=loadnum+1
|
||||||
@@ -82,7 +88,7 @@ function Tmr.play(dt)
|
|||||||
if frame==179 then
|
if frame==179 then
|
||||||
gameStart()
|
gameStart()
|
||||||
elseif frame%60==0 then
|
elseif frame%60==0 then
|
||||||
sysSFX("ready")
|
SFX("ready")
|
||||||
end
|
end
|
||||||
for p=1,#players do
|
for p=1,#players do
|
||||||
P=players[p]
|
P=players[p]
|
||||||
@@ -181,7 +187,7 @@ function Tmr.play(dt)
|
|||||||
if P.falling>=0 then
|
if P.falling>=0 then
|
||||||
P.falling=P.falling-1
|
P.falling=P.falling-1
|
||||||
if P.falling>=0 then goto stop end
|
if P.falling>=0 then goto stop end
|
||||||
if P.gameEnv.fall>0 and #P.field>P.clearing[1]then SFX("fall")end
|
if P.human and P.gameEnv.fall>0 and #P.field>P.clearing[1]then SFX("fall")end
|
||||||
for i=1,#P.clearing do
|
for i=1,#P.clearing do
|
||||||
removeRow(P.field,P.clearing[i])
|
removeRow(P.field,P.clearing[i])
|
||||||
removeRow(P.visTime,P.clearing[i])
|
removeRow(P.visTime,P.clearing[i])
|
||||||
@@ -230,7 +236,7 @@ function Tmr.play(dt)
|
|||||||
if P.falling>=0 then
|
if P.falling>=0 then
|
||||||
P.falling=P.falling-1
|
P.falling=P.falling-1
|
||||||
if P.falling>=0 then goto stop end
|
if P.falling>=0 then goto stop end
|
||||||
if P.gameEnv.fall>0 and #P.field>P.clearing[1]then SFX("fall")end
|
if P.human and P.gameEnv.fall>0 and #P.field>P.clearing[1]then SFX("fall")end
|
||||||
for i=1,#P.clearing do
|
for i=1,#P.clearing do
|
||||||
removeRow(P.field,P.clearing[i])
|
removeRow(P.field,P.clearing[i])
|
||||||
removeRow(P.visTime,P.clearing[i])
|
removeRow(P.visTime,P.clearing[i])
|
||||||
@@ -254,6 +260,12 @@ function Tmr.play(dt)
|
|||||||
rem(P.shade,i)
|
rem(P.shade,i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if P.fieldOffY>0 then
|
||||||
|
P.fieldOffY=P.fieldOffY-(P.fieldOffY>3 and 2 or 1)
|
||||||
|
end
|
||||||
|
if P.fieldOffX~=0 then
|
||||||
|
P.fieldOffX=P.fieldOffX-(P.fieldOffX>0 and 1 or -1)
|
||||||
|
end
|
||||||
for i=#P.bonus,1,-1 do
|
for i=#P.bonus,1,-1 do
|
||||||
local b=P.bonus[i]
|
local b=P.bonus[i]
|
||||||
if b.inf then
|
if b.inf then
|
||||||
|
|||||||
48
toolfunc.lua
48
toolfunc.lua
@@ -45,10 +45,13 @@ local drawableTextLoad={
|
|||||||
"next",
|
"next",
|
||||||
"hold",
|
"hold",
|
||||||
"pause",
|
"pause",
|
||||||
|
"finish",
|
||||||
"custom",
|
"custom",
|
||||||
"keyboard",
|
"keyboard",
|
||||||
"joystick",
|
"joystick",
|
||||||
"setting2Help",
|
"setting2Help",
|
||||||
|
"musicRoom",
|
||||||
|
"nowPlaying",
|
||||||
}
|
}
|
||||||
function swapLanguage(l)
|
function swapLanguage(l)
|
||||||
text=require("language/"..langID[l])
|
text=require("language/"..langID[l])
|
||||||
@@ -59,7 +62,6 @@ function swapLanguage(l)
|
|||||||
B.t=text.ButtonText[S][N]
|
B.t=text.ButtonText[S][N]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if royaleCtrlPad then royaleCtrlPad:release()end
|
|
||||||
gc.push("transform")
|
gc.push("transform")
|
||||||
gc.origin()
|
gc.origin()
|
||||||
royaleCtrlPad=gc.newCanvas(300,100)
|
royaleCtrlPad=gc.newCanvas(300,100)
|
||||||
@@ -71,8 +73,8 @@ function swapLanguage(l)
|
|||||||
gc.rectangle("line",RCPB[2*i-1],RCPB[2*i],90,35,8,4)
|
gc.rectangle("line",RCPB[2*i-1],RCPB[2*i],90,35,8,4)
|
||||||
mStr(text.atkModeName[i],RCPB[2*i-1]+45,RCPB[2*i]+3)
|
mStr(text.atkModeName[i],RCPB[2*i-1]+45,RCPB[2*i]+3)
|
||||||
end
|
end
|
||||||
gc.setCanvas()
|
|
||||||
gc.pop()
|
gc.pop()
|
||||||
|
gc.setCanvas()
|
||||||
for _,s in next,drawableTextLoad do
|
for _,s in next,drawableTextLoad do
|
||||||
drawableText[s]:set(text[s])
|
drawableText[s]:set(text[s])
|
||||||
end
|
end
|
||||||
@@ -80,12 +82,15 @@ function swapLanguage(l)
|
|||||||
end
|
end
|
||||||
function changeBlockSkin(n)
|
function changeBlockSkin(n)
|
||||||
n=n-1
|
n=n-1
|
||||||
|
gc.push("transform")
|
||||||
|
gc.origin()
|
||||||
for i=1,13 do
|
for i=1,13 do
|
||||||
gc.setCanvas(blockSkin[i])
|
gc.setCanvas(blockSkin[i])
|
||||||
gc.draw(blockImg,30-30*i,-30*n)
|
gc.draw(blockImg,30-30*i,-30*n)
|
||||||
gc.setCanvas(blockSkinmini[i])
|
gc.setCanvas(blockSkinmini[i])
|
||||||
gc.draw(blockImg,6-6*i,-6*n,nil,.2)
|
gc.draw(blockImg,6-6*i,-6*n,nil,.2)
|
||||||
end
|
end
|
||||||
|
gc.pop()
|
||||||
gc.setCanvas()
|
gc.setCanvas()
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -95,7 +100,7 @@ function VIB(t)
|
|||||||
love.system.vibrate(vibrateLevel[setting.vib+t])
|
love.system.vibrate(vibrateLevel[setting.vib+t])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function sysSFX(s,v)
|
function SFX(s,v)
|
||||||
if setting.sfx then
|
if setting.sfx then
|
||||||
local n=1
|
local n=1
|
||||||
::L::if sfx[s][n]:isPlaying()then
|
::L::if sfx[s][n]:isPlaying()then
|
||||||
@@ -111,20 +116,12 @@ function sysSFX(s,v)
|
|||||||
sfx[s][n]:play()
|
sfx[s][n]:play()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function SFX(s,v)
|
function VOICE(s,n)
|
||||||
if setting.sfx and not P.ai then
|
if setting.voc then
|
||||||
local n=1
|
ins(voicePlaying,voice[s][n or rnd(#voice[s])])
|
||||||
::L::if sfx[s][n]:isPlaying()then
|
if #voicePlaying==1 then
|
||||||
n=n+1
|
voicePlaying[1]:play()
|
||||||
if not sfx[s][n]then
|
end
|
||||||
sfx[s][n]=sfx[s][n-1]:clone()
|
|
||||||
sfx[s][n]:seek(0)
|
|
||||||
goto quit
|
|
||||||
end
|
|
||||||
goto L
|
|
||||||
end::quit::
|
|
||||||
sfx[s][n]:setVolume(v or 1)
|
|
||||||
sfx[s][n]:play()
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function BGM(s)
|
function BGM(s)
|
||||||
@@ -194,13 +191,12 @@ function gotoScene(s,style)
|
|||||||
}
|
}
|
||||||
Buttons.sel=nil
|
Buttons.sel=nil
|
||||||
if style~="none"then
|
if style~="none"then
|
||||||
sysSFX("swipe")
|
SFX("swipe")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function updateStat()
|
function updateStat()
|
||||||
for k,v in next,players[1].stat do
|
for k,v in next,players[1].stat do
|
||||||
print(k)
|
|
||||||
stat[k]=stat[k]+v
|
stat[k]=stat[k]+v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -208,27 +204,27 @@ local prevMenu={
|
|||||||
load=love.event.quit,
|
load=love.event.quit,
|
||||||
intro="quit",
|
intro="quit",
|
||||||
main="intro",
|
main="intro",
|
||||||
|
music="main",
|
||||||
mode="main",
|
mode="main",
|
||||||
custom="mode",
|
custom="mode",
|
||||||
draw=function()
|
draw=function()
|
||||||
kb.setKeyRepeat(false)
|
kb.setKeyRepeat(false)
|
||||||
gotoScene("custom")
|
gotoScene("custom")
|
||||||
end,
|
end,
|
||||||
ready="mode",
|
|
||||||
play=function()
|
play=function()
|
||||||
updateStat()
|
updateStat()
|
||||||
clearTask("play")
|
clearTask("play")
|
||||||
gotoScene(curMode.id~="custom"and"mode"or"custom","deck")
|
gotoScene(curMode.id~="custom"and"mode"or"custom","deck")
|
||||||
end,
|
end,
|
||||||
pause=null,
|
pause=nil,
|
||||||
help="main",
|
|
||||||
stat="main",
|
|
||||||
setting=function()
|
setting=function()
|
||||||
saveSetting()
|
saveSetting()
|
||||||
gotoScene("main")
|
gotoScene("main")
|
||||||
end,
|
end,
|
||||||
setting2="setting",
|
setting2="setting",
|
||||||
setting3="setting",
|
setting3="setting",
|
||||||
|
help="main",
|
||||||
|
stat="main",
|
||||||
}prevMenu.pause=prevMenu.play
|
}prevMenu.pause=prevMenu.play
|
||||||
function back()
|
function back()
|
||||||
local t=prevMenu[scene]
|
local t=prevMenu[scene]
|
||||||
@@ -309,7 +305,7 @@ function loadSetting()
|
|||||||
if find(i,"=")then
|
if find(i,"=")then
|
||||||
local t=sub(i,1,find(i,"=")-1)
|
local t=sub(i,1,find(i,"=")-1)
|
||||||
local v=sub(i,find(i,"=")+1)
|
local v=sub(i,find(i,"=")+1)
|
||||||
if t=="sfx"or t=="bgm"or t=="bgblock"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
|
||||||
setting.vib=toN(v:match("[012345]"))or 0
|
setting.vib=toN(v:match("[012345]"))or 0
|
||||||
@@ -348,7 +344,7 @@ function loadSetting()
|
|||||||
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
|
||||||
setting[t]=toN(v:match("[1234]"))or 1
|
setting[t]=toN(v:match("[123456]"))or 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -362,7 +358,7 @@ local saveOpt={
|
|||||||
"lang",
|
"lang",
|
||||||
|
|
||||||
"sfx","bgm",
|
"sfx","bgm",
|
||||||
"vib",
|
"vib","voc",
|
||||||
"fullscreen",
|
"fullscreen",
|
||||||
"bgblock",
|
"bgblock",
|
||||||
"skin",
|
"skin",
|
||||||
|
|||||||
Reference in New Issue
Block a user