Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
486a64cca3 | ||
|
|
28d5136e95 | ||
|
|
2768fa748b |
Binary file not shown.
Binary file not shown.
Binary file not shown.
1094
callback.lua
Normal file
1094
callback.lua
Normal file
File diff suppressed because it is too large
Load Diff
14
conf.lua
14
conf.lua
@@ -1,11 +1,11 @@
|
||||
gameVersion="Alpha V0.8.17"
|
||||
gameVersion="Alpha V0.8.21"
|
||||
function love.conf(t)
|
||||
t.identity="Techmino"--SaveDir name
|
||||
t.identity="Techmino"--folder name
|
||||
t.version="11.1"
|
||||
t.console=false
|
||||
t.gammacorrect=false
|
||||
t.appendidentity=true--Search files in source before save directory
|
||||
t.accelerometerjoystick=false--ios/android加速度计=摇杆
|
||||
t.appendidentity=true--search files in source before save directory
|
||||
t.accelerometerjoystick=false--accelerometer=joystick on ios/android
|
||||
t.audio.mixwithsystem=true
|
||||
|
||||
local W=t.window
|
||||
@@ -17,12 +17,12 @@ function love.conf(t)
|
||||
W.resizable=true
|
||||
W.fullscreentype="desktop"--"exclusive"
|
||||
W.fullscreen=false
|
||||
W.vsync=0--∞fps
|
||||
W.vsync=0--infinite fps
|
||||
W.msaa=false--num of samples to use with multi-sampled antialiasing
|
||||
W.depth=0--bits/samp of depth buffer
|
||||
W.stencil=1--bits/samp of stencil buffer
|
||||
W.display=1--Monitor ID
|
||||
W.highdpi=false--High-dpi mode for the window on a Retina display
|
||||
W.display=1--monitor ID
|
||||
W.highdpi=false--high-dpi mode for the window on a Retina display
|
||||
W.x,W.y=nil
|
||||
|
||||
local M=t.modules
|
||||
|
||||
@@ -1,25 +1,26 @@
|
||||
setting={
|
||||
local s={
|
||||
--game
|
||||
das=10,arr=2,
|
||||
sddas=0,sdarr=2,
|
||||
ihs=true,irs=true,ims=true,
|
||||
reTime=10,
|
||||
reTime=4,
|
||||
maxNext=6,
|
||||
quickR=true,
|
||||
swap=true,
|
||||
fine=false,
|
||||
autoPause=true,
|
||||
|
||||
lang=1,
|
||||
skinSet=1,
|
||||
skin={1,5,2,8,10,3,7},
|
||||
face={0,0,0,0,0,0,0},
|
||||
--game
|
||||
skin={1,5,8,2,10,3,7,1,5,5,1,8,2,10,3,7,10,7,8,2,8,2,1,5,3},
|
||||
face={},
|
||||
|
||||
--graphic
|
||||
ghost=true,center=true,
|
||||
smooth=true,grid=false,
|
||||
bagLine=false,
|
||||
lockFX=2,
|
||||
dropFX=3,
|
||||
clearFX=2,
|
||||
shakeFX=2,
|
||||
atkFX=3,
|
||||
frameMul=100,
|
||||
@@ -27,14 +28,16 @@ setting={
|
||||
text=true,
|
||||
fullscreen=false,
|
||||
bg=true,
|
||||
--graphic
|
||||
powerInfo=false,
|
||||
|
||||
--sound
|
||||
sfx=10,bgm=7,
|
||||
vib=0,voc=0,
|
||||
stereo=6,
|
||||
--sound
|
||||
|
||||
VKSound=true,--if SFX
|
||||
--virtualkey
|
||||
VKSFX=3,--SFX volume
|
||||
VKVIB=0,--VIB
|
||||
VKSwitch=false,--if disp
|
||||
VKTrack=false,--if tracked
|
||||
VKDodge=false,--if dodge
|
||||
@@ -42,28 +45,36 @@ setting={
|
||||
VKCurW=4,--Cur-Pos Weight
|
||||
VKIcon=true,--if disp icon
|
||||
VKAlpha=3,
|
||||
--control
|
||||
}
|
||||
stat={
|
||||
for i=1,25 do
|
||||
s.face[i]=0
|
||||
end
|
||||
setting=s
|
||||
|
||||
s={
|
||||
version=gameVersion,
|
||||
run=0,game=0,time=0,
|
||||
key=0,rotate=0,hold=0,
|
||||
extraPiece=0,extraRate=0,
|
||||
piece=0,row=0,dig=0,
|
||||
atk=0,digatk=0,send=0,recv=0,pend=0,
|
||||
clear_S={0,0,0,0},clear_B={0,0,0,0,0,0,0},
|
||||
spin_S={0,0,0,0},spin_B={0,0,0,0,0,0,0},
|
||||
clear={{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}},
|
||||
spin={{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}},
|
||||
clear={},clear_B={},clear_S={0,0,0,0,0},
|
||||
spin={},spin_B={},spin_S={0,0,0,0,0},
|
||||
pc=0,hpc=0,b2b=0,b3b=0,score=0,
|
||||
lastPlay=1,--last played mode ID
|
||||
}
|
||||
for i=1,25 do
|
||||
s.clear_B[i]=0
|
||||
s.spin_B[i]=0
|
||||
s.clear[i]={0,0,0,0,0}
|
||||
s.spin[i]={0,0,0,0,0}
|
||||
end
|
||||
stat=s
|
||||
|
||||
keyMap={
|
||||
{"left","right","x","z","c","up","down","space","tab","r"},
|
||||
{},{},{},{},{},{},{},
|
||||
{"left","right","x","z","c","up","down","space","tab","r"},{},
|
||||
--keyboard
|
||||
{"dpleft","dpright","a","b","y","dpup","dpdown","rightshoulder","x","leftshoulder"},
|
||||
{},{},{},{},{},{},{},
|
||||
{"dpleft","dpright","a","b","y","dpup","dpdown","rightshoulder","x","leftshoulder"},{},
|
||||
--joystick
|
||||
}
|
||||
for i=1,#keyMap do for j=1,20 do
|
||||
|
||||
73
document.txt
73
document.txt
@@ -1,14 +1,13 @@
|
||||
(ENG ver. below)
|
||||
游戏方法:
|
||||
系统会提供的一个个四联骨牌("方块",总共7种),玩家需要控制(左右移动和旋转90,180,270度),每填满场地的一行就会将其消除,根据消除方式会给对手攻击(如果有对手的话)
|
||||
活到最后或者完成目标即胜利.
|
||||
|
||||
旋转系统:
|
||||
使用Techmino专属旋转系统
|
||||
细节懒得写(?)
|
||||
使用Techmino专属旋转系统,细节懒得写(
|
||||
|
||||
spin判定:
|
||||
结合了不可移动判定和三角判定,是否为mini也与判定过程数据有关
|
||||
细节也懒得写(?)
|
||||
结合了不可移动判定和三角判定,是否为mini也与判定过程数据有关,细节也懒得写(
|
||||
|
||||
攻击系统:
|
||||
普通消除:
|
||||
@@ -17,7 +16,8 @@ spin判定:
|
||||
spin1/2/3攻击2/4/6,若mini则减半
|
||||
B2B:加1(techrash/spin1/spin2)或2(spin3)攻击
|
||||
B3B:在B2B效果之上消四再加1,spin再加0.5*消行数攻击,二者都+1额外抵挡
|
||||
连击:0,0,1,1,2,2,3,3,4,4,3,2,3,2,3,2,3…(后面都是2)
|
||||
堆楼连击:0,0,1,1,2,2,2,3,3,3,4,4,3, 之后都是2
|
||||
挖掘连击:0,0,1,1,2,2,3,3,4,4,4, 之后都是5
|
||||
特殊消除会增加B2B点数,让之后的特殊消除获得B2B(B3B)增益(详细说明见下文)
|
||||
半全消("下方有剩余方块"的全消,如果是I消1行则必须不剩余玩家放置的方块):伤害+2,额外抵挡+2
|
||||
全消:将上述伤害之和开根号,再+6~12(本局内递增)+2额外抵挡(注:本局消行数>4时会将B2B点数拉满)
|
||||
@@ -48,11 +48,68 @@ back to back(B2B)点数说明:
|
||||
1.随机:每次攻击后10%随机挑选一个玩家锁定
|
||||
2.最多徽章:攻击后或者锁定玩家死亡时锁定徽章最多的玩家
|
||||
3.最高:攻击后或者锁定玩家死亡时锁定场地最高的玩家(每秒刷新)
|
||||
4.反击:攻击所有锁定自己的玩家(攻击AOE),若未被任何人锁定则伏击随机玩家
|
||||
4.反击:攻击所有锁定自己的玩家(攻击AOE),若未被任何人锁定则攻击随机玩家(不锁定)
|
||||
坚持到最后的玩家就是胜利者.
|
||||
|
||||
自定义模式说明:
|
||||
玩家可以自由调整大多数参数(不包括上述各种游戏模式的特殊效果),也可以画一个场地去消除或者是作为提示模板来进行拼图模式.
|
||||
在拼图模式下,按功能键切换是否展示提示.其中打"X"的格子不允许有方块,空的格子可以是任何状态,普通的七种彩色方块必须颜色对应,垃圾行方块的为止只要有方块就可以,但是不能是空气,玩家拼出自己画的图后就会判定胜利.
|
||||
附录:
|
||||
ZXC的Ospin地图:XY0BCgAwCAIR7v9vHtUSt8AS0xKqgpnNGyXkrmFNePf6qi3BbQPrHT2Owxe6D66NeKi86dwB
|
||||
|
||||
Gameplay:
|
||||
System will offer a series of tetrominoes ("Pieces". There are 7 types), and the player needs to control [them] (move left and right, rotate 90, 180 or 270 degrees), filling a row on the play field will clear it, attack will be sent depending on the type of the line clear (if there is an opponent)
|
||||
Survive till the last or complete the level's goal to win.
|
||||
|
||||
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
|
||||
|
||||
Attack system:
|
||||
Regular line clears:
|
||||
Single/Double/Triple/Techrash sends 0.25/1.25/2.25/4
|
||||
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
|
||||
Wide Combo: 0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 3, then 2 afterwards
|
||||
Dig Combo: 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 4, then 5 afterwards
|
||||
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: square root 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)
|
||||
After calculating all above, the damage value will be rounded down then sent
|
||||
|
||||
Score system:
|
||||
The more impressive you play, the more score you get
|
||||
|
||||
Attack delay:
|
||||
Attack from Doubles/Triples take effect the faster, then Techrash, Spins send rather slow attack, and high combos will send the slowest
|
||||
B2B or B2B2B, while they increase lines sent, they also increase the attack delay. Minis will greatly increase delay.
|
||||
|
||||
Countering:
|
||||
When you send attack, if there is garbage in queue, extra blocking will be used first, then attack, countering the earliest attack at a 1:1 ratio.
|
||||
Unused extra blocking will be discarded, then remaining attack will be sent to your opponent.
|
||||
|
||||
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 (x40% if Mini)
|
||||
Techrash +100
|
||||
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)
|
||||
|
||||
Battle Royale modes:
|
||||
Many players play within one game (all opponents are bots, not real players). As players get eliminated, blocks fall faster, and garbage take effect faster, as well as rise faster. KO-ing another player grants you one badge plus all badge that player has, increasing your attack power.
|
||||
Players can select one of 4 attack modes:
|
||||
1. Random: Every time you attack, 10% chance to lock onto a random player.
|
||||
2. Badges: After you attack or when your target dies, lock onto the player with the most badges.
|
||||
3. KOs: After you attack or when your target dies, lock onto the player with the highest field. (This refreshes every second)
|
||||
4. Counter: attack all players locking onto yourself. Your attack will be sent to all of them. If you are not targetted, you attack a random player (not locking).
|
||||
The last survivor wins.
|
||||
|
||||
Custom mode:
|
||||
You can freely adjust most parameters (not including special effects of other game modes), and you can also draw a field to clear or make a template to build.
|
||||
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
|
||||
@@ -53,6 +53,12 @@ return{
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local W=P.modeData.event
|
||||
return W>100 and 4 or W>=80 and 3 or W>=50 and 2 or W>=20 and 1 or W>=5 and 0
|
||||
return
|
||||
W>=100 and 5 or
|
||||
W>=80 and 4 or
|
||||
W>=60 and 3 or
|
||||
W>=40 and 2 or
|
||||
W>=20 and 1 or
|
||||
W>=5 and 0
|
||||
end,
|
||||
}
|
||||
@@ -66,6 +66,12 @@ return{
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local W=P.modeData.event
|
||||
return W>40 and 4 or W>=30 and 3 or W>=20 and 2 or W>=10 and 1 or W>=5 and 0
|
||||
return
|
||||
W>=50 and 5 or
|
||||
W>=40 and 4 or
|
||||
W>=30 and 3 or
|
||||
W>=20 and 2 or
|
||||
W>=10 and 1 or
|
||||
W>=5 and 0
|
||||
end,
|
||||
}
|
||||
@@ -51,9 +51,9 @@ return{
|
||||
res[A+2]=7
|
||||
end
|
||||
|
||||
--give O when no Δ=0/give T when no Δ=1
|
||||
d=0--Δ=0
|
||||
A=0--Δ=1
|
||||
--give O when no d=0/give T when no d=1
|
||||
d=0--d=0 count
|
||||
A=0--d=1 count
|
||||
for x=2,10 do
|
||||
local _=height[x]-height[x-1]
|
||||
if _==0 then
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
return{
|
||||
color=color.white,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
freshLimit=15,
|
||||
bg="none",bgm="way",
|
||||
},
|
||||
load=function()
|
||||
newPlayer(1,20,15)
|
||||
newPlayer(2,650,15)
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
end,
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
return{
|
||||
color=color.white,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
freshLimit=15,
|
||||
bg="none",bgm="way",
|
||||
},
|
||||
load=function()
|
||||
newPlayer(1,20,100,.65)
|
||||
newPlayer(2,435,100,.65)
|
||||
newPlayer(3,850,100,.65)
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
end,
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
return{
|
||||
color=color.white,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
freshLimit=15,
|
||||
bg="none",bgm="way",
|
||||
},
|
||||
load=function()
|
||||
newPlayer(1,25,160,.5)
|
||||
newPlayer(2,335,160,.5)
|
||||
newPlayer(3,645,160,.5)
|
||||
newPlayer(4,955,160,.5)
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
end,
|
||||
}
|
||||
@@ -42,8 +42,8 @@ return{
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=185 and 5 or
|
||||
T<=250 and 4 or
|
||||
T<=226 and 5 or
|
||||
T<=262 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
|
||||
@@ -5,53 +5,35 @@ local pc_lock={55,50,45,40,36,32,30}
|
||||
local pc_fall={18,16,14,12,10,9,8,7,6}
|
||||
local PCbase=require("parts/PCbase")
|
||||
local PClist=require("parts/PClist")
|
||||
local PCtype={[0]=1,2,1,3,2,3}
|
||||
|
||||
local function task_PC(P)
|
||||
local _
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter==21 then
|
||||
local t=P.stat.pc%2
|
||||
local S=P.gameEnv.skin
|
||||
for i=1,4 do
|
||||
local r=freeRow.get(0)
|
||||
for j=1,10 do
|
||||
_=PCbase[4*t+i][j]
|
||||
r[j]=S[_]or 0
|
||||
end
|
||||
ins(P.field,1,r)
|
||||
ins(P.visTime,1,freeRow.get(20))
|
||||
end
|
||||
P.fieldBeneath=P.fieldBeneath+120
|
||||
P.curY=P.curY+4
|
||||
P:freshgho()
|
||||
if P.modeData.counter==26 then
|
||||
local base=PCbase[P.modeData.type]
|
||||
P:pushLine(base[rnd(#base)],P.modeData.symmetry)
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
local function newPC(P)
|
||||
local r=P.field;r=r[#r]
|
||||
if r then
|
||||
local r=P.field
|
||||
if r[1]then
|
||||
r=r[#r]
|
||||
local c=0
|
||||
for i=1,10 do if r[i]>0 then c=c+1 end end
|
||||
if c<5 then
|
||||
P:lose()
|
||||
end
|
||||
if c<5 then P:lose()end
|
||||
end
|
||||
if P.stat.piece%4==0 and #P.field==0 then
|
||||
P.modeData.event=P.modeData.event==0 and 1 or 0
|
||||
local r=rnd(#PClist)
|
||||
local f=P.modeData.event==0
|
||||
for i=1,4 do
|
||||
local b=PClist[r][i]
|
||||
if f then
|
||||
if b<3 then b=3-b
|
||||
elseif b<5 then b=7-b
|
||||
end
|
||||
end
|
||||
P:getNext(b)
|
||||
end
|
||||
if #P.field==0 then
|
||||
local type=PCtype[P.stat.pc]or rnd(2,3)
|
||||
local L=PClist[type][rnd(#PClist[1])]
|
||||
local symmetry=rnd()>.5
|
||||
P.modeData.type=type
|
||||
P.modeData.symmetry=symmetry
|
||||
P:pushNext(L,symmetry)
|
||||
P.modeData.counter=P.stat.piece==0 and 20 or 0
|
||||
TASK.new(task_PC,P)
|
||||
local s=P.stat.pc*.5
|
||||
|
||||
local s=P.stat.pc*.25
|
||||
if int(s)==s and s>0 then
|
||||
P.gameEnv.drop=pc_drop[s]or 10
|
||||
P.gameEnv.lock=pc_lock[s]or 20
|
||||
@@ -94,11 +76,11 @@ return{
|
||||
getRank=function(P)
|
||||
local L=P.stat.pc
|
||||
return
|
||||
L>=50 and 5 or
|
||||
L>=40 and 4 or
|
||||
L>=30 and 3 or
|
||||
L>=100 and 5 or
|
||||
L>=70 and 4 or
|
||||
L>=40 and 3 or
|
||||
L>=20 and 2 or
|
||||
L>=10 and 1 or
|
||||
L>=1 and 0
|
||||
L>=2 and 0
|
||||
end,
|
||||
}
|
||||
@@ -1,50 +1,41 @@
|
||||
local rnd=math.random
|
||||
local ins=table.insert
|
||||
local PCbase=require("parts/PCbase")
|
||||
local PClist=require("parts/PClist")
|
||||
local PCtype={
|
||||
[0]=1,1,1,1,2,
|
||||
1,1,1,1,3,
|
||||
1,1,1,2,
|
||||
1,1,1,3,
|
||||
1,1,2,
|
||||
1,1,3,
|
||||
1,2,
|
||||
1,3,
|
||||
2,
|
||||
3,
|
||||
}
|
||||
local function task_PC(P)
|
||||
local _
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter==21 then
|
||||
local t=P.stat.pc%2
|
||||
local S=P.gameEnv.skin
|
||||
for i=1,4 do
|
||||
local r=freeRow.get(0)
|
||||
for j=1,10 do
|
||||
_=PCbase[4*t+i][j]
|
||||
r[j]=S[_]or 0
|
||||
end
|
||||
ins(P.field,1,r)
|
||||
ins(P.visTime,1,freeRow.get(20))
|
||||
end
|
||||
P.fieldBeneath=P.fieldBeneath+120
|
||||
P.curY=P.curY+4
|
||||
P:freshgho()
|
||||
if P.modeData.counter==26 then
|
||||
local base=PCbase[P.modeData.type]
|
||||
P:pushLine(base[rnd(#base)],P.modeData.symmetry)
|
||||
return true
|
||||
end
|
||||
end
|
||||
local function newPC(P)
|
||||
local r=P.field;r=r[#r]
|
||||
if r then
|
||||
local r=P.field
|
||||
if r[1]then
|
||||
r=r[#r]
|
||||
local c=0
|
||||
for i=1,10 do if r[i]>0 then c=c+1 end end
|
||||
if c<5 then
|
||||
P:lose()
|
||||
end
|
||||
if c<5 then P:lose()end
|
||||
end
|
||||
if P.stat.piece%4==0 and #P.field==0 then
|
||||
P.modeData.event=P.modeData.event==0 and 1 or 0
|
||||
local r=rnd(#PClist)
|
||||
local f=P.modeData.event==0
|
||||
for i=1,4 do
|
||||
local b=PClist[r][i]
|
||||
if f then
|
||||
if b<3 then b=3-b
|
||||
elseif b<5 then b=7-b
|
||||
end
|
||||
end
|
||||
P:getNext(b)
|
||||
end
|
||||
if #P.field==0 then
|
||||
local type=PCtype[P.stat.pc]or rnd(2,3)
|
||||
local L=PClist[type][rnd(#PClist[1])]
|
||||
local symmetry=rnd()>.5
|
||||
P.modeData.type=type
|
||||
P.modeData.symmetry=symmetry
|
||||
P:pushNext(L,symmetry)
|
||||
P.modeData.counter=P.stat.piece==0 and 20 or 0
|
||||
TASK.new(task_PC,P)
|
||||
end
|
||||
@@ -54,7 +45,7 @@ return{
|
||||
env={
|
||||
next=4,
|
||||
hold=false,
|
||||
drop=150,lock=150,
|
||||
drop=120,lock=180,
|
||||
fall=20,
|
||||
sequence="none",
|
||||
dropPiece=newPC,
|
||||
@@ -77,11 +68,11 @@ return{
|
||||
getRank=function(P)
|
||||
local L=P.stat.pc
|
||||
return
|
||||
L>=100 and 5 or
|
||||
L>=60 and 4 or
|
||||
L>=40 and 3 or
|
||||
L>=25 and 2 or
|
||||
L>=15 and 1 or
|
||||
L>=1 and 0
|
||||
L>=260 and 5 or
|
||||
L>=126 and 4 or
|
||||
L>=62 and 3 or
|
||||
L>=26 and 2 or
|
||||
L>=12 and 1 or
|
||||
L>=2 and 0
|
||||
end,
|
||||
}
|
||||
@@ -21,7 +21,7 @@ return{
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,5000))
|
||||
garbageSpeed=1e99
|
||||
game.garbageSpeed=1e99
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
end,
|
||||
|
||||
@@ -21,7 +21,7 @@ return{
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,10000))
|
||||
garbageSpeed=1e99
|
||||
game.garbageSpeed=1e99
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
end,
|
||||
@@ -32,10 +32,10 @@ return{
|
||||
if P.result=="WIN"then
|
||||
local T=P.stat.piece
|
||||
return
|
||||
T<=30 and 5 or
|
||||
T<=40 and 4 or
|
||||
T<=55 and 3 or
|
||||
T<=70 and 2 or
|
||||
T<=23 and 5 or
|
||||
T<=26 and 4 or
|
||||
T<=40 and 3 or
|
||||
T<=60 and 2 or
|
||||
1
|
||||
end
|
||||
end,
|
||||
|
||||
@@ -21,7 +21,7 @@ return{
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
newAIPlayer(2,965,360,.5,AITemplate("CC",10,2,true,12600))
|
||||
garbageSpeed=1e99
|
||||
game.garbageSpeed=1e99
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
end,
|
||||
@@ -32,10 +32,10 @@ return{
|
||||
if P.result=="WIN"then
|
||||
local T=P.stat.piece
|
||||
return
|
||||
T<=35 and 5 or
|
||||
T<=45 and 4 or
|
||||
T<=65 and 3 or
|
||||
T<=85 and 2 or
|
||||
T<=30 and 5 or
|
||||
T<=40 and 4 or
|
||||
T<=55 and 3 or
|
||||
T<=75 and 2 or
|
||||
1
|
||||
end
|
||||
end,
|
||||
|
||||
@@ -21,7 +21,7 @@ return{
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,16260))
|
||||
garbageSpeed=1e99
|
||||
game.garbageSpeed=1e99
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
end,
|
||||
@@ -32,10 +32,10 @@ return{
|
||||
if P.result=="WIN"then
|
||||
local T=P.stat.piece
|
||||
return
|
||||
T<=40 and 5 or
|
||||
T<=50 and 4 or
|
||||
T<=75 and 3 or
|
||||
T<=100 and 2 or
|
||||
T<=30 and 5 or
|
||||
T<=40 and 4 or
|
||||
T<=55 and 3 or
|
||||
T<=75 and 2 or
|
||||
1
|
||||
end
|
||||
end,
|
||||
|
||||
@@ -21,7 +21,7 @@ return{
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,26000))
|
||||
garbageSpeed=1e99
|
||||
game.garbageSpeed=1e99
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
end,
|
||||
@@ -32,10 +32,10 @@ return{
|
||||
if P.result=="WIN"then
|
||||
local T=P.stat.piece
|
||||
return
|
||||
T<=50 and 5 or
|
||||
T<=60 and 4 or
|
||||
T<=80 and 3 or
|
||||
T<=100 and 2 or
|
||||
T<=30 and 5 or
|
||||
T<=40 and 4 or
|
||||
T<=55 and 3 or
|
||||
T<=75 and 2 or
|
||||
1
|
||||
end
|
||||
end,
|
||||
|
||||
@@ -19,10 +19,10 @@ return{
|
||||
if P.result=="WIN"then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=15 and 5 or
|
||||
T<=20 and 5 or
|
||||
T<=25 and 4 or
|
||||
T<=40 and 3 or
|
||||
T<=80 and 2 or
|
||||
T<=35 and 3 or
|
||||
T<=60 and 2 or
|
||||
1
|
||||
end
|
||||
end,
|
||||
|
||||
@@ -19,10 +19,10 @@ return{
|
||||
if P.result=="WIN"then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=16 and 5 or
|
||||
T<=28 and 4 or
|
||||
T<=45 and 3 or
|
||||
T<=90 and 2 or
|
||||
T<=20 and 5 or
|
||||
T<=25 and 4 or
|
||||
T<=40 and 3 or
|
||||
T<=62 and 2 or
|
||||
1
|
||||
end
|
||||
end,
|
||||
|
||||
@@ -19,9 +19,9 @@ return{
|
||||
if P.result=="WIN"then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=17 and 5 or
|
||||
T<=26 and 4 or
|
||||
T<=45 and 3 or
|
||||
T<=20 and 5 or
|
||||
T<=25 and 4 or
|
||||
T<=35 and 3 or
|
||||
T<=60 and 2 or
|
||||
1
|
||||
end
|
||||
|
||||
@@ -19,10 +19,10 @@ return{
|
||||
if P.result=="WIN"then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=18 and 5 or
|
||||
T<=30 and 4 or
|
||||
T<=50 and 3 or
|
||||
T<=70 and 2 or
|
||||
T<=20 and 5 or
|
||||
T<=25 and 4 or
|
||||
T<=35 and 3 or
|
||||
T<=60 and 2 or
|
||||
1
|
||||
end
|
||||
end,
|
||||
|
||||
@@ -20,8 +20,8 @@ return{
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=20 and 5 or
|
||||
T<=30 and 4 or
|
||||
T<=45 and 3 or
|
||||
T<=25 and 4 or
|
||||
T<=35 and 3 or
|
||||
T<=60 and 2 or
|
||||
1
|
||||
end
|
||||
|
||||
44
modes/sprintPenta.lua
Normal file
44
modes/sprintPenta.lua
Normal file
@@ -0,0 +1,44 @@
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
return{
|
||||
color=color.green,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
sequence="bag",bag={8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25},
|
||||
target=40,dropPiece=player.reach_winCheck,
|
||||
bg="strap",bgm="race",
|
||||
},
|
||||
load=function()
|
||||
newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
local dx,dy=P.fieldOff.x,P.fieldOff.y
|
||||
setFont(55)
|
||||
local r=40-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,-81,265)
|
||||
if r<21 and r>0 then
|
||||
gc.setLineWidth(4)
|
||||
gc.setColor(1,r>10 and 0 or rnd(),.5)
|
||||
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
|
||||
end
|
||||
end,
|
||||
score=function(P)return{P.stat.time,P.stat.piece}end,
|
||||
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
|
||||
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local T=P.stat.row
|
||||
if T<5 then
|
||||
return
|
||||
elseif T<40 then
|
||||
return 0
|
||||
end
|
||||
T=P.stat.time
|
||||
return
|
||||
T<=76 and 5 or
|
||||
T<=90 and 4 or
|
||||
T<=150 and 3 or
|
||||
T<=260 and 2 or
|
||||
1
|
||||
end,
|
||||
}
|
||||
@@ -33,7 +33,7 @@ return{
|
||||
T<=90 and 4 or
|
||||
T<=130 and 3 or
|
||||
T<=200 and 2 or
|
||||
T<=270 and 1 or
|
||||
T<=360 and 1 or
|
||||
0
|
||||
end,
|
||||
}
|
||||
@@ -32,8 +32,8 @@ return{
|
||||
T<=626 and 5 or
|
||||
T<=1000 and 4 or
|
||||
T<=1400 and 3 or
|
||||
T<=2200 and 2 or
|
||||
T<=3000 and 1 or
|
||||
T<=2260 and 2 or
|
||||
T<=3260 and 1 or
|
||||
0
|
||||
end,
|
||||
}
|
||||
@@ -31,8 +31,8 @@ return{
|
||||
return
|
||||
T<=13 and 5 or
|
||||
T<=18 and 4 or
|
||||
T<=45 and 3 or
|
||||
T<=80 and 2 or
|
||||
T<=32.6 and 3 or
|
||||
T<=62.6 and 2 or
|
||||
T<=126 and 1 or
|
||||
0
|
||||
end,
|
||||
|
||||
@@ -31,8 +31,8 @@ return{
|
||||
return
|
||||
T<=26 and 5 or
|
||||
T<=32.6 and 4 or
|
||||
T<=40 and 3 or
|
||||
T<=62 and 2 or
|
||||
T<=52.6 and 3 or
|
||||
T<=92.9 and 2 or
|
||||
T<=183 and 1 or
|
||||
0
|
||||
end,
|
||||
|
||||
@@ -30,10 +30,10 @@ return{
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=255 and 5 or
|
||||
T<=330 and 4 or
|
||||
T<=420 and 3 or
|
||||
T<=326 and 4 or
|
||||
T<=462 and 3 or
|
||||
T<=626 and 2 or
|
||||
T<=1000 and 1 or
|
||||
T<=1260 and 1 or
|
||||
0
|
||||
end,
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
local format=string.format
|
||||
local function tech_check_ultimate(P)
|
||||
local function tech_check_hard(P)
|
||||
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
|
||||
P:lose()
|
||||
end
|
||||
@@ -11,7 +11,7 @@ return{
|
||||
drop=30,lock=60,
|
||||
freshLimit=15,
|
||||
target=200,
|
||||
dropPiece=tech_check_ultimate,
|
||||
dropPiece=tech_check_hard,
|
||||
bg="matrix",bgm="secret8th",
|
||||
},
|
||||
load=function()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
local format=string.format
|
||||
local function tech_check_ultimate(P)
|
||||
local function tech_check_hard(P)
|
||||
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
|
||||
P:lose()
|
||||
end
|
||||
@@ -11,7 +11,7 @@ return{
|
||||
_20G=true,lock=60,
|
||||
freshLimit=15,
|
||||
target=200,
|
||||
dropPiece=tech_check_ultimate,
|
||||
dropPiece=tech_check_hard,
|
||||
bg="matrix",bgm="secret7th",
|
||||
},
|
||||
load=function()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
local format=string.format
|
||||
local function tech_check_hard(P)
|
||||
if #P.clearedRow>0 and P.lastClear<10 then
|
||||
local function tech_check_easy(P)
|
||||
if #P.clearedRow>0 and P.b2b<40 then
|
||||
P:lose()
|
||||
end
|
||||
end
|
||||
@@ -11,7 +11,7 @@ return{
|
||||
_20G=true,lock=60,
|
||||
freshLimit=15,
|
||||
target=200,
|
||||
dropPiece=tech_check_hard,
|
||||
dropPiece=tech_check_easy,
|
||||
bg="matrix",bgm="secret7th",
|
||||
},
|
||||
load=function()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
local format=string.format
|
||||
local function tech_check_ultimate(P)
|
||||
local function tech_check_hard(P)
|
||||
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
|
||||
P:lose()
|
||||
end
|
||||
@@ -11,7 +11,7 @@ return{
|
||||
oncehold=false,
|
||||
drop=1e99,lock=1e99,
|
||||
target=200,
|
||||
dropPiece=tech_check_ultimate,
|
||||
dropPiece=tech_check_hard,
|
||||
bg="matrix",bgm="newera",
|
||||
},
|
||||
load=function()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
local format=string.format
|
||||
local function tech_check_ultimate(P)
|
||||
local function tech_check_hard(P)
|
||||
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
|
||||
P:lose()
|
||||
end
|
||||
@@ -13,7 +13,7 @@ return{
|
||||
freshLimit=15,
|
||||
target=200,
|
||||
fineKill=true,
|
||||
dropPiece=tech_check_ultimate,
|
||||
dropPiece=tech_check_hard,
|
||||
bg="flink",bgm="infinite",
|
||||
},
|
||||
slowMark=true,
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
local format=string.format
|
||||
local function tech_check_hard(P)
|
||||
if #P.clearedRow>0 and P.lastClear<10 then
|
||||
P:lose()
|
||||
end
|
||||
end
|
||||
|
||||
return{
|
||||
color=color.lightYellow,
|
||||
@@ -13,7 +8,6 @@ return{
|
||||
freshLimit=15,
|
||||
target=200,
|
||||
fineKill=true,
|
||||
dropPiece=tech_check_hard,
|
||||
bg="flink",bgm="infinite",
|
||||
},
|
||||
slowMark=true,
|
||||
|
||||
64
paint.lua
64
paint.lua
@@ -17,7 +17,7 @@ local modeRankColor={
|
||||
color.purple, --Special
|
||||
}
|
||||
local rankString={
|
||||
"C","B","A","S","SS",
|
||||
"D","C","B","A","S",
|
||||
}
|
||||
local miniTitle_rect={
|
||||
{2,0,5,1},{4,1,1,6},
|
||||
@@ -70,13 +70,13 @@ local function drawVirtualkey()
|
||||
local B=V[i]
|
||||
gc.setColor(1,1,1,a)
|
||||
gc.setLineWidth(B.r*.07)
|
||||
gc.circle("line",B.x,B.y,B.r)--Button outline
|
||||
gc.circle("line",B.x,B.y,B.r,10)--Button outline
|
||||
_=V[i].pressTime
|
||||
gc.draw(VKIcon[i],B.x,B.y,nil,B.r*.026+_*.08,nil,18,18)--icon
|
||||
if _>0 then
|
||||
gc.setColor(1,1,1,a*_*.08)
|
||||
gc.circle("fill",B.x,B.y,B.r*.94)--Glow
|
||||
gc.circle("line",B.x,B.y,B.r*(1.4-_*.04))--Ripple
|
||||
gc.circle("fill",B.x,B.y,B.r*.94,10)--Glow
|
||||
gc.circle("line",B.x,B.y,B.r*(1.4-_*.04),10)--Ripple
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -86,12 +86,12 @@ local function drawVirtualkey()
|
||||
local B=V[i]
|
||||
gc.setColor(1,1,1,a)
|
||||
gc.setLineWidth(B.r*.07)
|
||||
gc.circle("line",B.x,B.y,B.r)
|
||||
gc.circle("line",B.x,B.y,B.r,10)
|
||||
_=V[i].pressTime
|
||||
if _>0 then
|
||||
gc.setColor(1,1,1,a*_*.08)
|
||||
gc.circle("fill",B.x,B.y,B.r*.94)
|
||||
gc.circle("line",B.x,B.y,B.r*(1.4-_*.04))
|
||||
gc.circle("fill",B.x,B.y,B.r*.94,10)
|
||||
gc.circle("line",B.x,B.y,B.r*(1.4-_*.04),10)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -278,8 +278,8 @@ function Pnt.music()
|
||||
gc.draw(drawableText.musicRoom,22,23)
|
||||
gc.draw(drawableText.nowPlaying,490,390)
|
||||
setFont(30)
|
||||
for i=1,#musicID do
|
||||
gc.print(musicID[i],50,90+30*i)
|
||||
for i=1,BGM.len do
|
||||
gc.print(BGM.list[i],50,90+30*i)
|
||||
end
|
||||
gc.draw(IMG.titleImage,640,310,nil,1.5,nil,206,35)
|
||||
if BGM.nowPlay then
|
||||
@@ -338,7 +338,7 @@ function Pnt.draw()
|
||||
local pen=sceneTemp.pen
|
||||
if pen>0 then
|
||||
gc.setLineWidth(13)
|
||||
gc.setColor(skin.libColor[pen])
|
||||
gc.setColor(SKIN.libColor[pen])
|
||||
gc.rectangle("line",565,460,70,70)
|
||||
elseif pen==-1 then
|
||||
gc.setLineWidth(5)
|
||||
@@ -354,7 +354,7 @@ function Pnt.draw()
|
||||
local _
|
||||
for i=1,7 do
|
||||
_=setting.skin[i]
|
||||
gc.setColor(skin.libColor[_])
|
||||
gc.setColor(SKIN.libColor[_])
|
||||
mStr(text.block[i],500+65*_,65)
|
||||
end
|
||||
end
|
||||
@@ -431,10 +431,10 @@ local dataPos={90,143,-90,143,-200,-13,-90,-169,90,-169,200,-13}
|
||||
function Pnt.pause()
|
||||
local S=sceneTemp
|
||||
local T=S.timer*.02
|
||||
if T<1 or gameResult then Pnt.play()end
|
||||
if T<1 or game.result then Pnt.play()end
|
||||
--Dark BG
|
||||
local _=T
|
||||
if gameResult then _=_*.6 end
|
||||
if game.result then _=_*.7 end
|
||||
gc.setColor(.15,.15,.15,_)
|
||||
gc.push("transform")
|
||||
gc.origin()
|
||||
@@ -443,9 +443,9 @@ function Pnt.pause()
|
||||
|
||||
--Pause Info
|
||||
setFont(25)
|
||||
if pauseCount>0 then
|
||||
if game.pauseCount>0 then
|
||||
gc.setColor(1,.4,.4,T)
|
||||
gc.print(text.pauseCount..":["..pauseCount.."] "..format("%.2f",pauseTime).."s",70,100)
|
||||
gc.print(text.pauseCount..":["..game.pauseCount.."] "..format("%.2f",game.pauseTime).."s",70,100)
|
||||
end
|
||||
|
||||
gc.setColor(1,1,1,T)
|
||||
@@ -457,7 +457,7 @@ function Pnt.pause()
|
||||
|
||||
--Result Text
|
||||
setFont(35)
|
||||
mText(gameResult and drawableText[gameResult]or drawableText.pause,640,50-10*(5-sceneTemp.timer*.1)^1.5)
|
||||
mText(game.result and drawableText[game.result]or drawableText.pause,640,50-10*(5-sceneTemp.timer*.1)^1.5)
|
||||
|
||||
--Infos
|
||||
if frame>180 then
|
||||
@@ -515,9 +515,9 @@ function Pnt.setting_game()
|
||||
mText(drawableText.setting_game,640,15)
|
||||
gc.draw(blockSkin[int(Timer()*2)%11+1],720,540,Timer()%6.28319,2,nil,15,15)
|
||||
end
|
||||
function Pnt.setting_graphic()
|
||||
function Pnt.setting_video()
|
||||
gc.setColor(1,1,1)
|
||||
mText(drawableText.setting_graphic,640,15)
|
||||
mText(drawableText.setting_video,640,15)
|
||||
end
|
||||
function Pnt.setting_sound()
|
||||
gc.setColor(1,1,1,.8)
|
||||
@@ -598,16 +598,16 @@ function Pnt.setting_key()
|
||||
|
||||
gc.setColor(1,1,1)
|
||||
setFont(26)
|
||||
local board=s.board
|
||||
local b1,b2=keyMap[s.board],keyMap[s.board+2]
|
||||
for N=1,20 do
|
||||
if N<11 then
|
||||
gc.printf(text.acts[N],47,45*N+22,180,"right")
|
||||
mStr(keyMap[board][N],340,45*N+22)
|
||||
mStr(keyMap[board+8][N],540,45*N+22)
|
||||
mStr(b1[N],340,45*N+22)
|
||||
mStr(b2[N],540,45*N+22)
|
||||
else
|
||||
gc.printf(text.acts[N],647,45*N-428,180,"right")
|
||||
mStr(keyMap[board][N],940,45*N-428)
|
||||
mStr(keyMap[board+8][N],1040,45*N-428)
|
||||
mStr(b1[N],940,45*N-428)
|
||||
mStr(b2[N],1040,45*N-428)
|
||||
end
|
||||
end
|
||||
gc.setLineWidth(2)
|
||||
@@ -618,9 +618,7 @@ function Pnt.setting_key()
|
||||
gc.line(40,y,1240,y)
|
||||
end
|
||||
setFont(35)
|
||||
gc.print("Player:",170,590)
|
||||
gc.print(int(board*.5+.5),300,590)
|
||||
gc.print(board.."/8",580,590)
|
||||
gc.print(text.page..s.board,280,590)
|
||||
gc.draw(drawableText.ctrlSetHelp,50,650)
|
||||
end
|
||||
function Pnt.setting_skin()
|
||||
@@ -673,7 +671,7 @@ function Pnt.help()
|
||||
end
|
||||
setFont(19)
|
||||
gc.print(text.used,30,330)
|
||||
gc.draw(IMG.titleImage,280,610,.1,1+.05*sin(Timer()*2),nil,206,35)
|
||||
gc.draw(IMG.titleImage,280,610,.1,1+.05*sin(Timer()*2.6),nil,206,35)
|
||||
gc.setLineWidth(3)
|
||||
gc.rectangle("line",18,18,263,263)
|
||||
gc.rectangle("line",1012,18,250,250)
|
||||
@@ -681,15 +679,15 @@ function Pnt.help()
|
||||
gc.draw(IMG.pay2,1014,20)
|
||||
setFont(20)
|
||||
mStr(text.group,640,490)
|
||||
gc.setColor(1,1,1,sin(Timer()*10)*.4+.6)
|
||||
gc.setColor(1,1,1,sin(Timer()*20)*.3+.6)
|
||||
setFont(30)
|
||||
gc.print(text.support,150,283+20,sin(Timer()*2.6)*.02,nil,nil,115,20)
|
||||
gc.print(text.support,1138,270+20,sin(Timer()*2.83)*.02,nil,nil,115,20)
|
||||
mStr(text.support,150+sin(Timer()*4)*20,283)
|
||||
mStr(text.support,1138-sin(Timer()*4)*20,270)
|
||||
end
|
||||
function Pnt.stat()
|
||||
local chart=sceneTemp.chart
|
||||
setFont(24)
|
||||
local _,__=skin.libColor,setting.skin
|
||||
local _,__=SKIN.libColor,setting.skin
|
||||
local A,B=chart.A1,chart.A2
|
||||
for x=1,7 do
|
||||
gc.setColor(_[__[x]])
|
||||
@@ -737,8 +735,6 @@ function Pnt.history()
|
||||
gc.rectangle("line",30,45,1000,632)
|
||||
setFont(20)
|
||||
local _=sceneTemp
|
||||
for i=0,min(22,#_[1]-_[2])do
|
||||
gc.print(_[1][_[2]+i],40,50+27*(i))
|
||||
end
|
||||
gc.print(_[1][_[2]],40,50)
|
||||
end
|
||||
return Pnt
|
||||
@@ -1,10 +1,68 @@
|
||||
return{
|
||||
{3,3,3,0,0,0,0,0,2,2},
|
||||
{3,6,6,0,0,0,0,2,2,5},
|
||||
{4,6,6,0,0,0,1,1,5,5},
|
||||
{4,4,4,0,0,0,0,1,1,5},
|
||||
{1,1,0,0,0,0,0,4,4,4},
|
||||
{5,1,1,0,0,0,0,6,6,4},
|
||||
{5,5,2,2,0,0,0,6,6,3},
|
||||
{5,2,2,0,0,0,0,3,3,3},
|
||||
{
|
||||
{
|
||||
{4,4,4,3,3,3,7,0,0,0},
|
||||
{4,1,6,6,2,3,7,0,0,0},
|
||||
{1,1,6,6,2,2,7,0,0,0},
|
||||
{1,7,7,7,7,2,7,0,0,0},
|
||||
},
|
||||
{
|
||||
{4,4,4,3,3,3,0,0,0,7},
|
||||
{4,1,6,6,2,3,0,0,0,7},
|
||||
{1,1,6,6,2,2,0,0,0,7},
|
||||
{1,7,7,7,7,2,0,0,0,7},
|
||||
},
|
||||
{
|
||||
{2,7,7,7,7,1,7,0,0,0},
|
||||
{2,2,6,6,1,1,7,0,0,0},
|
||||
{3,2,6,6,1,4,7,0,0,0},
|
||||
{3,3,3,4,4,4,7,0,0,0},
|
||||
},
|
||||
{
|
||||
{2,7,7,7,7,1,0,0,0,7},
|
||||
{2,2,6,6,1,1,0,0,0,7},
|
||||
{3,2,6,6,1,4,0,0,0,7},
|
||||
{3,3,3,4,4,4,0,0,0,7},
|
||||
},
|
||||
},--3*4 shape
|
||||
{
|
||||
{
|
||||
{1,1,0,0,0,0,0,3,3,3},
|
||||
{5,1,1,0,0,0,0,6,6,3},
|
||||
{5,5,2,2,0,0,0,6,6,4},
|
||||
{5,2,2,0,0,0,0,4,4,4},
|
||||
},
|
||||
{
|
||||
{1,1,0,0,0,0,0,4,4,4},
|
||||
{5,1,1,0,0,0,0,4,6,6},
|
||||
{5,5,2,2,0,0,0,3,6,6},
|
||||
{5,2,2,0,0,0,0,3,3,3},
|
||||
},
|
||||
{
|
||||
{3,3,3,1,1,0,0,0,0,0},
|
||||
{6,6,3,5,1,1,0,0,0,0},
|
||||
{6,6,4,5,5,2,2,0,0,0},
|
||||
{4,4,4,5,2,2,0,0,0,0},
|
||||
},
|
||||
{
|
||||
{4,4,4,1,1,0,0,0,0,0},
|
||||
{4,6,6,5,1,1,0,0,0,0},
|
||||
{3,6,6,5,5,2,2,0,0,0},
|
||||
{3,3,3,5,2,2,0,0,0,0},
|
||||
},
|
||||
},--7 piece opener(right>)(without i)
|
||||
{
|
||||
{
|
||||
{4,4,4,3,3,3,0,0,0,0},
|
||||
{4,1,6,6,2,3,0,0,0,0},
|
||||
{1,1,6,6,2,2,0,0,0,0},
|
||||
{1,7,7,7,7,2,0,0,0,0},
|
||||
},
|
||||
{
|
||||
{2,7,7,7,7,1,0,0,0,0},
|
||||
{2,2,6,6,1,1,0,0,0,0},
|
||||
{3,2,6,6,1,4,0,0,0,0},
|
||||
{3,3,3,4,4,4,0,0,0,0},
|
||||
},
|
||||
},--6 piece opener
|
||||
}
|
||||
@@ -1,11 +1,77 @@
|
||||
return{
|
||||
{7,7,4,5},{7,7,6,4},{7,7,2,4},{7,7,1,3},{7,7,5,6},{7,7,5,2},{7,7,5,4},{7,7,5,3},
|
||||
{7,4,1,2},{7,3,5,7},{7,5,4,3},{7,5,1,2},{7,1,4,2},{7,4,2,5},{7,6,4,5},{7,5,4,2},
|
||||
{7,5,6,4},{7,5,3,6},{7,2,5,6},{7,2,6,4},{7,2,1,3},{7,5,2,7},{7,5,7,2},{7,5,2,3},
|
||||
{7,5,3,2},{7,6,5,4},{7,3,1,5},{7,3,2,5},{7,4,1,5},{7,4,5,2},{7,7,3,6},{7,3,7,6},
|
||||
{7,3,6,2},{7,3,7,1},{7,6,4,2},{3,2,7,6},{3,2,6,7},{7,7,4,5},{7,5,3,4},{7,3,6,5},
|
||||
{7,3,2,5},{7,4,6,5},{7,5,2,3},{7,3,5,7},{7,3,2,5},{7,3,5,1},{7,5,2,3},{3,6,2,5},
|
||||
{3,1,2,5},{3,1,1,5},{3,1,5,2},{3,1,5,1},{3,5,1,2},{4,5,3,2},{4,2,6,5},{6,5,3,2},
|
||||
{1,4,2,5},{1,5,3,6},{5,2,6,3},{5,2,1,3},{5,2,7,4},{2,4,1,5},{2,4,5,1},{2,1,4,5},
|
||||
{2,5,4,3},{2,5,6,7},{7,5,4,2},{4,5,3,5},
|
||||
{
|
||||
{1,3,3},{1,3,4},{1,5,3},{3,1,3},{3,1,4},{3,2,4},{3,3,2},{3,3,5},{3,3,6},{3,3,7},
|
||||
{3,4,1},{3,4,5},{3,4,6},{3,5,3},{3,5,4},{3,5,5},{3,6,3},{3,6,4},{3,7,3},{3,7,4},
|
||||
{5,3,4},{5,3,5},{5,5,1},{5,5,3},{5,7,3},{6,3,3},{6,3,4},{6,6,7},{6,7,6},{7,3,3},
|
||||
{7,3,4},{7,5,3},{7,6,6},{7,7,7},
|
||||
},--3*4 shape
|
||||
{
|
||||
{5,3,4,4},{5,3,7,7},{5,7,4,4},{4,2,4,4},{3,5,4,4},{3,4,5,4},{3,3,7,4},{7,5,4,4},{1,5,1,1},{1,5,5,5},
|
||||
{1,5,7,4},{1,2,4,5},{1,4,5,5},{1,4,5,2},{1,4,2,5},{1,4,4,4},{5,1,4,5},{5,5,4,1},{5,5,4,2},{5,5,4,4},
|
||||
{5,4,5,4},{5,4,4,5},{5,4,4,3},{5,7,4,6},{5,7,4,3},{2,5,4,4},{6,4,4,4},{6,7,4,6},{4,1,2,5},{4,1,4,4},
|
||||
{4,5,4,5},{4,5,7,7},{4,6,4,4},{4,4,6,4},{4,4,3,5},{4,4,3,6},{4,3,4,5},{4,3,4,6},{4,7,3,4},{4,7,7,5},
|
||||
{3,1,4,4},{3,1,4,3},{3,1,3,4},{3,5,5,4},{3,5,4,5},{3,5,7,7},{3,2,5,2},{3,2,4,4},{3,6,4,4},{3,6,3,3},
|
||||
{3,4,1,3},{3,4,4,5},{3,4,4,6},{3,4,3,7},{3,3,6,3},{3,7,5,7},{3,7,4,3},{3,7,3,4},{7,5,4,6},{7,5,4,3},
|
||||
{7,5,3,4},{7,5,7,1},{7,6,4,6},{7,4,1,5},{7,4,5,6},{7,4,3,4},{7,4,7,5},{7,3,1,5},{7,3,5,7},{7,3,4,4},
|
||||
{7,3,3,4},{7,3,7,5},{7,7,4,5},{7,7,7,4},{1,1,5,2},{1,1,7,4},{1,5,1,2},{1,5,1,3},{1,5,5,2},{1,5,2,1},
|
||||
{1,5,2,3},{1,5,6,3},{1,5,6,7},{1,5,4,1},{1,5,4,5},{1,5,4,2},{1,5,4,3},{1,5,4,7},{1,5,3,1},{1,5,3,4},
|
||||
{1,5,7,2},{1,5,7,6},{1,5,7,7},{1,2,5,1},{1,2,5,4},{1,2,7,4},{1,4,1,5},{1,4,5,1},{1,4,5,4},{1,4,6,5},
|
||||
{1,4,4,3},{1,4,3,3},{1,3,1,2},{1,3,5,2},{1,3,4,4},{1,3,4,3},{1,3,3,4},{1,7,1,4},{1,7,5,6},{1,7,5,4},
|
||||
{1,7,5,3},{1,7,5,7},{1,7,2,3},{1,7,6,4},{1,7,4,1},{1,7,4,5},{1,7,4,7},{1,7,3,1},{1,7,7,4},{5,1,5,5},
|
||||
{5,1,5,2},{5,1,5,4},{5,1,2,3},{5,1,6,3},{5,1,4,1},{5,1,4,2},{5,1,4,7},{5,1,7,2},{5,1,7,4},{5,5,1,5},
|
||||
{5,5,1,2},{5,5,1,4},{5,5,5,1},{5,5,5,2},{5,5,5,4},{5,5,5,7},{5,5,2,1},{5,5,2,5},{5,5,6,7},{5,5,4,5},
|
||||
{5,5,4,3},{5,5,3,1},{5,5,3,4},{5,5,7,5},{5,5,7,6},{5,2,1,3},{5,2,5,4},{5,2,4,5},{5,2,3,1},{5,2,3,6},
|
||||
{5,2,7,1},{5,6,1,3},{5,6,5,7},{5,6,6,1},{5,4,1,5},{5,4,1,7},{5,4,5,1},{5,4,5,5},{5,4,5,2},{5,4,5,3},
|
||||
{5,4,2,5},{5,4,4,1},{5,4,4,4},{5,4,3,1},{5,4,3,5},{5,4,3,4},{5,4,7,1},{5,3,5,4},{5,3,5,3},{5,3,2,2},
|
||||
{5,3,6,6},{5,3,4,1},{5,3,4,5},{5,3,4,3},{5,3,3,1},{5,3,3,4},{5,3,3,3},{5,7,1,2},{5,7,1,4},{5,7,1,3},
|
||||
{5,7,5,5},{5,7,5,7},{5,7,2,1},{5,7,6,4},{5,7,6,7},{5,7,4,1},{5,7,4,2},{5,7,4,7},{5,7,3,1},{5,7,3,2},
|
||||
{5,7,3,6},{5,7,3,4},{5,7,3,7},{5,7,7,1},{5,7,7,6},{5,7,7,4},{5,7,7,3},{2,1,5,1},{2,1,4,5},{2,1,7,4},
|
||||
{2,5,1,1},{2,5,4,5},{2,5,3,6},{2,4,1,5},{2,4,4,4},{2,4,4,3},{2,3,5,6},{2,7,1,4},{2,7,5,5},{2,7,4,1},
|
||||
{2,7,3,7},{2,7,7,3},{6,5,6,1},{6,5,3,1},{6,6,5,1},{6,6,4,5},{6,6,7,4},{6,4,6,5},{6,4,7,5},{6,3,4,3},
|
||||
{6,3,3,4},{6,7,6,4},{6,7,4,1},{6,7,4,5},{6,7,4,7},{6,7,7,4},{4,1,1,5},{4,1,5,1},{4,1,5,5},{4,1,5,2},
|
||||
{4,1,5,7},{4,1,6,5},{4,1,4,3},{4,1,3,4},{4,1,3,3},{4,1,7,5},{4,5,5,4},{4,5,4,1},{4,5,4,4},{4,5,4,3},
|
||||
{4,5,3,1},{4,5,3,5},{4,2,1,5},{4,2,4,3},{4,2,3,4},{4,6,6,5},{4,6,4,3},{4,6,3,4},{4,4,1,4},{4,4,1,3},
|
||||
{4,4,5,1},{4,4,5,4},{4,4,5,3},{4,4,2,4},{4,4,4,1},{4,4,4,5},{4,4,4,6},{4,4,7,4},{4,4,7,3},{4,3,6,4},
|
||||
{4,3,4,7},{4,3,3,5},{4,3,7,4},{4,7,1,5},{4,7,5,6},{4,7,5,7},{4,7,2,1},{4,7,2,5},{4,7,6,5},{4,7,4,4},
|
||||
{4,7,4,3},{3,1,1,2},{3,1,5,1},{3,1,5,2},{3,1,2,1},{3,1,6,5},{3,1,6,7},{3,1,7,6},{3,5,1,2},{3,5,5,1},
|
||||
{3,5,5,6},{3,5,5,3},{3,5,2,1},{3,5,2,2},{3,5,6,5},{3,5,6,6},{3,5,4,1},{3,5,4,3},{3,5,3,1},{3,5,3,5},
|
||||
{3,5,3,4},{3,5,3,3},{3,2,1,5},{3,2,5,1},{3,2,2,5},{3,6,1,5},{3,6,1,7},{3,6,5,5},{3,6,5,6},{3,6,6,5},
|
||||
{3,6,4,3},{3,6,3,4},{3,4,5,3},{3,4,2,4},{3,4,6,4},{3,4,6,3},{3,4,3,1},{3,4,3,5},{3,4,3,2},{3,4,3,6},
|
||||
{3,4,7,3},{3,3,1,4},{3,3,5,1},{3,3,5,4},{3,3,5,3},{3,3,6,4},{3,3,4,1},{3,3,4,5},{3,3,4,2},{3,3,4,6},
|
||||
{3,3,4,7},{3,3,3,1},{3,3,3,5},{3,3,3,6},{3,7,1,5},{3,7,5,1},{3,7,5,2},{3,7,2,5},{3,7,6,5},{3,7,7,5},
|
||||
{7,1,1,4},{7,1,5,6},{7,1,5,4},{7,1,5,3},{7,1,5,7},{7,1,2,3},{7,1,6,4},{7,1,4,1},{7,1,4,5},{7,1,4,7},
|
||||
{7,1,3,1},{7,1,7,4},{7,5,1,2},{7,5,1,6},{7,5,1,4},{7,5,1,3},{7,5,1,7},{7,5,5,5},{7,5,5,7},{7,5,2,1},
|
||||
{7,5,6,4},{7,5,6,7},{7,5,4,1},{7,5,4,2},{7,5,4,7},{7,5,3,1},{7,5,3,2},{7,5,3,6},{7,5,3,7},{7,5,7,6},
|
||||
{7,5,7,4},{7,5,7,3},{7,2,1,4},{7,2,1,3},{7,2,5,5},{7,2,4,1},{7,2,3,7},{7,2,7,3},{7,6,1,4},{7,6,5,4},
|
||||
{7,6,6,4},{7,6,4,1},{7,6,4,5},{7,6,4,7},{7,6,7,4},{7,4,5,1},{7,4,5,2},{7,4,5,7},{7,4,2,1},{7,4,2,5},
|
||||
{7,4,6,5},{7,4,4,4},{7,4,4,3},{7,3,5,1},{7,3,5,2},{7,3,5,6},{7,3,5,4},{7,3,2,5},{7,3,2,7},{7,3,6,1},
|
||||
{7,3,6,5},{7,3,4,3},{7,3,7,2},{7,3,7,6},{7,7,1,4},{7,7,5,1},{7,7,5,6},{7,7,5,4},{7,7,5,3},{7,7,2,3},
|
||||
{7,7,6,4},{7,7,6,3},{7,7,4,7},{7,7,3,6},
|
||||
},--7 piece opener (right>)
|
||||
{
|
||||
{1,1,3,4},{1,1,4,3},{1,2,5,3},{1,2,5,4},{1,3,4,7},{1,3,5,5},{1,3,7,3},{1,3,7,4},{1,4,1,4},{1,4,4,6},
|
||||
{1,5,2,3},{1,5,3,2},{1,5,3,5},{1,5,4,7},{1,5,5,2},{1,5,5,4},{1,5,5,5},{1,5,7,3},{1,5,7,4},{1,6,3,3},
|
||||
{1,6,5,3},{1,7,3,3},{1,7,3,4},{1,7,5,3},{1,7,5,4},{3,1,3,7},{3,1,4,7},{3,1,5,5},{3,1,6,3},{3,1,7,3},
|
||||
{3,1,7,4},{3,2,2,3},{3,2,3,2},{3,2,3,6},{3,2,4,5},{3,2,4,7},{3,2,5,5},{3,2,6,3},{3,2,6,4},{3,2,7,4},
|
||||
{3,3,1,5},{3,3,2,6},{3,3,2,7},{3,3,3,3},{3,3,3,4},{3,3,4,3},{3,3,4,4},{3,3,5,3},{3,3,5,4},{3,3,6,1},
|
||||
{3,3,6,6},{3,3,6,7},{3,3,7,2},{3,3,7,5},{3,3,7,6},{3,3,7,7},{3,4,1,2},{3,4,1,5},{3,4,1,7},{3,4,2,1},
|
||||
{3,4,2,5},{3,4,2,7},{3,4,3,3},{3,4,3,4},{3,4,4,3},{3,4,4,4},{3,4,5,3},{3,4,5,4},{3,4,5,7},{3,4,6,1},
|
||||
{3,4,6,2},{3,4,6,7},{3,4,7,1},{3,4,7,2},{3,4,7,5},{3,4,7,6},{3,5,1,2},{3,5,2,3},{3,5,2,5},{3,5,3,2},
|
||||
{3,5,3,3},{3,5,3,4},{3,5,4,3},{3,5,4,6},{3,5,4,7},{3,5,5,5},{3,5,5,7},{3,5,6,4},{3,5,7,3},{3,5,7,4},
|
||||
{3,5,7,5},{3,6,1,3},{3,6,2,3},{3,6,2,4},{3,6,3,1},{3,6,3,5},{3,6,3,6},{3,6,3,7},{3,6,4,2},{3,6,4,7},
|
||||
{3,6,5,4},{3,6,6,3},{3,6,6,4},{3,6,7,3},{3,6,7,4},{3,7,1,3},{3,7,1,4},{3,7,2,4},{3,7,3,2},{3,7,3,5},
|
||||
{3,7,3,6},{3,7,3,7},{3,7,4,1},{3,7,4,2},{3,7,4,5},{3,7,4,6},{3,7,5,3},{3,7,5,4},{3,7,5,5},{3,7,6,3},
|
||||
{3,7,6,4},{3,7,7,3},{3,7,7,4},{5,1,2,3},{5,1,3,2},{5,1,3,4},{5,1,4,1},{5,1,4,7},{5,1,5,4},{5,1,5,5},
|
||||
{5,1,7,4},{5,3,1,2},{5,3,1,4},{5,3,2,5},{5,3,3,3},{5,3,3,4},{5,3,3,6},{5,3,4,3},{5,3,5,2},{5,3,5,4},
|
||||
{5,3,5,5},{5,3,5,7},{5,3,7,4},{5,3,7,5},{5,5,1,2},{5,5,1,4},{5,5,3,2},{5,5,3,3},{5,5,3,4},{5,5,3,5},
|
||||
{5,5,3,7},{5,5,5,1},{5,5,5,5},{5,5,6,3},{5,5,6,7},{5,5,7,1},{5,5,7,3},{5,5,7,6},{5,6,3,5},{5,6,3,6},
|
||||
{5,6,3,7},{5,6,5,3},{5,6,6,3},{5,6,7,3},{5,7,1,4},{5,7,3,4},{5,7,3,5},{5,7,5,1},{5,7,5,3},{5,7,5,6},
|
||||
{5,7,6,3},{5,7,7,3},{6,1,3,3},{6,3,3,5},{6,3,3,6},{6,3,3,7},{6,3,4,7},{6,3,6,3},{6,3,6,4},{6,3,7,3},
|
||||
{6,3,7,4},{6,5,3,5},{6,5,3,6},{6,5,3,7},{6,5,6,3},{6,5,7,3},{6,6,3,3},{6,6,3,4},{6,6,5,3},{6,6,6,6},
|
||||
{6,6,7,7},{6,7,3,3},{6,7,3,4},{6,7,5,3},{6,7,6,7},{6,7,7,6},{7,1,3,3},{7,1,3,4},{7,1,5,3},{7,1,5,4},
|
||||
{7,3,1,3},{7,3,1,4},{7,3,2,4},{7,3,3,2},{7,3,3,5},{7,3,3,6},{7,3,3,7},{7,3,4,1},{7,3,4,2},{7,3,4,5},
|
||||
{7,3,4,6},{7,3,5,3},{7,3,5,4},{7,3,5,5},{7,3,6,3},{7,3,6,4},{7,3,7,3},{7,3,7,4},{7,5,1,4},{7,5,3,4},
|
||||
{7,5,3,5},{7,5,5,1},{7,5,5,3},{7,5,5,6},{7,5,6,3},{7,5,7,3},{7,6,3,3},{7,6,3,4},{7,6,5,3},{7,6,6,7},
|
||||
{7,6,7,6},{7,7,3,3},{7,7,3,4},{7,7,5,3},{7,7,6,6},{7,7,7,7},
|
||||
},--6 piece opener
|
||||
}
|
||||
112
parts/ai.lua
112
parts/ai.lua
@@ -19,65 +19,65 @@ local blockPos={4,4,4,4,4,5,4}
|
||||
local scs={{1,2},{1,2},{1,2},{1,2},{1,2},{1.5,1.5},{0.5,2.5}}
|
||||
-------------------------------------------------Cold clear
|
||||
local CCblockID={4,3,5,6,1,2,0}
|
||||
if system~="Windows"then goto SKIP end
|
||||
require("CCloader")
|
||||
BOT={
|
||||
getConf= cc.get_default_config ,--()options,weights
|
||||
--setConf= cc.set_options ,--(options,hold,20g,bag7)
|
||||
if system=="Windows"then
|
||||
require("CCloader")
|
||||
BOT={
|
||||
getConf= cc.get_default_config ,--()options,weights
|
||||
--setConf= cc.set_options ,--(options,hold,20g,bag7)
|
||||
|
||||
new= cc.launch_async ,--(options,weights)bot
|
||||
addNext= cc.add_next_piece_async ,--(bot,piece)
|
||||
update= cc.reset_async ,--(bot,field,b2b,combo)
|
||||
think= cc.request_next_move ,--(bot)
|
||||
getMove= cc.poll_next_move ,--(bot)success,hold,move
|
||||
ifDead= cc.is_dead_async ,--(bot)dead
|
||||
destroy= cc.destroy_async ,--(bot)
|
||||
new= cc.launch_async ,--(options,weights)bot
|
||||
addNext= cc.add_next_piece_async ,--(bot,piece)
|
||||
update= cc.reset_async ,--(bot,field,b2b,combo)
|
||||
think= cc.request_next_move ,--(bot)
|
||||
getMove= cc.poll_next_move ,--(bot)success,hold,move
|
||||
ifDead= cc.is_dead_async ,--(bot)dead
|
||||
destroy= cc.destroy_async ,--(bot)
|
||||
|
||||
setHold= cc.set_hold ,--(opt,bool)
|
||||
set20G= cc.set_20g ,--(opt,bool)
|
||||
setBag= cc.set_bag7 ,--(opt,bool)
|
||||
setNode= cc.set_max_nodes ,--(opt,bool)
|
||||
free= cc.free ,--(opt/wei)
|
||||
}
|
||||
function CC_updateField(P)
|
||||
local F,i={},1
|
||||
for y=1,#P.field do
|
||||
for x=1,10 do
|
||||
F[i],i=P.field[y][x]>0,i+1
|
||||
setHold= cc.set_hold ,--(opt,bool)
|
||||
set20G= cc.set_20g ,--(opt,bool)
|
||||
setBag= cc.set_bag7 ,--(opt,bool)
|
||||
setNode= cc.set_max_nodes ,--(opt,bool)
|
||||
free= cc.free ,--(opt/wei)
|
||||
}
|
||||
function CC_updateField(P)
|
||||
local F,i={},1
|
||||
for y=1,#P.field do
|
||||
for x=1,10 do
|
||||
F[i],i=P.field[y][x]>0,i+1
|
||||
end
|
||||
end
|
||||
while i<400 do
|
||||
F[i],i=false,i+1
|
||||
end
|
||||
BOT.update(P.AI_bot,F,P.b2b>=100,P.combo)
|
||||
end
|
||||
while i<400 do
|
||||
F[i],i=false,i+1
|
||||
end
|
||||
BOT.update(P.AI_bot,F,P.b2b>=100,P.combo)
|
||||
end
|
||||
function CC_switch20G(P)
|
||||
P.AIdata._20G=true
|
||||
P.AI_keys={}
|
||||
BOT.destroy(P.AI_bot)
|
||||
local opt,wei=BOT.getConf()
|
||||
BOT.setHold(opt,P.AIdata.hold)
|
||||
BOT.set20G(opt,P.AIdata._20G)
|
||||
BOT.setBag(opt,P.AIdata.bag7)
|
||||
BOT.setNode(opt,P.AIdata.node)
|
||||
P.AI_bot=BOT.new(opt,wei)
|
||||
BOT.free(opt)BOT.free(wei)
|
||||
for i=1,P.AIdata.next do
|
||||
BOT.addNext(P.AI_bot,CCblockID[P.next[i].id])
|
||||
end
|
||||
CC_updateField(P)
|
||||
P.hd={bk={{}},id=0,color=0,name=0}P.holded=false
|
||||
P.cur=rem(P.next,1)
|
||||
P.sc,P.dir=scs[P.cur.id],0
|
||||
P.r,P.c=#P.cur.bk,#P.cur.bk[1]
|
||||
P.curX,P.curY=blockPos[P.cur.id],21+ceil(P.fieldBeneath/30)-P.r+min(int(#P.field*.2),2)
|
||||
function CC_switch20G(P)
|
||||
P.AIdata._20G=true
|
||||
P.AI_keys={}
|
||||
BOT.destroy(P.AI_bot)
|
||||
local opt,wei=BOT.getConf()
|
||||
BOT.setHold(opt,P.AIdata.hold)
|
||||
BOT.set20G(opt,P.AIdata._20G)
|
||||
BOT.setBag(opt,P.AIdata.bag7)
|
||||
BOT.setNode(opt,P.AIdata.node)
|
||||
P.AI_bot=BOT.new(opt,wei)
|
||||
BOT.free(opt)BOT.free(wei)
|
||||
for i=1,P.AIdata.next do
|
||||
BOT.addNext(P.AI_bot,CCblockID[P.next[i].id])
|
||||
end
|
||||
CC_updateField(P)
|
||||
P.hd={bk={{}},id=0,color=0,name=0}P.holded=false
|
||||
P.cur=rem(P.next,1)
|
||||
P.sc,P.dir=scs[P.cur.id],0
|
||||
P.r,P.c=#P.cur.bk,#P.cur.bk[1]
|
||||
P.curX,P.curY=blockPos[P.cur.id],21+ceil(P.fieldBeneath/30)-P.r+min(int(#P.field*.2),2)
|
||||
|
||||
P:newNext()
|
||||
BOT.addNext(P.AI_bot,CCblockID[P.next[P.AIdata.next].id])
|
||||
collectgarbage()
|
||||
P:newNext()
|
||||
BOT.addNext(P.AI_bot,CCblockID[P.next[P.AIdata.next].id])
|
||||
collectgarbage()
|
||||
end
|
||||
end
|
||||
::SKIP::
|
||||
-------------------------------------------------⑨Stack setup
|
||||
-------------------------------------------------9 Stack setup
|
||||
local dirCount={1,1,3,3,3,0,1}
|
||||
local spinOffset={
|
||||
{[0]=0,1,0,0},--Z
|
||||
@@ -180,7 +180,7 @@ local function getScore(field,cb,cy)
|
||||
HclearScore[clear]--Clearing
|
||||
-hole*70--Hole
|
||||
-cy*50--Height
|
||||
-sdh--∫Δh
|
||||
-sdh--Sum of DeltaH
|
||||
or
|
||||
LclearScore[clear]
|
||||
-hole*100
|
||||
@@ -231,10 +231,8 @@ AI_think={
|
||||
end
|
||||
end
|
||||
|
||||
::L::
|
||||
if #Tfield>0 then
|
||||
while #Tfield>0 do
|
||||
freeRow.discard(rem(Tfield,1))
|
||||
goto L
|
||||
end--Release cache
|
||||
local p=#ctrl+1
|
||||
if best.hold then
|
||||
|
||||
30
parts/bg.lua
30
parts/bg.lua
@@ -3,7 +3,6 @@ local int,ceil,rnd,abs=math.floor,math.ceil,math.random,math.abs
|
||||
local max,min,sin,cos=math.max,math.min,math.sin,math.cos
|
||||
|
||||
local scr=scr
|
||||
|
||||
local BGinit,BGresize,BGupdate,BGdraw,BGdiscard={},{},{},{},{}
|
||||
local BGvars={_G=_G}
|
||||
|
||||
@@ -136,7 +135,7 @@ end--Lightning
|
||||
|
||||
function BGinit.game6()
|
||||
t=0
|
||||
colorLib=_G.skin.libColor
|
||||
colorLib=_G.SKIN.libColor
|
||||
colorSet=_G.setting.skin
|
||||
miniBlock=_G.miniBlock
|
||||
end
|
||||
@@ -169,7 +168,7 @@ function BGdraw.matrix()
|
||||
local _=ceil(scr.h/80)
|
||||
for i=1,ceil(scr.w/80)do
|
||||
for j=1,_ do
|
||||
gc.setColor(1,1,1,sin(matrixT[i][j]*t)*.1+.1)
|
||||
gc.setColor(1,1,1,sin(i+matrixT[i][j]*t)*.1+.1)
|
||||
gc.rectangle("fill",80*i,80*j,-80,-80)
|
||||
end
|
||||
end
|
||||
@@ -180,34 +179,37 @@ end
|
||||
function BGinit.space()
|
||||
stars={}
|
||||
for i=1,2600,5 do
|
||||
local s=0.75*2^(rnd()*1.5)
|
||||
local s=rnd(4)
|
||||
stars[i]=s --size
|
||||
stars[i+1]=rnd(W) --x
|
||||
stars[i+2]=rnd(H) --y
|
||||
stars[i+1]=rnd(W)-10 --x
|
||||
stars[i+2]=rnd(H)-10 --y
|
||||
stars[i+3]=(rnd()-.5)*.01*s --vx
|
||||
stars[i+4]=(rnd()-.5)*.01*s --vy
|
||||
end--800 var
|
||||
end
|
||||
function BGresize.space(w,h)
|
||||
W,H=w+100,h+100
|
||||
W,H=w+20,h+20
|
||||
BGinit.space()
|
||||
end
|
||||
function BGupdate.space(dt)
|
||||
local s=stars
|
||||
for i=1,2600,5 do
|
||||
stars[i+1]=(stars[i+1]+stars[i+3])%W
|
||||
stars[i+2]=(stars[i+2]+stars[i+4])%H
|
||||
s[i+1]=(s[i+1]+s[i+3])%W
|
||||
s[i+2]=(s[i+2]+s[i+4])%H
|
||||
end--star moving
|
||||
end
|
||||
|
||||
function BGdraw.space()
|
||||
gc.clear(.2,.2,.2)
|
||||
if not stars[1]then return end
|
||||
gc.translate(-50,-50)
|
||||
gc.translate(-10,-10)
|
||||
gc.setColor(.8,.8,.8)
|
||||
for i=1,2600,5 do
|
||||
local x,y=stars[i+1],stars[i+2]
|
||||
gc.circle("fill",x,y,stars[i])
|
||||
local s=stars
|
||||
local x,y=s[i+1],s[i+2]
|
||||
s=s[i]
|
||||
gc.rectangle("fill",x,y,s,s)
|
||||
end
|
||||
gc.translate(50,50)
|
||||
gc.translate(10,10)
|
||||
end
|
||||
function BGdiscard.space()
|
||||
stars={}
|
||||
|
||||
@@ -5,13 +5,14 @@ local BGM={}
|
||||
-- BGM.suspend=[str:pausing ID]
|
||||
-- BGM.playing=[src:playing SRC]
|
||||
BGM.list={
|
||||
"blank","way","newera","infinite","reason",
|
||||
"race","push","secret7th","secret8th",
|
||||
"rockblock","cruelty","final","8-bit happiness","end",
|
||||
"blank","way","race","newera","push",
|
||||
"reason","infinite","secret7th","secret8th",
|
||||
"shining terminal","oxygen","distortion",
|
||||
"rockblock","cruelty","final","8-bit happiness","end",
|
||||
}
|
||||
BGM.len=#BGM.list
|
||||
function BGM.loadOne(_)
|
||||
_,BGM.list[_]=BGM.list[_]
|
||||
local _=BGM.list[_]
|
||||
BGM.list[_]=love.audio.newSource("/BGM/".._..".ogg","stream")
|
||||
BGM.list[_]:setLooping(true)
|
||||
BGM.list[_]:setVolume(0)
|
||||
@@ -23,6 +24,7 @@ function BGM.loadAll()
|
||||
end
|
||||
function BGM.play(s)
|
||||
if setting.bgm==0 then
|
||||
BGM.playing=BGM.list[s]
|
||||
BGM.suspend,BGM.nowPlay=s
|
||||
return
|
||||
elseif not s then
|
||||
|
||||
@@ -136,10 +136,6 @@ function File.loadData()
|
||||
if s then
|
||||
setfenv(s,{})
|
||||
local S=s()
|
||||
if S.version~=gameVersion then
|
||||
S.version=gameVersion
|
||||
TEXT.show(text.newVersion,640,200,30,"fly",.3)
|
||||
end
|
||||
if not S.version or S.version=="Alpha V0.8.15"then
|
||||
S.clear_S={S.clear_1,S.clear_2,S.clear_3,S.clear_4}
|
||||
S.clear={{},{},{},{},{},{},{}}
|
||||
@@ -184,6 +180,38 @@ function File.loadData()
|
||||
S.clear[i][4]=0
|
||||
end
|
||||
end
|
||||
if not S.clear_B[8]then
|
||||
for i=1,7 do
|
||||
S.clear[i][5]=0
|
||||
S.spin[i][5]=0
|
||||
end
|
||||
for i=8,25 do
|
||||
S.clear[i]={0,0,0,0,0}
|
||||
S.spin[i]={0,0,0,0,0}
|
||||
S.spin_B[i]=0
|
||||
S.clear_B[i]=0
|
||||
end
|
||||
S.spin_S[5]=0
|
||||
S.clear_S[5]=0
|
||||
end
|
||||
if S.version=="Alpha V0.8.16"or S.version=="Alpha V0.8.17"or S.version=="Alpha V0.8.18"then
|
||||
setting.skin[3],setting.skin[4]=setting.skin[4],setting.skin[3]
|
||||
end
|
||||
if S.version=="Alpha V0.8.18"or S.version=="Alpha V0.8.19"then
|
||||
S.clear[3],S.clear[4]=S.clear[4],S.clear[3]
|
||||
S.spin[3],S.spin[4]=S.spin[4],S.spin[3]
|
||||
S.clear_B[3],S.clear_B[4]=S.clear_B[4],S.clear_B[3]
|
||||
S.spin_B[3],S.spin_B[4]=S.spin_B[4],S.spin_B[3]
|
||||
end
|
||||
if #modeRanks==76 then
|
||||
for i=1,4 do
|
||||
table.remove(modeRanks)
|
||||
end
|
||||
end
|
||||
if S.version~=gameVersion then
|
||||
S.version=gameVersion
|
||||
TEXT.show(text.newVersion,640,200,30,"fly",.3)
|
||||
end
|
||||
addToTable(S,stat)
|
||||
end
|
||||
end
|
||||
@@ -13,31 +13,37 @@ if setting.lang==1 then
|
||||
"2+2=Miya",
|
||||
"225238922 哔哩哔哩 干杯~",
|
||||
"适度游戏益脑,沉迷游戏伤身,合理安排时间,享受健康生活",
|
||||
"合群了就会消失,但是消失不代表没有意义",
|
||||
"学会使用两个旋转键,三个更好",
|
||||
"合群了就会消失, 但是消失不代表没有意义",
|
||||
"学会使用两个旋转键, 三个更好",
|
||||
"更小的DAS和ARR拥有更高的操作上限(如果你还能控制得了的话)",
|
||||
"注意到\"旋转\"到底对方块做了些什么吗?",
|
||||
"20G本质是一套全新的游戏规则",
|
||||
"不要在上课时玩游戏!",
|
||||
"本游戏难度上限很高,做好心理准备",
|
||||
"本游戏难度上限很高, 做好心理准备",
|
||||
"本游戏可不是休闲游戏",
|
||||
"调到特殊的日期也不会发生什么的",
|
||||
"3.1415926535897932384",
|
||||
"2.7182818284590452353",
|
||||
"Let-The-Bass-Kick!",
|
||||
"使用love2d引擎制作",
|
||||
"有疑问?先看设置有没有你想要的",
|
||||
"有疑问? 先看设置有没有你想要的",
|
||||
"有建议的话可以把信息反馈给作者~",
|
||||
"不要按F10",
|
||||
"秘密数字:626",
|
||||
"CLASSIC SEXY RUSSIAN BLOCKS",
|
||||
"戴上耳机以获得最佳体验",
|
||||
"少女祈祷中",
|
||||
"LrL,RlR LLr,RRl RRR,LLL RfR,RRf,rFF FFF",--ZSLJTOI
|
||||
"RUR'U'R'FR2U'R'U'RUR'F'",
|
||||
"LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF",
|
||||
"(RUR'U')R'FR2U'R'U'(RUR'F')",
|
||||
"Am G F G",
|
||||
"Techmino 好玩!",
|
||||
"联网还没做呢, 别急",
|
||||
"\"免费吃鸡方块\"",
|
||||
"Techminohaowan",
|
||||
"Techmino 好玩!",
|
||||
"tetr.js 也很好玩!",
|
||||
"jstris 也很好玩!",
|
||||
"tetr.io 也很好玩!",
|
||||
"nullpomino 也很好玩!",
|
||||
}
|
||||
elseif setting.lang==2 then
|
||||
L={
|
||||
@@ -73,11 +79,17 @@ elseif setting.lang==2 then
|
||||
"CLASSIC SEXY RUSSIAN BLOCKS",
|
||||
"戴上耳机以获得最佳体验",
|
||||
"少女祈祷中",
|
||||
"LrL,RlR LLr,RRl RRR,LLL RfR,RRf,rFF FFF",--ZSLJTOI
|
||||
"RUR'U'R'FR2U'R'U'RUR'F'",
|
||||
"LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF",
|
||||
"(RUR'U')R'FR2U'R'U'(RUR'F')",
|
||||
"Am G F G",
|
||||
"Techmino 好玩!",
|
||||
"联网还没做呢, 别急",
|
||||
"\"免费吃鸡方块\"",
|
||||
"Techminohaowan",
|
||||
"Techmino 好玩!",
|
||||
"tetr.js 也很好玩!",
|
||||
"jstris 也很好玩!",
|
||||
"tetr.io 也很好玩!",
|
||||
"nullpomino 也很好玩!",
|
||||
}
|
||||
elseif setting.lang==3 then
|
||||
L={
|
||||
@@ -114,10 +126,24 @@ elseif setting.lang==3 then
|
||||
"CLASSIC SEXY RUSSIAN BLOCKS",
|
||||
"Headphones for better experience",
|
||||
"少女祈禱中",
|
||||
"RUR'U'R'FR2U'R'U'RUR'F'",
|
||||
"(RUR'U')R'FR2U'R'U'(RUR'F')",
|
||||
"Am G F G",
|
||||
"LrL,RlR LLr,RRl RRR,LLL RfR,RRf,rFF FFF",--ZSLJTOI
|
||||
"LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF",
|
||||
"Only offline game now",
|
||||
"\"Free block game with royale-mode\"",
|
||||
"Techmino is so fun!",
|
||||
"Who is diao",
|
||||
"Also try tetr.js!",
|
||||
"Also try jstris!",
|
||||
"Also try tetr.io!",
|
||||
"Also try nullpomino!",
|
||||
}
|
||||
elseif setting.lang==4 then
|
||||
L={'!','@','#','$','%','^','&','*','(',')','-','=','_','+','[',']','{','}','\\','|',';',':','\'','"',',','<','.','>','/','?'}
|
||||
local s=""
|
||||
for i=1,math.random(16,26)do
|
||||
s=s..L[math.random(#L)]
|
||||
end
|
||||
return s
|
||||
end
|
||||
return L[math.random(#L)]
|
||||
@@ -1,4 +1,5 @@
|
||||
local IMG={
|
||||
batteryImage="/mess/power.png",
|
||||
titleImage="mess/title.png",
|
||||
coloredTitleImage="mess/title_colored.png",
|
||||
dialCircle="mess/dialCircle.png",
|
||||
|
||||
@@ -1,125 +1,360 @@
|
||||
local map={{},{},{},{},{}}
|
||||
for x=1,5 do for y=1,5 do map[x][y]={x-3,y-3}end end
|
||||
local zero={0,0}
|
||||
local Zero={zero}
|
||||
local ZERO={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero,[02]=Zero,[20]=Zero,[13]=Zero,[31]=Zero}
|
||||
|
||||
local map={}
|
||||
for x=-3,3 do map[x]={}for y=-3,3 do map[x][y]={x,y}end end
|
||||
local function collect(T)
|
||||
for _,T in next,T do
|
||||
for k,vec in next,T do
|
||||
T[k]=map[vec[1]+3][vec[2]+3]
|
||||
if type(T)=="table"then
|
||||
for _,T in next,T do
|
||||
for k,vec in next,T do
|
||||
T[k]=map[vec[1]][vec[2]]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function sym(L)
|
||||
L[23]=L[01]L[32]=L[10]
|
||||
L[21]=L[03]L[12]=L[30]
|
||||
end
|
||||
local function flipList(O)
|
||||
if not O then return end
|
||||
local L={}
|
||||
for i=1,#O do
|
||||
L[i]={-O[i][1],O[i][2]}
|
||||
end
|
||||
return L
|
||||
end
|
||||
local function reflect(a,b)
|
||||
b[03]=flipList(a[01])
|
||||
b[01]=flipList(a[03])
|
||||
b[30]=flipList(a[10])
|
||||
b[32]=flipList(a[12])
|
||||
b[23]=flipList(a[21])
|
||||
b[21]=flipList(a[23])
|
||||
b[10]=flipList(a[30])
|
||||
b[12]=flipList(a[32])
|
||||
b[02]=flipList(a[02])
|
||||
b[20]=flipList(a[20])
|
||||
b[31]=flipList(a[13])
|
||||
b[13]=flipList(a[31])
|
||||
end
|
||||
local function pushZero(T)
|
||||
local L
|
||||
for i=1,#T do
|
||||
L=T[i]
|
||||
if type(L)=="table"then
|
||||
for _,v in next,L do
|
||||
table.insert(v,1,zero)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local scs=require("parts/spinCenters")
|
||||
local OspinList={
|
||||
{111,5,2, 0,-1,0},{111,5,2,-1,-1,0},{111,5,0,-1, 0,0},--T
|
||||
{333,5,2,-1,-1,0},{333,5,2, 0,-1,0},{333,5,0, 0, 0,0},--T
|
||||
{313,1,2,-1, 0,0},{313,1,2, 0,-1,0},{313,1,2, 0, 0,0},--Z
|
||||
{131,2,2, 0, 0,0},{131,2,2,-1,-1,0},{131,2,2,-1, 0,0},--S
|
||||
{331,3,2, 0,-1,0},{113,3,0, 0, 0,0},{113,3,2,-1, 0,0},--J
|
||||
{113,4,2,-1,-1,0},{331,4,0,-1, 0,0},{331,4,2, 0, 0,0},--L
|
||||
{222,7,2,-1, 0,1},{222,7,2,-2, 0,1},{222,7,2, 0, 0,1},--I
|
||||
{121,6,0, 1,-1,1},{112,6,0, 2,-1,2},{122,6,0, 1,-2,2},--O
|
||||
{323,6,0,-1,-1,2},{332,6,0,-2,-1,2},{322,6,0,-1,-2,2},--O
|
||||
}--{key,id,dir,dx,dy,freeLv(0=unmovable,1=L/R unmovable,2=free)}
|
||||
local TRS={
|
||||
[1]={
|
||||
[01]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2},{0,1} },
|
||||
[10]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2}, {0,-1} },
|
||||
[03]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-1}, {1,-2} },
|
||||
[30]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2}, {0,-1}},
|
||||
[12]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2} },
|
||||
[21]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2} },
|
||||
[32]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2} },
|
||||
[23]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2} },
|
||||
[02]={{0,0},{1,0}, {-1,0}, {0,-1}, {0,1} },
|
||||
[20]={{0,0},{-1,0}, {1,0}, {0,1}, {0,-1} },
|
||||
[13]={{0,0},{0,-1}, {0,1}, {-1,0}, {0,-2} },
|
||||
[31]={{0,0},{0,1}, {0,-1}, {1,0}, {0,2} },
|
||||
{
|
||||
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1, 2},{ 0, 1}},
|
||||
[10]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1,-1},{ 1,-2}},
|
||||
[03]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-1},{ 1,-2}},
|
||||
[30]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2},{ 0,-1}},
|
||||
[12]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1, 2}},
|
||||
[21]={{-1, 0},{-1, 1},{ 0,-2},{-1,-2}},
|
||||
[32]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2}},
|
||||
[23]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-2}},
|
||||
[02]={{ 1, 0},{-1, 0},{ 0,-1},{ 0, 1}},
|
||||
[20]={{-1, 0},{ 1, 0},{ 0, 1},{ 0,-1}},
|
||||
[13]={{ 0,-1},{ 0, 1},{-1, 0},{ 0,-2}},
|
||||
[31]={{ 0, 1},{ 0,-1},{ 1, 0},{ 0, 2}},
|
||||
},--Z
|
||||
[2]={
|
||||
[01]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-1},{-1,-2} },
|
||||
[10]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2}, {0,-1}},
|
||||
[03]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2}, {0,1} },
|
||||
[30]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2}, {0,-1} },
|
||||
[12]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2} },
|
||||
[21]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2} },
|
||||
[32]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2} },
|
||||
[23]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2} },
|
||||
[02]={{0,0},{-1,0}, {1,0}, {0,-1}, {0,1} },
|
||||
[20]={{0,0},{1,0}, {-1,0}, {0,1}, {0,-1} },
|
||||
[13]={{0,0},{0,1}, {0,-1}, {-1,0}, {0,2} },
|
||||
[31]={{0,0},{0,-1}, {0,1}, {1,0}, {0,-2} },
|
||||
},--S
|
||||
[3]={
|
||||
[01]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2},{-1,-1},{0,1} },
|
||||
[10]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2}, {0,-1}, {1,1} },
|
||||
[03]={{0,0},{1,0}, {1,1}, {0,-2}, {-1,1} },
|
||||
[30]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2} },
|
||||
[12]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2}, {1,1} },
|
||||
[21]={{0,0},{-1,0}, {-1,-1},{-1,1}, {0,-2}, {-1,-2},{-1,-1} },
|
||||
[32]={{0,0},{-1,0}, {-1,-1},{-1,1}, {1,0}, {0,-1}, {0,2}, {-1,2} },
|
||||
[23]={{0,0},{1,0}, {1,1}, {-1,0}, {0,-2}, {1,-2} },
|
||||
[02]={{0,0},{1,0}, {-1,0}, {0,-1}, {0,1} },
|
||||
[20]={{0,0},{-1,0}, {1,0}, {0,1}, {0,-1} },
|
||||
[13]={{0,0},{0,1}, {1,0}, {0,-1} },
|
||||
[31]={{0,0},{0,-1}, {-1,0}, {0,1} },
|
||||
},--L
|
||||
[4]={
|
||||
[01]={{0,0},{-1,0}, {-1,1}, {0,-2}, {1,1} },
|
||||
[10]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2} },
|
||||
[03]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2}, {1,-1}, {0,1} },
|
||||
[30]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2}, {0,-1}, {-1,1} },
|
||||
[12]={{0,0},{1,0}, {1,-1}, {1,1}, {-1,0}, {0,-1}, {0,2}, {1,2} },
|
||||
[21]={{0,0},{-1,0}, {-1,1}, {1,0}, {0,-2}, {-1,-2} },
|
||||
[32]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2}, {-1,1} },
|
||||
[23]={{0,0},{1,0}, {1,-1}, {1,1}, {0,-2}, {1,-2}, {1,-1} },
|
||||
[02]={{0,0},{-1,0}, {1,0}, {0,-1}, {0,1} },
|
||||
[20]={{0,0},{1,0}, {-1,0}, {0,1}, {0,-1} },
|
||||
[13]={{0,0},{0,-1}, {1,0}, {0,1} },
|
||||
[31]={{0,0},{0,1}, {-1,0}, {0,-1} },
|
||||
{},--S
|
||||
{
|
||||
[01]={{-1, 0},{-1, 1},{ 0,-2},{ 1, 1}},
|
||||
[10]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1, 2}},
|
||||
[03]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-2},{ 1,-1},{ 0, 1}},
|
||||
[30]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2},{ 0,-1},{-1, 1}},
|
||||
[12]={{ 1, 0},{ 1,-1},{ 1, 1},{-1, 0},{ 0,-1},{ 0, 2},{ 1, 2}},
|
||||
[21]={{-1, 0},{-1, 1},{ 1, 0},{ 0,-2},{-1,-2}},
|
||||
[32]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2},{-1, 1}},
|
||||
[23]={{ 1, 0},{ 1,-1},{ 1, 1},{ 0,-2},{ 1,-2},{ 1,-1}},
|
||||
[02]={{-1, 0},{ 1, 0},{ 0,-1},{ 0, 1}},
|
||||
[20]={{ 1, 0},{-1, 0},{ 0, 1},{ 0,-1}},
|
||||
[13]={{ 0,-1},{ 1, 0},{ 0, 1}},
|
||||
[31]={{ 0, 1},{-1, 0},{ 0,-1}},
|
||||
},--J
|
||||
[5]={
|
||||
[01]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2},{-1,-1} },
|
||||
[10]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2}, {0,-1}, {1,1}},
|
||||
[03]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2} },
|
||||
[30]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2}, {0,-1} },
|
||||
[12]={{0,0},{1,0}, {1,-1}, {0,-1}, {-1,-1},{0,2}, {1,2}},
|
||||
[21]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2},{1,1} },
|
||||
[32]={{0,0},{-1,0}, {-1,-1},{0,-1}, {1,-1}, {0,2}, {-1,2}},
|
||||
[23]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2}, {-1,1} },
|
||||
[02]={{0,0},{-1,0}, {1,0}, {0,1} },
|
||||
[20]={{0,0},{1,0}, {-1,0}, {0,-1} },
|
||||
[13]={{0,0},{0,-1}, {0,1}, {1,0}, {0,-2}, {0,2}},
|
||||
[31]={{0,0},{0,-1}, {0,1}, {-1,0}, {0,-2}, {0,2}},
|
||||
{},--L
|
||||
{
|
||||
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1,-2},{-1,-1}},
|
||||
[10]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1, 2},{ 0,-1},{ 1, 1}},
|
||||
[03]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-2}},
|
||||
[30]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2},{ 0,-1}},
|
||||
[12]={{ 1, 0},{ 1,-1},{ 0,-1},{-1,-1},{ 0, 2},{ 1, 2}},
|
||||
[21]={{-1, 0},{-1, 1},{ 0,-2},{-1,-2},{ 1, 1}},
|
||||
[32]={{-1, 0},{-1,-1},{ 0,-1},{ 1,-1},{ 0, 2},{-1, 2}},
|
||||
[23]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-2},{-1, 1}},
|
||||
[02]={{-1, 0},{ 1, 0},{ 0, 1}},
|
||||
[20]={{ 1, 0},{-1, 0},{ 0,-1}},
|
||||
[13]={{ 0,-1},{ 0, 1},{ 1, 0},{ 0,-2},{ 0, 2}},
|
||||
[31]={{ 0,-1},{ 0, 1},{-1, 0},{ 0,-2},{ 0, 2}},
|
||||
},--T
|
||||
[6]={},--O(special)
|
||||
[7]={
|
||||
[01]={{0,0},{0,1}, {1,0}, {-2,0}, {-2,-1},{1,2} },
|
||||
[03]={{0,0},{0,1}, {-1,0}, {2,0}, {2,-1}, {-1,2} },
|
||||
[10]={{0,0},{2,0}, {-1,0}, {-1,-2},{2,1}, {0,2} },
|
||||
[30]={{0,0},{-2,0}, {1,0}, {1,-2}, {-2,1}, {0,2} },
|
||||
[12]={{0,0},{-1,0}, {2,0}, {-1,2}, {2,-1} },
|
||||
[32]={{0,0},{1,0}, {-2,0}, {1,-2}, {-2,-1} },
|
||||
[21]={{0,0},{-2,0}, {1,0}, {1,-2}, {-2,1} },
|
||||
[23]={{0,0},{2,0}, {-1,0}, {-1,-2},{2,1} },
|
||||
[02]={{0,0},{-1,0}, {1,0}, {0,-1}, {0,1} },
|
||||
[20]={{0,0},{1,0}, {-1,0}, {0,1}, {0,-1} },
|
||||
[13]={{0,0},{0,-1}, {-1,0}, {1,0}, {0,1} },
|
||||
[31]={{0,0},{0,-1}, {1,0}, {-1,0}, {0,1} },
|
||||
}--I
|
||||
}for i=1,7 do collect(TRS[i])end
|
||||
function(P,d)
|
||||
if P.human then SFX.fieldPlay("rotate",nil,P)end
|
||||
if P.gameEnv.easyFresh then P:freshLockDelay()end
|
||||
if not P.gameEnv.ospin then return end
|
||||
local x,y=P.curX,P.curY
|
||||
if y==P.y_img and((P:solid(x-1,y)or P:solid(x-1,y+1)))and(P:solid(x+2,y)or P:solid(x+2,y+1))then
|
||||
local D=P.spinSeq%100*10+d
|
||||
P.spinSeq=D
|
||||
if D<100 then return end
|
||||
for i=1,#OspinList do
|
||||
local L=OspinList[i]
|
||||
if D==L[1]then
|
||||
local id,dir=L[2],L[3]
|
||||
local bk=blocks[id][dir]
|
||||
local x,y=P.curX+L[4],P.curY+L[5]
|
||||
if not P:ifoverlap(bk,x,y)and(L[6]>0 or P:ifoverlap(bk,x-1,y)and P:ifoverlap(bk,x+1,y))and(L[6]==2 or P:ifoverlap(bk,x,y-1))and P:ifoverlap(bk,x,y+1)then
|
||||
local C=P.cur
|
||||
C.id=id
|
||||
C.bk=bk
|
||||
P.curX,P.curY=x,y
|
||||
P.r,P.c=#bk,#bk[1]
|
||||
P.dir,P.sc=dir,scs[id][dir]
|
||||
P.spinLast=2
|
||||
P.stat.rotate=P.stat.rotate+1
|
||||
P:freshgho()
|
||||
P.spinSeq=0
|
||||
SFX.fieldPlay("rotatekick",nil,P)
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
P.spinSeq=0
|
||||
end
|
||||
end,--O
|
||||
{
|
||||
[01]={{ 0, 1},{ 1, 0},{-2, 0},{-2,-1},{ 1, 2}},
|
||||
[10]={{ 2, 0},{-1, 0},{-1,-2},{ 2, 1},{ 0, 2}},
|
||||
[03]={{ 0, 1},{-1, 0},{ 2, 0},{ 2,-1},{-1, 2}},
|
||||
[30]={{-2, 0},{ 1, 0},{ 1,-2},{-2, 1},{ 0, 2}},
|
||||
[12]={{-1, 0},{ 2, 0},{-1, 2},{ 2,-1}},
|
||||
[21]={{-2, 0},{ 1, 0},{ 1,-2},{-2, 1}},
|
||||
[32]={{ 1, 0},{-2, 0},{ 1,-2},{-2,-1}},
|
||||
[23]={{ 2, 0},{-1, 0},{-1,-2},{ 2, 1}},
|
||||
[02]={{-1, 0},{ 1, 0},{ 0,-1},{ 0, 1}},
|
||||
[20]={{ 1, 0},{-1, 0},{ 0, 1},{ 0,-1}},
|
||||
[13]={{ 0,-1},{-1, 0},{ 1, 0},{ 0, 1}},
|
||||
[31]={{ 0,-1},{ 1, 0},{-1, 0},{ 0, 1}},
|
||||
},--I
|
||||
{
|
||||
[01]={{-1, 0},{ 0, 1},{ 1, 1},{ 0,-3},{ 0, 2},{ 0, 3},{-1, 2}},
|
||||
[10]={{ 1, 0},{ 0,-1},{-1,-1},{ 0,-2},{ 0,-3},{ 0, 3},{ 1,-2}},
|
||||
[03]={{ 1, 0},{ 0,-3},{ 0, 1},{ 0, 2},{ 0, 3},{ 1, 2}},
|
||||
[30]={{-1, 0},{ 0, 1},{ 0,-2},{ 0,-3},{ 0, 3},{-1,-2}},
|
||||
},--5Z
|
||||
{},--5S
|
||||
{
|
||||
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1,-2},{-1,-1},{ 0, 1}},
|
||||
[10]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1, 2},{ 0,-1},{ 1, 1}},
|
||||
[03]={{ 1, 0},{ 1, 1},{ 0,-2},{-1, 1}},
|
||||
[30]={{-1, 0},{-1,-1},{ 0, 2},{-1, 2}},
|
||||
[12]={{ 1, 0},{ 1,-1},{ 0, 2},{ 1, 2},{ 1, 1}},
|
||||
[21]={{-1, 0},{-1,-1},{-1, 1},{ 0,-2},{-1,-2},{-1,-1}},
|
||||
[32]={{-1, 0},{-1,-1},{-1, 1},{ 1, 0},{ 0,-1},{ 0, 2},{-1, 2}},
|
||||
[23]={{ 1, 0},{ 1, 1},{-1, 0},{ 0,-2},{ 1,-2}},
|
||||
[02]={{-1, 0},{ 0,-1},{ 0, 1}},
|
||||
[20]={{ 1, 0},{ 0, 1},{ 0,-1}},
|
||||
[13]={{ 1, 0},{ 0, 1},{-1, 0}},
|
||||
[31]={{-1, 0},{ 0,-1},{ 1, 0}},
|
||||
},--Q
|
||||
{},--P
|
||||
{
|
||||
[01]={{-1, 0},{ 1, 0},{-1, 1},{ 0,-2},{ 0,-3}},
|
||||
[10]={{ 1, 0},{ 1,-1},{-1, 0},{ 0, 2},{ 0, 3}},
|
||||
[03]={{ 1, 0},{ 1,-1}, { 0, 1},{ 0,-2},{ 0,-3}},
|
||||
[30]={{-1, 0},{-1, 1},{ 1, 0},{ 0,-1},{ 0, 2},{ 0, 3}},
|
||||
[12]={{ 1, 0},{ 0,-1},{-1, 0},{ 0, 2}},
|
||||
[21]={{-1, 0},{ 0, 1},{ 1, 0},{ 0,-2}},
|
||||
[32]={{-1, 0},{-1, 1},{ 0, 1},{ 0,-1},{ 1, 0},{ 0, 2},{-2, 0}},
|
||||
[23]={{ 1, 0},{ 1,-1},{ 0,-1},{ 0, 1},{-1, 0},{ 0,-2},{ 2, 0}},
|
||||
[02]={{ 1, 0},{-1, 0},{ 0, 1}},
|
||||
[20]={{-1, 0},{ 1, 0},{ 0,-1}},
|
||||
[13]={{ 0,-1},{ 1, 0},{ 0, 1}},
|
||||
[31]={{ 0,-1},{-1, 0},{ 0, 1}},
|
||||
},--F
|
||||
{},--E
|
||||
{
|
||||
[01]={{ 0,-1},{-1,-1},{ 1,-1},{ 1, 0},{ 1,-3},{-1, 0},{ 0, 2},{-1, 2}},
|
||||
[10]={{ 1, 0},{ 0,-1},{-1,-1},{ 0,-2},{ 0,-3},{ 1,-2},{ 0, 1}},
|
||||
[03]={{ 0,-1},{ 1,-1},{-1,-1},{-1, 0},{-1,-3},{ 1, 0},{ 0, 2},{ 1, 2}},
|
||||
[30]={{-1, 0},{ 0,-1},{ 1,-1},{ 0,-2},{ 0,-3},{-1,-2},{ 0, 1}},
|
||||
[12]={{ 1, 0},{-1, 0},{ 0,-2},{ 0,-3},{ 0, 1},{-1, 1}},
|
||||
[21]={{ 1,-1},{-1, 0},{ 1, 0},{ 0,-1},{ 0, 2},{ 0, 3}},
|
||||
[32]={{-1, 0},{ 1, 0},{ 0,-2},{ 0,-3},{ 0, 1},{ 1, 1}},
|
||||
[23]={{-1,-1},{ 1, 0},{-1, 0},{ 0,-1},{ 0, 2},{ 0, 3}},
|
||||
[02]={{ 0, 1},{ 0,-1},{ 0, 2}},
|
||||
[20]={{ 0,-1},{ 0, 1},{ 0,-2}},
|
||||
[13]={{ 1, 0},{-1, 1},{-2, 0}},
|
||||
[31]={{-1, 0},{ 1, 1},{ 2, 0}},
|
||||
},--5T
|
||||
{
|
||||
[01]={{-1, 0},{-1, 1},{ 0,-2},{-1,-1},{-1,-2}},
|
||||
[10]={{ 1, 0},{ 1,-1}},
|
||||
[03]={{ 1, 0},{ 1, 1},{ 0,-2},{ 1,-1},{ 1,-2}},
|
||||
[30]={{-1, 0},{-1,-1}},
|
||||
[12]={{ 1, 0},{ 1, 1}},
|
||||
[21]={{-1,-1},{-1, 1}},
|
||||
[32]={{-1, 0},{-1, 1}},
|
||||
[23]={{ 1,-1},{ 1, 1}},
|
||||
[02]={{ 0, 1}},
|
||||
[20]={{ 0,-1}},
|
||||
[13]={{ 0,-1},{ 0, 1},{ 1, 0}},
|
||||
[31]={{ 0,-1},{ 0, 1},{-1, 0}},
|
||||
},--U
|
||||
{
|
||||
[01]={{ 0, 1},{-1, 0},{ 0,-2},{-1,-2}},
|
||||
[10]={{ 0, 1},{ 1, 0},{ 0,-2},{ 1,-2}},
|
||||
[03]={{ 0,-1},{ 0, 1},{ 0, 2}},
|
||||
[30]={{ 0,-1},{ 0,-1},{ 0,-2}},
|
||||
[12]={{ 0,-1},{ 0, 1}},
|
||||
[21]={{ 0,-1},{ 0,-2}},
|
||||
[32]={{ 1, 0},{-1, 0}},
|
||||
[23]={{-1, 0},{ 1, 0}},
|
||||
[02]={{-1, 1},{ 1,-1}},
|
||||
[20]={{ 1,-1},{-1, 1}},
|
||||
[13]={{ 1, 1},{-1,-1}},
|
||||
[31]={{-1,-1},{ 1, 1}},
|
||||
},--V
|
||||
{
|
||||
[01]={{ 0,-1},{-1, 0},{ 1, 0},{ 1,-1},{ 0, 2}},
|
||||
[10]={{ 0,-1},{-1,-1},{ 0, 1},{ 0,-2},{ 1,-2},{ 0, 2}},
|
||||
[03]={{ 1, 0},{ 1, 1},{ 0,-1},{ 0,-2},{ 0,-3},{ 1,-1},{ 0, 1},{ 0, 2},{ 0, 3}},
|
||||
[30]={{-1, 0},{-1, 1},{ 0,-1},{ 0,-2},{ 0,-3},{-1,-1},{ 0, 1},{ 0, 2},{ 0, 3}},
|
||||
[12]={{ 1, 0},{ 0,-1},{ 1, 1},{-1, 0},{ 0, 1},{-1,-1}},
|
||||
[21]={{-1, 0},{ 0,-1},{-1, 1},{ 1, 0},{ 0, 1},{ 1,-1}},
|
||||
[32]={{ 0,-1},{ 1, 0},{ 0, 1},{-1, 0},{-1,-1},{ 0, 2}},
|
||||
[23]={{ 0,-1},{ 1,-1},{ 0, 1},{ 0,-2},{-1,-2},{ 0, 2}},
|
||||
[02]={{ 0,-1},{-1, 0}},
|
||||
[20]={{ 0, 1},{ 1, 0}},
|
||||
[13]={{ 0, 1},{-1, 0}},
|
||||
[31]={{ 0,-1},{ 1, 0}},
|
||||
},--W
|
||||
function(P,d)
|
||||
return
|
||||
end,--X
|
||||
{
|
||||
[01]={{-1, 0},{-1, 1},{ 0,-3},{-1, 1},{-1, 2},{ 0, 1}},
|
||||
[10]={{-1, 0},{ 1,-1},{ 0, 3},{ 1,-1},{ 1,-2},{ 0, 1}},
|
||||
[03]={{ 0,-1},{ 1,-1},{-1, 0},{ 1, 1},{ 0,-2},{ 1,-2},{ 0,-3},{ 1,-3},{-1, 1}},
|
||||
[30]={{ 0, 1},{-1, 1},{ 1, 0},{-1,-1},{ 0, 2},{-1, 2},{ 0, 3},{-1, 3},{ 1,-1}},
|
||||
[12]={{ 1, 0},{ 1,-1},{ 0,-1},{ 1,-2},{ 0,-2},{ 1, 1},{-1, 0},{ 0, 2},{ 1, 2}},
|
||||
[21]={{-1, 0},{-1, 1},{ 0, 1},{-1, 2},{ 0, 2},{-1,-1},{ 1, 0},{ 0,-2},{-1,-2}},
|
||||
[32]={{-1, 0},{-1, 1},{-1,-1},{ 0, 2},{-1, 2},{ 0,-2}},
|
||||
[23]={{ 1, 0},{ 1,-1},{ 1, 1},{ 0,-2},{ 1,-2},{ 0, 2}},
|
||||
[02]={{ 0,-1},{ 1,-1},{-1, 0},{ 2,-1},{ 0, 1}},
|
||||
[20]={{ 0, 1},{-1, 1},{ 1, 0},{-2, 1},{ 0,-1}},
|
||||
[13]={{-1, 0},{-1,-1},{ 0, 1},{-1,-2}},
|
||||
[31]={{ 1, 0},{ 1, 1},{ 0,-1},{ 1, 2}},
|
||||
},--5J
|
||||
{},--5L
|
||||
{
|
||||
[01]={{-1, 0},{-1, 1},{ 1, 0},{-1, 2},{-1,-1},{ 0,-3},{ 0, 1}},
|
||||
[10]={{-1, 0},{ 1,-1},{-1, 0},{ 1,-2},{ 1, 1},{ 0, 3},{ 0, 1}},
|
||||
[03]={{ 0,-1},{ 1,-1},{-1, 0},{ 1, 1},{ 0,-2},{ 1,-2},{ 0,-3},{ 1,-3},{-1, 1}},
|
||||
[30]={{ 0, 1},{-1, 1},{ 1, 0},{-1,-1},{ 0, 2},{-1, 2},{ 0, 3},{-1, 3},{ 1,-1}},
|
||||
[12]={{ 1, 0},{ 1,-1},{ 0,-1},{ 1,-2},{ 0,-2},{ 1, 1},{-1, 0},{ 0, 2},{ 1, 2}},
|
||||
[21]={{-1, 0},{-1, 1},{ 0, 1},{-1, 2},{ 0, 2},{-1,-1},{ 1, 0},{ 0,-2},{-1,-2}},
|
||||
[32]={{-1, 0},{-1, 1},{-1,-1},{ 0, 2},{-1, 2},{ 0,-2}},
|
||||
[23]={{ 1, 0},{ 1,-1},{ 1, 1},{ 0,-2},{ 1,-2},{ 0, 2}},
|
||||
[02]={{ 0,-1},{ 1,-1},{-1, 0},{ 2,-1},{ 0, 1}},
|
||||
[20]={{ 0, 1},{-1, 1},{ 1, 0},{-2, 1},{ 0,-1}},
|
||||
[13]={{-1, 0},{-1,-1},{ 0, 1},{-1,-2}},
|
||||
[31]={{ 1, 0},{ 1, 1},{ 0,-1},{ 1, 2}},
|
||||
},--R
|
||||
{},--Y
|
||||
{
|
||||
[01]={{-1, 0},{-1, 1},{ 0, 1},{ 1, 0},{-1, 2},{-2, 0},{ 0,-2}},
|
||||
[10]={{ 1, 0},{-1, 0},{ 0,-1},{ 1,-1},{ 1,-2},{ 2, 0},{ 0, 2}},
|
||||
[03]={{-1, 0},{ 1,-1},{ 0,-2},{ 0,-3},{ 1, 0},{ 1,-2},{ 1,-3},{ 0, 1},{-1, 1}},
|
||||
[30]={{-1, 0},{ 1,-1},{ 1,-2},{ 1, 0},{ 0,-2},{ 1,-3},{-1, 2},{ 0, 3},{-1, 3}},
|
||||
[12]={{-1, 0},{ 1,-1},{-1,-1},{ 1,-2},{ 1, 0},{ 0,-2},{ 1,-3},{-1, 2},{ 0, 3},{-1, 3}},
|
||||
[21]={{-1, 0},{ 1,-1},{ 1, 1},{ 0,-2},{ 0,-3},{ 1, 0},{ 1,-2},{ 1,-3},{ 0, 1},{-1, 1}},
|
||||
[32]={{-1, 0},{ 0,-1},{-1,-2},{ 1,-1},{ 1, 0},{ 1, 1},{ 0, 2},{ 0, 3}},
|
||||
[23]={{ 0,-2},{ 0,-3},{ 1, 2},{ 1, 0},{ 0, 1},{-1, 1},{ 0,-1},{ 0, 2}},
|
||||
[02]={{-1, 0},{ 0, 2},{ 0,-1}},
|
||||
[20]={{ 1, 0},{ 0,-2},{ 0, 1}},
|
||||
[13]={{-1, 0},{-1,-1},{ 0, 1},{ 1, 2}},
|
||||
[31]={{ 1, 0},{ 1, 1},{ 0,-1},{-1,-2}},
|
||||
},--N
|
||||
{},--H
|
||||
{
|
||||
[01]={{ 1,-1},{ 1, 0},{ 1, 1},{ 0, 1},{-1, 1},{-1, 0},{-1,-1},{ 0,-1},{ 0,-2},{-2,-1},{-2,-2},{ 2, 0},{ 2,-1},{ 2,-2},{ 1, 2},{ 2, 2},{-1, 2},{-2, 2}},
|
||||
[10]={{-1, 0},{-1,-1},{ 0,-1},{ 1,-1},{-2,-2},{-2,-1},{-2, 0},{-1,-2},{ 0,-2},{ 1,-2},{ 2,-2},{-1, 1},{-2, 1},{-2, 2},{ 1, 0},{ 2, 0},{ 2,-1},{ 0, 1},{ 1,-1},{ 2,-2}},
|
||||
},--5I
|
||||
}
|
||||
TRS[25][03]=flipList(TRS[25][01])
|
||||
TRS[25][30]=flipList(TRS[25][10])
|
||||
sym(TRS[8])sym(TRS[9])sym(TRS[25])
|
||||
reflect(TRS[1],TRS[2])--SZ
|
||||
reflect(TRS[3],TRS[4])--LJ
|
||||
reflect(TRS[8],TRS[9])--5S5Z
|
||||
reflect(TRS[10],TRS[11])--PQ
|
||||
reflect(TRS[12],TRS[13])--FE
|
||||
reflect(TRS[19],TRS[20])--5L5J
|
||||
reflect(TRS[21],TRS[22])--RY
|
||||
reflect(TRS[23],TRS[24])--HN
|
||||
for i=1,25 do collect(TRS[i])end
|
||||
pushZero(TRS)
|
||||
|
||||
local AIRS={
|
||||
[1]={
|
||||
[01]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2} },
|
||||
[10]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2} },
|
||||
[03]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2} },
|
||||
[30]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2} },
|
||||
[12]={{0,0},{1,0}, {1,-1}, {0,2}, {1,2} },
|
||||
[21]={{0,0},{-1,0}, {-1,1}, {0,-2}, {-1,-2} },
|
||||
[32]={{0,0},{-1,0}, {-1,-1},{0,2}, {-1,2} },
|
||||
[23]={{0,0},{1,0}, {1,1}, {0,-2}, {1,-2} },
|
||||
{
|
||||
[01]={{-1,0},{-1, 1},{ 0,-2},{-1,-2}},
|
||||
[10]={{ 1,0},{ 1,-1},{ 0, 2},{ 1, 2}},
|
||||
[03]={{ 1,0},{ 1, 1},{ 0,-2},{ 1,-2}},
|
||||
[30]={{-1,0},{-1,-1},{ 0, 2},{-1, 2}},
|
||||
[12]={{ 1,0},{ 1,-1},{ 0, 2},{ 1, 2}},
|
||||
[21]={{-1,0},{-1, 1},{ 0,-2},{-1,-2}},
|
||||
[32]={{-1,0},{-1,-1},{ 0, 2},{-1, 2}},
|
||||
[23]={{ 1,0},{ 1, 1},{ 0,-2},{ 1,-2}},
|
||||
},
|
||||
[7]={
|
||||
[01]={{0,0},{-2,0}, {1,0}, {-2,-1},{1,2} },
|
||||
[10]={{0,0},{2,0}, {-1,0}, {2,1}, {-1,-2} },
|
||||
[12]={{0,0},{-1,0}, {2,0}, {-1,2}, {2,-1} },
|
||||
[21]={{0,0},{1,0}, {-2,0}, {1,-2}, {-2,1} },
|
||||
[23]={{0,0},{2,0}, {-1,0}, {2,1}, {-1,-2} },
|
||||
[32]={{0,0},{-2,0}, {1,0}, {-2,-1},{1,2} },
|
||||
[30]={{0,0},{1,0}, {-2,0}, {1,-2}, {-2,1} },
|
||||
[03]={{0,0},{-1,0}, {2,0}, {-1,2}, {2,-1} },
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
function()end,
|
||||
false,
|
||||
{
|
||||
[01]={{-2, 0},{ 1, 0},{-2,-1},{ 1, 2}},
|
||||
[10]={{ 2, 0},{-1, 0},{ 2, 1},{-1,-2}},
|
||||
[12]={{-1, 0},{ 2, 0},{-1, 2},{ 2,-1}},
|
||||
[21]={{ 1, 0},{-2, 0},{ 1,-2},{-2, 1}},
|
||||
[23]={{ 2, 0},{-1, 0},{ 2, 1},{-1,-2}},
|
||||
[32]={{-2, 0},{ 1, 0},{-2,-1},{ 1, 2}},
|
||||
[30]={{ 1, 0},{-2, 0},{ 1,-2},{-2, 1}},
|
||||
[03]={{-1, 0},{ 2, 0},{-1, 2},{ 2,-1}},
|
||||
}
|
||||
}
|
||||
for i=2,6 do AIRS[i]=AIRS[1]end
|
||||
collect(AIRS[1])collect(AIRS[7])
|
||||
for i=2,5 do AIRS[i]=AIRS[1]end
|
||||
for i=8,25 do AIRS[i]=AIRS[1]end
|
||||
pushZero(AIRS)
|
||||
|
||||
local NONE={}
|
||||
for i=1,25 do NONE[i]=ZERO end
|
||||
|
||||
return{
|
||||
TRS=TRS,
|
||||
AIRS=AIRS,
|
||||
NONE=NONE,
|
||||
}
|
||||
1212
parts/languages.lua
1212
parts/languages.lua
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,6 @@
|
||||
--LIGHT MODULE(Optimized by MrZ,Original on github/love2d community/simple-love-lights)
|
||||
--Heavily based on mattdesl's libGDX implementation:
|
||||
--https://github.com/mattdesl/lwjgl-basics/wiki/2D-Pixel-Perfect-Shadows
|
||||
--Private--
|
||||
local gc=love.graphics
|
||||
local C=gc.clear
|
||||
local shadowMapShader=gc.newShader("shader/shadowMap.cs")--Shader for caculating the 1D shadow map.
|
||||
@@ -19,62 +18,72 @@ local function destroy(L)
|
||||
L.renderCanvas:release()
|
||||
end
|
||||
local function draw(L)
|
||||
--Initialization
|
||||
local r,g,b,a=love.graphics.getColor()
|
||||
gc.setCanvas(L.blackCanvas)C()
|
||||
gc.setCanvas(L.shadowCanvas)C()
|
||||
gc.setCanvas(L.renderCanvas)C()
|
||||
lightRenderShader:send("xresolution",L.size);
|
||||
shadowMapShader:send("yresolution",L.size);
|
||||
--初始化数据
|
||||
|
||||
--get up-left of light
|
||||
local X=L.x-L.size*.5
|
||||
local Y=L.y-L.size*.5
|
||||
--整束光的左上角
|
||||
|
||||
--Render solid
|
||||
gc.translate(-X,-Y)
|
||||
L.blackCanvas:renderTo(L.blackFn)
|
||||
gc.translate(X,Y)
|
||||
--渲染遮光物
|
||||
|
||||
--Render shade canvas by solid
|
||||
gc.setShader(shadowMapShader)
|
||||
gc.setCanvas(L.shadowCanvas)
|
||||
gc.draw(L.blackCanvas)
|
||||
--根据遮光物渲染阴影画布
|
||||
|
||||
--Render light canvas by shade
|
||||
gc.setShader(lightRenderShader)
|
||||
gc.setCanvas(L.renderCanvas)
|
||||
gc.draw(L.shadowCanvas,0,0,0,1,L.size)
|
||||
--根据阴影画布渲染光画布
|
||||
|
||||
--Ready to final render
|
||||
gc.setShader()gc.setCanvas()gc.setBlendMode("add")
|
||||
--准备渲染
|
||||
|
||||
--Render to screes
|
||||
gc.setColor(r,g,b,a)
|
||||
gc.draw(L.renderCanvas,X,Y+L.size,0,1,-1)
|
||||
--渲染到屏幕
|
||||
|
||||
--Reset
|
||||
gc.setBlendMode("alpha")
|
||||
--复位
|
||||
end
|
||||
--Public--
|
||||
function Lights.draw()
|
||||
|
||||
local LIGHT={}
|
||||
function LIGHT.draw()
|
||||
for i=1,#Lights do
|
||||
Lights[i]:draw()
|
||||
end
|
||||
end
|
||||
function Lights.clear(L)
|
||||
function LIGHT.clear(L)
|
||||
for i=#Lights,1,-1 do
|
||||
Lights[i]:destroy()
|
||||
Lights[i]=nil
|
||||
end
|
||||
end
|
||||
function Lights.add(x,y,R,F)
|
||||
function LIGHT.add(x,y,R,F)
|
||||
local id=#Lights+1
|
||||
Lights[id]={
|
||||
--Methods
|
||||
id=id,
|
||||
x=x,y=y,size=R,
|
||||
blackCanvas=gc.newCanvas(R,R),--遮挡物画布
|
||||
shadowCanvas=gc.newCanvas(R,1),--1D视深画布
|
||||
renderCanvas=gc.newCanvas(R,R),--灯光画布
|
||||
blackFn=F,--遮挡物绘图函数
|
||||
--方法
|
||||
blackCanvas=gc.newCanvas(R,R),--solid canvas
|
||||
shadowCanvas=gc.newCanvas(R,1),--1D vis-depth canvas
|
||||
renderCanvas=gc.newCanvas(R,R),--light canvas
|
||||
blackFn=F,--solid draw funcion
|
||||
|
||||
|
||||
move=move,
|
||||
setPow=setPow,
|
||||
draw=draw,
|
||||
destroy=destroy,
|
||||
}
|
||||
end
|
||||
return Lights
|
||||
return LIGHT
|
||||
@@ -1,31 +1,3 @@
|
||||
actName={
|
||||
"moveLeft","moveRight",
|
||||
"rotRight","rotLeft","rot180",
|
||||
"hardDrop","softDrop",
|
||||
"hold","func",
|
||||
"restart",
|
||||
"insLeft","insRight","insDown","down1","down4","down10",
|
||||
"dropLeft","dropRight","addLeft","addRight",--Super contorl system
|
||||
}
|
||||
musicID={
|
||||
"blank",
|
||||
"way",
|
||||
"race",
|
||||
"newera",
|
||||
"push",
|
||||
"reason",
|
||||
"infinite",
|
||||
"secret7th",
|
||||
"secret8th",
|
||||
"shining terminal",
|
||||
"oxygen",
|
||||
"distortion",
|
||||
"rockblock",
|
||||
"cruelty",
|
||||
"final",
|
||||
"8-bit happiness",
|
||||
"end",
|
||||
}
|
||||
customID={
|
||||
"drop","lock",
|
||||
"wait","fall",
|
||||
@@ -51,5 +23,4 @@ customRange={
|
||||
bg={"none","game1","game2","game3","strap","rgb","glow","matrix"},
|
||||
bgm={"blank","way","race","newera","push","reason","infinite","secret7th","secret8th","rockblock"},
|
||||
}
|
||||
RCPB={10,33,200,33,105,5,105,60}
|
||||
snapLevelValue={1,10,20,40,60,80}
|
||||
@@ -11,13 +11,34 @@ local function RotCW(B)
|
||||
end
|
||||
local O,_=true,false
|
||||
local L={
|
||||
--Tetramino
|
||||
{{_,O,O},{O,O,_}}, --Z
|
||||
{{O,O,_},{_,O,O}}, --S
|
||||
{{O,O,O},{_,_,O}}, --L
|
||||
{{O,O,O},{O,_,_}}, --J
|
||||
{{O,O,O},{_,_,O}}, --L
|
||||
{{O,O,O},{_,O,_}}, --T
|
||||
{{O,O},{O,O}}, --O
|
||||
{{O,O,O,O}}, --I
|
||||
|
||||
--Pentomino
|
||||
{{_,O,O},{_,O,_},{O,O,_}}, --Z
|
||||
{{O,O,_},{_,O,_},{_,O,O}}, --S
|
||||
{{O,O,O},{O,O,_}}, --P
|
||||
{{O,O,O},{_,O,O}}, --Q
|
||||
{{_,O,_},{O,O,O},{O,_,_}}, --F
|
||||
{{_,O,_},{O,O,O},{_,_,O}}, --E
|
||||
{{O,O,O},{_,O,_},{_,O,_}}, --T
|
||||
{{O,O,O},{O,_,O}}, --U
|
||||
{{O,O,O},{_,_,O},{_,_,O}}, --V
|
||||
{{_,O,O},{O,O,_},{O,_,_}}, --W
|
||||
{{_,O,_},{O,O,O},{_,O,_}}, --X
|
||||
{{O,O,O,O},{O,_,_,_}}, --J
|
||||
{{O,O,O,O},{_,_,_,O}}, --L
|
||||
{{O,O,O,O},{_,O,_,_}}, --R
|
||||
{{O,O,O,O},{_,_,O,_}}, --Y
|
||||
{{_,O,O,O},{O,O,_,_}}, --N
|
||||
{{O,O,O,_},{_,_,O,O}}, --H
|
||||
{{O,O,O,O,O}}, --I
|
||||
}
|
||||
for i=1,#L do
|
||||
local B=L[i]
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
modes={
|
||||
{"sprint_10", id=1, x=0, y=0, size=35,shape=1,icon="timer", unlock={2,3}},
|
||||
{"sprint_20", id=2, x=-300, y=0, size=45,shape=1,icon="timer", unlock={73,74,75}},
|
||||
{"sprint_40", id=3, x=0, y=-400, size=55,shape=1,icon="timer", unlock={4,9,71,72}},
|
||||
{"sprint_100", id=4, x=-200, y=-400, size=45,shape=1,icon="timer", unlock={5,7}},
|
||||
{"sprint_400", id=5, x=-400, y=-400, size=35,shape=1,icon="timer", unlock={6}},
|
||||
{"sprint_1000", id=6, x=-600, y=-400, size=35,shape=1,icon="timer", unlock={}},
|
||||
{"sprint_10", id=1, x=0, y=0, size=35,shape=1,icon="sprint", unlock={2,3}},
|
||||
{"sprint_20", id=2, x=-300, y=0, size=45,shape=1,icon="sprint", unlock={}},
|
||||
{"sprint_40", id=3, x=0, y=-400, size=55,shape=1,icon="sprint", unlock={4,9,71,72,73}},
|
||||
{"sprint_100", id=4, x=-200, y=-400, size=45,shape=1,icon="sprint", unlock={5,7}},
|
||||
{"sprint_400", id=5, x=-400, y=-400, size=35,shape=1,icon="sprint", unlock={6}},
|
||||
{"sprint_1000", id=6, x=-600, y=-400, size=35,shape=1,icon="sprint", unlock={}},
|
||||
{"drought_normal", id=7, x=-400, y=-200, size=35,shape=1,icon="noI", unlock={8}},
|
||||
{"drought_lunatic", id=8, x=-600, y=-200, size=35,shape=1,icon="mess", unlock={}},
|
||||
{"marathon_normal", id=9, x=0, y=-600, size=55,shape=1,icon="flag", unlock={10,11,22,31,36,37,48,67}},
|
||||
@@ -39,7 +39,7 @@ modes={
|
||||
{"blind_ultimate", id=35, x=150, y=-1100, size=35,shape=1,icon="blind", unlock={}},
|
||||
|
||||
{"classic_fast", id=36, x=-300, y=-1200, size=40,shape=2,icon="classic", unlock={}},
|
||||
|
||||
|
||||
{"survivor_easy", id=37, x=300, y=-600, size=35,shape=1,icon="survivor",unlock={38}},
|
||||
{"survivor_normal", id=38, x=500, y=-600, size=35,shape=1,icon="survivor",unlock={39,42,44,46}},
|
||||
{"survivor_hard", id=39, x=700, y=-600, size=35,shape=1,icon="survivor",unlock={40}},
|
||||
@@ -81,9 +81,7 @@ modes={
|
||||
{"infinite_dig", id=70, x=-1100, y=-600, size=35,shape=1,icon="infinite_dig",unlock={}},
|
||||
{"custom_clear", id=71, x=200, y=-350, size=45,shape=3,icon="custom", unlock={}},
|
||||
{"custom_puzzle", id=72, x=200, y=-200, size=45,shape=3,icon="puzzle", unlock={}},
|
||||
{"hotseat_2P", id=73, x=-300, y=200, size=45,shape=3,icon="hotseat", unlock={}},
|
||||
{"hotseat_3P", id=74, x=-450, y=200, size=45,shape=3,icon="hotseat", unlock={}},
|
||||
{"hotseat_4P", id=75, x=-600, y=200, size=45,shape=3,icon="hotseat", unlock={}},
|
||||
{"sprintPenta", id=73, x=-200, y=-200, size=45,shape=3,icon="sprint", unlock={}},
|
||||
}
|
||||
modeRanks={}
|
||||
for i=1,#modes do
|
||||
|
||||
@@ -32,6 +32,9 @@ function SFX.loadAll()
|
||||
SFX.loadOne(i)
|
||||
end
|
||||
end
|
||||
function SFX.fieldPlay(s,v,P)
|
||||
SFX.play(s,v,(P.curX+P.sc[2]-6.5)*.15)
|
||||
end
|
||||
function SFX.play(s,v,pos)
|
||||
if setting.sfx==0 then return end
|
||||
local S=SFX.list[s]--source list
|
||||
|
||||
@@ -19,10 +19,10 @@ local list={
|
||||
"colored_bone(mrz)",
|
||||
"white_bone(mrz)",
|
||||
}
|
||||
local skin={}
|
||||
skin.lib={}
|
||||
skin.libMini={}
|
||||
skin.libColor={
|
||||
local SKIN={}
|
||||
SKIN.lib={}
|
||||
SKIN.libMini={}
|
||||
SKIN.libColor={
|
||||
color.red,
|
||||
color.orange,
|
||||
color.yellow,
|
||||
@@ -41,7 +41,7 @@ skin.libColor={
|
||||
color.darkRed,
|
||||
color.darkGreen,
|
||||
}
|
||||
function skin.load()
|
||||
function SKIN.load()
|
||||
local _
|
||||
gc.push()
|
||||
gc.origin()
|
||||
@@ -49,36 +49,36 @@ function skin.load()
|
||||
gc.setColor(1,1,1)
|
||||
for i=1,#list do
|
||||
local I=gc.newImage("/image/skin/"..list[i]..".png")
|
||||
skin.lib[i],skin.libMini[i]={},{}--30/6
|
||||
SKIN.lib[i],SKIN.libMini[i]={},{}--30/6
|
||||
for j=1,11 do
|
||||
skin.lib[i][j]=C(30,30)
|
||||
SKIN.lib[i][j]=C(30,30)
|
||||
gc.draw(I,30-30*j,0)
|
||||
|
||||
skin.libMini[i][j]=C(6,6)
|
||||
SKIN.libMini[i][j]=C(6,6)
|
||||
gc.draw(I,6-6*j,0,nil,.2)
|
||||
end
|
||||
for j=1,6 do
|
||||
skin.lib[i][11+j]=C(30,30)
|
||||
SKIN.lib[i][11+j]=C(30,30)
|
||||
gc.draw(I,30-30*j,-30)
|
||||
|
||||
skin.libMini[i][11+j]=C(6,6)
|
||||
SKIN.libMini[i][11+j]=C(6,6)
|
||||
gc.draw(I,6-6*j,-6,nil,.2)
|
||||
end
|
||||
I:release()
|
||||
end
|
||||
skin.change(setting.skinSet)
|
||||
SKIN.change(setting.skinSet)
|
||||
puzzleMark={}
|
||||
gc.setLineWidth(3)
|
||||
for i=1,11 do
|
||||
puzzleMark[i]=C(30,30)
|
||||
_=skin.libColor[i]
|
||||
_=SKIN.libColor[i]
|
||||
gc.setColor(_[1],_[2],_[3],.6)
|
||||
gc.rectangle("line",5,5,20,20)
|
||||
gc.rectangle("line",10,10,10,10)
|
||||
end
|
||||
for i=12,17 do
|
||||
puzzleMark[i]=C(30,30)
|
||||
gc.setColor(skin.libColor[i])
|
||||
gc.setColor(SKIN.libColor[i])
|
||||
gc.rectangle("line",7,7,16,16)
|
||||
end
|
||||
_=C(30,30)
|
||||
@@ -93,34 +93,34 @@ function skin.load()
|
||||
gc.pop()
|
||||
end
|
||||
local L=#list
|
||||
function skin.prevSet()--prev skin_set
|
||||
function SKIN.prevSet()--prev skin_set
|
||||
local _=(setting.skinSet-2)%L+1
|
||||
setting.skinSet=_
|
||||
skin.change(_)
|
||||
SKIN.change(_)
|
||||
_=list[_]
|
||||
TEXT.show(_,1100,100,int(300/#_)+5,"fly")
|
||||
end
|
||||
function skin.nextSet()--next skin_set
|
||||
function SKIN.nextSet()--next skin_set
|
||||
local _=setting.skinSet%L+1
|
||||
setting.skinSet=_
|
||||
skin.change(_)
|
||||
SKIN.change(_)
|
||||
_=list[_]
|
||||
TEXT.show(_,1100,100,int(300/#_)+5,"fly")
|
||||
end
|
||||
function skin.prev(i)--prev skin for [i]
|
||||
function SKIN.prev(i)--prev skin for [i]
|
||||
local _=setting.skin
|
||||
_[i]=(_[i]-2)%11+1
|
||||
end
|
||||
function skin.next(i)--next skin for [i]
|
||||
function SKIN.next(i)--next skin for [i]
|
||||
local _=setting.skin
|
||||
_[i]=_[i]%11+1
|
||||
end
|
||||
function skin.rotate(i)--change direction of [i]
|
||||
function SKIN.rotate(i)--change direction of [i]
|
||||
setting.face[i]=(setting.face[i]+1)%4
|
||||
SFX.play("rotate")
|
||||
end
|
||||
function skin.change(i)--change to skin_set[i]
|
||||
blockSkin=skin.lib[i]
|
||||
blockSkinMini=skin.libMini[i]
|
||||
function SKIN.change(i)--change to skin_set[i]
|
||||
blockSkin=SKIN.lib[i]
|
||||
blockSkinMini=SKIN.libMini[i]
|
||||
end
|
||||
return skin
|
||||
return SKIN
|
||||
@@ -1,12 +1,40 @@
|
||||
local TMP1,TMP2,TMP3,TMP4={1,2},{2,1},{2,2},{1.5,1.5}
|
||||
local N1,N2={1,2},{2,1}
|
||||
local N3,N4={2,2},{1.5,1.5}
|
||||
local I1,I2={0.5,2.5},{2.5,0.5}
|
||||
local I3,I4={1.5,2.5},{2.5,1.5}
|
||||
local V4={2.5,2.5}
|
||||
local L1,L2={1,3},{3,1}
|
||||
local scs={
|
||||
{[0]=TMP1,TMP2,TMP3,TMP3},
|
||||
{[0]=TMP1,TMP2,TMP3,TMP3},
|
||||
{[0]=TMP1,TMP2,TMP3,TMP3},
|
||||
{[0]=TMP1,TMP2,TMP3,TMP3},
|
||||
{[0]=TMP1,TMP2,TMP3,TMP3},
|
||||
{[0]=TMP4,TMP4,TMP4,TMP4},
|
||||
{[0]={0.5,2.5},{2.5,0.5},{1.5,2.5},{2.5,1.5}},
|
||||
--Tetramino
|
||||
{[0]=N1,N2,N3,N3},--Z
|
||||
{[0]=N1,N2,N3,N3},--S
|
||||
{[0]=N1,N2,N3,N3},--L
|
||||
{[0]=N1,N2,N3,N3},--J
|
||||
{[0]=N1,N2,N3,N3},--T
|
||||
{[0]=N4,N4,N4,N4},--O
|
||||
{[0]=I1,I2,I3,I4},--I
|
||||
|
||||
--Pentomino
|
||||
{[0]=N3,N3,N3,N3},--Z
|
||||
{[0]=N3,N3,N3,N3},--S
|
||||
{[0]=N1,N2,N3,N3},--P
|
||||
{[0]=N1,N2,N3,N3},--Q
|
||||
{[0]=N3,N3,N3,N3},--F
|
||||
{[0]=N3,N3,N3,N3},--E
|
||||
{[0]=N3,N3,N3,N3},--T
|
||||
{[0]=N1,N2,N3,N3},--U
|
||||
{[0]=I3,N4,I4,V4},--V
|
||||
{[0]=N3,N3,N3,N3},--W
|
||||
{[0]=N3,N3,N3,N3},--X
|
||||
{[0]=I3,I4,I3,I4},--J
|
||||
{[0]=I3,I4,I3,I4},--L
|
||||
{[0]=I3,I4,I3,I4},--R
|
||||
{[0]=I3,I4,I3,I4},--Y
|
||||
{[0]=I3,I4,I3,I4},--N
|
||||
{[0]=I3,I4,I3,I4},--H
|
||||
{[0]=L1,L2,L1,L2},--I
|
||||
}
|
||||
TMP1,TMP2,TMP3,TMP4=nil
|
||||
N1,N2,N3,N4=nil
|
||||
I1,I2,I3,I4=nil
|
||||
L1,L2=nil
|
||||
return scs
|
||||
@@ -3,6 +3,8 @@ local rnd=math.random
|
||||
local mStr=mStr
|
||||
local rem=table.remove
|
||||
|
||||
local texts={}
|
||||
|
||||
local textFX={}
|
||||
function textFX.appear(t)
|
||||
mStr(t.text,t.x,t.y-t.font*.7)
|
||||
@@ -64,11 +66,14 @@ function textFX.beat(t)
|
||||
end
|
||||
function textFX.mark(t)
|
||||
local _,_,_,T=gc.getColor()
|
||||
gc.setColor(1,1,1,T*.06626)
|
||||
gc.setColor(1,1,1,T*.08)
|
||||
mStr(t.text,t.x,t.y-t.font*.7)
|
||||
end
|
||||
|
||||
local TEXT={}
|
||||
function TEXT.clear()
|
||||
texts={}
|
||||
end
|
||||
function TEXT.getText(text,x,y,font,style,spd,stop)
|
||||
return{
|
||||
c=0,
|
||||
@@ -94,6 +99,7 @@ function TEXT.show(text,x,y,font,style,spd,stop)
|
||||
}
|
||||
end
|
||||
function TEXT.update(list)
|
||||
if not list then list=texts end
|
||||
for i=#list,1,-1 do
|
||||
local t=list[i]
|
||||
t.c=t.c+t.spd
|
||||
@@ -108,6 +114,7 @@ function TEXT.update(list)
|
||||
end
|
||||
end
|
||||
function TEXT.draw(list)
|
||||
if not list then list=texts end
|
||||
for i=1,#list do
|
||||
local t=list[i]
|
||||
local p=t.c
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local level={0,.015,.02,.03,.04,.05,.06,.07,.08,.09}
|
||||
local level={0,0,.015,.02,.03,.04,.05,.06,.07,.08}
|
||||
local _=love.system.vibrate
|
||||
return function(t)
|
||||
local L=setting.vib
|
||||
|
||||
@@ -85,30 +85,30 @@ end
|
||||
function VOC.update()
|
||||
for i=#voiceQueue,1,-1 do
|
||||
local Q=voiceQueue[i]
|
||||
if Q.s==0 then--闲置轨,自动删除多余
|
||||
if Q.s==0 then--Free channel, auto delete when >3
|
||||
if i>3 then
|
||||
rem(voiceQueue,i)
|
||||
end
|
||||
elseif Q.s==1 then--等待转换
|
||||
elseif Q.s==1 then--Waiting load source
|
||||
Q[1]=getVoice(Q[1])
|
||||
Q[1]:setVolume(setting.voc*.1)
|
||||
Q[1]:play()
|
||||
Q.s=Q[2]and 2 or 4
|
||||
elseif Q.s==2 then--播放1,准备2
|
||||
elseif Q.s==2 then--playing 1,ready 2
|
||||
if Q[1]:getDuration()-Q[1]:tell()<.08 then
|
||||
Q[2]=getVoice(Q[2])
|
||||
Q[2]:setVolume(setting.voc*.1)
|
||||
Q[2]:play()
|
||||
Q.s=3
|
||||
end
|
||||
elseif Q.s==3 then--12同时播放
|
||||
elseif Q.s==3 then--playing 12 same time
|
||||
if not Q[1]:isPlaying()then
|
||||
for i=1,#Q do
|
||||
Q[i]=Q[i+1]
|
||||
end
|
||||
Q.s=Q[2]and 2 or 4
|
||||
end
|
||||
elseif Q.s==4 then--最后播放
|
||||
elseif Q.s==4 then--playing last
|
||||
if not Q[1].isPlaying(Q[1])then
|
||||
Q[1]=nil
|
||||
Q.s=0
|
||||
@@ -121,12 +121,13 @@ function VOC.play(s,chn)
|
||||
if chn then
|
||||
local L=voiceQueue[chn]
|
||||
local _=VOC.list[s]
|
||||
if not _ then print("no VOC called:"..s)return end
|
||||
L[#L+1]=_[rnd(#_)]
|
||||
L.s=1
|
||||
--添加到queue[chn]
|
||||
--add to queue[chn]
|
||||
else
|
||||
voiceQueue[VOC.getFreeChannel()]={s=1,VOC.list[s][rnd(#VOC.list[s])]}
|
||||
--自动创建空轨/播放
|
||||
--create new channel & play
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
194
parts/widget.lua
194
parts/widget.lua
@@ -1,21 +1,14 @@
|
||||
local gc=love.graphics
|
||||
local kb=love.keyboard
|
||||
local int=math.floor
|
||||
local format=string.format
|
||||
local next=next
|
||||
local EMPTY={}
|
||||
|
||||
local button={
|
||||
type="button",
|
||||
ATV=0,--activating time(0~8)
|
||||
}
|
||||
function newButton(x,y,w,h,color,font,code,hide,N)
|
||||
local _={
|
||||
x=x-w*.5,y=y-h*.5,
|
||||
w=w,h=h,
|
||||
color=color,
|
||||
font=font,
|
||||
code=code,
|
||||
hide=hide,
|
||||
next=N,
|
||||
}for k,v in next,button do _[k]=v end return _
|
||||
end
|
||||
function button:reset()
|
||||
self.ATV=0
|
||||
end
|
||||
@@ -26,7 +19,7 @@ function button:FX()
|
||||
sysFX.new("ripple",.16,self.x-self.ATV,self.y-self.ATV,self.w+2*self.ATV,self.h+2*self.ATV)
|
||||
end
|
||||
function button:update()
|
||||
if widget_sel==self then
|
||||
if WIDGET.sel==self then
|
||||
if self.ATV<8 then self.ATV=self.ATV+1 end
|
||||
else
|
||||
if self.ATV>0 then self.ATV=self.ATV-1 end
|
||||
@@ -65,15 +58,6 @@ local switch={
|
||||
ATV=0,--activating time(0~8)
|
||||
CHK=0,--check alpha(0~6)
|
||||
}
|
||||
function newSwitch(x,y,font,disp,code,hide,N)
|
||||
local _={
|
||||
x=x,y=y,font=font,
|
||||
disp=disp,
|
||||
code=code,
|
||||
hide=hide,
|
||||
next=N,
|
||||
}for k,v in next,switch do _[k]=v end return _
|
||||
end
|
||||
function switch:reset()
|
||||
self.ATV=0
|
||||
self.CHK=0
|
||||
@@ -83,7 +67,7 @@ function switch:isAbove(x,y)
|
||||
end
|
||||
function switch:update()
|
||||
local _=self.ATV
|
||||
if widget_sel==self then if _<8 then self.ATV=_+1 end
|
||||
if WIDGET.sel==self then if _<8 then self.ATV=_+1 end
|
||||
else if _>0 then self.ATV=_-1 end
|
||||
end
|
||||
_=self.CHK
|
||||
@@ -123,18 +107,6 @@ local slider={
|
||||
ATV=0,--activating time(0~8)
|
||||
pos=0,--position shown
|
||||
}
|
||||
function newSlider(x,y,w,unit,font,change,disp,code,hide,N)
|
||||
local _={
|
||||
x=x,y=y,
|
||||
w=w,unit=unit,
|
||||
font=font,
|
||||
change=change,
|
||||
disp=disp,
|
||||
code=code,
|
||||
hide=hide,
|
||||
next=N,
|
||||
}for k,v in next,slider do _[k]=v end return _
|
||||
end
|
||||
function slider:reset()
|
||||
self.ATV=0
|
||||
self.pos=0
|
||||
@@ -143,7 +115,7 @@ function slider:isAbove(x,y)
|
||||
return x>self.x-10 and x<self.x+self.w+10 and y>self.y-20 and y<self.y+20
|
||||
end
|
||||
function slider:update()
|
||||
if widget_sel==self then
|
||||
if WIDGET.sel==self then
|
||||
if self.ATV<6 then self.ATV=self.ATV+1 end
|
||||
else
|
||||
if self.ATV>0 then self.ATV=self.ATV-1 end
|
||||
@@ -184,4 +156,154 @@ function slider:draw()
|
||||
end
|
||||
function slider:getInfo()
|
||||
print(format("x=%d,y=%d,w=%d",self.x,self.y,self.w))
|
||||
end
|
||||
end
|
||||
|
||||
local WIDGET={}
|
||||
WIDGET.active=EMPTY--table, contains all active widgets
|
||||
WIDGET.sel=nil--selected widget
|
||||
function WIDGET.set(L)
|
||||
WIDGET.sel=nil
|
||||
WIDGET.active=L or EMPTY
|
||||
if L then
|
||||
for _,W in next,L do
|
||||
W:reset()
|
||||
end--Reset all widgets
|
||||
end
|
||||
end
|
||||
|
||||
WIDGET.new={}
|
||||
function WIDGET.new.button(x,y,w,h,color,font,code,hide,N)
|
||||
local _={
|
||||
x=x-w*.5,y=y-h*.5,
|
||||
w=w,h=h,
|
||||
color=color,
|
||||
font=font,
|
||||
code=code,
|
||||
hide=hide,
|
||||
next=N,
|
||||
}for k,v in next,button do _[k]=v end return _
|
||||
end
|
||||
function WIDGET.new.switch(x,y,font,disp,code,hide,N)
|
||||
local _={
|
||||
x=x,y=y,font=font,
|
||||
disp=disp,
|
||||
code=code,
|
||||
hide=hide,
|
||||
next=N,
|
||||
}for k,v in next,switch do _[k]=v end return _
|
||||
end
|
||||
function WIDGET.new.slider(x,y,w,unit,font,change,disp,code,hide,N)
|
||||
local _={
|
||||
x=x,y=y,
|
||||
w=w,unit=unit,
|
||||
font=font,
|
||||
change=change,
|
||||
disp=disp,
|
||||
code=code,
|
||||
hide=hide,
|
||||
next=N,
|
||||
}for k,v in next,slider do _[k]=v end return _
|
||||
end
|
||||
|
||||
function WIDGET.moveCursor(x,y)
|
||||
WIDGET.sel=nil
|
||||
for _,W in next,WIDGET.active do
|
||||
if not(W.hide and W.hide())and W:isAbove(x,y)then
|
||||
WIDGET.sel=W
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
function WIDGET.press(x,y)
|
||||
local W=WIDGET.sel
|
||||
if not W then return end
|
||||
if W.type=="button"then
|
||||
W.code()
|
||||
W:FX()
|
||||
SFX.play("button")
|
||||
VOC.play("nya")
|
||||
elseif W.type=="switch"then
|
||||
W.code()
|
||||
SFX.play("move",.6)
|
||||
elseif W.type=="slider"then
|
||||
if not x then return end
|
||||
local p,P=W.disp(),x<W.x and 0 or x>W.x+W.w and W.unit or int((x-W.x)*W.unit/W.w+.5)
|
||||
if p==P then return end
|
||||
W.code(P)
|
||||
if W.change then W.change()end
|
||||
end
|
||||
if W.hide and W.hide()then WIDGET.sel=nil end
|
||||
end
|
||||
function WIDGET.drag(x,y,dx,dy)
|
||||
local W=WIDGET.sel
|
||||
if not W then return end
|
||||
if W.type=="slider"then
|
||||
local p,P=W.disp(),x<W.x and 0 or x>W.x+W.w and W.unit or int((x-W.x)*W.unit/W.w+.5)
|
||||
if p==P then return end
|
||||
W.code(P)
|
||||
if W.change then W.change()end
|
||||
elseif not W:isAbove(x,y)then
|
||||
WIDGET.sel=nil
|
||||
end
|
||||
end
|
||||
function WIDGET.keyPressed(i)
|
||||
if i=="tab"then
|
||||
if WIDGET.sel then
|
||||
WIDGET.sel=kb.isDown("lshift")and WIDGET.sel.prev or WIDGET.sel.next or WIDGET.sel
|
||||
else
|
||||
WIDGET.sel=select(2,next(WIDGET.active))
|
||||
end
|
||||
elseif i=="space"or i=="return"then
|
||||
if WIDGET.sel then
|
||||
WIDGET.press(WIDGET.sel)
|
||||
end
|
||||
elseif i=="left"or i=="right"then
|
||||
local W=WIDGET.sel
|
||||
if W then
|
||||
if W.type=="slider"then
|
||||
local p=W.disp()
|
||||
local P=i=="left"and(p>0 and p-1)or p<W.unit and p+1
|
||||
if p==P or not P then return end
|
||||
W.code(P)
|
||||
if W.change then W.change()end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
function WIDGET.gamepadPressed(i)
|
||||
if i=="dpup"or i=="dpdown"then
|
||||
if WIDGET.sel then
|
||||
WIDGET.sel=i=="dpup"and WIDGET.sel.prev or WIDGET.sel.next or WIDGET.sel
|
||||
else
|
||||
WIDGET.sel=select(2,next(WIDGET.active))
|
||||
end
|
||||
elseif i=="start"then
|
||||
if WIDGET.sel then
|
||||
WIDGET.press(WIDGET.sel)
|
||||
end
|
||||
elseif i=="dpleft"or i=="dpright"then
|
||||
if WIDGET.sel then
|
||||
local W=WIDGET.sel
|
||||
if W.type=="slider"then
|
||||
local p=W.disp()
|
||||
local P=i=="left"and(p>0 and p-1)or p<W.unit and p+1
|
||||
if p==P or not P then return end
|
||||
W.code(P)
|
||||
if W.change then W.change()end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function WIDGET.update()
|
||||
for _,W in next,WIDGET.active do W:update()end
|
||||
end
|
||||
function WIDGET.draw()
|
||||
for _,W in next,WIDGET.active do
|
||||
if not(W.hide and W.hide())then
|
||||
W:draw()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return WIDGET
|
||||
1478
player.lua
1478
player.lua
File diff suppressed because it is too large
Load Diff
35
scene.lua
35
scene.lua
@@ -1,6 +1,8 @@
|
||||
local gc=love.graphics
|
||||
local int,log=math.floor,math.log
|
||||
local sin,cos=math.sin,math.cos
|
||||
local max,format=math.max,string.format
|
||||
local scr=scr
|
||||
local SCN={
|
||||
cur="load",--Current scene
|
||||
swapping=false,--ifSwapping
|
||||
@@ -48,8 +50,8 @@ local sceneInit={
|
||||
end,
|
||||
music=function()
|
||||
if BGM.nowPlay then
|
||||
for i=1,#musicID do
|
||||
if musicID[i]==BGM.nowPlay then
|
||||
for i=1,BGM.len do
|
||||
if BGM.list[i]==BGM.nowPlay then
|
||||
sceneTemp=i--music select
|
||||
return
|
||||
end
|
||||
@@ -95,6 +97,13 @@ local sceneInit={
|
||||
BG.set(modeEnv.bg)
|
||||
end,
|
||||
pause=function(org)
|
||||
if
|
||||
org=="setting_game"or
|
||||
org=="setting_video"or
|
||||
org=="setting_sound"
|
||||
then
|
||||
TEXT.show(text.needRestart,640,440,50,"fly",.6)
|
||||
end
|
||||
local S=players[1].stat
|
||||
sceneTemp={
|
||||
timer=org=="play"and 0 or 50,
|
||||
@@ -111,7 +120,7 @@ local sceneInit={
|
||||
format("%d[%.2f%%]",S.extraPiece,100*max(1-S.extraRate/S.piece,0)),
|
||||
},
|
||||
|
||||
--从上开始,顺时针90°
|
||||
--from right-down, 60 degree each
|
||||
radar={
|
||||
(S.recv-S.pend+S.dig)/S.time*60,--DefPM
|
||||
(S.recv-S.pend)/S.time*60, --OffPM
|
||||
@@ -159,11 +168,11 @@ local sceneInit={
|
||||
setting_game=function()
|
||||
BG.set("space")
|
||||
end,
|
||||
setting_graphic=function()
|
||||
setting_video=function()
|
||||
BG.set("space")
|
||||
end,
|
||||
setting_sound=function()
|
||||
sceneTemp={last=0,jump=0}--last sound time,animation count(10→0)
|
||||
sceneTemp={last=0,jump=0}--last sound time,animation count(10 to 0)
|
||||
BG.set("space")
|
||||
end,
|
||||
setting_control=function()
|
||||
@@ -235,7 +244,6 @@ local sceneInit={
|
||||
love.event.quit()
|
||||
end,
|
||||
}
|
||||
local gc=love.graphics
|
||||
local swap={
|
||||
none={1,0,NULL},
|
||||
flash={8,1,function()gc.clear(1,1,1)end},
|
||||
@@ -262,11 +270,12 @@ local backFunc={
|
||||
mergeStat(stat,players[1].stat)
|
||||
TASK.clear("play")
|
||||
end,
|
||||
setting_game= function()FILE.saveSetting()end,
|
||||
setting_video= function()FILE.saveSetting()end,
|
||||
setting_sound= function()FILE.saveSetting()end,
|
||||
setting_touch= function()FILE.saveVK()end,
|
||||
setting_key= function()FILE.saveKeyMap()end,
|
||||
setting_game= function()FILE.saveSetting()end,
|
||||
setting_graphic=function()FILE.saveSetting()end,
|
||||
setting_sound= function()FILE.saveSetting()end,
|
||||
setting_lang= function()FILE.saveSetting()end,
|
||||
}
|
||||
function SCN.swapUpdate()
|
||||
local S=SCN.swap
|
||||
@@ -274,12 +283,9 @@ function SCN.swapUpdate()
|
||||
if S.time==S.mid then
|
||||
SCN.init(S.tar,SCN.cur)
|
||||
SCN.cur=S.tar
|
||||
for _,W in next,Widget[S.tar]do
|
||||
W:reset()
|
||||
end--重置控件
|
||||
widget_sel=nil
|
||||
WIDGET.set(widgetList[S.tar])
|
||||
collectgarbage()
|
||||
--此时场景切换
|
||||
--Scene swapped this moment
|
||||
end
|
||||
if S.time==0 then
|
||||
SCN.swapping=false
|
||||
@@ -310,7 +316,6 @@ function SCN.swapTo(tar,style)
|
||||
S.time=swap[1]
|
||||
S.mid=swap[2]
|
||||
S.draw=swap[3]
|
||||
widget_sel=nil
|
||||
end
|
||||
end
|
||||
function SCN.back()
|
||||
|
||||
@@ -1,30 +1,29 @@
|
||||
#define PI 3.14
|
||||
extern float xresolution;
|
||||
//从1D距离map采样
|
||||
//sample from 1D vis-depth map
|
||||
float samp(vec2 coord,float r,Image u_texture){
|
||||
return step(r,Texel(u_texture,coord).r);
|
||||
}
|
||||
vec4 effect(vec4 color,Image texture,vec2 texture_coords,vec2 screen_coords){
|
||||
//直角转极坐标,用于采样1D材质的y总是0
|
||||
//cartesian to polar, y of 1D sample is always 0
|
||||
vec2 norm=texture_coords.st*2.-1.;
|
||||
float r=length(norm);
|
||||
vec2 tc=vec2((atan(norm.y,norm.x)+PI)/(2.*PI),0.);
|
||||
//根据离光源距离放大模糊系数,模拟影子淡出
|
||||
float blur=(1./xresolution)*smoothstep(0.,1.,r);
|
||||
|
||||
//简易高斯模糊
|
||||
float sum=
|
||||
samp(vec2(tc.x-4.*blur,tc.y),r,texture)*.5
|
||||
+samp(vec2(tc.x-3.*blur,tc.y),r,texture)*.9
|
||||
+samp(vec2(tc.x-2.*blur,tc.y),r,texture)*.12
|
||||
+samp(vec2(tc.x-1.*blur,tc.y),r,texture)*.15
|
||||
//enlarge blur parameter by distance, light scattering simulation
|
||||
float blur=(1./xresolution)*smoothstep(.3,1.,r);
|
||||
|
||||
+samp(tc,r,texture)*.16//The center tex coord,which gives us hard shadows.
|
||||
+samp(vec2(tc.x+1.*blur,tc.y),r,texture)*.15
|
||||
+samp(vec2(tc.x+2.*blur,tc.y),r,texture)*.12
|
||||
+samp(vec2(tc.x+3.*blur,tc.y),r,texture)*.9
|
||||
+samp(vec2(tc.x+4.*blur,tc.y),r,texture)*.5;
|
||||
//sum值为亮度(0~1)
|
||||
//乘上距离得到逐渐变淡的光线
|
||||
return vec4(vec3(1.),sum*smoothstep(1.,.1,r));
|
||||
//Simple Gaussian blur
|
||||
float sum=//brightness(0~1)
|
||||
samp(vec2(tc.x-3.*blur,tc.y),r,texture)*.1
|
||||
+samp(vec2(tc.x-2.*blur,tc.y),r,texture)*.13
|
||||
+samp(vec2(tc.x-1.*blur,tc.y),r,texture)*.17
|
||||
|
||||
+samp(tc,r,texture)*.2//The center tex coord,which gives us hard shadows.
|
||||
+samp(vec2(tc.x+1.*blur,tc.y),r,texture)*.17
|
||||
+samp(vec2(tc.x+2.*blur,tc.y),r,texture)*.13
|
||||
+samp(vec2(tc.x+3.*blur,tc.y),r,texture)*.1;
|
||||
|
||||
//Multiply the distance to get a soft fading
|
||||
return vec4(vec3(1.),sum*smoothstep(1.,0.,r));
|
||||
}
|
||||
@@ -3,14 +3,19 @@ extern float yresolution;
|
||||
vec4 effect(vec4 color,Image texture,vec2 texture_coords,vec2 screen_coords){
|
||||
//Iterate through the occluder map's y-axis.
|
||||
for(float y=0.;y<yresolution;y++){
|
||||
//直角转极坐标
|
||||
//cartesian to polar
|
||||
// y/yresolution=distance to light source(0~1)
|
||||
vec2 norm=vec2(texture_coords.s,y/yresolution)*2.-1.;
|
||||
float theta=PI*1.5+norm.x*PI;
|
||||
float r=(1.+norm.y)*.5;
|
||||
//y/yresolution为到光源的距离(0~1)
|
||||
//遮光物采样
|
||||
vec4 data=Texel(texture,(vec2(-r*sin(theta),-r*cos(theta))*.5+.5));//vec2()..是遮光物采样的coord
|
||||
if(data.a>.1)return vec4(vec3(y/yresolution),1.);//碰撞检测,像素透明度>.1即透光
|
||||
|
||||
//sample from solid
|
||||
if(
|
||||
Texel(texture,(
|
||||
vec2(-r*sin(theta),-r*cos(theta))*.5+.5//coord of solid sampling
|
||||
))
|
||||
.a>.1
|
||||
)return vec4(vec3(y/yresolution),1.);//collision check, alpha>0.1 means transparent
|
||||
}
|
||||
return vec4(1,1,1,1);//返回最远距离1
|
||||
return vec4(1.,1.,1.,1.);//return max distance 1
|
||||
}
|
||||
19
texture.lua
19
texture.lua
@@ -13,7 +13,7 @@ gc.setDefaultFilter("nearest","nearest")
|
||||
gc.setColor(1,1,1)
|
||||
local VKI=N("/image/virtualkey.png")
|
||||
VKIcon={}
|
||||
for i=1,#actName do
|
||||
for i=1,20 do
|
||||
VKIcon[i]=C(36,36)
|
||||
gc.draw(VKI,(i-1)%5*-36,int((i-1)*.2)*-36)
|
||||
end
|
||||
@@ -35,18 +35,7 @@ gc.setLineWidth(4)
|
||||
gc.line(0,20,40,20)
|
||||
gc.line(20,0,20,40)
|
||||
|
||||
c=C(6,6)
|
||||
gc.clear(1,1,1)
|
||||
clearDust=gc.newParticleSystem(c,1000)
|
||||
c:release()
|
||||
clearDust:setParticleLifetime(.2,.3)
|
||||
clearDust:setEmissionRate(0)
|
||||
clearDust:setLinearAcceleration(-1500,-200,1500,200)
|
||||
clearDust:setColors(1,1,1,.5,1,1,1,0)
|
||||
--Dust particles
|
||||
|
||||
gc.setDefaultFilter("linear","linear")
|
||||
batteryImage=N("/image/mess/power.png")
|
||||
|
||||
drawableText={
|
||||
question=T(100,"?"),
|
||||
@@ -65,11 +54,11 @@ 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"),
|
||||
SS=T(80,"SS"),
|
||||
|
||||
|
||||
modeName=T(30),levelName=T(30),
|
||||
@@ -81,7 +70,7 @@ drawableText={
|
||||
lose=T(120),pause=T(120),
|
||||
|
||||
custom=T(80),
|
||||
setting_game=T(80),setting_graphic=T(80),setting_sound=T(80),
|
||||
setting_game=T(80),setting_video=T(80),setting_sound=T(80),
|
||||
setting_control=T(70),setting_skin=T(70),
|
||||
preview=T(40),
|
||||
keyboard=T(25),joystick=T(25),
|
||||
@@ -89,7 +78,7 @@ drawableText={
|
||||
musicRoom=T(80),
|
||||
nowPlaying=T(50),
|
||||
VKTchW=T(30),VKOrgW=T(30),VKCurW=T(30),
|
||||
noScore=T(50),
|
||||
noScore=T(45),
|
||||
highScore=T(30),
|
||||
}
|
||||
gc.setCanvas()
|
||||
93
timer.lua
93
timer.lua
@@ -8,52 +8,51 @@ local Tmr={}
|
||||
function Tmr.load()
|
||||
local t=Timer()
|
||||
local S=sceneTemp
|
||||
::R::
|
||||
--L={stage,curPos,curLen}
|
||||
if S.phase==1 then
|
||||
VOC.loadOne(S.cur)
|
||||
elseif S.phase==2 then
|
||||
BGM.loadOne(S.cur)
|
||||
elseif S.phase==3 then
|
||||
SFX.loadOne(S.cur)
|
||||
elseif S.phase==4 then
|
||||
IMG.loadOne(S.cur)
|
||||
elseif S.phase==5 then
|
||||
local m=modes[S.cur]
|
||||
modes[S.cur]=require("modes/"..m[1])
|
||||
local M=modes[S.cur]
|
||||
M.saveFileName,M.id=m[1],m.id
|
||||
M.x,M.y,M.size,M.shape=m.x,m.y,m.size,m.shape
|
||||
M.unlock=m.unlock
|
||||
M.records=FILE.loadRecord(m[1])or M.score and{}
|
||||
-- M.icon=gc.newImage("image/modeIcon/"..m.icon..".png")
|
||||
-- M.icon=gc.newImage("image/modeIcon/custom.png")
|
||||
elseif S.phase==6 then
|
||||
--------------------------Loading some other things here?
|
||||
skin.load()
|
||||
stat.run=stat.run+1
|
||||
--------------------------
|
||||
SFX.play("welcome_sfx")
|
||||
VOC.play("welcome")
|
||||
else
|
||||
repeat
|
||||
if S.phase==1 then
|
||||
VOC.loadOne(S.cur)
|
||||
elseif S.phase==2 then
|
||||
BGM.loadOne(S.cur)
|
||||
elseif S.phase==3 then
|
||||
SFX.loadOne(S.cur)
|
||||
elseif S.phase==4 then
|
||||
IMG.loadOne(S.cur)
|
||||
elseif S.phase==5 then
|
||||
local m=modes[S.cur]
|
||||
modes[S.cur]=require("modes/"..m[1])
|
||||
local M=modes[S.cur]
|
||||
M.saveFileName,M.id=m[1],m.id
|
||||
M.x,M.y,M.size,M.shape=m.x,m.y,m.size,m.shape
|
||||
M.unlock=m.unlock
|
||||
M.records=FILE.loadRecord(m[1])or M.score and{}
|
||||
-- M.icon=gc.newImage("image/modeIcon/"..m.icon..".png")
|
||||
-- M.icon=gc.newImage("image/modeIcon/custom.png")
|
||||
elseif S.phase==6 then
|
||||
--------------------------Loading other little things here
|
||||
SKIN.load()
|
||||
stat.run=stat.run+1
|
||||
--------------------------
|
||||
SFX.play("welcome_sfx")
|
||||
VOC.play("welcome")
|
||||
else
|
||||
S.cur=S.cur+1
|
||||
S.tar=S.cur
|
||||
if S.cur>62.6 then
|
||||
SCN.swapTo("intro","none")
|
||||
end
|
||||
return
|
||||
end
|
||||
S.cur=S.cur+1
|
||||
S.tar=S.cur
|
||||
if S.cur>62.6 then
|
||||
SCN.swapTo("intro","none")
|
||||
if S.cur>S.tar then
|
||||
S.phase=S.phase+1
|
||||
S.cur=1
|
||||
S.tar=S.list[S.phase]
|
||||
if not S.tar then
|
||||
S.phase=0
|
||||
S.tar=1
|
||||
end
|
||||
end
|
||||
return
|
||||
end
|
||||
S.cur=S.cur+1
|
||||
if S.cur>S.tar then
|
||||
S.phase=S.phase+1
|
||||
S.cur=1
|
||||
S.tar=S.list[S.phase]
|
||||
if not S.tar then
|
||||
S.phase=0
|
||||
S.tar=1
|
||||
end
|
||||
end
|
||||
if S.skip and not SCN.swapping then goto R end
|
||||
until not S.skip and Timer()-t>.01
|
||||
end
|
||||
function Tmr.intro()
|
||||
sceneTemp=sceneTemp+1
|
||||
@@ -235,13 +234,13 @@ function Tmr.play(dt)
|
||||
if frame%120==0 then
|
||||
if modeEnv.royaleMode then freshMostDangerous()end
|
||||
if marking and rnd()<.2 then
|
||||
TEXT.show("游戏作者:MrZ_26\n出现此水印则为非法录屏上传",rnd(162,scr.w-162),rnd(126,scr.h-200),40,"mark",.626)
|
||||
TEXT.show(text.marking,rnd(162,scr.w-162),rnd(126,scr.h-200),40,"mark",.626)
|
||||
end--mark 2s each 10s
|
||||
end
|
||||
end
|
||||
function Tmr.pause(dt)
|
||||
if not gameResult then
|
||||
pauseTime=pauseTime+dt
|
||||
if not game.result then
|
||||
game.pauseTime=game.pauseTime+dt
|
||||
end
|
||||
if sceneTemp.timer<50 then
|
||||
sceneTemp.timer=sceneTemp.timer+1
|
||||
|
||||
98
toolfunc.lua
98
toolfunc.lua
@@ -29,7 +29,6 @@ function destroyPlayers()
|
||||
for i=#players,1,-1 do
|
||||
local P=players[i]
|
||||
if P.canvas then P.canvas:release()end
|
||||
if P.dust then P.dust:release()end
|
||||
while P.field[1]do
|
||||
freeRow.discard(rem(P.field))
|
||||
freeRow.discard(rem(P.visTime))
|
||||
@@ -98,11 +97,11 @@ function pasteBoard()
|
||||
_,str=pcall(data.decompress,"string","deflate",str)
|
||||
if not _ then goto ERROR end
|
||||
p=1
|
||||
::LOOP::
|
||||
while true do
|
||||
_=byte(str,p)--1byte
|
||||
if not _ then
|
||||
if fX~=1 then goto ERROR
|
||||
else goto FINISH
|
||||
else break
|
||||
end
|
||||
end--str end
|
||||
__=_%32-1--block id
|
||||
@@ -112,26 +111,23 @@ function pasteBoard()
|
||||
if fX<10 then
|
||||
fX=fX+1
|
||||
else
|
||||
if fY==20 then goto FINISH end
|
||||
if fY==20 then break end
|
||||
fX=1;fY=fY+1
|
||||
end
|
||||
p=p+1
|
||||
goto LOOP
|
||||
end
|
||||
|
||||
::FINISH::
|
||||
for y=fY+1,20 do
|
||||
for x=1,10 do
|
||||
preField[y][x]=0
|
||||
end
|
||||
for y=fY+1,20 do
|
||||
for x=1,10 do
|
||||
preField[y][x]=0
|
||||
end
|
||||
goto END
|
||||
::ERROR::
|
||||
TEXT.show(text.dataCorrupted,350,360,35,"flicker",.5)
|
||||
::END::
|
||||
end
|
||||
do return end
|
||||
::ERROR::TEXT.show(text.dataCorrupted,350,360,35,"flicker",.5)
|
||||
end
|
||||
|
||||
function mergeStat(stat,Δ)
|
||||
for k,v in next,Δ do
|
||||
function mergeStat(stat,delta)
|
||||
for k,v in next,delta do
|
||||
if type(v)=="table"then
|
||||
mergeStat(stat[k],v)
|
||||
else
|
||||
@@ -149,53 +145,53 @@ function randomTarget(P)
|
||||
end
|
||||
end--return a random opponent for P
|
||||
function freshMostDangerous()
|
||||
mostDangerous,secDangerous=nil
|
||||
game.mostDangerous,game.secDangerous=nil
|
||||
local m,m2=0,0
|
||||
for i=1,#players.alive do
|
||||
local h=#players.alive[i].field
|
||||
if h>=m then
|
||||
mostDangerous,secDangerous=players.alive[i],mostDangerous
|
||||
game.mostDangerous,game.secDangerous=players.alive[i],game.mostDangerous
|
||||
m,m2=h,m
|
||||
elseif h>=m2 then
|
||||
secDangerous=players.alive[i]
|
||||
game.secDangerous=players.alive[i]
|
||||
m2=h
|
||||
end
|
||||
end
|
||||
end
|
||||
function freshMostBadge()
|
||||
mostBadge,secBadge=nil
|
||||
game.mostBadge,game.secBadge=nil
|
||||
local m,m2=0,0
|
||||
for i=1,#players.alive do
|
||||
local h=players.alive[i].badge
|
||||
if h>=m then
|
||||
mostBadge,secBadge=players.alive[i],mostBadge
|
||||
game.mostBadge,game.secBadge=players.alive[i],game.mostBadge
|
||||
m,m2=h,m
|
||||
elseif h>=m2 then
|
||||
secBadge=players.alive[i]
|
||||
game.secBadge=players.alive[i]
|
||||
m2=h
|
||||
end
|
||||
end
|
||||
end
|
||||
function royaleLevelup()
|
||||
gameStage=gameStage+1
|
||||
game.stage=game.stage+1
|
||||
local spd
|
||||
TEXT.show(text.royale_remain(#players.alive),640,200,40,"beat",.3)
|
||||
if gameStage==2 then
|
||||
if game.stage==2 then
|
||||
spd=30
|
||||
elseif gameStage==3 then
|
||||
elseif game.stage==3 then
|
||||
spd=15
|
||||
garbageSpeed=.6
|
||||
game.garbageSpeed=.6
|
||||
if players[1].alive then BGM.play("cruelty")end
|
||||
elseif gameStage==4 then
|
||||
elseif game.stage==4 then
|
||||
spd=10
|
||||
local _=players.alive
|
||||
for i=1,#_ do
|
||||
_[i].gameEnv.pushSpeed=3
|
||||
end
|
||||
elseif gameStage==5 then
|
||||
elseif game.stage==5 then
|
||||
spd=5
|
||||
garbageSpeed=1
|
||||
elseif gameStage==6 then
|
||||
game.garbageSpeed=1
|
||||
elseif game.stage==6 then
|
||||
spd=3
|
||||
if players[1].alive then BGM.play("final")end
|
||||
end
|
||||
@@ -217,8 +213,8 @@ end
|
||||
function pauseGame()
|
||||
if not SCN.swapping then
|
||||
restartCount=0--Avoid strange darkness
|
||||
if not gameResult then
|
||||
pauseCount=pauseCount+1
|
||||
if not game.result then
|
||||
game.pauseCount=game.pauseCount+1
|
||||
end
|
||||
for i=1,#players do
|
||||
local l=players[i].keyPressing
|
||||
@@ -246,18 +242,16 @@ function loadGame(M)
|
||||
SFX.play("enter")
|
||||
end
|
||||
function resetPartGameData()
|
||||
gameResult=false
|
||||
game={
|
||||
result=false,
|
||||
pauseTime=0,
|
||||
pauseCount=0,
|
||||
garbageSpeed=1,
|
||||
}
|
||||
frame=150-setting.reTime*15
|
||||
pauseTime=0
|
||||
pauseCount=0
|
||||
destroyPlayers()
|
||||
curMode.load()
|
||||
texts={}
|
||||
for i=1,#players do
|
||||
if players.dust then
|
||||
players.dust:reset()
|
||||
end
|
||||
end
|
||||
TEXT.clear()
|
||||
if modeEnv.task then
|
||||
for i=1,#players do
|
||||
TASK.new(modeEnv.task,players[i])
|
||||
@@ -274,19 +268,20 @@ function resetPartGameData()
|
||||
for i=1,#players do
|
||||
players[i]:changeAtk(randomTarget(players[i]))
|
||||
end
|
||||
mostBadge,mostDangerous,secBadge,secDangerous=nil
|
||||
gameStage=1
|
||||
garbageSpeed=.3
|
||||
game.stage=1
|
||||
game.garbageSpeed=.3
|
||||
end
|
||||
restoreVirtualKey()
|
||||
collectgarbage()
|
||||
end
|
||||
function resetGameData()
|
||||
gameResult=false
|
||||
game={
|
||||
result=false,
|
||||
pauseTime=0,--Time paused
|
||||
pauseCount=0,--Pausing count
|
||||
garbageSpeed=1,--garbage timing speed
|
||||
}
|
||||
frame=150-setting.reTime*15
|
||||
garbageSpeed=1
|
||||
pauseTime=0--Time paused
|
||||
pauseCount=0--Pausing count
|
||||
destroyPlayers()
|
||||
modeEnv=curMode.env
|
||||
curMode.load()--bg/bgm need redefine in custom,so up here
|
||||
@@ -298,16 +293,15 @@ function resetGameData()
|
||||
BG.set(modeEnv.bg)
|
||||
BGM.play(modeEnv.bgm)
|
||||
|
||||
texts={}
|
||||
TEXT.clear()
|
||||
FX_badge={}
|
||||
FX_attack={}
|
||||
if modeEnv.royaleMode then
|
||||
for i=1,#players do
|
||||
players[i]:changeAtk(randomTarget(players[i]))
|
||||
end
|
||||
mostBadge,mostDangerous,secBadge,secDangerous=nil
|
||||
gameStage=1
|
||||
garbageSpeed=.3
|
||||
game.stage=1
|
||||
game.garbageSpeed=.3
|
||||
end
|
||||
restoreVirtualKey()
|
||||
stat.game=stat.game+1
|
||||
|
||||
485
updateLog.lua
485
updateLog.lua
@@ -1,56 +1,73 @@
|
||||
local S=[=[
|
||||
"Patron"(time ordered,may not accurate):
|
||||
[rmb100+]:
|
||||
那没事了(T6300)
|
||||
弥佑瑶
|
||||
Alan
|
||||
那没事了(T6300)
|
||||
加油啊,钉钉动了的大哥哥(T3228)
|
||||
弥佑瑶
|
||||
Alan
|
||||
幽灵3383
|
||||
[rmb10+]:
|
||||
八零哥
|
||||
蕴空之灵
|
||||
gggf127
|
||||
dtg
|
||||
ThTsOd
|
||||
Fireboos
|
||||
金巧
|
||||
10元
|
||||
立斐
|
||||
时雪
|
||||
yyangdid
|
||||
sfqr
|
||||
心痕
|
||||
Sasoric
|
||||
夏小亚
|
||||
加油啊,钉钉动了的大哥哥(T3228)
|
||||
仁参
|
||||
乐↗乐↘
|
||||
喜欢c4w的ztcjoin
|
||||
面包
|
||||
蠢熏
|
||||
潘一栗
|
||||
Lied
|
||||
星街书婉
|
||||
込余
|
||||
祝西
|
||||
829
|
||||
e m*12
|
||||
我永远爱白银诺艾尔(鹏
|
||||
PCX
|
||||
(D*a)
|
||||
八零哥
|
||||
蕴空之灵
|
||||
gggf127
|
||||
dtg
|
||||
ThTsOd
|
||||
Fireboos
|
||||
金巧
|
||||
10元
|
||||
立斐
|
||||
时雪
|
||||
yyangdid
|
||||
sfqr
|
||||
心痕
|
||||
Sasoric
|
||||
夏小亚
|
||||
仁参
|
||||
乐↗乐↘
|
||||
喜欢c4w的ztcjoin
|
||||
面包
|
||||
蠢熏
|
||||
潘一栗
|
||||
Lied
|
||||
星街书婉
|
||||
込余
|
||||
祝西
|
||||
829
|
||||
e m*12
|
||||
我永远爱白银诺艾尔(鹏
|
||||
PCX
|
||||
kagura77
|
||||
呆喂
|
||||
GlowingEmbers
|
||||
轩辕辚
|
||||
HimuroAki
|
||||
TCV100
|
||||
tech有养成系统了@7065
|
||||
HAGE KANOBU
|
||||
葡萄味的曼妥思
|
||||
(闪电和拐棍)
|
||||
(D*a)
|
||||
|
||||
Thanks!
|
||||
Thanks!!!
|
||||
|
||||
Future outlook:
|
||||
New mode:
|
||||
tutorial
|
||||
game Abbr. test
|
||||
backfire
|
||||
finesse exam(3next,1pt/mino,drop to score)
|
||||
finesse exam(3next, 1pt/mino, drop to score)
|
||||
round-based dig
|
||||
Infinite battle
|
||||
Bigbang
|
||||
Rhythm
|
||||
Combo
|
||||
Square
|
||||
Shifting field(left/right)
|
||||
bigbang
|
||||
rhythm
|
||||
combo
|
||||
square
|
||||
field shifting(left/right)
|
||||
task survival
|
||||
dig practice
|
||||
dig zen
|
||||
symmetry
|
||||
hidden mode: sound only
|
||||
reverb mode (often repeat a piece many times)
|
||||
Other:
|
||||
mod system with:
|
||||
block hidden
|
||||
@@ -59,20 +76,75 @@ Future outlook:
|
||||
low-hidden
|
||||
next hidden
|
||||
field flip(LR/UD)
|
||||
no fail(infinite revive)
|
||||
防沉迷系统
|
||||
no fail(∞ lives)
|
||||
简易防沉迷系统
|
||||
in-game document
|
||||
lang setting page
|
||||
warning FX(Graphic)
|
||||
game recording
|
||||
powerinfo switch
|
||||
new virtualWidgets like joysticks
|
||||
custom sequence
|
||||
new widgets (joystick etc.)
|
||||
custom sequence(TTT!)
|
||||
splashing block
|
||||
more FXs & 3d features & animations
|
||||
Encrypt source code(compile to byte code)
|
||||
cool backgrounds
|
||||
more graphic FXs & 3D features & animations
|
||||
Encrypt source code (compile to byte code)
|
||||
new AI: task-Z
|
||||
CC smarter(think of garbage buffer)
|
||||
|
||||
0.8.17:Details Update
|
||||
0.8.22: Details Updated
|
||||
changed:
|
||||
won't show "open saving folder" button on mobile devices
|
||||
|
||||
0.8.21: Bug Fixed
|
||||
changed:
|
||||
shape of speed dial changed
|
||||
range of FX values changed
|
||||
shape of speed dial changed
|
||||
fixed:
|
||||
error in modes with ai (rotate O in its rotation system, cause some strange error)
|
||||
|
||||
0.8.19/20: Fantastic Global Update II
|
||||
new:
|
||||
new clearing FX
|
||||
pentomino with new rotation system (testing)
|
||||
new PC training mode with over 1000 quiz
|
||||
new English translation by @MattMayuga#8789
|
||||
new language: ???
|
||||
language-setting page
|
||||
[C B A S SS]→[D C B A S]
|
||||
powerinfo switch
|
||||
changed:
|
||||
resume/quit key changed on pause page (quit with Q, resume with esc)
|
||||
warning when back to pause page from setting page
|
||||
some FX based on real time
|
||||
tiny change (almost nothing) changed for powerInfo
|
||||
page turing of in-game update log changed
|
||||
readable update log of 0.8+ ver
|
||||
some new "tips"
|
||||
add ENG ver. document(not in game)
|
||||
code:
|
||||
swap id of J/L
|
||||
wall-kick list easier to read
|
||||
no utf8 char in code/comments
|
||||
less global variables
|
||||
light module optimized (but not used)
|
||||
code optimized
|
||||
fixed:
|
||||
impossible to get SS in attacker mode
|
||||
|
||||
0.8.18: Details Update II
|
||||
new:
|
||||
adjustable virtualkey SFX & VIB
|
||||
changed:
|
||||
add discord link in ENG mode
|
||||
change par time/piece of sprint/battle/round mode
|
||||
info on pause page more clearly
|
||||
faster spaceBG rendering
|
||||
updateLog editted
|
||||
code:
|
||||
delete all removable "goto"s!
|
||||
callback system moduled, main.lua easy to read
|
||||
|
||||
0.8.17: Details Update
|
||||
new:
|
||||
bag seperating line switch
|
||||
better radar chart & statistics on pause page
|
||||
@@ -84,11 +156,14 @@ Future outlook:
|
||||
no drop/lock FX in two hardest hidden modes, make them harder
|
||||
TSD-easy will auto finish when reach 20TSDs
|
||||
solo/round AI setting changed
|
||||
debug mode text&SFX when enter recording mode
|
||||
launching sound is divided to SFX&VOC two parts
|
||||
show text when entering debug mode
|
||||
SFX when enter recording mode
|
||||
remove full speed loading
|
||||
code:
|
||||
launching sound divided to SFX&VOC two parts
|
||||
delete many "goto"s
|
||||
vocal system moduled
|
||||
language system moduled
|
||||
language system moduled, easier to add new languages
|
||||
fixed:
|
||||
forgot to load language
|
||||
error animation in control setting
|
||||
@@ -96,7 +171,8 @@ Future outlook:
|
||||
moving block when changing target in t49/t99
|
||||
font error in patron list
|
||||
do not reset pause count when restart
|
||||
0.8.16:Fantastic Global Update
|
||||
|
||||
0.8.16: Fantastic Global Update
|
||||
new:
|
||||
new statistic page with:
|
||||
Radar chart which shows some important info. of player's performance
|
||||
@@ -117,9 +193,9 @@ Future outlook:
|
||||
new randomizer for drought2
|
||||
half-clear judging method changed
|
||||
new background system(well, it doesn't look much different but space BG)
|
||||
better sequence randomizer
|
||||
now can loading at full speed with Dblclick/space/enter
|
||||
add alipay paycode to help page
|
||||
better sequence randomizer
|
||||
code:
|
||||
first shader applied for white frame of falling block
|
||||
many many module packed, easy to manage
|
||||
@@ -129,14 +205,15 @@ Future outlook:
|
||||
error when set to max 0 next
|
||||
AI sequence initializing error when face setting changed
|
||||
DAS error
|
||||
0.8.15:Bug Fixed
|
||||
|
||||
0.8.15: Bug Fixed
|
||||
new:
|
||||
can switch line-clear text now
|
||||
new attack way "Clear"(half-clear)
|
||||
give every update a name!
|
||||
changed:
|
||||
animation time of lock effect little changed
|
||||
bone block of skin: ball changed
|
||||
bone block of ball-skin changed
|
||||
AI change target more slowly
|
||||
Author.dignity-=1
|
||||
fixed:
|
||||
@@ -145,7 +222,7 @@ Future outlook:
|
||||
error when reach 400 in 20G(Lunatic)
|
||||
error block color in modes with starting field
|
||||
|
||||
0.8.14:Cool FX
|
||||
0.8.14: Cool FX
|
||||
new:
|
||||
click/tap/any-key to skip loading animation
|
||||
lock animation
|
||||
@@ -160,7 +237,7 @@ Future outlook:
|
||||
some times error when touch screen
|
||||
touch/press release with no press, then error
|
||||
|
||||
0.8.13:O-spin Update++
|
||||
0.8.13: O-spin Update++
|
||||
new:
|
||||
a independent page to set DAS/ARR, with an animation for preview
|
||||
changed:
|
||||
@@ -172,9 +249,9 @@ Future outlook:
|
||||
wrong behavior in pause scene
|
||||
ospin error in 0.8.12
|
||||
memory leakage in t49/t99
|
||||
new behavior of widgets
|
||||
unnatural behavior of widgets
|
||||
|
||||
0.8.12:Bountful Update
|
||||
0.8.12: Bountful Update
|
||||
new:
|
||||
layout setting: skin system with customizable block color/direction
|
||||
more information when pause
|
||||
@@ -203,7 +280,7 @@ Future outlook:
|
||||
stage reset problem in t49/t99
|
||||
wrong info in tech-L/U/U+ mode
|
||||
|
||||
0.8.11:Total Update
|
||||
0.8.11: Total Update
|
||||
changed:
|
||||
better rule of checking invalid game
|
||||
can setting when pause
|
||||
@@ -218,105 +295,136 @@ Future outlook:
|
||||
some O-spin error
|
||||
error line counting when pc(full b2b)
|
||||
|
||||
0.8.10:
|
||||
new BGM:Distortion(master-final)
|
||||
all background darker
|
||||
better error page
|
||||
0.8.10: Cool Update
|
||||
new:
|
||||
new BGM:Distortion(master-final)
|
||||
all background darker
|
||||
cooler error page
|
||||
fixed:
|
||||
error when finish master/ultra mode
|
||||
shakeFX no effect when below 3
|
||||
|
||||
0.8.9:System Detail Update
|
||||
invalid game when pause too much
|
||||
quick play re-added
|
||||
new BGM: Oxygen(c4w&pc training)
|
||||
space background little changed
|
||||
0.8.9: System Detail Update
|
||||
new:
|
||||
invalid game when pause too much
|
||||
quick play re-added
|
||||
new BGM: Oxygen(c4w&pc training)
|
||||
changed:
|
||||
space background little changed
|
||||
|
||||
0.8.8+:Bug-Fix Update
|
||||
0.8.8+: Bug-Fix Update
|
||||
fixed many fatal bugs
|
||||
|
||||
0.8.8:Space BG Update
|
||||
background now is cool space with "planets" and "stars", not boring falling tetrominos!
|
||||
records with date
|
||||
adjustable waiting time before start
|
||||
ajustable maxnext count
|
||||
new error page and a new voice
|
||||
tiny change in rotate system(JL pistol-spin)
|
||||
marked the modes with limited das/arr
|
||||
better board copy/paste
|
||||
no black side in any screen size
|
||||
an unlock-all easter egg
|
||||
cannot press invisible func key
|
||||
fixed: some mode error
|
||||
add many fatal bugs
|
||||
0.8.8: Space BG Update
|
||||
new:
|
||||
background now is cool space with "planets" and "stars", instead of boring falling tetrominos
|
||||
no black side in any screen size
|
||||
adjustable waiting time before start
|
||||
ajustable maxnext count
|
||||
marked the modes with limited das/arr
|
||||
new error page and a new voice
|
||||
add many fatal bugs
|
||||
changed:
|
||||
simple records with date
|
||||
tiny change in rotate system(JL pistol-spin)
|
||||
better board copy/paste
|
||||
an unlock-all easter egg
|
||||
fixed:
|
||||
press invisible func key
|
||||
some mode error
|
||||
|
||||
0.8.7:Game Detail Update
|
||||
better user experience in mode selecting
|
||||
support 2^n G falling speed
|
||||
speed of marathon mode changed
|
||||
shorter clipboard string(when air above)
|
||||
attack system/score system little changed
|
||||
fixed: rank system, some mode error when enter(again!)
|
||||
0.8.7: Game Detail Update
|
||||
new:
|
||||
support 2^n G falling speed
|
||||
changed:
|
||||
better user experience in mode selecting
|
||||
speed of marathon mode changed
|
||||
code:
|
||||
shorter clipboard string(when air above)
|
||||
attack system/score system little changed
|
||||
fixed:
|
||||
wrong behaviour of rank system
|
||||
error when enter some mode(again!)
|
||||
|
||||
0.8.6:System Detail Update
|
||||
gamepad can adjust key
|
||||
add SFX when enter game
|
||||
map GUI little adjusted
|
||||
event system little changed(no ctrl when scene swapping)
|
||||
fixed:rank system, some mode error when enter
|
||||
0.8.6: System Detail Update
|
||||
new:
|
||||
can adjust gamepad keysetting
|
||||
add SFX when enter game
|
||||
changed:
|
||||
map GUI little adjusted
|
||||
event system little changed(no control when scene swapping)
|
||||
fixed:
|
||||
wrong behaviour of rank system
|
||||
error when enter some mode
|
||||
|
||||
0.8.5-:Exploration Update
|
||||
mode map!Brandly new GUI for mode selecting
|
||||
mode unlock system, not that scary for noob
|
||||
every mode has rank calculating method(may some mistakes/inappropriate number)
|
||||
save 10 best recoreds for each mode
|
||||
can save/share custom map now
|
||||
new mode: Big Bang
|
||||
button appearance changed
|
||||
better widget performence
|
||||
remove Qplay
|
||||
many bug fixed
|
||||
0.8.5-: Exploration Update
|
||||
new:
|
||||
mode map!Brandly new GUI for mode selecting
|
||||
mode unlock system, not that scary for noob
|
||||
every mode has rank calculating method(may some mistakes/inappropriate number)
|
||||
save 10 best recoreds for each mode
|
||||
can save/share custom map now
|
||||
"new mode": Big Bang
|
||||
changed:
|
||||
button appearance changed
|
||||
better widget performence
|
||||
remove Qplay
|
||||
fixed:
|
||||
many bugs
|
||||
|
||||
0.8.4:Miya Update+
|
||||
vocal more natural(important, may cause new bug)
|
||||
a bit better performence on mobile devices
|
||||
fatal bug fixed
|
||||
0.8.4: Miya Update+
|
||||
changed:
|
||||
vocal more natural(important, may cause new bug)
|
||||
a bit better performence on mobile devices
|
||||
fixed:
|
||||
some fatal bugs
|
||||
|
||||
0.8.3:Miya Update
|
||||
new widget appearence
|
||||
cuter miya
|
||||
0.8.3: Miya Update
|
||||
new:
|
||||
new widget appearence
|
||||
cuter miya
|
||||
|
||||
0.8.2:Graphics Update
|
||||
miya figure added
|
||||
new widget appearence
|
||||
GUI adjusted
|
||||
bug fixed
|
||||
0.8.2: Graphics Update
|
||||
new:
|
||||
miya figure added
|
||||
new widget appearence
|
||||
changed:
|
||||
GUI adjusted
|
||||
fixed:
|
||||
some bugs
|
||||
|
||||
0.8.1:Power Info Update
|
||||
more FX level
|
||||
better battery info displaying
|
||||
3 next in GMroll
|
||||
bug fixed
|
||||
0.8.1: Power Info Update
|
||||
changed:
|
||||
more FX level
|
||||
better battery info displaying
|
||||
3 next in GMroll
|
||||
fixed:
|
||||
some bugs
|
||||
|
||||
0.8.0:Small Update
|
||||
remade text system
|
||||
more details
|
||||
bug fixed
|
||||
0.8.0: Small Update
|
||||
new:
|
||||
better update log from now on(2020.5.2)
|
||||
changed:
|
||||
more details
|
||||
code:
|
||||
remade text system
|
||||
fixed:
|
||||
some bugs
|
||||
|
||||
0.7.35:Bug Fixed
|
||||
bug fixed
|
||||
0.7.35: Bug Fixed
|
||||
yeah, only bug fixed
|
||||
|
||||
0.7.34:Voice Update+
|
||||
0.7.34: Voice Update+
|
||||
replace most voice
|
||||
shaking FX more natural
|
||||
|
||||
0.7.33+:Bot Update
|
||||
0.7.33+: Bot Update
|
||||
MORE POWERFUL 9-stack AI
|
||||
add stereo-setting slider
|
||||
code optimized
|
||||
bug fixed
|
||||
|
||||
0.7.32:Virtualkey Update+
|
||||
0.7.32: Virtualkey Update+
|
||||
Blind-GM now show section directly
|
||||
easier&more standard classic mode
|
||||
can switch Virtualkey's auto dodging
|
||||
@@ -324,11 +432,11 @@ Future outlook:
|
||||
code optimized
|
||||
bug fixed
|
||||
|
||||
0.7.31:Stereo Update
|
||||
0.7.31: Stereo Update
|
||||
stereo system
|
||||
fixed a problem in finesse calculating
|
||||
|
||||
0.7.30:Virtualkey Update
|
||||
0.7.30: Virtualkey Update
|
||||
auto-tracking virtual key, adjustable parameters!
|
||||
can switch on/off virtuakeys
|
||||
add 7 more key
|
||||
@@ -339,26 +447,26 @@ Future outlook:
|
||||
adjusted GUI
|
||||
many bug fixed
|
||||
|
||||
0.7.28:Finesse Update
|
||||
0.7.28: Finesse Update
|
||||
add fineese check(almost useful)
|
||||
code optimized
|
||||
|
||||
0.7.27:O-spin Update+
|
||||
0.7.27: O-spin Update+
|
||||
super O transform system
|
||||
optimized light system(no used)
|
||||
optimized system(no used)
|
||||
bug fixed
|
||||
|
||||
0.7.26:Bug Fixed
|
||||
0.7.26: Bug Fixed
|
||||
new skin
|
||||
import light lib
|
||||
many bug fixed
|
||||
|
||||
0.7.25:Demo Update
|
||||
0.7.25: Demo Update
|
||||
demo play at main menu
|
||||
ALMOST reconstructed WHOLE PLAYER SYSTEM, NEED TEST
|
||||
many bug fixed
|
||||
|
||||
0.7.23/24:Feast of Hearing
|
||||
0.7.23/24: Feast of Hearing
|
||||
all bgm remade
|
||||
more settings with brand new GUI!
|
||||
new mode: Master-Final
|
||||
@@ -371,7 +479,7 @@ Future outlook:
|
||||
code optimized
|
||||
many bugs fixed
|
||||
|
||||
0.7.22:Graphics Update
|
||||
0.7.22: Graphics Update
|
||||
scoring system
|
||||
smooth dropping
|
||||
can change FX level
|
||||
@@ -387,12 +495,12 @@ Future outlook:
|
||||
support 10% step alpha of virtual key
|
||||
many code optimized&bugs fixed
|
||||
|
||||
0.7.21:Title Update
|
||||
0.7.21: Title Update
|
||||
new title image
|
||||
more GUI details
|
||||
many bugs fixed
|
||||
|
||||
0.7.20:Music Room Update
|
||||
0.7.20: Music Room Update
|
||||
add music room
|
||||
change block/space apperance in draw mode
|
||||
field shake animation
|
||||
@@ -400,7 +508,7 @@ Future outlook:
|
||||
can set BG/BGM in custom mode
|
||||
bug fixed
|
||||
|
||||
0.7.19:Voice Update
|
||||
0.7.19: Voice Update
|
||||
voice system added(voice by Miya)
|
||||
support macOS!
|
||||
new mode: C4W training
|
||||
@@ -411,7 +519,7 @@ Future outlook:
|
||||
new background/sound effect in master mode
|
||||
bug fixed
|
||||
|
||||
0.7.18:Skin Update
|
||||
0.7.18: Skin Update
|
||||
3 new block skins!(one skin origional by Miya(nya~))
|
||||
better restarting(to prevent mistakenly touching)
|
||||
switch display of puzzle mode
|
||||
@@ -419,7 +527,7 @@ Future outlook:
|
||||
code optimized
|
||||
default custom options changed to as infinite mode
|
||||
|
||||
0.7.17:Pause Update
|
||||
0.7.17: Pause Update
|
||||
display game stats when pause
|
||||
more options in statistics
|
||||
better pausing
|
||||
@@ -429,7 +537,7 @@ Future outlook:
|
||||
little optimized
|
||||
bugs fixed
|
||||
|
||||
0.7.16:Game Detail Update
|
||||
0.7.16: Game Detail Update
|
||||
change rules of custom puzzle mode
|
||||
change rules of TSD mode
|
||||
better pausing
|
||||
@@ -437,36 +545,40 @@ Future outlook:
|
||||
adjust difficulty of dig mode
|
||||
bugs fixed
|
||||
|
||||
0.7.15:Puzzle Update
|
||||
0.7.15: Puzzle Update
|
||||
can make puzzle by drawing mode
|
||||
can pause game with animation
|
||||
change icon of "Functional key"
|
||||
speed optimized
|
||||
bugs fixed
|
||||
|
||||
0.7.14:Creativity Update
|
||||
0.7.14: Creativity Update
|
||||
drawing mode in custom game
|
||||
adjustable virtual keys with mouse
|
||||
speed optimized
|
||||
rotate also create shade
|
||||
|
||||
0.7.13+:Small Update
|
||||
0.7.13+: Small Update
|
||||
change difficulty of survivor mode
|
||||
little game rule change
|
||||
bugs fixed(AI control error)
|
||||
|
||||
0.7.13:
|
||||
Chinese game name: 方块研究所
|
||||
SUPER COOL instant moving effect
|
||||
new b2b bar style & animation
|
||||
new transition animation
|
||||
change difficulty of master mode
|
||||
adjust delay algorithm(probably cause controlfeel changing, please reset your DAS setting)
|
||||
code reconstructed
|
||||
bugs fixed(error when seq=his, size of custom oppo)
|
||||
debug key change to F8
|
||||
0.7.13:
|
||||
new:
|
||||
Chinese game name: 方块研究所
|
||||
SUPER COOL instant moving effect
|
||||
new b2b bar style & animation
|
||||
new transition animation
|
||||
changed:
|
||||
change difficulty of master mode
|
||||
adjust delay algorithm(probably cause controlfeel changing, please reset your DAS setting)
|
||||
code reconstructed
|
||||
debug key change to F8
|
||||
fixed:
|
||||
error when seq=his
|
||||
error game area size of custom opponent
|
||||
|
||||
0.7.12:Total Update
|
||||
0.7.12: Total Update
|
||||
AI learned to switch attack mode
|
||||
seperate master mode from marathon mode
|
||||
master mode more interesting
|
||||
@@ -480,7 +592,7 @@ Future outlook:
|
||||
some Chinese translaton editted
|
||||
[reconstruct event system]
|
||||
|
||||
0.7.11:Total Update
|
||||
0.7.11: Total Update
|
||||
some Chinese translaton editted
|
||||
add bone block in 2 hardest marathon(new block-fresh system)
|
||||
play sound when get badges in royale mode
|
||||
@@ -492,13 +604,13 @@ Future outlook:
|
||||
add QR code in help page
|
||||
change some detials
|
||||
|
||||
0.7.10:Small Update
|
||||
0.7.10: Small Update
|
||||
full Chinese translation
|
||||
add Classic mode
|
||||
change O spin's behaviour
|
||||
bugs fixed
|
||||
|
||||
0.7.9:O-spin Update
|
||||
0.7.9: O-spin Update
|
||||
O spin is a lie
|
||||
better attacking pointer
|
||||
language system
|
||||
@@ -507,7 +619,7 @@ Future outlook:
|
||||
code optimized
|
||||
bugs fixed
|
||||
|
||||
0.7.8:Performance Update
|
||||
0.7.8: Performance Update
|
||||
GPU usage decreased much more than before
|
||||
add virtual key animation
|
||||
display player's rank after death in royale mode
|
||||
@@ -516,7 +628,7 @@ Future outlook:
|
||||
code optimized
|
||||
bugs fixed
|
||||
|
||||
0.7.7:Mode Update
|
||||
0.7.7: Mode Update
|
||||
add dig mode
|
||||
add survivor mode
|
||||
combine some modes
|
||||
@@ -524,7 +636,7 @@ Future outlook:
|
||||
more SFXs
|
||||
bugs fixed
|
||||
|
||||
0.7.6:Mode Update
|
||||
0.7.6: Mode Update
|
||||
new font
|
||||
add DIFFICULTY selection
|
||||
virtual keys give visual feedback(PC/phone)
|
||||
@@ -537,7 +649,7 @@ Future outlook:
|
||||
fix all attacking bug of royale mode
|
||||
change sequence of TSD-only mode to bag7
|
||||
|
||||
0.7.5:Total Update
|
||||
0.7.5: Total Update
|
||||
reduce difficuly of PC training mode, and add more patterns
|
||||
reduce difficuly of death mode
|
||||
add PC challenge mode
|
||||
@@ -552,10 +664,10 @@ Future outlook:
|
||||
change sequence of TSD-only mode
|
||||
royale mode use LESS GPU
|
||||
|
||||
0.7.4:Bug Update
|
||||
0.7.4: Bug Update
|
||||
add a lot of bugs
|
||||
|
||||
0.7.3:Game Detail Update
|
||||
0.7.3: Game Detail Update
|
||||
add infinite target in custom
|
||||
fix TSD-only mode result+1 when finishing with a wrong clear
|
||||
change sequence generator of TSD-only mode
|
||||
@@ -563,7 +675,7 @@ Future outlook:
|
||||
Fix Screen flow
|
||||
smarter AI
|
||||
|
||||
0.7.2:Mode Update
|
||||
0.7.2: Mode Update
|
||||
add PC training mode
|
||||
add TSD-only mode
|
||||
remove non-sense s/z spin double
|
||||
@@ -571,12 +683,19 @@ Future outlook:
|
||||
grid BG changed
|
||||
smarter AI
|
||||
]=]
|
||||
|
||||
local find,sub=string.find,string.sub
|
||||
local L,n,p={},1,1
|
||||
local L,c={},0--list, \n counter,
|
||||
local p,p1=1,0--cut start/end pos
|
||||
local EOF=#S
|
||||
repeat
|
||||
p1=find(S,"\n",p)
|
||||
L[n]=sub(S,p,p1-1)
|
||||
n,p=n+1,p1+1
|
||||
until p1==EOF
|
||||
return L
|
||||
|
||||
while true do
|
||||
p1=find(S,"\n",p1+1)
|
||||
c=c+1
|
||||
if c==23 or p1==EOF then
|
||||
L[#L+1]=sub(S,p,p1-1)
|
||||
if p1==EOF then return L end
|
||||
p=p1+1
|
||||
c=0
|
||||
end
|
||||
end
|
||||
143
widgetList.lua
143
widgetList.lua
@@ -1,4 +1,4 @@
|
||||
local mobile=system=="Android"or system=="iOS"
|
||||
mobileHide=(system=="Android"or system=="iOS")and function()return true end
|
||||
local virtualkeySet={
|
||||
{
|
||||
{1, 80, 720-200, 80},--moveLeft
|
||||
@@ -71,36 +71,23 @@ local virtualkeySet={
|
||||
{20,1210, 50,30},--addRight
|
||||
},--PC key feedback(top&in a row)
|
||||
}
|
||||
local customSet={
|
||||
{3,20,1,1,7,1,1,1,3,4,1,2,3},
|
||||
{5,20,1,1,7,1,1,1,8,3,8,3,3},
|
||||
{1,22,1,1,7,3,1,1,8,4,1,7,7},
|
||||
{3,20,1,1,7,1,1,3,8,3,1,7,8},
|
||||
{25,11,8,11,4,1,2,1,8,3,1,4,9},
|
||||
}
|
||||
--λFuncs for widgets,delete at file end
|
||||
function defSet(n)
|
||||
return function()
|
||||
for i=1,#customSet[n]do
|
||||
customSel[i]=customSet[n][i]
|
||||
end
|
||||
BG.set(customRange.bg[customSel[12]])
|
||||
BGM.play(customRange.bgm[customSel[13]])
|
||||
end
|
||||
end
|
||||
function SETval(k) return function()return setting[k] end end
|
||||
function SETsto(k) return function(i)setting[k]=i end end
|
||||
function SETrev(k) return function()setting[k]=not setting[k] 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
|
||||
|
||||
--lambda Funcs for widgets,delete at file end
|
||||
local function SETval(k) return function()return setting[k] end end
|
||||
local function SETsto(k) return function(i)setting[k]=i end end
|
||||
local function SETrev(k) return function()setting[k]=not setting[k] end end
|
||||
local function pressKey(k) return function()love.keypressed(k) end end
|
||||
local function setPen(i) return function()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 newButton,newSwitch,newSlider=WIDGET.new.button,WIDGET.new.switch,WIDGET.new.slider
|
||||
|
||||
local C=color
|
||||
local Widget={
|
||||
local widgetList={
|
||||
load={},intro={},quit={},
|
||||
main={
|
||||
play= newButton(150,280,200,160,C.lightRed, 55,function()SCN.push()SCN.swapTo("mode")end, nil,"setting"),
|
||||
@@ -109,16 +96,12 @@ local Widget={
|
||||
help= newButton(150,460,200,160,C.lightYellow, 50,function()SCN.push()SCN.swapTo("help")end, nil,"stat"),
|
||||
stat= newButton(370,460,200,160,C.lightCyan, 43,function()SCN.push()SCN.swapTo("stat")end, nil,"qplay"),
|
||||
qplay= newButton(590,460,200,160,C.lightOrange, 43,function()SCN.push()loadGame(stat.lastPlay)end, nil,"lang"),
|
||||
lang= newButton(150,610,160,100,C.lightGreen, 45,function()
|
||||
setting.lang=setting.lang%LANG.getLen()+1
|
||||
LANG.set(setting.lang)
|
||||
TEXT.show(text.lang,370,610,50,"appear",1.6)
|
||||
end,nil,"quit"),
|
||||
lang= newButton(150,610,160,100,C.lightGreen, 45,function()SCN.push()SCN.swapTo("setting_lang")end, nil,"quit"),
|
||||
quit= newButton(590,610,160,100,C.lightGrey, 45,function()VOC.play("bye")SCN.swapTo("quit","slowFade")end,nil,"play"),
|
||||
},
|
||||
mode={
|
||||
draw= newButton(1100, 440,220,90,C.lightYellow, 40,function()SCN.push()SCN.swapTo("draw")end,function()return mapCam.sel~=71 and mapCam.sel~=72 end),
|
||||
custom=newButton(1100, 540,220,90,C.lightGreen, 40,function()SCN.push()SCN.swapTo("custom")end,function()return mapCam.sel~=71 and mapCam.sel~=72 end),
|
||||
draw= newButton(1100, 440,240,90,C.lightYellow, 40,function()SCN.push()SCN.swapTo("draw")end,function()return mapCam.sel~=71 and mapCam.sel~=72 end),
|
||||
custom= newButton(1100, 540,240,90,C.lightGreen, 40,function()SCN.push()SCN.swapTo("custom")end,function()return mapCam.sel~=71 and mapCam.sel~=72 end),
|
||||
start= newButton(1040, 655,180,80,C.lightGrey, 40,function()if mapCam.sel then SCN.push()loadGame(mapCam.sel)end end,function()return not mapCam.sel end),
|
||||
back= newButton(1200, 655,120,80,C.white, 40,SCN.back),
|
||||
--function()SCN.push()SCN.swapTo("custom")end
|
||||
@@ -135,11 +118,11 @@ local Widget={
|
||||
down= newButton(1000, 600,100,100,C.white, 45,function()sceneTemp=sceneTemp%#customID+1 end),
|
||||
left= newButton(880, 480,100,100,C.white, 45,pressKey("left")),
|
||||
right= newButton(1120, 480,100,100,C.white, 45,pressKey("right")),
|
||||
set1= newButton(640, 160,240,75, C.lightYellow, 35,defSet(1)),
|
||||
set2= newButton(640, 250,240,75, C.lightYellow, 35,defSet(2)),
|
||||
set3= newButton(640, 340,240,75, C.lightYellow, 35,defSet(3)),
|
||||
set4= newButton(640, 430,240,75, C.lightYellow, 35,defSet(4)),
|
||||
set5= newButton(640, 520,240,75, C.lightYellow, 35,defSet(5)),
|
||||
set1= newButton(640, 160,240,75, C.lightYellow, 35,pressKey("1")),
|
||||
set2= newButton(640, 250,240,75, C.lightYellow, 35,pressKey("2")),
|
||||
set3= newButton(640, 340,240,75, C.lightYellow, 35,pressKey("3")),
|
||||
set4= newButton(640, 430,240,75, C.lightYellow, 35,pressKey("4")),
|
||||
set5= newButton(640, 520,240,75, C.lightYellow, 35,pressKey("5")),
|
||||
back= newButton(640, 630,180,60, C.white, 35,SCN.back),
|
||||
},
|
||||
draw={
|
||||
@@ -181,13 +164,13 @@ local Widget={
|
||||
resetGameData()
|
||||
SCN.swapTo("play","none")
|
||||
end),
|
||||
setting=newButton(1130,70,180,90,C.lightBlue,35,function()
|
||||
setting=newButton(1120,70,240,90,C.lightBlue,35,function()
|
||||
SCN.push()SCN.swapTo("setting_sound")
|
||||
end),
|
||||
quit= newButton(640,600,240,100,C.white,35,SCN.back),
|
||||
},
|
||||
setting_game={
|
||||
graphic=newButton(200,80,240,80,C.lightCyan,35,function()SCN.swapTo("setting_graphic")end, nil,"sound"),
|
||||
graphic=newButton(200,80,240,80,C.lightCyan,35,function()SCN.swapTo("setting_video")end, nil,"sound"),
|
||||
sound= newButton(1080,80,240,80,C.lightCyan,35,function()SCN.swapTo("setting_sound")end, nil,"ctrl"),
|
||||
ctrl= newButton(290,220,320,80,C.lightYellow,35,function()SCN.push()SCN.swapTo("setting_control")end, nil,"key"),
|
||||
key= newButton(640,220,320,80,C.lightGreen,35,function()SCN.push()SCN.swapTo("setting_key")end, nil,"touch"),
|
||||
@@ -204,38 +187,42 @@ local Widget={
|
||||
fine= newSwitch(1050,540,20, SETval("fine"), SETrev("fine"), nil,"back"),
|
||||
back= newButton(1140,650,200,80,C.white,40,SCN.back, nil,"graphic"),
|
||||
},
|
||||
setting_graphic={
|
||||
setting_video={
|
||||
sound= newButton(200,80,240,80,C.lightCyan,35,function()SCN.swapTo("setting_sound")end, nil,"game"),
|
||||
game= newButton(1080,80,240,80,C.lightCyan,35,function()SCN.swapTo("setting_game")end, nil,"ghost"),
|
||||
ghost= newSwitch(230,180,35, SETval("ghost"), SETrev("ghost"), nil,"smooth"),
|
||||
smooth= newSwitch(230,260,25, SETval("smooth"), SETrev("smooth"), nil,"center"),
|
||||
center= newSwitch(480,180,35, SETval("center"), SETrev("center"), nil,"grid"),
|
||||
grid= newSwitch(480,260,30, SETval("grid"), SETrev("grid"), nil,"bagLine"),
|
||||
ghost= newSwitch(250,180,35, SETval("ghost"), SETrev("ghost"), nil,"smooth"),
|
||||
smooth= newSwitch(250,260,25, SETval("smooth"), SETrev("smooth"), nil,"center"),
|
||||
center= newSwitch(500,180,35, SETval("center"), SETrev("center"), nil,"grid"),
|
||||
grid= newSwitch(500,260,30, SETval("grid"), SETrev("grid"), nil,"bagLine"),
|
||||
bagLine=newSwitch(730,180,30, SETval("bagLine"), SETrev("bagLine"), nil,"lockFX"),
|
||||
lockFX= newSlider(310,340,373,3,35,nil, SETval("lockFX"), SETsto("lockFX"), nil,"dropFX"),
|
||||
dropFX= newSlider(310,410,373,5,35,nil, SETval("dropFX"), SETsto("dropFX"), nil,"shakeFX"),
|
||||
shakeFX=newSlider(310,480,373,5,35,nil, SETval("shakeFX"), SETsto("shakeFX"), nil,"atkFX"),
|
||||
atkFX= newSlider(310,550,373,5,35,nil, SETval("atkFX"), SETsto("atkFX"), nil,"frame"),
|
||||
frame= newSlider(310,620,373,10,35,nil,function()return setting.frameMul>35 and setting.frameMul/10 or setting.frameMul/5-4 end,function(i)setting.frameMul=i<5 and 5*i+20 or 10*i end,nil,"text"),
|
||||
text= newSwitch(990,180,35,SETval("text"),SETrev("text"),nil,"fullscreen"),
|
||||
fullscreen=newSwitch(990,260,35,SETval("fullscreen"),function()
|
||||
lockFX= newSlider(350,340,373,3,32,nil, SETval("lockFX"), SETsto("lockFX"), nil,"dropFX"),
|
||||
dropFX= newSlider(350,400,373,5,32,nil, SETval("dropFX"), SETsto("dropFX"), nil,"clearFX"),
|
||||
clearFX=newSlider(350,460,373,3,32,nil, SETval("clearFX"), SETsto("clearFX"), nil,"shakeFX"),
|
||||
shakeFX=newSlider(350,520,373,5,32,nil, SETval("shakeFX"), SETsto("shakeFX"), nil,"atkFX"),
|
||||
atkFX= newSlider(350,580,373,5,32,nil, SETval("atkFX"), SETsto("atkFX"), nil,"frame"),
|
||||
frame= newSlider(350,640,373,10,30,nil,function()return setting.frameMul>35 and setting.frameMul/10 or setting.frameMul/5-4 end,function(i)setting.frameMul=i<5 and 5*i+20 or 10*i end,nil,"text"),
|
||||
text= newSwitch(1050,180,35,SETval("text"),SETrev("text"),nil,"fullscreen"),
|
||||
fullscreen=newSwitch(1050,260,35,SETval("fullscreen"),function()
|
||||
setting.fullscreen=not setting.fullscreen
|
||||
love.window.setFullscreen(setting.fullscreen)
|
||||
love.resize(love.graphics.getWidth(),love.graphics.getHeight())
|
||||
end,nil,"bg"),
|
||||
bg= newSwitch(990,330,35,SETval("bg"),function()
|
||||
bg= newSwitch(1050,340,35,SETval("bg"),function()
|
||||
BG.set("none")
|
||||
setting.bg=not setting.bg
|
||||
BG.set("space")
|
||||
end,nil,"power"),
|
||||
power= newSwitch(1050,420,35,SETval("powerInfo"),function()
|
||||
setting.powerInfo=not setting.powerInfo
|
||||
end,nil,"back"),
|
||||
back= newButton(1140,650,200,80,C.white,40,SCN.back,nil,"sound"),
|
||||
},
|
||||
setting_sound={
|
||||
game= newButton(200,80,240,80,C.lightCyan,35,function()SCN.swapTo("setting_game")end, nil,"graphic"),
|
||||
graphic=newButton(1080,80,240,80,C.lightCyan,35,function()SCN.swapTo("setting_graphic")end, nil,"sfx"),
|
||||
graphic=newButton(1080,80,240,80,C.lightCyan,35,function()SCN.swapTo("setting_video")end, nil,"sfx"),
|
||||
sfx= newSlider(180,250,400,10,35,function()SFX.play("blip_1")end, SETval("sfx"), SETsto("sfx"), nil,"bgm"),
|
||||
bgm= newSlider(750,250,400,10,35,function()BGM.freshVolume()end, SETval("bgm"), SETsto("bgm"), nil,"vib"),
|
||||
vib= newSlider(180,440,400,5 ,28,function()VIB(1)end, SETval("vib"), SETsto("vib"), nil,"voc"),
|
||||
vib= newSlider(180,440,400,5 ,28,function()VIB(2)end, SETval("vib"), SETsto("vib"), nil,"voc"),
|
||||
voc= newSlider(750,440,400,10,32,function()VOC.play("nya")end, SETval("voc"), SETsto("voc"), nil,"stereo"),
|
||||
stereo= newSlider(180,630,400,10,35,function()SFX.play("move",1,-1)SFX.play("lock",1,1)end, SETval("stereo"), SETsto("stereo"),function()return setting.sfx==0 end,"back"),
|
||||
back= newButton(1140,650,200,80,C.white,40,SCN.back,nil,"game"),
|
||||
@@ -260,8 +247,8 @@ local Widget={
|
||||
back=newButton(1140,650,200,80,C.white,45,SCN.back),
|
||||
},
|
||||
setting_skin={
|
||||
prev= newButton(700,100,140,100,C.white,50,function()skin.prevSet()end),
|
||||
next= newButton(860,100,140,100,C.white,50,function()skin.nextSet()end),
|
||||
prev= newButton(700,100,140,100,C.white,50,function()SKIN.prevSet()end),
|
||||
next= newButton(860,100,140,100,C.white,50,function()SKIN.nextSet()end),
|
||||
prev1= newButton(130,230,90,65,C.white,30,prevSkin(1)),
|
||||
prev2= newButton(270,230,90,65,C.white,30,prevSkin(2)),
|
||||
prev3= newButton(410,230,90,65,C.white,30,prevSkin(3)),
|
||||
@@ -286,7 +273,7 @@ local Widget={
|
||||
--spin6=newButton(825,540,90,65,C.white,30,nextDir(6)),--cannot rotate O
|
||||
spin7= newButton(970,540,90,65,C.white,30,nextDir(7)),
|
||||
|
||||
skinR= newButton(200,640,220,80,C.lightPurple,35,function()setting.skin={1,5,2,8,10,3,7}SFX.play("rotate")end),
|
||||
skinR= newButton(200,640,220,80,C.lightPurple,35,function()setting.skin={1,5,8,2,10,3,7}SFX.play("rotate")end),
|
||||
faceR= newButton(480,640,220,80,C.lightRed,35,function()setting.face={0,0,0,0,0,0,0}SFX.play("hold")end),
|
||||
back= newButton(1140,650,200,80,C.white,40,SCN.back),
|
||||
},
|
||||
@@ -350,14 +337,15 @@ local Widget={
|
||||
pro= newButton(1120,100, 240,80,C.white,35,function()for i=1,20 do VK_org[i].ava=true end end),
|
||||
hide= newSwitch(1170,200, 40,SETval("VKSwitch"),SETrev("VKSwitch")),
|
||||
track= newSwitch(1170,300, 35,SETval("VKTrack"),SETrev("VKTrack")),
|
||||
sound= newSwitch(850,400, 35,SETval("VKSound"),SETrev("VKSound")),
|
||||
sfx= newSlider(800,380,180,4,40,function()SFX.play("virtualKey",setting.VKSFX*.25)end,SETval("VKSFX"),SETsto("VKSFX")),
|
||||
vib= newSlider(800,460,180,2,40,function()VIB(setting.VKVIB)end,SETval("VKVIB"),SETsto("VKVIB")),
|
||||
icon= newSwitch(850,300, 40,SETval("VKIcon"),SETrev("VKIcon")),
|
||||
tkset= newButton(1120,400,240,80,C.white,32,function()
|
||||
tkset= newButton(1120,420,240,80,C.white,32,function()
|
||||
SCN.push()
|
||||
SCN.swapTo("setting_trackSetting")
|
||||
end,function()return not setting.VKTrack end),
|
||||
alpha= newSlider(840,490,400,10,40,nil,SETval("VKAlpha"),SETsto("VKAlpha")),
|
||||
back= newButton(1100,600,240,80,C.white,45,SCN.back),
|
||||
alpha= newSlider(840,540,400,10,40,nil,SETval("VKAlpha"),SETsto("VKAlpha")),
|
||||
back= newButton(1120,620,200,80,C.white,45,SCN.back),
|
||||
},
|
||||
setting_trackSetting={
|
||||
VKDodge=newSwitch(400,200, 35,SETval("VKDodge"),SETrev("VKDodge")),
|
||||
@@ -365,27 +353,38 @@ local Widget={
|
||||
VKCurW= newSlider(140,370,1000,10,35,nil,SETval("VKCurW"),function(i)setting.VKCurW=i;setting.VKTchW=math.min(setting.VKTchW,i)end),
|
||||
back= newButton(1080,600,240,80,C.white,45,SCN.back),
|
||||
},
|
||||
setting_lang={
|
||||
chi= newButton(160,100,200,120,C.white,45,setLang(1),nil,"chi2"),
|
||||
chi2= newButton(380,100,200,120,C.white,45,setLang(2),nil,"eng"),
|
||||
eng= newButton(600,100,200,120,C.white,45,setLang(3),nil,"str"),
|
||||
str= newButton(820,100,200,120,C.white,45,setLang(4),nil,"back"),
|
||||
back= newButton(640,600,200,80,C.white,40,SCN.back,nil,"chi"),
|
||||
},
|
||||
help={
|
||||
his= newButton(1050,500,250,80,C.white,35,function()SCN.push()SCN.swapTo("history")end,nil,"back"),
|
||||
qq= newButton(1050,600,250,80,C.white,35,function()love.system.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end,function()return mobile end,"his"),
|
||||
back= newButton(640, 600,200,80,C.white,40,SCN.back,nil,"qq"),
|
||||
qq= newButton(1050,600,250,80,C.white,35,function()love.system.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end,mobileHide,"his"),
|
||||
back= newButton(640,600,200,80,C.white,40,SCN.back,nil,"qq"),
|
||||
},
|
||||
history={
|
||||
prev= newButton(1155,170,180,180,C.white,65,pressKey("up"),function()return sceneTemp[2]==1 end),
|
||||
next= newButton(1155,400,180,180,C.white,65,pressKey("down"),function()return sceneTemp[2]==#sceneTemp[1]-22 end),
|
||||
next= newButton(1155,400,180,180,C.white,65,pressKey("down"),function()return sceneTemp[2]==#sceneTemp[1]end),
|
||||
back= newButton(1155,600,180,90,C.white,40,SCN.back),
|
||||
},
|
||||
stat={
|
||||
path= newButton(980,620,250,80,C.white,25,function()love.system.openURL(love.filesystem.getSaveDirectory())end,function()return mobile end,"back"),
|
||||
path= newButton(980,620,250,80,C.white,25,function()love.system.openURL(love.filesystem.getSaveDirectory())end,mobileHide,"back"),
|
||||
back= newButton(640,620,200,80,C.white,40,SCN.back,nil,"path"),
|
||||
},
|
||||
}
|
||||
defSet,SETval,SETsto,SETrev,pressKey,setPen,prevSkin,nextSkin,nextDir,VKAdisp,VKAcode=nil
|
||||
for _,L in next,Widget do
|
||||
mobileHide,SETval,SETsto,SETrev=nil
|
||||
pressKey,setPen,prevSkin,nextSkin=nil
|
||||
nextDir,VKAdisp,VKAcode,setLang=nil
|
||||
newButton,newSwitch,newSlider=nil
|
||||
|
||||
for _,L in next,widgetList do
|
||||
for _,W in next,L do
|
||||
if W.next then
|
||||
W.next,L[W.next].prev=L[W.next],W
|
||||
end
|
||||
end
|
||||
end
|
||||
return Widget
|
||||
return widgetList
|
||||
Reference in New Issue
Block a user