Compare commits
65 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0650323f47 | ||
|
|
c70951797f | ||
|
|
966e09e7bf | ||
|
|
db36423f48 | ||
|
|
868abe1396 | ||
|
|
39e35a8cd6 | ||
|
|
9803a6a056 | ||
|
|
1b2c0efe9c | ||
|
|
98b2fe6260 | ||
|
|
1ddb665583 | ||
|
|
ad957ca488 | ||
|
|
513348958c | ||
|
|
e05160bdcb | ||
|
|
916e168eb9 | ||
|
|
8fd49c9a87 | ||
|
|
5c21b10686 | ||
|
|
9303821c0f | ||
|
|
4f07726f89 | ||
|
|
aa0f064262 | ||
|
|
0b7032ce50 | ||
|
|
fce0b3862d | ||
|
|
d5634c0f6f | ||
|
|
75b82496a5 | ||
|
|
c1a3abcf50 | ||
|
|
27827d5ab1 | ||
|
|
3e8010d512 | ||
|
|
e091cb6749 | ||
|
|
8b202d9d05 | ||
|
|
0aacf855fb | ||
|
|
6a61d4a0e5 | ||
|
|
e48ebe91f0 | ||
|
|
dcc119015e | ||
|
|
469533c604 | ||
|
|
f0d4c7ae7d | ||
|
|
6f90b85da5 | ||
|
|
5717fb4b08 | ||
|
|
034c1b3c40 | ||
|
|
d568e6d071 | ||
|
|
a4cd661ed8 | ||
|
|
b456c2eb5e | ||
|
|
7e726bc18a | ||
|
|
e9e81a993e | ||
|
|
3cd6335e9d | ||
|
|
155a5bf71c | ||
|
|
ade20aed9a | ||
|
|
dfbdd2ba47 | ||
|
|
9636b2a34e | ||
|
|
f174a02bdc | ||
|
|
2044f4096d | ||
|
|
754d9a2afc | ||
|
|
0c648a8c1e | ||
|
|
e2d06503ad | ||
|
|
a5285a9beb | ||
|
|
333211a312 | ||
|
|
dba1043ed8 | ||
|
|
8e6b721a73 | ||
|
|
e1d7e05aff | ||
|
|
2deb9b8137 | ||
|
|
87b84f971d | ||
|
|
d3e72c5cac | ||
|
|
b2922cb871 | ||
|
|
1e68993e7c | ||
|
|
147e4d9dc7 | ||
|
|
92f71c02b5 | ||
|
|
48def931bf |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
.vscode
|
||||
libAndroid
|
||||
BGM
|
||||
font.ttf
|
||||
BGM
|
||||
note.lua
|
||||
@@ -53,7 +53,7 @@ back.flink={
|
||||
t=t+dt
|
||||
end,
|
||||
draw=function()
|
||||
local t=.13-t%3%1.7
|
||||
local t=.13-t%3%1.9
|
||||
if t<.2 then gc.clear(t,t,t)
|
||||
else gc.clear(0,0,0)
|
||||
end
|
||||
@@ -130,7 +130,6 @@ back.wing={
|
||||
end,
|
||||
}--Flandre's wing
|
||||
|
||||
local _
|
||||
back.fan={
|
||||
init=function()
|
||||
fan=_G.title_fan
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
local rnd=math.random
|
||||
local sin=math.sin
|
||||
local color={
|
||||
red={1,0,0},
|
||||
green={0,1,0},
|
||||
@@ -5,14 +7,16 @@ local color={
|
||||
yellow={1,1,0},
|
||||
magenta={1,0,1},
|
||||
cyan={0,1,1},
|
||||
purple={.5,0,1},
|
||||
orange={1,.6,0},
|
||||
grey={.6,.6,.6},
|
||||
|
||||
lRed={1,.5,.5},
|
||||
lGreen={.5,1,.5},
|
||||
lBlue={.6,.7,1},
|
||||
lCyan={.5,1,1},
|
||||
lMagenta={1,.5,1},
|
||||
lYellow={1,1,.5},
|
||||
lMagenta={1,.5,1},
|
||||
lCyan={.5,1,1},
|
||||
lPurple={.8,.4,1},
|
||||
lOrange={1,.7,.3},
|
||||
lGrey={.8,.8,.8},
|
||||
@@ -20,19 +24,43 @@ local color={
|
||||
dRed={.6,0,0},
|
||||
dGreen={0,.6,0},
|
||||
dBlue={0,0,.6},
|
||||
dCyan={0,.6,.6},
|
||||
dMagenta={.6,0,.6},
|
||||
dYellow={.6,.6,0},
|
||||
dMagenta={.6,0,.6},
|
||||
dCyan={0,.6,.6},
|
||||
dPurple={.3,0,.6},
|
||||
dOrange={.6,.4,0},
|
||||
dGrey={.3,.3,.3},
|
||||
|
||||
black={0,0,0},
|
||||
orange={1,.6,0},
|
||||
pink={1,0,.6},
|
||||
grass={.6,1,0},
|
||||
water={0,1,.6},
|
||||
|
||||
black={0,0,0},
|
||||
white={1,1,1},
|
||||
purple={.5,0,1},
|
||||
}
|
||||
local list_norm={"red","green","blue","yellow","magenta","cyan","purple","orange","pink","grass"}
|
||||
local len_list_norm=#list_norm
|
||||
function color.random_norm()
|
||||
return color[list_norm[rnd(len_list_norm)]]
|
||||
end
|
||||
|
||||
local list_bright={"lRed","lGreen","lBlue","lYellow","lMagenta","lCyan","lPurple","lOrange"}
|
||||
local len_list_bright=#list_bright
|
||||
function color.random_bright()
|
||||
return color[list_bright[rnd(len_list_bright)]]
|
||||
end
|
||||
|
||||
local list_dark={"dRed","dGreen","dBlue","dYellow","dMagenta","dCyan","dPurple","dOrange"}
|
||||
local len_list_dark=#list_dark
|
||||
function color.random_bright()
|
||||
return color[list_dark[rnd(len_list_dark)]]
|
||||
end
|
||||
|
||||
function color.rainbow(phase)
|
||||
return
|
||||
sin(phase)*.4+.6,
|
||||
sin(phase+6.28/3)*.4+.6,
|
||||
sin(phase-6.28/3)*.4+.6
|
||||
end
|
||||
|
||||
return color
|
||||
@@ -1,76 +1,6 @@
|
||||
local fs=love.filesystem
|
||||
local int,max,min=math.floor,math.max,math.min
|
||||
local sub,find=string.sub,string.find
|
||||
local int=math.floor
|
||||
local toN,toS=tonumber,tostring
|
||||
local concat=table.concat
|
||||
|
||||
local function splitS(s,sep)
|
||||
local L={}
|
||||
local p1,p2=1--start,target
|
||||
while p1<=#s do
|
||||
p2=find(s,sep,p1)or #s+1
|
||||
L[#L+1]=sub(s,p1,p2-1)
|
||||
p1=p2+#sep
|
||||
end
|
||||
return L
|
||||
end
|
||||
local tabs={
|
||||
[0]="",
|
||||
"\t",
|
||||
"\t\t",
|
||||
"\t\t\t",
|
||||
"\t\t\t\t",
|
||||
"\t\t\t\t\t",
|
||||
}
|
||||
local function dumpTable(L,t)
|
||||
local s
|
||||
if t then
|
||||
s="{\n"
|
||||
else
|
||||
s="return{\n"
|
||||
t=1
|
||||
end
|
||||
local count=1
|
||||
for k,v in next,L do
|
||||
local T=type(k)
|
||||
if T=="number"then
|
||||
if k==count then
|
||||
k=""
|
||||
count=count+1
|
||||
else
|
||||
k="["..k.."]="
|
||||
end
|
||||
elseif T=="string"then
|
||||
if find(k,"[^0-9a-zA-Z_]")then
|
||||
k="[\""..k.."\"]="
|
||||
else
|
||||
k=k.."="
|
||||
end
|
||||
elseif T=="boolean"then k="["..k.."]="
|
||||
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 assert(false,"Error data type!")
|
||||
end
|
||||
s=s..tabs[t]..k..v..",\n"
|
||||
end
|
||||
return s..tabs[t-1].."}"
|
||||
end
|
||||
local function addToTable(G,base)--Refresh default base with G-values
|
||||
for k,v in next,G do
|
||||
if type(v)==type(base[k])then
|
||||
if type(v)=="table"then
|
||||
addToTable(v,base[k])
|
||||
else
|
||||
base[k]=v
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local files={
|
||||
data= fs.newFile("data.dat"),
|
||||
|
||||
@@ -20,7 +20,6 @@ LOG= require("Zframework/log")
|
||||
|
||||
local ms=love.mouse
|
||||
local gc=love.graphics
|
||||
local Timer=love.timer.getTime
|
||||
local int,rnd,abs=math.floor,math.random,math.abs
|
||||
local max,min=math.max,math.min
|
||||
local ins,rem=table.insert,table.remove
|
||||
@@ -188,32 +187,27 @@ end
|
||||
function love.keypressed(i)
|
||||
mouseShow=false
|
||||
if devMode then
|
||||
if i=="f5"then
|
||||
DBP("DEBUG:")
|
||||
elseif i=="f3"then LOG.print("挂了.gif")
|
||||
elseif i=="f4"then LOG.copy()
|
||||
if i=="f1"then love._setGammaCorrect(true)LOG.print("GammaCorrect: on","warn")
|
||||
elseif i=="f2"then love._setGammaCorrect(false)LOG.print("GammaCorrect: off","warn")
|
||||
elseif i=="f3"then
|
||||
for i=1,8 do
|
||||
local P=players.alive[rnd(#players.alive)]
|
||||
if P~=players[1]then
|
||||
P.lastRecv=players[1]
|
||||
P:lose()
|
||||
end
|
||||
end
|
||||
elseif i=="f4"then LOG.copy()
|
||||
elseif i=="f5"then if love._openConsole then love._openConsole()end
|
||||
elseif i=="f6"then if WIDGET.sel then DBP(WIDGET.sel)end
|
||||
elseif i=="f7"then for k,v in next,_G do DBP(k,v)end
|
||||
elseif i=="f8"then devMode=nil LOG.print("DEBUG OFF",color.yellow)
|
||||
elseif i=="f9"then devMode=1 LOG.print("DEBUG 1",color.yellow)
|
||||
elseif i=="f10"then devMode=2 LOG.print("DEBUG 2",color.yellow)
|
||||
elseif i=="f11"then devMode=3 LOG.print("DEBUG 3",color.yellow)
|
||||
elseif i=="f12"then devMode=4 LOG.print("DEBUG 4",color.yellow)
|
||||
elseif devMode==2 then
|
||||
if i=="k"then
|
||||
for i=1,8 do
|
||||
local P=players.alive[rnd(#players.alive)]
|
||||
if P~=players[1]then
|
||||
P.lastRecv=players[1]
|
||||
P:lose()
|
||||
end
|
||||
end
|
||||
elseif i=="q"then
|
||||
local W=WIDGET.sel
|
||||
if W then W:printInfo()end
|
||||
elseif i=="e"then
|
||||
for k,v in next,_G do
|
||||
DBP(k,v)
|
||||
end
|
||||
elseif WIDGET.sel then
|
||||
if WIDGET.sel then
|
||||
local W=WIDGET.sel
|
||||
if i=="left"then W.x=W.x-10
|
||||
elseif i=="right"then W.x=W.x+10
|
||||
@@ -416,6 +410,7 @@ local FPS=love.timer.getFPS
|
||||
love.draw,love.update=nil--remove default draw/update
|
||||
function love.run()
|
||||
local T=love.timer
|
||||
local Timer=T.getTime
|
||||
local STEP,GETDelta,WAIT=T.step,T.getDelta,T.sleep
|
||||
local mini=love.window.isMinimized
|
||||
local PUMP,POLL=love.event.pump,love.event.poll
|
||||
@@ -513,7 +508,7 @@ function love.run()
|
||||
gc.setColor(devColor[devMode])
|
||||
gc.print("Memory:"..gcinfo(),5,_-20)
|
||||
gc.print("Lines:"..freeRow.getCount(),5,_-40)
|
||||
gc.print("Cursor:"..mx.." "..my,5,_-60)
|
||||
gc.print("Cursor:"..int(mx+.5).." "..int(my+.5),5,_-60)
|
||||
gc.print("Voices:"..VOC.getCount(),5,_-80)
|
||||
gc.print("Tasks:"..TASK.getCount(),5,_-100)
|
||||
ins(frameTimeList,1,dt)rem(frameTimeList,126)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,7 @@ function LOG.update()
|
||||
if not debugMesList[1]then
|
||||
debugMesFloat=0
|
||||
elseif i==1 then
|
||||
debugMesFloat=debugMesFloat+25
|
||||
debugMesFloat=debugMesFloat
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -34,13 +34,16 @@ function LOG.update()
|
||||
end
|
||||
function LOG.draw()
|
||||
if debugMesList[1]then
|
||||
setFont(20)
|
||||
gc.push("transform")
|
||||
local k=scr.w/1280
|
||||
setFont(int(20*k))
|
||||
for i=1,#debugMesList do
|
||||
local M=debugMesList[i]
|
||||
local t=M.time
|
||||
gc.setColor(M.r,M.g,M.b,M.blink>0 and int(M.blink/3)%2 or min(t/26,1))
|
||||
gc.print(M.text,10+(20-min(t,20))^1.5/4,25*i+debugMesFloat)
|
||||
gc.print(M.text,10+(20-min(t,20))^1.5/4,25*i*k+debugMesFloat)
|
||||
end
|
||||
gc.pop()
|
||||
end
|
||||
end
|
||||
function LOG.print(text,T,C)--text,type/time,color
|
||||
|
||||
@@ -64,10 +64,10 @@ function textFX.beat(t)
|
||||
mStr(t.text,0,-t.font*.7)
|
||||
gc.pop()
|
||||
end
|
||||
function textFX.mark(t)
|
||||
function textFX.score(t)
|
||||
local _,_,_,T=gc.getColor()
|
||||
gc.setColor(1,1,1,T*.08)
|
||||
mStr(t.text,t.x,t.y-t.font*.7)
|
||||
gc.setColor(1,1,1,T*.5)
|
||||
mStr(t.text,t.x,t.y-t.font*.7-t.c^.3*50)
|
||||
end
|
||||
|
||||
local TEXT={}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
local gc=love.graphics
|
||||
local int=math.floor
|
||||
local format=string.format
|
||||
local find=string.find
|
||||
|
||||
do--setFont
|
||||
local newFont=gc.setNewFont
|
||||
@@ -39,7 +40,75 @@ do--setFont
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
do--dumpTable
|
||||
local tabs={
|
||||
[0]="",
|
||||
"\t",
|
||||
"\t\t",
|
||||
"\t\t\t",
|
||||
"\t\t\t\t",
|
||||
"\t\t\t\t\t",
|
||||
}
|
||||
function dumpTable(L,t)
|
||||
local s
|
||||
if t then
|
||||
s="{\n"
|
||||
else
|
||||
s="return{\n"
|
||||
t=1
|
||||
end
|
||||
local count=1
|
||||
for k,v in next,L do
|
||||
local T=type(k)
|
||||
if T=="number"then
|
||||
if k==count then
|
||||
k=""
|
||||
count=count+1
|
||||
else
|
||||
k="["..k.."]="
|
||||
end
|
||||
elseif T=="string"then
|
||||
if find(k,"[^0-9a-zA-Z_]")then
|
||||
k="[\""..k.."\"]="
|
||||
else
|
||||
k=k.."="
|
||||
end
|
||||
elseif T=="boolean"then k="["..k.."]="
|
||||
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 assert(false,"Error data type!")
|
||||
end
|
||||
s=s..tabs[t]..k..v..",\n"
|
||||
end
|
||||
return s..tabs[t-1].."}"
|
||||
end
|
||||
end
|
||||
function addToTable(G,base)--Refresh default base with G-values
|
||||
for k,v in next,G do
|
||||
if type(v)==type(base[k])then
|
||||
if type(v)=="table"then
|
||||
addToTable(v,base[k])
|
||||
else
|
||||
base[k]=v
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
function splitStr(s,sep)
|
||||
local L={}
|
||||
local p1,p2=1--start,target
|
||||
while p1<=#s do
|
||||
p2=find(s,sep,p1)or #s+1
|
||||
L[#L+1]=sub(s,p1,p2-1)
|
||||
p1=p2+#sep
|
||||
end
|
||||
return L
|
||||
end
|
||||
function toTime(s)
|
||||
if s<60 then
|
||||
return format("%.3fs",s)
|
||||
|
||||
@@ -1,49 +1,66 @@
|
||||
local rnd=math.random
|
||||
local rem=table.remove
|
||||
local voiceQueue={free=0}
|
||||
local bank={}--{{SRC1s},{SRC2s},...}
|
||||
local bank={}--{vocName1={SRC1s},vocName2={SRC2s},...}
|
||||
local VOC={}
|
||||
VOC.name={
|
||||
"zspin","sspin","lspin","jspin","tspin","ospin","ispin",
|
||||
"single","double","triple","techrash",
|
||||
"mini","b2b","b3b","pc",
|
||||
"mini","b2b","b3b","clear",
|
||||
"win","lose",
|
||||
"bye",
|
||||
"nya",
|
||||
"happy",
|
||||
"doubt",
|
||||
"sad",
|
||||
"nya_happy",
|
||||
"nya_doubt",
|
||||
"nya_sad",
|
||||
"egg",
|
||||
"welcome"
|
||||
"welcome_voc"
|
||||
}
|
||||
VOC.list={
|
||||
zspin={"zspin_1","zspin_2","zspin_3"},
|
||||
sspin={"sspin_1","sspin_2","sspin_3","sspin_4","sspin_5","sspin_6"},
|
||||
lspin={"lspin_1","lspin_2"},
|
||||
jspin={"jspin_1","jspin_2","jspin_3","jspin_4"},
|
||||
tspin={"tspin_1","tspin_2","tspin_3","tspin_4","tspin_5","tspin_6"},
|
||||
ospin={"ospin_1","ospin_2","ospin_3"},
|
||||
ispin={"ispin_1","ispin_2","ispin_3"},
|
||||
VOC.list={}
|
||||
|
||||
single={"single_1","single_2","single_3","single_4","single_5","single_6","single_7"},
|
||||
double={"double_1","double_2","double_3","double_4","double_5"},
|
||||
triple={"triple_1","triple_2","triple_3","triple_4","triple_5","triple_6","triple_7"},
|
||||
techrash={"techrash_1","techrash_2","techrash_3","techrash_4"},
|
||||
local function loadVoiceFile(N,vocName)
|
||||
local fileName="VOICE/"..vocName..".ogg"
|
||||
if love.filesystem.getInfo(fileName)then
|
||||
bank[vocName]={love.audio.newSource(fileName,"static")}
|
||||
table.insert(VOC.list[N],vocName)
|
||||
return true
|
||||
else
|
||||
return
|
||||
end
|
||||
end
|
||||
function VOC.loadOne(_)
|
||||
local N=VOC.name[_]
|
||||
VOC.list[N]={}
|
||||
local i=1
|
||||
while true do
|
||||
if not loadVoiceFile(N,N.."_"..i)then
|
||||
break
|
||||
end
|
||||
i=i+1
|
||||
end
|
||||
if i==1 then
|
||||
if not loadVoiceFile(N,N)then
|
||||
LOG.print("No VOICE file: "..N,"warn")
|
||||
end
|
||||
end
|
||||
end
|
||||
function VOC.loadAll()
|
||||
for i=1,#VOC.name do
|
||||
VOC.loadOne(i)
|
||||
end
|
||||
end
|
||||
|
||||
mini={"mini_1","mini_2","mini_3"},
|
||||
b2b={"b2b_1","b2b_2","b2b_3"},
|
||||
b3b={"b3b_1","b3b_2"},
|
||||
pc={"clear_1","clear_2"},
|
||||
win={"win_1","win_2","win_3","win_4","win_5","win_6","win_6","win_7"},
|
||||
lose={"lose_1","lose_2","lose_3"},
|
||||
bye={"bye_1","bye_2"},
|
||||
nya={"nya_1","nya_2","nya_3","nya_4"},
|
||||
happy={"nya_happy_1","nya_happy_2","nya_happy_3","nya_happy_4"},
|
||||
doubt={"nya_doubt_1","nya_doubt_2"},
|
||||
sad={"nya_sad_1"},
|
||||
egg={"egg_1","egg_2"},
|
||||
welcome={"welcome_voc"},
|
||||
}
|
||||
function VOC.getFreeChannel()
|
||||
local i=#voiceQueue
|
||||
for i=1,i do
|
||||
if #voiceQueue[i]==0 then return i end
|
||||
end
|
||||
voiceQueue[i+1]={s=0}
|
||||
return i+1
|
||||
end
|
||||
function VOC.getCount()
|
||||
return #voiceQueue
|
||||
end
|
||||
|
||||
local function getVoice(str)
|
||||
local L=bank[str]
|
||||
@@ -59,29 +76,6 @@ local function getVoice(str)
|
||||
return L[n]
|
||||
--Load voice with string
|
||||
end
|
||||
function VOC.loadOne(_)
|
||||
local N=VOC.name[_]
|
||||
for i=1,#VOC.list[N]do
|
||||
local V=VOC.list[N][i]
|
||||
bank[V]={love.audio.newSource("VOICE/"..V..".ogg","static")}
|
||||
end
|
||||
end
|
||||
function VOC.loadAll()
|
||||
for i=1,#VOC.list do
|
||||
VOC.loadOne(i)
|
||||
end
|
||||
end
|
||||
function VOC.getFreeChannel()
|
||||
local i=#voiceQueue
|
||||
for i=1,i do
|
||||
if #voiceQueue[i]==0 then return i end
|
||||
end
|
||||
voiceQueue[i+1]={s=0}
|
||||
return i+1
|
||||
end
|
||||
function VOC.getCount()
|
||||
return #voiceQueue
|
||||
end
|
||||
function VOC.update()
|
||||
for i=#voiceQueue,1,-1 do
|
||||
local Q=voiceQueue[i]
|
||||
@@ -118,15 +112,15 @@ function VOC.update()
|
||||
end
|
||||
function VOC.play(s,chn)
|
||||
if setting.voc>0 then
|
||||
local _=VOC.list[s]
|
||||
if not _ then return end
|
||||
if chn then
|
||||
local L=voiceQueue[chn]
|
||||
local _=VOC.list[s]
|
||||
if not _ then return end
|
||||
L[#L+1]=_[rnd(#_)]
|
||||
L.s=1
|
||||
--Add to queue[chn]
|
||||
else
|
||||
voiceQueue[VOC.getFreeChannel()]={s=1,VOC.list[s][rnd(#VOC.list[s])]}
|
||||
voiceQueue[VOC.getFreeChannel()]={s=1,_[rnd(#_)]}
|
||||
--Create new channel & play
|
||||
end
|
||||
end
|
||||
|
||||
@@ -69,8 +69,8 @@ function button:draw()
|
||||
gc.printf(t,x,y0,w,"center")
|
||||
end
|
||||
end
|
||||
function button:printInfo()
|
||||
DBP(format("x=%d,y=%d,w=%d,h=%d,font=%d",self.x+self.w*.5,self.y+self.h*.5,self.w,self.h,self.font))
|
||||
function button:getInfo()
|
||||
return format("x=%d,y=%d,w=%d,h=%d,font=%d",self.x+self.w*.5,self.y+self.h*.5,self.w,self.h,self.font)
|
||||
end
|
||||
|
||||
local key={
|
||||
@@ -119,8 +119,8 @@ function key:draw()
|
||||
gc.printf(t,x,y+h*.5-self.font*.7,w,"center")
|
||||
end
|
||||
end
|
||||
function key:printInfo()
|
||||
DBP(format("x=%d,y=%d,w=%d,h=%d,font=%d",self.x+self.w*.5,self.y+self.h*.5,self.w,self.h,self.font))
|
||||
function key:getInfo()
|
||||
return format("x=%d,y=%d,w=%d,h=%d,font=%d",self.x+self.w*.5,self.y+self.h*.5,self.w,self.h,self.font)
|
||||
end
|
||||
|
||||
local switch={
|
||||
@@ -176,8 +176,8 @@ function switch:draw()
|
||||
gc.printf(t,x-412-ATV,y+20-self.font*.7,400,"right")
|
||||
end
|
||||
end
|
||||
function switch:printInfo()
|
||||
DBP(format("x=%d,y=%d,font=%d",self.x,self.y,self.font))
|
||||
function switch:getInfo()
|
||||
return format("x=%d,y=%d,font=%d",self.x,self.y,self.font)
|
||||
end
|
||||
|
||||
local slider={
|
||||
@@ -280,8 +280,8 @@ function slider:draw()
|
||||
gc.printf(t,x-312-ATV,y-self.font*.7,300,"right")
|
||||
end
|
||||
end
|
||||
function slider:printInfo()
|
||||
DBP(format("x=%d,y=%d,w=%d",self.x,self.y,self.w))
|
||||
function slider:getInfo()
|
||||
return format("x=%d,y=%d,w=%d",self.x,self.y,self.w)
|
||||
end
|
||||
|
||||
local selector={
|
||||
@@ -310,7 +310,7 @@ function selector:isAbove(x,y)
|
||||
y<self.y+60
|
||||
end
|
||||
function selector:getCenter()
|
||||
return self.x+self.w*(self.pos/self.unit),self.y
|
||||
return self.x+self.w*.5,self.y+30
|
||||
end
|
||||
function selector:update()
|
||||
local atv=self.ATV
|
||||
@@ -351,7 +351,7 @@ function selector:draw()
|
||||
gc.draw(drawableText.large,x+w-24+t*40,y+20)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
setFont(28)
|
||||
t=self.text
|
||||
if t then
|
||||
@@ -362,8 +362,8 @@ function selector:draw()
|
||||
gc.setColor(1,1,1)
|
||||
mStr(self.selText,x+w*.5,y+43-21)
|
||||
end
|
||||
function selector:printInfo()
|
||||
DBP(format("x=%d,y=%d,w=%d",self.x,self.y,self.w))
|
||||
function selector:getInfo()
|
||||
return format("x=%d,y=%d,w=%d",self.x,self.y,self.w)
|
||||
end
|
||||
|
||||
local WIDGET={}
|
||||
@@ -381,7 +381,11 @@ function WIDGET.set(L)
|
||||
end
|
||||
end
|
||||
|
||||
WIDGET.new={}
|
||||
local widgetMetatable={
|
||||
__tostring=function(self)
|
||||
return self:getInfo()
|
||||
end,
|
||||
}
|
||||
function WIDGET.newText(D)
|
||||
local _={
|
||||
name= D.name,
|
||||
@@ -391,7 +395,10 @@ function WIDGET.newText(D)
|
||||
color= D.color and(color[D.color]or D.color)or color.white,
|
||||
font= D.font,
|
||||
hide= D.hide,
|
||||
}for k,v in next,button do _[k]=v end return _
|
||||
}
|
||||
for k,v in next,button do _[k]=v end
|
||||
setmetatable(_,widgetMetatable)
|
||||
return _
|
||||
end
|
||||
function WIDGET.newImage(D)
|
||||
local _={
|
||||
@@ -404,7 +411,10 @@ function WIDGET.newImage(D)
|
||||
font= D.font,
|
||||
code= D.code,
|
||||
hide= D.hide,
|
||||
}for k,v in next,button do _[k]=v end return _
|
||||
}
|
||||
for k,v in next,button do _[k]=v end
|
||||
setmetatable(_,widgetMetatable)
|
||||
return _
|
||||
end
|
||||
function WIDGET.newButton(D)
|
||||
if not D.h then D.h=D.w end
|
||||
@@ -428,7 +438,10 @@ function WIDGET.newButton(D)
|
||||
font= D.font,
|
||||
code= D.code,
|
||||
hide= D.hide,
|
||||
}for k,v in next,button do _[k]=v end return _
|
||||
}
|
||||
for k,v in next,button do _[k]=v end
|
||||
setmetatable(_,widgetMetatable)
|
||||
return _
|
||||
end
|
||||
function WIDGET.newKey(D)
|
||||
if not D.h then D.h=D.w end
|
||||
@@ -452,7 +465,10 @@ function WIDGET.newKey(D)
|
||||
font= D.font,
|
||||
code= D.code,
|
||||
hide= D.hide,
|
||||
}for k,v in next,key do _[k]=v end return _
|
||||
}
|
||||
for k,v in next,key do _[k]=v end
|
||||
setmetatable(_,widgetMetatable)
|
||||
return _
|
||||
end
|
||||
function WIDGET.newSwitch(D)
|
||||
local _={
|
||||
@@ -469,7 +485,10 @@ function WIDGET.newSwitch(D)
|
||||
disp= D.disp,
|
||||
code= D.code,
|
||||
hide= D.hide,
|
||||
}for k,v in next,switch do _[k]=v end return _
|
||||
}
|
||||
for k,v in next,switch do _[k]=v end
|
||||
setmetatable(_,widgetMetatable)
|
||||
return _
|
||||
end
|
||||
function WIDGET.newSlider(D)
|
||||
local _={
|
||||
@@ -516,7 +535,9 @@ function WIDGET.newSlider(D)
|
||||
_.show=sliderShowFunc.int
|
||||
end
|
||||
end
|
||||
for k,v in next,slider do _[k]=v end return _
|
||||
for k,v in next,slider do _[k]=v end
|
||||
setmetatable(_,widgetMetatable)
|
||||
return _
|
||||
end
|
||||
function WIDGET.newSelector(D)
|
||||
local _={
|
||||
@@ -540,7 +561,9 @@ function WIDGET.newSelector(D)
|
||||
code= D.code,
|
||||
hide= D.hide,
|
||||
}
|
||||
for k,v in next,selector do _[k]=v end return _
|
||||
for k,v in next,selector do _[k]=v end
|
||||
setmetatable(_,widgetMetatable)
|
||||
return _
|
||||
end
|
||||
|
||||
function WIDGET.moveCursor(x,y)
|
||||
@@ -568,24 +591,26 @@ function WIDGET.press(x,y)
|
||||
elseif W.type=="slider"then
|
||||
WIDGET.drag(x,y)
|
||||
elseif W.type=="selector"then
|
||||
local s=W.select
|
||||
if x<W.x+W.w*.5 then
|
||||
if s>1 then
|
||||
s=s-1
|
||||
sysFX.newShade(.3,1,1,1,W.x,W.y,W.w*.5,60)
|
||||
if x then
|
||||
local s=W.select
|
||||
if x<W.x+W.w*.5 then
|
||||
if s>1 then
|
||||
s=s-1
|
||||
sysFX.newShade(.3,1,1,1,W.x,W.y,W.w*.5,60)
|
||||
end
|
||||
else
|
||||
if s<#W.list then
|
||||
s=s+1
|
||||
sysFX.newShade(.3,1,1,1,W.x+W.w*.5,W.y,W.w*.5,60)
|
||||
end
|
||||
end
|
||||
else
|
||||
if s<#W.list then
|
||||
s=s+1
|
||||
sysFX.newShade(.3,1,1,1,W.x+W.w*.5,W.y,W.w*.5,60)
|
||||
if W.select~=s then
|
||||
W.code(W.list[s])
|
||||
W.select=s
|
||||
W.selText=W.list[s]
|
||||
SFX.play("prerotate")
|
||||
end
|
||||
end
|
||||
if W.select~=s then
|
||||
W.code(W.list[s])
|
||||
W.select=s
|
||||
W.selText=W.list[s]
|
||||
SFX.play("prerotate")
|
||||
end
|
||||
end
|
||||
if W.hide and W.hide()then WIDGET.sel=nil end
|
||||
end
|
||||
|
||||
@@ -75,7 +75,7 @@ local virtualkeySet={
|
||||
},--PC key feedback(top&in a row)
|
||||
}
|
||||
local CUSlist={
|
||||
drop={1e99,180,60,40,30,25,20,18,16,14,12,10,9,8,7,6,5,4,3,2,1,.5,.25,.125,0},
|
||||
drop={0,.125,.25,.5,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99},
|
||||
lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99},
|
||||
wait={0,1,2,3,4,5,6,7,8,10,15,20,30,60},
|
||||
fall={0,1,2,3,4,5,6,7,8,10,15,20,30,60},
|
||||
@@ -84,36 +84,37 @@ local CUSlist={
|
||||
visible={"show","time","fast","none"},
|
||||
freshLimit={0,8,15,1e99},
|
||||
opponent={0,1,2,3,4,5,6,7,8,9,10},
|
||||
life={0,1,2,3,4,5,10,42,87,500},
|
||||
life={0,1,2,3,5,10,15,26,42,87,500},
|
||||
pushSpeed={1,2,3,5,15},
|
||||
bg={"none","glow","rgb","flink","aura","bg1","bg2","rainbow","rainbow2","lightning","lightning2","matrix","space"},
|
||||
bg={"none","bg1","bg2","rainbow","rainbow2","glow","rgb","aura","wing","matrix","space"},
|
||||
bgm={"blank","race","push","way","reason","newera","oxygen","infinite","down","secret7th","secret8th","rockblock","cruelty","final"},
|
||||
}
|
||||
--Lambda Funcs for widgets,delete at file end
|
||||
function CUSval(k) return function()return customEnv[k] end end
|
||||
function CUSrev(k) return function()customEnv[k]=not customEnv[k] end end
|
||||
function CUSsto(k) return function(i)customEnv[k]=i end end
|
||||
function SETval(k) return function()return setting[k] end end
|
||||
function SETrev(k) return function()setting[k]=not setting[k] end end
|
||||
function SETsto(k) return function(i)setting[k]=i end end
|
||||
function pressKey(k)return function()love.keypressed(k) end end
|
||||
function setPen(i) return function()sceneTemp.pen=i end end
|
||||
function prevSkin(n)return function()SKIN.prev(n) end end
|
||||
function nextSkin(n)return function()SKIN.next(n) end end
|
||||
function nextDir(n) return function()SKIN.rotate(n) end end
|
||||
function VKAdisp(n) return function()return VK_org[n].ava end end
|
||||
function VKAcode(n) return function()VK_org[n].ava=not VK_org[n].ava end end
|
||||
function setLang(n) return function()LANG.set(n)setting.lang=n end end
|
||||
function goScene(s) return function()SCN.go(s) end end
|
||||
local function CUSval(k) return function() return customEnv[k] end end
|
||||
local function CUSrev(k) return function() customEnv[k]=not customEnv[k] end end
|
||||
local function CUSsto(k) return function(i) customEnv[k]=i end end
|
||||
local function SETval(k) return function() return setting[k] end end
|
||||
local function SETrev(k) return function() setting[k]=not setting[k] end end
|
||||
local function SETsto(k) return function(i) setting[k]=i end end
|
||||
local function pressKey(k) return function() love.keypressed(k) end end
|
||||
local function setPen(i) return function() sceneTemp.pen=i end end
|
||||
local function prevSkin(n) return function() SKIN.prev(n) end end
|
||||
local function nextSkin(n) return function() SKIN.next(n) end end
|
||||
local function nextDir(n) return function() SKIN.rotate(n) end end
|
||||
local function VKAdisp(n) return function() return VK_org[n].ava end end
|
||||
local function VKAcode(n) return function() VK_org[n].ava=not VK_org[n].ava end end
|
||||
local function setLang(n) return function() LANG.set(n)setting.lang=n end end
|
||||
local function goScene(t,s) return function() SCN.go(t,s) end end
|
||||
local function swapScene(t,s)return function() SCN.swapTo(t,s) end end
|
||||
|
||||
--NewXXX
|
||||
newText=WIDGET.newText
|
||||
newImage=WIDGET.newImage
|
||||
newButton=WIDGET.newButton
|
||||
newKey=WIDGET.newKey
|
||||
newSwitch=WIDGET.newSwitch
|
||||
newSlider=WIDGET.newSlider
|
||||
newSelector=WIDGET.newSelector
|
||||
local newText= WIDGET.newText
|
||||
local newImage= WIDGET.newImage
|
||||
local newButton= WIDGET.newButton
|
||||
local newKey= WIDGET.newKey
|
||||
local newSwitch= WIDGET.newSwitch
|
||||
local newSlider= WIDGET.newSlider
|
||||
local newSelector= WIDGET.newSelector
|
||||
|
||||
--All widgets
|
||||
local Widgets={
|
||||
@@ -129,12 +130,14 @@ local Widgets={
|
||||
newKey({name="_8", x=250,y=500,w=90, color="white", font=50,code=pressKey("8")}),
|
||||
newKey({name="_9", x=350,y=500,w=90, color="white", font=50,code=pressKey("9")}),
|
||||
newKey({name="_0", x=150,y=600,w=90, color="white", font=50,code=pressKey("0")}),
|
||||
newKey({name="<", x=250,y=600,w=90, color="lRed", font=50,code=pressKey("backspace")}),
|
||||
newKey({name="=", x=350,y=600,w=90, color="lYellow",font=50,code=pressKey("return")}),
|
||||
newKey({name=".", x=250,y=600,w=90, color="lPurple",font=50,code=pressKey(".")}),
|
||||
newKey({name="e", x=350,y=600,w=90, color="lPurple",font=50,code=pressKey("e")}),
|
||||
newKey({name="+", x=450,y=300,w=90, color="lBlue", font=50,code=pressKey("+")}),
|
||||
newKey({name="-", x=450,y=400,w=90, color="lBlue", font=50,code=pressKey("-")}),
|
||||
newKey({name="*", x=450,y=500,w=90, color="lBlue", font=50,code=pressKey("*")}),
|
||||
newKey({name="/", x=450,y=600,w=90, color="lBlue", font=50,code=pressKey("/")}),
|
||||
newKey({name="<", x=550,y=300,w=90, color="lRed", font=50,code=pressKey("backspace")}),
|
||||
newKey({name="=", x=550,y=400,w=90, color="lYellow",font=50,code=pressKey("return")}),
|
||||
newButton({name="play", x=640,y=600,w=180,h=90, color="lGreen", font=40,code=pressKey("space"),hide=function()return not sceneTemp.pass end}),
|
||||
},
|
||||
main={
|
||||
@@ -149,12 +152,7 @@ local Widgets={
|
||||
newButton({name="quit", x=590,y=610,w=160,h=100,color="lGrey", font=45,code=function()VOC.play("bye")SCN.swapTo("quit","slowFade")end}),
|
||||
},
|
||||
mode={
|
||||
newButton({name="setting", x=1100,y=540,w=240,h=90,color="lGreen", font=40,code=function()
|
||||
SCN.go("custom")
|
||||
end,
|
||||
hide=function()
|
||||
return mapCam.sel~="custom_clear" and mapCam.sel~="custom_puzzle"
|
||||
end}),
|
||||
newButton({name="setting", x=1100,y=540,w=240,h=90,color="lGreen", font=40,code=pressKey("e"),hide=function()return mapCam.sel~="custom_clear" and mapCam.sel~="custom_puzzle"end}),
|
||||
newButton({name="start", x=1040,y=655,w=180,h=80,color="white", font=40,code=pressKey("return"),hide=function()return not mapCam.sel end}),
|
||||
newButton({name="back", x=1200,y=655,w=120,h=80,color="white", font=40,code=BACK}),
|
||||
},
|
||||
@@ -163,53 +161,61 @@ local Widgets={
|
||||
newButton({name="up", x=200, y=250, w=120, color="white", font=55,code=pressKey("up"),hide=function()return sceneTemp==1 end}),
|
||||
newButton({name="play", x=200, y=390, w=120, color="white", font=35,code=pressKey("space"),hide=function()return setting.bgm==0 end}),
|
||||
newButton({name="down", x=200, y=530, w=120, color="white", font=55,code=pressKey("down"),hide=function()return sceneTemp==BGM.len end}),
|
||||
newButton({name="back", x=1140, y=640, w=180,h=80, color="white", font=35,code=BACK}),
|
||||
newButton({name="back", x=1140, y=640, w=170,h=80, color="white", font=40,code=BACK}),
|
||||
},
|
||||
custom={
|
||||
custom_basic={
|
||||
--Basic
|
||||
newSelector({name="drop", x=180, y=150+20,w=260,color="red", list=CUSlist.drop, disp=CUSval("drop"), code=CUSsto("drop")}),
|
||||
newSelector({name="lock", x=180, y=230+20,w=260,color="red", list=CUSlist.lock, disp=CUSval("lock"), code=CUSsto("lock")}),
|
||||
newSelector({name="wait", x=180, y=310+20,w=260,color="orange", list=CUSlist.wait, disp=CUSval("wait"), code=CUSsto("wait")}),
|
||||
newSelector({name="fall", x=180, y=390+20,w=260,color="orange", list=CUSlist.fall, disp=CUSval("fall"), code=CUSsto("fall")}),
|
||||
newSelector({name="drop", x=250, y=150,w=260,color="orange", list=CUSlist.drop, disp=CUSval("drop"), code=CUSsto("drop")}),
|
||||
newSelector({name="lock", x=250, y=230,w=260,color="red", list=CUSlist.lock, disp=CUSval("lock"), code=CUSsto("lock")}),
|
||||
newSelector({name="wait", x=250, y=310,w=260,color="green", list=CUSlist.wait, disp=CUSval("wait"), code=CUSsto("wait")}),
|
||||
newSelector({name="fall", x=250, y=390,w=260,color="yellow", list=CUSlist.fall, disp=CUSval("fall"), code=CUSsto("fall")}),
|
||||
|
||||
newSlider({name="next", x=120, y=500,w=200,unit=6, font=30, disp=CUSval("next"), code=CUSsto("next")}),
|
||||
newSwitch({name="hold", x=230, y=570, font=30, disp=CUSval("hold"), code=CUSrev("hold")}),
|
||||
newSwitch({name="oncehold", x=230, y=650, font=30, disp=CUSval("oncehold"),code=CUSrev("oncehold"),hide=function()return not customEnv.hold end}),
|
||||
newSlider({name="next", x=170, y=470,w=200,unit=6, font=30, disp=CUSval("next"), code=CUSsto("next")}),
|
||||
newSwitch({name="hold", x=300, y=540, font=30, disp=CUSval("hold"), code=CUSrev("hold")}),
|
||||
newSwitch({name="oncehold", x=300, y=620, font=30, disp=CUSval("oncehold"),code=CUSrev("oncehold"),hide=function()return not customEnv.hold end}),
|
||||
|
||||
--Visual
|
||||
newSlider({name="block", x=470, y=150,w=120,unit=1, font=25, disp=CUSval("block"), code=CUSsto("block")}),
|
||||
newSlider({name="ghost", x=470, y=210,w=120,unit=.6, font=25, disp=CUSval("ghost"), code=CUSsto("ghost")}),
|
||||
newSlider({name="center", x=470, y=270,w=120,unit=1, font=25, disp=CUSval("center"), code=CUSsto("center")}),
|
||||
newSwitch({name="bagLine", x=570, y=340, font=30, disp=CUSval("bagLine"), code=CUSrev("bagLine")}),
|
||||
newSwitch({name="highCam", x=570, y=400, font=30, disp=CUSval("highCam"), code=CUSrev("highCam")}),
|
||||
newSwitch({name="nextPos", x=570, y=460, font=30, disp=CUSval("nextPos"), code=CUSrev("nextPos")}),
|
||||
newSwitch({name="bone", x=570, y=520, font=30, disp=CUSval("bone"), code=CUSrev("bone")}),
|
||||
|
||||
--Rule
|
||||
newSlider({name="mindas", x=750, y=150,w=200,unit=15,font=25, disp=CUSval("mindas"), code=CUSsto("mindas")}),
|
||||
newSlider({name="minarr", x=750, y=210,w=200,unit=10,font=25, disp=CUSval("minarr"), code=CUSsto("minarr")}),
|
||||
newSlider({name="minsdarr", x=750, y=270,w=200,unit=4, font=22, disp=CUSval("minsdarr"),code=CUSsto("minsdarr")}),
|
||||
newSelector({name="sequence", x=520, y=600,w=200,color="green", list=CUSlist.sequence, disp=CUSval("sequence"),code=CUSsto("sequence")}),
|
||||
newSwitch({name="ospin", x=860, y=340, font=30, disp=CUSval("ospin"), code=CUSrev("ospin")}),
|
||||
newSwitch({name="noTele", x=860, y=400, font=25, disp=CUSval("noTele"), code=CUSrev("noTele")}),
|
||||
newSwitch({name="fineKill", x=860, y=460, font=22, disp=CUSval("fineKill"),code=CUSrev("fineKill")}),
|
||||
newSwitch({name="easyFresh", x=860, y=520, font=18, disp=CUSval("easyFresh"),code=CUSrev("easyFresh")}),
|
||||
newSelector({name="visible", x=1120, y=60,w=260,color="lBlue", list=CUSlist.visible, disp=CUSval("visible"), code=CUSsto("visible")}),
|
||||
newSelector({name="target", x=1120, y=140,w=260,color="green", list=CUSlist.target, disp=CUSval("target"), code=CUSsto("target")}),
|
||||
newSelector({name="freshLimit", x=1120, y=220,w=260,color="purple", list=CUSlist.freshLimit,disp=CUSval("freshLimit"),code=CUSsto("freshLimit")}),
|
||||
newSelector({name="opponent", x=1120, y=300,w=260,color="red", list=CUSlist.opponent, disp=CUSval("opponent"),code=CUSsto("opponent")}),
|
||||
newSelector({name="life", x=1120, y=380,w=260,color="red", list=CUSlist.life, disp=CUSval("life"), code=CUSsto("life")}),
|
||||
newSelector({name="pushSpeed", x=1120, y=460,w=260,color="red", list=CUSlist.pushSpeed, disp=CUSval("pushSpeed"),code=CUSsto("pushSpeed")}),
|
||||
newSwitch({name="block", x=700, y=160, font=25, disp=CUSval("block"), code=CUSrev("block")}),
|
||||
newSlider({name="ghost", x=570, y=230,w=200,unit=.6, font=25, disp=CUSval("ghost"), code=CUSsto("ghost")}),
|
||||
newSlider({name="center", x=570, y=290,w=200,unit=1, font=25, disp=CUSval("center"), code=CUSsto("center")}),
|
||||
newSwitch({name="bagLine", x=1190, y=160, font=30, disp=CUSval("bagLine"), code=CUSrev("bagLine")}),
|
||||
newSwitch({name="highCam", x=1190, y=230, font=30, disp=CUSval("highCam"), code=CUSrev("highCam")}),
|
||||
newSwitch({name="nextPos", x=1190, y=300, font=30, disp=CUSval("nextPos"), code=CUSrev("nextPos")}),
|
||||
newSwitch({name="bone", x=1190, y=370, font=30, disp=CUSval("bone"), code=CUSrev("bone")}),
|
||||
|
||||
--Else
|
||||
newSelector({name="bg", x=800, y=600, w=220,color="yellow", list=CUSlist.bg, disp=CUSval("bg"), code=function(i)customEnv.bg=i BG.set(i)end}),
|
||||
newSelector({name="bgm", x=800, y=670, w=220,color="yellow", list=CUSlist.bgm, disp=CUSval("bgm"), code=function(i)customEnv.bgm=i BGM.play(i)end}),
|
||||
newSelector({name="bg", x=1140, y=460, w=220,color="yellow", list=CUSlist.bg, disp=CUSval("bg"), code=function(i)customEnv.bg=i BG.set(i)end}),
|
||||
newSelector({name="bgm", x=1140, y=540, w=220,color="yellow", list=CUSlist.bgm, disp=CUSval("bgm"), code=function(i)customEnv.bgm=i BGM.play(i)end}),
|
||||
|
||||
newButton({name="seq", x=520, y=670, w=200,h=60, color="lGreen", font=30,code=pressKey("q")}),
|
||||
newButton({name="draw", x=150, y=80, w=220,h=80, color="white", font=35,code=pressKey("e")}),
|
||||
newButton({name="back", x=1140, y=640, w=180,h=80, color="white", font=35,code=BACK}),
|
||||
--Copy/Paste Quest
|
||||
newButton({name="copy", x=560, y=640, w=300,h=100, color="lRed", font=25,code=pressKey("cC")}),
|
||||
newButton({name="paste", x=870, y=640, w=300,h=100, color="lBlue", font=25,code=pressKey("cV")}),
|
||||
|
||||
newButton({name="mission", x=900, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_mission","swipeR")}),
|
||||
newButton({name="rule", x=1140, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_rule","swipeL")}),
|
||||
newButton({name="back", x=1140, y=640, w=170,h=80, color="white", font=40,code=BACK}),
|
||||
},
|
||||
sequence={
|
||||
custom_rule={
|
||||
--Rule
|
||||
newSlider({name="mindas", x=180, y=150,w=400,unit=15,font=25, disp=CUSval("mindas"), code=CUSsto("mindas")}),
|
||||
newSlider({name="minarr", x=180, y=220,w=400,unit=10,font=25, disp=CUSval("minarr"), code=CUSsto("minarr")}),
|
||||
newSlider({name="minsdarr", x=180, y=290,w=200,unit=4, font=22, disp=CUSval("minsdarr"),code=CUSsto("minsdarr")}),
|
||||
newSwitch({name="ospin", x=260, y=380, font=30, disp=CUSval("ospin"), code=CUSrev("ospin")}),
|
||||
newSwitch({name="noTele", x=260, y=460, font=25, disp=CUSval("noTele"), code=CUSrev("noTele")}),
|
||||
newSwitch({name="fineKill", x=260, y=530, font=22, disp=CUSval("fineKill"),code=CUSrev("fineKill")}),
|
||||
newSwitch({name="easyFresh", x=260, y=600, font=18, disp=CUSval("easyFresh"),code=CUSrev("easyFresh")}),
|
||||
newSelector({name="visible", x=800, y=160,w=260,color="lBlue", list=CUSlist.visible, disp=CUSval("visible"), code=CUSsto("visible")}),
|
||||
newSelector({name="target", x=800, y=260,w=260,color="green", list=CUSlist.target, disp=CUSval("target"), code=CUSsto("target")}),
|
||||
newSelector({name="freshLimit", x=800, y=360,w=260,color="purple", list=CUSlist.freshLimit,disp=CUSval("freshLimit"),code=CUSsto("freshLimit")}),
|
||||
newSelector({name="opponent", x=1100, y=160,w=260,color="red", list=CUSlist.opponent, disp=CUSval("opponent"),code=CUSsto("opponent")}),
|
||||
newSelector({name="life", x=1100, y=260,w=260,color="red", list=CUSlist.life, disp=CUSval("life"), code=CUSsto("life")}),
|
||||
newSelector({name="pushSpeed", x=1100, y=360,w=260,color="red", list=CUSlist.pushSpeed, disp=CUSval("pushSpeed"),code=CUSsto("pushSpeed")}),
|
||||
|
||||
newButton({name="basic", x=900, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_basic","swipeR")}),
|
||||
newButton({name="sequence", x=1140, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_seq","swipeL")}),
|
||||
newButton({name="back", x=1140, y=640, w=170,h=80, color="white", font=40,code=BACK}),
|
||||
},
|
||||
custom_seq={
|
||||
newKey({name="Z", x=100, y=440, w=90, color="white", font=50,code=pressKey(1)}),
|
||||
newKey({name="S", x=200, y=440, w=90, color="white", font=50,code=pressKey(2)}),
|
||||
newKey({name="J", x=300, y=440, w=90, color="white", font=50,code=pressKey(3)}),
|
||||
@@ -239,78 +245,135 @@ local Widgets={
|
||||
|
||||
newKey({name="left", x=800, y=440, w=90, color="lGreen", font=55,code=pressKey("left")}),
|
||||
newKey({name="right", x=900, y=440, w=90, color="lGreen", font=55,code=pressKey("right")}),
|
||||
newKey({name="backsp", x=1000, y=440, w=90, color="lYellow",font=50,code=pressKey("backspace")}),
|
||||
newKey({name="reset", x=1000, y=540, w=90, color="lYellow",font=50,code=pressKey("delete")}),
|
||||
newButton({name="copy", x=1140, y=440, w=170,h=90, color="lRed", font=40,code=pressKey("cC"),hide=function()return #preBag==0 end}),
|
||||
newButton({name="paste", x=1140, y=540, w=170,h=90, color="lBlue", font=40,code=pressKey("cV")}),
|
||||
newButton({name="back", x=1140, y=640, w=180,h=80, color="white", font=35,code=BACK}),
|
||||
newKey({name="ten", x=1000, y=440, w=90, color="lGreen", font=40,code=pressKey("ten")}),
|
||||
newKey({name="backsp", x=1000, y=540, w=90, color="lYellow",font=50,code=pressKey("backspace")}),
|
||||
newKey({name="reset", x=1000, y=640, w=90, color="lYellow",font=50,code=pressKey("delete")}),
|
||||
newButton({name="copy", x=1140, y=440, w=170,h=80, color="lRed", font=40,code=pressKey("cC"),hide=function()return #preBag==0 end}),
|
||||
newButton({name="paste", x=1140, y=540, w=170,h=80, color="lBlue", font=40,code=pressKey("cV")}),
|
||||
|
||||
newSelector({name="sequence",x=670, y=60, w=200,color="yellow",list=CUSlist.sequence,disp=CUSval("sequence"),code=CUSsto("sequence")}),
|
||||
newButton({name="rule", x=900, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_rule","swipeR")}),
|
||||
newButton({name="draw", x=1140, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_draw","swipeL")}),
|
||||
newButton({name="back", x=1140, y=640, w=170,h=80, color="white", font=40,code=BACK}),
|
||||
},
|
||||
draw={
|
||||
newButton({name="b1", x=500+65*1, y=150, w=58, color="red", font=30,code=setPen(1)}),--B1
|
||||
newButton({name="b2", x=500+65*2, y=150, w=58, color="orange", font=30,code=setPen(2)}),--B2
|
||||
newButton({name="b3", x=500+65*3, y=150, w=58, color="yellow", font=30,code=setPen(3)}),--B3
|
||||
newButton({name="b4", x=500+65*4, y=150, w=58, color="grass", font=30,code=setPen(4)}),--B4
|
||||
newButton({name="b5", x=500+65*5, y=150, w=58, color="green", font=30,code=setPen(5)}),--B5
|
||||
newButton({name="b6", x=500+65*6, y=150, w=58, color="water", font=30,code=setPen(6)}),--B6
|
||||
newButton({name="b7", x=500+65*7, y=150, w=58, color="cyan", font=30,code=setPen(7)}),--B7
|
||||
newButton({name="b8", x=500+65*8, y=150, w=58, color="blue", font=30,code=setPen(8)}),--B8
|
||||
newButton({name="b9", x=500+65*9, y=150, w=58, color="purple", font=30,code=setPen(9)}),--B9
|
||||
newButton({name="b10", x=500+65*10,y=150, w=58, color="magenta",font=30,code=setPen(10)}),--B10
|
||||
newButton({name="b11", x=500+65*11,y=150, w=58, color="pink", font=30,code=setPen(11)}),--B11
|
||||
custom_draw={
|
||||
newButton({name="b1", x=500+65*1, y=200, w=58, color="red", font=30,code=setPen(1)}),--B1
|
||||
newButton({name="b2", x=500+65*2, y=200, w=58, color="orange", font=30,code=setPen(2)}),--B2
|
||||
newButton({name="b3", x=500+65*3, y=200, w=58, color="yellow", font=30,code=setPen(3)}),--B3
|
||||
newButton({name="b4", x=500+65*4, y=200, w=58, color="grass", font=30,code=setPen(4)}),--B4
|
||||
newButton({name="b5", x=500+65*5, y=200, w=58, color="green", font=30,code=setPen(5)}),--B5
|
||||
newButton({name="b6", x=500+65*6, y=200, w=58, color="water", font=30,code=setPen(6)}),--B6
|
||||
newButton({name="b7", x=500+65*7, y=200, w=58, color="cyan", font=30,code=setPen(7)}),--B7
|
||||
newButton({name="b8", x=500+65*8, y=200, w=58, color="blue", font=30,code=setPen(8)}),--B8
|
||||
newButton({name="b9", x=500+65*9, y=200, w=58, color="purple", font=30,code=setPen(9)}),--B9
|
||||
newButton({name="b10", x=500+65*10,y=200, w=58, color="magenta",font=30,code=setPen(10)}),--B10
|
||||
newButton({name="b11", x=500+65*11,y=200, w=58, color="pink", font=30,code=setPen(11)}),--B11
|
||||
|
||||
newButton({name="b12", x=500+65*1, y=230, w=58, color="dGrey", font=30,code=setPen(12)}),--Bone
|
||||
newButton({name="b13", x=500+65*2, y=230, w=58, color="grey", font=30,code=setPen(13)}),--GB1
|
||||
newButton({name="b14", x=500+65*3, y=230, w=58, color="lGrey", font=30,code=setPen(14)}),--GB2
|
||||
newButton({name="b15", x=500+65*4, y=230, w=58, color="dPurple",font=30,code=setPen(15)}),--GB3
|
||||
newButton({name="b16", x=500+65*5, y=230, w=58, color="dRed", font=30,code=setPen(16)}),--GB4
|
||||
newButton({name="b17", x=500+65*6, y=230, w=58, color="dGreen", font=30,code=setPen(17)}),--GB5
|
||||
newButton({name="b12", x=500+65*1, y=270, w=58, color="dGrey", font=30,code=setPen(12)}),--Bone
|
||||
newButton({name="b13", x=500+65*2, y=270, w=58, color="grey", font=30,code=setPen(13)}),--GB1
|
||||
newButton({name="b14", x=500+65*3, y=270, w=58, color="lGrey", font=30,code=setPen(14)}),--GB2
|
||||
newButton({name="b15", x=500+65*4, y=270, w=58, color="dPurple",font=30,code=setPen(15)}),--GB3
|
||||
newButton({name="b16", x=500+65*5, y=270, w=58, color="dRed", font=30,code=setPen(16)}),--GB4
|
||||
newButton({name="b17", x=500+65*6, y=270, w=58, color="dGreen", font=30,code=setPen(17)}),--GB5
|
||||
|
||||
newButton({name="any", x=600, y=360, w=120, color="lGrey", font=40,code=setPen(0)}),
|
||||
newButton({name="space", x=730, y=360, w=120, color="grey", font=65,code=setPen(-1)}),
|
||||
newButton({name="copy", x=920, y=360, w=120, color="lRed", font=35,code=pressKey("cC")}),
|
||||
newButton({name="paste", x=1060, y=360, w=120, color="lBlue", font=35,code=pressKey("cV")}),
|
||||
newButton({name="clear", x=1200, y=360, w=120, color="white", font=40,code=pressKey("delete")}),
|
||||
newButton({name="pushLine", x=1060, y=500, w=120, color="lYellow",font=20,code=pressKey("k")}),
|
||||
newButton({name="delLine", x=1200, y=500, w=120, color="lYellow",font=20,code=pressKey("l")}),
|
||||
newButton({name="any", x=600, y=380, w=120, color="lGrey", font=40,code=setPen(0)}),
|
||||
newButton({name="space", x=730, y=380, w=120, color="grey", font=65,code=setPen(-1)}),
|
||||
newButton({name="copy", x=920, y=380, w=120, color="lRed", font=35,code=pressKey("cC")}),
|
||||
newButton({name="paste", x=1060, y=380, w=120, color="lBlue", font=35,code=pressKey("cV")}),
|
||||
newButton({name="clear", x=1200, y=380, w=120, color="white", font=40,code=pressKey("delete")}),
|
||||
newButton({name="pushLine", x=1060, y=520, w=120, color="lYellow",font=20,code=pressKey("k")}),
|
||||
newButton({name="delLine", x=1200, y=520, w=120, color="lYellow",font=20,code=pressKey("l")}),
|
||||
newSwitch({name="demo", x=755, y=640, font=30,disp=function()return sceneTemp.demo end,code=function()sceneTemp.demo=not sceneTemp.demo end}),
|
||||
newButton({name="custom", x=110, y=80, w=140,h=80, color="white", font=35,code=pressKey("e")}),
|
||||
newButton({name="back", x=1140, y=640, w=180,h=80, color="white", font=35,code=BACK}),
|
||||
|
||||
newButton({name="sequence", x=900, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_seq","swipeR")}),
|
||||
newButton({name="mission", x=1140, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_mission","swipeL")}),
|
||||
newButton({name="back", x=1140, y=640, w=170,h=80, color="white", font=40,code=BACK}),
|
||||
},
|
||||
custom_mission={
|
||||
newKey({name="_1", x=800, y=540, w=90, color="white", font=50,code=pressKey(01)}),
|
||||
newKey({name="_2", x=900, y=540, w=90, color="white", font=50,code=pressKey(02)}),
|
||||
newKey({name="_3", x=800, y=640, w=90, color="white", font=50,code=pressKey(03)}),
|
||||
newKey({name="_4", x=900, y=640, w=90, color="white", font=50,code=pressKey(04)}),
|
||||
newKey({name="any1", x=100, y=640, w=90, color="white", font=30,code=pressKey(05)}),
|
||||
newKey({name="any2", x=200, y=640, w=90, color="white", font=30,code=pressKey(06)}),
|
||||
newKey({name="any3", x=300, y=640, w=90, color="white", font=30,code=pressKey(07)}),
|
||||
newKey({name="any4", x=400, y=640, w=90, color="white", font=30,code=pressKey(08)}),
|
||||
newKey({name="PC", x=500, y=640, w=90, color="white", font=50,code=pressKey(09)}),
|
||||
|
||||
newKey({name="Z1", x=100, y=340, w=90, color="white", font=50,code=pressKey(11)}),
|
||||
newKey({name="S1", x=200, y=340, w=90, color="white", font=50,code=pressKey(21)}),
|
||||
newKey({name="J1", x=300, y=340, w=90, color="white", font=50,code=pressKey(31)}),
|
||||
newKey({name="L1", x=400, y=340, w=90, color="white", font=50,code=pressKey(41)}),
|
||||
newKey({name="T1", x=500, y=340, w=90, color="white", font=50,code=pressKey(51)}),
|
||||
newKey({name="O1", x=600, y=340, w=90, color="white", font=50,code=pressKey(61)}),
|
||||
newKey({name="I1", x=700, y=340, w=90, color="white", font=50,code=pressKey(71)}),
|
||||
|
||||
newKey({name="Z2", x=100, y=440, w=90, color="white", font=50,code=pressKey(12)}),
|
||||
newKey({name="S2", x=200, y=440, w=90, color="white", font=50,code=pressKey(22)}),
|
||||
newKey({name="J2", x=300, y=440, w=90, color="white", font=50,code=pressKey(32)}),
|
||||
newKey({name="L2", x=400, y=440, w=90, color="white", font=50,code=pressKey(42)}),
|
||||
newKey({name="T2", x=500, y=440, w=90, color="white", font=50,code=pressKey(52)}),
|
||||
newKey({name="O2", x=600, y=440, w=90, color="white", font=50,code=pressKey(62)}),
|
||||
newKey({name="I2", x=700, y=440, w=90, color="white", font=50,code=pressKey(72)}),
|
||||
|
||||
newKey({name="Z3", x=100, y=540, w=90, color="white", font=50,code=pressKey(13)}),
|
||||
newKey({name="S3", x=200, y=540, w=90, color="white", font=50,code=pressKey(23)}),
|
||||
newKey({name="J3", x=300, y=540, w=90, color="white", font=50,code=pressKey(33)}),
|
||||
newKey({name="L3", x=400, y=540, w=90, color="white", font=50,code=pressKey(43)}),
|
||||
newKey({name="T3", x=500, y=540, w=90, color="white", font=50,code=pressKey(53)}),
|
||||
newKey({name="O3", x=600, y=540, w=90, color="white", font=50,code=pressKey(63)}),
|
||||
newKey({name="I3", x=700, y=540, w=90, color="white", font=50,code=pressKey(73)}),
|
||||
|
||||
newKey({name="O4", x=600, y=640, w=90, color="white", font=50,code=pressKey(64)}),
|
||||
newKey({name="I4", x=700, y=640, w=90, color="white", font=50,code=pressKey(74)}),
|
||||
|
||||
newKey({name="left", x=800, y=440, w=90, color="lGreen", font=55,code=pressKey("left")}),
|
||||
newKey({name="right", x=900, y=440, w=90, color="lGreen", font=55,code=pressKey("right")}),
|
||||
newKey({name="ten", x=1000, y=440, w=90, color="lGreen", font=40,code=pressKey("ten")}),
|
||||
newKey({name="backsp", x=1000, y=540, w=90, color="lYellow",font=50,code=pressKey("backspace")}),
|
||||
newKey({name="reset", x=1000, y=640, w=90, color="lYellow",font=50,code=pressKey("delete")}),
|
||||
newButton({name="copy", x=1140, y=440, w=170,h=80, color="lRed", font=40,code=pressKey("cC"),hide=function()return #preMission==0 end}),
|
||||
newButton({name="paste", x=1140, y=540, w=170,h=80, color="lBlue", font=40,code=pressKey("cV")}),
|
||||
newSwitch({name="mission", x=1150, y=350, font=30, disp=CUSval("missionKill"), code=CUSrev("missionKill")}),
|
||||
|
||||
newButton({name="draw", x=900, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_draw","swipeR")}),
|
||||
newButton({name="basic", x=1140, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_basic","swipeL")}),
|
||||
newButton({name="back", x=1140, y=640, w=170,h=80, color="white", font=40,code=BACK}),
|
||||
},
|
||||
play={
|
||||
newButton({name="pause", x=1235, y=45, w=80, color="white", font=25,code=function()pauseGame()end}),
|
||||
},
|
||||
pause={
|
||||
newButton({name="setting", x=1120, y=70, w=240,h=90, color="lBlue", font=35,code=pressKey("s")}),
|
||||
newButton({name="replay", x=640, y=250, w=240,h=100,color="lYellow",font=30,code=pressKey("p"),hide=function()return not(game.result or game.replaying)end}),
|
||||
newButton({name="replay", x=640, y=250, w=240,h=100,color="lYellow",font=30,code=pressKey("p"),hide=function()return not(game.result or game.replaying)or #players>1 end}),
|
||||
newButton({name="resume", x=640, y=367, w=240,h=100,color="lGreen", font=30,code=pressKey("escape")}),
|
||||
newButton({name="restart", x=640, y=483, w=240,h=100,color="lRed", font=33,code=pressKey("r")}),
|
||||
newButton({name="quit", x=640, y=600, w=240,h=100,color="white", font=35,code=BACK}),
|
||||
},
|
||||
setting_game={
|
||||
newButton({name="graphic", x=200, y=80, w=240,h=80, color="lCyan", font=35,code=function()SCN.swapTo("setting_video","swipeR")end}),
|
||||
newButton({name="sound", x=1080, y=80, w=240,h=80, color="lCyan", font=35,code=function()SCN.swapTo("setting_sound","swipeL")end}),
|
||||
newButton({name="graphic", x=200, y=80, w=240,h=80, color="lCyan", font=35,code=swapScene("setting_video","swipeR")}),
|
||||
newButton({name="sound", x=1080, y=80, w=240,h=80, color="lCyan", font=35,code=swapScene("setting_sound","swipeL")}),
|
||||
|
||||
newButton({name="ctrl", x=290, y=220, w=320,h=80, color="lYellow",font=35,code=goScene("setting_control")}),
|
||||
newButton({name="key", x=640, y=220, w=320,h=80, color="lGreen", font=35,code=goScene("setting_key")}),
|
||||
newButton({name="touch", x=990, y=220, w=320,h=80, color="lBlue", font=35,code=goScene("setting_touch")}),
|
||||
newSlider({name="reTime", x=350, y=340, w=300,unit=10, font=30,disp=SETval("reTime"), code=SETsto("reTime"),show=function(S)return(.5+S.disp()*.25).."s"end}),
|
||||
newSlider({name="maxNext", x=350, y=440, w=300,unit=6, font=30,disp=SETval("maxNext"), code=SETsto("maxNext")}),
|
||||
newButton({name="layout", x=460, y=540, w=140,h=70,color="white", font=35,code=function()
|
||||
SCN.go("setting_skin")
|
||||
end}),
|
||||
newButton({name="layout", x=460, y=540, w=140,h=70,color="white", font=35,code=goScene("setting_skin")}),
|
||||
newSwitch({name="autoPause",x=1080, y=320, font=20,disp=SETval("autoPause"), code=SETrev("autoPause")}),
|
||||
newSwitch({name="swap", x=1080, y=380, font=20,disp=SETval("swap"), code=SETrev("swap")}),
|
||||
newSwitch({name="fine", x=1080, y=440, font=20,disp=SETval("fine"), code=SETrev("fine")}),
|
||||
newSwitch({name="appLock", x=1080, y=500, font=20,disp=SETval("appLock"), code=SETrev("appLock")}),
|
||||
newButton({name="back", x=1140, y=640, w=180,h=80,color="white", font=35,code=BACK}),
|
||||
newButton({name="calc", x=970, y=550, w=150,h=60,color="dGrey", font=25,code=goScene("calculator"),hide=function()return not setting.appLock end}),
|
||||
newButton({name="back", x=1140, y=640, w=170,h=80,color="white", font=40,code=BACK}),
|
||||
},
|
||||
setting_video={
|
||||
newButton({name="sound", x=200, y=80,w=240,h=80,color="lCyan",font=35,code=function()SCN.swapTo("setting_sound","swipeR")end}),
|
||||
newButton({name="game", x=1080, y=80,w=240,h=80,color="lCyan",font=35,code=function()SCN.swapTo("setting_game","swipeL")end}),
|
||||
newButton({name="sound", x=200, y=80,w=240,h=80,color="lCyan",font=35,code=swapScene("setting_sound","swipeR")}),
|
||||
newButton({name="game", x=1080, y=80,w=240,h=80,color="lCyan",font=35,code=swapScene("setting_game","swipeL")}),
|
||||
|
||||
newSlider({name="block", x=260, y=180,w=200,unit=1, font=30,disp=SETval("block"),show="percent",code=SETsto("block")}),
|
||||
newSlider({name="ghost", x=260, y=240,w=200,unit=.6,font=30,disp=SETval("ghost"),show="percent",code=SETsto("ghost")}),
|
||||
newSlider({name="center", x=260, y=300,w=200,unit=1, font=30,disp=SETval("center"),show="percent",code=SETsto("center")}),
|
||||
newSwitch({name="block", x=360, y=180, font=30,disp=SETval("block"), code=SETrev("block")}),
|
||||
newSlider({name="ghost", x=260, y=250,w=200,unit=.6,font=30,disp=SETval("ghost"),show="percent",code=SETsto("ghost")}),
|
||||
newSlider({name="center", x=260, y=300,w=200,unit=1, font=30,disp=SETval("center"), code=SETsto("center")}),
|
||||
|
||||
newSwitch({name="smooth", x=700, y=180, font=30,disp=SETval("smooth"), code=SETrev("smooth")}),
|
||||
newSwitch({name="grid", x=700, y=240, font=30,disp=SETval("grid"), code=SETrev("grid")}),
|
||||
@@ -331,30 +394,31 @@ local Widgets={
|
||||
end}),
|
||||
|
||||
newSwitch({name="text", x=1100, y=180,font=35,disp=SETval("text"),code=SETrev("text")}),
|
||||
newSwitch({name="warn", x=1100, y=240,font=35,disp=SETval("warn"),code=SETrev("warn")}),
|
||||
newSwitch({name="highCam", x=1100, y=300,font=35,disp=SETval("highCam"),code=SETrev("highCam")}),
|
||||
newSwitch({name="nextPos", x=1100, y=360,font=35,disp=SETval("nextPos"),code=SETrev("nextPos")}),
|
||||
newSwitch({name="fullscreen",x=1100,y=420,font=35,disp=SETval("fullscreen"),
|
||||
newSwitch({name="score", x=1100, y=240,font=35,disp=SETval("score"),code=SETrev("score")}),
|
||||
newSwitch({name="warn", x=1100, y=300,font=35,disp=SETval("warn"),code=SETrev("warn")}),
|
||||
newSwitch({name="highCam", x=1100, y=360,font=35,disp=SETval("highCam"),code=SETrev("highCam")}),
|
||||
newSwitch({name="nextPos", x=1100, y=420,font=35,disp=SETval("nextPos"),code=SETrev("nextPos")}),
|
||||
newSwitch({name="fullscreen",x=1100,y=480,font=30,disp=SETval("fullscreen"),
|
||||
code=function()
|
||||
setting.fullscreen=not setting.fullscreen
|
||||
love.window.setFullscreen(setting.fullscreen)
|
||||
love.resize(love.graphics.getWidth(),love.graphics.getHeight())
|
||||
end}),
|
||||
newSwitch({name="bg", x=1100, y=480,font=35,disp=SETval("bg"),
|
||||
newSwitch({name="bg", x=1100, y=540,font=35,disp=SETval("bg"),
|
||||
code=function()
|
||||
BG.set("none")
|
||||
setting.bg=not setting.bg
|
||||
BG.set("space")
|
||||
end}),
|
||||
newSwitch({name="power", x=1100, y=540,font=35,disp=SETval("powerInfo"),
|
||||
newSwitch({name="power", x=990, y=640,font=35,disp=SETval("powerInfo"),
|
||||
code=function()
|
||||
setting.powerInfo=not setting.powerInfo
|
||||
end}),
|
||||
newButton({name="back", x=1140, y=640,w=180,h=80,color="white", font=35,code=BACK}),
|
||||
newButton({name="back", x=1140, y=640,w=170,h=80,color="white", font=40,code=BACK}),
|
||||
},
|
||||
setting_sound={
|
||||
newButton({name="game", x=200, y=80,w=240,h=80,color="lCyan", font=35,code=function()SCN.swapTo("setting_game","swipeR")end}),
|
||||
newButton({name="graphic", x=1080, y=80,w=240,h=80,color="lCyan", font=35,code=function()SCN.swapTo("setting_video","swipeL")end}),
|
||||
newButton({name="game", x=200, y=80,w=240,h=80,color="lCyan", font=35,code=swapScene("setting_game","swipeR")}),
|
||||
newButton({name="graphic", x=1080, y=80,w=240,h=80,color="lCyan", font=35,code=swapScene("setting_video","swipeL")}),
|
||||
|
||||
newSlider({name="sfx", x=180, y=200,w=400, font=35,change=function()SFX.play("blip_1")end, disp=SETval("sfx"), code=SETsto("sfx")}),
|
||||
newSlider({name="stereo", x=180, y=500,w=400, font=35,change=function()SFX.play("move",1,-1)SFX.play("lock",1,1)end,disp=SETval("stereo"),code=SETsto("stereo"),hide=function()return setting.sfx==0 end}),
|
||||
@@ -362,7 +426,7 @@ local Widgets={
|
||||
newSlider({name="bgm", x=180, y=400,w=400, font=35,change=function()BGM.freshVolume()end, disp=SETval("bgm"), code=SETsto("bgm")}),
|
||||
newSlider({name="vib", x=750, y=200,w=400, unit=5, font=28,change=function()VIB(2)end, disp=SETval("vib"), code=SETsto("vib")}),
|
||||
newSlider({name="voc", x=750, y=300,w=400, font=32,change=function()VOC.play("nya")end, disp=SETval("voc"), code=SETsto("voc")}),
|
||||
newButton({name="back", x=1140, y=640,w=180,h=80,color="white", font=35,code=BACK}),
|
||||
newButton({name="back", x=1140, y=640,w=170,h=80,color="white", font=40,code=BACK}),
|
||||
},
|
||||
setting_control={
|
||||
newSlider({name="das", x=250, y=200,w=910, unit=26, font=30,disp=SETval("das"), show="frame_time",code=SETsto("das")}),
|
||||
@@ -379,10 +443,10 @@ local Widgets={
|
||||
_.sddas,_.sdarr=0,2
|
||||
_.ihs,_.irs,_.ims=false,false,false
|
||||
end}),
|
||||
newButton({name="back", x=1140, y=640,w=180,h=80,color="white",font=35,code=BACK}),
|
||||
newButton({name="back", x=1140, y=640,w=170,h=80,color="white",font=40,code=BACK}),
|
||||
},
|
||||
setting_key={
|
||||
newButton({name="back", x=1140,y=640,w=180,h=80,color="white",font=35,code=BACK}),
|
||||
newButton({name="back", x=1140,y=640,w=170,h=80,color="white",font=40,code=BACK}),
|
||||
},
|
||||
setting_skin={
|
||||
newButton({name="prev", x=700,y=100,w=140,h=100,color="white",font=50,code=function()SKIN.prevSet()end}),
|
||||
@@ -423,7 +487,7 @@ local Widgets={
|
||||
end
|
||||
SFX.play("hold")
|
||||
end}),
|
||||
newButton({name="back", x=1140,y=640,w=180,h=80,color="white",font=35,code=BACK}),
|
||||
newButton({name="back", x=1140,y=640,w=170,h=80,color="white",font=40,code=BACK}),
|
||||
},
|
||||
setting_touch={
|
||||
newButton({name="default", x=520,y=80,w=200,h=80,color="white",font=35,
|
||||
@@ -503,13 +567,13 @@ local Widgets={
|
||||
return not setting.VKTrack
|
||||
end}),
|
||||
newSlider({name="alpha", x=840, y=540, w=400,font=40,disp=SETval("VKAlpha"),code=SETsto("VKAlpha")}),
|
||||
newButton({name="back", x=1140, y=640, w=180,h=80,color="white",font=35,code=BACK}),
|
||||
newButton({name="back", x=1140, y=640, w=170,h=80,color="white",font=40,code=BACK}),
|
||||
},
|
||||
setting_trackSetting={
|
||||
newSwitch({name="VKDodge", x=400, y=200, font=35, disp=SETval("VKDodge"),code=SETrev("VKDodge")}),
|
||||
newSlider({name="VKTchW", x=140, y=310, w=1000, unit=10,font=35,disp=SETval("VKTchW"),code=function(i)setting.VKTchW=i setting.VKCurW=math.max(setting.VKCurW,i)end}),
|
||||
newSlider({name="VKCurW", x=140, y=370, w=1000, unit=10,font=35,disp=SETval("VKCurW"),code=function(i)setting.VKCurW=i setting.VKTchW=math.min(setting.VKTchW,i)end}),
|
||||
newButton({name="back", x=1140, y=640, w=180,h=80,color="white",font=35,code=BACK}),
|
||||
newButton({name="back", x=1140, y=640, w=170,h=80,color="white",font=40,code=BACK}),
|
||||
},
|
||||
setting_lang={
|
||||
newButton({name="chi", x=160, y=100,w=200,h=120,color="white",font=45,code=setLang(1)}),
|
||||
@@ -522,7 +586,7 @@ local Widgets={
|
||||
minigame={
|
||||
newButton({name="p15", x=640, y=100,w=350,h=120,color="white",font=40,code=goScene("p15")}),
|
||||
newButton({name="schulte_G",x=640, y=250,w=350,h=120,color="white",font=40,code=goScene("schulte_G")}),
|
||||
newButton({name="back", x=1140, y=640,w=180,h=80,color="white", font=35,code=BACK}),
|
||||
newButton({name="back", x=1140, y=640,w=170,h=80,color="white", font=40,code=BACK}),
|
||||
},
|
||||
p15={
|
||||
newButton({name="reset", x=160,y=100,w=180,h=100,color="lGreen", font=40,code=pressKey("space")}),
|
||||
@@ -531,7 +595,7 @@ local Widgets={
|
||||
newSwitch({name="slide", x=240,y=420,w=60, font=40,disp=function()return sceneTemp.slide end,code=pressKey("e"), hide=function()return sceneTemp.state==1 end}),
|
||||
newSwitch({name="pathVis", x=240,y=510,w=60, font=40,disp=function()return sceneTemp.pathVis end,code=pressKey("r"), hide=function()return sceneTemp.state==1 or not sceneTemp.slide end}),
|
||||
newSwitch({name="revKB", x=240,y=600,w=60, font=40,disp=function()return sceneTemp.revKB end,code=pressKey("t"), hide=function()return sceneTemp.state==1 end}),
|
||||
newButton({name="back", x=1140,y=640,w=180,h=80,color="white", font=35,code=BACK}),
|
||||
newButton({name="back", x=1140,y=640,w=170,h=80,color="white", font=40,code=BACK}),
|
||||
},
|
||||
schulte_G={
|
||||
newButton({name="reset", x=160,y=100,w=180,h=100,color="lGreen", font=40,code=pressKey("r"),hide=function()return sceneTemp.state==0 end}),
|
||||
@@ -539,7 +603,7 @@ local Widgets={
|
||||
newSwitch({name="blind", x=240,y=330,w=60, font=40,disp=function()return sceneTemp.blind end, code=pressKey("q"),hide=function()return sceneTemp.state==1 end}),
|
||||
newSwitch({name="disappear",x=240,y=420,w=60, font=40,disp=function()return sceneTemp.disappear end, code=pressKey("w"),hide=function()return sceneTemp.state==1 end}),
|
||||
newSwitch({name="tapFX", x=240,y=510,w=60, font=40,disp=function()return sceneTemp.tapFX end, code=pressKey("e"),hide=function()return sceneTemp.state==1 end}),
|
||||
newButton({name="back", x=1140,y=640,w=180,h=80,color="white", font=35,code=BACK}),
|
||||
newButton({name="back", x=1140,y=640,w=170,h=80,color="white", font=40,code=BACK}),
|
||||
},
|
||||
help={
|
||||
newButton({name="staff", x=980, y=500,w=150,h=80,color="white",font=32,code=goScene("staff")}),
|
||||
@@ -548,26 +612,32 @@ local Widgets={
|
||||
newButton({name="back", x=640, y=600,w=200,h=80,color="white",font=35,code=BACK}),
|
||||
},
|
||||
staff={
|
||||
newButton({name="back", x=1140, y=640,w=180,h=80,color="white",font=35,code=BACK}),
|
||||
newButton({name="back", x=1140, y=640,w=170,h=80,color="white",font=40,code=BACK}),
|
||||
},
|
||||
history={
|
||||
newKey({name="prev", x=1155, y=170,w=180, color="white",font=65,code=pressKey("up"),hide=function()return sceneTemp.pos==1 end}),
|
||||
newKey({name="next", x=1155, y=400,w=180, color="white",font=65,code=pressKey("down"),hide=function()return sceneTemp.pos==#sceneTemp.text end}),
|
||||
newButton({name="back", x=1140, y=640,w=180,h=80,color="white",font=35,code=BACK}),
|
||||
newButton({name="back", x=1140, y=640,w=170,h=80,color="white",font=40,code=BACK}),
|
||||
},
|
||||
stat={
|
||||
newButton({name="path", x=980, y=620,w=250,h=80,color="white",font=25,code=function()love.system.openURL(love.filesystem.getSaveDirectory())end,hide=mobileHide}),
|
||||
newButton({name="back", x=640, y=620,w=200,h=80,color="white",font=35,code=BACK}),
|
||||
},
|
||||
debug={
|
||||
newButton({name="reset", x=640,y=200,w=260,h=100,color="yellow",font=40,
|
||||
code=function()
|
||||
sceneTemp.reset=true
|
||||
end,
|
||||
hide=function()
|
||||
return sceneTemp.reset
|
||||
end}),
|
||||
newButton({name="reset1", x=340,y=400,w=260,h=100,color="red",font=40,
|
||||
newButton({name="copyLog", x=300,y=120,w=300,h=100,color="green", font=30,code=function()LOG.copy()end}),
|
||||
newButton({name="scrInfo", x=640,y=120,w=300,h=100,color="green", font=30,code=function()
|
||||
LOG.print("Screen Info:")
|
||||
LOG.print("x y: "..scr.x.." "..scr.y)
|
||||
LOG.print("w h: "..scr.w.." "..scr.h)
|
||||
LOG.print("W H: "..scr.W.." "..scr.H)
|
||||
LOG.print("k: "..math.floor(scr.k*100)*.01)
|
||||
LOG.print("rad: "..math.floor(scr.rad*100)*.01)
|
||||
LOG.print("dpi: "..scr.dpi)
|
||||
end}),
|
||||
newButton({name="reset", x=640,y=380,w=240,h=100,color="orange", font=40,
|
||||
code=function()sceneTemp.reset=true end,
|
||||
hide=function()return sceneTemp.reset end}),
|
||||
newButton({name="reset1", x=340,y=480,w=240,h=100,color="red", font=40,
|
||||
code=function()
|
||||
love.filesystem.remove("unlock.dat")
|
||||
SFX.play("finesseError_long")
|
||||
@@ -575,10 +645,8 @@ local Widgets={
|
||||
TEXT.show("effected after restart game",640,360,60,"stretch",.4)
|
||||
TEXT.show("play one game if you regret",640,390,40,"stretch",.4)
|
||||
end,
|
||||
hide=function()
|
||||
return not sceneTemp.reset
|
||||
end}),
|
||||
newButton({name="reset2", x=640,y=400,w=260,h=100,color="red",font=40,
|
||||
hide=function()return not sceneTemp.reset end}),
|
||||
newButton({name="reset2", x=640,y=480,w=260,h=100,color="red", font=40,
|
||||
code=function()
|
||||
love.filesystem.remove("data.dat")
|
||||
SFX.play("finesseError_long")
|
||||
@@ -586,10 +654,8 @@ local Widgets={
|
||||
TEXT.show("effected after restart game",640,360,60,"stretch",.4)
|
||||
TEXT.show("play one game if you regret",640,390,40,"stretch",.4)
|
||||
end,
|
||||
hide=function()
|
||||
return not sceneTemp.reset
|
||||
end}),
|
||||
newButton({name="reset3", x=940,y=400,w=260,h=100,color="red",font=40,
|
||||
hide=function()return not sceneTemp.reset end}),
|
||||
newButton({name="reset3", x=940,y=480,w=260,h=100,color="red", font=40,
|
||||
code=function()
|
||||
local L=love.filesystem.getDirectoryItems("")
|
||||
for i=1,#L do
|
||||
@@ -603,17 +669,8 @@ local Widgets={
|
||||
TEXT.show("effected after restart game",640,390,60,"stretch",.4)
|
||||
SCN.back()
|
||||
end,
|
||||
hide=function()
|
||||
return not sceneTemp.reset
|
||||
end}),
|
||||
newButton({name="back", x=640,y=620,w=200,h=80,color="white",font=35,code=BACK}),
|
||||
hide=function()return not sceneTemp.reset end}),
|
||||
newButton({name="back", x=640,y=620,w=200,h=80,color="white", font=40,code=BACK}),
|
||||
},
|
||||
}
|
||||
|
||||
--Remove temp vars
|
||||
mobileHide,SETval,SETsto,SETrev=nil
|
||||
pressKey,setPen,prevSkin,nextSkin=nil
|
||||
nextDir,VKAdisp,VKAcode,setLang=nil
|
||||
goScene=nil
|
||||
newText,newImage,newButton,newSwitch,newSlider=nil
|
||||
return Widgets
|
||||
3
conf.lua
3
conf.lua
@@ -1,4 +1,5 @@
|
||||
gameVersion="Alpha V0.10.11"
|
||||
gameVersion="Alpha V0.11.0"
|
||||
love.setDeprecationOutput(false)
|
||||
function love.conf(t)
|
||||
t.identity="Techmino"--Saving folder
|
||||
t.version="11.1"
|
||||
|
||||
72
document.txt
72
document.txt
@@ -1,26 +1,34 @@
|
||||
(ENG ver. below)
|
||||
游戏方法:
|
||||
系统会提供的一个个四联骨牌("方块",总共7种),玩家需要控制(左右移动和旋转90,180,270度),每填满场地的一行就会将其消除,根据消除方式会给对手攻击(如果有对手的话)
|
||||
系统会提供的一个个四联骨牌("方块",总共7种),玩家需要控制(左右移动和旋转90,180,270度),每填满场地的一行就会将其消除,根据消除方式会给对手攻击(如果有对手的话)
|
||||
活到最后或者完成目标即胜利.
|
||||
|
||||
旋转系统:
|
||||
使用Techmino专属旋转系统,细节懒得写(
|
||||
|
||||
spin判定:
|
||||
结合了不可移动判定和三角判定,是否为mini也与判定过程数据有关,细节也懒得写(
|
||||
满足三角判定+2分
|
||||
满足不可移动判定+2分
|
||||
--满足以上之一就算是spin
|
||||
满足非第二个test+1分
|
||||
--如果分数只有2,方块是SZJLT之一,并且没有把当前方块整个消除那么就是mini
|
||||
|
||||
攻击系统:
|
||||
普通消除:
|
||||
消1/2/3/4攻击0.5/1.5/2.5/4
|
||||
消<4行打出[消行数-0.5]攻击
|
||||
特殊消除:
|
||||
spin1/2/3攻击2/4/6,若mini则减至一半
|
||||
B2B:加1(techrash/spin1/spin2)或2(spin3)攻击
|
||||
B3B:在B2B效果之上消四再加1,spin再加0.5*消行数攻击,二者都+1额外抵挡
|
||||
连击:给予上述攻击[连击数*20%]的加成,上限200%,连消3次之后额外加1攻击
|
||||
如果是spin,打出[2*消行数]攻击,
|
||||
B2B攻击+[1/1/2/4/8(spin1~5)]
|
||||
B3B攻击在B2B基础上+消行数*0.5,+1额外抵挡
|
||||
mini减至25%
|
||||
不是spin但是单次消>=4行,打出[消行数]攻击,
|
||||
B2B攻击+1
|
||||
B3B攻击+50%,+1额外抵挡
|
||||
特殊消除会增加B2B点数,让之后的特殊消除获得B2B(B3B)增益(详细说明见下文)
|
||||
半全消("下方有剩余方块"的全消,如果是I消1行则必须不剩余玩家放置的方块):伤害+2,额外抵挡+2
|
||||
全消:将上述伤害之和减半,再+6~12(本局内递增)+2额外抵挡(注:本局消行数>4时会将B2B点数拉满)
|
||||
根据上述规则计算后,向下取整,攻击打出
|
||||
全消:将上述伤害之和减半,再+8~20(本局内递增2),+2额外抵挡(注:本局消行数>4时会将B2B点数拉满)
|
||||
连击:每次连击给予上述攻击[连击数*25%(如果只消一行就是15%)]的加成,12combo达到上限,连击>=3次时再额外加1攻击
|
||||
根据上述规则计算后,向下取整,攻击打出
|
||||
|
||||
分数系统:
|
||||
操作越牛逼得分越高嗷(
|
||||
@@ -35,19 +43,19 @@ spin判定:
|
||||
|
||||
back to back(B2B)点数说明:
|
||||
B2B点数的范围在0~1200,在点数>=40时进行特殊消除为B2B,>1000时特殊消除为B3B
|
||||
普通消除-250
|
||||
spin1/2/3:+50/100/180(mini变为原来25%)
|
||||
消四:+100
|
||||
普通消除:-250
|
||||
spin1~5:+[50/100/180/1000/1200](mini变为原来25%)
|
||||
消四/五:+[100/200]
|
||||
空spin:+20,此法得到的点数不能超过1000
|
||||
当点数在1000以上时空放一块-40(不减到低于1000)
|
||||
当点数在1000以上时空放一块-40(不低于1000)
|
||||
|
||||
混战模式说明:
|
||||
许多玩家同时进行一局游戏(对手都是AI,不是真人).随着玩家数量的减少,方块下落/垃圾生效速度/垃圾升起速度都会增加.淘汰其它玩家后可以获得一个徽章和该玩家持有的徽章,增强自己的攻击力.
|
||||
许多玩家同时进行一局游戏(对手都是AI,不是真人).随着玩家数量的减少,方块下落/垃圾生效速度/垃圾升起速度都会增加.淘汰其它玩家后可以获得一个徽章和该玩家持有的徽章,增强自己的攻击力.
|
||||
玩家可选四个攻击模式:
|
||||
1.随机:每次攻击后10%随机挑选一个玩家锁定
|
||||
2.最多徽章:攻击后或者锁定玩家死亡时锁定徽章最多的玩家
|
||||
3.最高:攻击后或者锁定玩家死亡时锁定场地最高的玩家(每秒刷新)
|
||||
4.反击:攻击所有锁定自己的玩家(攻击AOE),若未被任何人锁定则攻击随机玩家(不锁定)
|
||||
3.最高:攻击后或者锁定玩家死亡时锁定场地最高的玩家(每秒刷新)
|
||||
4.反击:攻击所有锁定自己的玩家(攻击AOE),若未被任何人锁定则攻击随机玩家(不锁定)
|
||||
坚持到最后的玩家就是胜利者.
|
||||
|
||||
自定义模式说明:
|
||||
@@ -62,19 +70,29 @@ Rotation system:
|
||||
Uses Techmino's custom rotation system. Too lazy to write the details
|
||||
|
||||
Spin detection:
|
||||
Combines immobile and 3-corner detection, and whether a spin is mini also depends on the data used for detection. Also too lazy to write the details
|
||||
Satisfies "3 corner" rule +2 points
|
||||
Satisfies "immobile" rule +2 points
|
||||
- As long as one of the above is true, it is a Spin
|
||||
|
||||
If the rotation was not using the second check in the kick table, +1 point
|
||||
- The Spin is a Mini if it only has 2 points; the piece is one of S, Z, J, L, T; AND the line clear did not clear the entire piece.
|
||||
|
||||
Attack system:
|
||||
Regular line clears:
|
||||
Single/Double/Triple/Techrash sends 0.5/1.5/2.5/4
|
||||
Regular line clears (clearing <=3 lines):
|
||||
Sends (lines cleared -0.5) attack
|
||||
Special line clears:
|
||||
Spin Single/Double/Triple sends 2/4/6, half if Mini
|
||||
B2B: +1 (Techrash/Spin Single/Spin Double) or +2 (Spin Triple)
|
||||
B2B2B/B3B: In addition to B2B, +1 if Techrash, +(0.5 * lines cleared) if Spin, and in both cases +1 additional blocking
|
||||
Combo: each combo gives 20% more attack (capped at 200%), extra 1 attack after 3 combo
|
||||
Spin sends (lines cleared x2) attack,
|
||||
- B2B sends extra 1/1/2/4/8 (for Spin Single/Double/Triple/Techrash/Techrash+ respectively)
|
||||
- B2B2B sends (lines cleared x0.5), and +1 extra blocking
|
||||
- If it's a Mini, x0.25
|
||||
Non-Spin Techrash/Techrash+ sends (lines cleared) attack,
|
||||
- B2B sends extra 1 attack,
|
||||
- B2B2B sends 50% more attack and +1 extra blocking.
|
||||
|
||||
Special line clears will increase B2B gauge, making later special line clears have B2B or B2B2B bonus (see below)
|
||||
Half Perfect Clear (a Perfect Clear "with blocks left below". If it's an I clearing 1 line, then the remaining blocks must not be player-placed): Attack +2, Extra Blocking +2
|
||||
Perfect Clear: half all damage above, then +6 to +12 attack (increases within a round) and +2 extra blocking. (note: if lines cleared in this round >4, then B2B gauge will be filled)
|
||||
Perfect Clear: half all damage above, then +8 to +20 attack (increases within a round by +2 per Perfect Clear) and +2 extra blocking. (note: if lines cleared in this round >4, then B2B gauge will be filled)
|
||||
Combos: All damage above will be given a (combo x25%) bonus, or (combo x15%) if the line clear is a Single, capped at 12 combo. +1 more attack for 3 Combo or more.
|
||||
After calculating all above, the damage value will be rounded down then sent
|
||||
|
||||
Score system:
|
||||
@@ -91,8 +109,8 @@ Countering:
|
||||
Back to Back (B2B) gauge:
|
||||
The B2B gauge ranges from 0 to 1,200. Special line clears are B2B if the gauge is >=40, B2B2B if >1,000.
|
||||
A regular line clear -250
|
||||
Spin Single/Double/Triple +50/100/180 (x25% if Mini)
|
||||
Techrash +100
|
||||
Spin Single/Double/Triple/Qudra/Penta +50/100/180/1000/1200 (x25% if Mini)
|
||||
Techrash/Techrash+ +100/200
|
||||
Spin without clearing lines +20, but gauge cannot exceed 1,000 with this method
|
||||
When gauge is above 1,000, a drop without clearing lines -40 (cannot drop below 1,000 with this method)
|
||||
|
||||
@@ -110,4 +128,4 @@ Custom mode:
|
||||
In build (puzzle) mode, you can toggle template display with Function key. Cells with a X cannot have blocks; empty cells can be in any state; regular colored cells have to be made of the corresponding block; garbage-colored cells can be any block but not air. Once you make the shape, you will win.
|
||||
|
||||
附录Appendix:
|
||||
ZXC's cool O-spin map:XY0BCgAwCAIR7v9vHtUSt8AS0xKqgpnNGyXkrmFNePf6qi3BbQPrHT2Owxe6D66NeKi86dwB
|
||||
ZXC's cool O-spin map:eJxdjQEKADAIAhHu/28e1RK3wBLTEqqCmc0bJeSuYU149/qqLcFtA+sdPY7DF7oPro14qLzp3AGwKgHj
|
||||
21
main.lua
21
main.lua
@@ -41,6 +41,7 @@ scr={
|
||||
W=0,H=0,--Fullscreen w/h in shader
|
||||
rad=0,--Radius
|
||||
k=1,--Scale size
|
||||
dpi=1--DPI from gc.getDPIScale()
|
||||
}--1280:720-Rect Screen Info
|
||||
|
||||
customEnv={
|
||||
@@ -55,7 +56,7 @@ customEnv={
|
||||
oncehold=true,
|
||||
|
||||
--Visual
|
||||
block=1,
|
||||
block=true,
|
||||
ghost=.3,
|
||||
center=1,
|
||||
bagLine=false,
|
||||
@@ -68,12 +69,13 @@ customEnv={
|
||||
minarr=0,
|
||||
minsdarr=0,
|
||||
sequence="bag",
|
||||
ospin=true,
|
||||
ospin=false,
|
||||
noTele=false,
|
||||
fineKill=false,
|
||||
missionKill=false,
|
||||
easyFresh=true,
|
||||
visible="show",
|
||||
target=200,
|
||||
target=1e99,
|
||||
freshLimit=1e99,
|
||||
opponent=0,
|
||||
life=0,
|
||||
@@ -83,8 +85,9 @@ customEnv={
|
||||
bg="none",
|
||||
bgm="race"
|
||||
}
|
||||
preField={h=20}for i=1,20 do preField[i]={0,0,0,0,0,0,0,0,0,0}end
|
||||
preBag={}
|
||||
preField={h=20}for i=1,20 do preField[i]={0,0,0,0,0,0,0,0,0,0}end--Field for custom game
|
||||
preBag={}--Sequence for custom game
|
||||
preMission={}--Clearing target for custom game
|
||||
|
||||
game={
|
||||
frame=0, --Frame count
|
||||
@@ -201,9 +204,9 @@ do
|
||||
if S.version~=gameVersion then
|
||||
S.version=gameVersion
|
||||
newVersionLaunch=true
|
||||
|
||||
fs.remove("sprintPenta.dat")
|
||||
fs.remove("master_adavnce.dat")
|
||||
fs.remove("master_beginner.dat")
|
||||
end
|
||||
if system=="Android"and not setting.fullscreen then
|
||||
LOG.print("如果你的手机状态栏不会消失,请到设置界面开启全屏",300,color.yellow)
|
||||
LOG.print("Switch fullscreen on if titleBar don't disappear",300,color.yellow)
|
||||
end
|
||||
end
|
||||
@@ -5,7 +5,6 @@ return{
|
||||
env={
|
||||
drop=15,lock=45,
|
||||
fall=10,
|
||||
center=false,
|
||||
dropFX=0,lockFX=0,
|
||||
visible="none",
|
||||
dropPiece=PLY.check_lineReach,
|
||||
|
||||
@@ -5,7 +5,7 @@ return{
|
||||
env={
|
||||
drop=10,lock=60,
|
||||
fall=5,
|
||||
center=0,ghost=0,
|
||||
ghost=0,
|
||||
dropFX=0,lockFX=0,
|
||||
visible="none",
|
||||
dropPiece=PLY.check_lineReach,
|
||||
|
||||
@@ -4,7 +4,7 @@ return{
|
||||
color=color.red,
|
||||
env={
|
||||
drop=30,lock=60,
|
||||
block=0,center=0,ghost=0,
|
||||
block=false,center=0,ghost=0,
|
||||
dropFX=0,lockFX=0,
|
||||
visible="none",
|
||||
dropPiece=PLY.check_lineReach,
|
||||
|
||||
@@ -6,7 +6,7 @@ return{
|
||||
env={
|
||||
drop=30,lock=60,
|
||||
next=1,
|
||||
block=0,center=0,ghost=0,
|
||||
block=false,center=0,ghost=0,
|
||||
dropFX=0,lockFX=0,
|
||||
visible="none",
|
||||
dropPiece=PLY.check_lineReach,
|
||||
@@ -17,10 +17,29 @@ return{
|
||||
pauseLimit=true,
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
if setting.spawn==0 then
|
||||
LOG.print(text.switchSpawnSFX,color.yellow)
|
||||
end
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
if not game.result then
|
||||
gc.clear(.26,.26,.26)
|
||||
if game.replaying then
|
||||
gc.setColor(.3,.3,.3,.7)
|
||||
gc.push("transform")
|
||||
gc.origin()
|
||||
gc.rectangle("fill",0,0,scr.w,scr.h)
|
||||
gc.pop()
|
||||
else
|
||||
gc.clear(.26,.26,.26)
|
||||
--Frame
|
||||
gc.setColor(.5,.5,.5)
|
||||
gc.push("transform")
|
||||
gc.translate(150,70)
|
||||
gc.rectangle("line",-1,-11,302,612)--Boarder
|
||||
gc.rectangle("line",301,-3,15,604)--AtkBuffer boarder
|
||||
gc.rectangle("line",-16,-3,15,604)--B2b bar boarder
|
||||
gc.pop()
|
||||
end
|
||||
end
|
||||
|
||||
--Figures
|
||||
@@ -36,12 +55,6 @@ return{
|
||||
setFont(75)
|
||||
mStr(P.stat.row,69,290)
|
||||
mStr(P.stat.clears[4],69,410)
|
||||
|
||||
--"Field"
|
||||
gc.setColor(.5,.5,.5)
|
||||
gc.rectangle("line",149,59,302,612)
|
||||
gc.rectangle("line",451,70,15,601)
|
||||
gc.rectangle("line",134,67,15,604)
|
||||
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,
|
||||
|
||||
@@ -14,6 +14,11 @@ return{
|
||||
else
|
||||
modeEnv.bag=nil
|
||||
end
|
||||
if preMission[1]then
|
||||
modeEnv.mission=preMission
|
||||
else
|
||||
modeEnv.mission=nil
|
||||
end
|
||||
PLY.newPlayer(1,340,15)
|
||||
local L=modeEnv.opponent
|
||||
if L~=0 then
|
||||
|
||||
@@ -32,6 +32,11 @@ return{
|
||||
else
|
||||
modeEnv.bag=nil
|
||||
end
|
||||
if preMission[1]then
|
||||
modeEnv.mission=preMission
|
||||
else
|
||||
modeEnv.mission=nil
|
||||
end
|
||||
PLY.newPlayer(1,340,15)
|
||||
local L=modeEnv.opponent
|
||||
if L~=0 then
|
||||
|
||||
@@ -2,7 +2,7 @@ local format=string.format
|
||||
local int=math.floor
|
||||
local function tech_check_hard(P)
|
||||
if #P.clearedRow>0 then
|
||||
if not(P.lastClear.spin or P.lastClear.pc)then
|
||||
if not P.lastClear.special then
|
||||
P:lose()
|
||||
end
|
||||
end
|
||||
|
||||
47
parts/ai.lua
47
parts/ai.lua
@@ -335,31 +335,36 @@ return{
|
||||
return 2
|
||||
end,
|
||||
function(P,ctrl)--Poll keys
|
||||
local success,dest,hold,move=CC.getMove(P.AI_bot)
|
||||
if success==2 then
|
||||
ins(ctrl,6)
|
||||
return 3
|
||||
elseif success==0 then
|
||||
for i=1,#dest do
|
||||
for j=1,#dest[i]do
|
||||
dest[i][j]=dest[i][j]+1
|
||||
local success,result,dest,hold,move=pcall(CC.getMove,P.AI_bot)
|
||||
if success then
|
||||
if result==2 then
|
||||
ins(ctrl,6)
|
||||
return 3
|
||||
elseif result==0 then
|
||||
for i=1,#dest do
|
||||
for j=1,#dest[i]do
|
||||
dest[i][j]=dest[i][j]+1
|
||||
end
|
||||
end
|
||||
end
|
||||
P.AI_dest=dest
|
||||
if hold then ctrl[1]=8 end--Hold
|
||||
while move[1]do
|
||||
local m=rem(move,1)
|
||||
if m<4 then
|
||||
ins(ctrl,m+1)
|
||||
elseif not P.AIdata._20G then
|
||||
ins(ctrl,13)
|
||||
P.AI_dest=dest
|
||||
if hold then ctrl[1]=8 end--Hold
|
||||
while move[1]do
|
||||
local m=rem(move,1)
|
||||
if m<4 then
|
||||
ins(ctrl,m+1)
|
||||
elseif not P.AIdata._20G then
|
||||
ins(ctrl,13)
|
||||
end
|
||||
end
|
||||
ins(ctrl,6)
|
||||
return 3
|
||||
else
|
||||
--Stay this stage
|
||||
return 2
|
||||
end
|
||||
ins(ctrl,6)
|
||||
return 3
|
||||
else
|
||||
--Stay this stage
|
||||
return 2
|
||||
LOG.print("CC is dead ("..P.id..")","error")
|
||||
return 0
|
||||
end
|
||||
end,
|
||||
function(P)--Check if time to change target
|
||||
|
||||
@@ -17,7 +17,7 @@ setting={
|
||||
face={},
|
||||
|
||||
--Graphic
|
||||
block=1,ghost=.3,center=1,
|
||||
block=true,ghost=.3,center=1,
|
||||
smooth=true,grid=false,
|
||||
bagLine=false,
|
||||
lockFX=2,
|
||||
@@ -29,6 +29,7 @@ setting={
|
||||
frameMul=100,
|
||||
|
||||
text=true,
|
||||
score=true,
|
||||
warn=true,
|
||||
highCam=false,
|
||||
nextPos=false,
|
||||
|
||||
@@ -62,6 +62,85 @@ function restoreVirtualKey()
|
||||
end
|
||||
end
|
||||
|
||||
function copyQuestArgs()
|
||||
local ENV=customEnv
|
||||
local str=""
|
||||
str=str..(ENV.hold and"H"or"Z")
|
||||
str=str..(ENV.ospin and"O"or"Z")
|
||||
str=str..(ENV.missionKill and"M"or"Z")
|
||||
str=str..ENV.sequence
|
||||
return str
|
||||
end
|
||||
function pasteQuestArgs(str)
|
||||
local ENV=customEnv
|
||||
ENV.hold= byte(str,1)~=90
|
||||
ENV.ospin= byte(str,2)~=90
|
||||
ENV.missionKill= byte(str,3)~=90
|
||||
ENV.sequence= sub(str,4)
|
||||
end
|
||||
|
||||
--Encoding Functions
|
||||
--Sep symbol: 33 (!)
|
||||
--Safe char: 34~126
|
||||
--[[
|
||||
Count: 34~96
|
||||
Block: 97~125
|
||||
Encode: [A] or [AB] sequence, A = block ID, B = repeat times, no B means do not repeat.
|
||||
Example: "abcdefg" is [SZJLTOI], "a^aDb)" is [Z*63,Z*37,S*10]
|
||||
]]
|
||||
function copySequence()
|
||||
local preBag=preBag
|
||||
local str=""
|
||||
|
||||
local count=1
|
||||
for i=1,#preBag+1 do
|
||||
if preBag[i+1]~=preBag[i]or count==64 then
|
||||
str=str..char(96+preBag[i])
|
||||
if count>1 then
|
||||
str=str..char(32+count)
|
||||
count=1
|
||||
end
|
||||
else
|
||||
count=count+1
|
||||
end
|
||||
end
|
||||
|
||||
return str
|
||||
end
|
||||
function pasteSequence(str)
|
||||
local _
|
||||
|
||||
local bag={}
|
||||
local reg
|
||||
for i=1,#str do
|
||||
_=byte(str,i)
|
||||
if not reg then
|
||||
if _>=97 and _<=125 then
|
||||
reg=_-96
|
||||
else
|
||||
return
|
||||
end
|
||||
else
|
||||
if _>=97 and _<=125 then
|
||||
ins(bag,reg)
|
||||
reg=_-96
|
||||
elseif _>=34 and _<=96 then
|
||||
for i=1,_-32 do
|
||||
ins(bag,reg)
|
||||
end
|
||||
reg=nil
|
||||
end
|
||||
end
|
||||
end
|
||||
if reg then
|
||||
ins(bag,reg)
|
||||
end
|
||||
|
||||
preBag=bag
|
||||
sceneTemp.cur=#bag
|
||||
return true
|
||||
end
|
||||
|
||||
function copyBoard()
|
||||
local str=""
|
||||
local H=0
|
||||
@@ -85,7 +164,7 @@ function copyBoard()
|
||||
end
|
||||
str=str..S
|
||||
end
|
||||
return data.encode("string","base64",data.compress("string","deflate",str))
|
||||
return data.encode("string","base64",data.compress("string","zlib",str))
|
||||
end
|
||||
function pasteBoard(str)
|
||||
local _
|
||||
@@ -93,7 +172,7 @@ function pasteBoard(str)
|
||||
--Decode
|
||||
_,str=pcall(data.decode,"string","base64",str)
|
||||
if not _ then return end
|
||||
_,str=pcall(data.decompress,"string","deflate",str)
|
||||
_,str=pcall(data.decompress,"string","zlib",str)
|
||||
if not _ then return end
|
||||
|
||||
local fX,fY=1,1--*ptr for Field(r*10+(c-1))
|
||||
@@ -135,36 +214,73 @@ function pasteBoard(str)
|
||||
return true
|
||||
end
|
||||
|
||||
function copySequence()
|
||||
--[[
|
||||
Mission: 34~114
|
||||
Count: 115~126
|
||||
Encode: [A] or [AB] sequence, A = mission ID, B = repeat times, no B means do not repeat.
|
||||
|
||||
_1=01,_2=02,_3=03,_4=04,
|
||||
A1=05,A2=06,A3=07,A4=08,
|
||||
PC=09,
|
||||
Z1=11,Z2=12,Z3=13,
|
||||
S1=21,S2=22,S3=23,
|
||||
J1=31,J2=32,J3=33,
|
||||
L1=41,L2=42,L3=43,
|
||||
T1=51,T2=52,T3=53,
|
||||
O1=61,O2=62,O3=63,O4=64,
|
||||
I1=71,I2=72,I3=73,I4=74,
|
||||
]]
|
||||
function copyMission()
|
||||
local _
|
||||
local preMission=preMission
|
||||
local str=""
|
||||
|
||||
for i=1,#preBag do
|
||||
str=str..char(preBag[i]-1)
|
||||
end
|
||||
|
||||
return data.encode("string","base64",data.compress("string","deflate",str))
|
||||
end
|
||||
function pasteSequence(str)
|
||||
local _
|
||||
|
||||
--Decode
|
||||
_,str=pcall(data.decode,"string","base64",str)
|
||||
if not _ then return end
|
||||
_,str=pcall(data.decompress,"string","deflate",str)
|
||||
if not _ then return end
|
||||
|
||||
local bag={}
|
||||
for i=1,#str do
|
||||
_=byte(str,i)
|
||||
if _<25 then
|
||||
bag[i]=_+1
|
||||
local count=1
|
||||
for i=1,#preMission+1 do
|
||||
if preMission[i+1]~=preMission[i]or count==13 then
|
||||
_=33+preMission[i]
|
||||
str=str..char(_)
|
||||
if count>1 then
|
||||
str=str..char(113+count)
|
||||
count=1
|
||||
end
|
||||
else
|
||||
return
|
||||
count=count+1
|
||||
end
|
||||
end
|
||||
|
||||
preBag=bag
|
||||
sceneTemp.cur=#preBag
|
||||
return str
|
||||
end
|
||||
function pasteMission(str)
|
||||
local _
|
||||
local mission={}
|
||||
local reg
|
||||
for i=1,#str do
|
||||
_=byte(str,i)
|
||||
if not reg then
|
||||
if _>=34 and _<=114 then
|
||||
reg=_-33
|
||||
else
|
||||
return
|
||||
end
|
||||
else
|
||||
if _>=34 and _<=114 then
|
||||
ins(mission,reg)
|
||||
reg=_-33
|
||||
elseif _>=115 and _<=126 then
|
||||
for i=1,_-113 do
|
||||
ins(mission,reg)
|
||||
end
|
||||
reg=nil
|
||||
end
|
||||
end
|
||||
end
|
||||
if reg then
|
||||
ins(mission,reg)
|
||||
end
|
||||
|
||||
preMission=mission
|
||||
sceneTemp.cur=#mission
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@ if setting.lang==1 or setting.lang==2 then
|
||||
"少女祈祷中",
|
||||
"扫雷好玩!",
|
||||
"请不要向对方块不感兴趣的路人推荐此游戏。",
|
||||
"请不要随意宣传,出了事都怪你们",
|
||||
"你可以从统计页面打开游戏存档目录",
|
||||
"魔方好玩!",
|
||||
"喵!",
|
||||
@@ -82,6 +83,7 @@ if setting.lang==1 or setting.lang==2 then
|
||||
"茶娘 可爱!",
|
||||
"草(日本语)",
|
||||
"不要在上课时玩游戏!",
|
||||
"不要随意宣传,不要随意宣传,不要随意宣传",
|
||||
"不要盯着bug不放",
|
||||
"不是动画,真的在加载!",
|
||||
"别问游戏名怎么取的,问就是随便想的",
|
||||
@@ -245,7 +247,6 @@ elseif setting.lang==5 then
|
||||
}
|
||||
else
|
||||
L={
|
||||
"Diao?上次被我c4w秒了的那人?",
|
||||
"隐形难吗?那个节目上的谁,水平那么菜也打得还行,就是你菜",
|
||||
"一口一个wtcl还不赶紧去练,你是不思进取还是不想好好说话?",
|
||||
"我一个滑铲就挖了个11renPC",
|
||||
@@ -256,23 +257,24 @@ elseif setting.lang==5 then
|
||||
"设置都看过一遍了吗?明明都能调还嫌这嫌那,可牛逼了您",
|
||||
"少玩点,多眨眼,到时候瞎了别怪我没提醒你",
|
||||
"人只用一只手都能玩,你呢?",
|
||||
"全隐40行全消四很难吗??",
|
||||
"没那水平别天天整什么花里胡哨的,人玩几年你想几天赶上?",
|
||||
"满口PCDT信天翁,还会点别的么?",
|
||||
"叫你多练消四不听,现在要速度没速度,spin打完地形一塌糊涂,开心了?",
|
||||
"叫你多练就多练,想着几天变神仙,当自己是谁?",
|
||||
"极限20G不是随手通?",
|
||||
"还搁这玩手机呢,作业做完了?",
|
||||
"除了雨宫太阳你还认识谁?Jonas知道吗?Ajanba听过吗?",
|
||||
"不会吧不会吧,真的还有人不能随手Tspin?",
|
||||
"别会个c4w就以为自己多强,这是基本功罢了",
|
||||
"60lpm?拍硬降刷的吧",
|
||||
"4pps不是人均水平?",
|
||||
"别会个c4w就以为自己多强,这是基本功罢了。",
|
||||
"60lpm?拍硬降刷的吧。",
|
||||
"40行还要40多秒,就这?",
|
||||
"20G很难?是个人都能玩吧",
|
||||
"3pps不是人均水平?",
|
||||
"25TSD不难吧。",
|
||||
"20G很难?是个人都能玩吧。",
|
||||
"20连pc不是随手?",
|
||||
"100apm?定式刷的吧",
|
||||
"100apm?定式刷的吧。",
|
||||
"0202年了,还在玩这种小孩子玩的游戏?",
|
||||
"极限20G?那不是随手通",
|
||||
"全隐40行全消四很难吗??",
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -163,6 +163,22 @@ for i=1,8 do
|
||||
end
|
||||
end
|
||||
|
||||
missionEnum={
|
||||
_1=01,_2=02,_3=03,_4=04,
|
||||
A1=05,A2=06,A3=07,A4=08,
|
||||
PC=09,
|
||||
Z1=11,Z2=12,Z3=13,
|
||||
S1=21,S2=22,S3=23,
|
||||
J1=31,J2=32,J3=33,
|
||||
L1=41,L2=42,L3=43,
|
||||
T1=51,T2=52,T3=53,
|
||||
O1=61,O2=62,O3=63,O4=64,
|
||||
I1=71,I2=72,I3=73,I4=74,
|
||||
}
|
||||
local _={}
|
||||
for k,v in next,missionEnum do _[v]=k end
|
||||
for k,v in next,_ do missionEnum[k]=v end
|
||||
|
||||
local function T(s,t)return love.graphics.newText(setFont(s),t)end
|
||||
drawableText={
|
||||
question=T(100,"?"),right=T(45,"→"),
|
||||
@@ -183,7 +199,6 @@ drawableText={
|
||||
mxcmb=T(20,"Max Combo"),
|
||||
pc=T(20,"Perfect Clear"),
|
||||
ko=T(25,"KO"),
|
||||
D=T(100,"D"),C=T(100,"C"),B=T(100,"B"),A=T(100,"A"),S=T(100,"S"),
|
||||
|
||||
|
||||
modeName=T(30),levelName=T(30),
|
||||
@@ -194,8 +209,9 @@ drawableText={
|
||||
next=T(40),hold=T(40),
|
||||
win=T(120),finish=T(120),
|
||||
gameover=T(100),pause=T(120),
|
||||
D=T(100,"D"),C=T(100,"C"),B=T(100,"B"),A=T(100,"A"),S=T(100,"S"),
|
||||
|
||||
custom=T(80),sequence=T(80),
|
||||
custom=T(80),basic=T(35),rule=T(35),field=T(35),mission=T(35),
|
||||
setting_game=T(80),setting_video=T(80),setting_sound=T(80),
|
||||
setting_control=T(70),setting_skin=T(70),
|
||||
preview=T(40),
|
||||
|
||||
169
parts/player.lua
169
parts/player.lua
@@ -2,7 +2,7 @@ local gc=love.graphics
|
||||
local mt=love.math
|
||||
local Timer=love.timer.getTime
|
||||
local int,ceil,rnd=math.floor,math.ceil,math.random
|
||||
local max,min,abs,sin,cos=math.max,math.min,math.abs,math.sin,math.cos
|
||||
local max,min,abs,sin,cos,log=math.max,math.min,math.abs,math.sin,math.cos,math.log
|
||||
local ins,rem=table.insert,table.remove
|
||||
local format=string.format
|
||||
local scr=scr
|
||||
@@ -18,6 +18,7 @@ local gameEnv0={
|
||||
smooth=false,grid=false,
|
||||
bagLine=false,
|
||||
text=true,
|
||||
score=true,
|
||||
lockFX=2,
|
||||
dropFX=2,
|
||||
moveFX=2,
|
||||
@@ -33,7 +34,10 @@ local gameEnv0={
|
||||
next=6,
|
||||
hold=true,oncehold=true,
|
||||
ospin=true,
|
||||
sequence="bag",bag={1,2,3,4,5,6,7},
|
||||
sequence="bag",
|
||||
freshMethod=NULL,
|
||||
bag={1,2,3,4,5,6,7},
|
||||
mission=NULL,
|
||||
face=NULL,skin=NULL,
|
||||
|
||||
life=0,
|
||||
@@ -45,6 +49,7 @@ local gameEnv0={
|
||||
|
||||
Fkey=NULL,
|
||||
fine=false,fineKill=false,
|
||||
missionKill=false,
|
||||
target=1e99,dropPiece=NULL,
|
||||
mindas=0,minarr=0,minsdarr=0,
|
||||
|
||||
@@ -471,15 +476,12 @@ local function Pupdate_dead(P,dt)
|
||||
end
|
||||
if P.falling>=0 then
|
||||
P.falling=P.falling-1
|
||||
if P.falling>=0 then
|
||||
goto stop
|
||||
else
|
||||
if P.falling<0 then
|
||||
local L=#P.clearingRow
|
||||
if P.human and P.gameEnv.fall>0 and #P.field+L>P.clearingRow[L]then SFX.play("fall")end
|
||||
P.clearingRow={}
|
||||
end
|
||||
end
|
||||
::stop::
|
||||
if P.b2b1>0 then P.b2b1=max(0,P.b2b1*.92-1)end
|
||||
updateLine(P,dt)
|
||||
updateFXs(P,dt)
|
||||
@@ -731,7 +733,7 @@ do--function Pdraw_norm(P)
|
||||
--Draw rotate center
|
||||
local x=30*(P.curX+P.sc[2])-15
|
||||
if ENV.center and ENV.block then
|
||||
gc.setColor(1,1,1,ENV.block*ENV.center)
|
||||
gc.setColor(1,1,1,ENV.center)
|
||||
gc.draw(IMG.spinCenter,x,-30*(P.curY+P.sc[1])+15,nil,nil,nil,4,4)
|
||||
end
|
||||
gc.translate(0,dy)
|
||||
@@ -883,8 +885,15 @@ do--function Pdraw_norm(P)
|
||||
gc.draw(drawableText.bpm,540,550)
|
||||
gc.draw(drawableText.kpm,494,643)
|
||||
if P.life>0 then
|
||||
for i=1,P.life do
|
||||
gc.draw(IMG.lifeIcon,450+25*i,665,nil,.8)
|
||||
if P.life<=3 then
|
||||
for i=1,P.life do
|
||||
gc.draw(IMG.lifeIcon,450+25*i,665,nil,.8)
|
||||
end
|
||||
else
|
||||
gc.draw(IMG.lifeIcon,475,665,nil,.8)
|
||||
setFont(20)
|
||||
gc.print("x",503,665)
|
||||
gc.print(P.life,517,665)
|
||||
end
|
||||
end
|
||||
mStr(format("%.2f",P.stat.time),69,588)--Time
|
||||
@@ -902,6 +911,34 @@ do--function Pdraw_norm(P)
|
||||
curMode.mesDisp(P)
|
||||
end
|
||||
|
||||
--Missions
|
||||
if P.curMission then
|
||||
local missionEnum=missionEnum
|
||||
local L=ENV.mission
|
||||
|
||||
--Draw current mission
|
||||
setFont(35)
|
||||
if ENV.missionKill then
|
||||
gc.setColor(1,.7+.2*sin(Timer()*3),.4)
|
||||
else
|
||||
gc.setColor(1,1,1)
|
||||
end
|
||||
gc.print(missionEnum[L[P.curMission]],85,180)
|
||||
|
||||
--Draw next mission
|
||||
gc.setColor(1,1,1)
|
||||
setFont(17)
|
||||
for i=1,3 do
|
||||
local t=L[P.curMission+i]
|
||||
if t then
|
||||
t=missionEnum[t]
|
||||
gc.print(t,87-26*i,187)
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--Draw starting counter
|
||||
gc.setColor(1,1,1)
|
||||
if game.frame<180 then
|
||||
@@ -1198,6 +1235,10 @@ local function applyGameEnv(P)--Finish gameEnv processing
|
||||
end
|
||||
end
|
||||
|
||||
if type(ENV.mission)=="table"then
|
||||
P.curMission=1
|
||||
end
|
||||
|
||||
ENV.das=max(ENV.das,ENV.mindas)
|
||||
ENV.arr=max(ENV.arr,ENV.minarr)
|
||||
ENV.sdarr=max(ENV.sdarr,ENV.minsdarr)
|
||||
@@ -1217,7 +1258,6 @@ local function applyGameEnv(P)--Finish gameEnv processing
|
||||
if ENV.clearFX==0 then ENV.clearFX=nil end
|
||||
if ENV.shakeFX==0 then ENV.shakeFX=nil end
|
||||
|
||||
if ENV.block==0 then ENV.block=nil end
|
||||
if ENV.ghost==0 then ENV.ghost=nil end
|
||||
if ENV.center==0 then ENV.center=nil end
|
||||
end
|
||||
@@ -1227,6 +1267,8 @@ local function prepareSequence(P)--Call freshPrepare and set newNext
|
||||
freshPrepare[ENV.sequence](P)
|
||||
P.newNext=freshMethod[ENV.sequence]
|
||||
else
|
||||
print(type(ENV.sequence))
|
||||
print(type(ENV.freshMethod))
|
||||
assert(type(ENV.sequence)=="function"and type(ENV.freshMethod)=="function","wrong sequence generator code")
|
||||
ENV.sequence(P)
|
||||
P.newNext=ENV.freshMethod
|
||||
@@ -1237,7 +1279,7 @@ local function loadAI(P,AIdata)--Load AI params
|
||||
P.AI_mode=AIdata.type
|
||||
P.AI_stage=1
|
||||
P.AI_keys={}
|
||||
P.AI_delay=AIdata.delay or min(int(ENV.drop*.8),2*AIdata.delta)
|
||||
P.AI_delay=AIdata.delay or min(int(ENV.drop*.8),AIdata.delta*rnd()*4)
|
||||
P.AI_delay0=AIdata.delta
|
||||
P.AIdata={
|
||||
type=AIdata.type,
|
||||
@@ -2007,8 +2049,8 @@ function player.cancel(P,N)--Cancel Garbage
|
||||
return off
|
||||
end
|
||||
do--player.drop(P)--Place piece
|
||||
local b2bPoint={50,100,180,300,800}
|
||||
local b2bATK={3,5,8,10,20}
|
||||
local b2bPoint={50,100,180,1000,1200}
|
||||
local b2bATK={3,5,8,12,18}
|
||||
local clearSCR={80,200,400}
|
||||
local spinSCR={--[blockName][row]
|
||||
{200,750,1300},--Z
|
||||
@@ -2016,8 +2058,8 @@ do--player.drop(P)--Place piece
|
||||
{220,700,1300},--L
|
||||
{220,700,1300},--J
|
||||
{250,800,1400},--T
|
||||
{260,900,1700},--O
|
||||
{300,1200,1700},--I
|
||||
{260,900,1700,4000},--O
|
||||
{300,1200,1700,4000},--I
|
||||
{220,800,2000,3000,8000},--Else
|
||||
}
|
||||
--B2BMUL:1.2/2.0
|
||||
@@ -2056,9 +2098,11 @@ do--player.drop(P)--Place piece
|
||||
local _
|
||||
local CHN=VOC.getFreeChannel()
|
||||
P.dropTime[11]=ins(P.dropTime,1,game.frame)--Update speed dial
|
||||
local cmb=P.combo
|
||||
P.waiting=P.gameEnv.wait
|
||||
local ENV=P.gameEnv
|
||||
local STAT=P.stat
|
||||
P.waiting=ENV.wait
|
||||
|
||||
local cmb=P.combo
|
||||
local CB,CX,CY=P.cur,P.curX,P.curY
|
||||
local clear--If (perfect)clear
|
||||
local cc,gbcc=0,0--Row/garbage-row cleared,full-part
|
||||
@@ -2078,7 +2122,7 @@ do--player.drop(P)--Place piece
|
||||
if c==0 then goto NTC end
|
||||
if P:solid(x-1,y-1)then c=c+1 end
|
||||
if P:solid(x+1,y-1)then c=c+1 end
|
||||
if c>2 then dospin=dospin+1 end
|
||||
if c>2 then dospin=dospin+2 end
|
||||
end
|
||||
::NTC::
|
||||
end
|
||||
@@ -2104,15 +2148,15 @@ do--player.drop(P)--Place piece
|
||||
end
|
||||
|
||||
--Create clearing FX
|
||||
if cc>0 and P.gameEnv.clearFX then
|
||||
local t=7-P.gameEnv.clearFX*1
|
||||
if cc>0 and ENV.clearFX then
|
||||
local t=7-ENV.clearFX*1
|
||||
for i=1,cc do
|
||||
P:createClearingFX(P.clearedRow[i],t)
|
||||
end
|
||||
end
|
||||
|
||||
--Create locking FX
|
||||
if P.gameEnv.lockFX then
|
||||
if ENV.lockFX then
|
||||
if cc==0 then
|
||||
P:createLockFX()
|
||||
else
|
||||
@@ -2128,9 +2172,11 @@ do--player.drop(P)--Place piece
|
||||
--Final spin check
|
||||
if dospin>0 then
|
||||
if cc>0 then
|
||||
dospin=dospin+(P.spinLast or 0)
|
||||
if dospin<2 then
|
||||
mini=CB.id<6 and cc<3 and cc<P.r
|
||||
if P.spinLast then
|
||||
dospin=dospin+1
|
||||
end
|
||||
if dospin<3 then
|
||||
mini=CB.id<6 and cc<P.r
|
||||
end
|
||||
end
|
||||
else
|
||||
@@ -2191,7 +2237,7 @@ do--player.drop(P)--Place piece
|
||||
_=_-1
|
||||
end
|
||||
if P.clearingRow[1]then
|
||||
P.falling=P.gameEnv.fall
|
||||
P.falling=ENV.fall
|
||||
elseif cc==P.r then
|
||||
clear=true
|
||||
end
|
||||
@@ -2208,7 +2254,7 @@ do--player.drop(P)--Place piece
|
||||
end
|
||||
end
|
||||
|
||||
if cc>0 then
|
||||
if cc>0 then--If lines cleared, about 200 lines below
|
||||
local C=P.lastClear
|
||||
C.id,C.name=CB.id,CB.name
|
||||
C.row=cc
|
||||
@@ -2242,7 +2288,7 @@ do--player.drop(P)--Place piece
|
||||
P:showText(text.mini,0,-80,35,"appear")
|
||||
atk=atk*.25
|
||||
sendTime=sendTime+60
|
||||
cscore=cscore*.6
|
||||
cscore=cscore*.5
|
||||
P.b2b=P.b2b+b2bPoint[cc]*.5
|
||||
if P.human then
|
||||
VOC.play("mini",CHN)
|
||||
@@ -2260,7 +2306,7 @@ do--player.drop(P)--Place piece
|
||||
cscore=cc==4 and 1000 or 1500
|
||||
if P.b2b>1000 then
|
||||
P:showText(text.b3b..text.clear[cc],0,-30,50,"fly")
|
||||
atk=cc+2
|
||||
atk=cc*1.5
|
||||
sendTime=100
|
||||
exblock=exblock+1
|
||||
cscore=cscore*1.8
|
||||
@@ -2282,7 +2328,7 @@ do--player.drop(P)--Place piece
|
||||
sendTime=60
|
||||
atk=cc
|
||||
end
|
||||
P.b2b=P.b2b+cc*80-220
|
||||
P.b2b=P.b2b+cc*100-300
|
||||
C.special=true
|
||||
else
|
||||
C.special=false
|
||||
@@ -2291,10 +2337,11 @@ do--player.drop(P)--Place piece
|
||||
VOC.play(clearName[cc],CHN)
|
||||
end
|
||||
|
||||
--PC/HPC bonus
|
||||
if clear then
|
||||
if #P.field==0 then
|
||||
if #P.field==0 then
|
||||
P:showText(text.PC,0,-80,50,"flicker")
|
||||
atk=atk*.5+min(6+STAT.pc,12)
|
||||
atk=atk*.5+min(8+STAT.pc*2,20)
|
||||
exblock=exblock+2
|
||||
sendTime=sendTime+120
|
||||
if STAT.row+cc>4 then
|
||||
@@ -2306,7 +2353,7 @@ do--player.drop(P)--Place piece
|
||||
STAT.pc=STAT.pc+1
|
||||
if P.human then
|
||||
SFX.play("clear")
|
||||
VOC.play("pc",CHN)
|
||||
VOC.play("clear",CHN)
|
||||
end
|
||||
C.special=true
|
||||
elseif cc>1 or #P.field==P.garbageBeneath then
|
||||
@@ -2326,6 +2373,7 @@ do--player.drop(P)--Place piece
|
||||
C.pc=false
|
||||
end
|
||||
|
||||
--Normal clear, reduce B2B point
|
||||
if not C.special then
|
||||
P.b2b=max(P.b2b-250,0)
|
||||
P:showText(text.clear[cc],0,-30,27+cc*3,"appear",(8-cc)*.3)
|
||||
@@ -2334,9 +2382,10 @@ do--player.drop(P)--Place piece
|
||||
cscore=cscore+clearSCR[cc]
|
||||
end
|
||||
|
||||
--Combo bonus
|
||||
sendTime=sendTime+25*cmb
|
||||
if cmb>1 then
|
||||
atk=atk*(.8+.2*min(cmb,11))
|
||||
atk=atk*(1+(cc==1 and .15 or .25)*min(cmb-1,12))
|
||||
if cmb>=3 then
|
||||
atk=atk+1
|
||||
end
|
||||
@@ -2355,11 +2404,12 @@ do--player.drop(P)--Place piece
|
||||
end
|
||||
end
|
||||
|
||||
--Send Lines
|
||||
send=atk
|
||||
if send>0 then
|
||||
if exblock>0 then
|
||||
exblock=int(exblock*(1+P.strength*.25))--Badge Buff
|
||||
P:showText(exblock,0,120,20,"zoomout")
|
||||
P:showText("+"..exblock,0,53,20,"fly")
|
||||
off=off+P:cancel(exblock)
|
||||
end
|
||||
|
||||
@@ -2396,13 +2446,49 @@ do--player.drop(P)--Place piece
|
||||
end
|
||||
end
|
||||
|
||||
--Check clearing task
|
||||
if P.curMission then
|
||||
local t=ENV.mission[P.curMission]
|
||||
local success
|
||||
if t<5 then
|
||||
if C.row==t then
|
||||
success=true
|
||||
end
|
||||
elseif t<9 then
|
||||
if C.row==t%10 and C.spin then
|
||||
success=true
|
||||
end
|
||||
elseif t==9 then
|
||||
if C.pc then
|
||||
success=true
|
||||
end
|
||||
elseif t<90 then
|
||||
if C.row==t%10 and C.name==int(t/10)and C.spin then
|
||||
success=true
|
||||
end
|
||||
end
|
||||
if success then
|
||||
P.curMission=P.curMission+1
|
||||
SFX.play("reach")
|
||||
if P.curMission>#ENV.mission then
|
||||
P.curMission=nil
|
||||
P:win()
|
||||
end
|
||||
elseif ENV.missionKill then
|
||||
P:showText(text.missionFailed,0,140,40,"flicker",.5)
|
||||
SFX.play("finesseError_long",.6)
|
||||
P:lose()
|
||||
end
|
||||
end
|
||||
|
||||
--SFX & Vibrate
|
||||
if P.human then
|
||||
SFX.play(clear_n[cc])
|
||||
SFX.play(ren_n[min(cmb,11)])
|
||||
if cmb>14 then SFX.play("ren_mega",(cmb-10)*.1)end
|
||||
VIB(cc+1)
|
||||
end
|
||||
else
|
||||
else--No lines clear
|
||||
cmb=0
|
||||
local dropScore=10
|
||||
|
||||
@@ -2420,7 +2506,7 @@ do--player.drop(P)--Place piece
|
||||
--DropSpeed bonus
|
||||
if P._20G then
|
||||
dropScore=dropScore*2
|
||||
elseif P.gameEnv.drop<3 then
|
||||
elseif ENV.drop<3 then
|
||||
dropScore=dropScore*1.5
|
||||
end
|
||||
|
||||
@@ -2441,7 +2527,11 @@ do--player.drop(P)--Place piece
|
||||
end
|
||||
P.combo=cmb
|
||||
|
||||
STAT.score=STAT.score+int(cscore)
|
||||
cscore=int(cscore)
|
||||
if ENV.score then
|
||||
P:showText(cscore,(P.curX+P.sc[2]-5.5)*30,(10-P.curY-P.sc[1])*30+P.fieldBeneath+P.fieldUp,int(40-600/(cscore+20)),"score",2)
|
||||
end
|
||||
STAT.score=STAT.score+cscore
|
||||
STAT.piece=STAT.piece+1
|
||||
STAT.row=STAT.row+cc
|
||||
if atk>0 then
|
||||
@@ -2469,7 +2559,7 @@ do--player.drop(P)--Place piece
|
||||
end
|
||||
|
||||
--Drop event
|
||||
_=P.gameEnv.dropPiece
|
||||
_=ENV.dropPiece
|
||||
if _ then _(P)end
|
||||
|
||||
--Stereo SFX
|
||||
@@ -2606,7 +2696,7 @@ function player.lose(P)
|
||||
end
|
||||
sysFX.newShade(.5,1,1,1,P.x+150*P.size,P.y+60*P.size,300*P.size,610*P.size)
|
||||
sysFX.newRectRipple(.3,P.x+150*P.size,P.y+60*P.size,300*P.size,610*P.size)
|
||||
sysFX.newRipple(.3,P.x+(450+25+25*P.life+12)*P.size,P.y+(665+12)*P.size,20)
|
||||
sysFX.newRipple(.3,P.x+(475+25*(P.life<3 and P.life or 0)+12)*P.size,P.y+(665+12)*P.size,20)
|
||||
--300+25*i,595
|
||||
SFX.play("clear_3")
|
||||
SFX.play("emit")
|
||||
@@ -3000,6 +3090,7 @@ function PLY.newDemoPlayer(id,x,y,size)
|
||||
smooth=setting.smooth,
|
||||
grid=setting.grid,
|
||||
text=setting.text,
|
||||
score=setting.score,
|
||||
lockFX=setting.lockFX,
|
||||
dropFX=setting.dropFX,
|
||||
moveFX=setting.moveFX,
|
||||
|
||||
822
parts/scenes.lua
822
parts/scenes.lua
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@ local S=[=[
|
||||
那没事了(T6300) 加油啊,钉钉动了的大哥哥(T3228)
|
||||
弥佑瑶 Alan 幽灵3383
|
||||
靏鸖龘龘 込余 saki
|
||||
模电
|
||||
模电 吃水榴莲
|
||||
<rmb10+>
|
||||
八零哥 蕴空之灵 gggf127 dtg ThTsOd
|
||||
Fireboos 金巧 10元 立斐 Deep_Sea
|
||||
@@ -16,9 +16,9 @@ local S=[=[
|
||||
HimuroAki TCV100 tech有养成系统了@7065
|
||||
HAGE KANOBU 闪电和拐棍 葡萄味的曼妥思
|
||||
世界沃德 蓝绿 天生的魔法师 琳雨空 T8779.易缄
|
||||
吃水榴莲 诗情画意 星姐阿夸双推Man暗炎 [*炎]
|
||||
[*Y] aaa222 [**城] cnDD 红桃老给
|
||||
昭庭玲秋 旋树墩 火花工作室 Cosine 沁音的芝麻王
|
||||
诗情画意 星姐阿夸双推Man暗炎 [*炎] [*Y]
|
||||
aaa222 [**城] cnDD 红桃老给 昭庭玲秋
|
||||
旋树墩 火花工作室 Cosine 沁音的芝麻王
|
||||
SuperJH 天上_飞 uiro 宇酱
|
||||
|
||||
Thanks!!!
|
||||
@@ -53,14 +53,15 @@ Future outlook:
|
||||
mine sweeper
|
||||
tank battle
|
||||
find difference
|
||||
soduku
|
||||
sodoku
|
||||
link-link
|
||||
画图智能画笔
|
||||
改连击攻击
|
||||
场地序列一起复制
|
||||
自定义消行要求(可复制)
|
||||
健康游戏时间提醒
|
||||
多语音包系统
|
||||
自定义游戏支持选择旋转系统(C2,DTET,ASC...)
|
||||
录像保存/导出
|
||||
按块回放录像
|
||||
split判定及效果
|
||||
工程编译到字节码
|
||||
游戏内文档
|
||||
方块散落动画
|
||||
@@ -72,6 +73,34 @@ Future outlook:
|
||||
task-Z(新AI)
|
||||
更多画面效果 & 一些3D小玩意
|
||||
|
||||
0.11.0: 谜题更新 Puzzle Update
|
||||
新内容:
|
||||
自定义游戏支持复制所有【题目】信息
|
||||
自定义任务(各种消除),可开关强制完成
|
||||
自定义游戏设置重新分页+排版
|
||||
新增显示落块分数
|
||||
计算器支持小数点和科学计数法
|
||||
改动:
|
||||
攻击算法大幅改动
|
||||
命数超过3使用缩略显示
|
||||
自定义序列/任务连续同种方块使用缩略显示
|
||||
软件锁场景层次更改,可以从设置进入
|
||||
自定义序列中光标位置可循环
|
||||
修改序列的导出格式
|
||||
方块透明度改为显示开关
|
||||
隐形WTF模式会提示玩家打开生成音效,回放场地可见
|
||||
LOG.print输出字体随屏幕大小变化
|
||||
debug页面新增复制日志信息和输出屏幕信息
|
||||
debug模式光标坐标显示必定整数
|
||||
debug功能键增加
|
||||
代码:
|
||||
color模块新增生成随机色,生成彩虹色功能
|
||||
修复:
|
||||
修复科研极简+模式不能消四
|
||||
焦点选择器控件上时按方向键闪退
|
||||
干旱2进入就报错
|
||||
O4或I4后游戏崩溃
|
||||
|
||||
0.10.11: 自定义游戏更新 Custom-game Update
|
||||
新内容:
|
||||
全新自定义游戏设置界面
|
||||
@@ -93,7 +122,7 @@ Future outlook:
|
||||
20G移出gameEnv属性
|
||||
修复:
|
||||
修复回放录像时间轴错开一帧
|
||||
对CC崩溃进行一定保护,游戏可能不会闪退
|
||||
对CC崩溃进行一定保护,游戏可能不会闪退
|
||||
背景lightning2的方块显示错误
|
||||
科研模式显示的攻击改为一位小数
|
||||
|
||||
|
||||
Reference in New Issue
Block a user