Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72dcb84662 |
BIN
BGM/sores.ogg
Normal file
BIN
BGM/sores.ogg
Normal file
Binary file not shown.
BIN
SFX/collect.ogg
BIN
SFX/collect.ogg
Binary file not shown.
BIN
SFX/drop.ogg
BIN
SFX/drop.ogg
Binary file not shown.
BIN
SFX/lock.ogg
Normal file
BIN
SFX/lock.ogg
Normal file
Binary file not shown.
7
ai.lua
7
ai.lua
@@ -171,11 +171,4 @@ function AI_getControls(ctrl)
|
|||||||
ins(ctrl,l[i])
|
ins(ctrl,l[i])
|
||||||
end
|
end
|
||||||
ins(ctrl,6)
|
ins(ctrl,6)
|
||||||
|
|
||||||
if rnd()<.1 then
|
|
||||||
if P.atkMode~=4 and P==mostDangerous then
|
|
||||||
ins(P.ai.controls,9)
|
|
||||||
--Smarter AI???
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
103
call&sys.lua
103
call&sys.lua
@@ -14,37 +14,32 @@ function onVirtualkey(x,y)
|
|||||||
end
|
end
|
||||||
function buttonControl_key(i)
|
function buttonControl_key(i)
|
||||||
if i=="up"or i=="down"or i=="left"or i=="right"then
|
if i=="up"or i=="down"or i=="left"or i=="right"then
|
||||||
if not Buttons.sel then
|
if Buttons.sel then
|
||||||
if Buttons[scene][1]then
|
Buttons.sel=Buttons[scene][Buttons.sel[i]]or Buttons.sel
|
||||||
Buttons.sel=1
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
Buttons.sel=Buttons[scene][Buttons.sel][i]or Buttons.sel
|
Buttons.sel=select(2,next(Buttons[scene]))
|
||||||
|
mouseShow=false
|
||||||
end
|
end
|
||||||
elseif i=="space"or i=="return"then
|
elseif i=="space"or i=="return"then
|
||||||
if not sceneSwaping and Buttons.sel then
|
if not sceneSwaping and Buttons.sel then
|
||||||
local B=Buttons[scene][Buttons.sel]
|
Buttons.sel.alpha=1
|
||||||
B.code()
|
Buttons.sel.code()
|
||||||
B.alpha=1
|
|
||||||
sysSFX("button")
|
sysSFX("button")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function buttonControl_gamepad(i)
|
function buttonControl_gamepad(i)
|
||||||
if i=="dpup"or i=="dpdown"or i=="dpleft"or i=="dpright"then
|
if i=="dpup"or i=="dpdown"or i=="dpleft"or i=="dpright"then
|
||||||
if not Buttons.sel then
|
if Buttons.sel then
|
||||||
if Buttons[scene][1]then
|
Buttons.sel=Buttons[scene][Buttons.sel[i=="dpup"and"up"or i=="dpdown"and"down"or i=="dpleft"and"left"or"right"]]or Buttons.sel
|
||||||
Buttons.sel=1
|
|
||||||
end
|
|
||||||
mouseShow=false
|
|
||||||
else
|
else
|
||||||
Buttons.sel=Buttons[scene][Buttons.sel][i=="dpup"and"up"or i=="dpdown"and"down"or i=="dpleft"and"left"or"right"]or Buttons.sel
|
Buttons.sel=select(2,next(Buttons[scene]))
|
||||||
|
mouseShow=false
|
||||||
end
|
end
|
||||||
elseif i=="start"then
|
elseif i=="start"then
|
||||||
if not sceneSwaping and Buttons.sel then
|
if not sceneSwaping and Buttons.sel then
|
||||||
local B=Buttons[scene][Buttons.sel]
|
Buttons.sel.alpha=1
|
||||||
B.code()
|
Buttons.sel.code()
|
||||||
B.alpha=1
|
|
||||||
sysSFX("button")
|
sysSFX("button")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -257,40 +252,37 @@ end
|
|||||||
|
|
||||||
|
|
||||||
function love.mousemoved(x,y,dx,dy,t)
|
function love.mousemoved(x,y,dx,dy,t)
|
||||||
if not t then
|
if t then return end
|
||||||
mouseShow=true
|
mouseShow=true
|
||||||
mx,my=xOy:inverseTransformPoint(x,y)
|
mx,my=xOy:inverseTransformPoint(x,y)
|
||||||
Buttons.sel=nil
|
Buttons.sel=nil
|
||||||
for i=1,#Buttons[scene]do
|
for N,B in next,Buttons[scene]do
|
||||||
local B=Buttons[scene][i]
|
if not(B.hide and B.hide())then
|
||||||
if not(B.hide and B.hide())then
|
if abs(mx-B.x)<B.w*.5 and abs(my-B.y)<B.h*.5 then
|
||||||
if abs(mx-B.x)<B.w*.5 and abs(my-B.y)<B.h*.5 then
|
Buttons.sel=B
|
||||||
Buttons.sel=i
|
return
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function love.mousepressed(x,y,k,t,num)
|
function love.mousepressed(x,y,k,t,num)
|
||||||
if not t then
|
if t then return end
|
||||||
mouseShow=true
|
mouseShow=true
|
||||||
mx,my=xOy:inverseTransformPoint(x,y)
|
mx,my=xOy:inverseTransformPoint(x,y)
|
||||||
if mouseDown[scene]then
|
if mouseDown[scene]then
|
||||||
mouseDown[scene](mx,my,k)
|
mouseDown[scene](mx,my,k)
|
||||||
else
|
else
|
||||||
if k==1 then
|
if k==1 then
|
||||||
if not sceneSwaping and Buttons.sel then
|
if not sceneSwaping and Buttons.sel then
|
||||||
local B=Buttons[scene][Buttons.sel]
|
local B=Buttons.sel
|
||||||
B.code()
|
B.code()
|
||||||
B.alpha=1
|
B.alpha=1
|
||||||
Buttons.sel=nil
|
Buttons.sel=nil
|
||||||
love.mousemoved(x,y)
|
love.mousemoved(x,y)
|
||||||
sysSFX("button")
|
sysSFX("button")
|
||||||
end
|
|
||||||
elseif k==2 then
|
|
||||||
back()
|
|
||||||
end
|
end
|
||||||
|
elseif k==2 then
|
||||||
|
back()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -333,6 +325,7 @@ function love.touchreleased(id,x,y)
|
|||||||
B.code()
|
B.code()
|
||||||
B.alpha=1
|
B.alpha=1
|
||||||
Buttons.sel=nil
|
Buttons.sel=nil
|
||||||
|
sysSFX("button")
|
||||||
end
|
end
|
||||||
Buttons.sel=nil
|
Buttons.sel=nil
|
||||||
mouseShow=false
|
mouseShow=false
|
||||||
@@ -382,6 +375,8 @@ function love.keypressed(i)
|
|||||||
if i=="f12"then devMode=not devMode end
|
if i=="f12"then devMode=not devMode end
|
||||||
if devMode then
|
if devMode then
|
||||||
if i=="k"then
|
if i=="k"then
|
||||||
|
P=players.alive[rnd(#players.alive)]
|
||||||
|
Event_gameover.lose()
|
||||||
--Test code here
|
--Test code here
|
||||||
elseif i=="q"then
|
elseif i=="q"then
|
||||||
for i=1,#Buttons[scene]do
|
for i=1,#Buttons[scene]do
|
||||||
@@ -389,7 +384,7 @@ function love.keypressed(i)
|
|||||||
print(format("x=%d,y=%d,w=%d,h=%d",B.x,B.y,B.w,B.h))
|
print(format("x=%d,y=%d,w=%d,h=%d",B.x,B.y,B.w,B.h))
|
||||||
end
|
end
|
||||||
elseif Buttons.sel then
|
elseif Buttons.sel then
|
||||||
local B=Buttons[scene][Buttons.sel]
|
local B=Buttons.sel
|
||||||
if i=="left"then B.x=B.x-10
|
if i=="left"then B.x=B.x-10
|
||||||
elseif i=="right"then B.x=B.x+10
|
elseif i=="right"then B.x=B.x+10
|
||||||
elseif i=="up"then B.y=B.y-10
|
elseif i=="up"then B.y=B.y-10
|
||||||
@@ -458,9 +453,9 @@ function love.update(dt)
|
|||||||
if sceneSwaping then
|
if sceneSwaping then
|
||||||
sceneSwaping.time=sceneSwaping.time-1
|
sceneSwaping.time=sceneSwaping.time-1
|
||||||
if sceneSwaping.time==sceneSwaping.mid then
|
if sceneSwaping.time==sceneSwaping.mid then
|
||||||
for i=1,#Buttons[scene]do
|
for k,B in next,Buttons[scene]do
|
||||||
Buttons[scene][i].alpha=0
|
B.alpha=0
|
||||||
end--Reset buttons' state
|
end--Reset buttons' alpha
|
||||||
scene=sceneSwaping.tar
|
scene=sceneSwaping.tar
|
||||||
BGM("blank")
|
BGM("blank")
|
||||||
sceneInit[scene]()
|
sceneInit[scene]()
|
||||||
@@ -468,9 +463,13 @@ function love.update(dt)
|
|||||||
elseif sceneSwaping.time==0 then
|
elseif sceneSwaping.time==0 then
|
||||||
sceneSwaping=nil
|
sceneSwaping=nil
|
||||||
end
|
end
|
||||||
elseif Tmr[scene]then
|
end
|
||||||
|
if Tmr[scene]then
|
||||||
Tmr[scene](dt)
|
Tmr[scene](dt)
|
||||||
end
|
end
|
||||||
|
for i=#Task,1,-1 do
|
||||||
|
Task[i]:update()
|
||||||
|
end
|
||||||
updateButton()
|
updateButton()
|
||||||
end
|
end
|
||||||
function love.sendData(data)
|
function love.sendData(data)
|
||||||
@@ -523,7 +522,9 @@ function love.draw()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
function love.resize(w,h)
|
function love.resize(w,h)
|
||||||
ww,wh=w,h
|
if w>=h then ww,wh=w,h
|
||||||
|
else ww,wh=h,w
|
||||||
|
end
|
||||||
screenK=h/w>=.5625 and w/1280 or h/720
|
screenK=h/w>=.5625 and w/1280 or h/720
|
||||||
xOy=xOy:setTransformation(w*.5,h*.5,nil,screenK,nil,640,360)
|
xOy=xOy:setTransformation(w*.5,h*.5,nil,screenK,nil,640,360)
|
||||||
gc.replaceTransform(xOy)
|
gc.replaceTransform(xOy)
|
||||||
|
|||||||
45
class.lua
Normal file
45
class.lua
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
Task={}
|
||||||
|
metatable_task={__index=Task}
|
||||||
|
function newTask(code,P,data)
|
||||||
|
local obj={
|
||||||
|
code=code,
|
||||||
|
P=P,
|
||||||
|
data=data,
|
||||||
|
}
|
||||||
|
setmetatable(obj,metatable_task)
|
||||||
|
ins(Task,obj)
|
||||||
|
end
|
||||||
|
|
||||||
|
function clearTask(opt)
|
||||||
|
if opt=="all"then
|
||||||
|
while Task[1]do
|
||||||
|
rem(Task,i)
|
||||||
|
end
|
||||||
|
elseif opt=="play"then
|
||||||
|
for i=#Task,1,-1 do
|
||||||
|
if Task[i].P then
|
||||||
|
rem(Task,i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else--Player table
|
||||||
|
for i=#Task,1,-1 do
|
||||||
|
if Task[i].P==P then
|
||||||
|
rem(Task,i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function Task:update()
|
||||||
|
if self.code(self.P,self.data)then
|
||||||
|
self:destroy()
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function Task:destroy()
|
||||||
|
for i=#Task,1,-1 do
|
||||||
|
if Task[i]==self then
|
||||||
|
rem(Task,i)
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
4
conf.lua
4
conf.lua
@@ -9,7 +9,7 @@ function love.conf(t)
|
|||||||
t.audio.mixwithsystem=true--Switch on to keep sysBGM
|
t.audio.mixwithsystem=true--Switch on to keep sysBGM
|
||||||
|
|
||||||
local W=t.window
|
local W=t.window
|
||||||
W.title="Techmino V0.7.11"
|
W.title="Techmino V0.7.12"
|
||||||
W.icon="/image/icon.png"
|
W.icon="/image/icon.png"
|
||||||
W.width,W.height=1280,720
|
W.width,W.height=1280,720
|
||||||
W.minwidth,W.minheight=640,360
|
W.minwidth,W.minheight=640,360
|
||||||
@@ -17,7 +17,7 @@ function love.conf(t)
|
|||||||
W.resizable=true
|
W.resizable=true
|
||||||
W.fullscreentype="desktop"--Choose between "desktop" fullscreen or "exclusive" fullscreen mode (string)
|
W.fullscreentype="desktop"--Choose between "desktop" fullscreen or "exclusive" fullscreen mode (string)
|
||||||
W.fullscreen=X
|
W.fullscreen=X
|
||||||
W.vsync=X--0 to set ∞fps
|
W.vsync=0--0 to set ∞fps
|
||||||
W.msaa=X--The number of samples to use with multi-sampled antialiasing (number)
|
W.msaa=X--The number of samples to use with multi-sampled antialiasing (number)
|
||||||
W.depth=X--Bits per sample in the depth buffer
|
W.depth=X--Bits per sample in the depth buffer
|
||||||
W.stencil=1--The number of bits per sample in the stencil buffer
|
W.stencil=1--The number of bits per sample in the stencil buffer
|
||||||
|
|||||||
@@ -20,11 +20,11 @@ local PClist={
|
|||||||
{2,5,4,3},{2,5,6,7},{7,5,4,2},{4,5,3,5},
|
{2,5,4,3},{2,5,6,7},{7,5,4,2},{4,5,3,5},
|
||||||
}
|
}
|
||||||
local marathon_drop={[0]=60,48,40,30,24,18,15,12,10,8,7,6,5,4,3,2,1,1,0,0}
|
local marathon_drop={[0]=60,48,40,30,24,18,15,12,10,8,7,6,5,4,3,2,1,1,0,0}
|
||||||
local rush_lock={20,18,16,14,12}
|
local rush_lock={20,18,16,15,14}
|
||||||
local rush_wait={12,10,9,8,7}
|
local rush_wait={12,10,9,8,7}
|
||||||
local rush_fall={12,11,10,9,8}
|
local rush_fall={18,16,14,13,12}
|
||||||
local death_lock={12,11,10,9,8}
|
local death_lock={12,10,9,8,7}
|
||||||
local death_wait={9,8,7,6,5}
|
local death_wait={10,9,8,7,6}
|
||||||
local death_fall={10,9,8,7,6}
|
local death_fall={10,9,8,7,6}
|
||||||
local pc_drop={50,45,40,35,30,26,22,18,15,12}
|
local pc_drop={50,45,40,35,30,26,22,18,15,12}
|
||||||
local pc_lock={55,50,45,40,36,32,30}
|
local pc_lock={55,50,45,40,36,32,30}
|
||||||
@@ -89,114 +89,11 @@ freshMethod={
|
|||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
Event={
|
Event={
|
||||||
gameover={
|
|
||||||
win=function()
|
|
||||||
local P=players.alive[1]
|
|
||||||
P.alive=false
|
|
||||||
P.control=false
|
|
||||||
P.timing=false
|
|
||||||
P.waiting=1e99
|
|
||||||
P.b2b=0
|
|
||||||
if modeEnv.royaleMode then
|
|
||||||
P.rank=1
|
|
||||||
P.result="WIN"
|
|
||||||
showText(P,1,"appear",60,120,nil,true)
|
|
||||||
changeAtk(P)
|
|
||||||
end
|
|
||||||
::L::if P.task[1]then
|
|
||||||
rem(P.task)
|
|
||||||
goto L
|
|
||||||
end
|
|
||||||
for i=1,#P.atkBuffer do
|
|
||||||
P.atkBuffer[i].sent=true
|
|
||||||
P.atkBuffer[i].time=0
|
|
||||||
end
|
|
||||||
for i=1,#P.field do
|
|
||||||
for j=1,10 do
|
|
||||||
P.visTime[i][j]=min(P.visTime[i][j],20)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
showText(P,text.win,"beat",90,nil,nil,true)
|
|
||||||
if P.id==1 and players[2]and players[2].ai then SFX("win")end
|
|
||||||
ins(P.task,Event.task.win)
|
|
||||||
end,
|
|
||||||
lose=function()
|
|
||||||
P.alive=false
|
|
||||||
P.control=false
|
|
||||||
P.timing=false
|
|
||||||
P.waiting=1e99
|
|
||||||
P.b2b=0
|
|
||||||
::L::if P.task[1]then
|
|
||||||
rem(P.task)
|
|
||||||
goto L
|
|
||||||
end
|
|
||||||
for i=1,#players.alive do
|
|
||||||
if players.alive[i]==P then
|
|
||||||
rem(players.alive,i)
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if modeEnv.royaleMode then
|
|
||||||
changeAtk(P)
|
|
||||||
P.result="K.O."
|
|
||||||
P.rank=#players.alive+1
|
|
||||||
showText(P,P.rank,"appear",60,120,nil,true)
|
|
||||||
P.strength=0
|
|
||||||
local A=P
|
|
||||||
::L::
|
|
||||||
A=A.lastRecv
|
|
||||||
if A and not A.alive and A~=P then goto L end
|
|
||||||
if A and A~=P then
|
|
||||||
if P.id==1 or A.id==1 then
|
|
||||||
P.killMark=A.id==1
|
|
||||||
end
|
|
||||||
A.ko,A.badge=A.ko+1,A.badge+P.badge+1
|
|
||||||
for i=A.strength+1,4 do
|
|
||||||
if A.badge>=modeEnv.royalePowerup[i]then
|
|
||||||
A.strength=i
|
|
||||||
end
|
|
||||||
end
|
|
||||||
P.lastRecv=A
|
|
||||||
if P.id==1 or A.id==1 then
|
|
||||||
ins(P.task,Event.task.throwBadge)
|
|
||||||
end
|
|
||||||
freshMostBadge()
|
|
||||||
end
|
|
||||||
freshMostDangerous()
|
|
||||||
for i=1,#players.alive do
|
|
||||||
if players.alive[i].atking==P then
|
|
||||||
freshTarget(players.alive[i])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if #players.alive==modeEnv.royaleRemain[gameStage]then
|
|
||||||
royaleLevelup()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
for i=1,#P.atkBuffer do
|
|
||||||
P.atkBuffer[i].sent=true
|
|
||||||
P.atkBuffer[i].time=0
|
|
||||||
end
|
|
||||||
for i=1,#P.field do
|
|
||||||
for j=1,10 do
|
|
||||||
P.visTime[i][j]=min(P.visTime[i][j],20)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
showText(P,text.lose,"appear",90,nil,nil,true)
|
|
||||||
if P.id==1 and players[2]and players[2].ai then SFX("fail")end
|
|
||||||
ins(P.task,Event.task.lose)
|
|
||||||
if #players.alive==1 then
|
|
||||||
local t=P
|
|
||||||
P=players.alive[1]
|
|
||||||
Event.gameover.win()
|
|
||||||
P=t
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
marathon_reach=function()
|
marathon_reach=function()
|
||||||
local s=int(P.cstat.row*.1)
|
local s=int(P.cstat.row*.1)
|
||||||
if s>=20 then
|
if s>=20 then
|
||||||
P.cstat.row=200
|
P.cstat.row=200
|
||||||
Event.gameover.win()
|
Event_gameover.win()
|
||||||
else
|
else
|
||||||
P.gameEnv.drop=marathon_drop[s]
|
P.gameEnv.drop=marathon_drop[s]
|
||||||
if s==18 then P.gameEnv._20G=true end
|
if s==18 then P.gameEnv._20G=true end
|
||||||
@@ -204,37 +101,58 @@ Event={
|
|||||||
SFX("reach")
|
SFX("reach")
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
marathon_reach_lunatic=function()
|
master_reach_lunatic=function()
|
||||||
if P.gameEnv.target==250 then
|
local t=P.cstat.point
|
||||||
P.cstat.row=250
|
if t%100==99 and #P.clearing==0 then goto L end
|
||||||
Event.gameover.win()
|
t=t+clearPoint[#P.clearing]
|
||||||
else
|
if int(t*.01)>P.cstat.event then
|
||||||
P.gameEnv.target=P.gameEnv.target+50
|
P.cstat.event=P.cstat.event+1
|
||||||
local t=P.gameEnv.target/50
|
if P.cstat.event==5 then
|
||||||
P.gameEnv.lock=rush_lock[t]
|
P.cstat.event=4
|
||||||
P.gameEnv.wait=rush_wait[t]
|
P.cstat.point=500
|
||||||
P.gameEnv.fall=rush_fall[t]
|
Event_gameover.win()
|
||||||
if t==4 then P.gameEnv.bone=true end
|
goto L
|
||||||
showText(P,text.stage[t],"fly",80,-120)
|
else
|
||||||
SFX("reach")
|
local s=P.cstat.event+1
|
||||||
|
P.gameEnv.lock=rush_lock[s]
|
||||||
|
P.gameEnv.wait=rush_wait[s]
|
||||||
|
P.gameEnv.fall=rush_fall[s]
|
||||||
|
P.gameEnv.das=10-s
|
||||||
|
if s==3 then P.gameEnv.arr=2 end
|
||||||
|
if s==5 then P.gameEnv.bone=true end
|
||||||
|
showText(P,text.stage[s],"fly",80,-120)
|
||||||
|
SFX("reach")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
P.cstat.point=t
|
||||||
|
if t%100==99 then SFX("blip_1")end
|
||||||
|
::L::
|
||||||
end,
|
end,
|
||||||
marathon_reach_ultimate=function()
|
master_reach_ultimate=function()
|
||||||
if P.cstat.event==5 then
|
local t=P.cstat.point
|
||||||
P.cstat.row=250
|
if t%100==99 and #P.clearing==0 then goto L end
|
||||||
Event.gameover.win()
|
t=t+clearPoint[#P.clearing]
|
||||||
else
|
if int(t*.01)>P.cstat.event then
|
||||||
local t=P.cstat.event+1
|
P.cstat.event=P.cstat.event+1
|
||||||
if t==1 then t=2 end
|
if P.cstat.event==5 then
|
||||||
P.gameEnv.target=50*t
|
P.cstat.event=4
|
||||||
P.cstat.event=t
|
P.cstat.point=500
|
||||||
P.gameEnv.lock=death_lock[t]
|
Event_gameover.win()
|
||||||
P.gameEnv.wait=death_wait[t]
|
goto L
|
||||||
P.gameEnv.fall=death_fall[t]
|
else
|
||||||
if t==4 then P.gameEnv.bone=true end
|
local s=P.cstat.event+1
|
||||||
showText(P,text.stage[t],"fly",80,-120)
|
P.gameEnv.lock=death_lock[s]
|
||||||
SFX("reach")
|
P.gameEnv.wait=death_wait[s]
|
||||||
|
P.gameEnv.fall=death_fall[s]
|
||||||
|
P.gameEnv.das=int(7.3-s*.4)
|
||||||
|
if s==4 then P.gameEnv.bone=true end
|
||||||
|
showText(P,text.stage[s],"fly",80,-120)
|
||||||
|
SFX("reach")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
P.cstat.point=t
|
||||||
|
if t%100==99 then SFX("blip_1")end
|
||||||
|
::L::
|
||||||
end,
|
end,
|
||||||
classic_reach=function()
|
classic_reach=function()
|
||||||
P.gameEnv.target=P.gameEnv.target+10
|
P.gameEnv.target=P.gameEnv.target+10
|
||||||
@@ -245,7 +163,7 @@ Event={
|
|||||||
end,
|
end,
|
||||||
tsd_reach=function()
|
tsd_reach=function()
|
||||||
if P.lastClear~=52 then
|
if P.lastClear~=52 then
|
||||||
Event.gameover.lose()
|
Event_gameover.lose()
|
||||||
elseif #P.clearing>0 then
|
elseif #P.clearing>0 then
|
||||||
P.cstat.event=P.cstat.event+1
|
P.cstat.event=P.cstat.event+1
|
||||||
if #P.field>11 and P.cstat.event%5~=1 then
|
if #P.field>11 and P.cstat.event%5~=1 then
|
||||||
@@ -255,12 +173,12 @@ Event={
|
|||||||
end,
|
end,
|
||||||
tech_reach=function()
|
tech_reach=function()
|
||||||
if #P.clearing>0 and P.lastClear<10 then
|
if #P.clearing>0 and P.lastClear<10 then
|
||||||
Event.gameover.lose()
|
Event_gameover.lose()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
tech_reach_hard=function()
|
tech_reach_hard=function()
|
||||||
if #P.clearing>0 and P.lastClear<10 or P.lastClear==74 then
|
if #P.clearing>0 and P.lastClear<10 or P.lastClear==74 then
|
||||||
Event.gameover.lose()
|
Event_gameover.lose()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
newPC=function()
|
newPC=function()
|
||||||
@@ -268,7 +186,7 @@ Event={
|
|||||||
if P.cstat.piece%4==0 then
|
if P.cstat.piece%4==0 then
|
||||||
if #P.field==#P.clearing then
|
if #P.field==#P.clearing then
|
||||||
P.counter=P.cstat.piece==0 and 20 or 0
|
P.counter=P.cstat.piece==0 and 20 or 0
|
||||||
ins(P.task,Event.task.PC)
|
newTask(Event_task.PC,P)
|
||||||
if curMode.lv==2 then
|
if curMode.lv==2 then
|
||||||
local s=P.cstat.pc*.5
|
local s=P.cstat.pc*.5
|
||||||
if int(s)==s and s>0 then
|
if int(s)==s and s>0 then
|
||||||
@@ -283,206 +201,321 @@ Event={
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Event.gameover.lose()
|
Event_gameover.lose()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
task={
|
}
|
||||||
win=function()
|
Event_gameover={
|
||||||
P.endCounter=P.endCounter+1
|
win=function()
|
||||||
if P.endCounter>80 then
|
local P=players.alive[1]
|
||||||
if P.gameEnv.visible=="show"then
|
P.alive=false
|
||||||
for i=1,#P.field do
|
P.control=false
|
||||||
for j=1,10 do
|
P.timing=false
|
||||||
if P.visTime[i][j]>0 then
|
P.waiting=1e99
|
||||||
P.visTime[i][j]=P.visTime[i][j]-1
|
P.b2b=0
|
||||||
end
|
clearTask(P)
|
||||||
end
|
if modeEnv.royaleMode then
|
||||||
|
P.rank=1
|
||||||
|
P.result="WIN"
|
||||||
|
showText(P,1,"appear",60,120,nil,true)
|
||||||
|
changeAtk(P)
|
||||||
|
end
|
||||||
|
for i=1,#P.atkBuffer do
|
||||||
|
P.atkBuffer[i].sent=true
|
||||||
|
P.atkBuffer[i].time=0
|
||||||
|
end
|
||||||
|
for i=1,#P.field do
|
||||||
|
for j=1,10 do
|
||||||
|
P.visTime[i][j]=min(P.visTime[i][j],20)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
showText(P,text.win,"beat",90,nil,nil,true)
|
||||||
|
if P.id==1 and players[2]and players[2].ai then SFX("win")BGM()end
|
||||||
|
newTask(Event_task.win,P)
|
||||||
|
end,
|
||||||
|
lose=function()
|
||||||
|
P.alive=false
|
||||||
|
P.control=false
|
||||||
|
P.timing=false
|
||||||
|
P.waiting=1e99
|
||||||
|
P.b2b=0
|
||||||
|
clearTask(P)
|
||||||
|
for i=1,#players.alive do
|
||||||
|
if players.alive[i]==P then
|
||||||
|
rem(players.alive,i)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if modeEnv.royaleMode then
|
||||||
|
changeAtk(P)
|
||||||
|
P.result="K.O."
|
||||||
|
P.rank=#players.alive+1
|
||||||
|
showText(P,P.rank,"appear",60,120,nil,true)
|
||||||
|
P.strength=0
|
||||||
|
local A,i=P,0
|
||||||
|
::L::
|
||||||
|
A,i=A.lastRecv,i+1
|
||||||
|
if A and not A.alive and A~=P and i<3 then goto L end
|
||||||
|
if A and A~=P then
|
||||||
|
if P.id==1 or A.id==1 then
|
||||||
|
P.killMark=A.id==1
|
||||||
|
end
|
||||||
|
A.ko,A.badge=A.ko+1,A.badge+P.badge+1
|
||||||
|
for i=A.strength+1,4 do
|
||||||
|
if A.badge>=modeEnv.royalePowerup[i]then
|
||||||
|
A.strength=i
|
||||||
end
|
end
|
||||||
if P.endCounter==100 then
|
end
|
||||||
for i=1,#P.field do
|
P.lastRecv=A
|
||||||
removeRow(P.field)
|
if P.id==1 or A.id==1 then
|
||||||
removeRow(P.visTime)
|
newTask(Event_task.throwBadge,nil,{P,max(3,P.badge)*4})
|
||||||
end
|
end
|
||||||
return true
|
freshMostBadge()
|
||||||
end
|
else
|
||||||
elseif P.endCounter==100 then
|
P.badge=-1
|
||||||
return true
|
end
|
||||||
|
freshMostDangerous()
|
||||||
|
for i=1,#players.alive do
|
||||||
|
if players.alive[i].atking==P then
|
||||||
|
freshTarget(players.alive[i])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
if #players.alive==modeEnv.royaleRemain[gameStage]then
|
||||||
lose=function()
|
royaleLevelup()
|
||||||
P.endCounter=P.endCounter+1
|
|
||||||
if P.endCounter>80 then
|
|
||||||
if P.gameEnv.visible=="show"then
|
|
||||||
for i=1,#P.field do
|
|
||||||
for j=1,10 do
|
|
||||||
if P.visTime[i][j]>0 then
|
|
||||||
P.visTime[i][j]=P.visTime[i][j]-1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if P.endCounter==100 then
|
|
||||||
for i=1,#P.field do
|
|
||||||
removeRow(P.field)
|
|
||||||
removeRow(P.visTime)
|
|
||||||
end
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
elseif P.endCounter==100 then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end,
|
end
|
||||||
throwBadge=function()
|
for i=1,#P.atkBuffer do
|
||||||
if P.badge%2==0 then
|
P.atkBuffer[i].sent=true
|
||||||
throwBadge(P,P.lastRecv)
|
P.atkBuffer[i].time=0
|
||||||
if P.badge%16==0 then
|
end
|
||||||
sysSFX("collect")
|
for i=1,#P.field do
|
||||||
end
|
for j=1,10 do
|
||||||
|
P.visTime[i][j]=min(P.visTime[i][j],20)
|
||||||
end
|
end
|
||||||
P.badge=P.badge-1
|
end
|
||||||
if P.badge<=0 then return true end
|
showText(P,text.lose,"appear",90,nil,nil,true)
|
||||||
end,
|
if P.id==1 then
|
||||||
dig_normal=function()
|
SFX("fail")
|
||||||
local P=players[1]
|
if modeEnv.royaleMode then
|
||||||
P.counter=P.counter+1
|
BGM("sores")
|
||||||
if #P.clearing==0 and P.counter>=max(90,180-2*P.cstat.event)then
|
|
||||||
ins(P.field,1,getNewRow(10))
|
|
||||||
ins(P.visTime,1,getNewRow(1e99))
|
|
||||||
P.field[1][rnd(10)]=0
|
|
||||||
P.fieldBeneath=P.fieldBeneath+30
|
|
||||||
P.curY,P.y_img=P.curY+1,P.y_img+1
|
|
||||||
P.counter=0
|
|
||||||
P.cstat.event=P.cstat.event+1
|
|
||||||
end
|
end
|
||||||
end,
|
end
|
||||||
dig_lunatic=function()
|
newTask(Event_task.lose,P)
|
||||||
local P=players[1]
|
if #players.alive==1 then
|
||||||
P.counter=P.counter+1
|
local t=P
|
||||||
if #P.clearing==0 and P.counter>=max(45,80-.4*P.cstat.event)then
|
P=players.alive[1]
|
||||||
ins(P.field,1,getNewRow(11+P.cstat.event%3))
|
Event_gameover.win()
|
||||||
ins(P.visTime,1,getNewRow(1e99))
|
P=t
|
||||||
P.field[1][rnd(10)]=0
|
end
|
||||||
P.fieldBeneath=P.fieldBeneath+30
|
end,
|
||||||
P.curY,P.y_img=P.curY+1,P.y_img+1
|
}
|
||||||
P.counter=0
|
Event_task={
|
||||||
P.cstat.event=P.cstat.event+1
|
win=function(P)
|
||||||
end
|
P.endCounter=P.endCounter+1
|
||||||
end,
|
if P.endCounter>80 then
|
||||||
survivor_easy=function()
|
if P.gameEnv.visible=="show"then
|
||||||
local P=players[1]
|
for i=1,#P.field do
|
||||||
P.counter=P.counter+1
|
|
||||||
if P.counter==max(60,180-2*P.cstat.event)then
|
|
||||||
ins(P.atkBuffer,{rnd(10),amount=1,countdown=30,cd0=30,time=0,sent=false,lv=1})
|
|
||||||
P.counter=0
|
|
||||||
if P.cstat.event==60 then showText(P,text.maxspeed,"appear",80,-140)end
|
|
||||||
P.cstat.event=P.cstat.event+1
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
survivor_normal=function()
|
|
||||||
local P=players[1]
|
|
||||||
P.counter=P.counter+1
|
|
||||||
if P.counter==max(60,180-2*P.cstat.event)then
|
|
||||||
local d=P.cstat.event+1
|
|
||||||
if d%4==0 then ins (P.atkBuffer,{rnd(10),amount=1,countdown=60,cd0=60,time=0,sent=false,lv=1})
|
|
||||||
elseif d%4==1 then ins(P.atkBuffer,{rnd(10),amount=2,countdown=70,cd0=70,time=0,sent=false,lv=1})
|
|
||||||
elseif d%4==2 then ins(P.atkBuffer,{rnd(10),amount=3,countdown=80,cd0=80,time=0,sent=false,lv=2})
|
|
||||||
elseif d%4==3 then ins(P.atkBuffer,{rnd(10),amount=4,countdown=90,cd0=90,time=0,sent=false,lv=3})
|
|
||||||
end
|
|
||||||
P.counter=0
|
|
||||||
if P.cstat.event==60 then showText(P,text.maxspeed,"appear",80,-140)end
|
|
||||||
P.cstat.event=P.cstat.event+1
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
survivor_hard=function()
|
|
||||||
local P=players[1]
|
|
||||||
P.counter=P.counter+1
|
|
||||||
if P.counter==max(60,180-2*P.cstat.event)then
|
|
||||||
if P.cstat.event%3<2 then
|
|
||||||
ins(P.atkBuffer,{rnd(10),amount=1,countdown=0,cd0=0,time=0,sent=false,lv=1})
|
|
||||||
else
|
|
||||||
ins(P.atkBuffer,{rnd(10),amount=3,countdown=60,cd0=60,time=0,sent=false,lv=2})
|
|
||||||
end
|
|
||||||
P.counter=0
|
|
||||||
if P.cstat.event==45 then showText(P,text.maxspeed,"appear",80,-140)end
|
|
||||||
P.cstat.event=P.cstat.event+1
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
survivor_lunatic=function()
|
|
||||||
local P=players[1]
|
|
||||||
P.counter=P.counter+1
|
|
||||||
if P.counter==max(90,150-P.cstat.event)then
|
|
||||||
local t=max(60,90-P.cstat.event)
|
|
||||||
ins(P.atkBuffer,{rnd(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3})
|
|
||||||
P.counter=0
|
|
||||||
if P.cstat.event==30 then showText(P,text.maxspeed,"appear",80,-140)end
|
|
||||||
P.cstat.event=P.cstat.event+1
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
PC=function()
|
|
||||||
local P=players[1]
|
|
||||||
P.counter=P.counter+1
|
|
||||||
if P.counter==21 then
|
|
||||||
local t=P.cstat.pc%2
|
|
||||||
for i=1,4 do
|
|
||||||
local r=getNewRow()
|
|
||||||
for j=1,10 do
|
for j=1,10 do
|
||||||
r[j]=PCbase[4*t+i][j]
|
if P.visTime[i][j]>0 then
|
||||||
|
P.visTime[i][j]=P.visTime[i][j]-1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
ins(P.field,1,r)
|
|
||||||
ins(P.visTime,1,getNewRow(P.showTime))
|
|
||||||
end
|
end
|
||||||
P.fieldBeneath=P.fieldBeneath+120
|
if P.endCounter==100 then
|
||||||
-- P.curY=P.curY+4
|
for i=1,#P.field do
|
||||||
P.y_img=P.y_img+4
|
removeRow(P.field)
|
||||||
freshgho()
|
removeRow(P.visTime)
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
elseif P.endCounter==100 then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end,
|
end
|
||||||
},
|
end,
|
||||||
|
lose=function(P)
|
||||||
|
P.endCounter=P.endCounter+1
|
||||||
|
if P.endCounter>80 then
|
||||||
|
if P.gameEnv.visible=="show"then
|
||||||
|
for i=1,#P.field do
|
||||||
|
for j=1,10 do
|
||||||
|
if P.visTime[i][j]>0 then
|
||||||
|
P.visTime[i][j]=P.visTime[i][j]-1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if P.endCounter==100 then
|
||||||
|
for i=1,#P.field do
|
||||||
|
removeRow(P.field)
|
||||||
|
removeRow(P.visTime)
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
elseif P.endCounter==100 then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
throwBadge=function(P,data)
|
||||||
|
data[2]=data[2]-1
|
||||||
|
if data[2]%4==0 then
|
||||||
|
throwBadge(data[1],data[1].lastRecv)
|
||||||
|
if data[2]%8==0 then
|
||||||
|
sysSFX("collect")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if data[2]<=0 then return true end
|
||||||
|
end,
|
||||||
|
dig_normal=function(P)
|
||||||
|
if not P.control then return end
|
||||||
|
P.counter=P.counter+1
|
||||||
|
if #P.clearing==0 and P.counter>=max(90,180-2*P.cstat.event)then
|
||||||
|
ins(P.field,1,getNewRow(10))
|
||||||
|
ins(P.visTime,1,getNewRow(1e99))
|
||||||
|
P.field[1][rnd(10)]=0
|
||||||
|
P.fieldBeneath=P.fieldBeneath+30
|
||||||
|
P.curY,P.y_img=P.curY+1,P.y_img+1
|
||||||
|
P.counter=0
|
||||||
|
P.cstat.event=P.cstat.event+1
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
dig_lunatic=function(P)
|
||||||
|
if not P.control then return end
|
||||||
|
P.counter=P.counter+1
|
||||||
|
if #P.clearing==0 and P.counter>=max(45,80-.4*P.cstat.event)then
|
||||||
|
ins(P.field,1,getNewRow(11+P.cstat.event%3))
|
||||||
|
ins(P.visTime,1,getNewRow(1e99))
|
||||||
|
P.field[1][rnd(10)]=0
|
||||||
|
P.fieldBeneath=P.fieldBeneath+30
|
||||||
|
P.curY,P.y_img=P.curY+1,P.y_img+1
|
||||||
|
P.counter=0
|
||||||
|
P.cstat.event=P.cstat.event+1
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
survivor_easy=function(P)
|
||||||
|
if not P.control then return end
|
||||||
|
P.counter=P.counter+1
|
||||||
|
if P.counter==max(60,180-2*P.cstat.event)then
|
||||||
|
ins(P.atkBuffer,{rnd(10),amount=1,countdown=30,cd0=30,time=0,sent=false,lv=1})
|
||||||
|
P.counter=0
|
||||||
|
if P.cstat.event==60 then showText(P,text.maxspeed,"appear",80,-140)end
|
||||||
|
P.cstat.event=P.cstat.event+1
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
survivor_normal=function(P)
|
||||||
|
if not P.control then return end
|
||||||
|
P.counter=P.counter+1
|
||||||
|
if P.counter==max(60,180-2*P.cstat.event)then
|
||||||
|
local d=P.cstat.event+1
|
||||||
|
if d%4==0 then ins (P.atkBuffer,{rnd(10),amount=1,countdown=60,cd0=60,time=0,sent=false,lv=1})
|
||||||
|
elseif d%4==1 then ins(P.atkBuffer,{rnd(10),amount=2,countdown=70,cd0=70,time=0,sent=false,lv=1})
|
||||||
|
elseif d%4==2 then ins(P.atkBuffer,{rnd(10),amount=3,countdown=80,cd0=80,time=0,sent=false,lv=2})
|
||||||
|
elseif d%4==3 then ins(P.atkBuffer,{rnd(10),amount=4,countdown=90,cd0=90,time=0,sent=false,lv=3})
|
||||||
|
end
|
||||||
|
P.counter=0
|
||||||
|
if P.cstat.event==60 then showText(P,text.maxspeed,"appear",80,-140)end
|
||||||
|
P.cstat.event=P.cstat.event+1
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
survivor_hard=function(P)
|
||||||
|
if not P.control then return end
|
||||||
|
P.counter=P.counter+1
|
||||||
|
if P.counter==max(60,180-2*P.cstat.event)then
|
||||||
|
if P.cstat.event%3<2 then
|
||||||
|
ins(P.atkBuffer,{rnd(10),amount=1,countdown=0,cd0=0,time=0,sent=false,lv=1})
|
||||||
|
else
|
||||||
|
ins(P.atkBuffer,{rnd(10),amount=3,countdown=60,cd0=60,time=0,sent=false,lv=2})
|
||||||
|
end
|
||||||
|
P.counter=0
|
||||||
|
if P.cstat.event==45 then showText(P,text.maxspeed,"appear",80,-140)end
|
||||||
|
P.cstat.event=P.cstat.event+1
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
survivor_lunatic=function(P)
|
||||||
|
if not P.control then return end
|
||||||
|
P.counter=P.counter+1
|
||||||
|
if P.counter==max(90,150-P.cstat.event)then
|
||||||
|
local t=max(60,90-P.cstat.event)
|
||||||
|
ins(P.atkBuffer,{rnd(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3})
|
||||||
|
P.counter=0
|
||||||
|
if P.cstat.event==30 then showText(P,text.maxspeed,"appear",80,-140)end
|
||||||
|
P.cstat.event=P.cstat.event+1
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
PC=function(P)
|
||||||
|
P.counter=P.counter+1
|
||||||
|
if P.counter==21 then
|
||||||
|
local t=P.cstat.pc%2
|
||||||
|
for i=1,4 do
|
||||||
|
local r=getNewRow()
|
||||||
|
for j=1,10 do
|
||||||
|
r[j]=PCbase[4*t+i][j]
|
||||||
|
end
|
||||||
|
ins(P.field,1,r)
|
||||||
|
ins(P.visTime,1,getNewRow(P.showTime))
|
||||||
|
end
|
||||||
|
P.fieldBeneath=P.fieldBeneath+120
|
||||||
|
-- P.curY=P.curY+4
|
||||||
|
P.y_img=P.y_img+4
|
||||||
|
freshgho()
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
|
||||||
|
bgmFadeOut=function(_,id)
|
||||||
|
bgm[id]:setVolume(max(bgm[id]:getVolume()-.03,0))
|
||||||
|
if bgm[id]:getVolume()==0 then
|
||||||
|
bgm[id]:stop()
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
bgmFadeIn=function(_,id)
|
||||||
|
bgm[id]:setVolume(min(bgm[id]:getVolume()+.03,1))
|
||||||
|
if bgm[id]:getVolume()==1 then return true end
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
defaultModeEnv={
|
defaultModeEnv={
|
||||||
sprint={
|
sprint={
|
||||||
{
|
{
|
||||||
drop=60,
|
drop=60,
|
||||||
target=10,
|
target=10,
|
||||||
reach=Event.gameover.win,
|
reach=Event_gameover.win,
|
||||||
bg="strap",
|
bg="strap",
|
||||||
bgm="race",
|
bgm="race",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
drop=60,
|
drop=60,
|
||||||
target=20,
|
target=20,
|
||||||
reach=Event.gameover.win,
|
reach=Event_gameover.win,
|
||||||
bg="strap",
|
bg="strap",
|
||||||
bgm="race",
|
bgm="race",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
drop=60,
|
drop=60,
|
||||||
target=40,
|
target=40,
|
||||||
reach=Event.gameover.win,
|
reach=Event_gameover.win,
|
||||||
bg="strap",
|
bg="strap",
|
||||||
bgm="race",
|
bgm="race",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
drop=60,
|
drop=60,
|
||||||
target=100,
|
target=100,
|
||||||
reach=Event.gameover.win,
|
reach=Event_gameover.win,
|
||||||
bg="strap",
|
bg="strap",
|
||||||
bgm="race",
|
bgm="race",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
drop=60,
|
drop=60,
|
||||||
target=400,
|
target=400,
|
||||||
reach=Event.gameover.win,
|
reach=Event_gameover.win,
|
||||||
bg="strap",
|
bg="strap",
|
||||||
bgm="push",
|
bgm="push",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
drop=60,
|
drop=60,
|
||||||
target=1000,
|
target=1000,
|
||||||
reach=Event.gameover.win,
|
reach=Event_gameover.win,
|
||||||
bg="strap",
|
bg="strap",
|
||||||
bgm="push",
|
bgm="push",
|
||||||
},
|
},
|
||||||
@@ -513,28 +546,30 @@ defaultModeEnv={
|
|||||||
bg="strap",
|
bg="strap",
|
||||||
bgm="race",
|
bgm="race",
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
master={
|
||||||
{
|
{
|
||||||
_20G=true,
|
_20G=true,
|
||||||
drop=0,
|
drop=0,
|
||||||
lock=rush_lock[1],
|
lock=rush_lock[1],
|
||||||
wait=rush_wait[1],
|
wait=rush_wait[1],
|
||||||
fall=rush_fall[1],
|
fall=rush_fall[1],
|
||||||
target=50,
|
target=0,
|
||||||
reach=Event.marathon_reach_lunatic,
|
reach=Event.master_reach_lunatic,
|
||||||
arr=2,
|
das=9,arr=3,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
bg="game2",
|
bg="game2",
|
||||||
bgm="secret8th",
|
bgm="secret8th",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
_20G=true,
|
_20G=true,
|
||||||
drop=0,
|
drop=0,
|
||||||
lock=death_lock[1],
|
lock=death_lock[1],
|
||||||
wait=death_wait[1],
|
wait=death_wait[1],
|
||||||
fall=death_fall[1],
|
fall=death_fall[1],
|
||||||
target=50,
|
target=0,
|
||||||
reach=Event.marathon_reach_ultimate,
|
reach=Event.master_reach_ultimate,
|
||||||
arr=1,
|
das=6,arr=1,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
bg="game2",
|
bg="game2",
|
||||||
bgm="secret7th",
|
bgm="secret7th",
|
||||||
@@ -562,7 +597,7 @@ defaultModeEnv={
|
|||||||
lock=1e99,
|
lock=1e99,
|
||||||
oncehold=false,
|
oncehold=false,
|
||||||
target=200,
|
target=200,
|
||||||
reach=Event.gameover.win,
|
reach=Event_gameover.win,
|
||||||
bg="strap",
|
bg="strap",
|
||||||
bgm="infinite",
|
bgm="infinite",
|
||||||
},
|
},
|
||||||
@@ -791,7 +826,7 @@ defaultModeEnv={
|
|||||||
drop=300,
|
drop=300,
|
||||||
lock=1e99,
|
lock=1e99,
|
||||||
target=100,
|
target=100,
|
||||||
reach=Event.gameover.win,
|
reach=Event_gameover.win,
|
||||||
ospin=false,
|
ospin=false,
|
||||||
bg="rgb",
|
bg="rgb",
|
||||||
bgm="newera",
|
bgm="newera",
|
||||||
@@ -801,7 +836,7 @@ defaultModeEnv={
|
|||||||
lock=120,
|
lock=120,
|
||||||
fall=10,
|
fall=10,
|
||||||
target=100,
|
target=100,
|
||||||
reach=Event.gameover.win,
|
reach=Event_gameover.win,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
ospin=false,
|
ospin=false,
|
||||||
bg="rgb",
|
bg="rgb",
|
||||||
@@ -812,7 +847,7 @@ defaultModeEnv={
|
|||||||
lock=60,
|
lock=60,
|
||||||
fall=20,
|
fall=20,
|
||||||
target=100,
|
target=100,
|
||||||
reach=Event.gameover.win,
|
reach=Event_gameover.win,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
ospin=false,
|
ospin=false,
|
||||||
bg="rgb",
|
bg="rgb",
|
||||||
@@ -828,7 +863,7 @@ defaultModeEnv={
|
|||||||
pushSpeed=2,
|
pushSpeed=2,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
bg="game3",
|
bg="game3",
|
||||||
bgm="race",
|
bgm="rockblock",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
techmino99={
|
techmino99={
|
||||||
@@ -840,7 +875,7 @@ defaultModeEnv={
|
|||||||
pushSpeed=2,
|
pushSpeed=2,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
bg="game3",
|
bg="game3",
|
||||||
bgm="race",
|
bgm="rockblock",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
drought={
|
drought={
|
||||||
@@ -849,7 +884,7 @@ defaultModeEnv={
|
|||||||
lock=60,
|
lock=60,
|
||||||
sequence="drought1",
|
sequence="drought1",
|
||||||
target=100,
|
target=100,
|
||||||
reach=Event.gameover.win,
|
reach=Event_gameover.win,
|
||||||
ospin=false,
|
ospin=false,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
bg="glow",
|
bg="glow",
|
||||||
@@ -860,7 +895,7 @@ defaultModeEnv={
|
|||||||
lock=60,
|
lock=60,
|
||||||
sequence="drought2",
|
sequence="drought2",
|
||||||
target=100,
|
target=100,
|
||||||
reach=Event.gameover.win,
|
reach=Event_gameover.win,
|
||||||
ospin=false,
|
ospin=false,
|
||||||
freshLimit=15,
|
freshLimit=15,
|
||||||
bg="glow",
|
bg="glow",
|
||||||
@@ -878,7 +913,7 @@ defaultModeEnv={
|
|||||||
{
|
{
|
||||||
bg="none",
|
bg="none",
|
||||||
bgm="reason",
|
bgm="reason",
|
||||||
reach=Event.gameover.win,
|
reach=Event_gameover.win,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
79
gamefunc.lua
79
gamefunc.lua
@@ -84,7 +84,11 @@ function createPlayer(id,x,y,size,AIspeed,data)
|
|||||||
P.control=false
|
P.control=false
|
||||||
P.timing=false
|
P.timing=false
|
||||||
P.time=0
|
P.time=0
|
||||||
P.cstat={key=0,piece=0,row=0,atk=0,techrash=0,pc=0,event=0}--Current gamestat
|
P.cstat={
|
||||||
|
key=0,piece=0,row=0,atk=0,
|
||||||
|
techrash=0,pc=0,
|
||||||
|
point=0,event=0
|
||||||
|
}--Current gamestat
|
||||||
P.keyTime={}for i=1,10 do P.keyTime[i]=-1e5 end P.keySpeed=0
|
P.keyTime={}for i=1,10 do P.keyTime[i]=-1e5 end P.keySpeed=0
|
||||||
P.dropTime={}for i=1,10 do P.dropTime[i]=-1e5 end P.dropSpeed=0
|
P.dropTime={}for i=1,10 do P.dropTime[i]=-1e5 end P.dropSpeed=0
|
||||||
|
|
||||||
@@ -160,8 +164,7 @@ function createPlayer(id,x,y,size,AIspeed,data)
|
|||||||
|
|
||||||
P.endCounter=0
|
P.endCounter=0
|
||||||
P.counter=0
|
P.counter=0
|
||||||
P.result=nil--string,"win"/"lose"
|
P.result=nil--string:win/lose
|
||||||
P.task={}
|
|
||||||
P.bonus={}
|
P.bonus={}
|
||||||
end
|
end
|
||||||
function showText(P,text,type,font,dy,spd,inf)
|
function showText(P,text,type,font,dy,spd,inf)
|
||||||
@@ -254,6 +257,20 @@ function freshTarget(P)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
function changeAtkMode(m)
|
||||||
|
if P.atkMode==m then goto L end
|
||||||
|
P.atkMode=m
|
||||||
|
if m==1 then
|
||||||
|
changeAtk(P,randomTarget(P))
|
||||||
|
elseif m==2 then
|
||||||
|
freshTarget(P)
|
||||||
|
elseif m==3 then
|
||||||
|
freshTarget(P)
|
||||||
|
elseif m==4 then
|
||||||
|
changeAtk(P)
|
||||||
|
end
|
||||||
|
::L::
|
||||||
|
end
|
||||||
function changeAtk(P,R)
|
function changeAtk(P,R)
|
||||||
if P.atking then
|
if P.atking then
|
||||||
local K=P.atking.atker
|
local K=P.atking.atker
|
||||||
@@ -311,7 +328,7 @@ function royaleLevelup()
|
|||||||
elseif gameStage==3 then
|
elseif gameStage==3 then
|
||||||
spd=15
|
spd=15
|
||||||
garbageSpeed=.6
|
garbageSpeed=.6
|
||||||
BGM("cruelty")
|
if players[1].alive then BGM("cruelty")end
|
||||||
elseif gameStage==4 then
|
elseif gameStage==4 then
|
||||||
spd=10
|
spd=10
|
||||||
pushSpeed=3
|
pushSpeed=3
|
||||||
@@ -320,7 +337,7 @@ function royaleLevelup()
|
|||||||
garbageSpeed=1
|
garbageSpeed=1
|
||||||
elseif gameStage==6 then
|
elseif gameStage==6 then
|
||||||
spd=3
|
spd=3
|
||||||
BGM("final")
|
if players[1].alive then BGM("final")end
|
||||||
end
|
end
|
||||||
for i=1,#players.alive do
|
for i=1,#players.alive do
|
||||||
local P=players.alive[i]
|
local P=players.alive[i]
|
||||||
@@ -415,7 +432,7 @@ function resetblock()
|
|||||||
P.curX=P.curX+sgn(P.moving)
|
P.curX=P.curX+sgn(P.moving)
|
||||||
end
|
end
|
||||||
|
|
||||||
if ifoverlap(P.curBlock,P.curX,P.curY)then lock()Event.gameover.lose()end
|
if ifoverlap(P.curBlock,P.curX,P.curY)then lock()Event_gameover.lose()end
|
||||||
freshgho()
|
freshgho()
|
||||||
if P.keyPressing[6]then act.hardDrop()P.keyPressing[6]=false end
|
if P.keyPressing[6]then act.hardDrop()P.keyPressing[6]=false end
|
||||||
end
|
end
|
||||||
@@ -432,7 +449,9 @@ function pressKey(i,p)
|
|||||||
if P.control and P.waiting<=0 then
|
if P.control and P.waiting<=0 then
|
||||||
act[actName[i]]()
|
act[actName[i]]()
|
||||||
if i>2 and i<7 then P.keyPressing[i]=false end
|
if i>2 and i<7 then P.keyPressing[i]=false end
|
||||||
elseif P.keyPressing[9]then
|
elseif i==9 and not setting.swap then
|
||||||
|
P.atkMode=P.atkMode<3 and P.atkMode+2 or 5-P.atkMode
|
||||||
|
elseif P.keyPressing[9]and setting.swap then
|
||||||
if i==1 then
|
if i==1 then
|
||||||
P.atkMode=1
|
P.atkMode=1
|
||||||
changeAtk(P,randomTarget(P))
|
changeAtk(P,randomTarget(P))
|
||||||
@@ -556,7 +575,7 @@ function hold(ifpre)
|
|||||||
|
|
||||||
freshgho()
|
freshgho()
|
||||||
P.dropDelay,P.lockDelay,P.freshTime=P.gameEnv.drop,P.gameEnv.lock,0
|
P.dropDelay,P.lockDelay,P.freshTime=P.gameEnv.drop,P.gameEnv.lock,0
|
||||||
if ifoverlap(P.curBlock,P.curX,P.curY)then lock()Event.gameover.lose()end
|
if ifoverlap(P.curBlock,P.curX,P.curY)then lock()Event_gameover.lose()end
|
||||||
|
|
||||||
SFX(ifpre and"prehold"or"hold")
|
SFX(ifpre and"prehold"or"hold")
|
||||||
if P.id==1 then
|
if P.id==1 then
|
||||||
@@ -612,7 +631,6 @@ function drop()
|
|||||||
csend=6
|
csend=6
|
||||||
sendTime=100
|
sendTime=100
|
||||||
exblock=exblock+1
|
exblock=exblock+1
|
||||||
P.b2b=P.b2b-20
|
|
||||||
elseif P.b2b>=40 then
|
elseif P.b2b>=40 then
|
||||||
showText(P,text.techrashB2B,"drive",80,-30)
|
showText(P,text.techrashB2B,"drive",80,-30)
|
||||||
sendTime=80
|
sendTime=80
|
||||||
@@ -653,7 +671,7 @@ function drop()
|
|||||||
end
|
end
|
||||||
SFX(spin_n[cc])
|
SFX(spin_n[cc])
|
||||||
elseif #P.clearing<#P.field then
|
elseif #P.clearing<#P.field then
|
||||||
P.b2b=max(P.b2b-280-cc*40,0)
|
P.b2b=max(P.b2b-250,0)
|
||||||
showText(P,text.clear[cc],"appear",32+cc*3,-30,(8-cc)*.3)
|
showText(P,text.clear[cc],"appear",32+cc*3,-30,(8-cc)*.3)
|
||||||
csend=cc-1
|
csend=cc-1
|
||||||
sendTime=20+csend*20
|
sendTime=20+csend*20
|
||||||
@@ -752,7 +770,7 @@ function drop()
|
|||||||
end
|
end
|
||||||
garbageRelease()
|
garbageRelease()
|
||||||
end
|
end
|
||||||
if id==1 then
|
if P.id==1 then
|
||||||
stat.piece,stat.row=stat.piece+1,stat.row+cc
|
stat.piece,stat.row=stat.piece+1,stat.row+cc
|
||||||
end
|
end
|
||||||
P.cstat.piece,P.cstat.row=P.cstat.piece+1,P.cstat.row+cc
|
P.cstat.piece,P.cstat.row=P.cstat.piece+1,P.cstat.row+cc
|
||||||
@@ -760,6 +778,7 @@ function drop()
|
|||||||
P.gameEnv.reach()
|
P.gameEnv.reach()
|
||||||
end
|
end
|
||||||
P.spinLast=dospin and cc>0
|
P.spinLast=dospin and cc>0
|
||||||
|
SFX("lock")
|
||||||
else
|
else
|
||||||
P.curY=P.curY-1
|
P.curY=P.curY-1
|
||||||
P.spinLast=false
|
P.spinLast=false
|
||||||
@@ -779,11 +798,8 @@ function lock()
|
|||||||
end
|
end
|
||||||
act={
|
act={
|
||||||
moveLeft=function(auto)
|
moveLeft=function(auto)
|
||||||
if P.keyPressing[9]then
|
if P.keyPressing[9]and setting.swap then
|
||||||
if P.atkMode~=1 then
|
changeAtkMode(1)
|
||||||
P.atkMode=1
|
|
||||||
changeAtk(P,randomTarget(P))
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
if not auto then
|
if not auto then
|
||||||
P.moving=-1
|
P.moving=-1
|
||||||
@@ -798,11 +814,8 @@ act={
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
moveRight=function(auto)
|
moveRight=function(auto)
|
||||||
if P.keyPressing[9]then
|
if P.keyPressing[9]and setting.swap then
|
||||||
if P.atkMode~=2 then
|
changeAtkMode(2)
|
||||||
P.atkMode=2
|
|
||||||
freshTarget(P)
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
if not auto then
|
if not auto then
|
||||||
P.moving=1
|
P.moving=1
|
||||||
@@ -820,11 +833,8 @@ act={
|
|||||||
rotLeft=function()spin(3)end,
|
rotLeft=function()spin(3)end,
|
||||||
rotFlip=function()spin(2)end,
|
rotFlip=function()spin(2)end,
|
||||||
hardDrop=function()
|
hardDrop=function()
|
||||||
if P.keyPressing[9]then
|
if P.keyPressing[9]and setting.swap then
|
||||||
if P.atkMode~=3 then
|
changeAtkMode(3)
|
||||||
P.atkMode=3
|
|
||||||
freshTarget(P)
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
if P.waiting<=0 then
|
if P.waiting<=0 then
|
||||||
if P.curY~=P.y_img then
|
if P.curY~=P.y_img then
|
||||||
@@ -838,11 +848,8 @@ act={
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
softDrop=function()
|
softDrop=function()
|
||||||
if P.keyPressing[9]then
|
if P.keyPressing[9]and setting.swap then
|
||||||
if P.atkMode~=4 then
|
changeAtkMode(4)
|
||||||
P.atkMode=4
|
|
||||||
changeAtk(P)
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
if P.curY~=P.y_img then
|
if P.curY~=P.y_img then
|
||||||
P.curY=P.curY-1
|
P.curY=P.curY-1
|
||||||
@@ -852,7 +859,6 @@ act={
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
hold=function()hold()end,
|
hold=function()hold()end,
|
||||||
--Player movements
|
|
||||||
swap=function()
|
swap=function()
|
||||||
if modeEnv.royaleMode then
|
if modeEnv.royaleMode then
|
||||||
for i=1,#P.keyPressing do
|
for i=1,#P.keyPressing do
|
||||||
@@ -860,7 +866,12 @@ act={
|
|||||||
P.keyPressing[i]=false
|
P.keyPressing[i]=false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
P.keyPressing[9]=true
|
if setting.swap then
|
||||||
|
P.keyPressing[9]=true
|
||||||
|
else
|
||||||
|
changeAtkMode(P.atkMode<3 and P.atkMode+2 or 5-P.atkMode)
|
||||||
|
P.swappingAtkMode=30
|
||||||
|
end
|
||||||
else
|
else
|
||||||
P.keyPressing[9]=false
|
P.keyPressing[9]=false
|
||||||
end
|
end
|
||||||
@@ -904,6 +915,6 @@ act={
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
quit=function()Event.gameover.lose()end,
|
quit=function()Event_gameover.lose()end,
|
||||||
--System movements
|
--System movements
|
||||||
}
|
}
|
||||||
112
language/chi.lua
112
language/chi.lua
@@ -1,7 +1,6 @@
|
|||||||
return{
|
return{
|
||||||
royale_remain=function(n)
|
atkModeName={"随机","徽章","击杀","反击"},
|
||||||
return "剩余 "..n.." 名玩家"
|
royale_remain=function(n)return"剩余 "..n.." 名玩家"end,
|
||||||
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"},
|
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"},
|
||||||
techrash="Techrash",
|
techrash="Techrash",
|
||||||
techrashB2B="Techrash B2B",
|
techrashB2B="Techrash B2B",
|
||||||
@@ -45,7 +44,7 @@ return{
|
|||||||
next=nil,
|
next=nil,
|
||||||
hold={"开","关"},
|
hold={"开","关"},
|
||||||
sequence={"bag7","his4","随机"},
|
sequence={"bag7","his4","随机"},
|
||||||
visible={"可见","半隐形","全隐形"},
|
visible={"可见","半隐","全隐","瞬隐"},
|
||||||
target={10,20,40,100,200,500,1000,"∞"},
|
target={10,20,40,100,200,500,1000,"∞"},
|
||||||
freshLimit={0,8,15,"∞"},
|
freshLimit={0,8,15,"∞"},
|
||||||
opponent={"无电脑",1,2,3,4,5,6,7,8,9,10,11},
|
opponent={"无电脑",1,2,3,4,5,6,7,8,9,10,11},
|
||||||
@@ -58,15 +57,16 @@ return{
|
|||||||
setting2Help="方向键选择/翻页,回车修改,esc返回",
|
setting2Help="方向键选择/翻页,回车修改,esc返回",
|
||||||
|
|
||||||
|
|
||||||
actName={"左移:","右移:","顺时针旋转:","顺时针旋转:","180°旋转","硬降:","软降:","暂存:","切换攻击:","重新开始:","左瞬移:","右瞬移:","软降到底:"},
|
actName={"左移:","右移:","顺时针旋转:","逆时针旋转:","180°旋转","硬降:","软降:","暂存:","切换攻击:","重新开始:","左瞬移:","右瞬移:","软降到底:"},
|
||||||
modeName={
|
modeName={
|
||||||
[0]="自定义",
|
[0]="自定义",
|
||||||
"竞速","马拉松","经典","禅","无尽","单挑","仅TSD","隐形","挖掘","生存","科研",
|
"竞速","马拉松","大师","经典","禅","无尽","单挑","仅TSD","隐形","挖掘","生存","科研",
|
||||||
"全清训练","全清挑战","41人混战","99人混战","干旱","多人",
|
"全清训练","全清挑战","41人混战","99人混战","干旱","多人",
|
||||||
},
|
},
|
||||||
modeInfo={
|
modeInfo={
|
||||||
sprint="挑战世界纪录",
|
sprint="挑战世界纪录",
|
||||||
marathon="尝试坚持到最后",
|
marathon="尝试坚持到最后",
|
||||||
|
master="成为方块大师",
|
||||||
classic="高速经典",
|
classic="高速经典",
|
||||||
zen="无重力消除200行",
|
zen="无重力消除200行",
|
||||||
infinite="科研沙盒",
|
infinite="科研沙盒",
|
||||||
@@ -125,69 +125,71 @@ return{
|
|||||||
group="官方QQ群",
|
group="官方QQ群",
|
||||||
ButtonText={
|
ButtonText={
|
||||||
main={
|
main={
|
||||||
"开始",
|
play="开始",
|
||||||
"设置",
|
setting="设置",
|
||||||
"统计信息",
|
stat="统计信息",
|
||||||
"帮助",
|
help="帮助",
|
||||||
"退出",
|
quit="退出",
|
||||||
},
|
},
|
||||||
mode={
|
mode={
|
||||||
"Λ",
|
up="Λ",
|
||||||
"v",
|
down="v",
|
||||||
"<",
|
left="<",
|
||||||
">",
|
right=">",
|
||||||
"开始",
|
start="开始",
|
||||||
"自定义(C)",
|
custom="自定义(C)",
|
||||||
"返回",
|
back="返回",
|
||||||
},
|
},
|
||||||
custom={
|
custom={
|
||||||
"Λ",
|
up="Λ",
|
||||||
"v",
|
down="v",
|
||||||
"<",
|
left="<",
|
||||||
">",
|
right=">",
|
||||||
"开始",
|
start="开始",
|
||||||
"返回",
|
back="返回",
|
||||||
|
},
|
||||||
|
play={
|
||||||
|
back="返回",
|
||||||
},
|
},
|
||||||
setting={
|
setting={
|
||||||
function()return setting.ghost and"阴影 开"or"阴影 关"end,
|
ghost=function()return setting.ghost and"阴影:开"or"阴影:关"end,
|
||||||
function()return setting.center and"旋转中心 开"or"旋转中心 关"end,
|
center=function()return setting.center and"旋转中心:开"or"旋转中心:关"end,
|
||||||
"-",
|
grid=function()return setting.grid and"网格:开"or"网格:关"end,
|
||||||
"+",
|
swap=function()return setting.swap and"目标选择:组合键"or"目标选择:循环"end,
|
||||||
"-",
|
dasD="-",dasU="+",
|
||||||
"+",
|
arrD="-",arrU="+",
|
||||||
"-",
|
sddasD="-",sddasU="+",
|
||||||
"+",
|
sdarrD="-",sdarrU="+",
|
||||||
"-",
|
sfx=function()return setting.sfx and"音效:开"or"音效:关"end,
|
||||||
"+",
|
bgm=function()return setting.bgm and"音乐:开"or"音乐:关"end,
|
||||||
function()return setting.sfx and"音效 开"or"音效 关"end,
|
vib=function()return "震动强度:"..setting.vib end,
|
||||||
function()return setting.bgm and"音乐 开"or"音乐 关"end,
|
fullscreen=function()return setting.fullscreen and"全屏:开"or"全屏:关"end,
|
||||||
function()return "震动强度:"..setting.vib end,
|
bgblock=function()return setting.bgblock and"背景动画:开"or"背景动画:关"end,
|
||||||
function()return setting.fullscreen and"全屏 开"or"全屏 关"end,
|
frame=function()return"绘制帧:"..setting.frameMul.."%"end,
|
||||||
function()return setting.bgblock and"背景动画 开"or"背景动画 关"end,
|
control="控制设置",
|
||||||
function()return"绘制帧:"..setting.frameMul.."%"end,
|
touch="触摸设置",
|
||||||
"控制设置",
|
lang=function()return langName[setting.lang]end,
|
||||||
"触摸设置",
|
back="保存&返回",
|
||||||
function()return langName[setting.lang]end,
|
|
||||||
"保存&返回",
|
|
||||||
},
|
},
|
||||||
setting2={
|
setting2={
|
||||||
"返回",
|
back="返回",
|
||||||
},
|
},
|
||||||
setting3={
|
setting3={
|
||||||
"返回",
|
back="返回",
|
||||||
function()return setting.virtualkeySwitch and"隐藏虚拟按键"or"显示虚拟按键"end,
|
hide=function()return setting.virtualkeySwitch and"隐藏虚拟按键"or"显示虚拟按键"end,
|
||||||
"默认组合",
|
default="默认组合",
|
||||||
function()return text.snapLevelName[snapLevel]end,
|
snap=function()return text.snapLevelName[snapLevel]end,
|
||||||
function()return percent0to5[setting.virtualkeyAlpha]end,
|
alpha=function()return percent0to5[setting.virtualkeyAlpha]end,
|
||||||
"图标",
|
icon="图标",
|
||||||
"大小",
|
size="大小",
|
||||||
},
|
},
|
||||||
help={
|
help={
|
||||||
"返回",
|
back="返回",
|
||||||
"作者QQ",
|
qq="作者QQ",
|
||||||
},
|
},
|
||||||
stat={
|
stat={
|
||||||
"返回",
|
back="返回",
|
||||||
|
path="打开存储目录",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}--中文→
|
}--中文→
|
||||||
114
language/eng.lua
114
language/eng.lua
@@ -1,7 +1,6 @@
|
|||||||
return{
|
return{
|
||||||
royale_remain=function(n)
|
atkModeName={"Random","Badges","K.O.s","Counters"},
|
||||||
return n.." Players Remain"
|
royale_remain=function(n)return n.." Players Remain"end,
|
||||||
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"},
|
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"},
|
||||||
techrash="Techrash",
|
techrash="Techrash",
|
||||||
techrashB2B="Techrash B2B",
|
techrashB2B="Techrash B2B",
|
||||||
@@ -45,7 +44,7 @@ return{
|
|||||||
next=nil,
|
next=nil,
|
||||||
hold={"on","off"},
|
hold={"on","off"},
|
||||||
sequence={"bag7","his4","random"},
|
sequence={"bag7","his4","random"},
|
||||||
visible={"normal","time","invisible"},
|
visible={"normal","time","invisible","sudden"},
|
||||||
target={10,20,40,100,200,500,1000,"∞"},
|
target={10,20,40,100,200,500,1000,"∞"},
|
||||||
freshLimit={0,8,15,"∞"},
|
freshLimit={0,8,15,"∞"},
|
||||||
opponent={"No CPU",1,2,3,4,5,6,7,8,9,10,11},
|
opponent={"No CPU",1,2,3,4,5,6,7,8,9,10,11},
|
||||||
@@ -61,12 +60,13 @@ return{
|
|||||||
actName={"Move Left:","Move Right:","Rotate Right:","Rotate Left:","Rotate Flip:","Hard Drop:","Soft Drop:","Hold:","Swap:","Restart:","Instant Left:","Instant Right:","Ins Down:"},
|
actName={"Move Left:","Move Right:","Rotate Right:","Rotate Left:","Rotate Flip:","Hard Drop:","Soft Drop:","Hold:","Swap:","Restart:","Instant Left:","Instant Right:","Ins Down:"},
|
||||||
modeName={
|
modeName={
|
||||||
[0]="Custom",
|
[0]="Custom",
|
||||||
"Sprint","Marathon","Classic","Zen","Infinite","1v1","TSD-only","Blind","Dig","Survivor","Tech",
|
"Sprint","Marathon","Master","Classic","Zen","Infinite","1v1","TSD-only","Blind","Dig","Survivor","Tech",
|
||||||
"PC Train","PC Challenge","Techmino41","Techmino99","Drought","Hotseat",
|
"PC Train","PC Challenge","Techmino41","Techmino99","Drought","Hotseat",
|
||||||
},
|
},
|
||||||
modeInfo={
|
modeInfo={
|
||||||
sprint="Speed run",
|
sprint="Speed run",
|
||||||
marathon="Survive and reach target",
|
marathon="Survive and reach target",
|
||||||
|
master="To be Grand Master",
|
||||||
classic="Vintage car drag racing",
|
classic="Vintage car drag racing",
|
||||||
zen="Clear 200 Lines without gravity",
|
zen="Clear 200 Lines without gravity",
|
||||||
infinite="Infinite game,infinite happiness",
|
infinite="Infinite game,infinite happiness",
|
||||||
@@ -125,69 +125,75 @@ return{
|
|||||||
group="Official QQ Group",
|
group="Official QQ Group",
|
||||||
ButtonText={
|
ButtonText={
|
||||||
main={
|
main={
|
||||||
"Play",
|
play="Play",
|
||||||
"Settings",
|
setting="Settings",
|
||||||
"Statistics",
|
stat="Statistics",
|
||||||
"Help",
|
help="Help",
|
||||||
"Quit",
|
quit="Quit",
|
||||||
},
|
},
|
||||||
mode={
|
mode={
|
||||||
"Λ",
|
up="Λ",
|
||||||
"v",
|
down="v",
|
||||||
"<",
|
left="<",
|
||||||
">",
|
right=">",
|
||||||
"Start",
|
start="Start",
|
||||||
"Custom(C)",
|
custom="Custom(C)",
|
||||||
"Back",
|
back="Back",
|
||||||
},
|
},
|
||||||
custom={
|
custom={
|
||||||
"Λ",
|
up="Λ",
|
||||||
"v",
|
down="v",
|
||||||
"<",
|
left="<",
|
||||||
">",
|
right=">",
|
||||||
"Start",
|
start="Start",
|
||||||
"Back",
|
back="Back",
|
||||||
|
},
|
||||||
|
play={
|
||||||
|
back="Back",
|
||||||
},
|
},
|
||||||
setting={
|
setting={
|
||||||
function()return setting.ghost and"Ghost:ON"or"Ghost:OFF"end,
|
ghost=function()return setting.ghost and"Ghost:ON"or"Ghost:OFF"end,
|
||||||
function()return setting.center and"Center:ON"or"Center:OFF"end,
|
center=function()return setting.center and"Center:ON"or"Center:OFF"end,
|
||||||
"-",
|
grid=function()return setting.grid and"Grid:ON"or"Grid:OFF"end,
|
||||||
"+",
|
swap=function()return setting.swap and"Swap:comboKey"or"Swap:loop"end,
|
||||||
"-",
|
dasD="-",
|
||||||
"+",
|
dasU="+",
|
||||||
"-",
|
arrD="-",
|
||||||
"+",
|
arrU="+",
|
||||||
"-",
|
sddasD="-",
|
||||||
"+",
|
sddasU="+",
|
||||||
function()return setting.sfx and"SFX:on"or"SFX:off"end,
|
sdarrD="-",
|
||||||
function()return setting.bgm and"BGM:on"or"BGM:off"end,
|
sdarrU="+",
|
||||||
function()return "Vibrate level:"..setting.vib end,
|
sfx=function()return setting.sfx and"SFX:ON"or"SFX:off"end,
|
||||||
function()return setting.fullscreen and"Fullscreen:on"or"Fullscreen:off"end,
|
bgm=function()return setting.bgm and"BGM:ON"or"BGM:off"end,
|
||||||
function()return setting.bgblock and"BG animation:on"or"BG animation:off"end,
|
vib=function()return "Vibrate level:"..setting.vib end,
|
||||||
function()return"FrameDraw:"..setting.frameMul.."%"end,
|
fullscreen=function()return setting.fullscreen and"Fullscreen:ON"or"Fullscreen:off"end,
|
||||||
"Control settings",
|
bgblock=function()return setting.bgblock and"BG animation:ON"or"BG animation:off"end,
|
||||||
"Touch settings",
|
frame=function()return"FrameDraw:"..setting.frameMul.."%"end,
|
||||||
function()return langName[setting.lang]end,
|
control="Control settings",
|
||||||
"Save&Back",
|
touch="Touch settings",
|
||||||
|
lang=function()return langName[setting.lang]end,
|
||||||
|
back="Save&Back",
|
||||||
},
|
},
|
||||||
setting2={
|
setting2={
|
||||||
"Back",
|
back="Back",
|
||||||
},
|
},
|
||||||
setting3={
|
setting3={
|
||||||
"Back",
|
back="Back",
|
||||||
function()return setting.virtualkeySwitch and"Hide Virtual Key"or"Show Virtual Key"end,
|
hide=function()return setting.virtualkeySwitch and"Hide Virtual Key"or"Show Virtual Key"end,
|
||||||
"Defaults",
|
default="Defaults",
|
||||||
function()return text.snapLevelName[snapLevel]end,
|
snap=function()return text.snapLevelName[snapLevel]end,
|
||||||
function()return percent0to5[setting.virtualkeyAlpha]end,
|
alpha=function()return percent0to5[setting.virtualkeyAlpha]end,
|
||||||
"Icon",
|
icon="Icon",
|
||||||
"Size",
|
size="Size",
|
||||||
},
|
},
|
||||||
help={
|
help={
|
||||||
"Back",
|
back="Back",
|
||||||
"Author's qq",
|
qq="Author's qq",
|
||||||
},
|
},
|
||||||
stat={
|
stat={
|
||||||
"Back",
|
back="Back",
|
||||||
|
path="Open Data Folder",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
295
list.lua
295
list.lua
@@ -43,7 +43,7 @@ color={
|
|||||||
lightPurple={.7,.3,1},
|
lightPurple={.7,.3,1},
|
||||||
}
|
}
|
||||||
attackColor={
|
attackColor={
|
||||||
{color.darkGrey,color.lightGrey},
|
{color.darkGrey,color.white},
|
||||||
{color.grey,color.white},
|
{color.grey,color.white},
|
||||||
{color.lightPurple,color.white},
|
{color.lightPurple,color.white},
|
||||||
{color.lightRed,color.white},
|
{color.lightRed,color.white},
|
||||||
@@ -82,7 +82,7 @@ sfx={
|
|||||||
"ready","start","win","fail","collect",
|
"ready","start","win","fail","collect",
|
||||||
"move","rotate","rotatekick","hold",
|
"move","rotate","rotatekick","hold",
|
||||||
"prerotate","prehold",
|
"prerotate","prehold",
|
||||||
"drop","fall",
|
"lock","drop","fall",
|
||||||
"reach",
|
"reach",
|
||||||
"ren_1","ren_2","ren_3","ren_4","ren_5","ren_6","ren_7","ren_8","ren_9","ren_10","ren_11",
|
"ren_1","ren_2","ren_3","ren_4","ren_5","ren_6","ren_7","ren_8","ren_9","ren_10","ren_11",
|
||||||
"clear_1","clear_2","clear_3","clear_4",
|
"clear_1","clear_2","clear_3","clear_4",
|
||||||
@@ -103,8 +103,77 @@ bgm={
|
|||||||
"secret7th",
|
"secret7th",
|
||||||
"secret8th",
|
"secret8th",
|
||||||
"rockblock",
|
"rockblock",
|
||||||
|
"sores",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sceneInit={
|
||||||
|
load=function()
|
||||||
|
curBG="none"
|
||||||
|
keeprun=true
|
||||||
|
loading=1--Loading mode
|
||||||
|
loadnum=1--Loading counter
|
||||||
|
loadprogress=0--Loading bar(0~1)
|
||||||
|
end,
|
||||||
|
intro=function()
|
||||||
|
curBG="none"
|
||||||
|
count=0
|
||||||
|
keeprun=true
|
||||||
|
end,
|
||||||
|
main=function()
|
||||||
|
curBG="none"
|
||||||
|
keeprun=true
|
||||||
|
collectgarbage()
|
||||||
|
end,
|
||||||
|
mode=function()
|
||||||
|
saveData()
|
||||||
|
modeSel=modeSel or 1
|
||||||
|
levelSel=levelSel or 3
|
||||||
|
curBG="none"
|
||||||
|
keeprun=true
|
||||||
|
end,
|
||||||
|
custom=function()
|
||||||
|
optSel=optSel or 1
|
||||||
|
curBG="matrix"
|
||||||
|
keeprun=true
|
||||||
|
end,
|
||||||
|
play=function()
|
||||||
|
keeprun=false
|
||||||
|
resetGameData()
|
||||||
|
sysSFX("ready")
|
||||||
|
mouseShow=false
|
||||||
|
end,
|
||||||
|
setting=function()
|
||||||
|
curBG="none"
|
||||||
|
keeprun=true
|
||||||
|
end,
|
||||||
|
setting2=function()
|
||||||
|
curBG="none"
|
||||||
|
keeprun=true
|
||||||
|
curBoard=1
|
||||||
|
keyboardSet=1
|
||||||
|
joystickSet=1
|
||||||
|
keyboardSetting=false
|
||||||
|
joystickSetting=false
|
||||||
|
end,--Control settings
|
||||||
|
setting3=function()
|
||||||
|
curBG="game1"
|
||||||
|
keeprun=true
|
||||||
|
defaultSel=1
|
||||||
|
sel=nil
|
||||||
|
snapLevel=1
|
||||||
|
end,--Touch setting
|
||||||
|
help=function()
|
||||||
|
curBG="none"
|
||||||
|
keeprun=true
|
||||||
|
end,
|
||||||
|
stat=function()
|
||||||
|
curBG="none"
|
||||||
|
keeprun=true
|
||||||
|
end,
|
||||||
|
quit=function()
|
||||||
|
love.event.quit()
|
||||||
|
end,
|
||||||
|
}
|
||||||
prevMenu={
|
prevMenu={
|
||||||
load=love.event.quit,
|
load=love.event.quit,
|
||||||
intro="quit",
|
intro="quit",
|
||||||
@@ -113,6 +182,7 @@ prevMenu={
|
|||||||
custom="mode",
|
custom="mode",
|
||||||
ready="mode",
|
ready="mode",
|
||||||
play=function()
|
play=function()
|
||||||
|
clearTask()
|
||||||
gotoScene(curMode.id~="custom"and"mode"or"custom")
|
gotoScene(curMode.id~="custom"and"mode"or"custom")
|
||||||
end,
|
end,
|
||||||
help="main",
|
help="main",
|
||||||
@@ -156,32 +226,34 @@ langName={"中文","English"}
|
|||||||
langID={"chi","eng"}
|
langID={"chi","eng"}
|
||||||
actName={"moveLeft","moveRight","rotRight","rotLeft","rotFlip","hardDrop","softDrop","hold","swap","restart","insLeft","insRight","insDown"}
|
actName={"moveLeft","moveRight","rotRight","rotLeft","rotFlip","hardDrop","softDrop","hold","swap","restart","insLeft","insRight","insDown"}
|
||||||
blockPos={4,4,4,4,4,5,4}
|
blockPos={4,4,4,4,4,5,4}
|
||||||
|
clearPoint={[0]=1,2,3,5,7}
|
||||||
renATK={[0]=0,0,0,1,1,2,2,3,3,4,4}--3 else
|
renATK={[0]=0,0,0,1,1,2,2,3,3,4,4}--3 else
|
||||||
b2bPoint={50,120,200}
|
b2bPoint={50,120,200}
|
||||||
b2bATK={3,5,8}
|
b2bATK={3,5,8}
|
||||||
testScore={[-1]=1,[-2]=0,[-3]=1,2,2,2}
|
testScore={[-1]=1,[-2]=0,[-3]=1,2,2,2}
|
||||||
visible_opt={show=1e99,time=300,fast=20,none=5}
|
visible_opt={show=1e99,time=300,fast=20,none=5}
|
||||||
|
reAtk={0,0,1,1,1,2,2,3,3}
|
||||||
|
reDef={0,1,1,2,3,3,4,4,5}
|
||||||
|
|
||||||
spin_n={"spin_1","spin_2","spin_3"}
|
spin_n={"spin_1","spin_2","spin_3"}
|
||||||
clear_n={"clear_1","clear_2","clear_3","clear_4"}
|
clear_n={"clear_1","clear_2","clear_3","clear_4"}
|
||||||
ren_n={}for i=1,11 do ren_n[i]="ren_"..i end
|
ren_n={}for i=1,11 do ren_n[i]="ren_"..i end
|
||||||
vibrateLevel={0,0,.03,.04,.05,.07,.9}
|
vibrateLevel={0,0,.03,.04,.05,.07,.9}
|
||||||
snapLevelValue={1,10,20,40,60,80}
|
snapLevelValue={1,10,20,40,60,80}
|
||||||
reAtk={0,0,1,1,1,2,2,3,3}
|
|
||||||
reDef={0,1,1,2,3,3,4,4,5}
|
|
||||||
|
|
||||||
atkModeName={"Random","Badges","K.O.s","Counters"}
|
RCPB={10,33,200,33,105,5,105,60}
|
||||||
up0to4={[0]="000%UP","025%UP","050%UP","075%UP","100%UP",}
|
up0to4={[0]="000%UP","025%UP","050%UP","075%UP","100%UP",}
|
||||||
percent0to5={[0]="0%","20%","40%","60%","80%","100%",}
|
percent0to5={[0]="0%","20%","40%","60%","80%","100%",}
|
||||||
|
|
||||||
modeID={
|
modeID={
|
||||||
[0]="custom",
|
[0]="custom",
|
||||||
"sprint","marathon","classic","zen","infinite","solo","tsd","blind","dig","survivor","tech",
|
"sprint","marathon","master","classic","zen","infinite","solo","tsd","blind","dig","survivor","tech",
|
||||||
"pctrain","pcchallenge","techmino41","techmino99","drought","hotseat",
|
"pctrain","pcchallenge","techmino41","techmino99","drought","hotseat",
|
||||||
}
|
}
|
||||||
modeLevel={
|
modeLevel={
|
||||||
sprint={"10L","20L","40L","100L","400L","1000L"},
|
sprint={"10L","20L","40L","100L","400L","1000L"},
|
||||||
marathon={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE"},
|
marathon={"EASY","NORMAL","HARD"},
|
||||||
|
master={"LUNATIC","ULTIMATE"},
|
||||||
classic={"CTWC"},
|
classic={"CTWC"},
|
||||||
zen={"NORMAL"},
|
zen={"NORMAL"},
|
||||||
infinite={"NORMAL"},
|
infinite={"NORMAL"},
|
||||||
@@ -243,24 +315,24 @@ TRS={
|
|||||||
[1]={
|
[1]={
|
||||||
[01]={{0,0},{-1,0},{-1,1},{0,-2},{-1,-2},{0,1}},
|
[01]={{0,0},{-1,0},{-1,1},{0,-2},{-1,-2},{0,1}},
|
||||||
[10]={{0,0},{1,0},{1,-1},{0,2},{1,2},{0,-1}},
|
[10]={{0,0},{1,0},{1,-1},{0,2},{1,2},{0,-1}},
|
||||||
[12]={{0,0},{1,0},{1,-1},{-1,0},{0,2},{1,2}},
|
[12]={{0,0},{1,0},{1,-1},{0,1},{-1,0},{0,2},{1,2}},
|
||||||
[21]={{0,0},{-1,0},{-1,1},{1,0},{0,-2},{-1,-2}},
|
[21]={{0,0},{-1,0},{-1,1},{1,0},{0,-2},{-1,-2}},
|
||||||
[23]={{0,0},{1,0},{1,1},{1,-1},{0,-2},{1,-2}},
|
[23]={{0,0},{1,0},{1,1},{1,-1},{0,-2},{1,-2}},
|
||||||
[32]={{0,0},{-1,0},{-1,-1},{-1,1},{0,2},{-1,2}},
|
[32]={{0,0},{-1,0},{-1,-1},{-1,1},{0,2},{-1,2}},
|
||||||
[30]={{0,0},{-1,0},{-1,-1},{0,2},{-1,2},{0,-1}},
|
[30]={{0,0},{-1,0},{-1,-1},{0,2},{-1,2},{0,-1}},
|
||||||
[03]={{0,0},{1,0},{1,1},{0,-2},{1,-2},{0,1}},
|
[03]={{0,0},{1,0},{1,1},{1,-1},{0,-2},{1,-2},{0,1}},
|
||||||
[02]={{0,0},{1,0},{-1,0},{0,-1},{0,1}},
|
[02]={{0,0},{1,0},{-1,0},{0,-1},{0,1}},
|
||||||
[20]={{0,0},{-1,0},{1,0},{0,1},{0,-1}},
|
[20]={{0,0},{-1,0},{1,0},{0,1},{0,-1}},
|
||||||
[13]={{0,0},{0,-1},{0,1},{-1,0}},
|
[13]={{0,0},{0,-1},{0,1},{-1,0}},
|
||||||
[31]={{0,0},{0,1},{0,-1},{1,0}},
|
[31]={{0,0},{0,1},{0,-1},{1,0}},
|
||||||
},--Z/J
|
},--Z/J
|
||||||
[2]={
|
[2]={
|
||||||
[01]={{0,0},{-1,0},{-1,1},{0,-2},{-1,-2}},
|
[01]={{0,0},{-1,0},{-1,1},{-1,-1},{0,-2},{-1,-2}},
|
||||||
[10]={{0,0},{1,0},{1,-1},{0,2},{1,2}},
|
[10]={{0,0},{1,0},{1,-1},{0,2},{1,2}},
|
||||||
[12]={{0,0},{1,0},{1,-1},{1,1},{0,2},{1,2}},
|
[12]={{0,0},{1,0},{1,-1},{1,1},{0,2},{1,2}},
|
||||||
[21]={{0,0},{-1,0},{-1,1},{-1,-1},{0,-2},{-1,-2}},
|
[21]={{0,0},{-1,0},{-1,1},{-1,-1},{0,-2},{-1,-2}},
|
||||||
[23]={{0,0},{1,0},{1,1},{-1,0},{0,-2},{1,-2}},
|
[23]={{0,0},{1,0},{1,1},{-1,0},{0,-2},{1,-2}},
|
||||||
[32]={{0,0},{-1,0},{-1,-1},{1,0},{0,2},{-1,2}},
|
[32]={{0,0},{-1,0},{-1,-1},{0,1},{1,0},{0,2},{-1,2}},
|
||||||
[30]={{0,0},{-1,0},{-1,-1},{0,2},{-1,2},{0,-1},{-1,1}},
|
[30]={{0,0},{-1,0},{-1,-1},{0,2},{-1,2},{0,-1},{-1,1}},
|
||||||
[03]={{0,0},{1,0},{1,1},{0,-2},{1,-2},{1,-1},{0,1}},
|
[03]={{0,0},{1,0},{1,1},{0,-2},{1,-2},{1,-1},{0,1}},
|
||||||
[02]={{0,0},{-1,0},{1,0},{0,-1},{0,1}},
|
[02]={{0,0},{-1,0},{1,0},{0,-1},{0,1}},
|
||||||
@@ -283,8 +355,8 @@ TRS={
|
|||||||
[31]={{0,0},{0,-1},{0,1},{-1,0},{1,0},{0,2}},
|
[31]={{0,0},{0,-1},{0,1},{-1,0},{1,0},{0,2}},
|
||||||
},
|
},
|
||||||
[7]={
|
[7]={
|
||||||
[01]={{0,0},{1,0},{-2,0},{-2,-1},{1,2}},
|
[01]={{0,0},{0,1},{1,0},{-2,0},{-2,-1},{1,2}},
|
||||||
[03]={{0,0},{-1,0},{2,0},{2,-1},{-1,2}},
|
[03]={{0,0},{0,1},{-1,0},{2,0},{2,-1},{-1,2}},
|
||||||
[10]={{0,0},{2,0},{-1,0},{-1,-2},{2,1},{0,2}},
|
[10]={{0,0},{2,0},{-1,0},{-1,-2},{2,1},{0,2}},
|
||||||
[30]={{0,0},{-2,0},{1,0},{1,-2},{-2,1},{0,2}},
|
[30]={{0,0},{-2,0},{1,0},{1,-2},{-2,1},{0,2}},
|
||||||
[12]={{0,0},{-1,0},{2,0},{-1,2},{2,-1}},
|
[12]={{0,0},{-1,0},{2,0},{-1,2},{2,-1}},
|
||||||
@@ -298,6 +370,38 @@ TRS={
|
|||||||
}
|
}
|
||||||
}TRS[3],TRS[4]=TRS[2],TRS[1]
|
}TRS[3],TRS[4]=TRS[2],TRS[1]
|
||||||
|
|
||||||
|
dataOpt={
|
||||||
|
"run",
|
||||||
|
"game",
|
||||||
|
"gametime",
|
||||||
|
"piece",
|
||||||
|
"row",
|
||||||
|
"atk",
|
||||||
|
"key",
|
||||||
|
"rotate",
|
||||||
|
"hold",
|
||||||
|
"spin",
|
||||||
|
}
|
||||||
|
saveOpt={
|
||||||
|
"lang",
|
||||||
|
"ghost",
|
||||||
|
"center",
|
||||||
|
"grid",
|
||||||
|
"swap",
|
||||||
|
"sfx",
|
||||||
|
"bgm",
|
||||||
|
"vib",
|
||||||
|
"fullscreen",
|
||||||
|
"bgblock",
|
||||||
|
"das",
|
||||||
|
"arr",
|
||||||
|
"sddas",
|
||||||
|
"sdarr",
|
||||||
|
"virtualkeyAlpha",
|
||||||
|
"virtualkeyIcon",
|
||||||
|
"virtualkeySwitch",
|
||||||
|
"frameMul",
|
||||||
|
}
|
||||||
virtualkeySet={
|
virtualkeySet={
|
||||||
{
|
{
|
||||||
{80,720-200,6400,80},--moveLeft
|
{80,720-200,6400,80},--moveLeft
|
||||||
@@ -348,133 +452,125 @@ virtualkeySet={
|
|||||||
{80,320,6400,80},--restart
|
{80,320,6400,80},--restart
|
||||||
},--Keyboard set
|
},--Keyboard set
|
||||||
{
|
{
|
||||||
{1280-360,40,0,40},--moveLeft
|
{1200-360,40,0,40},--moveLeft
|
||||||
{1280-280,40,0,40},--moveRight
|
{1200-280,40,0,40},--moveRight
|
||||||
{1280-520,40,0,40},--rotRight
|
{1200-520,40,0,40},--rotRight
|
||||||
{1280-600,40,0,40},--rotLeft
|
{1200-600,40,0,40},--rotLeft
|
||||||
{1280-440,40,0,40},--rotFlip
|
{1200-440,40,0,40},--rotFlip
|
||||||
{1280-40,40,0,40},--hardDrop
|
{1200-40,40,0,40},--hardDrop
|
||||||
{1280-120,40,0,40},--softDrop
|
{1200-120,40,0,40},--softDrop
|
||||||
{1280-200,40,0,40},--hold
|
{1200-200,40,0,40},--hold
|
||||||
{1280-680,40,0,40},--swap
|
{1200-680,40,0,40},--swap
|
||||||
{1280-760,40,0,40},--restart
|
{1200-760,40,0,40},--restart
|
||||||
},--PC key feedback
|
},--PC key feedback
|
||||||
}
|
}
|
||||||
Buttons={
|
Buttons={
|
||||||
load={},
|
load={},
|
||||||
intro={},
|
intro={},
|
||||||
main={
|
main={
|
||||||
{x=640,y=290,w=220,h=220,rgb=color.red,f=60,code=function()gotoScene("mode")end,down=4,left=3,right=2},
|
play={x=380,y=300,w=240,h=240,rgb=color.red,f=70,code=function()gotoScene("mode")end,down="stat",right="setting"},
|
||||||
{x=880,y=290,w=220,h=220,rgb=color.blue,f=60,code=function()gotoScene("setting")end,down=5,left=1,right=2},
|
setting={x=640,y=300,w=240,h=240,rgb=color.lightBlue,f=55,code=function()gotoScene("setting")end,down="stat",left="play",right="help"},
|
||||||
{x=400,y=290,w=220,h=220,rgb=color.cyan,f=60,code=function()gotoScene("stat")end,down=4,right=1},
|
stat={x=640,y=560,w=240,h=240,rgb=color.cyan,f=55,code=function()gotoScene("stat")end,up="setting",left="play",right="help"},
|
||||||
{x=640,y=530,w=220,h=220,rgb=color.yellow,f=60,code=function()gotoScene("help")end,up=1,down=5,left=3,right=5},
|
help={x=900,y=560,w=240,h=240,rgb=color.yellow,f=55,code=function()gotoScene("help")end,up="setting",left="stat",right="quit"},
|
||||||
{x=1180,y=620,w=120,h=120,rgb=color.grey,f=50,code=function()gotoScene("quit")end,up=2,left=4},
|
quit={x=1180,y=620,w=120,h=120,rgb=color.lightGrey,f=50,code=function()gotoScene("quit")end,up="setting",left="help"},
|
||||||
},
|
},
|
||||||
mode={
|
mode={
|
||||||
{x=1000,y=210,w=200,h=140,rgb=color.white,hide=function()return modeSel==1 end,f=64,code=function()keyDown.mode("up")end},
|
up={x=1000,y=210,w=200,h=140,rgb=color.white,hide=function()return modeSel==1 end,f=64,code=function()keyDown.mode("up")end},
|
||||||
{x=1000,y=430,w=200,h=140,rgb=color.white,hide=function()return modeSel==#modeID end,f=80,code=function()keyDown.mode("down")end},
|
down={x=1000,y=430,w=200,h=140,rgb=color.white,hide=function()return modeSel==#modeID end,f=80,code=function()keyDown.mode("down")end},
|
||||||
{x=190,y=160,w=100,h=80,rgb=color.white,hide=function()return levelSel==1 end,code=function()keyDown.mode("left")end},
|
left={x=190,y=160,w=100,h=80,rgb=color.white,hide=function()return levelSel==1 end,code=function()keyDown.mode("left")end},
|
||||||
{x=350,y=160,w=100,h=80,rgb=color.white,hide=function()return levelSel==#modeLevel[modeID[modeSel]] end,code=function()keyDown.mode("right")end},
|
right={x=350,y=160,w=100,h=80,rgb=color.white,hide=function()return levelSel==#modeLevel[modeID[modeSel]] end,code=function()keyDown.mode("right")end},
|
||||||
{x=1000,y=600,w=250,h=100,rgb=color.green,f=50,code=function()loadGame(modeSel,levelSel)end},
|
start={x=1000,y=600,w=250,h=100,rgb=color.green,f=50,code=function()loadGame(modeSel,levelSel)end},
|
||||||
{x=270,y=540,w=190,h=85,rgb=color.yellow,code=function()gotoScene("custom")end},
|
custom={x=270,y=540,w=190,h=85,rgb=color.yellow,code=function()gotoScene("custom")end},
|
||||||
{x=640,y=630,w=230,h=90,rgb=color.white,f=45,code=back},
|
back={x=640,y=630,w=230,h=90,rgb=color.white,f=45,code=back},
|
||||||
},
|
},
|
||||||
custom={
|
custom={
|
||||||
{x=1000,y=200,w=100,h=100,rgb=color.white,code=function()optSel=(optSel-2)%#customID+1 end},
|
up={x=1000,y=200,w=100,h=100,rgb=color.white,code=function()optSel=(optSel-2)%#customID+1 end},
|
||||||
{x=1000,y=440,w=100,h=100,rgb=color.white,f=50,code=function()optSel=optSel%#customID+1 end},
|
down={x=1000,y=440,w=100,h=100,rgb=color.white,f=50,code=function()optSel=optSel%#customID+1 end},
|
||||||
{x=880,y=320,w=100,h=100,rgb=color.white,f=50,code=function()local k=customID[optSel]customSel[k]=(customSel[k]-2)%#customRange[k]+1 end},
|
left={x=880,y=320,w=100,h=100,rgb=color.white,f=50,code=function()local k=customID[optSel]customSel[k]=(customSel[k]-2)%#customRange[k]+1 end},
|
||||||
{x=1120,y=320,w=100,h=100,rgb=color.white,f=50,code=function()local k=customID[optSel]customSel[k]=customSel[k]%#customRange[k]+1 end},
|
right={x=1120,y=320,w=100,h=100,rgb=color.white,f=50,code=function()local k=customID[optSel]customSel[k]=customSel[k]%#customRange[k]+1 end},
|
||||||
{x=1000,y=580,w=180,h=80,rgb=color.green,code=function()loadGame(0,1)end},
|
start={x=1000,y=580,w=180,h=80,rgb=color.green,code=function()loadGame(0,1)end},
|
||||||
{x=640,y=630,w=180,h=60,rgb=color.white,code=back},
|
back={x=640,y=630,w=180,h=60,rgb=color.white,code=back},
|
||||||
},
|
},
|
||||||
play={
|
play={
|
||||||
|
back={x=1235,y=45,w=80,h=80,rgb=color.white,code=back,f=35},
|
||||||
},
|
},
|
||||||
setting={--Normal setting
|
setting={--Normal setting
|
||||||
{x=285,y=90,w=210,h=60,rgb=color.white,code=function()setting.ghost=not setting.ghost end,down=3,right=2},
|
ghost={x=290,y=90,w=210,h=60,rgb=color.white,code=function()setting.ghost=not setting.ghost end,down="grid",right="center"},
|
||||||
{x=510,y=90,w=210,h=60,rgb=color.white,code=function()setting.center=not setting.center end,down=5,left=1,right=11},
|
center={x=505,y=90,w=210,h=60,rgb=color.white,code=function()setting.center=not setting.center end,down="swap",left="ghost",right="sfx"},
|
||||||
--1,2
|
grid={x=290,y=160,w=210,h=60,rgb=color.white,code=function()setting.grid=not setting.grid end,up="ghost",down="dasD",right="swap"},
|
||||||
{x=205,y=180,w=50,h=50,rgb=color.white,code=function()setting.das=(setting.das-1)%31 end,up=1,down=7,right=4},
|
swap={x=505,y=160,w=210,h=60,f=28,rgb=color.white,code=function()setting.swap=not setting.swap end,up="center",down="arrD",left="grid",right="vib"},
|
||||||
{x=370,y=180,w=50,h=50,rgb=color.white,code=function()setting.das=(setting.das+1)%31 end,up=1,down=8,left=3,right=5},
|
dasD={x=210,y=230,w=50,h=50,rgb=color.white,code=function()setting.das=(setting.das-1)%31 end,up="grid",down="sddasD",right="dasU"},
|
||||||
{x=425,y=180,w=50,h=50,rgb=color.white,code=function()setting.arr=(setting.arr-1)%16 end,up=2,down=9,left=4,right=6},
|
dasU={x=370,y=230,w=50,h=50,rgb=color.white,code=function()setting.das=(setting.das+1)%31 end,up="grid",down="sddasU",left="dasD",right="arrD"},
|
||||||
{x=590,y=180,w=50,h=50,rgb=color.white,code=function()setting.arr=(setting.arr+1)%16 end,up=2,down=10,left=5,right=13},
|
arrD={x=425,y=230,w=50,h=50,rgb=color.white,code=function()setting.arr=(setting.arr-1)%16 end,up="swap",down="sdarrD",left="dasU",right="arrU"},
|
||||||
--3~6
|
arrU={x=585,y=230,w=50,h=50,rgb=color.white,code=function()setting.arr=(setting.arr+1)%16 end,up="swap",down="sdarrU",left="arrD",right="fullscreen"},--3~6
|
||||||
{x=205,y=260,w=50,h=50,rgb=color.white,code=function()setting.sddas=(setting.sddas-1)%11 end,up=3,down=19,right=8},
|
sddasD={x=210,y=300,w=50,h=50,rgb=color.white,code=function()setting.sddas=(setting.sddas-1)%11 end,up="dasD",down="lang",right="sddasU"},
|
||||||
{x=370,y=260,w=50,h=50,rgb=color.white,code=function()setting.sddas=(setting.sddas+1)%11 end,up=4,down=19,left=7,right=9},
|
sddasU={x=370,y=300,w=50,h=50,rgb=color.white,code=function()setting.sddas=(setting.sddas+1)%11 end,up="dasU",down="lang",left="sddasD",right="sdarrD"},
|
||||||
{x=425,y=260,w=50,h=50,rgb=color.white,code=function()setting.sdarr=(setting.sdarr-1)%4 end,up=5,down=19,left=8,right=10},
|
sdarrD={x=425,y=300,w=50,h=50,rgb=color.white,code=function()setting.sdarr=(setting.sdarr-1)%4 end,up="arrD",down="lang",left="sddasU",right="sdarrU"},
|
||||||
{x=590,y=260,w=50,h=50,rgb=color.white,code=function()setting.sdarr=(setting.sdarr+1)%4 end,up=6,down=19,left=9,right=14},
|
sdarrU={x=585,y=300,w=50,h=50,rgb=color.white,code=function()setting.sdarr=(setting.sdarr+1)%4 end,up="arrU",down="lang",left="sdarrD",right="bgblock"},
|
||||||
--7~10
|
sfx={x=760,y=90,w=160,h=60,rgb=color.white,code=function()setting.sfx=not setting.sfx end,down="vib",left="center",right="bgm"},
|
||||||
{x=760,y=90,w=160,h=60,rgb=color.white,code=function()setting.sfx=not setting.sfx end,down=13,left=2,right=12},
|
bgm={x=940,y=90,w=160,h=60,rgb=color.white,code=function()
|
||||||
{x=940,y=90,w=160,h=60,rgb=color.white,code=function()
|
|
||||||
BGM()
|
BGM()
|
||||||
setting.bgm=not setting.bgm
|
setting.bgm=not setting.bgm
|
||||||
BGM("blank")
|
BGM("blank")
|
||||||
end,down=13,left=6},
|
end,down="vib",left="sfx"},
|
||||||
{x=850,y=160,w=340,h=60,rgb=color.white,code=function()
|
vib={x=850,y=160,w=340,h=60,rgb=color.white,code=function()
|
||||||
setting.vib=(setting.vib+1)%5
|
setting.vib=(setting.vib+1)%5
|
||||||
VIB(2)
|
VIB(2)
|
||||||
end,up=11,down=14,left=6},
|
end,up="sfx",down="fullscreen",left="swap"},
|
||||||
{x=850,y=230,w=340,h=60,rgb=color.white,
|
fullscreen={x=850,y=230,w=340,h=60,rgb=color.white,code=function()
|
||||||
code=function()
|
setting.fullscreen=not setting.fullscreen
|
||||||
setting.fullscreen=not setting.fullscreen
|
love.window.setFullscreen(setting.fullscreen)
|
||||||
love.window.setFullscreen(setting.fullscreen)
|
if not setting.fullscreen then
|
||||||
if not setting.fullscreen then
|
love.resize(gc.getWidth(),gc.getHeight())
|
||||||
love.resize(gc.getWidth(),gc.getHeight())
|
end
|
||||||
|
end,up="vib",down="bgblock",left="arrU"},
|
||||||
|
bgblock={x=850,y=300,w=340,h=60,rgb=color.white,code=function()
|
||||||
|
setting.bgblock=not setting.bgblock
|
||||||
|
if not setting.bgblock then
|
||||||
|
for i=1,16 do
|
||||||
|
BGblockList[i].v=3*BGblockList[i].v
|
||||||
end
|
end
|
||||||
end,
|
end
|
||||||
up=13,down=15,left=6
|
end,up="fullscreen",down="frame",left="sdarrU"},
|
||||||
},
|
frame={x=850,y=370,w=340,h=60,rgb=color.white,code=function()
|
||||||
{x=850,y=300,w=340,h=60,rgb=color.white,
|
|
||||||
code=function()
|
|
||||||
setting.bgblock=not setting.bgblock
|
|
||||||
if not setting.bgblock then
|
|
||||||
for i=1,16 do
|
|
||||||
BGblockList[i].v=3*BGblockList[i].v
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
up=14,down=16,left=10
|
|
||||||
},
|
|
||||||
{x=850,y=370,w=340,h=60,rgb=color.white,code=function()
|
|
||||||
setting.frameMul=setting.frameMul+(setting.frameMul<50 and 5 or 10)
|
setting.frameMul=setting.frameMul+(setting.frameMul<50 and 5 or 10)
|
||||||
if setting.frameMul>100 then setting.frameMul=25 end
|
if setting.frameMul>100 then setting.frameMul=25 end
|
||||||
end,up=15,down=17,left=19},
|
end,up="bgblock",down="control",left="sdarrU"},
|
||||||
--11~16
|
control={x=850,y=440,w=340,h=60,rgb=color.green,code=function()gotoScene("setting2")end,up="frame",down="touch",left="lang"},
|
||||||
{x=850,y=440,w=340,h=60,rgb=color.green,code=function()gotoScene("setting2")end,up=16,down=18,left=19},
|
touch={x=850,y=510,w=340,h=60,rgb=color.yellow,code=function()gotoScene("setting3")end,up="control",down="back",left="lang"},
|
||||||
{x=850,y=510,w=340,h=60,rgb=color.yellow,code=function()gotoScene("setting3")end,up=17,down=20,left=19},
|
lang={x=280,y=510,w=200,h=60,rgb=color.red,code=function()
|
||||||
{x=280,y=510,w=200,h=60,rgb=color.red,code=function()
|
|
||||||
setting.lang=setting.lang%#langName+1
|
setting.lang=setting.lang%#langName+1
|
||||||
swapLanguage(setting.lang)
|
swapLanguage(setting.lang)
|
||||||
end,up=7,down=20,right=18},
|
end,up="sddasD",down="back",right="touch"},
|
||||||
{x=640,y=620,w=300,h=70,rgb=color.white,code=back,up=19},
|
back={x=640,y=620,w=300,h=70,rgb=color.white,code=back,up="touch"},
|
||||||
--17~20
|
|
||||||
},
|
},
|
||||||
setting2={--Control setting
|
setting2={--Control setting
|
||||||
{x=840,y=630,w=180,h=60,rgb=color.white,code=back},
|
back={x=840,y=630,w=180,h=60,rgb=color.white,code=back},
|
||||||
},
|
},
|
||||||
setting3={--Touch setting
|
setting3={--Touch setting
|
||||||
{x=640,y=410,w=170,h=80,code=back},
|
back={x=640,y=410,w=170,h=80,f=45,code=back},
|
||||||
{x=640,y=210,w=500,h=80,code=function()
|
hide={x=640,y=210,w=500,h=80,f=45,code=function()
|
||||||
setting.virtualkeySwitch=not setting.virtualkeySwitch
|
setting.virtualkeySwitch=not setting.virtualkeySwitch
|
||||||
end},
|
end},
|
||||||
{x=450,y=310,w=170,h=80,code=function()
|
default={x=450,y=310,w=170,h=80,code=function()
|
||||||
for K=1,#virtualkey do
|
for K=1,#virtualkey do
|
||||||
local b,b0=virtualkey[K],virtualkeySet[defaultSel][K]
|
local b,b0=virtualkey[K],virtualkeySet[defaultSel][K]
|
||||||
b[1],b[2],b[3],b[4]=b0[1],b0[2],b0[3],b0[4]
|
b[1],b[2],b[3],b[4]=b0[1],b0[2],b0[3],b0[4]
|
||||||
end--Default virtualkey
|
end--Default virtualkey
|
||||||
defaultSel=defaultSel%5+1
|
defaultSel=defaultSel%5+1
|
||||||
end},
|
end},
|
||||||
{x=640,y=310,w=170,h=80,code=function()
|
snap={x=640,y=310,w=170,h=80,code=function()
|
||||||
snapLevel=snapLevel%6+1
|
snapLevel=snapLevel%6+1
|
||||||
end},
|
end},
|
||||||
{x=830,y=310,w=170,h=80,code=function()
|
alpha={x=830,y=310,w=170,h=80,f=45,code=function()
|
||||||
setting.virtualkeyAlpha=(setting.virtualkeyAlpha+1)%6
|
setting.virtualkeyAlpha=(setting.virtualkeyAlpha+1)%6
|
||||||
--Adjust virtualkey alpha
|
--Adjust virtualkey alpha
|
||||||
end},
|
end},
|
||||||
{x=450,y=410,w=170,h=80,code=function()
|
icon={x=450,y=410,w=170,h=80,f=45,code=function()
|
||||||
setting.virtualkeyIcon=not setting.virtualkeyIcon
|
setting.virtualkeyIcon=not setting.virtualkeyIcon
|
||||||
--Switch virtualkey icon
|
--Switch virtualkey icon
|
||||||
end},
|
end},
|
||||||
{x=830,y=410,w=170,h=80,code=function()
|
size={x=830,y=410,w=170,h=80,f=45,code=function()
|
||||||
if sel then
|
if sel then
|
||||||
local b=virtualkey[sel]
|
local b=virtualkey[sel]
|
||||||
b[4]=b[4]+10
|
b[4]=b[4]+10
|
||||||
@@ -484,11 +580,12 @@ Buttons={
|
|||||||
end},
|
end},
|
||||||
},
|
},
|
||||||
help={
|
help={
|
||||||
{x=640,y=590,w=180,h=60,rgb=color.white,code=back,right=2},
|
back={x=640,y=590,w=180,h=60,rgb=color.white,code=back,right="qq"},
|
||||||
{x=980,y=590,w=230,h=60,rgb=color.white,code=function()sys.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end,left=1},
|
qq={x=980,y=590,w=230,h=60,rgb=color.white,code=function()sys.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end,left="back"},
|
||||||
},
|
},
|
||||||
stat={
|
stat={
|
||||||
{x=640,y=590,w=180,h=60,rgb=color.white,code=back},
|
back={x=640,y=590,w=180,h=60,rgb=color.white,code=back,right="path"},
|
||||||
|
path={x=980,y=590,w=250,h=60,f=30,rgb=color.white,code=function()sys.openURL("C:/Users/MrZ/AppData/Roaming/LOVE/Techmino")end,left="back"},
|
||||||
},
|
},
|
||||||
sel=nil,--selected button id(integer)
|
sel=nil,--selected button id(integer)
|
||||||
}
|
}
|
||||||
62
main.lua
62
main.lua
@@ -50,13 +50,15 @@ end
|
|||||||
gameEnv0={
|
gameEnv0={
|
||||||
das=10,arr=2,
|
das=10,arr=2,
|
||||||
sddas=0,sdarr=2,
|
sddas=0,sdarr=2,
|
||||||
ghost=true,center=true,bone=false,
|
ghost=true,center=true,
|
||||||
|
grid=false,swap=true,
|
||||||
|
_20G=false,bone=false,
|
||||||
drop=30,lock=45,
|
drop=30,lock=45,
|
||||||
wait=1,fall=1,
|
wait=1,fall=1,
|
||||||
next=6,hold=true,oncehold=true,
|
next=6,hold=true,oncehold=true,
|
||||||
sequence="bag7",
|
sequence="bag7",
|
||||||
block=true,visible="show",
|
block=true,visible="show",
|
||||||
_20G=false,target=1e99,
|
target=1e99,
|
||||||
freshLimit=1e99,
|
freshLimit=1e99,
|
||||||
ospin=true,
|
ospin=true,
|
||||||
reach=null,
|
reach=null,
|
||||||
@@ -83,6 +85,9 @@ loadmode={
|
|||||||
marathon=function()
|
marathon=function()
|
||||||
createPlayer(1,340,15)
|
createPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
|
master=function()
|
||||||
|
createPlayer(1,340,15)
|
||||||
|
end,
|
||||||
classic=function()
|
classic=function()
|
||||||
createPlayer(1,340,15)
|
createPlayer(1,340,15)
|
||||||
end,
|
end,
|
||||||
@@ -106,17 +111,16 @@ loadmode={
|
|||||||
createPlayer(1,340,15)
|
createPlayer(1,340,15)
|
||||||
local P=players[1]
|
local P=players[1]
|
||||||
if curMode.lv==1 then
|
if curMode.lv==1 then
|
||||||
ins(players[1].task,Event.task.dig_normal)
|
newTask(Event_task.dig_normal,P)
|
||||||
pushSpeed=1
|
pushSpeed=1
|
||||||
elseif curMode.lv==2 then
|
elseif curMode.lv==2 then
|
||||||
ins(players[1].task,Event.task.dig_lunatic)
|
newTask(Event_task.dig_lunatic,P)
|
||||||
pushSpeed=1
|
pushSpeed=1
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
survivor=function()
|
survivor=function()
|
||||||
createPlayer(1,340,15)
|
createPlayer(1,340,15)
|
||||||
local P=players[1]
|
newTask(Event_task[curMode.lv==1 and"survivor_easy"or curMode.lv==2 and"survivor_normal"or curMode.lv==3 and"survivor_hard"or curMode.lv==4 and"survivor_lunatic"],P)
|
||||||
ins(players[1].task,Event.task[curMode.lv==1 and"survivor_easy"or curMode.lv==2 and"survivor_normal"or curMode.lv==3 and"survivor_hard"or curMode.lv==4 and"survivor_lunatic"])
|
|
||||||
pushSpeed=curMode.lv>2 and 2 or 1
|
pushSpeed=curMode.lv>2 and 2 or 1
|
||||||
end,
|
end,
|
||||||
tech=function()
|
tech=function()
|
||||||
@@ -201,8 +205,8 @@ loadmode={
|
|||||||
createPlayer(1,340,15)
|
createPlayer(1,340,15)
|
||||||
else
|
else
|
||||||
modeEnv.target=nil
|
modeEnv.target=nil
|
||||||
createPlayer(1,20,15)
|
createPlayer(1,340,15)
|
||||||
createPlayer(2,660,85,.9,modeEnv.opponent)
|
createPlayer(2,965,360,.9,modeEnv.opponent)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
@@ -210,7 +214,13 @@ mesDisp={
|
|||||||
--Default:font=35,white
|
--Default:font=35,white
|
||||||
sprint=function()
|
sprint=function()
|
||||||
setFont(70)
|
setFont(70)
|
||||||
mStr(max(P.gameEnv.target-P.cstat.row,0),-75,260)
|
local r=max(P.gameEnv.target-P.cstat.row,0)
|
||||||
|
mStr(r,-75,260)
|
||||||
|
if r<21 and r>0 then
|
||||||
|
gc.setLineWidth(3)
|
||||||
|
gc.setColor(color.lightRed)
|
||||||
|
gc.line(0,600-30*r,300,600-30*r)
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
marathon=function()
|
marathon=function()
|
||||||
setFont(50)
|
setFont(50)
|
||||||
@@ -218,6 +228,12 @@ mesDisp={
|
|||||||
mStr(P.gameEnv.target,-75,370)
|
mStr(P.gameEnv.target,-75,370)
|
||||||
gc.rectangle("fill",-120,376,90,4)
|
gc.rectangle("fill",-120,376,90,4)
|
||||||
end,
|
end,
|
||||||
|
master=function()
|
||||||
|
setFont(50)
|
||||||
|
mStr(P.cstat.point,-75,320)
|
||||||
|
mStr((P.cstat.event+1)*100,-75,370)
|
||||||
|
gc.rectangle("fill",-120,376,90,4)
|
||||||
|
end,
|
||||||
classic=function()
|
classic=function()
|
||||||
setFont(80)
|
setFont(80)
|
||||||
local r=P.gameEnv.target*.1
|
local r=P.gameEnv.target*.1
|
||||||
@@ -331,6 +347,7 @@ setting={
|
|||||||
das=10,arr=2,
|
das=10,arr=2,
|
||||||
sddas=0,sdarr=2,
|
sddas=0,sdarr=2,
|
||||||
ghost=true,center=true,
|
ghost=true,center=true,
|
||||||
|
grid=false,swap=true,
|
||||||
keyMap={
|
keyMap={
|
||||||
{"left","right","x","z","c","up","down","space","tab","r","","",""},
|
{"left","right","x","z","c","up","down","space","tab","r","","",""},
|
||||||
{"","","","","","","","","","","","",""},
|
{"","","","","","","","","","","","",""},
|
||||||
@@ -404,9 +421,18 @@ virtualkey={
|
|||||||
virtualkeyDown={false,false,false,false,false,false,false,false,false,false,false,false,false}
|
virtualkeyDown={false,false,false,false,false,false,false,false,false,false,false,false,false}
|
||||||
virtualkeyPressTime={0,0,0,0,0,0,0,0,0,0,0,0,0}
|
virtualkeyPressTime={0,0,0,0,0,0,0,0,0,0,0,0,0}
|
||||||
--User Data&User Setting
|
--User Data&User Setting
|
||||||
require("toolfunc")
|
require"toolfunc"
|
||||||
userData=fs.newFile("userdata")
|
require"class"
|
||||||
userSetting=fs.newFile("usersetting")
|
require"gamefunc"
|
||||||
|
require"ai"
|
||||||
|
require"timer"
|
||||||
|
require"paint"
|
||||||
|
require"call&sys"
|
||||||
|
require"dataList"
|
||||||
|
require"list"
|
||||||
|
require"texture"
|
||||||
|
|
||||||
|
userData,userSetting=fs.newFile("userdata"),fs.newFile("usersetting")
|
||||||
if fs.getInfo("userdata")then
|
if fs.getInfo("userdata")then
|
||||||
loadData()
|
loadData()
|
||||||
end
|
end
|
||||||
@@ -414,14 +440,6 @@ if fs.getInfo("usersetting")then
|
|||||||
loadSetting()
|
loadSetting()
|
||||||
elseif system=="Android" or system=="iOS"then
|
elseif system=="Android" or system=="iOS"then
|
||||||
setting.virtualkeySwitch=true
|
setting.virtualkeySwitch=true
|
||||||
|
setting.swap=false
|
||||||
end
|
end
|
||||||
|
swapLanguage(setting.lang)
|
||||||
require("gamefunc")
|
|
||||||
require("ai")
|
|
||||||
require("timer")
|
|
||||||
require("paint")
|
|
||||||
require("call&sys")
|
|
||||||
require("largeList")
|
|
||||||
require("list")
|
|
||||||
swapLanguage(setting.lang)
|
|
||||||
require("texture")
|
|
||||||
82
paint.lua
82
paint.lua
@@ -109,20 +109,20 @@ FX={
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateButton()
|
function updateButton()
|
||||||
for i=1,#Buttons[scene]do
|
for k,B in next,Buttons[scene]do
|
||||||
local B=Buttons[scene][i]
|
local t=B==Buttons.sel and .4 or 0
|
||||||
local t=i==Buttons.sel and .4 or 0
|
|
||||||
B.alpha=abs(B.alpha-t)>.02 and(B.alpha+(B.alpha<t and .02 or -.02))or t
|
B.alpha=abs(B.alpha-t)>.02 and(B.alpha+(B.alpha<t and .02 or -.02))or t
|
||||||
if B.alpha>t then B.alpha=B.alpha-.02 elseif B.alpha<t then B.alpha=B.alpha+.02 end
|
if B.alpha>t then B.alpha=B.alpha-.02 elseif B.alpha<t then B.alpha=B.alpha+.02 end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function drawButton()
|
function drawButton()
|
||||||
for i=1,#Buttons[scene]do
|
for k,B in next,Buttons[scene]do
|
||||||
local B=Buttons[scene][i]
|
|
||||||
if not(B.hide and B.hide())then
|
if not(B.hide and B.hide())then
|
||||||
local C=B.rgb or color.white
|
local C=B.rgb or color.white
|
||||||
gc.setColor(C[1],C[2],C[3],B.alpha)
|
gc.setColor(C[1],C[2],C[3],B.alpha)
|
||||||
gc.rectangle("fill",B.x-B.w*.5,B.y-B.h*.5,B.w,B.h)
|
gc.rectangle("fill",B.x-B.w*.5,B.y-B.h*.5,B.w,B.h)
|
||||||
|
gc.setColor(C)
|
||||||
|
gc.setLineWidth(3)gc.rectangle("line",B.x-B.w*.5,B.y-B.h*.5,B.w,B.h,4)
|
||||||
gc.setColor(C[1],C[2],C[3],.3)
|
gc.setColor(C[1],C[2],C[3],.3)
|
||||||
gc.setLineWidth(5)gc.rectangle("line",B.x-B.w*.5,B.y-B.h*.5,B.w,B.h,4)
|
gc.setLineWidth(5)gc.rectangle("line",B.x-B.w*.5,B.y-B.h*.5,B.w,B.h,4)
|
||||||
local t=B.t
|
local t=B.t
|
||||||
@@ -130,17 +130,14 @@ function drawButton()
|
|||||||
if t then
|
if t then
|
||||||
if type(t)=="function"then t=t()end
|
if type(t)=="function"then t=t()end
|
||||||
setFont(B.f or 40)
|
setFont(B.f or 40)
|
||||||
y0=B.y-7-currentFont*.5
|
y0=B.y-currentFont*.64
|
||||||
mStr(t,B.x-1,y0)
|
gc.printf(t,B.x-201,y0+2,400,"center")
|
||||||
mStr(t,B.x+1,y0)
|
gc.printf(t,B.x-199,y0+2,400,"center")
|
||||||
mStr(t,B.x-1,y0+2)
|
gc.printf(t,B.x-201,y0,400,"center")
|
||||||
mStr(t,B.x+1,y0+2)
|
gc.printf(t,B.x-199,y0,400,"center")
|
||||||
end
|
gc.setColor(C)
|
||||||
gc.setColor(C)
|
|
||||||
if t then
|
|
||||||
mStr(t,B.x,y0+1)
|
mStr(t,B.x,y0+1)
|
||||||
end
|
end
|
||||||
gc.setLineWidth(3)gc.rectangle("line",B.x-B.w*.5,B.y-B.h*.5,B.w,B.h,4)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -178,7 +175,7 @@ function drawVirtualkey()
|
|||||||
local P=players[1]
|
local P=players[1]
|
||||||
for i=1,#virtualkey do
|
for i=1,#virtualkey do
|
||||||
local p,b=virtualkeyDown[i],virtualkey[i]
|
local p,b=virtualkeyDown[i],virtualkey[i]
|
||||||
if p then gc.setColor(.75,.75,.75,a)
|
if p then gc.setColor(.7,.7,.7,a)
|
||||||
else gc.setColor(1,1,1,a)
|
else gc.setColor(1,1,1,a)
|
||||||
end
|
end
|
||||||
gc.setLineWidth(b[4]*.07)
|
gc.setLineWidth(b[4]*.07)
|
||||||
@@ -268,7 +265,7 @@ function Pnt.main()
|
|||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
gc.draw(titleImage,300,30)
|
gc.draw(titleImage,300,30)
|
||||||
setFont(30)
|
setFont(30)
|
||||||
gc.print("Alpha V0.7.11",290,140)
|
gc.print("Alpha V0.7.12",290,140)
|
||||||
gc.print(system,800,110)
|
gc.print(system,800,110)
|
||||||
end
|
end
|
||||||
function Pnt.mode()
|
function Pnt.mode()
|
||||||
@@ -356,8 +353,15 @@ function Pnt.play()
|
|||||||
gc.setColor(0,0,0,.6)gc.rectangle("fill",0,0,600,690)--Black Background
|
gc.setColor(0,0,0,.6)gc.rectangle("fill",0,0,600,690)--Black Background
|
||||||
gc.setLineWidth(7)
|
gc.setLineWidth(7)
|
||||||
gc.setColor(frameColor[P.strength])gc.rectangle("line",0,0,600,690)--Big frame
|
gc.setColor(frameColor[P.strength])gc.rectangle("line",0,0,600,690)--Big frame
|
||||||
|
gc.translate(150,70)
|
||||||
|
if P.gameEnv.grid then
|
||||||
|
gc.setLineWidth(1)
|
||||||
|
gc.setColor(1,1,1,.2)
|
||||||
|
for x=1,9 do gc.line(30*x,-10,30*x,600)end
|
||||||
|
for y=0,19 do gc.line(0,30*y,300,30*y)end
|
||||||
|
end
|
||||||
gc.stencil(stencil_field,"replace", 1)
|
gc.stencil(stencil_field,"replace", 1)
|
||||||
gc.translate(150,70+P.fieldBeneath)
|
gc.translate(0,P.fieldBeneath)
|
||||||
gc.setStencilTest("equal",1)
|
gc.setStencilTest("equal",1)
|
||||||
for j=int(P.fieldBeneath/30+1),#P.field do
|
for j=int(P.fieldBeneath/30+1),#P.field do
|
||||||
if P.falling<=0 or without(P.clearing,j)then
|
if P.falling<=0 or without(P.clearing,j)then
|
||||||
@@ -405,7 +409,10 @@ function Pnt.play()
|
|||||||
gc.setStencilTest()--In-playField mask
|
gc.setStencilTest()--In-playField mask
|
||||||
gc.translate(0,-P.fieldBeneath)
|
gc.translate(0,-P.fieldBeneath)
|
||||||
gc.setLineWidth(3)
|
gc.setLineWidth(3)
|
||||||
gc.setColor(1,1,1)gc.rectangle("line",-1,-11,302,612)--Draw boarder
|
gc.setColor(1,1,1)
|
||||||
|
gc.rectangle("line",-1,-11,302,612)--Draw boarder
|
||||||
|
gc.setLineWidth(2)
|
||||||
|
gc.rectangle("line",301,0,16,601.5)--Draw atkBuffer boarder
|
||||||
|
|
||||||
local h=0
|
local h=0
|
||||||
for i=1,#P.atkBuffer do
|
for i=1,#P.atkBuffer do
|
||||||
@@ -419,21 +426,21 @@ function Pnt.play()
|
|||||||
end
|
end
|
||||||
if a.countdown>0 then
|
if a.countdown>0 then
|
||||||
gc.setColor(attackColor[a.lv][1])
|
gc.setColor(attackColor[a.lv][1])
|
||||||
gc.rectangle("fill",304,600-h,12,-bar+3)
|
gc.rectangle("fill",304,599-h,11,-bar+3)
|
||||||
gc.setColor(attackColor[a.lv][2])
|
gc.setColor(attackColor[a.lv][2])
|
||||||
gc.rectangle("fill",304,600-h+(-bar+3),12,-(-bar+3)*(1-a.countdown/a.cd0))
|
gc.rectangle("fill",304,599-h+(-bar+3),11,-(-bar+3)*(1-a.countdown/a.cd0))
|
||||||
--Timing
|
--Timing
|
||||||
else
|
else
|
||||||
local t=sin((Timer()-i)*20)*.5+.5
|
local t=sin((Timer()-i)*30)*.5+.5
|
||||||
local c1,c2=attackColor[a.lv][1],attackColor[a.lv][2]
|
local c1,c2=attackColor[a.lv][1],attackColor[a.lv][2]
|
||||||
gc.setColor(c1[1]*t+c2[1]*(1-t),c1[2]*t+c2[2]*(1-t),c1[3]*t+c2[3]*(1-t))
|
gc.setColor(c1[1]*t+c2[1]*(1-t),c1[2]*t+c2[2]*(1-t),c1[3]*t+c2[3]*(1-t))
|
||||||
gc.rectangle("fill",304,600-h,12,-bar+3)
|
gc.rectangle("fill",304,599-h,11,-bar+3)
|
||||||
--Warning
|
--Warning
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
gc.setColor(attackColor[a.lv][1])
|
gc.setColor(attackColor[a.lv][1])
|
||||||
bar=bar*(20-a.time)*.05
|
bar=bar*(20-a.time)*.05
|
||||||
gc.rectangle("fill",304,600-h,12,-bar+2)
|
gc.rectangle("fill",304,599-h,11,-bar+2)
|
||||||
--Disappear
|
--Disappear
|
||||||
end
|
end
|
||||||
h=h+bar
|
h=h+bar
|
||||||
@@ -463,7 +470,7 @@ function Pnt.play()
|
|||||||
for i=1,#b do
|
for i=1,#b do
|
||||||
for j=1,#b[1] do
|
for j=1,#b[1] do
|
||||||
if b[i][j]>0 then
|
if b[i][j]>0 then
|
||||||
drawPixel(i+20-2.4*N-#b*.5,j+12.5-#b[1]*.5,P.nextColor[N],1)
|
drawPixel(i+20-2.4*N-#b*.5,j+12.7-#b[1]*.5,P.nextColor[N],1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -544,30 +551,31 @@ end
|
|||||||
function Pnt.setting()
|
function Pnt.setting()
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
setFont(35)
|
setFont(35)
|
||||||
mStr("DAS:"..setting.das,288,158)
|
mStr("DAS:"..setting.das,290,208)
|
||||||
mStr("ARR:"..setting.arr,503,158)
|
mStr("ARR:"..setting.arr,506,208)
|
||||||
setFont(18)
|
setFont(18)
|
||||||
mStr(text.softdropdas..setting.sddas,288,249)
|
mStr(text.softdropdas..setting.sddas,290,291)
|
||||||
mStr(text.softdroparr..setting.sdarr,503,249)
|
mStr(text.softdroparr..setting.sdarr,506,291)
|
||||||
end
|
end
|
||||||
function Pnt.setting2()
|
function Pnt.setting2()
|
||||||
|
local a=.2+(sin(Timer()*15)+1)*.1
|
||||||
if keyboardSetting then
|
if keyboardSetting then
|
||||||
gc.setColor(1,.5,.5,.2+(sin(Timer()*15)+1)*.1)
|
gc.setColor(1,.5,.5,a)
|
||||||
else
|
else
|
||||||
gc.setColor(.9,.9,.9,.2+(sin(Timer()*15)+1)*.1)
|
gc.setColor(.9,.9,.9,a)
|
||||||
end
|
end
|
||||||
gc.rectangle("fill",240,40*keyboardSet-10,200,40)
|
gc.rectangle("fill",240,40*keyboardSet-10,200,40)
|
||||||
if joystickSetting then
|
if joystickSetting then
|
||||||
gc.setColor(1,.5,.5,.2+(sin(Timer()*15)+1)*.1)
|
gc.setColor(1,.5,.5,a)
|
||||||
else
|
else
|
||||||
gc.setColor(.9,.9,.9,.2+(sin(Timer()*15)+1)*.1)
|
gc.setColor(.9,.9,.9,a)
|
||||||
end
|
end
|
||||||
gc.rectangle("fill",440,40*joystickSet-10,200,40)
|
gc.rectangle("fill",440,40*joystickSet-10,200,40)
|
||||||
|
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
setFont(25)
|
setFont(25)
|
||||||
for y=1,13 do
|
for y=1,13 do
|
||||||
mStr(text.actName[y],150,40*y)
|
mStr(text.actName[y],150,40*y-5)
|
||||||
for x=1,2 do
|
for x=1,2 do
|
||||||
mStr(setting.keyMap[curBoard+x*8-8][y],200*x+140,40*y-3)
|
mStr(setting.keyMap[curBoard+x*8-8][y],200*x+140,40*y-3)
|
||||||
end
|
end
|
||||||
@@ -615,13 +623,10 @@ end
|
|||||||
function Pnt.stat()
|
function Pnt.stat()
|
||||||
setFont(35)
|
setFont(35)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
for i=1,10 do
|
for i=1,10 do gc.print(text.stat[i],350,20+40*i)end
|
||||||
gc.print(text.stat[i],350,20+40*i)
|
|
||||||
end
|
|
||||||
|
|
||||||
gc.print(stat.run,650,60)
|
gc.print(stat.run,650,60)
|
||||||
gc.print(stat.game,650,100)
|
gc.print(stat.game,650,100)
|
||||||
gc.print(format("%0.2f",stat.gametime).."s",650,140)
|
gc.print(format("%0.1fhr",stat.gametime*2.78e-4),650,140)
|
||||||
gc.print(stat.piece,650,180)
|
gc.print(stat.piece,650,180)
|
||||||
gc.print(stat.row,650,220)
|
gc.print(stat.row,650,220)
|
||||||
gc.print(stat.atk,650,260)
|
gc.print(stat.atk,650,260)
|
||||||
@@ -629,6 +634,5 @@ function Pnt.stat()
|
|||||||
gc.print(stat.rotate,650,340)
|
gc.print(stat.rotate,650,340)
|
||||||
gc.print(stat.hold,650,380)
|
gc.print(stat.hold,650,380)
|
||||||
gc.print(stat.spin,650,420)
|
gc.print(stat.spin,650,420)
|
||||||
|
|
||||||
gc.draw(titleImage,260,570,.2+.07*sin(Timer()*3),.8,nil,250,60)
|
gc.draw(titleImage,260,570,.2+.07*sin(Timer()*3),.8,nil,250,60)
|
||||||
end
|
end
|
||||||
87
texture.lua
87
texture.lua
@@ -1,5 +1,6 @@
|
|||||||
|
local c
|
||||||
local N=gc.newImage
|
local N=gc.newImage
|
||||||
function C(x,y)
|
local C=function(x,y)
|
||||||
c=gc.newCanvas(x,y)
|
c=gc.newCanvas(x,y)
|
||||||
gc.setCanvas(c)
|
gc.setCanvas(c)
|
||||||
return c
|
return c
|
||||||
@@ -17,21 +18,8 @@ for i=1,13 do
|
|||||||
gc.draw(blockImg,6-6*i,0,nil,.2)
|
gc.draw(blockImg,6-6*i,0,nil,.2)
|
||||||
blockSkinmini[i]=c
|
blockSkinmini[i]=c
|
||||||
end
|
end
|
||||||
for i=1,13 do
|
|
||||||
end
|
|
||||||
blockImg:release()
|
blockImg:release()
|
||||||
|
|
||||||
RCPB={10,33,200,33,105,5,105,60}
|
|
||||||
do royaleCtrlPad=C(300,100)
|
|
||||||
gc.setColor(1,1,1)
|
|
||||||
setFont(25)
|
|
||||||
gc.setLineWidth(2)
|
|
||||||
for i=1,4 do
|
|
||||||
gc.rectangle("line",RCPB[2*i-1],RCPB[2*i],90,35,8,4)
|
|
||||||
mStr(atkModeName[i],RCPB[2*i-1]+45,RCPB[2*i]+3)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
virtualkeyIcon={}
|
virtualkeyIcon={}
|
||||||
for i=1,10 do
|
for i=1,10 do
|
||||||
virtualkeyIcon[i]=N("/image/virtualkey/"..actName[i]..".png")
|
virtualkeyIcon[i]=N("/image/virtualkey/"..actName[i]..".png")
|
||||||
@@ -96,73 +84,4 @@ groupCode=N("/image/mess/groupcode.png")
|
|||||||
payCode=N("/image/mess/paycode.png")
|
payCode=N("/image/mess/paycode.png")
|
||||||
|
|
||||||
c=nil
|
c=nil
|
||||||
gc.setCanvas()
|
gc.setCanvas()
|
||||||
|
|
||||||
sceneInit={
|
|
||||||
load=function()
|
|
||||||
curBG="none"
|
|
||||||
keeprun=true
|
|
||||||
loading=1--Loading mode
|
|
||||||
loadnum=1--Loading counter
|
|
||||||
loadprogress=0--Loading bar(0~1)
|
|
||||||
end,
|
|
||||||
intro=function()
|
|
||||||
curBG="none"
|
|
||||||
count=0
|
|
||||||
keeprun=true
|
|
||||||
end,
|
|
||||||
main=function()
|
|
||||||
curBG="none"
|
|
||||||
keeprun=true
|
|
||||||
collectgarbage()
|
|
||||||
end,
|
|
||||||
mode=function()
|
|
||||||
saveData()
|
|
||||||
modeSel=modeSel or 1
|
|
||||||
levelSel=levelSel or 3
|
|
||||||
curBG="none"
|
|
||||||
keeprun=true
|
|
||||||
end,
|
|
||||||
custom=function()
|
|
||||||
optSel=optSel or 1
|
|
||||||
curBG="matrix"
|
|
||||||
keeprun=true
|
|
||||||
end,
|
|
||||||
play=function()
|
|
||||||
keeprun=false
|
|
||||||
resetGameData()
|
|
||||||
sysSFX("ready")
|
|
||||||
mouseShow=false
|
|
||||||
end,
|
|
||||||
setting=function()
|
|
||||||
curBG="none"
|
|
||||||
keeprun=true
|
|
||||||
end,
|
|
||||||
setting2=function()
|
|
||||||
curBG="none"
|
|
||||||
keeprun=true
|
|
||||||
curBoard=1
|
|
||||||
keyboardSet=1
|
|
||||||
joystickSet=1
|
|
||||||
keyboardSetting=false
|
|
||||||
joystickSetting=false
|
|
||||||
end,--Control settings
|
|
||||||
setting3=function()
|
|
||||||
curBG="game1"
|
|
||||||
keeprun=true
|
|
||||||
defaultSel=1
|
|
||||||
sel=nil
|
|
||||||
snapLevel=1
|
|
||||||
end,--Touch setting
|
|
||||||
help=function()
|
|
||||||
curBG="none"
|
|
||||||
keeprun=true
|
|
||||||
end,
|
|
||||||
stat=function()
|
|
||||||
curBG="none"
|
|
||||||
keeprun=true
|
|
||||||
end,
|
|
||||||
quit=function()
|
|
||||||
love.event.quit()
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
13
timer.lua
13
timer.lua
@@ -4,7 +4,7 @@ function Tmr.load()
|
|||||||
loadnum=loadnum+1
|
loadnum=loadnum+1
|
||||||
loadprogress=loadnum/10
|
loadprogress=loadnum/10
|
||||||
if loadnum==5 then
|
if loadnum==5 then
|
||||||
--require("load_texture")
|
--require("texture")
|
||||||
elseif loadnum==10 then
|
elseif loadnum==10 then
|
||||||
loadnum=1
|
loadnum=1
|
||||||
loading=2
|
loading=2
|
||||||
@@ -13,6 +13,7 @@ function Tmr.load()
|
|||||||
if loadnum<=#bgm then
|
if loadnum<=#bgm then
|
||||||
bgm[bgm[loadnum]]=love.audio.newSource("/BGM/"..bgm[loadnum]..".ogg","stream")
|
bgm[bgm[loadnum]]=love.audio.newSource("/BGM/"..bgm[loadnum]..".ogg","stream")
|
||||||
bgm[bgm[loadnum]]:setLooping(true)
|
bgm[bgm[loadnum]]:setLooping(true)
|
||||||
|
bgm[bgm[loadnum]]:setVolume(0)
|
||||||
loadprogress=loadnum/#bgm
|
loadprogress=loadnum/#bgm
|
||||||
loadnum=loadnum+1
|
loadnum=loadnum+1
|
||||||
else
|
else
|
||||||
@@ -119,6 +120,11 @@ function Tmr.play(dt)
|
|||||||
else
|
else
|
||||||
AI_getControls(P.ai.controls)
|
AI_getControls(P.ai.controls)
|
||||||
P.ai.controlDelay=P.ai.controlDelay0+2
|
P.ai.controlDelay=P.ai.controlDelay0+2
|
||||||
|
if Timer()-P.cstat.point>P.cstat.event then
|
||||||
|
P.cstat.point=Timer()
|
||||||
|
P.cstat.event=P.ai.controlDelay0+rnd(2,10)
|
||||||
|
changeAtkMode(rnd()<.85 and 1 or #P.atker>3 and 4 or rnd()<.35 and 2 or 3)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -234,9 +240,6 @@ function Tmr.play(dt)
|
|||||||
if b.t>=60 then rem(P.bonus,i)end
|
if b.t>=60 then rem(P.bonus,i)end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
for i=#P.task,1,-1 do
|
|
||||||
if P.task[i]()then rem(P.task,i)end
|
|
||||||
end
|
|
||||||
for i=#P.atkBuffer,1,-1 do
|
for i=#P.atkBuffer,1,-1 do
|
||||||
local atk=P.atkBuffer[i]
|
local atk=P.atkBuffer[i]
|
||||||
atk.time=atk.time+1
|
atk.time=atk.time+1
|
||||||
@@ -255,5 +258,5 @@ function Tmr.play(dt)
|
|||||||
PTC.dust[p]:update(dt)
|
PTC.dust[p]:update(dt)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if modeEnv.royaleMode and frame%60==0 then freshMostDangerous()end
|
if modeEnv.royaleMode and frame%120==0 then freshMostDangerous()end
|
||||||
end
|
end
|
||||||
82
toolfunc.lua
82
toolfunc.lua
@@ -8,7 +8,6 @@ function string.splitS(s,sep)
|
|||||||
return t
|
return t
|
||||||
end
|
end
|
||||||
function sgn(i)return i>0 and 1 or i<0 and -1 or 0 end--Row numbe is A-uth-or's id!
|
function sgn(i)return i>0 and 1 or i<0 and -1 or 0 end--Row numbe is A-uth-or's id!
|
||||||
function stringPack(s,v)return s..toS(v)end
|
|
||||||
function without(t,v)
|
function without(t,v)
|
||||||
for i=1,#t do
|
for i=1,#t do
|
||||||
if t[i]==v then return end
|
if t[i]==v then return end
|
||||||
@@ -66,7 +65,7 @@ function stencil_miniTitle()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
function stencil_field()
|
function stencil_field()
|
||||||
gc.rectangle("fill",150,60,300,610)
|
gc.rectangle("fill",0,-10,300,610)
|
||||||
end
|
end
|
||||||
function stencil_field_small()
|
function stencil_field_small()
|
||||||
gc.rectangle("fill",0,0,60,120)
|
gc.rectangle("fill",0,0,60,120)
|
||||||
@@ -75,12 +74,24 @@ end
|
|||||||
function swapLanguage(l)
|
function swapLanguage(l)
|
||||||
text=require("language/"..langID[l])
|
text=require("language/"..langID[l])
|
||||||
Buttons.sel=nil
|
Buttons.sel=nil
|
||||||
for scene,list in pairs(Buttons)do
|
for S,L in next,Buttons do
|
||||||
for num=1,#list do
|
for N,B in next,L do
|
||||||
list[num].alpha=0
|
B.alpha=0
|
||||||
list[num].t=text.ButtonText[scene][num]
|
B.t=text.ButtonText[S][N]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if royaleCtrlPad then royaleCtrlPad:release()end
|
||||||
|
royaleCtrlPad=gc.newCanvas(300,100)
|
||||||
|
gc.setCanvas(royaleCtrlPad)
|
||||||
|
gc.setColor(1,1,1)
|
||||||
|
setFont(25)
|
||||||
|
gc.setLineWidth(2)
|
||||||
|
for i=1,4 do
|
||||||
|
gc.rectangle("line",RCPB[2*i-1],RCPB[2*i],90,35,8,4)
|
||||||
|
mStr(text.atkModeName[i],RCPB[2*i-1]+45,RCPB[2*i]+3)
|
||||||
|
end
|
||||||
|
gc.setCanvas()
|
||||||
|
collectgarbage()
|
||||||
end
|
end
|
||||||
function VIB(t)
|
function VIB(t)
|
||||||
if setting.vib>0 then
|
if setting.vib>0 then
|
||||||
@@ -121,8 +132,16 @@ function SFX(s,v)
|
|||||||
end
|
end
|
||||||
function BGM(s)
|
function BGM(s)
|
||||||
if setting.bgm and bgmPlaying~=s then
|
if setting.bgm and bgmPlaying~=s then
|
||||||
for k,v in pairs(bgm)do v:stop()end
|
if bgmPlaying then newTask(Event_task.bgmFadeOut,nil,bgmPlaying)end
|
||||||
if s then bgm[s]:play()end
|
for i=1,#Task do
|
||||||
|
if Task[i].code==Event_task.bgmFadeIn then
|
||||||
|
Task[i].code=Event_task.bgmFadeOut
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if s then
|
||||||
|
newTask(Event_task.bgmFadeIn,nil,s)
|
||||||
|
bgm[s]:play()
|
||||||
|
end
|
||||||
bgmPlaying=s
|
bgmPlaying=s
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -163,18 +182,11 @@ function loadData()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
function saveData()
|
function saveData()
|
||||||
local t=table.concat({
|
local t={}
|
||||||
stringPack("run=",stat.run),
|
for i=1,#dataOpt do
|
||||||
stringPack("game=",stat.game),
|
ins(t,dataOpt[i].."="..toS(stat[dataOpt[i]]))
|
||||||
stringPack("gametime=",stat.gametime),
|
end
|
||||||
stringPack("piece=",stat.piece),
|
t=table.concat(t,"\r\n")
|
||||||
stringPack("row=",stat.row),
|
|
||||||
stringPack("atk=",stat.atk),
|
|
||||||
stringPack("key=",stat.key),
|
|
||||||
stringPack("rotate=",stat.rotate),
|
|
||||||
stringPack("hold=",stat.hold),
|
|
||||||
stringPack("spin=",stat.spin),
|
|
||||||
},"\r\n")
|
|
||||||
--t=love.math.compress(t,"zlib"):getString()
|
--t=love.math.compress(t,"zlib"):getString()
|
||||||
userData:open("w")
|
userData:open("w")
|
||||||
userData:write(t)
|
userData:write(t)
|
||||||
@@ -239,7 +251,7 @@ function loadSetting()
|
|||||||
elseif t=="das"or t=="arr"or t=="sddas"or t=="sdarr"then
|
elseif t=="das"or t=="arr"or t=="sddas"or t=="sdarr"then
|
||||||
v=toN(v)if not v or v<0 then v=0 end
|
v=toN(v)if not v or v<0 then v=0 end
|
||||||
setting[t]=int(v)
|
setting[t]=int(v)
|
||||||
elseif t=="ghost"or t=="center"then
|
elseif t=="ghost"or t=="center"or t=="grid"or t=="swap"then
|
||||||
setting[t]=v=="true"
|
setting[t]=v=="true"
|
||||||
elseif t=="lang"then
|
elseif t=="lang"then
|
||||||
setting[t]=toN(v:match("[12]"))or 1
|
setting[t]=toN(v:match("[12]"))or 1
|
||||||
@@ -263,25 +275,15 @@ function saveSetting()
|
|||||||
for i=1,4 do
|
for i=1,4 do
|
||||||
lib[i]=table.concat(setting.keyLib[i],",")
|
lib[i]=table.concat(setting.keyLib[i],",")
|
||||||
end
|
end
|
||||||
local t=table.concat({
|
local t={
|
||||||
stringPack("lang=",setting.lang),
|
"keymap="..toS(table.concat(map,"/")),
|
||||||
stringPack("sfx=",setting.sfx),
|
"keylib="..toS(table.concat(lib,"/")),
|
||||||
stringPack("bgm=",setting.bgm),
|
"virtualkey="..toS(table.concat(vk,"/")),
|
||||||
stringPack("vib=",setting.vib),
|
}
|
||||||
stringPack("fullscreen=",setting.fullscreen),
|
for i=1,#saveOpt do
|
||||||
stringPack("bgblock=",setting.bgblock),
|
ins(t,saveOpt[i].."="..toS(setting[saveOpt[i]]))
|
||||||
stringPack("das=",setting.das),
|
end
|
||||||
stringPack("arr=",setting.arr),
|
t=table.concat(t,"\r\n")
|
||||||
stringPack("sddas=",setting.sddas),
|
|
||||||
stringPack("sdarr=",setting.sdarr),
|
|
||||||
stringPack("keymap=",table.concat(map,"/")),
|
|
||||||
stringPack("keylib=",table.concat(lib,"/")),
|
|
||||||
stringPack("virtualkey=",table.concat(vk,"/")),
|
|
||||||
stringPack("virtualkeyAlpha=",setting.virtualkeyAlpha),
|
|
||||||
stringPack("virtualkeyIcon=",setting.virtualkeyIcon),
|
|
||||||
stringPack("virtualkeySwitch=",setting.virtualkeySwitch),
|
|
||||||
stringPack("frameMul=",setting.frameMul),
|
|
||||||
},"\r\n")
|
|
||||||
--t=love.math.compress(t,"zlib"):getString()
|
--t=love.math.compress(t,"zlib"):getString()
|
||||||
userSetting:open("w")
|
userSetting:open("w")
|
||||||
userSetting:write(t)
|
userSetting:write(t)
|
||||||
|
|||||||
Reference in New Issue
Block a user