Compare commits

...

2 Commits

Author SHA1 Message Date
MrZ_26
659a50300d 0.8.0α 2020-02-04 19:38:48 +08:00
MrZ_26
918d17ad9a 0.7.35α 2020-02-04 19:38:28 +08:00
17 changed files with 1191 additions and 1099 deletions

View File

@@ -1,5 +1,5 @@
math.randomseed(os.time())
gameVersion="Alpha V0.7.34"
gameVersion="Alpha V0.8.0"
function love.conf(t)
t.identity="Techmino"--Save directory name
t.version="11.1"
@@ -10,12 +10,7 @@ function love.conf(t)
t.audio.mixwithsystem=true--Switch on to keep sysBGM
local W=t.window
if math.random()>.26 then
W.title="Techmino "..gameVersion
else
math.randomseed(tonumber(os.date("%Y%j")))
W.title="Your lucky number today:"..math.random(100,626)
end
W.title="Techmino "..gameVersion
W.icon="/image/icon.png"
W.width,W.height=1280,720
W.minwidth,W.minheight=640,360

View File

@@ -34,6 +34,7 @@ local pc_drop={50,45,40,35,30,26,22,18,15,12}
local pc_lock={55,50,45,40,36,32,30}
local pc_fall={18,16,14,12,10,9,8,7,6}
local sectionName={"M7","M8","M9","M","MK","MV","MO","MM","GM"}
local powerUp={[0]="000%UP","025%UP","050%UP","075%UP","100%UP",}
local Fkey_func={
royale=function(P)
@@ -75,10 +76,10 @@ end
Event={null=NULL}
function Event.reach_winCheck(P)
if P.stat.row>=P.gameEnv.target then
Event.win(P)
Event.win(P,"finish")
end
end
function Event.win(P)
function Event.win(P,result)
P.alive=false
P.control=false
P.timing=false
@@ -100,7 +101,7 @@ function Event.win(P)
end
end
if P.human then
gamefinished=true
gameResult=result or"win"
SFX("win")
VOICE("win")
if modeEnv.royaleMode then
@@ -108,7 +109,11 @@ function Event.win(P)
end
end
newTask(Event_task.finish,P)
P:showText(text.win,"beat",90,nil,.4,curMode.id~="custom")
if curMode.id=="custom"then
P:showText(text.win,0,0,90,"beat",.4)
else
P:showText(text.win,0,0,90,"beat",.5,.2)
end
end
function Event.lose(P)
if P.invincible then
@@ -139,7 +144,7 @@ function Event.lose(P)
P:changeAtk()
P.result="K.O."
P.rank=#players.alive+1
P:showText(P.rank,"appear",60,120,nil,true)
P:showText(P.rank,0,-120,60,"appear",1,12)
P.strength=0
if P.lastRecv then
local A,i=P,0
@@ -185,9 +190,9 @@ function Event.lose(P)
end
end
P.gameEnv.keepVisible=P.gameEnv.visible~="show"
P:showText(text.lose,"appear",90,nil,nil,true)
P:showText(text.lose,0,0,90,"appear",.5,.2)
if P.human then
gamefinished=true
gameResult="lose"
SFX("fail")
VOICE("lose")
if modeEnv.royaleMode then BGM("end")end
@@ -249,7 +254,7 @@ function Event.master_score(P)
P.modeData.point,P.modeData.event=500,4
Event.win(P)
else
P:showText(text.stage(s),"fly",80,-120)
P:showText(text.stage(s),0,-120,80,"fly")
end
SFX("reach")
end
@@ -270,7 +275,7 @@ function Event.master_score_hard(P)
if P.modeData.point%100==99 then SFX("blip_1")end
if int(P.modeData.point*.01)>P.modeData.event then
local s=P.modeData.event+1;P.modeData.event=s--level up!
P:showText(text.stage(s),"fly",80,-120)
P:showText(text.stage(s),0,-120,80,"fly")
if s<4 then--first 300
if s~=1 then P.gameEnv.lock=P.gameEnv.lock-1 end
if s~=2 then P.gameEnv.wait=P.gameEnv.wait-1 end
@@ -414,9 +419,9 @@ function Event.newPC(P)
P.gameEnv.lock=pc_lock[s]or 20
P.gameEnv.fall=pc_fall[s]or 5
if s==10 then
P:showText(text.maxspeed,"appear",100,-140,.6)
P:showText(text.maxspeed,0,-140,100,"appear",.6)
else
P:showText(text.speedup,"appear",40,-140)
P:showText(text.speedup,0,-140,40,"appear",.8)
end
end
end
@@ -462,7 +467,7 @@ function Event_task.lose(P)
end
end
end
if P.endCounter==100 then
if P.endCounter==120 then
while P.field[1]do
removeRow(P.field)
removeRow(P.visTime)
@@ -523,7 +528,7 @@ function Event_task.survivor_easy(P)
P.atkBuffer[#P.atkBuffer+1]={pos=rnd(10),amount=1,countdown=30,cd0=30,time=0,sent=false,lv=1}
P.atkBuffer.sum=P.atkBuffer.sum+1
P.stat.recv=P.stat.recv+1
if P.modeData.event==45 then P:showText(text.maxspeed,"appear",100,-140,.6)end
if P.modeData.event==45 then P:showText(text.maxspeed,0,-140,100,"appear",.6)end
P.counter=0
P.modeData.event=P.modeData.event+1
end
@@ -540,7 +545,7 @@ function Event_task.survivor_normal(P)
d%4==3 and{pos=rnd(10),amount=4,countdown=90,cd0=90,time=0,sent=false,lv=3}
P.atkBuffer.sum=P.atkBuffer.sum+d%4+1
P.stat.recv=P.stat.recv+d%4+1
if P.modeData.event==45 then P:showText(text.maxspeed,"appear",100,-140,.6)end
if P.modeData.event==45 then P:showText(text.maxspeed,0,-140,100,"appear",.6)end
P.counter=0
P.modeData.event=d
end
@@ -557,7 +562,7 @@ function Event_task.survivor_hard(P)
local R=(P.modeData.event%3<2 and 1 or 3)
P.atkBuffer.sum=P.atkBuffer.sum+R
P.stat.recv=P.stat.recv+R
if P.modeData.event==60 then P:showText(text.maxspeed,"appear",100,-140,.6)end
if P.modeData.event==60 then P:showText(text.maxspeed,0,-140,100,"appear",.6)end
P.counter=0
P.modeData.event=P.modeData.event+1
end
@@ -570,7 +575,7 @@ function Event_task.survivor_lunatic(P)
P.atkBuffer[#P.atkBuffer+1]={pos=rnd(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3}
P.atkBuffer.sum=P.atkBuffer.sum+4
P.stat.recv=P.stat.recv+4
if P.modeData.event==60 then P:showText(text.maxspeed,"appear",100,-140,.6)end
if P.modeData.event==60 then P:showText(text.maxspeed,0,-140,100,"appear",.6)end
P.counter=0
P.modeData.event=P.modeData.event+1
end
@@ -588,7 +593,7 @@ function Event_task.survivor_ultimate(P)
P.atkBuffer.sum=P.atkBuffer.sum+20
P.stat.recv=P.stat.recv+20
P.counter=0
if P.modeData.event==31 then P:showText(text.maxspeed,"appear",100,-140,.6)end
if P.modeData.event==31 then P:showText(text.maxspeed,0,-140,100,"appear",.6)end
P.modeData.event=P.modeData.event+1
end
end
@@ -608,16 +613,16 @@ function Event_task.defender_normal(P)
D.event=D.event+1
D.point=int(108e3/(360-D.event*2))*.1
if D.event==25 then
P:showText(text.great,"appear",100,-140,.6)
P:showText(text.great,0,-140,100,"appear",.6)
pushSpeed=2
P.dropDelay,P.gameEnv.drop=20,20
elseif D.event==50 then
P:showText(text.awesome,"appear",100,-140,.6)
P:showText(text.awesome,0,-140,100,"appear",.6)
pushSpeed=3
P.dropDelay,P.gameEnv.drop=10,10
elseif D.event==90 then
P.dropDelay,P.gameEnv.drop=5,5
P:showText(text.maxspeed,"appear",100,-140,.6)
P:showText(text.maxspeed,0,-140,100,"appear",.6)
end
end
end
@@ -638,15 +643,15 @@ function Event_task.defender_lunatic(P)
D.event=D.event+1
D.point=int(144e3/(240-2*D.event))*.1
if D.event==25 then
P:showText(text.great,"appear",100,-140,.6)
P:showText(text.great,0,-140,100,"appear",.6)
pushSpeed=3
P.dropDelay,P.gameEnv.drop=4,4
elseif D.event==50 then
P:showText(text.awesome,"appear",100,-140,.6)
P:showText(text.awesome,0,-140,100,"appear",.6)
pushSpeed=4
P.dropDelay,P.gameEnv.drop=3,3
elseif D.event==75 then
P:showText(text.maxspeed,"appear",100,-140,.6)
P:showText(text.maxspeed,0,-140,100,"appear",.6)
P.dropDelay,P.gameEnv.drop=2,2
end
end
@@ -673,10 +678,10 @@ function Event_task.attacker_hard(P)
D.event=D.event+1
D.point=int(72e4/t)*.1
if D.event==20 then
P:showText(text.great,"appear",100,-140,.6)
P:showText(text.great,0,-140,100,"appear",.6)
pushSpeed=3
elseif D.event==50 then
P:showText(text.maxspeed,"appear",100,-140,.6)
P:showText(text.maxspeed,0,-140,100,"appear",.6)
end
end
end
@@ -709,13 +714,13 @@ function Event_task.attacker_ultimate(P)
D.event=D.event+1
D.point=int(s*36e3/t)*.1
if D.event==10 then
P:showText(text.great,"appear",100,-140,.6)
P:showText(text.great,0,-140,100,"appear",.6)
pushSpeed=4
elseif D.event==20 then
P:showText(text.awesome,"appear",100,-140,.6)
P:showText(text.awesome,0,-140,100,"appear",.6)
pushSpeed=5
elseif D.event==30 then
P:showText(text.maxspeed,"appear",100,-140,.6)
P:showText(text.maxspeed,0,-140,100,"appear",.6)
end
end
end
@@ -792,7 +797,7 @@ modes.sprint={
newPlayer(1,340,15)
end,
mesDisp=function(P)
setFont(60)
setFont(55)
local r=max(P.gameEnv.target-P.stat.row,0)
mStr(r,-82,265)
if r<21 and r>0 then
@@ -825,7 +830,7 @@ modes.marathon={
newPlayer(1,340,15)
end,
mesDisp=function(P)
setFont(50)
setFont(45)
mStr(P.stat.row,-82,320)
mStr(P.gameEnv.target,-82,370)
gc.rectangle("fill",-125,375,90,4)
@@ -866,7 +871,7 @@ modes.master={
newPlayer(1,340,15)
end,
mesDisp=function(P)
setFont(50)
setFont(45)
mStr(P.modeData.point,-82,320)
mStr((P.modeData.event+1)*100,-82,370)
gc.rectangle("fill",-125,375,90,4)
@@ -890,11 +895,11 @@ modes.classic={
newPlayer(1,340,15)
end,
mesDisp=function(P)
setFont(80)
setFont(75)
local r=P.gameEnv.target*.1
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)
setFont(45)
mStr(P.stat.row,-82,320)
mStr(P.gameEnv.target,-82,370)
gc.rectangle("fill",-125,375,90,4)
@@ -914,7 +919,7 @@ modes.zen={
newPlayer(1,340,15)
end,
mesDisp=function(P)
setFont(75)
setFont(70)
mStr(max(200-P.stat.row,0),-82,280)
end,
}
@@ -943,7 +948,7 @@ modes.infinite={
end
end,
mesDisp=function(P)
setFont(50)
setFont(45)
mStr(P.stat.atk,-82,310)
mStr(format("%.2f",P.stat.atk/P.stat.row),-82,420)
mDraw(drawableText.atk,-82,363)
@@ -1038,7 +1043,7 @@ modes.tsd={
newPlayer(1,340,15)
end,
mesDisp=function(P)
setFont(80)
setFont(75)
mStr(P.modeData.event,-82,330)
mDraw(drawableText.tsd,-82,407)
end,
@@ -1106,10 +1111,10 @@ modes.blind={
mDraw(drawableText.techrash,-82,420)
if curMode.lv==6 then
mDraw(drawableText.grade,-82,170)
setFont(60)
setFont(55)
mStr(P.modeData.event,-82,110)
end
setFont(80)
setFont(75)
mStr(P.stat.row,-82,220)
mStr(P.stat.clear_4,-82,340)
end,
@@ -1136,7 +1141,7 @@ modes.dig={
pushSpeed=1
end,
mesDisp=function(P)
setFont(70)
setFont(65)
mStr(P.modeData.event,-82,310)
mDraw(drawableText.wave,-82,375)
end,
@@ -1185,7 +1190,7 @@ modes.survivor={
pushSpeed=curMode.lv>2 and 2 or 1
end,
mesDisp=function(P)
setFont(70)
setFont(65)
mStr(P.modeData.event,-82,310)
mDraw(drawableText.wave,-82,375)
end,
@@ -1217,7 +1222,7 @@ modes.defender={
end
end,
mesDisp=function(P)
setFont(60)
setFont(55)
mStr(P.modeData.event,-82,200)
mStr(P.modeData.point,-82,320)
mDraw(drawableText.wave,-82,260)
@@ -1249,7 +1254,7 @@ modes.attacker={
end
end,
mesDisp=function(P)
setFont(60)
setFont(55)
mStr(P.modeData.event,-82,200)
mStr(
curMode.lv==1 and 24
@@ -1318,7 +1323,7 @@ modes.tech={
newPlayer(1,340,15)
end,
mesDisp=function(P)
setFont(50)
setFont(45)
mStr(P.stat.atk,-82,310)
mStr(format("%.2f",P.stat.atk/P.stat.row),-82,420)
mDraw(drawableText.atk,-82,363)
@@ -1363,7 +1368,7 @@ modes.c4wtrain={
end
end,
mesDisp=function(P)
setFont(50)
setFont(45)
mStr(max(100-P.stat.row,0),-82,220)
mStr(P.combo,-82,310)
mStr(P.modeData.point,-82,400)
@@ -1401,7 +1406,7 @@ modes.pctrain={
Event.newPC(players[1])
end,
mesDisp=function(P)
setFont(80)
setFont(75)
mStr(P.stat.pc,-82,330)
mDraw(drawableText.pc,-82,412)
end,
@@ -1437,10 +1442,10 @@ modes.pcchallenge={
newPlayer(1,340,15)
end,
mesDisp=function(P)
setFont(50)
setFont(45)
mStr(max(100-P.stat.row,0),-82,250)
setFont(80)
setFont(75)
mStr(P.stat.pc,-82,350)
mDraw(drawableText.pc,-82,432)
@@ -1500,16 +1505,16 @@ modes.techmino49={
end end
end,
mesDisp=function(P)
setFont(40)
setFont(35)
mStr(#players.alive.."/49",-82,175)
mStr(P.ko,-70,215)
gc.draw(drawableText.ko,-127,225)
setFont(25)
setFont(20)
gc.setColor(1,.5,0,.6)
gc.print(P.badge,-47,227)
gc.setColor(1,1,1)
setFont(30)
gc.print(up0to4[P.strength],-132,290)
setFont(25)
gc.print(powerUp[P.strength],-132,290)
for i=1,P.strength do
gc.draw(badgeIcon,16*i-138,260)
end
@@ -1564,16 +1569,16 @@ modes.techmino99={
end end
end,
mesDisp=function(P)
setFont(40)
setFont(35)
mStr(#players.alive.."/99",-82,175)
mStr(P.ko,-70,215)
gc.draw(drawableText.ko,-127,225)
setFont(25)
setFont(20)
gc.setColor(1,.5,0,.6)
gc.print(P.badge,-47,227)
gc.setColor(1,1,1)
setFont(30)
gc.print(up0to4[P.strength],-132,290)
setFont(25)
gc.print(powerUp[P.strength],-132,290)
for i=1,P.strength do
gc.draw(badgeIcon,16*i-138,260)
end
@@ -1603,7 +1608,7 @@ modes.drought={
newPlayer(1,340,15)
end,
mesDisp=function(P)
setFont(75)
setFont(70)
mStr(max(100-P.stat.row,0),-82,280)
end,
}
@@ -1690,12 +1695,11 @@ modes.custom={
modeEnv.bgm=customRange.bgm[customSel[13]]
end,
mesDisp=function(P)
setFont(55)
if P.gameEnv.puzzle or P.gameEnv.target>1e10 then
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)
end
if P.gameEnv.puzzle and P.modeData.event==0 then

BIN
font.ttf

Binary file not shown.

View File

@@ -9,6 +9,7 @@ local actName={
"落在最左:","落在最右:","列在最左:","列在最右:",
}
return{
lang="中文",
atkModeName={"随机","徽章","击杀","反击"},
royale_remain=function(n)return"剩余 "..n.." 名玩家"end,
cmb={nil,nil,"3 Combo","4 Combo","5 Combo","6 Combo","7 Combo","8 Combo","9 Combo","10 Combo!","11 Combo!","12 Combo!","13 Combo!","14 Combo!","15 Combo!","16 Combo!","17 Combo!","18 Combo!","19 Combo!","MEGACMB"},
@@ -31,9 +32,9 @@ return{
speedup="速度加快",
win="胜利",
finish="结束",
lose="失败",
pause="暂停",
finish="结束",
pauseCount="暂停统计",
custom="自定义游戏",
@@ -141,10 +142,11 @@ return{
"有疑问?先看设置有没有你想要的",
"有建议的话可以把信息反馈给作者~",
"不要按F8",
"秘密代码:626",
"秘密数字:626",
"CLASSIC SEXY RUSSIAN BLOCKS",
"戴上耳机获得最佳体验",
"戴上耳机获得最佳体验",
"LrL,RlR LLr,RRl RRR/LLL F!!",--ZSLJTTI
"(第一次才准)今日幸运数字:"..math.random(100,626),
},
stat={
"游戏运行次数:",
@@ -193,7 +195,7 @@ return{
warning="禁 止 私 自 传 播",
WidgetText={
main={
lang="文-Lang",
lang="Lang",
qplay="快速开始",
play="开始",
setting="设置",
@@ -298,7 +300,7 @@ return{
bgm="音乐",
vib="震动",
voc="语音",
stereo="双声道",
stereo="立体声",
back=BK,
},
setting_key={

View File

@@ -9,6 +9,7 @@ local actName={
"落在最左:","落在最右:","列在最左:","列在最右:",
}
return{
lang="全中文",
atkModeName={"随机","徽章","击杀","反击"},
royale_remain=function(n)return"剩余 "..n.." 名玩家"end,
cmb={nil,nil,"3 Combo","4 Combo","5 Combo","6 Combo","7 Combo","8 Combo","9 Combo","10 Combo!","11 Combo!","12 Combo!","13 Combo!","14 Combo!","15 Combo!","16 Combo!","17 Combo!","18 Combo!","19 Combo!","MEGACMB"},
@@ -31,9 +32,9 @@ return{
speedup="速度加快",
win="胜利",
finish="结束",
lose="失败",
pause="暂停",
finish="结束",
pauseCount="暂停统计",
custom="自定义游戏",
@@ -141,10 +142,11 @@ return{
"有疑问?先看设置有没有你想要的",
"有建议的话可以把信息反馈给作者~",
"不要按F8",
"秘密代码:626",
"秘密数字:626",
"CLASSIC SEXY RUSSIAN BLOCKS",
"戴上耳机获得最佳体验",
"戴上耳机获得最佳体验",
"LrL,RlR LLr,RRl RRR/LLL F!!",--ZSLJTTI
"(第一次才准)今日幸运数字:"..math.random(100,626),
},
stat={
"游戏运行次数:",
@@ -193,7 +195,7 @@ return{
warning="禁 止 私 自 传 播",
WidgetText={
main={
lang="全-Lang",
lang="Lang",
qplay="快速开始",
play="开始",
setting="设置",
@@ -299,7 +301,7 @@ return{
bgm="音乐",
vib="震动",
voc="语音",
stereo="双声道",
stereo="立体声",
back=BK,
},
setting_key={

View File

@@ -7,6 +7,7 @@ local actName={
"Left Drop:","Right Drop:","Left INS:","Right INS:",
}
return{
lang="English",
atkModeName={"Random","Badges","K.O.s","Counters"},
royale_remain=function(n)return n.." Players Remain"end,
cmb={nil,nil,"3 Combo","4 Combo","5 Combo","6 Combo","7 Combo","8 Combo","9 Combo","10 Combo!","11 Combo!","12 Combo!","13 Combo!","14 Combo!","15 Combo!","16 Combo!","17 Combo!","18 Combo!","19 Combo!","MEGACMB"},
@@ -29,9 +30,9 @@ return{
speedup="Speed up",
win="WIN",
finish="FINISH",
lose="LOSE",
pause="PAUSE",
finish="FINISH",
pauseCount="Pause Count",
custom="Custom Game",
@@ -139,11 +140,12 @@ return{
"Find out what's in the setting!",
"Any suggestions to author!",
"DO NOT PRESS F8",
"Secret code:626",
"Secret num:626",
"Techmino=Technique+Tetromino",
"CLASSIC SEXY RUSSIAN BLOCKS",
"Headphones for better experience",
"LrL,RlR LLr,RRl RRR/LLL F!!",--ZSLJTTI
"(first effective)Your luck number today:"..math.random(100,626),
},
stat={
"Games run:",
@@ -192,7 +194,7 @@ Lib used:
warning="DO NOT DISTRIBUTE",
WidgetText={
main={
lang="文-Lang",
lang="Lang",
qplay="Qplay",
play="Play",
setting="Settings",

292
list.lua
View File

@@ -168,7 +168,6 @@ 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",}
modeID={
[0]="custom",
"sprint","marathon","master","classic","zen","infinite","solo","round","tsd","blind",
@@ -311,94 +310,105 @@ local function VKAcode(n)
end
end
local C=color
local skinName={
"Normal(MrZ)",
"Jelly(Miya)",
"Plastic(MrZ)",
"Glow(MrZ)",
"Pure(MrZ)",
"Text Bone(MrZ)",
"Colored Bone(MrZ)",
"white Bone(MrZ)",
}
-- T1,T2=0,0
Widget={
load={},intro={},quit={},
main={
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()
play= newButton(150,280,200,160,C.red, 55,function()scene.push()scene.swapTo("mode")end, nil,"setting"),
setting=newButton(370,280,200,160,C.lightBlue, 45,function()scene.push()scene.swapTo("setting_game")end, nil,"music"),
music= newButton(590,280,200,160,C.lightPurple,32,function()scene.push()scene.swapTo("music")end, nil,"help"),
help= newButton(150,460,200,160,C.yellow, 50,function()scene.push()scene.swapTo("help")end, nil,"stat"),
stat= newButton(370,460,200,160,C.cyan, 43,function()scene.push()scene.swapTo("stat")end, nil,"qplay"),
qplay= newButton(540,415,100,70,C.lightGreen, 23,function()scene.push()loadGame(modeSel,levelSel)end, nil,"lang"),
lang= newButton(590,505,200,70,C.lightRed, 45,function()
setting.lang=setting.lang%#langName+1
swapLanguage(setting.lang)
TEXT(text.lang,795,500,50,"appear",1.6)
end,nil,"quit"),
-- S1= newSlider(520,550,380,10,10,nil,function()return T1 end,function(i)T1=i end),
-- S2= newSlider(520,590,380,10,10,nil,function()return T2 end,function(i)T2=i end),
quit= newButton(370,620,280,100,C.lightGrey, 60,function()VOICE("bye")scene.swapTo("quit","slowFade")end,nil,"play"),
quit= newButton(370,620,280,100,C.lightGrey, 55,function()VOICE("bye")scene.swapTo("quit","slowFade")end,nil,"play"),
},
mode={
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==#modes[modeID[modeSel]].level 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),
up= newButton(1000, 210,200,140,C.white, 75,pressKey("up"), function()return modeSel==1 end),
down= newButton(1000, 430,200,140,C.white, 75,pressKey("down"), function()return modeSel==#modeID end),
left= newButton(190, 160,100,80, C.white, 35,pressKey("left"), function()return levelSel==1 end),
right= newButton(350, 160,100,80, C.white, 35,pressKey("right"), function()return levelSel==#modes[modeID[modeSel]].level end),
start= newButton(1000, 600,250,100,C.green, 45,function()scene.push()loadGame(modeSel,levelSel)end),
custom= newButton(275, 420,200,90, C.yellow, 35,function()scene.push()scene.swapTo("custom")end),
back= newButton(640, 630,230,90, C.white, 40,scene.back),
},
music={
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),
bgm= newSlider(760, 80,400,10,35,nil,SETdisp("bgm"),function(i)setting.bgm=i;BGM(bgmPlaying)end),
up= newButton(1100, 200,120,120,C.white,55,pressKey("up")),
play= newButton(1100, 340,120,120,C.white,35,pressKey("space"),function()return setting.bgm==0 end),
down= newButton(1100, 480,120,120,C.white,55,pressKey("down")),
back= newButton(640, 630,230,90, C.white,40,scene.back),
},
custom={
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),
up= newButton(1000, 220,100,100,C.white, 45,function()sel=(sel-2)%#customID+1 end),
down= newButton(1000, 460,100,100,C.white, 45,function()sel=sel%#customID+1 end),
left= newButton(880, 340,100,100,C.white, 45,pressKey("left")),
right= newButton(1120, 340,100,100,C.white, 45,pressKey("right")),
start1= newButton(880, 580,220,70, C.green, 35,function()scene.push()loadGame(0,1)end),
start2= newButton(1120, 580,220,70, C.lightPurple, 35,function()scene.push()loadGame(0,2)end),
draw= newButton(1000, 90, 190,85, C.cyan, 35,function()scene.push()scene.swapTo("draw")end),
set1= newButton(640, 160,240,75, C.lightRed, 35,function()useDefaultSet(1)end),
set2= newButton(640, 250,240,75, C.lightRed, 35,function()useDefaultSet(2)end),
set3= newButton(640, 340,240,75, C.lightRed, 35,function()useDefaultSet(3)end),
set4= newButton(640, 430,240,75, C.lightRed, 35,function()useDefaultSet(4)end),
set5= newButton(640, 520,240,75, C.lightRed, 35,function()useDefaultSet(5)end),
back= newButton(640, 630,180,60, C.white, 35,scene.back),
},
draw={
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),
block1= newButton(920, 80, 120,120,C.red, 60,setPen(1)),
block2= newButton(1060, 80, 120,120,C.green, 60,setPen(2)),
block3= newButton(1200, 80, 120,120,C.orange, 60,setPen(3)),
block4= newButton(920, 220,120,120,C.blue, 60,setPen(4)),
block5= newButton(1060, 220,120,120,C.magenta, 60,setPen(5)),
block6= newButton(1200, 220,120,120,C.yellow, 60,setPen(6)),
block7= newButton(920, 360,120,120,C.cyan, 60,setPen(7)),
gb1= newButton(1060, 360,120,120,C.darkGrey, 60,setPen(9)),
gb2= newButton(1200, 360,120,120,C.grey, 60,setPen(10)),
gb3= newButton(920, 500,120,120,C.darkPurple, 60,setPen(11)),
gb4= newButton(1060, 500,120,120,C.darkRed, 60,setPen(12)),
gb5= newButton(1200, 500,120,120,C.darkGreen, 60,setPen(13)),
clear= newButton(780, 80, 120,120,C.white, 40,pressKey("delete")),
any= newButton(780, 220,120,120,C.lightGrey, 40,setPen(0)),
space= newButton(780, 360,120,120,C.grey, 65,setPen(-1)),
back= newButton(1200, 640,120,120,C.white, 35,scene.back),
},
play={
pause= newButton(1235,45,80,80,C.white,30,pauseGame),
pause= newButton(1235,45,80,80,C.white,25,pauseGame),
},
pause={
resume= newButton(640,290,240,100,C.white,50,resumeGame),
restart=newButton(640,445,240,100,C.white,50,function()
resume= newButton(640,290,240,100,C.white,45,resumeGame),
restart=newButton(640,445,240,100,C.white,45,function()
clearTask("play")
updateStat()
resetGameData()
scene.swapTo("play","none")
end),
setting=newButton(1150,80,200,100,C.yellow,45,function()
setting=newButton(1150,80,200,100,C.yellow,40,function()
scene.push()
scene.swapTo("setting_sound")
end),
quit= newButton(640,600,240,100,C.white,50,scene.back),
quit= newButton(640,600,240,100,C.white,45,scene.back),
},
setting_game={
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()
graphic=newButton(200,80,240,80,C.lightGreen,35,function()scene.swapTo("setting_graphic")end, nil,"sound"),
sound= newButton(1080,80,240,80,C.lightGreen,35,function()scene.swapTo("setting_sound")end, nil,"dasD"),
dasD= newButton(180,230,50,50,C.white,35,function()
setting.das=(setting.das-1)%31
if setting.arr>setting.das then
setting.arr=setting.das
@@ -406,7 +416,7 @@ Widget={
SFX("blip_1",.4)
end
end,nil,"dasU"),
dasU= newButton(400,230,50,50,C.white,40,function()
dasU= newButton(400,230,50,50,C.white,35,function()
setting.das=(setting.das+1)%31
if setting.arr>setting.das then
setting.das=setting.arr
@@ -414,7 +424,7 @@ Widget={
SFX("blip_1",.4)
end
end,nil,"arrD"),
arrD= newButton(500,230,50,50,C.white,40,function()
arrD= newButton(500,230,50,50,C.white,35,function()
setting.arr=(setting.arr-1)%16
if setting.arr>setting.das then
setting.das=setting.arr
@@ -422,7 +432,7 @@ Widget={
SFX("blip_1",.4)
end
end,nil,"arrU"),
arrU= newButton(720,230,50,50,C.white,40,function()
arrU= newButton(720,230,50,50,C.white,35,function()
setting.arr=(setting.arr+1)%16
if setting.arr>setting.das then
setting.das=setting.arr
@@ -430,28 +440,28 @@ Widget={
SFX("blip_1",.4)
end
end,nil,"sddasD"),
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"),
sddasD= newButton(180,340,50,50,C.white,35, function()setting.sddas=(setting.sddas-1)%11 end, nil,"sddasU"),
sddasU= newButton(400,340,50,50,C.white,35, function()setting.sddas=(setting.sddas+1)%11 end, nil,"sdarrD"),
sdarrD= newButton(500,340,50,50,C.white,35, function()setting.sdarr=(setting.sdarr-1)%4 end, nil,"sdarrU"),
sdarrU= newButton(720,340,50,50,C.white,35, function()setting.sdarr=(setting.sdarr+1)%4 end, nil,"quickR"),
quickR= newSwitch(560,430,35,SETdisp("quickR"), SETrev("quickR"), nil,"swap"),
swap= newSwitch(560,510,20,SETdisp("swap"), SETrev("swap"), nil,"fine"),
fine= newSwitch(560,590,20,SETdisp("fine"), SETrev("fine"), nil,"ctrl"),
ctrl= newButton(1020,230,320,80,C.white,35,function()scene.push()scene.swapTo("setting_key")end, nil,"touch"),
touch= newButton(1020,340,320,80,C.white,35,function()scene.push()scene.swapTo("setting_touch")end,nil,"back"),
back= newButton(1160,600,160,160,C.white,50,scene.back,nil,"graphic"),
},
setting_graphic={
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"),
sound= newButton(200,80,240,80,C.lightGreen,35,function()scene.swapTo("setting_sound")end, nil,"game"),
game= newButton(1080,80,240,80,C.lightGreen,35,function()scene.swapTo("setting_game")end, nil,"ghost"),
ghost= newSwitch(310,180,35,SETdisp("ghost"), SETdisp("ghost"), nil,"center"),
center= newSwitch(580,180,35,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"),
grid= newSwitch(580,260,30,SETdisp("grid"), SETdisp("grid"), nil,"dropFX"),
dropFX= newSlider(310,350,373,3,35,nil,SETdisp("dropFX"), SETsto("dropFX"), nil,"shakeFX"),
shakeFX=newSlider(310,430,373,3,35,nil,SETdisp("shakeFX"), SETsto("shakeFX"), nil,"atkFX"),
atkFX= newSlider(310,510,373,3,35,nil,SETdisp("atkFX"), SETsto("atkFX"), nil,"frame"),
frame= newSlider(310,590,373,10,35,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,SETdisp("fullscreen"),function()
setting.fullscreen=not setting.fullscreen
love.window.setFullscreen(setting.fullscreen)
@@ -459,35 +469,37 @@ Widget={
love.resize(love.graphics.getWidth(),love.graphics.getHeight())
end
end,nil,"bg"),
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)
bg= newSwitch(990,250,35,SETdisp("bg"),SETrev("bg"),nil,"bgblock"),
bgblock=newSwitch(990,330,35,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(810,420,120,60,C.white,35,function()
local _=setting.skin%8+1
setting.skin=_
changeBlockSkin(_)
TEXT(skinName[_],850,475,28,"appear")
end,nil,"back"),
back= newButton(1160,600,160,160,C.white,55,scene.back,nil,"sound"),
back= newButton(1160,600,160,160,C.white,50,scene.back,nil,"sound"),
},
setting_sound={
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"),
game= newButton(200,80,240,80,C.lightGreen,35,function()scene.swapTo("setting_game")end, nil,"graphic"),
graphic=newButton(1080,80,240,80,C.lightGreen,35,function()scene.swapTo("setting_graphic")end, nil,"sfx"),
sfx= newSlider(180,250,400,10,35,function()SFX("blip_1")end, SETdisp("sfx"), SETsto("sfx"), nil,"bgm"),
bgm= newSlider(750,250,400,10,35,function()BGM(bgmPlaying or"blank")end, SETdisp("bgm"), SETsto("bgm"), nil,"vib"),
vib= newSlider(180,440,400,5 ,35,function()VIB(1)end, SETdisp("vib"), SETsto("vib"), nil,"voc"),
voc= newSlider(750,440,400,10,35,function()VOICE("nya")end, SETdisp("voc"), SETsto("voc"), nil,"stereo"),
stereo= newSlider(180,630,400,10,35,function()SFX("move",1,-1)SFX("lock",1,1)end, SETdisp("stereo"), SETsto("stereo"),nil,"back"),
back=newButton(1160,600,160,160,C.white,50,scene.back,nil,"game"),
},
setting_key={
back=newButton(1140,650,200,80,C.white,50,scene.back),
back=newButton(1140,650,200,80,C.white,45,scene.back),
},
setting_touch={
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()
hide= newSwitch(810,140,40,SETdisp("VKSwitch"),SETrev("VKSwitch")),
track= newSwitch(810,220,40,SETdisp("VKTrack"),SETrev("VKTrack")),
tkset= newButton(450,220,170,80,C.white,25,function()
scene.push()
scene.swapTo("setting_trackSetting")
end,function()return not setting.VKTrack end),
default=newButton(450,320,170,80,C.white,40,function()
default=newButton(450,320,170,80,C.white,35,function()
local D=virtualkeySet[defaultSel]
for i=1,#VK_org do
VK_org[i].ava=false
@@ -502,73 +514,73 @@ Widget={
end--Replace keys
defaultSel=defaultSel%5+1
end),
snap= newButton(640,320,170,80,C.white,40,function()
snap= newButton(640,320,170,80,C.white,35,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,C.white,45,function()
alpha= newButton(830,320,170,80,C.white,40,function()
setting.VKAlpha=(setting.VKAlpha+1)%11
--Adjust virtualkey alpha
end),
icon= newButton(495,420,260,80,C.white,45,SETrev("VKIcon")),
icon= newButton(495,420,260,80,C.white,40,SETrev("VKIcon")),
--Switch virtualkey icon
size= newButton(785,420,260,80,C.white,45,function()
size= newButton(785,420,260,80,C.white,40,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,C.white,45,function()
toggle= newButton(495,520,260,80,C.white,40,function()
scene.push()
scene.swapTo("setting_touchSwitch")
end),
back= newButton(785,520,260,80,C.white,45,scene.back),
back= newButton(785,520,260,80,C.white,40,scene.back),
},
setting_touchSwitch={
b1= newSwitch(300,80, 40,VKAdisp(1),VKAcode(1)),
b2= newSwitch(300,140, 40,VKAdisp(2),VKAcode(2)),
b3= newSwitch(300,200, 40,VKAdisp(3),VKAcode(3)),
b4= newSwitch(300,260, 40,VKAdisp(4),VKAcode(4)),
b5= newSwitch(300,320, 40,VKAdisp(5),VKAcode(5)),
b6= newSwitch(300,380, 40,VKAdisp(6),VKAcode(6)),
b7= newSwitch(300,440, 40,VKAdisp(7),VKAcode(7)),
b8= newSwitch(300,500, 40,VKAdisp(8),VKAcode(8)),
b9= newSwitch(300,560, 40,VKAdisp(9),VKAcode(9)),
b10= newSwitch(300,620, 40,VKAdisp(10),VKAcode(10)),
b11= newSwitch(760,80, 40,VKAdisp(11),VKAcode(11)),
b12= newSwitch(760,140, 40,VKAdisp(12),VKAcode(12)),
b13= newSwitch(760,200, 40,VKAdisp(13),VKAcode(13)),
b14= newSwitch(760,260, 40,VKAdisp(14),VKAcode(14)),
b15= newSwitch(760,320, 40,VKAdisp(15),VKAcode(15)),
b16= newSwitch(760,380, 40,VKAdisp(16),VKAcode(16)),
b17= newSwitch(760,440, 40,VKAdisp(17),VKAcode(17)),
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,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),
b1= newSwitch(300,80, 35,VKAdisp(1),VKAcode(1)),
b2= newSwitch(300,140, 35,VKAdisp(2),VKAcode(2)),
b3= newSwitch(300,200, 35,VKAdisp(3),VKAcode(3)),
b4= newSwitch(300,260, 35,VKAdisp(4),VKAcode(4)),
b5= newSwitch(300,320, 35,VKAdisp(5),VKAcode(5)),
b6= newSwitch(300,380, 35,VKAdisp(6),VKAcode(6)),
b7= newSwitch(300,440, 35,VKAdisp(7),VKAcode(7)),
b8= newSwitch(300,500, 35,VKAdisp(8),VKAcode(8)),
b9= newSwitch(300,560, 35,VKAdisp(9),VKAcode(9)),
b10= newSwitch(300,620, 35,VKAdisp(10),VKAcode(10)),
b11= newSwitch(760,80, 35,VKAdisp(11),VKAcode(11)),
b12= newSwitch(760,140, 35,VKAdisp(12),VKAcode(12)),
b13= newSwitch(760,200, 35,VKAdisp(13),VKAcode(13)),
b14= newSwitch(760,260, 35,VKAdisp(14),VKAcode(14)),
b15= newSwitch(760,320, 35,VKAdisp(15),VKAcode(15)),
b16= newSwitch(760,380, 35,VKAdisp(16),VKAcode(16)),
b17= newSwitch(760,440, 35,VKAdisp(17),VKAcode(17)),
b18= newSwitch(760,500, 35,VKAdisp(18),VKAcode(18)),
b19= newSwitch(760,560, 35,VKAdisp(19),VKAcode(19)),
b20= newSwitch(760,620, 35,VKAdisp(20),VKAcode(20)),
norm= newButton(1080,150,240,80,C.white,45,function()for i=1,20 do VK_org[i].ava=i<11 end end),
pro= newButton(1080,300,240,80,C.white,35,function()for i=1,20 do VK_org[i].ava=true end end),
back= newButton(1080,600,240,80,C.white,45,scene.back),
},
setting_trackSetting={
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),
VKDodge=newSwitch(400,200, 35,SETdisp("VKDodge"),SETrev("VKDodge")),
VKTchW= newSlider(140,310,1000,10,35,nil,SETdisp("VKTchW"),function(i)setting.VKTchW=i;setting.VKCurW=math.max(setting.VKCurW,i)end),
VKCurW= newSlider(140,370,1000,10,35,nil,SETdisp("VKCurW"),function(i)setting.VKCurW=i;setting.VKTchW=math.min(setting.VKTchW,i)end),
back= newButton(1080,600,240,80,C.white,45,scene.back),
},
help={
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"),
his= newButton(1050,520,230,60,C.white,35,function()scene.push()scene.swapTo("history")end,nil,"back"),
qq= newButton(1050,600,230,60,C.white,35,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,35,scene.back,nil,"qq"),
},
history={
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),
prev= newButton(1155,170,180,180,C.white,65,pressKey("up"),function()return sel==1 end),
next= newButton(1155,400,180,180,C.white,65,pressKey("down"),function()return sel==#updateLog-22 end),
back= newButton(1155,600,180,90,C.white,35,scene.back),
},
stat={
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"),
path= newButton(980,620,250,60,C.white,25,function()love.system.openURL(love.filesystem.getSaveDirectory())end,function()return mobile end,"back"),
back= newButton(640,620,180,60,C.white,35,scene.back,nil,"path"),
},
}
for _,L in next,Widget do

View File

@@ -24,6 +24,7 @@ local scr=scr
curBG="none"
bgmPlaying=nil
voiceQueue={free=0}
texts={}
virtualkeyDown,virtualkeyPressTime={},{}
for i=1,20 do
virtualkeyDown[i]=X
@@ -41,7 +42,7 @@ function setFont(s)
if Fonts[s]then
gc.setFont(Fonts[s])
else
local t=gc.setNewFont("font.ttf",s-5)
local t=gc.setNewFont("font.ttf",s)
Fonts[s]=t
gc.setFont(t)
end
@@ -61,6 +62,8 @@ require("default_data")
require("class")
require("ai")
require("toolfunc")
require("sound")
require("text")
require("list")
require("dataList")
require("texture")
@@ -79,7 +82,7 @@ if sys.getPowerInfo()~="unknown"then
gc.setCanvas(powerInfoCanvas)gc.push("transform")gc.origin()
gc.clear(0,0,0,.3)
gc.setLineWidth(4)
setFont(25)
setFont(20)
local charging
if state~="battery"then
gc.setColor(1,1,1)
@@ -893,6 +896,18 @@ function love.update(dt)
FX_BGblock.tm=rnd(20,30)
end
end
for i=#texts,1,-1 do
local t=texts[i]
t.c=t.c+t.spd
if t.stop then
if t.c>t.stop then
t.c=t.stop
end
end
if t.c>60 then
rem(texts,i)
end
end
if scene.swapping then
local S=scene.swap
S.time=S.time-1
@@ -900,6 +915,8 @@ function love.update(dt)
scene.cur=S.tar
scene.init(S.tar)
widget_sel=nil
texts={}
collectgarbage()
--此时场景切换
end
if S.time==0 then
@@ -923,7 +940,7 @@ function love.update(dt)
for i=1,#Q do
Q[i]=Q[i+1]
end
end--放完后放下一个
end--放完pop出下一个
else
local n=1
local L=voiceBank[Q[1]]
@@ -991,7 +1008,14 @@ function love.draw()
gc.rectangle("fill",S[7],S[8],S[9],S[10],2)
--开关/滑条残影
end
end--sysFXs
end--guiFXs
for i=1,#texts do
local t=texts[i]
local p=t.c
gc.setColor(1,1,1,p<.2 and p*5 or p<.8 and 1 or 5-p*5)
setFont(t.font)
t:draw()
end--Floating Texts
if scene.swapping then
scene.swap.draw(scene.swap.time)
end--Swapping animation
@@ -1007,7 +1031,7 @@ function love.draw()
gc.rectangle("fill",1280,0,d,720)
end--扁窗口
end--Black side
setFont(20)
setFont(15)
gc.setColor(1,1,1)
gc.print(FPS(),5,700)
if devMode>0 then
@@ -1027,14 +1051,14 @@ function love.run()
local PUMP,POLL=love.event.pump,love.event.poll
love.resize(gc.getWidth(),gc.getHeight())
scene.init("load")--Scene Launch
return function()
while true do
PUMP()
for N,a,b,c,d,e in POLL()do
if N=="quit"then
destroyPlayers()
saveData()
saveSetting()
return 0
goto END
elseif love[N]then
love[N](a,b,c,d,e)
end
@@ -1058,6 +1082,7 @@ function love.run()
lastFreshPow=Timer()
end
end
::END::
end
local fs=love.filesystem

125
paint.lua
View File

@@ -102,75 +102,6 @@ FX_BGblock={tm=150,next=7,ct=0,list={{v=0},{v=0},{v=0},{v=0},{v=0},{v=0},{v=0},{
FX_attack={}--Attack beam
FX_badge={}--Badge thrown
sysFX={}
FX_ripple={}--Ripple&SqrShade
textFX={
appear=function(t,a)
setFont(t.font)
gc.setColor(1,1,1,a)
mStr(t.text,150,250-t.font*.5+t.dy)
end,
fly=function(t,a)
setFont(t.font)
gc.setColor(1,1,1,a)
mStr(t.text,150+(t.t-15)^3*.005,250-t.font*.5+t.dy)
end,
stretch=function(t,a)
gc.push("transform")
setFont(t.font)
gc.translate(150,250+t.dy)
if t.t<20 then gc.scale((20-t.t)*.015+1,1)end
gc.setColor(1,1,1,a)
mStr(t.text,0,-t.font*.5)
gc.pop()
end,
drive=function(t,a)
gc.push("transform")
setFont(t.font)
gc.translate(150,290+t.dy)
if t.t<20 then gc.shear((20-t.t)*.05,0)end
gc.setColor(1,1,1,a)
mStr(t.text,0,-t.font*.5-15)
gc.pop()
end,
spin=function(t,a)
gc.push("transform")
setFont(t.font)
gc.translate(150,250+t.dy)
if t.t<20 then
gc.rotate((20-t.t)^2*.0015)
end
gc.setColor(1,1,1,a)
mStr(t.text,0,-t.font*.5-8)
gc.pop()
end,
flicker=function(t,a)
setFont(t.font)
gc.setColor(1,1,1,a*(rnd()+.5))
mStr(t.text,150,225-t.font*.5+t.dy)
end,
zoomout=function(t,a)
gc.push("transform")
setFont(t.font)
local k=t.t^.5*.1+1
gc.translate(150,290+t.dy)
gc.scale(k,k)
gc.setColor(1,1,1,a)
mStr(t.text,0,-t.font*.5-5)
gc.pop()
end,
beat=function(t,a)
gc.push("transform")
setFont(t.font)
gc.translate(150,290+t.dy)
if t.t<20 then
local k=.2*(5+(25-t.t)^.5)-.45
gc.scale(k,k)
end
gc.setColor(1,1,1,a)
mStr(t.text,0,-t.font*.5-5)
gc.pop()
end,
}
local function drawAtkPointer(x,y)
local t=sin(Timer()*20)
gc.setColor(.2,.7+t*.2,1,.6+t*.4)
@@ -302,9 +233,9 @@ function Pnt.load()
gc.rectangle("fill",300,330,loadprogress*680,60,5)
gc.setColor(1,1,1)
gc.rectangle("line",300,330,680,60,5)
setFont(40)
setFont(35)
mStr(text.load[loading],640,335)
setFont(30)
setFont(25)
mStr(loadTip,640,400)
end
function Pnt.intro()
@@ -327,30 +258,30 @@ function Pnt.main()
gc.setColor(1,1,1)
gc.draw(coloredTitleImage,60,30,nil,1.3)
gc.draw(drawableText.warning,595-drawableText.warning:getWidth(),128)
setFont(35)
setFont(30)
gc.print(gameVersion,70,125)
gc.print(system,610,100)
gc.print(modes[modeID[modeSel]].level[levelSel],600,373)
setFont(30)
setFont(25)
gc.print(text.modeName[modeSel],600,414)
players[1]:demoDraw()
players[1]:draw()
end
function Pnt.mode()
gc.setColor(1,1,1)
gc.draw(titleImage,830,30)
setFont(40)
setFont(35)
local lv=modes[modeID[modeSel]].level[levelSel]
gc.setColor(modeLevelColor[lv]or color.white)
mStr(lv,270,215)
setFont(30)
setFont(25)
gc.setColor(color.white)
mStr(text.modeInfo[modeID[modeSel]],270,255)
setFont(80)
setFont(75)
gc.setColor(color.grey)
mStr(text.modeName[modeSel],643,273)
for i=modeSel-2,modeSel+2 do
if i>=1 and i<=#modeID then
local f=80-abs(i-modeSel)*20
local f=75-abs(i-modeSel)*20
gc.setColor(i==modeSel and color.white or abs(i-modeSel)==1 and color.grey or color.darkGrey)
setFont(f)
mStr(text.modeName[i],640,310+70*(i-modeSel)-f*.5)
@@ -365,13 +296,13 @@ function Pnt.music()
gc.setColor(1,1,1)
gc.draw(drawableText.musicRoom,22,23)
gc.draw(drawableText.nowPlaying,490,390)
setFont(35)
setFont(30)
for i=1,#musicID do
gc.print(musicID[i],50,90+30*i)
end
gc.draw(titleImage,640,310,nil,1.5,nil,206,35)
if bgmPlaying then
setFont(50)
setFont(45)
gc.setColor(sin(Timer()*.5)*.2+.8,sin(Timer()*.7)*.2+.8,sin(Timer())*.2+.8)
mStr(bgmPlaying or"",630,460)
local t=-Timer()%2.3/2
@@ -386,7 +317,7 @@ function Pnt.custom()
gc.rectangle("fill",25,95+40*sel,480,40)
gc.setColor(.8,.8,.8)gc.draw(drawableText.custom,20,20)
gc.setColor(1,1,1)gc.draw(drawableText.custom,22,23)
setFont(40)
setFont(35)
for i=1,#customID do
local k=customID[i]
local y=90+40*i
@@ -483,7 +414,7 @@ function Pnt.play()
gc.setColor(.8,1,0,.2)
for i=1,#P.atker do
local p=P.atker[i]
gc.line(p.centerX,p.centerY,P.centerX,P.centerY)
gc.line(p.centerX,p.centerY,P.x+300*P.size,P.y+670*P.size)
end
if P.atkMode~=4 then
if P.atking then drawAtkPointer(P.atking.centerX,P.atking.centerY)end
@@ -495,7 +426,7 @@ function Pnt.play()
end
end
if restartCount>0 then
gc.setColor(0,0,0,restartCount/20)
gc.setColor(0,0,0,restartCount*.05)
gc.rectangle("fill",0,0,1280,720)
end
end
@@ -504,7 +435,7 @@ function Pnt.pause()
gc.setColor(0,0,0,pauseTimer*.015)
gc.rectangle("fill",0,0,1280,720)
gc.setColor(1,1,1,pauseTimer*.02)
setFont(30)
setFont(25)
if pauseCount>0 then
gc.print(text.pauseCount..":["..pauseCount.."] "..format("%0.2f",pauseTime).."s",110,150)
end
@@ -516,28 +447,28 @@ function Pnt.pause()
gc.print(text.stat[i+3],860,30*i+30)
gc.print(dataOpt(i),1050,30*i+30)
end
setFont(40)
setFont(35)
if system~="Android"then
mStr(text.space.."/"..text.enter,640,190)
mStr("Ctrl+R",640,351)
gc.print("ESC",610,506)
end
mDraw(gamefinished and drawableText.finish or drawableText.pause,640,60-10*(5-pauseTimer*.1)^1.5)
mDraw(gameResult and drawableText[gameResult]or drawableText.pause,640,60-10*(5-pauseTimer*.1)^1.5)
end
function Pnt.setting_game()
gc.setColor(1,1,1)
mDraw(drawableText.setting_game,640,15)
setFont(40)
setFont(35)
mStr("DAS:"..setting.das,290,205)
mStr("ARR:"..setting.arr,610,205)
setFont(28)
setFont(23)
mStr(text.softdropdas..setting.sddas,290,323)
mStr(text.softdroparr..setting.sdarr,610,323)
end
function Pnt.setting_graphic()
gc.setColor(1,1,1)
mDraw(drawableText.setting_graphic,640,15)
gc.draw(blockSkin[7-int(Timer()*2)%7],940,440,nil,2)
gc.draw(blockSkin[7-int(Timer()*2)%7],890,390,nil,2)
end
function Pnt.setting_sound()
gc.setColor(1,1,1)
@@ -567,7 +498,7 @@ function Pnt.setting_key()
mDraw(drawableText.joystick,1140,35)
gc.setColor(1,1,1)
setFont(31)
setFont(26)
for N=1,20 do
if N<11 then
gc.printf(text.actName[N],47,45*N+22,180,"right")
@@ -586,7 +517,7 @@ function Pnt.setting_key()
for y=65,515,45 do
gc.line(40,y,1240,y)
end
setFont(40)
setFont(35)
gc.print("Player:",170,590)
gc.print(int(curBoard*.5+.5),300,590)
gc.print(curBoard.."/8",580,590)
@@ -613,12 +544,12 @@ function Pnt.setting_trackSetting()
mDraw(drawableText.VKCurW,640+50*setting.VKCurW,380)
end
function Pnt.help()
setFont(30)
setFont(25)
gc.setColor(1,1,1)
for i=1,#text.help do
gc.printf(text.help[i],140,10+40*i,1000,"center")
end
setFont(24)
setFont(19)
gc.print(text.used,30,330)
gc.draw(titleImage,280,620,.1,1+.05*sin(Timer()*2),nil,206,35)
gc.setLineWidth(5)
@@ -627,13 +558,13 @@ function Pnt.help()
gc.draw(payCode,20,20)
gc.draw(groupCode,1080,20)
gc.setColor(1,1,1,sin(Timer()*10)*.5+.5)
setFont(35)
setFont(30)
mStr(text.support,150,283)
setFont(25)
setFont(20)
mStr(text.group,1170,210)
end
function Pnt.stat()
setFont(28)
setFont(23)
gc.setColor(1,1,1)
for i=1,18 do
gc.print(text.stat[i],400,30*i-5)
@@ -647,7 +578,7 @@ function Pnt.history()
gc.setColor(1,1,1)
gc.setLineWidth(4)
gc.rectangle("line",30,45,1000,632)
setFont(25)
setFont(20)
for i=0,min(22,#updateLog-sel)do
gc.print(updateLog[sel+i],40,50+27*(i))
end

1357
player.lua

File diff suppressed because it is too large Load Diff

View File

@@ -30,7 +30,6 @@ local sceneInit={
if not players[1]then
newDemoPlayer(1,900,35,1.1)
end--create demo player
collectgarbage()
end,
music=function()
if bgmPlaying then
@@ -132,8 +131,8 @@ local swap={
gc.setColor(0,0,0,t)
gc.rectangle("fill",0,0,1280,720)
end},
slowFade={120,40,function(t)
local t=t>40 and 1.5-t/80 or t/40
slowFade={180,90,function(t)
local t=t>90 and 2-t/90 or t/90
gc.setColor(0,0,0,t)
gc.rectangle("fill",0,0,1280,720)
end},

85
sound.lua Normal file
View File

@@ -0,0 +1,85 @@
local rnd=math.random
local vibrateLevel={0,.015,.02,.03,.04,.05,.06,.07,.08,.09}
function VIB(t)
if setting.vib>0 then
love.system.vibrate(vibrateLevel[setting.vib+t])
end
end
function SFX(s,v,pos)
if setting.sfx>0 then
local S=sfx[s]--AU_Queue
local n=1
while S[n]:isPlaying()do
n=n+1
if not S[n]then
S[n]=S[n-1]:clone()
S[n]:seek(0)
break
end
end
S=S[n]--AU_SRC
if S:getChannelCount()==1 then
if pos then
pos=pos*setting.stereo*.1
S:setPosition(pos,1-pos^2,0)
else
S:setPosition(0,0,0)
end
end
S:setVolume((v or 1)*setting.sfx*.1)
print((v or 1)*setting.sfx*.1)
S:play()
end
end
function getFreeVoiceChannel()
local i=#voiceQueue
for i=1,i do
if #voiceQueue[i]==0 then return i end
end
voiceQueue[i+1]={}
return i+1
end
function VOICE(s,chn)
if setting.voc>0 then
if chn then
voiceQueue[chn][#voiceQueue[chn]+1]=voiceList[s][rnd(#voiceList[s])]
--添加到[chn]
else
voiceQueue[getFreeVoiceChannel()]={voiceList[s][rnd(#voiceList[s])]}
--自动查找/创建空轨
end
end
end
function BGM(s)
if setting.bgm>0 then
if bgmPlaying~=s then
if bgmPlaying then newTask(Event_task.bgmFadeOut,nil,bgmPlaying)end
for i=#Task,1,-1 do
local T=Task[i]
if T.code==Event_task.bgmFadeIn then
T.code=Event_task.bgmFadeOut
elseif T.code==Event_task.bgmFadeOut and T.data==s then
rem(Task,i)
end
end
if s then
newTask(Event_task.bgmFadeIn,nil,s)
bgm[s]:play()
end
bgmPlaying=s
else
if bgmPlaying then
local v=setting.bgm*.1
bgm[bgmPlaying]:setVolume(v)
if v>0 then
bgm[bgmPlaying]:play()
else
bgm[bgmPlaying]:pause()
end
end
end
elseif bgmPlaying then
bgm[bgmPlaying]:pause()
bgmPlaying=nil
end
end

82
text.lua Normal file
View File

@@ -0,0 +1,82 @@
local gc=love.graphics
local rnd=math.random
local mStr=mStr
local textFX={}
function textFX.appear(t)
mStr(t.text,t.x,t.y-t.font*.7)
end
function textFX.fly(t)
mStr(t.text,t.x+(t.c-.5)^3*300,t.y-t.font*.7)
end
function textFX.stretch(t)
gc.push("transform")
gc.translate(t.x,t.y)
if t.c<.3 then gc.scale((.3-t.c)*1.6+1,1)end
mStr(t.text,0,-t.font*.7)
gc.pop()
end
function textFX.drive(t)
gc.push("transform")
gc.translate(t.x,t.y)
if t.c<.3 then gc.shear((.3-t.c)*2,0)end
mStr(t.text,0,-t.font*.7)
gc.pop()
end
function textFX.spin(t)
gc.push("transform")
gc.translate(t.x,t.y)
if t.c<.3 then
gc.rotate((.3-t.c)^2*4)
end
mStr(t.text,0,-t.font*.7)
gc.pop()
end
function textFX.flicker(t)
local _,τ,T,Τ=gc.getColor()
gc.setColor(_,τ,T,Τ*(rnd()+.5))
mStr(t.text,t.x,t.y-t.font*.7)
end
function textFX.zoomout(t)
gc.push("transform")
local k=t.c^.5*.1+1
gc.translate(t.x,t.y)
gc.scale(k,k)
mStr(t.text,0,-t.font*.7)
gc.pop()
end
function textFX.beat(t)
gc.push("transform")
gc.translate(t.x,t.y)
if t.c<.3 then
local k=1.3-t.c^2/.3
gc.scale(k,k)
end
mStr(t.text,0,-t.font*.7)
gc.pop()
end
function getTEXT(text,x,y,font,style,spd,stop)
return{
c=0, --counter
text=text, --string
x=x or 0, --x
y=y or 0, --y
font=font or 40, --font
spd=(spd or 1)/60, --timing speed
stop=stop, --timing stop
draw=textFX[style]or error("unavailable type:"..style), --draw method
}
end
function TEXT(text,x,y,font,style,spd,stop)
texts[#texts+1]={
c=0, --timer
text=text or"NaN", --string
x=x or 0, --x
y=y or 0, --y
font=font or 40, --font
spd=(spd or 1)/60, --timing speed(1=last 1 sec)
stop=stop, --stop time(sustained text)
draw=textFX[style]or error("unavailable type:"..style), --draw method
}
end

View File

@@ -81,7 +81,10 @@ drawableText={
modeName=T(30),levelName=T(30),
next=T(40),hold=T(40),
pause=T(120),finish=T(120),
win=T(120),finish=T(120),
lose=T(120),pause=T(120),
custom=T(80),
setting_game=T(80),setting_graphic=T(80),setting_sound=T(80),
keyboard=T(25),joystick=T(25),

View File

@@ -129,7 +129,7 @@ function Tmr.play(dt)
return
end
elseif restartCount>0 then
restartCount=max(restartCount-2,0)
restartCount=restartCount>2 and restartCount-2 or 0
end--Counting,include pre-das,directy RETURN,or restart counting
for p=1,#players do
local P=players[p]
@@ -138,7 +138,7 @@ function Tmr.play(dt)
if modeEnv.royaleMode and frame%120==0 then freshMostDangerous()end
end
function Tmr.pause(dt)
if not gamefinished then
if not gameResult then
pauseTime=pauseTime+dt
end
if pauseTimer<50 and not wd.isMinimized()then

View File

@@ -1,7 +1,6 @@
local tm=love.timer
local gc=love.graphics
local kb=love.keyboard
local setFont=setFont
local int,abs,rnd,max,min=math.floor,math.abs,math.random,math.max,math.min
local sub,find=string.sub,string.find
local ins,rem=table.insert,table.remove
@@ -71,7 +70,7 @@ langName={"中文","全中文","English"}
local langID={"chi","chi_full","eng"}
local drawableTextLoad={
"next","hold",
"pause","finish",
"win","finish","lose","pause",
"custom",
"setting_game",
"setting_graphic",
@@ -95,7 +94,7 @@ function swapLanguage(l)
royaleCtrlPad=gc.newCanvas(300,100)
gc.setCanvas(royaleCtrlPad)
gc.setColor(1,1,1)
setFont(25)
setFont(20)
gc.setLineWidth(2)
for i=1,4 do
gc.rectangle("line",RCPB[2*i-1],RCPB[2*i],90,35,8,4)
@@ -133,90 +132,6 @@ function restoreVirtualKey()
end
local vibrateLevel={0,.015,.02,.03,.04,.05,.06,.07,.08,.09}
function VIB(t)
if setting.vib>0 then
love.system.vibrate(vibrateLevel[setting.vib+t])
end
end
function SFX(s,v,pos)
if setting.sfx>0 then
local S=sfx[s]--AU_Queue
local n=1
while S[n]:isPlaying()do
n=n+1
if not S[n]then
S[n]=S[n-1]:clone()
S[n]:seek(0)
break
end
end
S=S[n]--AU_SRC
if S:getChannelCount()==1 then
if pos then
pos=pos*setting.stereo*.1
S:setPosition(pos,1-pos^2,0)
else
S:setPosition(0,0,0)
end
end
S:setVolume((v or 1)*setting.sfx*.1)
S:play()
end
end
function getFreeVoiceChannel()
local i=#voiceQueue
for i=1,i do
if #voiceQueue[i]==0 then return i end
end
voiceQueue[i+1]={}
return i+1
end
function VOICE(s,chn)
if setting.voc>0 then
if chn then
voiceQueue[chn][#voiceQueue[chn]+1]=voiceList[s][rnd(#voiceList[s])]
--添加到[chn]
else
voiceQueue[getFreeVoiceChannel()]={voiceList[s][rnd(#voiceList[s])]}
--自动查找/创建空轨
end
end
end
function BGM(s)
if setting.bgm>0 then
if bgmPlaying~=s then
if bgmPlaying then newTask(Event_task.bgmFadeOut,nil,bgmPlaying)end
for i=#Task,1,-1 do
local T=Task[i]
if T.code==Event_task.bgmFadeIn then
T.code=Event_task.bgmFadeOut
elseif T.code==Event_task.bgmFadeOut and T.data==s then
rem(Task,i)
end
end
if s then
newTask(Event_task.bgmFadeIn,nil,s)
bgm[s]:play()
end
bgmPlaying=s
else
if bgmPlaying then
local v=setting.bgm*.1
bgm[bgmPlaying]:setVolume(v)
if v>0 then
bgm[bgmPlaying]:play()
else
bgm[bgmPlaying]:pause()
end
end
end
elseif bgmPlaying then
bgm[bgmPlaying]:pause()
bgmPlaying=nil
end
end
function updateStat()
local S=players[1].stat
for k,v in next,S do
@@ -264,9 +179,7 @@ end
function royaleLevelup()
gameStage=gameStage+1
local spd
if(gameStage==3 or gameStage>4)and players[1].alive then
players[1]:showText(text.royale_remain(#players.alive),"beat",50,-100,.3)
end
TEXT(text.royale_remain(#players.alive),640,200,40,"beat",.3)
if gameStage==2 then
spd=30
elseif gameStage==3 then
@@ -300,15 +213,16 @@ function royaleLevelup()
end
function pauseGame()
restartCount=0--Avoid strange darkness
pauseTimer=0--Pause timer for animation
if not gamefinished then
if not gameResult then
pauseCount=pauseCount+1
end
for i=1,#players.alive do
local l=players.alive[i].keyPressing
for i=1,#players do
local l=players[i].keyPressing
for j=1,#l do
if l[j]then
players.alive[i]:releaseKey(j)
players[i]:releaseKey(j)
end
end
end
@@ -324,14 +238,16 @@ function loadGame(mode,level)
lv=level,
}
drawableText.modeName:set(text.modeName[mode])
drawableText.levelName:set(modes[modeID[modeSel]].level[levelSel])
drawableText.levelName:set(modes[modeID[mode]].level[level])
needResetGameData=true
scene.swapTo("play","deck")
end
function resetPartGameData()
gameResult=false
frame=30
destroyPlayers()
modes[curMode.id].load()
texts={}
if modeEnv.task then
for i=1,#players do
newTask(Event_task[modeEnv.task],players[i])
@@ -346,7 +262,7 @@ function resetPartGameData()
collectgarbage()
end
function resetGameData()
gamefinished=false
gameResult=false
frame=0
garbageSpeed=1
pushSpeed=3
@@ -364,6 +280,7 @@ function resetGameData()
curBG=modeEnv.bg
BGM(modeEnv.bgm)
texts={}
FX_badge={}
FX_attack={}
for _,v in next,PTC.dust do
@@ -447,6 +364,7 @@ function saveData()
t=concat(t,"\r\n")
userData:open("w")
userData:write(t)
userData:flush()
userData:close()
end
@@ -573,5 +491,6 @@ function saveSetting()
t=concat(t,"\r\n")
userSetting:open("w")
userSetting:write(t)
userSetting:flush(t)
userSetting:close()
end

View File

@@ -1,10 +1,14 @@
local S=[=[
Patron(rmb10+):
gggf/T080/Ykzl/zxc
[D*a]?
Fireboos
gggf
Sasoric
T080
Ykzl
zxc
?[D*a]
Future outlook:
Normal Things:
Normal:
powerinfo switch
splashing block
ajustable next count
@@ -18,13 +22,19 @@ Future outlook:
game recording
new AI:task-Z
auto GUI in any screen size
Technical things:
Hard:
Encrypt source code(compile to byte code)
infinite 1v1
square mode
more FXs & 3d features & animations
0.8.0:
remake text system
more details
bug fixed
0.7.35:
bug fixed
0.7.34:
shaking FX more natural
0.7.33+:
MORE POWERFUL 9-stack AI
add stereo-setting slider