Compare commits

...

8 Commits

Author SHA1 Message Date
MrZ_26
e1d92a166b 0.8.24: Bug Fixed 2020-06-14 15:21:20 +08:00
MrZ_26
99b55b72e0 0.8.23: Details Update 2020-06-07 01:06:31 +08:00
MrZ_26
08883b952f 0.8.22:Shader Update 2020-05-28 15:16:38 +08:00
MrZ_26
76fab86692 player generator优化 2020-05-23 00:09:53 +08:00
MrZ_26
725eb4e26f 0.8.22pre1 2020-05-23 00:05:04 +08:00
MrZ_26
486a64cca3 0.8.21: Bug Fixed 2020-05-23 00:04:21 +08:00
FinnTenzor
8e5f6f8b7c 在不影响newXXXPlayer逻辑的情况下调整函数体 为RemotePlayer预留位置 2020-05-21 17:09:39 +08:00
Finn
c0149d5830 Merge pull request #1 from MrZ626/master
0.8.19/20: Fantastic Global Update II
2020-05-21 16:32:44 +08:00
115 changed files with 1571 additions and 1247 deletions

BIN
BGM/far.ogg Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -120,8 +120,8 @@ function keyDown.load(k)
sceneTemp.skip=true
end
end
function touchDown.load()
if #tc.getTouches()>2 then
function touchDown.load(id,x,y)
if #tc.getTouches()==2 then
sceneTemp.skip=true
end
end
@@ -669,6 +669,44 @@ function touchDown.help(id,x,y)
sceneTemp.pw=pw
end
function keyDown.staff(key,RESET)
if key=="escape"then
SCN.back()
elseif key=="\122"then
if kb.isDown("\109")and kb.isDown("\114")or RESET then
sceneTemp.ct=sceneTemp.ct+1
if sceneTemp.ct==5 then
TEXT.show("What are you up to?",640,200,40,"appear",.5)
elseif sceneTemp.ct==10 then
TEXT.show("Stop what you are doing.",640,200,40,"flicker",.5)
elseif sceneTemp.ct==20 then
TEXT.show("RESET ALL DATA?",640,200,40,"appear",.3,.2)
elseif sceneTemp.ct==26 then
local L=love.filesystem.getDirectoryItems("")
for i=1,#L do
local s=L[i]
if s:sub(-4)==".dat"then
love.filesystem.remove(s)
end
end
SFX.play("lock")
SFX.play("clear_4")
SFX.play("finesseError_long")
SCN.back()
TEXT.clear()
end
sceneTemp.v=-6.26
marking=nil
SFX.play("reach")
end
end
end
function touchDown.staff(id,x,y)
if #tc.getTouches()==5 then
keyDown.staff('\122',true)
end
end
function wheelMoved.history(x,y)
wheelScroll(y)
end
@@ -800,16 +838,11 @@ function love.keypressed(i)
local W=WIDGET.sel
if W then W:getInfo()end
elseif i=="f3"then
error("Techmino:挂了")
assert(false,"Techmino:挂了")
elseif i=="e"then
for k,v in next,_G do
print(k,v)
end
elseif i=="\122"then
if kb.isDown("\109")and kb.isDown("\114")then
marking=nil
SFX.play("reach")
end
elseif WIDGET.sel then
local W=WIDGET.sel
if i=="left"then W.x=W.x-10
@@ -901,9 +934,10 @@ function love.lowmemory()
collectgarbage()
end
function love.resize(w,h)
love.timer.sleep(.26)
scr.w,scr.h,scr.r=w,h,h/w
scr.w,scr.h=w,h
scr.r=h/w
scr.rad=(w^2+h^2)^.5
scr.dpi=gc.getDPIScale()
if scr.r>=.5625 then
scr.k=w/1280
scr.x,scr.y=0,(h-w*9/16)*.5
@@ -913,6 +947,9 @@ function love.resize(w,h)
end
xOy=xOy:setTransformation(w*.5,h*.5,nil,scr.k,nil,640,360)
BG.resize(w,h)
SHADER.warning:send("w",w*scr.dpi)
SHADER.warning:send("h",h*scr.dpi)
end
function love.focus(f)
if SCN.cur=="play"and not f and setting.autoPause then pauseGame()end
@@ -938,6 +975,7 @@ function love.run()
SCN.init("load")--Scene Launch
marking=true
return function()
local _
--EVENT
PUMP()
for N,a,b,c,d,e in POLL()do
@@ -948,6 +986,7 @@ function love.run()
return 1
end
end
--UPDATE
STEP()local dt=GETDelta()
TASK.update()
@@ -955,7 +994,7 @@ function love.run()
BG.update(dt)
sysFX.update(dt)
TEXT.update()
local _=Tmr[SCN.cur]if _ then _(dt)end--Scene Updater
_=Tmr[SCN.cur]if _ then _(dt)end--Scene Updater
if SCN.swapping then SCN.swapUpdate()end--Scene swapping animation
WIDGET.update()--Widgets animation
@@ -1019,76 +1058,11 @@ function love.run()
if Timer()-lastFrame<.058 then WAIT(.01)end
while Timer()-lastFrame<.0159 do WAIT(.001)end
--FRESH POWER
--FRESH POWERINFO
lastFrame=Timer()
if Timer()-lastFreshPow>3 and setting.powerInfo and SCN.cur~="load"then
updatePowerInfo()
lastFreshPow=Timer()
end
end
end
function love.errorhandler(msg)
local PUMP,POLL=love.event.pump,love.event.poll
love.mouse.setVisible(true)
love.audio.stop()
local err={"Error:"..msg}
local trace=debug.traceback("",2)
local c=2
for l in string.gmatch(trace,"(.-)\n")do
if c>2 then
if not string.find(l,"boot")then
err[c]=string.gsub(l,"^\t*","")
c=c+1
end
else
err[2]="Traceback"
c=3
end
end
print(table.concat(err,"\n"),1,c-2)
gc.reset()
local CAP
local function _(_)CAP=gc.newImage(_)end
gc.captureScreenshot(_)
gc.present()
setting.sfx=setting.voc--only for error "voice" played with voice volume,not saved
if SFX.list.error then SFX.play("error",.8)end
local BGcolor=rnd()>.026 and{.3,.5,.9},{.62,.3,.926}
local needDraw=true
return function()
PUMP()
for E,a,b,c,d,e in POLL()do
if E=="quit"or a=="escape"then
destroyPlayers()
return 1
elseif E=="resize"then
love.resize(a,b)
needDraw=true
elseif E=="focus"then
needDraw=true
end
end
if needDraw then
gc.discard()
gc.clear(BGcolor)
gc.setColor(1,1,1)
gc.push("transform")
gc.replaceTransform(xOy)
gc.draw(CAP,100,365,nil,512/CAP:getWidth(),288/CAP:getHeight())
setFont(120)gc.print(":(",100,40)
setFont(38)gc.printf(text.errorMsg,100,200,1280-100)
setFont(20)
gc.print(system.."-"..gameVersion,100,660)
gc.print("scene:"..SCN.cur,400,660)
gc.printf(err[1],626,360,1260-626)
gc.print("TRACEBACK",626,426)
for i=4,#err-2 do
gc.print(err[i],626,370+20*i)
end
gc.pop()
gc.present()
needDraw=false
end
love.timer.sleep(.2)
end
end

View File

@@ -1,4 +1,4 @@
gameVersion="Alpha V0.8.20"
gameVersion="Alpha V0.8.24"
function love.conf(t)
t.identity="Techmino"--folder name
t.version="11.1"

BIN
font.ttf

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

BIN
image/mess/electric.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
image/skin/classic(_).png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

BIN
image/skin/paper(mrz).png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -55,17 +55,18 @@ WIDGET=require("parts/widget")
LIGHT=require("parts/light")
require("parts/modes")
require("default_data")
require("parts/default_data")
require("parts/ai")
require("player")
PLY=require("player")
widgetList=require("widgetList")
require("callback")
--load files & settings
local fs=love.filesystem
if fs.getInfo("keymap.dat")then fs.remove("keymap.dat")end
if fs.getInfo("setting.dat")then fs.remove("setting.dat")end
if fs.getInfo("setting.dat")then FILE.loadSetting()
if fs.getInfo("settings.dat")then FILE.loadSetting()
else
-- firstRun=true
if system=="Android"or system=="iOS" then
@@ -81,4 +82,86 @@ if setting.fullscreen then love.window.setFullscreen(true)end
if fs.getInfo("unlock.dat")then FILE.loadUnlock()end
if fs.getInfo("data.dat")then FILE.loadData()end
if fs.getInfo("key.dat")then FILE.loadKeyMap()end
if fs.getInfo("virtualkey.dat")then FILE.loadVK()end
if fs.getInfo("virtualkey.dat")then FILE.loadVK()end
--update data file
S=stat
if not S.version or S.version=="Alpha V0.8.15"then
S.clear_S={S.clear_1,S.clear_2,S.clear_3,S.clear_4}
S.clear={{},{},{},{},{},{},{}}
local A,B,C,D=int(S.clear_1/7),int(S.clear_2/7),int(S.clear_3/7),S.clear_4
for i=1,7 do
S.clear[i][1]=A
S.clear[i][2]=B
S.clear[i][3]=C
S.clear[i][4]=0
end
S.clear[7][4]=D
for i=1,S.clear_1%7 do S.clear[i][1]=S.clear[i][1]+1 end
for i=1,S.clear_2%7 do S.clear[i][2]=S.clear[i][2]+1 end
for i=1,S.clear_3%7 do S.clear[i][3]=S.clear[i][3]+1 end
S.clear_B={}
for i=1,7 do
S.clear_B[i]=S.clear[i][1]+S.clear[i][2]+S.clear[i][3]+S.clear[i][4]
end
S.spin_S={S.spin_0,S.spin_1,S.spin_2,S.spin_3}
S.spin={{},{},{},{},{},{},{}}
A,B,C,D=int(S.spin_0/7),int(S.spin_1/7),int(S.spin_2/7),int(S.spin_3/7)
for i=1,7 do
S.spin[i][1]=A
S.spin[i][2]=B
S.spin[i][3]=C
S.spin[i][4]=D
end
for i=1,S.spin_0%7 do S.spin[i][1]=S.spin[i][1]+1 end
for i=1,S.spin_1%7 do S.spin[i][2]=S.spin[i][2]+1 end
for i=1,S.spin_2%7 do S.spin[i][3]=S.spin[i][3]+1 end
for i=1,S.spin_3%7 do S.spin[i][4]=S.spin[i][4]+1 end
S.spin_B={}
for i=1,7 do
S.spin_B[i]=S.spin[i][1]+S.spin[i][2]+S.spin[i][3]+S.spin[i][4]
end
S.hpc=S.c
elseif S.version=="Alpha V0.8.16"then
for i=1,6 do
S.clear[7][4]=S.clear[7][4]+S.clear[i][4]
S.clear[i][4]=0
end
end
if not S.clear_B[8]then
for i=1,7 do
S.clear[i][5]=0
S.spin[i][5]=0
end
for i=8,25 do
S.clear[i]={0,0,0,0,0}
S.spin[i]={0,0,0,0,0}
S.spin_B[i]=0
S.clear_B[i]=0
end
S.spin_S[5]=0
S.clear_S[5]=0
end
if S.version=="Alpha V0.8.18"or S.version=="Alpha V0.8.19"then
S.clear[3],S.clear[4]=S.clear[4],S.clear[3]
S.spin[3],S.spin[4]=S.spin[4],S.spin[3]
S.clear_B[3],S.clear_B[4]=S.clear_B[4],S.clear_B[3]
S.spin_B[3],S.spin_B[4]=S.spin_B[4],S.spin_B[3]
end
if S.version=="Alpha V0.8.22"then
S.off=S.recv-S.pend
end
while #modeRanks>73 do
table.remove(modeRanks)
end
if modeRanks[73]==6 then modeRanks[73]=0 end
if setting.skin[10]==5 then
setting.skin[10],setting.skin[11]=1,5
end
if S.version~=gameVersion then
S.version=gameVersion
TEXT.show(text.newVersion,640,200,30,"fly",.3)
end
S=nil

View File

@@ -30,11 +30,11 @@ return{
P:win("finish")
end
end,
bg="game3",bgm="shining terminal",
bg="aura",bgm="far",
},
slowMark=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
players[1].modeData.event="M7"
end,
mesDisp=function(P,dx,dy)

View File

@@ -39,7 +39,7 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(55)

View File

@@ -48,7 +48,7 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(55)

View File

@@ -11,13 +11,13 @@ return{
env={
drop=1e99,lock=1e99,
hold=false,
dropPiece=player.lose,
dropPiece=function(P)P:lose()end,
task=nil,
bg="game1",bgm="newera",
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
end,

View File

@@ -4,14 +4,14 @@ return{
env={
drop=30,lock=45,
visible="time",
dropPiece=player.reach_winCheck,
dropPiece=PLY.reach_winCheck,
freshLimit=10,
target=200,
bg="glow",bgm="newera",
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
mText(drawableText.line,-81,300)

View File

@@ -1,3 +1,4 @@
local gc=love.graphics
local min=math.min
return{
color=color.magenta,
@@ -6,14 +7,14 @@ return{
fall=10,lock=60,
center=false,
visible="none",
dropPiece=player.reach_winCheck,
dropPiece=PLY.reach_winCheck,
freshLimit=15,
target=200,
bg="rgb",bgm="secret7th",
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
mText(drawableText.line,-81,300)
@@ -21,6 +22,8 @@ return{
setFont(75)
mStr(P.stat.row,-81,220)
mStr(P.stat.clear_S[4],-81,340)
gc.setColor(1,1,1,.2)
gc.draw(IMG.electric,-26,120,0,2.6)
end,
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,

View File

@@ -1,3 +1,4 @@
local gc=love.graphics
local min=math.min
return{
color=color.red,
@@ -7,14 +8,14 @@ return{
center=false,ghost=false,
dropFX=0,lockFX=0,
visible="none",
dropPiece=player.reach_winCheck,
dropPiece=PLY.reach_winCheck,
freshLimit=15,
target=200,
bg="rgb",bgm="secret8th",
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
mText(drawableText.line,-81,300)
@@ -22,6 +23,8 @@ return{
setFont(75)
mStr(P.stat.row,-81,220)
mStr(P.stat.clear_S[4],-81,340)
gc.setColor(1,1,1,.2)
gc.draw(IMG.electric,-26,120,0,2.6)
end,
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,

View File

@@ -1,3 +1,4 @@
local gc=love.graphics
local min=math.min
return{
color=color.green,
@@ -5,14 +6,14 @@ return{
drop=15,lock=45,
freshLimit=10,
visible="fast",
dropPiece=player.reach_winCheck,
dropPiece=PLY.reach_winCheck,
freshLimit=10,
target=200,
bg="glow",bgm="reason",
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
mText(drawableText.line,-81,300)
@@ -20,6 +21,8 @@ return{
setFont(75)
mStr(P.stat.row,-81,220)
mStr(P.stat.clear_S[4],-81,340)
gc.setColor(1,1,1,.2)
gc.draw(IMG.electric,-26,120,0,2.6)
end,
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,

View File

@@ -1,3 +1,4 @@
local gc=love.graphics
local min=math.min
return{
color=color.red,
@@ -8,14 +9,14 @@ return{
center=false,ghost=false,
dropFX=0,lockFX=0,
visible="none",
dropPiece=player.reach_winCheck,
dropPiece=PLY.reach_winCheck,
freshLimit=15,
target=200,
bg="rgb",bgm="secret7th",
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
mText(drawableText.line,-81,300)
@@ -23,6 +24,8 @@ return{
setFont(75)
mStr(P.stat.row,-81,220)
mStr(P.stat.clear_S[4],-81,340)
gc.setColor(1,1,1,.2)
gc.draw(IMG.electric,-26,120,0,2.6)
end,
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,

View File

@@ -27,7 +27,7 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
local P=players[1]
local F=P.field
for i=1,24 do

View File

@@ -25,7 +25,7 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
local P=players[1]
local F=P.field
for i=1,24 do

View File

@@ -29,7 +29,7 @@ return{
},
slowMark=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(75)

View File

@@ -3,7 +3,7 @@ local int=math.floor
return{
color=color.white,
env={
dropPiece=player.reach_winCheck,
dropPiece=PLY.reach_winCheck,
},
load=function()
for i=1,#customID do
@@ -12,14 +12,14 @@ return{
end
modeEnv._20G=modeEnv.drop==0
modeEnv.oncehold=customSel[6]==1
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
local L=modeEnv.opponent
if L~=0 then
modeEnv.target=nil
if L<10 then
newAIPlayer(2,965,360,.5,AITemplate("9S",2*L))
PLY.newAIPlayer(2,965,360,.5,AITemplate("9S",2*L))
else
newAIPlayer(2,965,360,.5,AITemplate("CC",L-6,2+int((L-11)*.5),modeEnv.hold,15000+5000*(L-10)))
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",L-6,2+int((L-11)*.5),modeEnv.hold,15000+5000*(L-10)))
end
end
preField.h=20

View File

@@ -32,14 +32,14 @@ return{
modeEnv._20G=modeEnv.drop==0
modeEnv.oncehold=customSel[6]==1
modeEnv.target=0
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
local L=modeEnv.opponent
if L~=0 then
modeEnv.target=nil
if L<10 then
newAIPlayer(2,965,360,.5,AITemplate("9S",2*L))
PLY.newAIPlayer(2,965,360,.5,AITemplate("9S",2*L))
else
newAIPlayer(2,965,360,.5,AITemplate("CC",L-6,2+int((L-11)*.5),modeEnv.hold,15000+5000*(L-10)))
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",L-6,2+int((L-11)*.5),modeEnv.hold,15000+5000*(L-10)))
end
end
preField.h=20

View File

@@ -41,7 +41,7 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(55)

View File

@@ -41,7 +41,7 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(55)

View File

@@ -20,7 +20,7 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(65)

View File

@@ -9,7 +9,7 @@ return{
local D=P.modeData
D.counter=D.counter+1
if D.counter>=max(30,80-.3*D.event)then
P:garbageRise(11+D.event%3,1,rnd(10))
P:garbageRise(13+D.event%5,1,rnd(10))
P.stat.recv=P.stat.recv+1
D.counter=0
D.event=D.event+1
@@ -19,7 +19,7 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(65)

View File

@@ -82,7 +82,7 @@ return{
P:getNext(res[rnd(#res)])
end
end,
target=100,dropPiece=player.reach_winCheck,
target=100,dropPiece=PLY.reach_winCheck,
next=1,hold=false,
ospin=false,
freshLimit=15,
@@ -90,7 +90,7 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(70)

View File

@@ -5,7 +5,7 @@ return{
drop=20,lock=60,
sequence="bag",
bag={1,1,2,2,3,3,4,4,5,5,6,6},
target=100,dropPiece=player.reach_winCheck,
target=100,dropPiece=PLY.reach_winCheck,
next=3,
ospin=false,
freshLimit=15,
@@ -13,7 +13,7 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(70)

View File

@@ -7,7 +7,7 @@ return{
bg="glow",bgm="infinite",
},
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(45)

View File

@@ -17,7 +17,7 @@ return{
bg="glow",bgm="infinite",
},
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
for _=1,8 do
players[1]:garbageRise(13,1,rnd(10))
end

View File

@@ -26,7 +26,7 @@ return{
pauseLimit=true,
slowMark=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(45)

View File

@@ -26,7 +26,7 @@ return{
pauseLimit=true,
slowMark=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(45)

View File

@@ -47,7 +47,7 @@ return{
},
slowMark=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(45)

View File

@@ -51,7 +51,7 @@ return{
},
slowMark=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(45)

View File

@@ -47,7 +47,7 @@ return{
},
slowMark=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(45)

View File

@@ -4,14 +4,14 @@ return{
env={
drop=60,lock=120,
fall=10,
target=100,dropPiece=player.reach_winCheck,
target=100,dropPiece=PLY.reach_winCheck,
freshLimit=15,
ospin=false,
bg="rgb",bgm="infinite",
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(45)

View File

@@ -4,14 +4,14 @@ return{
env={
drop=20,lock=60,
fall=20,
target=100,dropPiece=player.reach_winCheck,
target=100,dropPiece=PLY.reach_winCheck,
freshLimit=15,
ospin=false,
bg="rgb",bgm="infinite",
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(45)

View File

@@ -4,13 +4,13 @@ return{
env={
oncehold=false,
drop=300,lock=1e99,
target=100,dropPiece=player.reach_winCheck,
target=100,dropPiece=PLY.reach_winCheck,
ospin=false,
bg="rgb",bgm="newera",
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(45)

View File

@@ -62,7 +62,7 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
newPC(players[1])
end,
mesDisp=function(P,dx,dy)

View File

@@ -54,7 +54,7 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
newPC(players[1])
end,
mesDisp=function(P,dx,dy)

View File

@@ -19,8 +19,8 @@ return{
bg="game2",bgm="push",
},
load=function()
newPlayer(1,340,15)
newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,5000))
PLY.newPlayer(1,340,15)
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,5000))
game.garbageSpeed=1e99
end,
mesDisp=function(P,dx,dy)

View File

@@ -19,8 +19,8 @@ return{
bg="game2",bgm="push",
},
load=function()
newPlayer(1,340,15)
newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,10000))
PLY.newPlayer(1,340,15)
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,10000))
game.garbageSpeed=1e99
end,
mesDisp=function(P,dx,dy)

View File

@@ -19,8 +19,8 @@ return{
bg="game2",bgm="push",
},
load=function()
newPlayer(1,340,15)
newAIPlayer(2,965,360,.5,AITemplate("CC",10,2,true,12600))
PLY.newPlayer(1,340,15)
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,2,true,12600))
game.garbageSpeed=1e99
end,
mesDisp=function(P,dx,dy)

View File

@@ -19,8 +19,8 @@ return{
bg="game2",bgm="push",
},
load=function()
newPlayer(1,340,15)
newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,16260))
PLY.newPlayer(1,340,15)
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,16260))
game.garbageSpeed=1e99
end,
mesDisp=function(P,dx,dy)

View File

@@ -19,8 +19,8 @@ return{
bg="game2",bgm="push",
},
load=function()
newPlayer(1,340,15)
newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,26000))
PLY.newPlayer(1,340,15)
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,26000))
game.garbageSpeed=1e99
end,
mesDisp=function(P,dx,dy)

View File

@@ -7,8 +7,8 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
newAIPlayer(2,965,360,.5,AITemplate("9S",3))
PLY.newPlayer(1,340,15)
PLY.newAIPlayer(2,965,360,.5,AITemplate("9S",3))
end,
mesDisp=function(P,dx,dy)
end,

View File

@@ -7,8 +7,8 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
newAIPlayer(2,965,360,.5,AITemplate("9S",5))
PLY.newPlayer(1,340,15)
PLY.newAIPlayer(2,965,360,.5,AITemplate("9S",5))
end,
mesDisp=function(P,dx,dy)
end,

View File

@@ -7,8 +7,8 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
newAIPlayer(2,965,360,.5,AITemplate("9S",7))
PLY.newPlayer(1,340,15)
PLY.newAIPlayer(2,965,360,.5,AITemplate("9S",7))
end,
mesDisp=function(P,dx,dy)
end,

View File

@@ -7,8 +7,8 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
newAIPlayer(2,965,360,.5,AITemplate("CC",9,2,true,26000))
PLY.newPlayer(1,340,15)
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",9,2,true,26000))
end,
mesDisp=function(P,dx,dy)
end,

View File

@@ -7,8 +7,8 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,50000))
PLY.newPlayer(1,340,15)
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,50000))
end,
mesDisp=function(P,dx,dy)
end,

View File

@@ -5,11 +5,11 @@ return{
env={
drop=60,lock=60,
sequence="bag",bag={8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25},
target=40,dropPiece=player.reach_winCheck,
bg="strap",bgm="race",
target=40,dropPiece=PLY.reach_winCheck,
bg="aura",bgm="race",
},
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P)
local dx,dy=P.fieldOff.x,P.fieldOff.y
@@ -25,7 +25,7 @@ return{
end,
score=function(P)return{P.stat.time,P.stat.piece}end,
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
comp=function(a,b)return a[2]>b[2]or a[2]==b[2]and a[1]<b[1]end,
getRank=function(P)
local T=P.stat.row
if T<5 then

View File

@@ -4,11 +4,11 @@ return{
color=color.cyan,
env={
drop=60,lock=60,
target=10,dropPiece=player.reach_winCheck,
target=10,dropPiece=PLY.reach_winCheck,
bg="strap",bgm="race",
},
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P)
local dx,dy=P.fieldOff.x,P.fieldOff.y

View File

@@ -4,11 +4,11 @@ return{
color=color.orange,
env={
drop=60,lock=60,
target=100,dropPiece=player.reach_winCheck,
target=100,dropPiece=PLY.reach_winCheck,
bg="strap",bgm="race",
},
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P)
local dx,dy=P.fieldOff.x,P.fieldOff.y

View File

@@ -4,11 +4,11 @@ return{
color=color.lightGrey,
env={
drop=60,lock=60,
target=1000,dropPiece=player.reach_winCheck,
target=1000,dropPiece=PLY.reach_winCheck,
bg="strap",bgm="push",
},
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P)
local dx,dy=P.fieldOff.x,P.fieldOff.y

View File

@@ -4,11 +4,11 @@ return{
color=color.lightBlue,
env={
drop=60,lock=60,
target=20,dropPiece=player.reach_winCheck,
target=20,dropPiece=PLY.reach_winCheck,
bg="strap",bgm="race",
},
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P)
local dx,dy=P.fieldOff.x,P.fieldOff.y

View File

@@ -4,11 +4,11 @@ return{
color=color.green,
env={
drop=60,lock=60,
target=40,dropPiece=player.reach_winCheck,
target=40,dropPiece=PLY.reach_winCheck,
bg="strap",bgm="race",
},
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P)
local dx,dy=P.fieldOff.x,P.fieldOff.y

View File

@@ -4,11 +4,11 @@ return{
color=color.red,
env={
drop=60,lock=60,
target=400,dropPiece=player.reach_winCheck,
target=400,dropPiece=PLY.reach_winCheck,
bg="strap",bgm="push",
},
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P)
local dx,dy=P.fieldOff.x,P.fieldOff.y

View File

@@ -20,7 +20,7 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(65)

View File

@@ -26,7 +26,7 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(65)

View File

@@ -21,7 +21,7 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(65)

View File

@@ -25,7 +25,7 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(65)

View File

@@ -27,7 +27,7 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(65)

View File

@@ -15,7 +15,7 @@ return{
bg="matrix",bgm="secret8th",
},
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(45)

View File

@@ -15,7 +15,7 @@ return{
bg="matrix",bgm="secret8th",
},
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(45)

View File

@@ -15,7 +15,7 @@ return{
bg="matrix",bgm="secret7th",
},
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(45)

View File

@@ -15,7 +15,7 @@ return{
bg="matrix",bgm="secret7th",
},
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(45)

View File

@@ -15,7 +15,7 @@ return{
bg="matrix",bgm="newera",
},
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(45)

View File

@@ -15,7 +15,7 @@ return{
bg="matrix",bgm="newera",
},
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(45)

View File

@@ -18,7 +18,7 @@ return{
},
slowMark=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(45)

View File

@@ -12,7 +12,7 @@ return{
},
slowMark=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(45)

View File

@@ -31,7 +31,7 @@ return{
powerUp={2,5,10,20},
stage={30,20,15,10,5},
}
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
local L={}for i=1,49 do L[i]=true end
local t=system~="Windows"and 0 or 2
while t>0 do
@@ -41,17 +41,17 @@ return{
local n=2
for i=1,4 do for j=1,6 do
if L[n]then
newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(2,5)))
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(2,5)))
else
newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(2,5)-1,2,true,10000))
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(2,5)-1,2,true,10000))
end
n=n+1
end end
for i=9,12 do for j=1,6 do
if L[n]then
newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(2,5)))
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(2,5)))
else
newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(2,5)-1,2,true,10000))
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(2,5)-1,2,true,10000))
end
n=n+1
end end

View File

@@ -31,7 +31,7 @@ return{
powerUp={2,5,10,20},
stage={30,20,15,10,5},
}
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
local L={}for i=1,49 do L[i]=true end
local t=system~="Windows"and 0 or 4
while t>0 do
@@ -41,17 +41,17 @@ return{
local n=2
for i=1,4 do for j=1,6 do
if L[n]then
newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(4,7)))
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(4,7)))
else
newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(4,7)-1,3,true,20000))
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(4,7)-1,3,true,20000))
end
n=n+1
end end
for i=9,12 do for j=1,6 do
if L[n]then
newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(4,7)))
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(4,7)))
else
newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(4,7)-1,3,true,20000))
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(4,7)-1,3,true,20000))
end
n=n+1
end end

View File

@@ -31,7 +31,7 @@ return{
powerUp={2,5,10,20},
stage={30,20,15,10,5},
}
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
local L={}for i=1,49 do L[i]=true end
local t=system~="Windows"and 0 or 6
while t>0 do
@@ -41,17 +41,17 @@ return{
local n=2
for i=1,4 do for j=1,6 do
if L[n]then
newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(8,10)))
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(8,10)))
else
newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(8,10)-1,4,true,30000))
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(8,10)-1,4,true,30000))
end
n=n+1
end end
for i=9,12 do for j=1,6 do
if L[n]then
newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(8,10)))
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(8,10)))
else
newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(8,10)-1,4,true,30000))
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(8,10)-1,4,true,30000))
end
n=n+1
end end

View File

@@ -31,7 +31,7 @@ return{
powerUp={2,6,14,30},
stage={75,50,35,20,10},
}
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
local L={}for i=1,100 do L[i]=true end
local t=system~="Windows"and 0 or 4
while t>0 do
@@ -41,17 +41,17 @@ return{
local n=2
for i=1,7 do for j=1,7 do
if L[n]then
newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(2,5)))
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(2,5)))
else
newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(2,5)-1,2,true,10000))
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(2,5)-1,2,true,10000))
end
n=n+1
end end
for i=15,21 do for j=1,7 do
if L[n]then
newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(2,5)))
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(2,5)))
else
newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(2,5)-1,2,true,10000))
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(2,5)-1,2,true,10000))
end
n=n+1
end end

View File

@@ -31,7 +31,7 @@ return{
powerUp={2,6,14,30},
stage={75,50,35,20,10},
}
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
local L={}for i=1,100 do L[i]=true end
local t=system~="Windows"and 0 or 4
while t>0 do
@@ -41,17 +41,17 @@ return{
local n=2
for i=1,7 do for j=1,7 do
if L[n]then
newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(4,7)))
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(4,7)))
else
newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(4,7)-1,3,true,20000))
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(4,7)-1,3,true,20000))
end
n=n+1
end end
for i=15,21 do for j=1,7 do
if L[n]then
newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(4,7)))
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(4,7)))
else
newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(4,7)-1,3,true,20000))
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(4,7)-1,3,true,20000))
end
n=n+1
end end

View File

@@ -31,7 +31,7 @@ return{
powerUp={2,6,14,30},
stage={75,50,35,20,10},
}
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
local L={}for i=1,100 do L[i]=true end
local t=system~="Windows"and 0 or 4
while t>0 do
@@ -41,17 +41,17 @@ return{
local n=2
for i=1,7 do for j=1,7 do
if L[n]then
newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(8,10)))
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(8,10)))
else
newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(8,10)-1,4,true,30000))
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(8,10)-1,4,true,30000))
end
n=n+1
end end
for i=15,21 do for j=1,7 do
if L[n]then
newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(8,10)))
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(8,10)))
else
newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(8,10)-1,4,true,30000))
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(8,10)-1,4,true,30000))
end
n=n+1
end end

View File

@@ -21,7 +21,7 @@ return{
bg="matrix",bgm="reason",
},
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(75)

View File

@@ -19,7 +19,7 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(75)

View File

@@ -19,7 +19,7 @@ return{
},
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(75)

View File

@@ -25,7 +25,7 @@ return{
slowMark=true,
pauseLimit=true,
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
gc.setLineWidth(2)

View File

@@ -3,11 +3,11 @@ return{
env={
drop=120,lock=120,
oncehold=false,target=200,
dropPiece=player.reach_winCheck,
dropPiece=PLY.reach_winCheck,
bg="strap",bgm="infinite",
},
load=function()
newPlayer(1,340,15)
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
setFont(70)

View File

@@ -54,7 +54,7 @@ local function VirtualkeyPreview()
local c=sceneTemp.sel==i and .6 or 1
gc.setColor(c,1,c,setting.VKAlpha*.1)
gc.setLineWidth(B.r*.07)
gc.circle("line",B.x,B.y,B.r)
gc.circle("line",B.x,B.y,B.r,10)
if setting.VKIcon then gc.draw(VKIcon[i],B.x,B.y,nil,B.r*.025,nil,18,18)end
end
end
@@ -70,13 +70,13 @@ local function drawVirtualkey()
local B=V[i]
gc.setColor(1,1,1,a)
gc.setLineWidth(B.r*.07)
gc.circle("line",B.x,B.y,B.r)--Button outline
gc.circle("line",B.x,B.y,B.r,10)--Button outline
_=V[i].pressTime
gc.draw(VKIcon[i],B.x,B.y,nil,B.r*.026+_*.08,nil,18,18)--icon
if _>0 then
gc.setColor(1,1,1,a*_*.08)
gc.circle("fill",B.x,B.y,B.r*.94)--Glow
gc.circle("line",B.x,B.y,B.r*(1.4-_*.04))--Ripple
gc.circle("fill",B.x,B.y,B.r*.94,10)--Glow
gc.circle("line",B.x,B.y,B.r*(1.4-_*.04),10)--Ripple
end
end
end
@@ -86,12 +86,12 @@ local function drawVirtualkey()
local B=V[i]
gc.setColor(1,1,1,a)
gc.setLineWidth(B.r*.07)
gc.circle("line",B.x,B.y,B.r)
gc.circle("line",B.x,B.y,B.r,10)
_=V[i].pressTime
if _>0 then
gc.setColor(1,1,1,a*_*.08)
gc.circle("fill",B.x,B.y,B.r*.94)
gc.circle("line",B.x,B.y,B.r*(1.4-_*.04))
gc.circle("fill",B.x,B.y,B.r*.94,10)
gc.circle("line",B.x,B.y,B.r*(1.4-_*.04),10)
end
end
end
@@ -202,11 +202,9 @@ function Pnt.mode()
end
_=drawableText[rankString[modeRanks[M.id]]]
if _ then
local dx,dy=6.26*sin(Timer()*1.26+M.id),12.6*sin(Timer()+M.id)
gc.setColor(0,0,0,.5)
local dx,dy=6.26*sin(Timer()*0.626+M.id),6.6*sin(Timer()+M.id)
gc.setColor(0,0,0,.26)
mDraw(_,M.x+dx*1.5,M.y+dy*1.5)
gc.setColor(1,1,1,.8)
mDraw(_,M.x+dx,M.y+dy)
end
--[[
if M.icon then
@@ -416,13 +414,20 @@ function Pnt.play()
end
end
end
gc.push("transform")
gc.origin()
if restartCount>0 then
gc.setColor(0,0,0,restartCount*.05)
gc.push("transform")
gc.origin()
gc.rectangle("fill",0,0,scr.w,scr.h)
gc.pop()
gc.rectangle("fill",0,0,scr.w*scr.dpi,scr.h*scr.dpi)
end
if game.warnLVL>0 then
gc.setColor(0,0,0,0)
SHADER.warning:send("level",game.warnLVL)
gc.setShader(SHADER.warning)
gc.rectangle("fill",0,0,scr.w,scr.h)
gc.setShader()
end
gc.pop()
end
local hexList={1,0,.5,1.732*.5,-.5,1.732*.5}for i=1,6 do hexList[i]=hexList[i]*150 end
local textPos={90,131,-90,131,-200,-25,-90,-181,90,-181,200,-25}
@@ -438,7 +443,7 @@ function Pnt.pause()
gc.setColor(.15,.15,.15,_)
gc.push("transform")
gc.origin()
gc.rectangle("fill",0,0,scr.w,scr.h)
gc.rectangle("fill",0,0,scr.w*scr.dpi,scr.h*scr.dpi)
gc.pop()
--Pause Info
@@ -667,7 +672,7 @@ function Pnt.help()
setFont(20)
gc.setColor(1,1,1)
for i=1,#text.help do
gc.printf(text.help[i],150,30*i-10,1000,"center")
gc.printf(text.help[i],150,35*i+40,1000,"center")
end
setFont(19)
gc.print(text.used,30,330)
@@ -684,6 +689,21 @@ function Pnt.help()
mStr(text.support,150+sin(Timer()*4)*20,283)
mStr(text.support,1138-sin(Timer()*4)*20,270)
end
function Pnt.staff()
local L=text.staff
local t=sceneTemp.time
if t>0 then
setFont(40)
for i=1,#L do
mStr(L[i],640,800+80*i-t*40)
end
mDraw(IMG.coloredTitleImage,640,800-t*40,nil,2)
mDraw(IMG.coloredTitleImage,640,2160-t*40,nil,2)
else
setFont(60)
mStr("Don't tell this to anyone.",640,-100-t*40)
end
end
function Pnt.stat()
local chart=sceneTemp.chart
setFont(24)

View File

@@ -2,241 +2,302 @@ local gc=love.graphics
local int,ceil,rnd,abs=math.floor,math.ceil,math.random,math.abs
local max,min,sin,cos=math.max,math.min,math.sin,math.cos
local BG
local scr=scr
local BGinit,BGresize,BGupdate,BGdraw,BGdiscard={},{},{},{},{}
local BGvars={_G=_G}
local BGvars={_G=_G,SHADER=SHADER}
function BGdraw.none()
gc.clear(.15,.15,.15)
end
local back={}
back.none={
draw=function()
gc.clear(.15,.15,.15)
end,
}
back.grey={
draw=function()
gc.clear(.3,.3,.3)
end,
}
back.glow={
init=function()
t=0
end,
update=function(dt)
t=t+dt
end,
draw=function()
local t=(sin(t*.5)+sin(t*.7)+sin(t*.9+1)+sin(t*1.5)+sin(t*2+10))*.08
gc.clear(t,t,t)
end,
}--light-dark
back.rgb={
init=function()
t=0
end,
update=function(dt)
t=t+dt
end,
draw=function()
gc.clear(
sin(t*1.2)*.15+.2,
sin(t*1.5)*.15+.2,
sin(t*1.9)*.15+.2
)
end,
}--Changing pure color
back.strap={
init=function()
t=0
end,
update=function(dt)
t=t+dt
end,
draw=function()
SHADER.strap:send("t",t*.626)
gc.setColor(.4,.626,.626)
gc.setShader(SHADER.strap)
gc.rectangle("fill",0,0,scr.w,scr.h)
gc.setShader()
end,
}--Horizonal ranbow
back.flink={
init=function()
t=0
end,
update=function(dt)
t=t+dt
end,
draw=function()
local t=.13-t%3%1.7
if t<.2 then gc.clear(t,t,t)
else gc.clear(0,0,0)
end
end,
}--flash after random time
back.aura={
init=function()
t=rnd()*3600
BG.resize(scr.w,scr.h)
end,
resize=function(w,h)
SHADER.aura:send("w",w*scr.dpi)
SHADER.aura:send("h",h*scr.dpi)
end,
update=function(dt)
t=t+dt
end,
draw=function()
SHADER.aura:send("t",t)
gc.setShader(SHADER.aura)
gc.rectangle("fill",0,0,scr.w,scr.h)
gc.setShader()
end,
}--cool liquid background
back.game1={
init=function()
t=0
BG.resize(scr.w,scr.h)
end,
resize=function(w,h)
SHADER.rainbow:send("w",w*scr.dpi)
SHADER.rainbow:send("h",h*scr.dpi)
end,
update=function(dt)
t=t+dt
end,
draw=function()
SHADER.rainbow:send("t",t)
gc.setColor(.6,.6,.6)
gc.setShader(SHADER.rainbow)
gc.rectangle("fill",0,0,scr.w,scr.h)
gc.setShader()
end,
}--Rolling rainbow
back.game2={
init=function()
t=0
BG.resize(scr.w,scr.h)
end,
resize=function(w,h)
SHADER.rainbow:send("w",w*scr.dpi)
SHADER.rainbow:send("h",h*scr.dpi)
end,
update=function(dt)
t=t+dt
end,
draw=function()
SHADER.rainbow:send("t",t)
gc.setColor(.7,.4,.4)
gc.setShader(SHADER.rainbow)
gc.rectangle("fill",0,0,scr.w,scr.h)
gc.setShader()
end,
}--Red rolling rainbow
back.game3={
init=function()
t=0
BG.resize(scr.w,scr.h)
end,
resize=function(w,h)
SHADER.rainbow:send("w",w*scr.dpi)
SHADER.rainbow:send("h",h*scr.dpi)
end,
update=function(dt)
t=t+dt
end,
draw=function()
SHADER.rainbow:send("t",t)
gc.setColor(.5,.5,.8)
gc.setShader(SHADER.rainbow)
gc.rectangle("fill",0,0,scr.w,scr.h)
gc.setShader()
end,
}--Blue rolling rainbow
back.game4={
init=function()
t=0
end,
update=function(dt)
t=t+dt
end,
draw=function()
SHADER.strap:send("t",t*1.26)
gc.setColor(.5,.626,.74)
gc.setShader(SHADER.strap)
gc.rectangle("fill",0,0,scr.w,scr.h)
gc.setShader()
end,
}--Blue strap
back.game5={
init=function()
t=0
end,
update=function(dt)
t=t+dt
end,
draw=function()
local t=2.5-t%20%6%2.5
if t<.3 then gc.clear(t,t,t)
else gc.clear(0,0,0)
end
end,
}--Lightning
function BGdraw.grey()
gc.clear(.3,.3,.3)
end
function BGinit.glow()
t=0
end
function BGupdate.glow(dt)
t=t+dt
end
function BGdraw.glow()
local t=(sin(t*.5)+sin(t*.7)+sin(t*.9+1)+sin(t*1.5)+sin(t*2+10))*.08
gc.clear(t,t,t)
end
function BGinit.rgb()
t=0
end
function BGupdate.rgb(dt)
t=t+dt
end
function BGdraw.rgb()
gc.clear(
sin(t*1.2)*.15+.2,
sin(t*1.5)*.15+.2,
sin(t*1.9)*.15+.2
)
end
function BGinit.strap()
t=0
img=_G.IMG.gameBG2
end
function BGupdate.strap(dt)
t=t+dt
end
function BGdraw.strap()
gc.setColor(.5,.5,.5)
local x=t%16*-64
repeat
gc.draw(img,x,0,nil,8,scr.h)
x=x+1024--image width*8
until x>=scr.w
end
function BGinit.flink()
t=0
end
function BGupdate.flink(dt)
t=t+dt
end
function BGdraw.flink()
local t=.13-t%3%1.7
if t<.2 then gc.clear(t,t,t)
else gc.clear(0,0,0)
end
end
function BGinit.game1()
t=0
img=_G.IMG.gameBG1
end
function BGupdate.game1(dt)
t=t+dt
end
function BGdraw.game1()
gc.setColor(.5,.5,.5)
gc.draw(img,scr.w*.5,scr.h*.5,t*.15,scr.rad*.0625,nil,16,16)
end--Rainbow
function BGinit.game2()
t=0
img=_G.IMG.gameBG1
end
function BGupdate.game2(dt)
t=t+dt
end
function BGdraw.game2()
gc.setColor(.5,.26,.26)
gc.draw(img,scr.w*.5,scr.h*.5,t*.15,scr.rad*.0625,nil,16,16)
end--Red rainbow
function BGinit.game3()
t=0
img=_G.IMG.gameBG1
end
function BGupdate.game3(dt)
t=t+dt
end
function BGdraw.game3()
gc.setColor(.4,.4,.8)
gc.draw(img,scr.w*.5,scr.h*.5,t*.15,scr.rad*.0625,nil,16,16)
end--Blue rainbow
function BGinit.game4()
t=0
img=_G.IMG.gameBG2
end
function BGupdate.game4(dt)
t=t+dt
end
function BGdraw.game4()
gc.setColor(.05,.4,.4)
local x=t%8*-128
repeat
gc.draw(img,x,0,nil,8,scr.h)
x=x+1024--image width*8
until x>=scr.w
end--Fast strap
function BGinit.game5()
t=0
end
function BGupdate.game5(dt)
t=t+dt
end
function BGdraw.game5()
local t=2.5-t%20%6%2.5
if t<.3 then gc.clear(t,t,t)
else gc.clear(0,0,0)
end
end--Lightning
function BGinit.game6()
t=0
colorLib=_G.SKIN.libColor
colorSet=_G.setting.skin
miniBlock=_G.miniBlock
end
function BGupdate.game6(dt)
t=t+dt
end
local blocks=require("parts/mino")
local scs=require("parts/spinCenters")
function BGdraw.game6()
local t=1.2-t%10%3%1.2
if t<.3 then gc.clear(t,t,t)
else gc.clear(0,0,0)
end
local R=7-int(t*.5)%7
local _=colorLib[colorSet[R]]
gc.setColor(_[1],_[2],_[3],.1)
gc.draw(miniBlock[R],640,360,t%3.1416*6,400,400,scs[R][0][2]-.5,#blocks[R][0]-scs[R][0][1]+.5)
end--Fast lightning&spining tetromino
back.game6={
init=function()
t=0
colorLib=_G.SKIN.libColor
colorSet=_G.setting.skin
miniBlock=_G.miniBlock
end,
update=function(dt)
t=t+dt
end,
draw=function()
local t=1.2-t%10%3%1.2
if t<.3 then gc.clear(t,t,t)
else gc.clear(0,0,0)
end
local R=7-int(t*.5)%7
local _=colorLib[colorSet[R]]
gc.setColor(_[1],_[2],_[3],.1)
gc.draw(miniBlock[R],640,360,t%3.1416*6,400,400,scs[R][0][2]-.5,#blocks[R][0]-scs[R][0][1]+.5)
end,
}--Fast lightning + spining tetromino
local matrixT={}for i=1,50 do matrixT[i]={}for j=1,50 do matrixT[i][j]=love.math.noise(i,j)+2 end end
function BGinit.matrix()
t=0
end
function BGupdate.matrix(dt)
t=t+dt
end
function BGdraw.matrix()
gc.scale(scr.k)
gc.clear(.15,.15,.15)
local _=ceil(scr.h/80)
for i=1,ceil(scr.w/80)do
for j=1,_ do
gc.setColor(1,1,1,sin(i+matrixT[i][j]*t)*.1+.1)
gc.rectangle("fill",80*i,80*j,-80,-80)
back.matrix={
init=function()
t=rnd()*3600
end,
update=function(dt)
t=t+dt
end,
draw=function()
gc.scale(scr.k)
gc.clear(.15,.15,.15)
local Y=ceil(scr.h*scr.dpi/80)
for x=1,ceil(scr.w*scr.dpi/80)do
for y=1,Y do
gc.setColor(1,1,1,sin(x+matrixT[x][y]*t)*.1+.1)
gc.rectangle("fill",80*x,80*y,-80,-80)
end
end
end
gc.scale(1/scr.k)
end
gc.scale(1/scr.k)
end,
}
back.space={
init=function()
stars={}
W,H=scr.w+20,scr.h+20
BG.resize(scr.w,scr.h)
end,
resize=function(w,h)
local S=stars
for i=1,1260,5 do
local s=rnd(26,40)*.1
S[i]=s*scr.k --size
S[i+1]=rnd(W)-10 --x
S[i+2]=rnd(H)-10 --y
S[i+3]=(rnd()-.5)*.01*s --vx
S[i+4]=(rnd()-.5)*.01*s --vy
end--800 var
end,
update=function(dt)
local S=stars
for i=1,1260,5 do
S[i+1]=(S[i+1]+S[i+3])%W
S[i+2]=(S[i+2]+S[i+4])%H
end--star moving
end,
draw=function()
gc.clear(.2,.2,.2)
if not stars[1]then return end
gc.translate(-10,-10)
gc.setColor(.8,.8,.8)
for i=1,1260,5 do
local s=stars
local x,y=s[i+1],s[i+2]
s=s[i]
gc.rectangle("fill",x,y,s,s)
end
gc.translate(10,10)
end,
discard=function()
stars={}
end,
}
function BGinit.space()
stars={}
for i=1,2600,5 do
local s=rnd(4)
stars[i]=s --size
stars[i+1]=rnd(W)-10 --x
stars[i+2]=rnd(H)-10 --y
stars[i+3]=(rnd()-.5)*.01*s --vx
stars[i+4]=(rnd()-.5)*.01*s --vy
end--800 var
end
function BGresize.space(w,h)
W,H=w+20,h+20
BGinit.space()
end
function BGupdate.space(dt)
local s=stars
for i=1,2600,5 do
s[i+1]=(s[i+1]+s[i+3])%W
s[i+2]=(s[i+2]+s[i+4])%H
end--star moving
end
function BGdraw.space()
gc.clear(.2,.2,.2)
if not stars[1]then return end
gc.translate(-10,-10)
gc.setColor(.8,.8,.8)
for i=1,2600,5 do
local s=stars
local x,y=s[i+1],s[i+2]
s=s[i]
gc.rectangle("fill",x,y,s,s)
end
gc.translate(10,10)
end
function BGdiscard.space()
stars={}
end
for _,bg in next,back do
if not bg.init then bg.init= NULL end setfenv(bg.init ,BGvars)
if not bg.resize then bg.resize= NULL end setfenv(bg.resize ,BGvars)
if not bg.update then bg.update= NULL end setfenv(bg.update ,BGvars)
if not bg.discard then bg.discard=NULL end setfenv(bg.discard ,BGvars)
if not bg.draw then bg.draw= NULL end setfenv(bg.draw ,BGvars)
end--make BG vars invisible
for k in next,BGdraw do
if BGinit[k]then setfenv(BGinit[k], BGvars)end
if BGresize[k]then setfenv(BGresize[k], BGvars)end
if BGupdate[k]then setfenv(BGupdate[k], BGvars)end
if BGdraw[k]then setfenv(BGdraw[k], BGvars)end
if BGdiscard[k]then setfenv(BGdiscard[k], BGvars)end
end
local BG={
BG={
cur="none",
resize=NULL,
update=NULL,
draw=BGdraw.none,
draw=back.none.draw,
}
function BG.set(bg)
if bg==BG.cur or not setting.bg then return end
if BG.discard then
BG.discard()
collectgarbage()
end
BG.cur=bg
local _=BGdiscard[BG.cur]if _ then _()collectgarbage()end
BG.resize=BGresize[bg]or NULL;BG.resize(scr.w,scr.h)
_=BGinit[bg]if _ then _()end
BG.update=BGupdate[bg]or NULL
BG.draw=BGdraw[bg]
end
bg=back[bg]
BG.init=bg.init or NULL
BG.resize=bg.resize or NULL
BG.update=bg.update or NULL
BG.discard=bg.discard or NULL
BG.draw=bg.draw or NULL
BG.init()
end
return BG

View File

@@ -1,21 +1,26 @@
local rem=table.remove
local BGM={}
-- BGM.nowPlay=[str:playing ID]
-- BGM.suspend=[str:pausing ID]
-- BGM.playing=[src:playing SRC]
local BGM={
--nowPlay=[str:playing ID]
--suspend=[str:pausing ID]
--playing=[src:playing SRC]
}
BGM.list={
"blank","way","race","newera","push",
"reason","infinite","secret7th","secret8th",
"shining terminal","oxygen","distortion",
"blank","way","race","newera","push","reason","infinite",
"secret7th","secret8th",
"shining terminal","oxygen","distortion","far",
"rockblock","cruelty","final","8-bit happiness","end",
"hay what kind of feeling",
}
BGM.len=#BGM.list
function BGM.loadOne(_)
local _=BGM.list[_]
BGM.list[_]=love.audio.newSource("/BGM/".._..".ogg","stream")
BGM.list[_]:setLooping(true)
BGM.list[_]:setVolume(0)
function BGM.loadOne(N)
N=BGM.list[N]
local file="/BGM/"..N..".ogg"
if love.filesystem.getInfo(file)then
BGM.list[N]=love.audio.newSource(file,"stream")
BGM.list[N]:setLooping(true)
BGM.list[N]:setVolume(0)
end
end
function BGM.loadAll()
for i=1,#BGM.list do
@@ -27,7 +32,7 @@ function BGM.play(s)
BGM.playing=BGM.list[s]
BGM.suspend,BGM.nowPlay=s
return
elseif not s then
elseif not s or not BGM.list[s]then
return
end
if BGM.nowPlay~=s then

View File

@@ -11,7 +11,7 @@ local s={
autoPause=true,
lang=1,
skinSet=1,
skin={1,5,8,2,10,3,7,1,5,5,1,8,2,10,3,7,10,7,8,2,8,2,1,5,3},
skin={1,5,8,2,10,3,7,1,5,1,5,8,2,10,3,7,10,7,8,2,8,2,1,5,3},
face={},
--graphic
@@ -26,6 +26,7 @@ local s={
frameMul=100,
text=true,
warn=true,
fullscreen=false,
bg=true,
powerInfo=false,
@@ -57,7 +58,8 @@ s={
key=0,rotate=0,hold=0,
extraPiece=0,extraRate=0,
piece=0,row=0,dig=0,
atk=0,digatk=0,send=0,recv=0,pend=0,
atk=0,digatk=0,
send=0,recv=0,pend=0,off=0,
clear={},clear_B={},clear_S={0,0,0,0,0},
spin={},spin_B={},spin_S={0,0,0,0,0},
pc=0,hpc=0,b2b=0,b3b=0,score=0,

View File

@@ -41,14 +41,14 @@ local function dumpTable(L,t)
end
elseif T=="string"then k=k.."="
elseif T=="boolean"then k="["..k.."]="
else error("Error key type!")
else assert(false,"Error key type!")
end
T=type(v)
if T=="number"then v=tostring(v)
elseif T=="string"then v="\""..v.."\""
elseif T=="table"then v=dumpTable(v,t+1)
elseif T=="boolean"then v=tostring(v)
else error("Error data type!")
else assert(false,"Error data type!")
end
s=s..tabs[t]..k..v..",\n"
end
@@ -68,7 +68,7 @@ end
local files={
data= fs.newFile("data.dat"),
setting=fs.newFile("setting.dat"),
setting=fs.newFile("settings.dat"),
VK= fs.newFile("virtualkey.dat"),
keyMap= fs.newFile("key.dat"),
unlock= fs.newFile("unlock.dat"),
@@ -136,79 +136,6 @@ function File.loadData()
if s then
setfenv(s,{})
local S=s()
if not S.version or S.version=="Alpha V0.8.15"then
S.clear_S={S.clear_1,S.clear_2,S.clear_3,S.clear_4}
S.clear={{},{},{},{},{},{},{}}
local A,B,C,D=int(S.clear_1/7),int(S.clear_2/7),int(S.clear_3/7),S.clear_4
for i=1,7 do
S.clear[i][1]=A
S.clear[i][2]=B
S.clear[i][3]=C
S.clear[i][4]=0
end
S.clear[7][4]=D
for i=1,S.clear_1%7 do S.clear[i][1]=S.clear[i][1]+1 end
for i=1,S.clear_2%7 do S.clear[i][2]=S.clear[i][2]+1 end
for i=1,S.clear_3%7 do S.clear[i][3]=S.clear[i][3]+1 end
S.clear_B={}
for i=1,7 do
S.clear_B[i]=S.clear[i][1]+S.clear[i][2]+S.clear[i][3]+S.clear[i][4]
end
S.spin_S={S.spin_0,S.spin_1,S.spin_2,S.spin_3}
S.spin={{},{},{},{},{},{},{}}
A,B,C,D=int(S.spin_0/7),int(S.spin_1/7),int(S.spin_2/7),int(S.spin_3/7)
for i=1,7 do
S.spin[i][1]=A
S.spin[i][2]=B
S.spin[i][3]=C
S.spin[i][4]=D
end
for i=1,S.spin_0%7 do S.spin[i][1]=S.spin[i][1]+1 end
for i=1,S.spin_1%7 do S.spin[i][2]=S.spin[i][2]+1 end
for i=1,S.spin_2%7 do S.spin[i][3]=S.spin[i][3]+1 end
for i=1,S.spin_3%7 do S.spin[i][4]=S.spin[i][4]+1 end
S.spin_B={}
for i=1,7 do
S.spin_B[i]=S.spin[i][1]+S.spin[i][2]+S.spin[i][3]+S.spin[i][4]
end
S.hpc=S.c
elseif S.version=="Alpha V0.8.16"then
for i=1,6 do
S.clear[7][4]=S.clear[7][4]+S.clear[i][4]
S.clear[i][4]=0
end
end
if not S.clear_B[8]then
for i=1,7 do
S.clear[i][5]=0
S.spin[i][5]=0
end
for i=8,25 do
S.clear[i]={0,0,0,0,0}
S.spin[i]={0,0,0,0,0}
S.spin_B[i]=0
S.clear_B[i]=0
end
S.spin_S[5]=0
S.clear_S[5]=0
end
if S.version=="Alpha V0.8.18"or S.version=="Alpha V0.8.19"then
S.clear[3],S.clear[4]=S.clear[4],S.clear[3]
S.spin[3],S.spin[4]=S.spin[4],S.spin[3]
S.clear_B[3],S.clear_B[4]=S.clear_B[4],S.clear_B[3]
S.spin_B[3],S.spin_B[4]=S.spin_B[4],S.spin_B[3]
end
if #modeRanks==76 then
for i=1,4 do
table.remove(modeRanks)
end
end
if S.version~=gameVersion then
S.version=gameVersion
TEXT.show(text.newVersion,640,200,30,"fly",.3)
end
addToTable(S,stat)
end
end

View File

@@ -17,8 +17,7 @@ local IMG={
miyaF3="miya/f3.png",
miyaF4="miya/f4.png",
gameBG1="BG/bg1.png",
gameBG2="BG/bg2.png",
electric="mess/electric.png",
}
local list={}
local count=0

View File

@@ -4,7 +4,7 @@ local ZERO={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zer
local map={}
for x=-3,3 do map[x]={}for y=-3,3 do map[x][y]={x,y}end end
local function collect(T)
local function collect(T)--make all vec point to the same vec
if type(T)=="table"then
for _,T in next,T do
for k,vec in next,T do
@@ -14,11 +14,11 @@ local function collect(T)
end
end
local function sym(L)
local function C_sym(L)--use this if the block is centrosymmetry, *PTR!!!
L[23]=L[01]L[32]=L[10]
L[21]=L[03]L[12]=L[30]
end
local function flipList(O)
local function flipList(O)--use this to copy a symmetry list
if not O then return end
local L={}
for i=1,#O do
@@ -41,9 +41,7 @@ local function reflect(a,b)
b[13]=flipList(a[31])
end
local function pushZero(T)
local L
for i=1,#T do
L=T[i]
for _,L in next,T do
if type(L)=="table"then
for _,v in next,L do
table.insert(v,1,zero)
@@ -64,6 +62,11 @@ local OspinList={
{121,6,0, 1,-1,1},{112,6,0, 2,-1,2},{122,6,0, 1,-2,2},--O
{323,6,0,-1,-1,2},{332,6,0,-2,-1,2},{322,6,0,-1,-2,2},--O
}--{key,id,dir,dx,dy,freeLv(0=unmovable,1=L/R unmovable,2=free)}
local XspinList={
{{ 1,-1},{ 1, 0},{ 1, 1},{ 1,-2},{ 1, 2}},
{{ 0,-1},{ 0,-2},{ 0, 1},{ 0,-2},{ 0, 2}},
{{-1,-1},{-1, 0},{-1, 1},{-1,-2},{-1, 2}},
}
local TRS={
{
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1, 2},{ 0, 1}},
@@ -91,8 +94,8 @@ local TRS={
[23]={{ 1, 0},{ 1,-1},{ 1, 1},{ 0,-2},{ 1,-2},{ 1,-1}},
[02]={{-1, 0},{ 1, 0},{ 0,-1},{ 0, 1}},
[20]={{ 1, 0},{-1, 0},{ 0, 1},{ 0,-1}},
[13]={{ 0,-1},{ 1, 0},{ 0, 1}},
[31]={{ 0, 1},{-1, 0},{ 0,-1}},
[13]={{ 0,-1},{ 0, 1},{ 1, 0}},
[31]={{ 0, 1},{ 0,-1},{-1, 0}},
},--J
{},--L
{
@@ -163,8 +166,8 @@ local TRS={
[10]={{ 1, 0},{ 0,-1},{-1,-1},{ 0,-2},{ 0,-3},{ 0, 3},{ 1,-2}},
[03]={{ 1, 0},{ 0,-3},{ 0, 1},{ 0, 2},{ 0, 3},{ 1, 2}},
[30]={{-1, 0},{ 0, 1},{ 0,-2},{ 0,-3},{ 0, 3},{-1,-2}},
},--5Z
{},--5S
},--Z5
{},--S5
{
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1,-2},{-1,-1},{ 0, 1}},
[10]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1, 2},{ 0,-1},{ 1, 1}},
@@ -178,8 +181,8 @@ local TRS={
[20]={{ 1, 0},{ 0, 1},{ 0,-1}},
[13]={{ 1, 0},{ 0, 1},{-1, 0}},
[31]={{-1, 0},{ 0,-1},{ 1, 0}},
},--Q
{},--P
},--P
{},--Q
{
[01]={{-1, 0},{ 1, 0},{-1, 1},{ 0,-2},{ 0,-3}},
[10]={{ 1, 0},{ 1,-1},{-1, 0},{ 0, 2},{ 0, 3}},
@@ -208,7 +211,7 @@ local TRS={
[20]={{ 0,-1},{ 0, 1},{ 0,-2}},
[13]={{ 1, 0},{-1, 1},{-2, 0}},
[31]={{-1, 0},{ 1, 1},{ 2, 0}},
},--5T
},--T5
{
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1,-1},{-1,-2}},
[10]={{ 1, 0},{ 1,-1}},
@@ -252,7 +255,19 @@ local TRS={
[31]={{ 0,-1},{ 1, 0}},
},--W
function(P,d)
return
if P.human then SFX.fieldPlay("rotate",nil,P)end
if P.gameEnv.easyFresh then P:freshLockDelay()end
local iki=XspinList[d]
for test=1,#iki do
local x,y=P.curX+iki[test][1],P.curY+iki[test][2]
if not P:ifoverlap(P.cur.bk,x,y)then
P.curX,P.curY=x,y
P.spinLast=1
P:freshgho()
P.stat.rotate=P.stat.rotate+1
return
end
end
end,--X
{
[01]={{-1, 0},{-1, 1},{ 0,-3},{-1, 1},{-1, 2},{ 0, 1}},
@@ -261,14 +276,14 @@ local TRS={
[30]={{ 0, 1},{-1, 1},{ 1, 0},{-1,-1},{ 0, 2},{-1, 2},{ 0, 3},{-1, 3},{ 1,-1}},
[12]={{ 1, 0},{ 1,-1},{ 0,-1},{ 1,-2},{ 0,-2},{ 1, 1},{-1, 0},{ 0, 2},{ 1, 2}},
[21]={{-1, 0},{-1, 1},{ 0, 1},{-1, 2},{ 0, 2},{-1,-1},{ 1, 0},{ 0,-2},{-1,-2}},
[32]={{-1, 0},{-1, 1},{-1,-1},{ 0, 2},{-1, 2},{ 0,-2}},
[23]={{ 1, 0},{ 1,-1},{ 1, 1},{ 0,-2},{ 1,-2},{ 0, 2}},
[32]={{-1, 0},{-1, 1},{-1,-1},{ 1, 0},{ 0, 2},{-1, 2},{ 0,-2}},
[23]={{ 1, 0},{ 1,-1},{ 1, 1},{-1, 0},{ 0,-2},{ 1,-2},{ 0, 2}},
[02]={{ 0,-1},{ 1,-1},{-1, 0},{ 2,-1},{ 0, 1}},
[20]={{ 0, 1},{-1, 1},{ 1, 0},{-2, 1},{ 0,-1}},
[13]={{-1, 0},{-1,-1},{ 0, 1},{-1,-2}},
[31]={{ 1, 0},{ 1, 1},{ 0,-1},{ 1, 2}},
},--5J
{},--5L
},--J5
{},--L5
{
[01]={{-1, 0},{-1, 1},{ 1, 0},{-1, 2},{-1,-1},{ 0,-3},{ 0, 1}},
[10]={{-1, 0},{ 1,-1},{-1, 0},{ 1,-2},{ 1, 1},{ 0, 3},{ 0, 1}},
@@ -276,8 +291,8 @@ local TRS={
[30]={{ 0, 1},{-1, 1},{ 1, 0},{-1,-1},{ 0, 2},{-1, 2},{ 0, 3},{-1, 3},{ 1,-1}},
[12]={{ 1, 0},{ 1,-1},{ 0,-1},{ 1,-2},{ 0,-2},{ 1, 1},{-1, 0},{ 0, 2},{ 1, 2}},
[21]={{-1, 0},{-1, 1},{ 0, 1},{-1, 2},{ 0, 2},{-1,-1},{ 1, 0},{ 0,-2},{-1,-2}},
[32]={{-1, 0},{-1, 1},{-1,-1},{ 0, 2},{-1, 2},{ 0,-2}},
[23]={{ 1, 0},{ 1,-1},{ 1, 1},{ 0,-2},{ 1,-2},{ 0, 2}},
[32]={{-1, 0},{ 0,-1},{-1, 1},{-1,-1},{ 1, 0},{ 0, 2},{-1, 2},{ 0,-2}},
[23]={{ 1, 0},{ 0, 1},{ 1,-1},{ 1, 1},{-1, 0},{ 0,-2},{ 1,-2},{ 0, 2}},
[02]={{ 0,-1},{ 1,-1},{-1, 0},{ 2,-1},{ 0, 1}},
[20]={{ 0, 1},{-1, 1},{ 1, 0},{-2, 1},{ 0,-1}},
[13]={{-1, 0},{-1,-1},{ 0, 1},{-1,-2}},
@@ -302,24 +317,27 @@ local TRS={
{
[01]={{ 1,-1},{ 1, 0},{ 1, 1},{ 0, 1},{-1, 1},{-1, 0},{-1,-1},{ 0,-1},{ 0,-2},{-2,-1},{-2,-2},{ 2, 0},{ 2,-1},{ 2,-2},{ 1, 2},{ 2, 2},{-1, 2},{-2, 2}},
[10]={{-1, 0},{-1,-1},{ 0,-1},{ 1,-1},{-2,-2},{-2,-1},{-2, 0},{-1,-2},{ 0,-2},{ 1,-2},{ 2,-2},{-1, 1},{-2, 1},{-2, 2},{ 1, 0},{ 2, 0},{ 2,-1},{ 0, 1},{ 1,-1},{ 2,-2}},
},--5I
[03]={{-1,-1},{-1, 0},{-1, 1},{-0, 1},{ 1, 1},{ 1, 0},{ 1,-1},{-0,-1},{-0,-2},{ 2,-1},{ 2,-2},{-2, 0},{-2,-1},{-2,-2},{-1, 2},{-2, 2},{ 1, 2},{ 2, 2}},
[30]={{ 1, 0},{ 1,-1},{-0,-1},{-1,-1},{ 2,-2},{ 2,-1},{ 2, 0},{ 1,-2},{-0,-2},{-1,-2},{-2,-2},{ 1, 1},{ 2, 1},{ 2, 2},{-1, 0},{-2, 0},{-2,-1},{ 0, 1},{-1,-1},{-2,-2}},
},--I5
}
TRS[25][03]=flipList(TRS[25][01])
TRS[25][30]=flipList(TRS[25][10])
sym(TRS[8])sym(TRS[9])sym(TRS[25])
reflect(TRS[1],TRS[2])--SZ
reflect(TRS[3],TRS[4])--LJ
reflect(TRS[8],TRS[9])--5S5Z
reflect(TRS[8],TRS[9])--S5Z5
reflect(TRS[10],TRS[11])--PQ
reflect(TRS[12],TRS[13])--FE
reflect(TRS[19],TRS[20])--5L5J
reflect(TRS[19],TRS[20])--L5J5
reflect(TRS[21],TRS[22])--RY
reflect(TRS[23],TRS[24])--HN
for i=1,25 do collect(TRS[i])end
pushZero(TRS)
C_sym(TRS[8])
C_sym(TRS[9])
C_sym(TRS[25])
for i=1,25 do collect(TRS[i])end
local AIRS={
[1]={
{
[01]={{-1,0},{-1, 1},{ 0,-2},{-1,-2}},
[10]={{ 1,0},{ 1,-1},{ 0, 2},{ 1, 2}},
[03]={{ 1,0},{ 1, 1},{ 0,-2},{ 1,-2}},
@@ -329,7 +347,12 @@ local AIRS={
[32]={{-1,0},{-1,-1},{ 0, 2},{-1, 2}},
[23]={{ 1,0},{ 1, 1},{ 0,-2},{ 1,-2}},
},
[7]={
false,
false,
false,
false,
function()end,
{
[01]={{-2, 0},{ 1, 0},{-2,-1},{ 1, 2}},
[10]={{ 2, 0},{-1, 0},{ 2, 1},{-1,-2}},
[12]={{-1, 0},{ 2, 0},{-1, 2},{ 2,-1}},
@@ -341,8 +364,9 @@ local AIRS={
}
}
collect(AIRS[1])collect(AIRS[7])
for i=2,25 do AIRS[i]=AIRS[1]end
pushZero(AIRS)
for i=2,5 do AIRS[i]=AIRS[1]end
for i=8,25 do AIRS[i]=AIRS[1]end
local NONE={}
for i=1,25 do NONE[i]=ZERO end

View File

@@ -1,7 +1,7 @@
local langList={
{
anykey="按任意键继续",
newVersion="检测到更新!存档格式可能更新",
newVersion="检测到更新!存档格式可能更新,设置已重置",
marking="游戏作者:MrZ_26\n出现此水印则为非法录屏上传",
lang="中文",
atkModeName={"随机","徽章","击杀","反击"},
@@ -139,21 +139,32 @@ local langList={
"全/半清:",
},
help={
"好像也没啥好帮助吧?就当是关于了",
"既然你能玩到这个游戏,应该也不需要什么帮助吧?",
"这只是一个普通的方块游戏,请勿称此游戏为某某某方块",
"从TO/C2/KOS/TGM3/JS等方块获得过灵感",
"",
"使用LOVE2D引擎",
"作者:MrZ 邮箱:1046101471@qq.com",
"程序:MrZ 美术:MrZ 音乐:MrZ 音效:MrZ 语音:MrZ/Miya",
"特别感谢:Flyz,Farter,196,Teatube,[所有内测人员]和 你!",
"",
"错误或者建议请附带截图发送到内测群或者作者邮箱~",
"仅通过唯一内测群822023725进行免费下载/更新",
"其他渠道获得游戏皆有被修改/植入病毒的风险,程序只申请了震动&联网权限!",
"仅通过内测群822023725进行免费下载/更新",
"其他渠道获得游戏皆有被修改/加广告/植入病毒的风险,程序只申请了震动&联网权限!",
"若由于被修改的本游戏产生的各种损失作者不负责(我怎么负责啊跟我有啥关系)",
"请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~",
},
staff={
"作者:MrZ 邮箱:1046101471@qq.com",
"",
"使用LOVE2D引擎",
"",
"程序:MrZ, FinnTenzor",
"美术:MrZ, (Gnyar)",
"音乐:MrZ, (T0722)",
"音效:MrZ",
"语音:Miya, MrZ",
"",
"特别感谢:",
"Flyz, Farter, 蕴空之灵,",
"Teatube, [所有内测人员]",
},
used=[[
使用工具:
Beepbox
@@ -249,6 +260,7 @@ local langList={
atkFX="攻击特效等级",
frame="绘制帧率",
text="消行文本",
warn="死亡预警",
fullscreen="全屏",
bg="背景",
power="电量显示",
@@ -321,10 +333,14 @@ local langList={
back="返回",
},--langName added later
help={
his="历史",
staff="制作人员",
his="更新历史",
qq="作者QQ",
back="返回",
},
staff={
back="返回",
},
history={
prev="",
next="",
@@ -369,8 +385,8 @@ local langList={
{"隐形", "半隐", "不强大脑"},
{"隐形", "全隐", "挺强大脑"},
{"隐形", "瞬隐", "很强大脑"},
{"隐形", "瞬隐+", "强大脑"},
{"隐形", "啥都不剩隐","最强大脑"},
{"隐形", "瞬隐+", "强大脑"},
{"隐形", "", "你准备好了吗"},
{"高速经典", "CTWC", "高速经典"},
{"生存", "简单", "你能存活多久?"},
{"生存", "普通", "你能存活多久?"},
@@ -408,12 +424,12 @@ local langList={
{"无尽:挖掘", "", "挖呀挖呀挖"},
{"自定义", "普通", "画点什么然后把它消除!"},
{"自定义", "拼图", "画点什么然后把它拼出来吧!"},
{"竞速", "五联块", "不可能的任务"},
{"竞速", "五联块", "伤脑筋十八块"},
},
},
{
anykey="按任意键继续",
newVersion="检测到更新!存档格式可能更新",
newVersion="检测到更新!存档格式可能更新,设置已重置",
marking="游戏作者:MrZ_26\n出现此水印则为非法录屏上传",
lang="全中文",
atkModeName={"随机","徽章","击杀","反击"},
@@ -549,21 +565,31 @@ local langList={
"全/半清:",
},
help={
"好像也没啥好帮助吧?就当是关于了",
"既然你能玩到这个游戏,应该也不需要什么帮助吧?",
"这只是一个普通的方块游戏,请勿称此游戏为某某某方块",
"从TO/C2/KOS/TGM3/JS等方块获得过灵感",
"",
"使用LOVE2D引擎",
"作者:MrZ 邮箱:1046101471@qq.com",
"程序:MrZ 美术:MrZ 音乐:MrZ 音效:MrZ 语音:MrZ/Miya",
"特别感谢:Flyz,Farter,196,Teatube,[所有内测人员]和 你!",
"",
"错误或者建议请附带截图发送到内测群或者作者邮箱~",
"仅通过内测群822023725进行免费下载/更新",
"其他渠道获得游戏皆有被修改/植入病毒的风险,程序只申请了震动&联网权限!",
"其他渠道获得游戏皆有被修改/加广告/植入病毒的风险,程序只申请了震动&联网权限!",
"若由于被修改的本游戏产生的各种损失作者不负责(我怎么负责啊跟我有啥关系)",
"请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~",
},
staff={
"作者:MrZ 邮箱:1046101471@qq.com",
"",
"使用LOVE2D引擎",
"",
"程序:MrZ, FinnTenzor",
"美术:MrZ, (Gnyar)",
"音乐:MrZ, (T0722)",
"音效:MrZ",
"语音:Miya, MrZ",
"",
"特别感谢:",
"Flyz, Farter, 蕴空之灵,",
"Teatube, [所有内测人员]",
},
used=[[
使用工具:
Beepbox
@@ -659,6 +685,7 @@ local langList={
atkFX="攻击特效等级",
frame="绘制帧率",
text="消行文本",
warn="死亡预警",
fullscreen="全屏",
bg="背景",
power="电量显示",
@@ -731,10 +758,14 @@ local langList={
back="返回",
},--langName added later
help={
his="历史",
staff="制作人员",
his="更新历史",
qq="作者QQ",
back="返回",
},
staff={
back="返回",
},
history={
prev="",
next="",
@@ -780,7 +811,7 @@ local langList={
{"隐形", "全隐", "挺强大脑"},
{"隐形", "瞬隐", "很强大脑"},
{"隐形", "瞬隐+", "超强大脑"},
{"隐形", "啥都不剩隐","最强大脑"},
{"隐形", "", "你准备好了吗"},
{"高速经典", "CTWC", "高速经典"},
{"生存", "简单", "你能存活多久?"},
{"生存", "普通", "你能存活多久?"},
@@ -818,12 +849,12 @@ local langList={
{"无尽:挖掘", "", "挖呀挖呀挖"},
{"自定义", "普通", "画点什么然后把它消除!"},
{"自定义", "拼图", "画点什么然后把它拼出来吧!"},
{"竞速", "五联块", "不可能的任务"},
{"竞速", "五联块", "伤脑筋十八块"},
},
},
{
anykey="Press any button",
newVersion="Updating detected! Save format may have been updated.",
newVersion="Updating detected! Save format may have been updated, settings reseted",
marking="Author:MrZ_26\nIllegal recording if u see this",
lang="English",
atkModeName={"Random","Badges","K.O.s","Attackers"},
@@ -956,21 +987,31 @@ local langList={
"PC/HPC:",
},
help={
"Doesn't this seem to be of \"any help\", right?",
"Now you can play this, you are probabaly do not need \"help\"?",
"This is just an ordinary block game, not a certain one.",
"It plays like TO/C2/KOS/TGM3 and others.",
"",
"Made with LOVE2D",
"Author: MrZ E-mail: 1046101471@qq.com",
"Program: MrZ Art: MrZ Music: MrZ SFX: MrZ Voice: MrZ/Miya",
"Special thanks to Flyz, Farter, 196, Teatube, [all testers] and you!",
"",
"bug reports/suggestions, sent to the author's testing group or email ~",
"This is a free download available only through discord.gg/f9pUvkh",
"The game downloaded from other sources may contain viruses,",
"and only vibration & networking permissions are needed for mobile versions!",
"The author is not responsible for any losses from modifying the game.",
},
staff={
"Author: MrZ E-mail: 1046101471@qq.com",
"",
"Powered by LOVE2D",
"",
"Program: MrZ, FinnTenzor",
"Art: MrZ, (Gnyar)",
"Music: MrZ, (T0722)",
"Sound: MrZ",
"Voice: Miya, MrZ",
"",
"Special Thanks:",
"Flyz, Farter, 蕴空之灵,",
"Teatube, [All test staff]",
},
used="Tool used:\n\tBeepbox\n\tGFIE\n\tGoldwave\nLib used:\n\tCold_Clear[MinusKelvin]\n\tsimple-love-lights[dylhunn]",
support="Support author",
group="Official QQ Group(if not hacked):822023725",
@@ -1058,6 +1099,7 @@ local langList={
atkFX="ATK. FX level",
frame="Render Frame Rate",
text="Action Text",
warn="Death Alert",
fullscreen="Full Screen",
bg="Background",
power="Power Info.",
@@ -1130,10 +1172,14 @@ local langList={
back="Back",
},--langName added later
help={
staff="Staff",
his="History",
qq="Author's qq",
back="Back",
},
staff={
back="Back",
},
history={
prev="",
next="",
@@ -1163,9 +1209,9 @@ local langList={
{"Tech 49", "EASY", "49-player battle.\nThe last one standing wins."},
{"Tech 49", "HARD", "49-player battle.\nThe last one standing wins."},
{"Tech 49", "ULTIMATE", "49-player battle.\nThe last one standing wins."},
{"Tech 99", "EASY", "49-player battle.\nThe last one standing wins."},
{"Tech 99", "HARD", "49-player battle.\nThe last one standing wins."},
{"Tech 99", "ULTIMATE", "49-player battle.\nThe last one standing wins."},
{"Tech 99", "EASY", "99-player battle.\nThe last one standing wins."},
{"Tech 99", "HARD", "99-player battle.\nThe last one standing wins."},
{"Tech 99", "ULTIMATE", "99-player battle.\nThe last one standing wins."},
{"Turn-Based", "EASY", "Chess mode"},
{"Turn-Based", "NORMAL", "Chess mode"},
{"Turn-Based", "HARD", "Chess mode"},
@@ -1179,7 +1225,7 @@ local langList={
{"Blind", "ALL", "For intermediate players."},
{"Blind", "SUDDEN", "For experienced players."},
{"Blind", "SUDDEN+", "For professionals."},
{"Blind", "NOTHING", "For masters."},
{"Blind", "", "R U Ready?"},
{"Classic", "CTWC", "High-speed classic mode."},
{"Survivor", "EASY", "How long can you survive?"},
{"Survivor", "NORMAL", "How long can you survive?"},
@@ -1217,12 +1263,12 @@ local langList={
{"Infinite: Dig", "", "Dig, dig, dig."},
{"Custom", "NORMAL", "Draw something then clear it!!"},
{"Custom", "PUZZLE", "Draw something then stack it!!"},
{"Sprint", "Pentomino", "???"},
{"Sprint", "Pentomino", "Puzzle-18"},
},
},
{
anykey="↓□↓",
newVersion="!!!!!!!!!!!!!!!!!!!",
newVersion="&!!! ___/_?_ R",
marking="Author:MrZ_26\nIllegal recording if u see this",
lang="?????",
atkModeName={"?","( )","!","←→"},
@@ -1355,21 +1401,31 @@ local langList={
"#<>#/<>:",
},
help={
"?↓↓↓?? ?",
"□□□□~~~, ?_?x ?",
"□!!~~~,□□□□X",
"□!!==*/*/*/*~",
"",
"Made with LOVE2D",
"Author: MrZ E-mail: 1046101471@qq.com",
"Program: MrZ Art: MrZ Music: MrZ SFX: MrZ Voice: MrZ/Miya",
"Special thanks to Flyz, Farter, 196, Teatube, [all testers] and you!",
"",
"bug reports/suggestions, sent to the author's testing group or email ~",
"This is a free download available only through discord.gg/f9pUvkh",
"The game downloaded from other sources may contain viruses,",
"and only vibration & networking permissions are needed for mobile versions!",
"The author is not responsible for any losses from modifying the game.",
},
staff={
"Author: MrZ E-mail: 1046101471@qq.com",
"",
"Powered by LOVE2D",
"",
"Program: MrZ, FinnTenzor",
"Art: MrZ, (Gnyar)",
"Music: MrZ, (T0722)",
"Sound: MrZ",
"Voice: Miya, MrZ",
"",
"Special Thanks:",
"Flyz, Farter, 蕴空之灵,",
"Teatube, [All test staff]",
},
used="Tool used:\n\tBeepbox\n\tGFIE\n\tGoldwave\nLib used:\n\tCold_Clear[MinusKelvin]\n\tsimple-love-lights[dylhunn]",
support="Support author",
group="Official QQ Group(if not hacked):822023725",
@@ -1457,6 +1513,7 @@ local langList={
atkFX="→→~",
frame="|=|",
text="ABC",
warn="!↑↑↑!",
fullscreen="|←→|",
bg="__?__",
power="+.",
@@ -1529,10 +1586,14 @@ local langList={
back="X",
},--langName added later
help={
staff="Orz",
his="_&_",
qq="_@_",
back="X",
},
staff={
back="X",
},
history={
prev="",
next="",
@@ -1562,9 +1623,9 @@ local langList={
{"Tech 49", "EASY", "49-player battle.\nThe last one standing wins."},
{"Tech 49", "HARD", "49-player battle.\nThe last one standing wins."},
{"Tech 49", "ULTIMATE", "49-player battle.\nThe last one standing wins."},
{"Tech 99", "EASY", "49-player battle.\nThe last one standing wins."},
{"Tech 99", "HARD", "49-player battle.\nThe last one standing wins."},
{"Tech 99", "ULTIMATE", "49-player battle.\nThe last one standing wins."},
{"Tech 99", "EASY", "99-player battle.\nThe last one standing wins."},
{"Tech 99", "HARD", "99-player battle.\nThe last one standing wins."},
{"Tech 99", "ULTIMATE", "99-player battle.\nThe last one standing wins."},
{"Turn-Based", "EASY", "Chess mode"},
{"Turn-Based", "NORMAL", "Chess mode"},
{"Turn-Based", "HARD", "Chess mode"},
@@ -1578,7 +1639,7 @@ local langList={
{"Blind", "ALL", "For intermediate players."},
{"Blind", "SUDDEN", "For experienced players."},
{"Blind", "SUDDEN+", "For professionals."},
{"Blind", "NOTHING", "For masters."},
{"Blind", "", "R U Ready?"},
{"Classic", "CTWC", "High-speed classic mode."},
{"Survivor", "EASY", "How long can you survive?"},
{"Survivor", "NORMAL", "How long can you survive?"},
@@ -1616,7 +1677,7 @@ local langList={
{"Infinite: Dig", "", "Dig, dig, dig."},
{"Custom", "NORMAL", "Draw something then clear it!!"},
{"Custom", "PUZZLE", "Draw something then stack it!!"},
{"Sprint", "Pentomino", "???"},
{"Sprint", "Pentomino", "Puzzle-18"},
},
},
}

View File

@@ -3,8 +3,8 @@
--https://github.com/mattdesl/lwjgl-basics/wiki/2D-Pixel-Perfect-Shadows
local gc=love.graphics
local C=gc.clear
local shadowMapShader=gc.newShader("shader/shadowMap.cs")--Shader for caculating the 1D shadow map.
local lightRenderShader=gc.newShader("shader/lightRender.cs")--Shader for rendering blurred lights and shadows.
local shadowMapShader=gc.newShader("shader/shadowMap.glsl")--Shader for caculating the 1D shadow map.
local lightRenderShader=gc.newShader("shader/lightRender.glsl")--Shader for rendering blurred lights and shadows.
local Lights={}--Lightsource objects
local function move(L,x,y)
L.x,L.y=x,y

View File

@@ -20,7 +20,7 @@ customRange={
target={10,20,40,100,200,500,1000,1e99},
freshLimit={0,8,15,1e99},
opponent={0,1,2,3,4,5,11,12,13,14,15,16},
bg={"none","game1","game2","game3","strap","rgb","glow","matrix"},
bg={"none","game1","game2","game3","strap","aura","rgb","glow","matrix"},
bgm={"blank","way","race","newera","push","reason","infinite","secret7th","secret8th","rockblock"},
}
snapLevelValue={1,10,20,40,60,80}

View File

@@ -1,5 +1,12 @@
local gc=love.graphics
local function N(file)
return love.graphics.newShader("shader/"..file..".glsl")
end
return{
-- glow=gc.newShader("shader/glow.cs"),
alpha=gc.newShader("shader/alpha.cs"),
alpha=N("alpha"),
warning=N("warning"),
rainbow=N("rainbow"),
strap=N("strap"),
aura=N("aura"),
}

View File

@@ -15,6 +15,9 @@ local list={
"steel(kulumi)",
"pure(mrz)",
"ball(shaw)",
"paper(mrz)",
"classic(_)",
"brick(notypey)",
"text_bone(mrz)",
"colored_bone(mrz)",
"white_bone(mrz)",

View File

@@ -83,7 +83,7 @@ function TEXT.getText(text,x,y,font,style,spd,stop)
font=font or 40,
spd=(spd or 1)/60,
stop=stop,
draw=textFX[style]or error("unavailable type:"..style),
draw=textFX[style]or assert(false,"unavailable type:"..style),
}
end--another version of TEXT()
function TEXT.show(text,x,y,font,style,spd,stop)
@@ -95,7 +95,7 @@ function TEXT.show(text,x,y,font,style,spd,stop)
font=font or 40, --font
spd=(spd or 1)/60, --timing speed(1=last 1 sec)
stop=stop, --stop time(sustained text)
draw=textFX[style]or error("unavailable type:"..style), --draw method
draw=textFX[style]or assert(false,"unavailable type:"..style), --draw method
}
end
function TEXT.update(list)

View File

@@ -57,7 +57,6 @@ local spinSCR={--[blockName][row]
--B2BMUL:1.2/2.0
--Techrash:1K;MUL:1.3/1.8
--Mini*=.6
local visible_opt={show=1e99,time=300,fast=20,none=0}
local reAtk={0,0,1,1,1,2,2,3,3}
local reDef={0,1,1,2,3,3,4,4,5}
local scs=require("parts/spinCenters")
@@ -153,6 +152,11 @@ local clear_n={"clear_1","clear_2","clear_3","clear_4","clear_4"}
local ren_n={}for i=1,11 do ren_n[i]="ren_"..i end
--------------------------</GameData>--------------------------
--------------------------<LIB>--------------------------
local player={}
local PLY={}
--------------------------</LIB>--------------------------
--------------------------<Update>--------------------------
local function updateFXs(P,dt)
if P.stat.score>P.score1 then
@@ -162,7 +166,7 @@ local function updateFXs(P,dt)
P.score1=int(min(P.score1*.9+P.stat.score*.1+1))
end
end
for i=#P.lockFX,1,-1 do
local S=P.lockFX[i]
S[3]=S[3]+S[4]*dt
@@ -443,7 +447,15 @@ end
local function drawDial(x,y,speed)
gc.setColor(1,1,1)
mStr(int(speed),x,y-18)
gc.draw(IMG.dialCircle,x,y,nil,nil,nil,32,32)
gc.setLineWidth(4)
gc.setColor(1,1,1,.4)
gc.circle("line",x,y,30,10)
gc.setLineWidth(2)
gc.setColor(1,1,1,.6)
gc.circle("line",x,y,30,10)
gc.setColor(1,1,1,.6)
gc.draw(IMG.dialNeedle,x,y,2.094+(speed<=175 and .02094*speed or 4.712-52.36/(speed-125)),nil,nil,5,4)
end
@@ -836,9 +848,8 @@ local function Pdraw_demo(P)
gc.pop()
end
--------------------------</Paint>--------------------------
player={}local player=player
--------------------------<FX>--------------------------
local textFX=textFX
function player.showText(P,text,dx,dy,font,style,spd,stop)
if P.gameEnv.text then
P.bonus[#P.bonus+1]=TEXT.getText(text,150+dx,300+dy,font*P.size,style,spd,stop)
@@ -855,7 +866,7 @@ local function without(L,e)
end
function player.createLockFX(P)
local BK=P.cur.bk
local t=15-P.gameEnv.lockFX*3
local t=12-P.gameEnv.lockFX*3
for i=1,P.r do
local y=P.curY+i-1
@@ -871,7 +882,7 @@ function player.createLockFX(P)
end
function player.createDropFX(P,x1,y1,x2,y2)--x1<x2,y1>y2!
if P.gameEnv.block and y1>=y2 then
P.dropFX[#P.dropFX+1]={P.cur.color,x1,y1,x2,y2,0,12-1.8*P.gameEnv.dropFX}
P.dropFX[#P.dropFX+1]={P.cur.color,x1,y1,x2,y2,0,12-2*P.gameEnv.dropFX}
end
end
function player.createBeam(P,R,send,time,target,color,clear,spin,mini,combo)
@@ -946,7 +957,8 @@ local function getNewStatTable()
key=0,rotate=0,hold=0,
extraPiece=0,extraRate=0,
piece=0,row=0,dig=0,
atk=0,digatk=0,send=0,recv=0,pend=0,
atk=0,digatk=0,
send=0,recv=0,pend=0,off=0,
clear={},clear_B={},clear_S={0,0,0,0,0},
spin={},spin_B={},spin_S={0,0,0,0,0},
pc=0,hpc=0,b2b=0,b3b=0,
@@ -1326,11 +1338,12 @@ function player.drop(P)--Place piece
local STAT=P.stat
local clear--if (perfect)clear
local cc,gbcc=0,0--row/garbage-row cleared,full-part
local atk,send=0,0--Send&Send Time
local exblock=0--extra defense
local cscore,sendTime=0,0
local atk,exblock=0,0--attack & extra defense
local send,off=0,0--sending lines remain & offset
local cscore,sendTime=0,0--score & send Time
local dospin=0
local mini
--spin check
if P.spinLast then
if P.cur.id<6 then
@@ -1366,7 +1379,7 @@ function player.drop(P)--Place piece
--create clearing FX
if cc>0 and P.gameEnv.clearFX then
local l=P.clearedRow
local t=8-P.gameEnv.clearFX*2
local t=6-P.gameEnv.clearFX*1.5
for i=1,cc do
ins(P.clearFX,{l[i],0,t})
end
@@ -1459,8 +1472,7 @@ function player.drop(P)--Place piece
if not finesse then--finesse: control
if dospin then P.ctrlCount=P.ctrlCount-2 end--allow 2 more step for roof-less spin
local id=P.cur.id
local dir=P.dir+1
local d=P.ctrlCount-finesseList[id][dir][P.curX]
local d=P.ctrlCount-finesseList[id][P.dir+1][P.curX]
if d>=2 then P:fineError(2)
elseif d>0 then P:fineError(d)
end--not finesse
@@ -1535,7 +1547,7 @@ function player.drop(P)--Place piece
sendTime=60
atk=cc
end
P.b2b=P.b2b+cc*80-300
P.b2b=P.b2b+cc*80-220
P.lastClear=P.cur.name*10+cc
else
if not clear then
@@ -1584,7 +1596,7 @@ function player.drop(P)--Place piece
sendTime=sendTime+25*cmb
if cmb>1 then
atk=atk+(gbcc>0 and(DigComboAtk[cmb]or 5)or(WidComboAtk[cmb]or 2))
P:showText(text.cmb[min(cmb,20)],0,25,15+min(cmb,25)*3,cmb<10 and"appear"or"flicker")
P:showText(text.cmb[min(cmb,21)],0,25,15+min(cmb,25)*3,cmb<10 and"appear"or"flicker")
cscore=cscore+min(20*cmb,300)*cc
end
@@ -1603,6 +1615,7 @@ function player.drop(P)--Place piece
if exblock then exblock=int(exblock*(1+P.strength*.25))end
send=int(send*(1+P.strength*.25))
--Badge Buff
if send>0 then
P:showText(send,0,80,35,"zoomout")
if exblock>0 then
@@ -1620,12 +1633,15 @@ function player.drop(P)--Place piece
if not A then goto E end
until not A.sent
if send>=A.amount then
send=send-A.amount
P.atkBuffer.sum=P.atkBuffer.sum-A.amount
local O=A.amount--cur Offset
send=send-O
P.atkBuffer.sum=P.atkBuffer.sum-O
off=off+O
A.sent,A.time=true,0
if send>0 then goto R end
else
A.amount=A.amount-send
off=off+send
P.atkBuffer.sum=P.atkBuffer.sum-send
send=0
end
@@ -1707,6 +1723,9 @@ function player.drop(P)--Place piece
if send>0 then
STAT.send=STAT.send+int(send)
end
if off>0 then
STAT.off=STAT.off+off
end
end
if gbcc>0 then
STAT.dig=STAT.dig+gbcc
@@ -1815,11 +1834,6 @@ function player.die(P)--Same thing when win/lose,not really die!
end
end
end
function player.reach_winCheck(P)
if P.stat.row>=P.gameEnv.target then
P:win("finish")
end
end
function player.win(P,result)
P:die()
P.result="WIN"
@@ -1835,7 +1849,6 @@ function player.win(P,result)
BGM.play("8-bit happiness")
end
end
TASK.new(tickEvent.finish,P)
if curMode.id=="custom_puzzle"then
P:showTextF(text.win,0,0,90,"beat",.4)
else
@@ -1844,6 +1857,7 @@ function player.win(P,result)
if P.human then
gameOver()
end
TASK.new(tickEvent.finish,P)
end
function player.lose(P)
if P.life>0 then
@@ -1869,7 +1883,6 @@ function player.lose(P)
if modeEnv.royaleMode then
P:changeAtk()
P.modeData.event=#players.alive+1
P:showTextF(P.modeData.event,0,-120,60,"appear",1,12)
P.strength=0
if P.lastRecv then
local A,i=P,0
@@ -1895,6 +1908,7 @@ function player.lose(P)
else
P.badge=-1
end
freshMostDangerous()
for i=1,#players.alive do
if players.alive[i].atking==P then
@@ -1904,22 +1918,33 @@ function player.lose(P)
if #players.alive==royaleData.stage[game.stage]then
royaleLevelup()
end
P:showTextF(P.modeData.event,0,120,60,"appear",.26,.9)
end
P.gameEnv.keepVisible=P.gameEnv.visible~="show"
P:showTextF(text.lose,0,0,90,"appear",.5,.2)
P:showTextF(text.lose,0,0,90,"appear",.26,.9)
if P.human then
game.result="lose"
SFX.play("fail")
VOC.play("lose")
if modeEnv.royaleMode then BGM.play("end")end
if modeEnv.royaleMode then
if P.modeData.event==2 then
BGM.play("hay what kind of feeling")
else
BGM.play("end")
end
end
gameOver()
TASK.new(#players>1 and tickEvent.lose or tickEvent.finish,P)
end
if #players.alive==1 then
players.alive[1]:win()
end
if #players==1 or(P.human and not players[2].human)then
gameOver()
end
function PLY.reach_winCheck(P)
if P.stat.row>=P.gameEnv.target then
P:win("finish")
end
TASK.new(#players>1 and tickEvent.lose or tickEvent.finish,P)
end
--------------------------<\Events>--------------------------
@@ -2170,28 +2195,199 @@ T={
--------------------------</Control>--------------------------
--------------------------<Generator>--------------------------
function newDemoPlayer(id,x,y,size)
local P={id=id}players[id]=P
P.life=1e99
for k,v in next,player do P[k]=v end
local function newEmptyPlayer(id,x,y,size)
local P={id=id}
players[id]=P
players.alive[#players.alive+1]=P
P.x,P.y,P.size=x,y,size
P.fieldOff={x=0,y=0,vx=0,vy=0}
P.small,P.keyRec=false,false
P.draw=Pdraw_demo
P.fieldOff={x=0,y=0,vx=0,vy=0}--for shake FX
P.x,P.y,P.size=x,y,size or 1
P.small=P.size<.1--if draw in small mode
if P.small then
P.centerX,P.centerY=P.x+300*P.size,P.y+600*P.size
P.canvas=love.graphics.newCanvas(60,120)
P.frameWait=rnd(30,120)
P.draw=Pdraw_small
else
P.keyRec=true--if calculate keySpeed
P.centerX,P.centerY=P.x+300*P.size,P.y+370*P.size
P.absFieldX=P.x+150*P.size
P.absFieldY=P.y+60*P.size
P.draw=Pdraw_norm
P.bonus={}--text objects
end
P.update=Pupdate_alive
--inherit functions of player class
for k,v in next,player do P[k]=v end
P.small=false
P.life=0
P.alive=true
P.control=false
P.timing=false
P.stat=getNewStatTable()
P.modeData={point=0,event=0,counter=0}--data use by mode
P.keyTime={}P.keySpeed=0
P.dropTime={}P.dropSpeed=0
for i=1,10 do P.keyTime[i]=-1e5 end
for i=1,10 do P.dropTime[i]=-1e5 end
P.field,P.visTime={},{}
P.atkBuffer={sum=0}
--Royale-related
P.badge,P.strength=0,0
P.atkMode,P.swappingAtkMode=1,20
P.atker,P.atking,P.lastRecv={}
P.dropDelay,P.lockDelay=0,0
P.color={}
P.showTime=nil
P.keepVisible=true
P.cur={bk={{}},id=0,color=0,name=0}--shape,shapeID,colorID,nameID
P.sc,P.dir,P.r,P.c={0,0},0,0,0--IMG.spinCenter,direction,row,col
P.curX,P.curY,P.y_img=0,0,0--x,y,ghostY
P.hd={bk={{}},id=0,color=0,name=0}
P.holded=false
P.next={}
P.freshTime=0
P.spinLast,P.lastClear=false,nil
P.spinSeq=0--for Ospin, each digit mean a spin
P.ctrlCount=0--key press time, for finesse check
P.pieceCount=0--count pieces from next, for drawing bagline
P.human=false
P.RS=kickList.TRS
-- prepareSequence 这个参数在调用prepareSequence时被初始化
P.newNext=nil
P.keyPressing={}for i=1,12 do P.keyPressing[i]=false end
P.movDir,P.moving,P.downing=0,0,0--last move key,DAS charging,downDAS charging
P.waiting,P.falling=-1,-1
P.clearingRow,P.clearedRow={},{}--clearing animation height,cleared row mark
P.combo,P.b2b=0,0
P.garbageBeneath=0
P.fieldBeneath=0
P.score1,P.b2b1=0,0
P.dropFX,P.lockFX,P.clearFX={},{},{}
P.bonus={}--texts
P.endCounter=0--used after gameover
P.result=nil--string:"WIN"/"K.O."
return P
end
local function loadGameEnv(P)--load gameEnv
P.gameEnv={}--Current game setting environment
local ENV=P.gameEnv
for k,v in next,gameEnv0 do
if modeEnv[k]~=nil then
v=modeEnv[k]
elseif setting[k]~=nil then
v=setting[k]
end
ENV[k]=v
end--load game settings
end
local function applyGameEnv(P)--finish gameEnv processing
local ENV=P.gameEnv
P.dropDelay=ENV.drop
P.lockDelay=ENV.lock
P.color={}
for _=1,7 do
P.color[_]=SKIN.libColor[ENV.skin[_]]
end
P.keepVisible=ENV.visible=="show"
P.showTime=
ENV.visible=="show"and 1e99 or
ENV.visible=="time"and 300 or
ENV.visible=="fast"and 20 or
ENV.visible=="none"and 0
ENV.das=max(ENV.das,ENV.mindas)
ENV.arr=max(ENV.arr,ENV.minarr)
ENV.sdarr=max(ENV.sdarr,ENV.minsdarr)
ENV.next=min(ENV.next,setting.maxNext)
if ENV.sequence~="bag"then
ENV.bagLine=false
else
ENV.bagLen=#ENV.bag
end
if ENV.lockFX==0 then ENV.lockFX=nil end
if ENV.dropFX==0 then ENV.dropFX=nil end
if ENV.clearFX==0 then ENV.clearFX=nil end
if ENV.shakeFX==0 then ENV.shakeFX=nil end
end
local function prepareSequence(P)--call freshPrepare and set newNext
local ENV=P.gameEnv
if type(ENV.sequence)=="string"then
freshPrepare[ENV.sequence](P)
P.newNext=freshMethod[ENV.sequence]
else
assert(type(ENV.sequence)=="function"and type(ENV.freshMethod)=="function","wrong sequence generator code")
ENV.sequence(P)
P.newNext=ENV.freshMethod
end
end
local function loadAI(P,AIdata)--load AI params
local ENV=P.gameEnv
P.AI_mode=AIdata.type
P.AI_stage=1
P.AI_needFresh=false
P.AI_keys={}
P.AI_delay=AIdata.delay or min(int(ENV.drop*.8),2*AIdata.delta)
P.AI_delay0=AIdata.delta
P.AIdata={
next=AIdata.next,
hold=AIdata.hold,
_20G=ENV._20G,
bag=AIdata.bag=="bag",
node=AIdata.node,
}
if not BOT then P.AI_mode="9S"end
if P.AI_mode=="CC"then
P.RS=kickList.AIRS
local opt,wei=BOT.getConf()
BOT.setHold(opt,P.AIdata.hold)
BOT.set20G(opt,P.AIdata._20G)
BOT.setBag(opt,P.AIdata.bag)
BOT.setNode(opt,P.AIdata.node)
P.AI_bot=BOT.new(opt,wei)
BOT.free(opt)BOT.free(wei)
for i=1,AIdata.next do
BOT.addNext(P.AI_bot,CCblockID[P.next[i].id])
end
elseif P.AI_mode=="9S"then
P.RS=kickList.TRS
end
end
function PLY.newDemoPlayer(id,x,y,size)
local P=newEmptyPlayer(id,x,y,size)
P.life=1e99
-- rewrite draw arguments
P.small=false
P.keyRec=false
P.centerX,P.centerY=P.x+300*P.size,P.y+600*P.size
P.absFieldX=P.x+150*P.size
P.absFieldY=P.y+60*P.size
P.draw=Pdraw_demo
P.update=Pupdate_alive
P.alive=true
P.control=true
P.timing=false
P.stat=getNewStatTable()
P.modeData={point=0,event=0,counter=0}
P.keyTime={}P.keySpeed=0
P.dropTime={}P.dropSpeed=0
P.atker={}P.strength=0
@@ -2228,329 +2424,71 @@ function newDemoPlayer(id,x,y,size)
target=1e99,dropPiece=NULL,
mindas=0,minarr=0,minsdarr=0,
}
local ENV=P.gameEnv
if ENV.lockFX==0 then ENV.lockFX=nil end
if ENV.dropFX==0 then ENV.dropFX=nil end
if ENV.clearFX==0 then ENV.clearFX=nil end
if ENV.shakeFX==0 then ENV.shakeFX=nil end
P.color={}
for _=1,7 do
P.color[_]=SKIN.libColor[ENV.skin[_]]
end
P.cur={bk={{}},id=0,color=0,name=0}
P.sc,P.dir,P.r,P.c={0,0},0,0,0
P.curX,P.curY,P.y_img=0,0,0
P.hd={bk={{}},id=0,color=0,name=0}
P.holded=false
P.next={}
applyGameEnv(P)
P.dropDelay,P.lockDelay=1e99,1e99
P.freshTime=0
P.spinLast,P.lastClear=false,nil
P.spinSeq=0
P.ctrlCount=0
P.pieceCount=0
P.showTime=1e99
P.keepVisible=true
--always use "bag"
freshPrepare.bag(P)
P.newNext=freshMethod.bag
P.human=false
P.AI_mode="CC"
P.AI_stage=1
P.AI_needFresh=false
P.AI_keys={}
P.AI_delay,P.AI_delay0=3,3
P.AIdata={next=5,hold=true,_20G=false,bag=true,node=80000}
if not BOT then P.AI_mode="9S"end
if P.AI_mode=="CC"then
P.RS=kickList.AIRS
local opt,wei=BOT.getConf()
BOT.setHold(opt,P.AIdata.hold)
BOT.set20G(opt,P.AIdata._20G)
BOT.setBag(opt,P.AIdata.bag)
BOT.setNode(opt,P.AIdata.node)
P.AI_bot=BOT.new(opt,wei)
BOT.free(opt)BOT.free(wei)
for i=1,5 do
BOT.addNext(P.AI_bot,CCblockID[P.next[i].id])
end
elseif P.AI_mode=="9S"then
P.RS=kickList.TRS
end
P.showTime=1e99
P.keepVisible=true
P.keyPressing={}for i=1,12 do P.keyPressing[i]=false end
P.movDir,P.moving,P.downing=0,0,0
P.waiting,P.falling=-1,-1
P.clearingRow,P.clearedRow={},{}
P.combo,P.b2b=0,0
P.garbageBeneath=0
P.fieldBeneath=0
P.score1,P.b2b1=0,0
P.dropFX,P.lockFX,P.clearFX={},{},{}
P.bonus={}
loadAI(P,{
type="CC",
next=5,
hold=true,
delay=3,
delta=3,
bag="bag",
node=80000,
})
P:popNext()
end
function newAIPlayer(id,x,y,size,AIdata)
players[id]={id=id}
local P=players[id]
P.life=0
for k,v in next,player do P[k]=v end--inherit functions of player class
players.alive[#players.alive+1]=P
P.x,P.y,P.size=x,y,size or 1
P.fieldOff={x=0,y=0,vx=0,vy=0}--for shake FX
P.small=P.size<.1--if draw in small mode
if P.small then
P.centerX,P.centerY=P.x+300*P.size,P.y+600*P.size
P.canvas=love.graphics.newCanvas(60,120)
P.frameWait=rnd(30,120)
P.draw=Pdraw_small
else
P.keyRec=true--if calculate keySpeed
P.centerX,P.centerY=P.x+300*P.size,P.y+370*P.size
P.absFieldX=P.x+150*P.size
P.absFieldY=P.y+60*P.size
P.draw=Pdraw_norm
P.bonus={}--texts
end
P.update=Pupdate_alive
function PLY.newRemotePlayer(id,x,y,size,actions)
local P=newEmptyPlayer(id,x,y,size)
P.alive=true
P.control=false
P.timing=false
P.stat=getNewStatTable()
P.modeData={point=0,event=0,counter=0}--data use by mode
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.human=false -- 录像不是人为操作
P.remote=true -- 远程操作
-- 开发中
-- P.updateAction=buildActionFunctionFromActions(P, actions)
P.field,P.visTime={},{}
P.atkBuffer={sum=0}
P.badge,P.strength=0,0
P.atkMode,P.swappingAtkMode=1,20
P.atker,P.atking,P.lastRecv={}
--Royale-related
P.gameEnv={}--Current game setting environment
local ENV=P.gameEnv
for k,v in next,gameEnv0 do
if modeEnv[k]~=nil then
v=modeEnv[k]
elseif setting[k]~=nil then
v=setting[k]
end
ENV[k]=v
end--load game settings
ENV.das=max(ENV.das,ENV.mindas)
ENV.arr=max(ENV.arr,ENV.minarr)
ENV.sdarr=max(ENV.sdarr,ENV.minsdarr)
P.cur={bk={{}},id=0,color=0,name=0}--shape,shapeID,colorID,nameID
P.sc,P.dir,P.r,P.c={0,0},0,0,0--IMG.spinCenter,direction,row,col
P.curX,P.curY,P.y_img=0,0,0--x,y,ghostY
P.hd={bk={{}},id=0,color=0,name=0}
P.holded=false
P.next={}
P.dropDelay,P.lockDelay=ENV.drop,ENV.lock
P.freshTime=0
P.spinLast,P.lastClear=false,nil
P.spinSeq=0--for Ospin, each digit mean a spin
P.ctrlCount=0--key press time, for finesse check
P.pieceCount=0--count pieces from next, for drawing bagline
if type(ENV.sequence)=="string"then
freshPrepare[ENV.sequence](P)
P.newNext=freshMethod[ENV.sequence]
else
assert(type(ENV.sequence)=="function"and type(ENV.freshMethod)=="function","wrong sequence generator code")
ENV.sequence(P)
P.newNext=ENV.freshMethod
end
if ENV.sequence~="bag"then
ENV.bagLine=false
else
ENV.bagLen=#ENV.bag
end
ENV.face={0,0,0,0,0,0,0}
ENV.skin={1,5,8,2,10,3,7}
P.human=false
P.AI_mode=AIdata.type
P.AI_stage=1
P.AI_needFresh=false
P.AI_keys={}
P.AI_delay=min(int(ENV.drop*.8),2*AIdata.delta)
P.AI_delay0=AIdata.delta
P.AIdata={
next=AIdata.next,
hold=AIdata.hold,
_20G=ENV._20G,
bag=AIdata.bag=="bag",
node=AIdata.node,
}
if not BOT then P.AI_mode="9S"end
if P.AI_mode=="CC"then
P.RS=kickList.AIRS
local opt,wei=BOT.getConf()
BOT.setHold(opt,P.AIdata.hold)
BOT.set20G(opt,P.AIdata._20G)
BOT.setBag(opt,P.AIdata.bag)
BOT.setNode(opt,P.AIdata.node)
P.AI_bot=BOT.new(opt,wei)
BOT.free(opt)BOT.free(wei)
for i=1,AIdata.next do
BOT.addNext(P.AI_bot,CCblockID[P.next[i].id])
end
elseif P.AI_mode=="9S"then
P.RS=kickList.TRS
P.AI_keys={}
end
loadGameEnv(P)
applyGameEnv(P)
prepareSequence(P)
end
function PLY.newAIPlayer(id,x,y,size,AIdata)
local P=newEmptyPlayer(id,x,y,size)
if P.small then
ENV.text=false
ENV.lockFX=nil
ENV.dropFX=nil
ENV.clearFX=nil
ENV.shakeFX=nil
else
if ENV.lockFX==0 then ENV.lockFX=nil end
if ENV.dropFX==0 then ENV.dropFX=nil end
if ENV.clearFX==0 then ENV.clearFX=nil end
if ENV.shakeFX==0 then ENV.shakeFX=nil end
end
P.color={}
for _=1,7 do
P.color[_]=SKIN.libColor[ENV.skin[_]]
end
loadGameEnv(P)
applyGameEnv(P)
prepareSequence(P)
P.showTime=visible_opt[ENV.visible]
P.keepVisible=ENV.visible=="show"
P.keyPressing={}for i=1,12 do P.keyPressing[i]=false end
P.movDir,P.moving,P.downing=0,0,0--last move key,DAS charging,downDAS charging
P.waiting,P.falling=-1,-1
P.clearingRow,P.clearedRow={},{}--clearing animation height,cleared row mark
P.combo,P.b2b=0,0
P.garbageBeneath=0
P.fieldBeneath=0
P.score1,P.b2b1=0,0
P.dropFX,P.lockFX,P.clearFX={},{},{}
P.bonus={}--texts
P.endCounter=0--used after gameover
P.result=nil--string:"WIN"/"K.O."
end
function newPlayer(id,x,y,size)
players[id]={id=id}
local P=players[id]
P.life=0
for k,v in next,player do P[k]=v end--inherit functions of player class
players.alive[#players.alive+1]=P
P.x,P.y,P.size=x,y,size or 1
P.fieldOff={x=0,y=0,vx=0,vy=0}--for shake FX
P.keyRec=true--if calculate keySpeed
P.centerX,P.centerY=P.x+300*P.size,P.y+370*P.size
P.absFieldX=P.x+150*P.size
P.absFieldY=P.y+60*P.size
P.draw=Pdraw_norm
P.bonus={}--texts
P.update=Pupdate_alive
P.alive=true
P.control=false
P.timing=false
P.stat=getNewStatTable()
P.modeData={point=0,event=0,counter=0}--data use by mode
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.field,P.visTime={},{}
P.atkBuffer={sum=0}
P.badge,P.strength=0,0
P.atkMode,P.swappingAtkMode=1,20
P.atker,P.atking,P.lastRecv={}
--Royale-related
P.gameEnv={}--Current game setting environment
local ENV=P.gameEnv
for k,v in next,gameEnv0 do
if modeEnv[k]~=nil then
v=modeEnv[k]
elseif setting[k]~=nil then
v=setting[k]
end
ENV[k]=v
end--load game settings
ENV.das=max(ENV.das,ENV.mindas)
ENV.arr=max(ENV.arr,ENV.minarr)
ENV.sdarr=max(ENV.sdarr,ENV.minsdarr)
ENV.face={0,0,0,0,0,0,0}
ENV.skin={1,5,8,2,10,3,7}
P.human=false
loadAI(P,AIdata)
end
function PLY.newPlayer(id,x,y,size)
local P=newEmptyPlayer(id,x,y,size)
P.cur={bk={{}},id=0,color=0,name=0}--shape,shapeID,colorID,nameID
P.sc,P.dir,P.r,P.c={0,0},0,0,0--IMG.spinCenter,direction,row,col
P.curX,P.curY,P.y_img=0,0,0--x,y,ghostY
P.hd={bk={{}},id=0,color=0,name=0}
P.holded=false
P.next={}
P.dropDelay,P.lockDelay=ENV.drop,ENV.lock
P.freshTime=0
P.spinLast,P.lastClear=false,nil
P.spinSeq=0--for Ospin, each digit mean a spin
P.ctrlCount=0--key press time, for finesse check
P.pieceCount=0--count pieces from next, for drawing bagline
if type(ENV.sequence)=="string"then
freshPrepare[ENV.sequence](P)
P.newNext=freshMethod[ENV.sequence]
else
assert(type(ENV.sequence)=="function"and type(ENV.freshMethod)=="function","wrong sequence generator code")
ENV.sequence(P)
P.newNext=ENV.freshMethod
end
if ENV.sequence~="bag"then
ENV.bagLine=false
else
ENV.bagLen=#ENV.bag
end
loadGameEnv(P)
applyGameEnv(P)
prepareSequence(P)
P.human=true
P.RS=kickList.TRS
players.human=players.human+1
ENV.next=min(ENV.next,setting.maxNext)
if ENV.lockFX==0 then ENV.lockFX=nil end
if ENV.dropFX==0 then ENV.dropFX=nil end
if ENV.clearFX==0 then ENV.clearFX=nil end
if ENV.shakeFX==0 then ENV.shakeFX=nil end
P.color={}
for _=1,7 do
P.color[_]=SKIN.libColor[ENV.skin[_]]
end
P.showTime=visible_opt[ENV.visible]
P.keepVisible=ENV.visible=="show"
P.keyPressing={}for i=1,12 do P.keyPressing[i]=false end
P.movDir,P.moving,P.downing=0,0,0--last move key,DAS charging,downDAS charging
P.waiting,P.falling=-1,-1
P.clearingRow,P.clearedRow={},{}--clearing animation height,cleared row mark
P.combo,P.b2b=0,0
P.garbageBeneath=0
P.fieldBeneath=0
P.score1,P.b2b1=0,0
P.dropFX,P.lockFX,P.clearFX={},{},{}
P.bonus={}--texts
P.endCounter=0--used after gameover
P.result=nil--string:"WIN"/"K.O."
end
--------------------------</Generator>--------------------------
--------------------------</Generator>--------------------------
return PLY

Some files were not shown because too many files have changed in this diff Show More