Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12c047416c | ||
|
|
fd5fac4e8a |
22
ai.lua
22
ai.lua
@@ -110,7 +110,8 @@ local FCL={
|
||||
FCL[2]=FCL[1]
|
||||
FCL[4]=FCL[3]
|
||||
FCL[5]=FCL[3]
|
||||
local clearScore={[0]=0,0,2,4,12}
|
||||
local LclearScore={[0]=0,-200,-140,-100,200}
|
||||
local HclearScore={[0]=0,50,80,100,500}
|
||||
local function ifoverlapAI(f,bk,x,y)
|
||||
if y<1 then return true end
|
||||
if y>#f then return end
|
||||
@@ -161,6 +162,7 @@ local function getScore(field,cb,cy)
|
||||
end
|
||||
end
|
||||
end
|
||||
local sdh=0
|
||||
local h1,mh1=0,0
|
||||
for x=1,9 do
|
||||
local dh=abs(height[x]-height[x+1])
|
||||
@@ -170,17 +172,25 @@ local function getScore(field,cb,cy)
|
||||
else
|
||||
h1=0
|
||||
end
|
||||
sdh=sdh+min(dh^1.6,20)
|
||||
end
|
||||
freeRow[#freeRow+1]=height
|
||||
freeRow.L=freeRow.L+1
|
||||
score=
|
||||
#field*20
|
||||
-#field*10
|
||||
-cy*35
|
||||
-#cb*25
|
||||
+clearScore[clear]*(8+#field)
|
||||
-hole*50
|
||||
if #field>6 then score=score-highest*5 end
|
||||
if mh1>3 then score=score-40-mh1*30 end
|
||||
+(#field>10 and
|
||||
HclearScore[clear]
|
||||
-hole*70
|
||||
-sdh
|
||||
or
|
||||
LclearScore[clear]
|
||||
-hole*100
|
||||
-sdh*3
|
||||
)
|
||||
if #field>6 then score=score-highest*5+20 end
|
||||
if mh1>3 then score=score-20-mh1*30 end
|
||||
return score
|
||||
end
|
||||
-------------------------------------------------
|
||||
|
||||
2
conf.lua
2
conf.lua
@@ -1,5 +1,5 @@
|
||||
math.randomseed(os.time())
|
||||
gameVersion="Alpha V0.7.31+"
|
||||
gameVersion="Alpha V0.7.33+"
|
||||
function love.conf(t)
|
||||
t.identity="Techmino"--Save directory name
|
||||
t.version="11.1"
|
||||
|
||||
68
dataList.lua
68
dataList.lua
@@ -6,10 +6,10 @@ local PCbase={
|
||||
{3,6,6,0,0,0,0,2,2,5},
|
||||
{4,6,6,0,0,0,1,1,5,5},
|
||||
{4,4,4,0,0,0,0,1,1,5},
|
||||
{1,1,0,0,0,0,0,3,3,3},
|
||||
{5,1,1,0,0,0,0,6,6,3},
|
||||
{5,5,2,2,0,0,0,6,6,4},
|
||||
{5,2,2,0,0,0,0,4,4,4},
|
||||
{1,1,0,0,0,0,0,4,4,4},
|
||||
{5,1,1,0,0,0,0,6,6,4},
|
||||
{5,5,2,2,0,0,0,6,6,3},
|
||||
{5,2,2,0,0,0,0,3,3,3},
|
||||
}
|
||||
local PClist={
|
||||
{7,7,4,5},{7,7,6,4},{7,7,2,4},{7,7,1,3},{7,7,5,6},{7,7,5,2},{7,7,5,4},{7,7,5,3},
|
||||
@@ -46,7 +46,7 @@ local function throwBadge(S,R)--Sender/Receiver
|
||||
end
|
||||
FX_badge[#FX_badge+1]={x1,y1,x2,y2,t=0}
|
||||
end
|
||||
local AISpeed={60,50,45,35,25,15,9,7,5,3}
|
||||
local AISpeed={60,50,45,35,25,15,9,6,4,2}
|
||||
local function AITemplate(type,speedLV,next,hold,node)
|
||||
if type=="CC"then
|
||||
return{
|
||||
@@ -93,20 +93,22 @@ function loadmode.solo()
|
||||
if curMode.lv==1 then
|
||||
newPlayer(2,965,360,.5,AITemplate("9S",3))
|
||||
elseif curMode.lv==2 then
|
||||
newPlayer(2,965,360,.5,AITemplate("CC",2,2,false,10000))
|
||||
newPlayer(2,965,360,.5,AITemplate("CC",3,2,false,10000))
|
||||
elseif curMode.lv==3 then
|
||||
newPlayer(2,965,360,.5,AITemplate("9S",6))
|
||||
newPlayer(2,965,360,.5,AITemplate("9S",5))
|
||||
elseif curMode.lv==4 then
|
||||
newPlayer(2,965,360,.5,AITemplate("CC",5,2,true,20000))
|
||||
elseif curMode.lv==5 then
|
||||
newPlayer(2,965,360,.5,AITemplate("9S",9))
|
||||
newPlayer(2,965,360,.5,AITemplate("9S",7))
|
||||
elseif curMode.lv==6 then
|
||||
newPlayer(2,965,360,.5,AITemplate("CC",8,3,true,30000))
|
||||
elseif curMode.lv==7 then
|
||||
newPlayer(2,965,360,.5,AITemplate("9S",10))
|
||||
newPlayer(2,965,360,.5,AITemplate("9S",8))
|
||||
elseif curMode.lv==8 then
|
||||
newPlayer(2,965,360,.5,AITemplate("CC",9,3,true,40000))
|
||||
elseif curMode.lv==9 then
|
||||
newPlayer(2,965,360,.5,AITemplate("9S",9))
|
||||
elseif curMode.lv==10 then
|
||||
newPlayer(2,965,360,.5,AITemplate("CC",10,4,true,80000))
|
||||
end
|
||||
end
|
||||
@@ -453,7 +455,7 @@ function Event.marathon_update(P)
|
||||
end
|
||||
end
|
||||
function Event.master_score(P)
|
||||
local c=#P.clearing
|
||||
local c=#P.cleared
|
||||
if c==0 and P.modeData.point%100==99 then return end
|
||||
local s=c<3 and c+1 or c==3 and 5 or 7
|
||||
if P.combo>7 then s=s+2
|
||||
@@ -492,7 +494,7 @@ function Event.master_score(P)
|
||||
end
|
||||
end
|
||||
function Event.master_score_hard(P)
|
||||
local c=#P.clearing
|
||||
local c=#P.cleared
|
||||
if c==0 then return end
|
||||
local s
|
||||
if P.lastClear<10 then
|
||||
@@ -534,15 +536,17 @@ function Event.classic_reach(P)
|
||||
P.gameEnv.target=P.gameEnv.target+10
|
||||
if P.gameEnv.target==110 then
|
||||
P.gameEnv.drop,P.gameEnv.lock=2,2
|
||||
elseif P.gameEnv.target==210 then
|
||||
elseif P.gameEnv.target==200 then
|
||||
P.gameEnv.drop,P.gameEnv.lock=1,1
|
||||
end
|
||||
SFX("reach")
|
||||
if P.gameEnv.target>100 then
|
||||
SFX("reach")
|
||||
end
|
||||
end
|
||||
end
|
||||
function Event.infinite_check(P)
|
||||
for i=1,#P.clearing do
|
||||
if P.clearing[i]<6 then
|
||||
for i=1,#P.cleared do
|
||||
if P.cleared[i]<6 then
|
||||
P:garbageRise(10,1,rnd(10))
|
||||
end
|
||||
end
|
||||
@@ -558,46 +562,54 @@ function Event.round_check(P)
|
||||
players[ID].control=true
|
||||
end
|
||||
end
|
||||
function Event.GM_reach(P)
|
||||
local R=#P.clearing
|
||||
if R==4 then R=10 end
|
||||
P.modeData.point=P.modeData.point+R
|
||||
function Event.GM_score(P)
|
||||
local F=false
|
||||
if P.modeData.point<70 then--if Less then MM
|
||||
local R=#P.cleared
|
||||
if R==4 then R=10 end
|
||||
P.modeData.point=P.modeData.point+R
|
||||
F=true
|
||||
end
|
||||
if P.stat.time>=53.5 then
|
||||
P.modeData.point=P.modeData.point+15
|
||||
P.modeData.point=min(P.modeData.point+15,80)
|
||||
F=true
|
||||
Event.win(P)
|
||||
end
|
||||
if F then
|
||||
P.modeData.event=sectionName[int(P.modeData.point*.1)+1]
|
||||
end
|
||||
end
|
||||
function Event.tsd_reach(P)
|
||||
if #P.clearing>0 then
|
||||
if #P.cleared>0 then
|
||||
if P.lastClear~=52 then
|
||||
Event.lose(P)
|
||||
elseif #P.clearing>0 then
|
||||
elseif #P.cleared>0 then
|
||||
P.modeData.event=P.modeData.event+1
|
||||
end
|
||||
end
|
||||
end
|
||||
function Event.tech_reach_easy(P)
|
||||
if #P.clearing>0 and P.b2b<40 then
|
||||
if #P.cleared>0 and P.b2b<40 then
|
||||
Event.lose(P)
|
||||
end
|
||||
end
|
||||
function Event.tech_reach_hard(P)
|
||||
if #P.clearing>0 and P.lastClear<10 then
|
||||
if #P.cleared>0 and P.lastClear<10 then
|
||||
Event.lose(P)
|
||||
end
|
||||
end
|
||||
function Event.tech_reach_ultimate(P)
|
||||
if #P.clearing>0 and P.lastClear<10 or P.lastClear==74 then
|
||||
if #P.cleared>0 and P.lastClear<10 or P.lastClear==74 then
|
||||
Event.lose(P)
|
||||
end
|
||||
end
|
||||
function Event.c4w_reach(P)
|
||||
for i=1,#P.clearing do
|
||||
for i=1,#P.cleared do
|
||||
P.field[#P.field+1]=getNewRow(10)
|
||||
P.visTime[#P.visTime+1]=getNewRow(20)
|
||||
for i=4,7 do P.field[#P.field][i]=0 end
|
||||
end
|
||||
if #P.clearing==0 then
|
||||
if #P.cleared==0 then
|
||||
if curMode.lv==2 then
|
||||
Event.lose(P)
|
||||
end
|
||||
@@ -1172,7 +1184,7 @@ defModeEnv.blind={
|
||||
wait=10,fall=15,
|
||||
visible="fast",
|
||||
freshLimit=15,
|
||||
dropPiece="GM_reach",
|
||||
dropPiece="GM_score",
|
||||
arr=1,
|
||||
bg="game3",bgm="shining terminal",
|
||||
},
|
||||
|
||||
@@ -34,6 +34,7 @@ setting={
|
||||
},
|
||||
VKSwitch=true,
|
||||
VKTrack=true,--If tracked
|
||||
VKDodge=false,--If repel
|
||||
VKTchW=3,--Touch Weight
|
||||
VKCurW=4,--CurPos Weight
|
||||
VKIcon=true,
|
||||
|
||||
@@ -143,6 +143,7 @@ return{
|
||||
"不要按F8",
|
||||
"秘密代码:626",
|
||||
"CLASSIC SEXY RUSSIAN BLOCKS",
|
||||
"戴上耳机获得最佳体验",
|
||||
"LrL,RlR LLr,RRl RRR/LLL F!!",--ZSLJTTI
|
||||
},
|
||||
stat={
|
||||
@@ -297,6 +298,7 @@ return{
|
||||
bgm="音乐",
|
||||
vib="震动",
|
||||
voc="语音",
|
||||
stereo="双声道",
|
||||
back=BK,
|
||||
},
|
||||
setting_key={
|
||||
@@ -325,6 +327,7 @@ return{
|
||||
back=BK,
|
||||
},
|
||||
setting_trackSetting={
|
||||
VKDodge="自动避让",
|
||||
back=BK,
|
||||
},
|
||||
help={
|
||||
|
||||
@@ -143,6 +143,7 @@ return{
|
||||
"不要按F8",
|
||||
"秘密代码:626",
|
||||
"CLASSIC SEXY RUSSIAN BLOCKS",
|
||||
"戴上耳机获得最佳体验",
|
||||
"LrL,RlR LLr,RRl RRR/LLL F!!",--ZSLJTTI
|
||||
},
|
||||
stat={
|
||||
@@ -192,7 +193,7 @@ return{
|
||||
warning="禁 止 私 自 传 播",
|
||||
WidgetText={
|
||||
main={
|
||||
lang="文-Lang",
|
||||
lang="全-Lang",
|
||||
qplay="快速开始",
|
||||
play="开始",
|
||||
setting="设置",
|
||||
@@ -298,6 +299,7 @@ return{
|
||||
bgm="音乐",
|
||||
vib="震动",
|
||||
voc="语音",
|
||||
stereo="双声道",
|
||||
back=BK,
|
||||
},
|
||||
setting_key={
|
||||
@@ -326,6 +328,7 @@ return{
|
||||
back=BK,
|
||||
},
|
||||
setting_trackSetting={
|
||||
VKDodge="自动避让",
|
||||
back=BK,
|
||||
},
|
||||
help={
|
||||
|
||||
@@ -142,6 +142,7 @@ return{
|
||||
"Secret code:626",
|
||||
"Techmino=Technique+Tetromino",
|
||||
"CLASSIC SEXY RUSSIAN BLOCKS",
|
||||
"Headphones for better experience",
|
||||
"LrL,RlR LLr,RRl RRR/LLL F!!",--ZSLJTTI
|
||||
},
|
||||
stat={
|
||||
@@ -296,6 +297,7 @@ Lib used:
|
||||
bgm="BGM",
|
||||
vib="VIB",
|
||||
voc="VOC",
|
||||
stereo="Stereo",
|
||||
back=BK,
|
||||
},
|
||||
setting_key={
|
||||
@@ -324,6 +326,7 @@ Lib used:
|
||||
back=BK,
|
||||
},
|
||||
setting_trackSetting={
|
||||
VKDodge="Auto Dodge",
|
||||
back=BK,
|
||||
},
|
||||
help={
|
||||
|
||||
276
list.lua
276
list.lua
@@ -58,7 +58,7 @@ blockColor={
|
||||
sfx={
|
||||
"welcome",
|
||||
"error","error_long",
|
||||
--Stereo sfxs
|
||||
--Stereo sfxs(cannot set position)
|
||||
"button","swipe",
|
||||
"ready","start","win","fail","collect",
|
||||
"move","rotate","rotatekick","hold",
|
||||
@@ -70,7 +70,7 @@ sfx={
|
||||
"spin_0","spin_1","spin_2","spin_3",
|
||||
"emit","blip_1","blip_2",
|
||||
"perfectclear",
|
||||
--mono sfxs
|
||||
--Mono sfxs
|
||||
}
|
||||
bgm={
|
||||
"blank",
|
||||
@@ -166,7 +166,7 @@ customRange={
|
||||
RCPB={10,33,200,33,105,5,105,60}
|
||||
snapLevelValue={1,10,20,40,60,80}
|
||||
up0to4={[0]="000%UP","025%UP","050%UP","075%UP","100%UP",}
|
||||
|
||||
sectionName={"M7","M8","M9","M","MK","MV","MO","MM","GM"}
|
||||
modeID={
|
||||
[0]="custom",
|
||||
"sprint","marathon","master","classic","zen","infinite","solo","round","tsd","blind",
|
||||
@@ -180,7 +180,7 @@ modeLevel={
|
||||
classic={"CTWC"},
|
||||
zen={"NORMAL"},
|
||||
infinite={"NORMAL","EXTRA"},
|
||||
solo={"EASY","EASY+","NORMAL","NORMAL+","HARD","HARD+","LUNATIC","LUNATIC+","ULTIMATE"},
|
||||
solo={"EASY","EASY+","NORMAL","NORMAL+","HARD","HARD+","LUNATIC","LUNATIC+","ULTIMATE","ULTIMATE+"},
|
||||
round={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE"},
|
||||
tsd={"NORMAL","HARD"},
|
||||
blind={"EASY","HARD","HARD+","LUNATIC","ULTIMATE","GM"},
|
||||
@@ -298,6 +298,31 @@ local function useDefaultSet(n)
|
||||
curBG=customRange.bg[customSel[12]]
|
||||
BGM(customRange.bgm[customSel[13]])
|
||||
end
|
||||
|
||||
--λFuncs for widgets
|
||||
local function SETdisp(k)
|
||||
return function()
|
||||
return setting[k]
|
||||
end
|
||||
end
|
||||
local function SETsto(k)
|
||||
return function(i)setting[k]=i end
|
||||
end
|
||||
local function SETrev(k)
|
||||
return function()
|
||||
setting[k]=not setting[k]
|
||||
end
|
||||
end
|
||||
local function pressKey(k)
|
||||
return function()
|
||||
love.keypressed(k)
|
||||
end
|
||||
end
|
||||
local function setPen(i)
|
||||
return function()
|
||||
pen=i
|
||||
end
|
||||
end
|
||||
local function VKAdisp(n)
|
||||
return function()
|
||||
return VK_org[n].ava
|
||||
@@ -308,93 +333,94 @@ local function VKAcode(n)
|
||||
VK_org[n].ava=not VK_org[n].ava
|
||||
end
|
||||
end
|
||||
local C=color
|
||||
Widget={
|
||||
load={},intro={},quit={},
|
||||
main={
|
||||
play= newButton(150,280,200,160,color.red, 60,function()scene.push()scene.swapTo("mode")end, nil,"setting"),
|
||||
setting=newButton(370,280,200,160,color.lightBlue, 50,function()scene.push()scene.swapTo("setting_game")end, nil,"music"),
|
||||
music= newButton(590,280,200,160,color.lightPurple,37,function()scene.push()scene.swapTo("music")end, nil,"help"),
|
||||
help= newButton(150,460,200,160,color.yellow, 55,function()scene.push()scene.swapTo("help")end, nil,"stat"),
|
||||
stat= newButton(370,460,200,160,color.cyan, 48,function()scene.push()scene.swapTo("stat")end, nil,"qplay"),
|
||||
qplay= newButton(540,415,100,70,color.lightGreen, 28,function()scene.push()loadGame(modeSel,levelSel)end, nil,"lang"),
|
||||
lang= newButton(590,505,200,70,color.lightRed, 50,function()
|
||||
play= newButton(150,280,200,160,C.red, 60,function()scene.push()scene.swapTo("mode")end, nil,"setting"),
|
||||
setting=newButton(370,280,200,160,C.lightBlue, 50,function()scene.push()scene.swapTo("setting_game")end, nil,"music"),
|
||||
music= newButton(590,280,200,160,C.lightPurple,37,function()scene.push()scene.swapTo("music")end, nil,"help"),
|
||||
help= newButton(150,460,200,160,C.yellow, 55,function()scene.push()scene.swapTo("help")end, nil,"stat"),
|
||||
stat= newButton(370,460,200,160,C.cyan, 48,function()scene.push()scene.swapTo("stat")end, nil,"qplay"),
|
||||
qplay= newButton(540,415,100,70,C.lightGreen, 28,function()scene.push()loadGame(modeSel,levelSel)end, nil,"lang"),
|
||||
lang= newButton(590,505,200,70,C.lightRed, 50,function()
|
||||
setting.lang=setting.lang%#langName+1
|
||||
swapLanguage(setting.lang)
|
||||
end,nil,"quit"),
|
||||
quit= newButton(370,620,280,100,color.lightGrey, 60,function()scene.swapTo("quit")end, nil,"play"),
|
||||
quit= newButton(370,620,280,100,C.lightGrey, 60,function()scene.swapTo("quit")end, nil,"play"),
|
||||
},
|
||||
mode={
|
||||
up= newButton(1000, 210,200,140,color.white, 80,function()love.keypressed("up")end,function()return modeSel==1 end),
|
||||
down= newButton(1000, 430,200,140,color.white, 80,function()love.keypressed("down")end,function()return modeSel==#modeID end),
|
||||
left= newButton(190, 160,100,80, color.white, 40,function()love.keypressed("left")end,function()return levelSel==1 end),
|
||||
right= newButton(350, 160,100,80, color.white, 40,function()love.keypressed("right")end,function()return levelSel==#modeLevel[modeID[modeSel]]end),
|
||||
start= newButton(1000, 600,250,100,color.green, 50,function()scene.push()loadGame(modeSel,levelSel)end),
|
||||
custom= newButton(275, 420,200,90, color.yellow, 40,function()scene.push()scene.swapTo("custom")end),
|
||||
back= newButton(640, 630,230,90, color.white, 45,scene.back),
|
||||
up= newButton(1000, 210,200,140,C.white, 80,pressKey("up"), function()return modeSel==1 end),
|
||||
down= newButton(1000, 430,200,140,C.white, 80,pressKey("down"), function()return modeSel==#modeID end),
|
||||
left= newButton(190, 160,100,80, C.white, 40,pressKey("left"), function()return levelSel==1 end),
|
||||
right= newButton(350, 160,100,80, C.white, 40,pressKey("right"), function()return levelSel==#modeLevel[modeID[modeSel]]end),
|
||||
start= newButton(1000, 600,250,100,C.green, 50,function()scene.push()loadGame(modeSel,levelSel)end),
|
||||
custom= newButton(275, 420,200,90, C.yellow, 40,function()scene.push()scene.swapTo("custom")end),
|
||||
back= newButton(640, 630,230,90, C.white, 45,scene.back),
|
||||
},
|
||||
music={
|
||||
bgm= newSlider(760, 80,400,10,40,nil,function()return setting.bgm end,function(i)setting.bgm=i;BGM(bgmPlaying)end),
|
||||
up= newButton(1100, 200,120,120,color.white,60,function()love.keypressed("up")end),
|
||||
play= newButton(1100, 340,120,120,color.white,40,function()love.keypressed("space")end,function()return setting.bgm==0 end),
|
||||
down= newButton(1100, 480,120,120,color.white,60,function()love.keypressed("down")end),
|
||||
back= newButton(640, 630,230,90, color.white,45,scene.back),
|
||||
bgm= newSlider(760, 80,400,10,40,nil,SETdisp("bgm"),function(i)setting.bgm=i;BGM(bgmPlaying)end),
|
||||
up= newButton(1100, 200,120,120,C.white,60,pressKey("up")),
|
||||
play= newButton(1100, 340,120,120,C.white,40,pressKey("space"),function()return setting.bgm==0 end),
|
||||
down= newButton(1100, 480,120,120,C.white,60,pressKey("down")),
|
||||
back= newButton(640, 630,230,90, C.white,45,scene.back),
|
||||
},
|
||||
custom={
|
||||
up= newButton(1000, 220,100,100,color.white, 50,function()sel=(sel-2)%#customID+1 end),
|
||||
down= newButton(1000, 460,100,100,color.white, 50,function()sel=sel%#customID+1 end),
|
||||
left= newButton(880, 340,100,100,color.white, 50,function()love.keypressed("left")end),
|
||||
right= newButton(1120, 340,100,100,color.white, 50,function()love.keypressed("right")end),
|
||||
start1= newButton(880, 580,220,70, color.green, 40,function()scene.push()loadGame(0,1)end),
|
||||
start2= newButton(1120, 580,220,70, color.lightPurple, 40,function()scene.push()loadGame(0,2)end),
|
||||
draw= newButton(1000, 90, 190,85, color.cyan, 40,function()scene.push()scene.swapTo("draw")end),
|
||||
set1= newButton(640, 160,240,75, color.lightRed, 40,function()useDefaultSet(1)end),
|
||||
set2= newButton(640, 250,240,75, color.lightRed, 40,function()useDefaultSet(2)end),
|
||||
set3= newButton(640, 340,240,75, color.lightRed, 40,function()useDefaultSet(3)end),
|
||||
set4= newButton(640, 430,240,75, color.lightRed, 40,function()useDefaultSet(4)end),
|
||||
set5= newButton(640, 520,240,75, color.lightRed, 40,function()useDefaultSet(5)end),
|
||||
back= newButton(640, 630,180,60, color.white, 40,scene.back),
|
||||
up= newButton(1000, 220,100,100,C.white, 50,function()sel=(sel-2)%#customID+1 end),
|
||||
down= newButton(1000, 460,100,100,C.white, 50,function()sel=sel%#customID+1 end),
|
||||
left= newButton(880, 340,100,100,C.white, 50,pressKey("left")),
|
||||
right= newButton(1120, 340,100,100,C.white, 50,pressKey("right")),
|
||||
start1= newButton(880, 580,220,70, C.green, 40,function()scene.push()loadGame(0,1)end),
|
||||
start2= newButton(1120, 580,220,70, C.lightPurple, 40,function()scene.push()loadGame(0,2)end),
|
||||
draw= newButton(1000, 90, 190,85, C.cyan, 40,function()scene.push()scene.swapTo("draw")end),
|
||||
set1= newButton(640, 160,240,75, C.lightRed, 40,function()useDefaultSet(1)end),
|
||||
set2= newButton(640, 250,240,75, C.lightRed, 40,function()useDefaultSet(2)end),
|
||||
set3= newButton(640, 340,240,75, C.lightRed, 40,function()useDefaultSet(3)end),
|
||||
set4= newButton(640, 430,240,75, C.lightRed, 40,function()useDefaultSet(4)end),
|
||||
set5= newButton(640, 520,240,75, C.lightRed, 40,function()useDefaultSet(5)end),
|
||||
back= newButton(640, 630,180,60, C.white, 40,scene.back),
|
||||
},
|
||||
draw={
|
||||
block1= newButton(920, 80, 120,120,color.red, 65,function()pen=1 end),
|
||||
block2= newButton(1060, 80, 120,120,color.green, 65,function()pen=2 end),
|
||||
block3= newButton(1200, 80, 120,120,color.orange, 65,function()pen=3 end),
|
||||
block4= newButton(920, 220,120,120,color.blue, 65,function()pen=4 end),
|
||||
block5= newButton(1060, 220,120,120,color.magenta, 65,function()pen=5 end),
|
||||
block6= newButton(1200, 220,120,120,color.yellow, 65,function()pen=6 end),
|
||||
block7= newButton(920, 360,120,120,color.cyan, 65,function()pen=7 end),
|
||||
gb1= newButton(1060, 360,120,120,color.darkGrey, 65,function()pen=9 end),
|
||||
gb2= newButton(1200, 360,120,120,color.grey, 65,function()pen=10 end),
|
||||
gb3= newButton(920, 500,120,120,color.darkPurple, 65,function()pen=11 end),
|
||||
gb4= newButton(1060, 500,120,120,color.darkRed, 65,function()pen=12 end),
|
||||
gb5= newButton(1200, 500,120,120,color.darkGreen, 65,function()pen=13 end),
|
||||
clear= newButton(780, 80, 120,120,color.white, 45,function()love.keypressed("delete")end),
|
||||
any= newButton(780, 220,120,120,color.lightGrey, 45,function()pen=0 end),
|
||||
space= newButton(780, 360,120,120,color.grey, 70,function()pen=-1 end),
|
||||
back= newButton(1200, 640,120,120,color.white, 40,scene.back),
|
||||
block1= newButton(920, 80, 120,120,C.red, 65,setPen(1)),
|
||||
block2= newButton(1060, 80, 120,120,C.green, 65,setPen(2)),
|
||||
block3= newButton(1200, 80, 120,120,C.orange, 65,setPen(3)),
|
||||
block4= newButton(920, 220,120,120,C.blue, 65,setPen(4)),
|
||||
block5= newButton(1060, 220,120,120,C.magenta, 65,setPen(5)),
|
||||
block6= newButton(1200, 220,120,120,C.yellow, 65,setPen(6)),
|
||||
block7= newButton(920, 360,120,120,C.cyan, 65,setPen(7)),
|
||||
gb1= newButton(1060, 360,120,120,C.darkGrey, 65,setPen(9)),
|
||||
gb2= newButton(1200, 360,120,120,C.grey, 65,setPen(10)),
|
||||
gb3= newButton(920, 500,120,120,C.darkPurple, 65,setPen(11)),
|
||||
gb4= newButton(1060, 500,120,120,C.darkRed, 65,setPen(12)),
|
||||
gb5= newButton(1200, 500,120,120,C.darkGreen, 65,setPen(13)),
|
||||
clear= newButton(780, 80, 120,120,C.white, 45,pressKey("delete")),
|
||||
any= newButton(780, 220,120,120,C.lightGrey, 45,setPen(0)),
|
||||
space= newButton(780, 360,120,120,C.grey, 70,setPen(-1)),
|
||||
back= newButton(1200, 640,120,120,C.white, 40,scene.back),
|
||||
},
|
||||
play={
|
||||
pause= newButton(1235,45,80,80,color.white,30,pauseGame),
|
||||
pause= newButton(1235,45,80,80,C.white,30,pauseGame),
|
||||
},
|
||||
pause={
|
||||
resume= newButton(640,290,240,100,color.white,50,resumeGame),
|
||||
restart=newButton(640,445,240,100,color.white,50,function()
|
||||
resume= newButton(640,290,240,100,C.white,50,resumeGame),
|
||||
restart=newButton(640,445,240,100,C.white,50,function()
|
||||
clearTask("play")
|
||||
updateStat()
|
||||
resetGameData()
|
||||
scene.swapTo("play","none")
|
||||
end),
|
||||
setting=newButton(1150,80,200,100,color.yellow,45,function()
|
||||
setting=newButton(1150,80,200,100,C.yellow,45,function()
|
||||
scene.push()
|
||||
scene.swapTo("setting_sound")
|
||||
end),
|
||||
quit= newButton(640,600,240,100,color.white,50,scene.back),
|
||||
quit= newButton(640,600,240,100,C.white,50,scene.back),
|
||||
},
|
||||
setting_game={
|
||||
graphic=newButton(200,80,240,80,color.lightGreen,40,function()scene.swapTo("setting_graphic")end, nil,"sound"),
|
||||
sound= newButton(1080,80,240,80,color.lightGreen,40,function()scene.swapTo("setting_sound")end, nil,"dasD"),
|
||||
dasD= newButton(180,230,50,50,color.white,40,function()setting.das=(setting.das-1)%31 end, nil,"dasU"),
|
||||
dasU= newButton(400,230,50,50,color.white,40,function()setting.das=(setting.das+1)%31 end, nil,"arrD"),
|
||||
arrD= newButton(500,230,50,50,color.white,40,function()
|
||||
graphic=newButton(200,80,240,80,C.lightGreen,40,function()scene.swapTo("setting_graphic")end, nil,"sound"),
|
||||
sound= newButton(1080,80,240,80,C.lightGreen,40,function()scene.swapTo("setting_sound")end, nil,"dasD"),
|
||||
dasD= newButton(180,230,50,50,C.white,40,function()setting.das=(setting.das-1)%31 end, nil,"dasU"),
|
||||
dasU= newButton(400,230,50,50,C.white,40,function()setting.das=(setting.das+1)%31 end, nil,"arrD"),
|
||||
arrD= newButton(500,230,50,50,C.white,40,function()
|
||||
setting.arr=(setting.arr-1)%16
|
||||
if setting.arr>setting.das then
|
||||
setting.das=setting.arr
|
||||
@@ -402,7 +428,7 @@ Widget={
|
||||
SFX("blip_1",.4)
|
||||
end
|
||||
end,nil,"arrU"),
|
||||
arrU= newButton(720,230,50,50,color.white,40,function()
|
||||
arrU= newButton(720,230,50,50,C.white,40,function()
|
||||
setting.arr=(setting.arr+1)%16
|
||||
if setting.arr>setting.das then
|
||||
setting.das=setting.arr
|
||||
@@ -410,65 +436,64 @@ Widget={
|
||||
SFX("blip_1",.4)
|
||||
end
|
||||
end,nil,"sddasD"),
|
||||
sddasD= newButton(180,340,50,50,color.white,40,function()setting.sddas=(setting.sddas-1)%11 end, nil,"sddasU"),
|
||||
sddasU= newButton(400,340,50,50,color.white,40,function()setting.sddas=(setting.sddas+1)%11 end, nil,"sdarrD"),
|
||||
sdarrD= newButton(500,340,50,50,color.white,40,function()setting.sdarr=(setting.sdarr-1)%4 end, nil,"sdarrU"),
|
||||
sdarrU= newButton(720,340,50,50,color.white,40,function()setting.sdarr=(setting.sdarr+1)%4 end, nil,"quickR"),
|
||||
quickR= newSwitch(560,430,40,function()return setting.quickR end,function()setting.quickR=not setting.quickR end, nil,"swap"),
|
||||
swap= newSwitch(560,510,25,function()return setting.swap end,function()setting.swap=not setting.swap end, nil,"fine"),
|
||||
fine= newSwitch(560,590,25,function()return setting.fine end,function()setting.fine=not setting.fine end, nil,"ctrl"),
|
||||
ctrl= newButton(1020,230,320,80,color.white,40,function()scene.push()scene.swapTo("setting_key")end, nil,"touch"),
|
||||
touch= newButton(1020,340,320,80,color.white,40,function()scene.push()scene.swapTo("setting_touch")end, nil,"back"),
|
||||
back= newButton(1160,600,160,160,color.white,55,scene.back,nil,"graphic"),
|
||||
sddasD= newButton(180,340,50,50,C.white,40, function()setting.sddas=(setting.sddas-1)%11 end, nil,"sddasU"),
|
||||
sddasU= newButton(400,340,50,50,C.white,40, function()setting.sddas=(setting.sddas+1)%11 end, nil,"sdarrD"),
|
||||
sdarrD= newButton(500,340,50,50,C.white,40, function()setting.sdarr=(setting.sdarr-1)%4 end, nil,"sdarrU"),
|
||||
sdarrU= newButton(720,340,50,50,C.white,40, function()setting.sdarr=(setting.sdarr+1)%4 end, nil,"quickR"),
|
||||
quickR= newSwitch(560,430,40,SETdisp("quickR"), SETrev("quickR"), nil,"swap"),
|
||||
swap= newSwitch(560,510,25,SETdisp("swap"), SETrev("swap"), nil,"fine"),
|
||||
fine= newSwitch(560,590,25,SETdisp("fine"), SETrev("fine"), nil,"ctrl"),
|
||||
ctrl= newButton(1020,230,320,80,C.white,40,function()scene.push()scene.swapTo("setting_key")end, nil,"touch"),
|
||||
touch= newButton(1020,340,320,80,C.white,40,function()scene.push()scene.swapTo("setting_touch")end,nil,"back"),
|
||||
back= newButton(1160,600,160,160,C.white,55,scene.back,nil,"graphic"),
|
||||
},
|
||||
setting_graphic={
|
||||
sound= newButton(200,80,240,80,color.lightGreen,40,function()scene.swapTo("setting_sound")end, nil,"game"),
|
||||
game= newButton(1080,80,240,80,color.lightGreen,40,function()scene.swapTo("setting_game")end, nil,"ghost"),
|
||||
ghost= newSwitch(310,180,40,function()return setting.ghost end, function()setting.ghost= not setting.ghost end, nil,"center"),
|
||||
center= newSwitch(580,180,40,function()return setting.center end, function()setting.center= not setting.center end, nil,"smo"),
|
||||
smo= newSwitch(310,260,25,function()return setting.smo end, function()setting.smo= not setting.smo end, nil,"grid"),
|
||||
grid= newSwitch(580,260,40,function()return setting.grid end, function()setting.grid= not setting.grid end, nil,"dropFX"),
|
||||
dropFX= newSlider(310,350,373,3,40,nil,function()return setting.dropFX end, function(i)setting.dropFX=i end, nil,"shakeFX"),
|
||||
shakeFX=newSlider(310,430,373,3,40,nil,function()return setting.shakeFX end, function(i)setting.shakeFX=i end, nil,"atkFX"),
|
||||
atkFX= newSlider(310,510,373,3,40,nil,function()return setting.atkFX end, function(i)setting.atkFX=i end, nil,"frame"),
|
||||
sound= newButton(200,80,240,80,C.lightGreen,40,function()scene.swapTo("setting_sound")end, nil,"game"),
|
||||
game= newButton(1080,80,240,80,C.lightGreen,40,function()scene.swapTo("setting_game")end, nil,"ghost"),
|
||||
ghost= newSwitch(310,180,40,SETdisp("ghost"), SETdisp("ghost"), nil,"center"),
|
||||
center= newSwitch(580,180,40,SETdisp("center"), SETdisp("center"), nil,"smo"),
|
||||
smo= newSwitch(310,260,25,SETdisp("smo"), SETdisp("smo"), nil,"grid"),
|
||||
grid= newSwitch(580,260,40,SETdisp("grid"), SETdisp("grid"), nil,"dropFX"),
|
||||
dropFX= newSlider(310,350,373,3,40,nil,SETdisp("dropFX"), SETsto("dropFX"), nil,"shakeFX"),
|
||||
shakeFX=newSlider(310,430,373,3,40,nil,SETdisp("shakeFX"), SETsto("shakeFX"), nil,"atkFX"),
|
||||
atkFX= newSlider(310,510,373,3,40,nil,SETdisp("atkFX"), SETsto("atkFX"), nil,"frame"),
|
||||
frame= newSlider(310,590,373,10,40,nil,function()return setting.frameMul>35 and setting.frameMul/10 or setting.frameMul/5-4 end,function(i)setting.frameMul=i<5 and 5*i+20 or 10*i end,nil,"fullscreen"),
|
||||
fullscreen=newSwitch(990,180,40,function()return setting.fullscreen end,function()
|
||||
fullscreen=newSwitch(990,180,40,SETdisp("fullscreen"),function()
|
||||
setting.fullscreen=not setting.fullscreen
|
||||
love.window.setFullscreen(setting.fullscreen)
|
||||
if not setting.fullscreen then
|
||||
love.resize(love.graphics.getWidth(),love.graphics.getHeight())
|
||||
end
|
||||
end,nil,"bg"),
|
||||
bg= newSwitch(990,250,40,function()return setting.bg end,function()setting.bg=not setting.bg end, nil,"bgblock"),
|
||||
bgblock=newSwitch(990,330,40,function()return setting.bgblock end,function()
|
||||
setting.bgblock=not setting.bgblock--if not setting.bgblock then for i=1,16 do FX_BGblock.list[i].v=3*FX_BGblock.list[i].v end end
|
||||
end,nil,"skin"),
|
||||
skin= newButton(860,470,120,60,color.white,40,function()
|
||||
bg= newSwitch(990,250,40,SETdisp("bg"),SETrev("bg"),nil,"bgblock"),
|
||||
bgblock=newSwitch(990,330,40,SETdisp("bgblock"),SETrev("bgblock"),nil,"skin"),--if not setting.bgblock then for i=1,16 do FX_BGblock.list[i].v=3*FX_BGblock.list[i].v end end
|
||||
skin= newButton(860,470,120,60,C.white,40,function()
|
||||
setting.skin=setting.skin%8+1
|
||||
changeBlockSkin(setting.skin)
|
||||
end,nil,"back"),
|
||||
back= newButton(1160,600,160,160,color.white,55,scene.back,nil,"sound"),
|
||||
back= newButton(1160,600,160,160,C.white,55,scene.back,nil,"sound"),
|
||||
},
|
||||
setting_sound={
|
||||
game= newButton(200,80,240,80,color.lightGreen,40,function()scene.swapTo("setting_game")end, nil,"graphic"),
|
||||
graphic=newButton(1080,80,240,80,color.lightGreen,40,function()scene.swapTo("setting_graphic")end, nil,"sfx"),
|
||||
sfx=newSlider(180,250,400,10,40,function()SFX("blip_1")end, function()return setting.sfx end,function(i)setting.sfx=i end,nil,"bgm"),
|
||||
bgm=newSlider(750,250,400,10,40,function()BGM(bgmPlaying or"blank")end, function()return setting.bgm end,function(i)setting.bgm=i end,nil,"vib"),
|
||||
vib=newSlider(180,440,400,5,40,function()VIB(1)end, function()return setting.vib end,function(i)setting.vib=i end,nil,"voc"),
|
||||
voc=newSlider(750,440,400,10,40,function()VOICE("nya")end, function()return setting.voc end,function(i)setting.voc=i end,nil,"back"),
|
||||
back=newButton(1160,600,160,160,color.white,55,scene.back,nil,"game"),
|
||||
game= newButton(200,80,240,80,C.lightGreen,40,function()scene.swapTo("setting_game")end, nil,"graphic"),
|
||||
graphic=newButton(1080,80,240,80,C.lightGreen,40,function()scene.swapTo("setting_graphic")end, nil,"sfx"),
|
||||
sfx= newSlider(180,250,400,10,40,function()SFX("blip_1")end, SETdisp("sfx"), SETsto("sfx"), nil,"bgm"),
|
||||
bgm= newSlider(750,250,400,10,40,function()BGM(bgmPlaying or"blank")end, SETdisp("bgm"), SETsto("bgm"), nil,"vib"),
|
||||
vib= newSlider(180,440,400,5,40, function()VIB(1)end, SETdisp("vib"), SETsto("vib"), nil,"voc"),
|
||||
voc= newSlider(750,440,400,10,40,function()VOICE("nya")end, SETdisp("voc"), SETsto("voc"), nil,"stereo"),
|
||||
stereo= newSlider(180,630,400,10,40,function()SFX("move",1,-1)SFX("lock",1,1)end, SETdisp("stereo"), SETsto("stereo"),nil,"back"),
|
||||
back=newButton(1160,600,160,160,C.white,55,scene.back,nil,"game"),
|
||||
},
|
||||
setting_key={
|
||||
back=newButton(1140,650,200,80,color.white,50,scene.back),
|
||||
back=newButton(1140,650,200,80,C.white,50,scene.back),
|
||||
},
|
||||
setting_touch={
|
||||
hide= newSwitch(810,140,45,function()return setting.VKSwitch end,function()setting.VKSwitch=not setting.VKSwitch end),
|
||||
track= newSwitch(810,220,45,function()return setting.VKTrack end,function()setting.VKTrack=not setting.VKTrack end),
|
||||
tkset= newButton(450,220,170,80,color.white,30,function()
|
||||
hide= newSwitch(810,140,45,SETdisp("VKSwitch"),SETrev("VKSwitch")),
|
||||
track= newSwitch(810,220,45,SETdisp("VKTrack"),SETrev("VKTrack")),
|
||||
tkset= newButton(450,220,170,80,C.white,30,function()
|
||||
scene.push()
|
||||
scene.swapTo("setting_trackSetting")
|
||||
end,function()return not setting.VKTrack end),
|
||||
default=newButton(450,320,170,80,color.white,40,function()
|
||||
default=newButton(450,320,170,80,C.white,40,function()
|
||||
local D=virtualkeySet[defaultSel]
|
||||
for i=1,#VK_org do
|
||||
VK_org[i].ava=false
|
||||
@@ -483,30 +508,28 @@ Widget={
|
||||
end--Replace keys
|
||||
defaultSel=defaultSel%5+1
|
||||
end),
|
||||
snap= newButton(640,320,170,80,color.white,40,function()
|
||||
snap= newButton(640,320,170,80,C.white,40,function()
|
||||
snapLevel=snapLevel%6+1
|
||||
end),
|
||||
--VK=T,70,50,27/T,130,50,27/T,190,50,27/T,250,50,27/T,310,50,27/T,370,50,27/T,430,50,27/T,490,50,27/T,550,50,27/T,610,50,27/T,670,50,27/T,730,50,27/T,790,50,27/T,850,50,27/T,910,50,27/T,970,50,27/T,739,789,897/T,1090,50,27/T,1150,50,27/T,1210,50,27
|
||||
alpha= newButton(830,320,170,80,color.white,45,function()
|
||||
alpha= newButton(830,320,170,80,C.white,45,function()
|
||||
setting.VKAlpha=(setting.VKAlpha+1)%11
|
||||
--Adjust virtualkey alpha
|
||||
end),
|
||||
icon= newButton(495,420,260,80,color.white,45,function()
|
||||
setting.VKIcon=not setting.VKIcon
|
||||
icon= newButton(495,420,260,80,C.white,45,SETrev("VKIcon")),
|
||||
--Switch virtualkey icon
|
||||
end),
|
||||
size= newButton(785,420,260,80,color.white,45,function()
|
||||
size= newButton(785,420,260,80,C.white,45,function()
|
||||
if sel then
|
||||
local B=VK_org[sel]
|
||||
B.r=B.r+10
|
||||
if B.r>=150 then B.r=B.r-110 end
|
||||
end
|
||||
end),
|
||||
toggle= newButton(495,520,260,80,color.white,45,function()
|
||||
toggle= newButton(495,520,260,80,C.white,45,function()
|
||||
scene.push()
|
||||
scene.swapTo("setting_touchSwitch")
|
||||
end),
|
||||
back= newButton(785,520,260,80,color.white,45,scene.back),
|
||||
back= newButton(785,520,260,80,C.white,45,scene.back),
|
||||
},
|
||||
setting_touchSwitch={
|
||||
b1= newSwitch(300,80, 40,VKAdisp(1),VKAcode(1)),
|
||||
@@ -529,32 +552,33 @@ Widget={
|
||||
b18= newSwitch(760,500, 40,VKAdisp(18),VKAcode(18)),
|
||||
b19= newSwitch(760,560, 40,VKAdisp(19),VKAcode(19)),
|
||||
b20= newSwitch(760,620, 40,VKAdisp(20),VKAcode(20)),
|
||||
norm= newButton(1080,150,240,80,color.white,50,function()for i=1,20 do VK_org[i].ava=i<11 end end),
|
||||
pro= newButton(1080,300,240,80,color.white,40,function()for i=1,20 do VK_org[i].ava=true end end),
|
||||
back= newButton(1080,600,240,80,color.white,50,scene.back),
|
||||
norm= newButton(1080,150,240,80,C.white,50,function()for i=1,20 do VK_org[i].ava=i<11 end end),
|
||||
pro= newButton(1080,300,240,80,C.white,40,function()for i=1,20 do VK_org[i].ava=true end end),
|
||||
back= newButton(1080,600,240,80,C.white,50,scene.back),
|
||||
},
|
||||
setting_trackSetting={
|
||||
VKTchW= newSlider(140,310,1000,10,40,nil,function()return setting.VKTchW end,function(i)setting.VKTchW=i;setting.VKCurW=math.max(setting.VKCurW,i)end),
|
||||
VKCurW= newSlider(140,370,1000,10,40,nil,function()return setting.VKCurW end,function(i)setting.VKCurW=i;setting.VKTchW=math.min(setting.VKTchW,i)end),
|
||||
back= newButton(1080,600,240,80,color.white,50,scene.back),
|
||||
VKDodge= newSwitch(400,200, 40,SETdisp("VKDodge"),SETrev("VKDodge")),
|
||||
VKTchW= newSlider(140,310,1000,10,40,nil,SETdisp("VKTchW"),function(i)setting.VKTchW=i;setting.VKCurW=math.max(setting.VKCurW,i)end),
|
||||
VKCurW= newSlider(140,370,1000,10,40,nil,SETdisp("VKCurW"),function(i)setting.VKCurW=i;setting.VKTchW=math.min(setting.VKTchW,i)end),
|
||||
back= newButton(1080,600,240,80,C.white,50,scene.back),
|
||||
},
|
||||
help={
|
||||
his= newButton(1050,520,230,60,color.white,40,function()scene.push()scene.swapTo("history")end,nil,"back"),
|
||||
qq= newButton(1050,600,230,60,color.white,40,function()love.system.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end, function()return mobile end,"his"),
|
||||
back= newButton(640, 600,180,60,color.white,40,scene.back,nil,"qq"),
|
||||
his= newButton(1050,520,230,60,C.white,40,function()scene.push()scene.swapTo("history")end,nil,"back"),
|
||||
qq= newButton(1050,600,230,60,C.white,40,function()love.system.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end, function()return mobile end,"his"),
|
||||
back= newButton(640, 600,180,60,C.white,40,scene.back,nil,"qq"),
|
||||
},
|
||||
history={
|
||||
prev= newButton(1155,170,180,180,color.white,70,function()love.keypressed("up")end,function()return sel==1 end),
|
||||
next= newButton(1155,400,180,180,color.white,70,function()love.keypressed("down")end,function()return sel==#updateLog-22 end),
|
||||
back= newButton(1155,600,180,90,color.white,40,scene.back),
|
||||
prev= newButton(1155,170,180,180,C.white,70,pressKey("up"),function()return sel==1 end),
|
||||
next= newButton(1155,400,180,180,C.white,70,pressKey("down"),function()return sel==#updateLog-22 end),
|
||||
back= newButton(1155,600,180,90,C.white,40,scene.back),
|
||||
},
|
||||
stat={
|
||||
path= newButton(980,620,250,60,color.white,30,function()love.system.openURL(love.filesystem.getSaveDirectory())end,function()return mobile end,"back"),
|
||||
back= newButton(640,620,180,60,color.white,40,scene.back,nil,"path"),
|
||||
path= newButton(980,620,250,60,C.white,30,function()love.system.openURL(love.filesystem.getSaveDirectory())end,function()return mobile end,"back"),
|
||||
back= newButton(640,620,180,60,C.white,40,scene.back,nil,"path"),
|
||||
},
|
||||
}
|
||||
for S,L in next,Widget do
|
||||
for N,W in next,L do
|
||||
for _,L in next,Widget do
|
||||
for _,W in next,L do
|
||||
if W.next then
|
||||
W.next,L[W.next].prev=L[W.next],W
|
||||
end
|
||||
|
||||
16
main.lua
16
main.lua
@@ -499,15 +499,17 @@ function touchDown.play(id,x,y)
|
||||
players[1]:pressKey(t)
|
||||
if setting.VKTrack then
|
||||
local B=virtualkey[t]
|
||||
for i=1,#virtualkey do
|
||||
local b=virtualkey[i]
|
||||
local d=B.r+b.r-((B.x-b.x)^2+(B.y-b.y)^2)^.5--碰撞深度(负数=间隔距离)
|
||||
if d>0 then
|
||||
b.x=b.x+(b.x-B.x)*d*b.r*.00005
|
||||
b.y=b.y+(b.y-B.y)*d*b.r*.00005
|
||||
--按钮软碰撞(做不来hhh随便做一个,效果还行!)
|
||||
if setting.VKDodge then
|
||||
for i=1,#virtualkey do
|
||||
local b=virtualkey[i]
|
||||
local d=B.r+b.r-((B.x-b.x)^2+(B.y-b.y)^2)^.5--碰撞深度(负数=间隔距离)
|
||||
if d>0 then
|
||||
b.x=b.x+(b.x-B.x)*d*b.r*.00005
|
||||
b.y=b.y+(b.y-B.y)*d*b.r*.00005
|
||||
end
|
||||
end
|
||||
end
|
||||
--按钮软碰撞(做不来hhh随便做一个,效果还行!)
|
||||
local O=VK_org[t]
|
||||
local _FW,_CW=setting.VKTchW*.1,1-setting.VKCurW*.1
|
||||
local _OW=1-_FW-_CW
|
||||
|
||||
@@ -17,6 +17,7 @@ local modeLevelColor={
|
||||
["NORMAL+"]=color.darkGreen,
|
||||
["HARD+"]=color.darkMagenta,
|
||||
["LUNATIC+"]=color.darkRed,
|
||||
["ULTIMATE+"]=color.grey,
|
||||
|
||||
MESS=color.lightGrey,
|
||||
GM=color.blue,
|
||||
|
||||
76
player.lua
76
player.lua
@@ -287,9 +287,8 @@ local mesDisp={
|
||||
classic=function(P)
|
||||
setFont(80)
|
||||
local r=P.gameEnv.target*.1
|
||||
mStr(r<11 and 19+r or r==11 and"00"or r==12 and"0a"or format("%x",r*10-110),-82,210)
|
||||
setFont(20)
|
||||
mStr("speed level",-82,290)
|
||||
mStr(r<11 and 18 or r<22 and r+8 or r==22 and"00"or r==23 and"0a"or format("%x",r*10-220),-82,210)
|
||||
mDraw(drawableText.speedLV,-82,290)
|
||||
setFont(50)
|
||||
mStr(P.stat.row,-82,320)
|
||||
mStr(P.gameEnv.target,-82,370)
|
||||
@@ -303,24 +302,21 @@ local mesDisp={
|
||||
setFont(50)
|
||||
mStr(P.stat.atk,-82,310)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),-82,420)
|
||||
setFont(20)
|
||||
mStr("Attack",-82,363)
|
||||
mStr("Efficiency",-82,475)
|
||||
mDraw(drawableText.atk,-82,363)
|
||||
mDraw(drawableText.eff,-82,475)
|
||||
end,
|
||||
tsd=function(P)
|
||||
setFont(35)
|
||||
mStr("TSD",-82,407)
|
||||
setFont(80)
|
||||
mStr(P.modeData.event,-82,330)
|
||||
mDraw(drawableText.tsd,-82,407)
|
||||
end,
|
||||
blind=function(P)
|
||||
setFont(25)
|
||||
mStr("Lines",-82,300)
|
||||
mStr("Techrash",-82,420)
|
||||
mDraw(drawableText.line,-82,300)
|
||||
mDraw(drawableText.techrash,-82,420)
|
||||
if curMode.lv==6 then
|
||||
mStr("Grade",-82,170)
|
||||
mDraw(drawableText.grade,-82,170)
|
||||
setFont(60)
|
||||
mStr(P.modeData.point*.1,-82,110)
|
||||
mStr(P.modeData.event,-82,110)
|
||||
end
|
||||
setFont(80)
|
||||
mStr(P.stat.row,-82,220)
|
||||
@@ -329,57 +325,51 @@ local mesDisp={
|
||||
dig=function(P)
|
||||
setFont(70)
|
||||
mStr(P.modeData.event,-82,310)
|
||||
setFont(30)
|
||||
mStr("Wave",-82,375)
|
||||
mDraw(drawableText.wave,-82,375)
|
||||
end,
|
||||
survivor=function(P)
|
||||
setFont(70)
|
||||
mStr(P.modeData.event,-82,310)
|
||||
setFont(30)
|
||||
mStr("Wave",-82,375)
|
||||
mDraw(drawableText.wave,-82,375)
|
||||
end,
|
||||
defender=function(P)
|
||||
setFont(60)
|
||||
mStr(P.modeData.point,-82,315)
|
||||
setFont(30)
|
||||
mStr("RPM",-82,375)
|
||||
mDraw(drawableText.rpm,-82,375)
|
||||
end,
|
||||
attacker=function(P)
|
||||
setFont(60)
|
||||
mStr(P.modeData.point,-82,315)
|
||||
setFont(30)
|
||||
mStr("RPM",-82,375)
|
||||
mDraw(drawableText.rpm,-82,375)
|
||||
end,
|
||||
tech=function(P)
|
||||
setFont(50)
|
||||
mStr(P.stat.atk,-82,310)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),-82,420)
|
||||
setFont(20)
|
||||
mStr("Attack",-82,363)
|
||||
mStr("Efficiency",-82,475)
|
||||
mDraw(drawableText.atk,-82,363)
|
||||
mDraw(drawableText.eff,-82,475)
|
||||
end,
|
||||
c4wtrain=function(P)
|
||||
setFont(50)
|
||||
mStr(max(100-P.stat.row,0),-82,220)
|
||||
mStr(P.combo,-82,310)
|
||||
mStr(P.modeData.point,-82,400)
|
||||
setFont(20)
|
||||
mStr("combo",-82,358)
|
||||
mStr("max combo",-82,450)
|
||||
mDraw(drawableText.combo,-82,358)
|
||||
mDraw(drawableText.mxcmb,-82,450)
|
||||
end,
|
||||
pctrain=function(P)
|
||||
setFont(22)
|
||||
mStr("Perfect Clear",-82,412)
|
||||
setFont(80)
|
||||
mStr(P.stat.pc,-82,330)
|
||||
mDraw(drawableText.pc,-82,412)
|
||||
end,
|
||||
pcchallenge=function(P)
|
||||
setFont(22)
|
||||
mStr("Perfect Clear",-82,432)
|
||||
setFont(80)
|
||||
mStr(P.stat.pc,-82,350)
|
||||
setFont(50)
|
||||
mStr(max(100-P.stat.row,0),-82,250)
|
||||
|
||||
setFont(80)
|
||||
mStr(P.stat.pc,-82,350)
|
||||
mDraw(drawableText.pc,-82,432)
|
||||
|
||||
gc.setColor(.5,.5,.5)
|
||||
if frame>179 then
|
||||
local y=72*(7-(P.stat.piece+(P.hd.id>0 and 2 or 1))%7)-36
|
||||
@@ -390,8 +380,8 @@ local mesDisp={
|
||||
setFont(40)
|
||||
mStr(#players.alive.."/49",-82,175)
|
||||
mStr(P.ko,-70,215)
|
||||
gc.draw(drawableText.ko,-127,225)
|
||||
setFont(25)
|
||||
gc.print("KO",-127,225)
|
||||
gc.setColor(1,.5,0,.6)
|
||||
gc.print(P.badge,-47,227)
|
||||
gc.setColor(1,1,1)
|
||||
@@ -405,8 +395,8 @@ local mesDisp={
|
||||
setFont(40)
|
||||
mStr(#players.alive.."/99",-82,175)
|
||||
mStr(P.ko,-70,215)
|
||||
gc.draw(drawableText.ko,-127,225)
|
||||
setFont(25)
|
||||
gc.print("KO",-127,225)
|
||||
gc.setColor(1,.5,0,.6)
|
||||
gc.print(P.badge,-47,227)
|
||||
gc.setColor(1,1,1)
|
||||
@@ -422,10 +412,9 @@ local mesDisp={
|
||||
end,
|
||||
custom=function(P)
|
||||
if P.gameEnv.puzzle or P.gameEnv.target>1e10 then
|
||||
setFont(25)
|
||||
mStr("Lines",-82,290)
|
||||
setFont(60)
|
||||
mStr(P.stat.row,-82,225)
|
||||
mDraw(drawableText.line,-82,290)
|
||||
else
|
||||
setFont(60)
|
||||
mStr(max(P.gameEnv.target-P.stat.row,0),-82,240)
|
||||
@@ -555,7 +544,7 @@ function newDemoPlayer(id,x,y,size)
|
||||
P.keyPressing={}for i=1,12 do P.keyPressing[i]=false end
|
||||
P.moving,P.downing=0,0
|
||||
P.waiting,P.falling=-1,-1
|
||||
P.clearing={}
|
||||
P.clearing,P.cleared={},{}
|
||||
P.combo,P.b2b=0,0
|
||||
P.fieldBeneath=0
|
||||
P.shade={}
|
||||
@@ -704,7 +693,7 @@ function newPlayer(id,x,y,size,AIdata)
|
||||
P.keyPressing={}for i=1,12 do P.keyPressing[i]=false end
|
||||
P.moving,P.downing=0,0
|
||||
P.waiting,P.falling=-1,-1
|
||||
P.clearing={}
|
||||
P.clearing,P.cleared={},{}
|
||||
P.combo,P.b2b=0,0
|
||||
P.fieldBeneath=0
|
||||
|
||||
@@ -805,9 +794,7 @@ function player.update(P,dt)
|
||||
else
|
||||
local L=#P.clearing
|
||||
if P.human and P.gameEnv.fall>0 and #P.field+L>P.clearing[L]then SFX("fall")end
|
||||
for i=1,L do
|
||||
P.clearing[i]=nil
|
||||
end
|
||||
P.clearing,P.cleared={},{}
|
||||
end
|
||||
end
|
||||
if not P.control then goto stop end
|
||||
@@ -866,9 +853,7 @@ function player.update(P,dt)
|
||||
else
|
||||
local L=#P.clearing
|
||||
if P.human and P.gameEnv.fall>0 and #P.field+L>P.clearing[L]then SFX("fall")end
|
||||
for i=1,L do
|
||||
P.clearing[i]=nil
|
||||
end
|
||||
P.clearing,P.cleared={},{}
|
||||
end
|
||||
end::stop::
|
||||
if P.endCounter<40 then
|
||||
@@ -1384,6 +1369,7 @@ local function checkrow(P,start,height)--(cy,r)
|
||||
for i=1,height do
|
||||
if ckfull(P,h)then
|
||||
ins(P.clearing,h)
|
||||
ins(P.cleared,h+c)
|
||||
removeRow(P.field,h)
|
||||
removeRow(P.visTime,h)
|
||||
c=c+1
|
||||
|
||||
13
texture.lua
13
texture.lua
@@ -64,6 +64,19 @@ payCode=N("/image/mess/paycode.png")
|
||||
drawableText={
|
||||
question=T(100,"?"),
|
||||
bpm=T(15,"BPM"),kpm=T(15,"KPM"),
|
||||
speedLV=T(20,"speed level"),
|
||||
atk=T(20,"Attack"),
|
||||
eff=T(20,"Efficiency"),
|
||||
tsd=T(35,"TSD"),
|
||||
line=T(25,"Lines"),
|
||||
techrash=T(25,"Techrash"),
|
||||
grade=T(25,"Grade"),
|
||||
wave=T(30,"Wave"),
|
||||
rpm=T(35,"RPM"),
|
||||
combo=T(20,"Combo"),
|
||||
mxcmb=T(20,"Max Combo"),
|
||||
pc=T(22,"Perfect Clear"),
|
||||
ko=T(25,"KO"),
|
||||
|
||||
modeName=T(30),levelName=T(30),
|
||||
next=T(40),hold=T(40),
|
||||
|
||||
@@ -453,7 +453,7 @@ function loadSetting()
|
||||
t=="VKTchW"or t=="VKCurW"or t=="VKAlpha"
|
||||
then
|
||||
v=toN(v)
|
||||
if v==int(v)and v>=0 and v<=10 then
|
||||
if v and v==int(v)and v>=0 and v<=10 then
|
||||
setting[t]=v
|
||||
end
|
||||
elseif t=="vib"then
|
||||
@@ -466,7 +466,7 @@ function loadSetting()
|
||||
t=="bg"or
|
||||
t=="ghost"or t=="center"or t=="grid"or t=="swap"or
|
||||
t=="quickR"or t=="fine"or t=="bgblock"or t=="smo"or
|
||||
t=="VKSwitch"or t=="VKTrack"or t=="VKIcon"
|
||||
t=="VKSwitch"or t=="VKTrack"or t=="VKDodge"or t=="VKIcon"
|
||||
then
|
||||
setting[t]=v=="true"
|
||||
elseif t=="frameMul"then
|
||||
@@ -529,6 +529,9 @@ local saveOpt={
|
||||
|
||||
"VKSwitch",
|
||||
"VKTrack",
|
||||
"VKDodge",
|
||||
"VKTchW",
|
||||
"VKCurW",
|
||||
"VKIcon",
|
||||
"VKAlpha",
|
||||
}
|
||||
|
||||
@@ -2,30 +2,41 @@ local S=[=[
|
||||
Patron(rmb10+):
|
||||
gggf/T080/Ykzl/zxc
|
||||
[D*a]?
|
||||
|
||||
Future outlook:
|
||||
Normal Things:
|
||||
powerinfo switch
|
||||
splashing block
|
||||
ajustable next count
|
||||
bag line in all mode
|
||||
highscore of most modes
|
||||
new mode system
|
||||
custom block color/direction
|
||||
custom block sequence
|
||||
combo mode
|
||||
auto GUI in any screen size
|
||||
CC smarter(think of gaebage buffer)
|
||||
fineese/bigbang mode & easier CTWC
|
||||
new AI:task-Z
|
||||
game recording
|
||||
bigbang mode
|
||||
TTT mode
|
||||
custom block sequence
|
||||
CC smarter(think of gaebage buffer)
|
||||
game recording
|
||||
new AI:task-Z
|
||||
auto GUI in any screen size
|
||||
|
||||
Technical things:
|
||||
Encrypt source code(compile to byte code)
|
||||
infinite 1v1
|
||||
square mode
|
||||
more FXs & 3d features & animations
|
||||
0.7.31+:
|
||||
|
||||
0.7.33+:
|
||||
MORE POWERFUL 9-stack AI
|
||||
add stereo-setting slider
|
||||
code optimized
|
||||
bug fixed
|
||||
0.7.32:
|
||||
Blind-GM now show section directly
|
||||
easier&more standard classic mode
|
||||
can switch Virtualkey's auto dodging
|
||||
in-game setting
|
||||
little changes
|
||||
code optimized
|
||||
bug fixed
|
||||
0.7.31:
|
||||
stereo system
|
||||
fixed a problem in finesse calculating
|
||||
@@ -247,11 +258,10 @@ Future outlook:
|
||||
]=]
|
||||
local find,sub=string.find,string.sub
|
||||
local L,n,p={},1,1
|
||||
local eof=#S
|
||||
local EOF=#S
|
||||
repeat
|
||||
p1=find(S,"\n",p)
|
||||
L[n]=sub(S,p,p1-1)
|
||||
n=n+1
|
||||
p=p1+1
|
||||
until p1==eof
|
||||
n,p=n+1,p1+1
|
||||
until p1==EOF
|
||||
return L
|
||||
Reference in New Issue
Block a user