Compare commits

..

4 Commits

Author SHA1 Message Date
MrZ_26
7d63386410 0.8.16Fantastic Global Update 2020-04-30 01:23:11 +08:00
MrZ_26
e88553bc00 0.8.15Bug Fixed 2020-04-30 01:23:11 +08:00
MrZ_26
4652be7067 0.8.14 2020-04-30 01:23:11 +08:00
MrZ_26
ed0f8031d0 0.8.13 2020-04-30 01:23:11 +08:00
114 changed files with 3122 additions and 2302 deletions

Binary file not shown.

View File

@@ -1,4 +1,4 @@
gameVersion="Alpha V0.8.12"
gameVersion="Alpha V0.8.16"
function love.conf(t)
t.identity="Techmino"--SaveDir name
t.version="11.1"
@@ -17,7 +17,7 @@ function love.conf(t)
W.resizable=true
W.fullscreentype="desktop"--"exclusive"
W.fullscreen=false
W.vsync=0--0:∞fps
W.vsync=0--∞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

View File

@@ -1,28 +1,31 @@
setting={
das=10,arr=2,
sddas=0,sdarr=2,
ihs=true,irs=true,ims=true,
reTime=10,
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
ghost=true,center=true,
smo=true,grid=false,
smooth=true,grid=false,
lockFX=2,
dropFX=3,
shakeFX=2,
atkFX=3,
frameMul=100,
text=true,
fullscreen=false,
bg=true,
bgspace=true,
lang=1,
skinSet=1,
skin={1,5,2,8,10,3,7},
--graphic
sfx=10,bgm=7,
@@ -40,13 +43,17 @@ setting={
--control
}
stat={
version=gameVersion,
run=0,game=0,time=0,
key=0,rotate=0,hold=0,
extraPiece=0,extraRate=0,
key=0,rotate=0,hold=0,piece=0,row=0,
atk=0,send=0,recv=0,pend=0,
clear_1=0,clear_2=0,clear_3=0,clear_4=0,
spin_0=0,spin_1=0,spin_2=0,spin_3=0,
b2b=0,b3b=0,pc=0,score=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}},
pc=0,hpc=0,b2b=0,b3b=0,score=0,
lastPlay=1,--last played mode ID
}
keyMap={
@@ -60,8 +67,8 @@ keyMap={
for i=1,#keyMap do for j=1,20 do
if not keyMap[i][j]then keyMap[i][j]=""end
end end
--Things related to virtualkey
VK_org={--Original set,for restore VK' position
VK_org={--Original virtualkey set,for restore VKs' position before each game
{ava=true, x=80, y=720-200, r=80},--moveLeft
{ava=true, x=320, y=720-200, r=80},--moveRight
{ava=true, x=1280-80, y=720-200, r=80},--rotRight

View File

@@ -1,5 +1,5 @@
游戏方法:
控制系统提供的一个个四联方块(左右移动和旋转90,180,270度),每填满场地的一行就会将其消除,根据消除方式会给对手攻击(如果有对手的话)
系统提供的一个个四联骨牌("方块",总共7种),玩家需要控制(左右移动和旋转90,180,270度),每填满场地的一行就会将其消除,根据消除方式会给对手攻击(如果有对手的话)
活到最后或者完成目标即胜利.
旋转系统:
@@ -16,10 +16,11 @@ spin判定:
特殊消除:
spin1/2/3攻击2/4/6,若mini则减半
B2B:加1(techrash/spin1/spin2)或2(spin3)攻击
B3B:在B2B效果之上再+1攻击和+1额外抵挡
连击:0,0,1,1,2,2,3,3,4,4,3……
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)
特殊消除会增加B2B点数,让之后的特殊消除获得B2B(B3B)增益(详细说明见下文)
PC:将上述伤害之和开根号,再+6~10(本局内递增)+2额外抵挡(注:本局消行数>4时会将B2B点数拉满)
半全消("下方有剩余方块"的全消,如果是I消1行则必须不剩余玩家放置的方块):伤害+2,额外抵挡+2
全消:将上述伤害之和开根号,再+6~10(本局内递增)+2额外抵挡(注:本局消行数>4时会将B2B点数拉满)
根据上述规则计算后,向下取整,攻击打出
分数系统:
@@ -52,4 +53,6 @@ back to back(B2B)点数说明:
自定义模式说明:
玩家可以自由调整大多数参数(不包括上述各种游戏模式的特殊效果),也可以画一个场地去消除或者是作为提示模板来进行拼图模式.
在拼图模式下,按功能键切换是否展示提示.其中打"X"的格子不允许有方块,空的格子可以是任何状态,普通的七种彩色方块必须颜色对应,垃圾行方块的为止只要有方块就可以,但是不能是空气,玩家拼出自己画的图后就会判定胜利.
在拼图模式下,按功能键切换是否展示提示.其中打"X"的格子不允许有方块,空的格子可以是任何状态,普通的七种彩色方块必须颜色对应,垃圾行方块的为止只要有方块就可以,但是不能是空气,玩家拼出自己画的图后就会判定胜利.
附录:
ZXC的Ospin地图:XY0BCgAwCAIR7v9vHtUSt8AS0xKqgpnNGyXkrmFNePf6qi3BbQPrHT2Owxe6D66NeKi86dwB

155
file.lua
View File

@@ -3,13 +3,7 @@ local int,max,min=math.floor,math.max,math.min
local sub,find=string.sub,string.find
local toN,toS=tonumber,tostring
local concat=table.concat
local FILE={
data= fs.newFile("data.dat"),
setting=fs.newFile("setting.dat"),
VK= fs.newFile("virtualkey.dat"),
keyMap= fs.newFile("key.dat"),
unlock= fs.newFile("unlock.dat"),
}
local function splitS(s,sep)
local t,n={},1
repeat
@@ -20,7 +14,6 @@ local function splitS(s,sep)
until #s==0
return t
end
local tabs={
[0]="",
"\t",
@@ -61,16 +54,28 @@ local function dumpTable(L,t)
end
return s..tabs[t-1].."}"
end
local function addToTable(G,base)--push all values to base
local function addToTable(G,base)--refresh default base with G-values
for k,v in next,G do
if type(v)=="table"and type(base[k])=="table"then
addToTable(v,base[k])
else
base[k]=v
if type(v)==type(base[k])then
if type(v)=="table"then
addToTable(v,base[k])
else
base[k]=v
end
end
end
end
function loadRecord(N)
local files={
data= fs.newFile("data.dat"),
setting=fs.newFile("setting.dat"),
VK= fs.newFile("virtualkey.dat"),
keyMap= fs.newFile("key.dat"),
unlock= fs.newFile("unlock.dat"),
}
local File={}
function File.loadRecord(N)
local F=fs.newFile(N..".dat")
if F:open("r")then
local s=loadstring(F:read())
@@ -83,21 +88,21 @@ function loadRecord(N)
end
end
end
function saveRecord(N,L)
function File.saveRecord(N,L)
local F=fs.newFile(N..".dat")
F:open("w")
local _,mes=F:write(dumpTable(L))
F:flush()F:close()
if not _ then
TEXT(text.recSavingError..mes,1140,650,20,"sudden",.5)
TEXT.show(text.recSavingError..(mes or"unknown error"),1140,650,20,"sudden",.5)
end
end
function delRecord(N)
function File.delRecord(N)
fs.remove(N..".dat")
end
function loadUnlock()
local F=FILE.unlock
function File.loadUnlock()
local F=files.unlock
if F:open("r")then
local s=F:read()
if s:sub(1,6)~="return"then s="return{"..s.."}"end
@@ -109,18 +114,18 @@ function loadUnlock()
end
end
end
function saveUnlock()
local F=FILE.unlock
function File.saveUnlock()
local F=files.unlock
F:open("w")
local _,mes=F:write(dumpTable(modeRanks))
F:flush()F:close()
if not _ then
TEXT(text.unlockSavingError..mes,1140,650,20,"sudden",.5)
TEXT.show(text.unlockSavingError..(mes or"unknown error"),1140,650,20,"sudden",.5)
end
end
function loadData()
local F=FILE.data
function File.loadData()
local F=files.data
if F:open("r")then
local s=F:read()
if s:sub(1,6)~="return"then
@@ -130,25 +135,69 @@ function loadData()
F:close()
if s then
setfenv(s,{})
addToTable(s(),stat)
local S=s()
if S.version~=gameVersion then
S.version=gameVersion
S.clear_S={S.clear_1,S.clear_2,S.clear_3,S.clear_4}
S.clear={{},{},{},{},{},{},{}}
local A,B,C,D=int(S.clear_1/7),int(S.clear_2/7),int(S.clear_3/7),int(S.clear_4/7)
for i=1,7 do
S.clear[i][1]=A
S.clear[i][2]=B
S.clear[i][3]=C
S.clear[i][4]=D
end
for i=1,S.clear_1%7 do S.clear[i][1]=S.clear[i][1]+1 end
for i=1,S.clear_2%7 do S.clear[i][2]=S.clear[i][2]+1 end
for i=1,S.clear_3%7 do S.clear[i][3]=S.clear[i][3]+1 end
for i=1,S.clear_4%7 do S.clear[i][4]=S.clear[i][4]+1 end
S.clear_B={}
for i=1,7 do
S.clear_B[i]=S.clear[i][1]+S.clear[i][2]+S.clear[i][3]+S.clear[i][4]
end
S.spin_S={S.spin_0,S.spin_1,S.spin_2,S.spin_3}
S.spin={{},{},{},{},{},{},{}}
A,B,C,D=int(S.spin_0/7),int(S.spin_1/7),int(S.spin_2/7),int(S.spin_3/7)
for i=1,7 do
S.spin[i][1]=A
S.spin[i][2]=B
S.spin[i][3]=C
S.spin[i][4]=D
end
for i=1,S.spin_0%7 do S.spin[i][1]=S.spin[i][1]+1 end
for i=1,S.spin_1%7 do S.spin[i][2]=S.spin[i][2]+1 end
for i=1,S.spin_2%7 do S.spin[i][3]=S.spin[i][3]+1 end
for i=1,S.spin_3%7 do S.spin[i][4]=S.spin[i][4]+1 end
S.spin_B={}
for i=1,7 do
S.spin_B[i]=S.spin[i][1]+S.spin[i][2]+S.spin[i][3]+S.spin[i][4]
end
S.hpc=S.c
TEXT.show(text.newVersion,640,200,30,"fly",.3)
end
addToTable(S,stat)
end
end
end
function saveData()
local F=FILE.data
function File.saveData()
local F=files.data
F:open("w")
local _,mes=F:write(dumpTable(stat))
F:flush()F:close()
if not _ then
TEXT(text.statSavingError..mes,1140,650,20,"sudden",.5)
TEXT.show(text.statSavingError..(mes or"unknown error"),1140,650,20,"sudden",.5)
end
end
function loadSetting()
local F=FILE.setting
function File.loadSetting()
local F=files.setting
if F:open("r")then
local s=F:read()
if s:sub(1,6)~="return"then s="return{"..s.."}"end
if s:sub(1,6)~="return"then
s="return{"..s:gsub("\n",",").."}"
end
s=loadstring(s)
F:close()
if s then
@@ -157,18 +206,18 @@ function loadSetting()
end
end
end
function saveSetting()
local F=FILE.setting
function File.saveSetting()
local F=files.setting
F:open("w")
local _,mes=F:write(dumpTable(setting))
F:flush()F:close()
if _ then TEXT(text.settingSaved,1140,650,40,"sudden",.5)
else TEXT(text.settingSavingError..mes,1140,650,20,"sudden",.5)
if _ then TEXT.show(text.settingSaved,1140,650,40,"sudden",.5)
else TEXT.show(text.settingSavingError..(mes or"unknown error"),1140,650,20,"sudden",.5)
end
end
function loadKeyMap()
local F=FILE.keyMap
function File.loadKeyMap()
local F=files.keyMap
if F:open("r")then
local s=loadstring(F:read())
F:close()
@@ -178,18 +227,18 @@ function loadKeyMap()
end
end
end
function saveKeyMap()
local F=FILE.keyMap
function File.saveKeyMap()
local F=files.keyMap
F:open("w")
local _,mes=F:write(dumpTable(keyMap))
F:flush()F:close()
if _ then TEXT(text.keyMapSaved,1140,650,26,"sudden",.5)
else TEXT(text.keyMapSavingError..mes,1140,650,20,"sudden",.5)
if _ then TEXT.show(text.keyMapSaved,1140,650,26,"sudden",.5)
else TEXT.show(text.keyMapSavingError..(mes or"unknown error"),1140,650,20,"sudden",.5)
end
end
function loadVK()
local F=FILE.VK
function File.loadVK()
local F=files.VK
if F:open("r")then
local s=loadstring(F:read())
F:close()
@@ -199,23 +248,13 @@ function loadVK()
end
end
end
function saveVK()
local F=FILE.VK
function File.saveVK()
local F=files.VK
F:open("w")
local _,mes=F:write(dumpTable(VK_org))
F:flush()F:close()
if _ then TEXT(text.VKSaved,1140,650,26,"sudden",.5)
else TEXT(text.VKSavingError..mes,1140,650,20,"sudden",.5)
if _ then TEXT.show(text.VKSaved,1140,650,26,"sudden",.5)
else TEXT.show(text.VKSavingError..(mes or"unknown error"),1140,650,20,"sudden",.5)
end
end
if fs.getInfo("unlock.dat")then loadUnlock()end
if fs.getInfo("data.dat")then loadData()end
if fs.getInfo("key.dat")then loadKeyMap()end
if fs.getInfo("virtualkey.dat")then loadVK()end
if fs.getInfo("setting.dat")then loadSetting()
elseif system=="Android"or system=="iOS" then
setting.VKSwitch=true
setting.swap=false
setting.vib=2
end
return File

BIN
font.ttf

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

BIN
image/mess/pay1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
image/mess/pay2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@@ -9,19 +9,18 @@ local actName={
"落在最左:","落在最右:","列在最左:","列在最右:",
}
return{
anykey="按任意键继续",
newVersion="检测到更新!可能有部分数据被重新处理",
lang="中文",
atkModeName={"随机","徽章","击杀","反击"},
royale_remain=function(n)return"剩余 "..n.." 名玩家"end,
cmb={nil,nil,"3 Combo","4 Combo","5 Combo","6 Combo","7 Combo","8 Combo","9 Combo","10 Combo!","11 Combo!","12 Combo!","13 Combo!","14 Combo!","15 Combo!","16 Combo!","17 Combo!","18 Combo!","19 Combo!","MEGACMB"},
techrash="Techrash",
techrashB2B="B2B Techrash",
techrashB3B="B2B2B Techrash",
techrash="Techrash",techrashB2B="B2B Techrash",techrashB3B="B2B2B Techrash",
spin={"Z-spin","S-spin","L-spin","J-spin","T-spin","O-spin","I-spin"},
block={"Z","S","L","J","T","O","I"},
clear={" single"," double"," triple"},
spin={"Z-spin","S-spin","L-spin","J-spin","T-spin","O-spin","I-spin"},
b2b="B2B ",b3b="B2B2B ",
mini="Mini",
PC="Perfect Clear",
mini="Mini",b2b="B2B ",b3b="B2B2B ",
PC="Perfect Clear",HPC="Half Clear",
hold="暂存",next="下一个",
stage=function(n)return"关卡 "..n end,
@@ -37,6 +36,11 @@ return{
pause="暂停",
pauseCount="暂停统计",
atk="ATK",
spd="SPD",
recv="RECV",
eff="EFF",
custom="自定义游戏",
customOption={
drop="下落速度:",
@@ -72,12 +76,14 @@ return{
setting_game="游戏设置",
setting_graphic="画面设置",
setting_sound="声音设置",
setting_control="控制设置",
setting_skin="外观设置",
preview="预览",
keyboard="键盘",joystick="手柄",
ctrlSetHelp="方向键选择/翻页,回车修改,esc返回",
blockLayout="外观设置",
musicRoom="音乐室",
nowPlaying="正在播放:",
settingSaved="设置已保存",
settingSavingError="设置保存失败:",
keyMapSaved="键位设置已保存",
@@ -87,7 +93,7 @@ return{
statSavingError="统计保存失败:",
unlockSavingError="解锁保存失败:",
recSavingError="纪录保存失败:",
needRestart="重新开始以生效",
copySuccess="已复制到剪切板",
dataCorrupted="数据损坏",
@@ -101,40 +107,31 @@ return{
actName=actName,
load={[0]="加载完成","加载语音ing","加载音乐ing","加载音效ing","加载模式ing","加载乱七八糟的东西ing"},
load={[0]="加载完成","加载语音ing","加载音乐ing","加载音效ing","加载图片ing","加载模式ing","加载乱七八糟的东西ing"},
pauseStat={
"时间:",
"按键/旋转/暂存:",
"使用方块:",
"消行:",
"攻击:",
"发送数:",
"接收数:",
"直接消除数:",
"旋转消除数:",
"满贯数:",
"全清数:",
"效率:",
"多余操作方块:",
"最简操作率:",
"块:",
"消行/挖掘:",
"攻击/挖掘攻击:",
"上涨/接收/抵消:",
"B2B/B3B/PC/HPC:",
"Finesse:",
},
stat={
spin="spin0~3",
clear="clear1~4",
"游戏运行次数:",
"游戏局数:",
"游戏时间:",
"按键:",
"旋转数:",
"暂存数:",
"方块使用:",
"消行数:",
"攻击(发送)数:",
"接收数:",
"直接消除数:",
"旋转消除数:",
"满贯数:",
"全清数:",
"效率:",
"多余操作:",
"按键/旋转/暂存:",
"方块/消行/攻击:",
"接收/抵消/上涨:",
"挖掘/挖掘攻击:",
"效率/挖掘效率:",
"多余操作/极简率:",
"满贯/大满贯:",
"全/半清:",
},
help={
"好像也没啥好帮助的吧?就当是关于了",
@@ -143,11 +140,11 @@ return{
"",
"使用LOVE2D引擎",
"作者:MrZ 邮箱:1046101471@qq.com",
"程序:MrZ 美术:MrZ 音乐:MrZ 音效:MrZ 语音:Miya",
"程序:MrZ 美术:MrZ 音乐:MrZ 音效:MrZ 语音:MrZ/Miya",
"特别感谢:Flyz,Farter,196,Teatube,T830,[所有内测人员]和 你!",
"",
"错误或者建议请附带截图发送到内测群或者作者邮箱~",
"游戏现在仅通过内测群1057456078进行免费下载/更新",
"仅通过唯一内测群1057456078进行免费下载/更新",
"其他渠道获得游戏皆有被修改/植入病毒的风险,程序只申请了震动&联网权限!",
"若由于被修改的本游戏产生的各种损失作者不负责(我怎么负责啊跟我有啥关系)",
"请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~",
@@ -162,7 +159,7 @@ return{
simple-love-lights[dylhunn]
]],
support="支持作者",
group="官方QQ群",
group="官方QQ群(如果没有被暗改的话就是这个):822023725",
WidgetText={
main={
play="开始",
@@ -201,18 +198,6 @@ return{
},
draw={
any="不定",
block1="Z",
block2="S",
block3="L",
block4="J",
block5="T",
block6="O",
block7="I",
gb1="",
gb2="",
gb3="",
gb4="",
gb5="",
space="×",
clear="清除",
demo="不显示×",
@@ -232,16 +217,12 @@ return{
setting_game={
graphic="←画面设置",
sound="声音设置→",
reset="重置DAS/ARR",
dasD="-",dasU="+",
arrD="-",arrU="+",
sddasD="-",sddasU="+",
sdarrD="-",sdarrU="+",
ctrl="控制设置",
reTime="开局等待时间",
maxNext="最大预览数量",
autoPause="自动暂停",
layout="外观",
ctrl="键位设置",
key="键位设置",
touch="触屏设置",
quickR="快速重新开始",
autoPause="自动暂停",
@@ -256,11 +237,12 @@ return{
grid="网格",
center="旋转中心",
bg="背景",
bgspace="星空背景",
smo="平滑下落",
smooth="平滑下落",
lockFX="锁定特效等级",
dropFX="下落特效等级",
shakeFX="晃动特效等级",
atkFX="攻击特效等级",
text="消行文本",
fullscreen="全屏",
frame="绘制帧率",
back=BK,
@@ -275,6 +257,15 @@ return{
stereo="立体声",
back=BK,
},
setting_control={
das="DAS",arr="ARR",
sddas="软降DAS",sdarr="软降ARR",
ihs="提前Hold",
irs="提前旋转",
ims="提前移动",
reset="重置",
back=BK,
},
setting_key={
back=BK,
},
@@ -287,7 +278,8 @@ return{
prev5="",next5="",spin5="R",
prev6="",next6="",spin6="R",
prev7="",next7="",spin7="R",
reset="重置方向",
skinR="重置配色",
faceR="重置方向",
back=BK,
},
setting_touch={

View File

@@ -9,19 +9,18 @@ local actName={
"落在最左:","落在最右:","列在最左:","列在最右:",
}
return{
anykey="按任意键继续",
newVersion="检测到更新!可能有部分数据被重新处理",
lang="全中文",
atkModeName={"随机","徽章","击杀","反击"},
royale_remain=function(n)return"剩余 "..n.." 名玩家"end,
cmb={nil,nil,"3 Combo","4 Combo","5 Combo","6 Combo","7 Combo","8 Combo","9 Combo","10 Combo!","11 Combo!","12 Combo!","13 Combo!","14 Combo!","15 Combo!","16 Combo!","17 Combo!","18 Combo!","19 Combo!","MEGACMB"},
techrash="四清",
techrashB2B="满贯 四清",
techrashB3B="大满贯 四清",
techrash="四清",techrashB2B="满贯 四清",techrashB3B="大满贯 四清",
spin={"Z型回旋","S型回旋","L型回旋","J型回旋","T型回旋","O型回旋","I型回旋"},
block={"Z","S","L","J","T","O","I"},
clear={"单清","双清","三清"},
spin={"Z型回旋","S型回旋","L型回旋","J型回旋","T型回旋","O型回旋","I型回旋"},
b2b="满贯",b3b="大满贯",
mini="迷你",
PC="场地全清",
mini="迷你",b2b="满贯",b3b="大满贯",
PC="场地全清",HPC="场地半清",
hold="暂存",next="下一个",
stage=function(n)return"关卡 "..n end,
@@ -37,6 +36,11 @@ return{
pause="暂停",
pauseCount="暂停统计",
atk="",
spd="",
recv="",
eff="",
custom="自定义游戏",
customOption={
drop="下落速度:",
@@ -66,15 +70,15 @@ return{
freshLimit={0,8,15,""},
opponent={"无电脑","9S Lv1","9S Lv2","9S Lv3","9S Lv4","9S Lv5","CC Lv1","CC Lv2","CC Lv3","CC Lv4","CC Lv5","CC Lv6"},
},
softdropdas="软降DAS:",
softdroparr="软降ARR:",
snapLevelName={"无吸附","10px吸附","20px吸附","40px吸附","60px吸附","80px吸附"},
setting_game="游戏设置",
setting_graphic="画面设置",
setting_sound="声音设置",
setting_control="控制设置",
setting_skin="外观设置",
preview="预览",
keyboard="键盘",joystick="手柄",
ctrlSetHelp="方向键选择/翻页,回车修改,esc返回",
blockLayout="外观设置",
musicRoom="音乐室",
nowPlaying="正在播放:",
@@ -87,7 +91,7 @@ return{
statSavingError="统计保存失败:",
unlockSavingError="解锁保存失败:",
recSavingError="纪录保存失败:",
needRestart="重新开始以生效",
copySuccess="已复制到剪切板",
dataCorrupted="数据损坏",
@@ -101,40 +105,31 @@ return{
actName=actName,
load={[0]="加载完成","加载语音ing","加载音乐ing","加载音效ing","加载模式ing","加载乱七八糟的东西ing"},
load={[0]="加载完成","加载语音ing","加载音乐ing","加载音效ing","加载图片ing","加载模式ing","加载乱七八糟的东西ing"},
pauseStat={
"时间:",
"按键/旋转/暂存:",
"使用方块:",
"消行:",
"攻击:",
"发送数:",
"接收数:",
"直接消除数:",
"旋转消除数:",
"满贯数:",
"全清数:",
"效率:",
"多余操作方块:",
"最简操作率:",
"块:",
"消行/挖掘:",
"攻击/挖掘攻击:",
"上涨/接收/抵消:",
"(大)满贯/全(半)清:",
"非极简操作:",
},
stat={
spin="回旋0~3",
clear="消除1~4",
"游戏运行次数:",
"游戏局数:",
"游戏时间:",
"按键:",
"旋转数:",
"暂存数:",
"方块使用:",
"消行数:",
"攻击(发送)数:",
"接收数:",
"直接消除数:",
"旋转消除数:",
"满贯数:",
"全清数:",
"效率:",
"多余操作:",
"按键/旋转/暂存:",
"方块/消行/攻击:",
"接收/抵消/上涨:",
"挖掘/挖掘攻击:",
"效率/挖掘效率:",
"多余操作/极简率:",
"满贯/大满贯:",
"全/半清:",
},
help={
"好像也没啥好帮助的吧?就当是关于了",
@@ -143,11 +138,11 @@ return{
"",
"使用LOVE2D引擎",
"作者:MrZ 邮箱:1046101471@qq.com",
"程序:MrZ 美术:MrZ 音乐:MrZ 音效:MrZ 语音:Miya",
"程序:MrZ 美术:MrZ 音乐:MrZ 音效:MrZ 语音:MrZ/Miya",
"特别感谢:Flyz,Farter,196,Teatube,T830,[所有内测人员]和 你!",
"",
"错误或者建议请附带截图发送到内测群或者作者邮箱~",
"游戏现在仅通过内测群1057456078进行免费下载/更新",
"仅通过唯一内测群1057456078进行免费下载/更新",
"其他渠道获得游戏皆有被修改/植入病毒的风险,程序只申请了震动&联网权限!",
"若由于被修改的本游戏产生的各种损失作者不负责(我怎么负责啊跟我有啥关系)",
"请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~",
@@ -162,7 +157,7 @@ return{
simple-love-lights[dylhunn]
]],
support="支持作者",
group="官方QQ群",
group="官方QQ群(如果没有被暗改的话就是这个):822023725",
WidgetText={
main={
play="开始",
@@ -176,7 +171,7 @@ return{
},
mode={
draw="画图(Q)",
custon="参数(E)",
custom="参数(E)",
start="开始",
back=BK,
},
@@ -201,18 +196,6 @@ return{
},
draw={
any="不定",
block1="Z",
block2="S",
block3="L",
block4="J",
block5="T",
block6="O",
block7="I",
gb1="",
gb2="",
gb3="",
gb4="",
gb5="",
space="×",
clear="清除",
demo="不显示×",
@@ -232,16 +215,12 @@ return{
setting_game={
graphic="←画面设置",
sound="声音设置→",
reset="重置DAS/ARR",
dasD="-",dasU="+",
arrD="-",arrU="+",
sddasD="-",sddasU="+",
sdarrD="-",sdarrU="+",
ctrl="控制设置",
reTime="开局等待时间",
maxNext="最大预览数量",
autoPause="自动暂停",
layout="外观",
ctrl="键位设置",
key="键位设置",
touch="触屏设置",
quickR="快速重新开始",
swap="组合键切换攻击模式",
@@ -255,11 +234,12 @@ return{
grid="网格",
center="旋转中心",
bg="背景",
bgspace="星空背景",
smo="平滑下落",
smooth="平滑下落",
lockFX="锁定特效等级",
dropFX="下落特效等级",
shakeFX="晃动特效等级",
atkFX="攻击特效等级",
text="消行文本",
fullscreen="全屏",
frame="绘制帧率",
back=BK,
@@ -274,6 +254,15 @@ return{
stereo="立体声",
back=BK,
},
setting_control={
das="首次移动延迟",arr="移动重复延迟",
sddas="首次软降延迟",sdarr="软降重复延迟",
ihs="提前暂存",
irs="提前旋转",
ims="提前移动",
reset="重置",
back=BK,
},
setting_key={
back=BK,
},
@@ -286,7 +275,8 @@ return{
prev5="",next5="",spin5="",
prev6="",next6="",spin6="",
prev7="",next7="",spin7="",
reset="重置方向",
skinR="重置配色",
faceR="重置方向",
back=BK,
},
setting_touch={
@@ -330,4 +320,4 @@ return{
back=BK,
},
},
}--译
}

View File

@@ -7,19 +7,18 @@ local actName={
"Left Drop:","Right Drop:","Left INS:","Right INS:",
}
return{
anykey="Any Key to Continue",
newVersion="Updating detected!Maybe some data is recalculated",
lang="English",
atkModeName={"Random","Badges","K.O.s","Counters"},
royale_remain=function(n)return n.." Players Remain"end,
cmb={nil,nil,"3 Combo","4 Combo","5 Combo","6 Combo","7 Combo","8 Combo","9 Combo","10 Combo!","11 Combo!","12 Combo!","13 Combo!","14 Combo!","15 Combo!","16 Combo!","17 Combo!","18 Combo!","19 Combo!","MEGACMB"},
techrash="Techrash",
techrashB2B="B2B Techrash",
techrashB3B="B2B2B Techrash",
techrash="Techrash",techrashB2B="B2B Techrash",techrashB3B="B2B2B Techrash",
spin={"Z-spin","S-spin","L-spin","J-spin","T-spin","O-spin","I-spin"},
block={"Z","S","L","J","T","O","I"},
clear={" single"," double"," triple"},
spin={"Z-spin","S-spin","L-spin","J-spin","T-spin","O-spin","I-spin"},
b2b="B2B ",b3b="B2B2B ",
mini="Mini",
PC="Perfect Clear",
mini="Mini",b2b="B2B ",b3b="B2B2B ",
PC="Perfect Clear",HPC="Clear",
hold="Hold",next="Next",
stage=function(n)return"STAGE "..n end,
@@ -35,6 +34,11 @@ return{
pause="PAUSE",
pauseCount="Pause Count",
atk="ATK",
spd="SPD",
recv="RECV",
eff="EFF",
custom="Custom Game",
customOption={
drop="Drop speed:",
@@ -64,14 +68,14 @@ return{
freshLimit={0,8,15,""},
opponent={"No CPU","9S Lv1","9S Lv2","9S Lv3","9S Lv4","9S Lv5","CC Lv1","CC Lv2","CC Lv3","CC Lv4","CC Lv5","CC Lv6"},
},
softdropdas="Down DAS:",
softdroparr="Down ARR:",
snapLevelName={"Free pos","Snap-10","Snap-20","Snap-40","Snap-60","Snap-80"},
setting_game="Game setting",
setting_graphic="Graphic setting",
setting_sound="Sound setting",
setting_control="Control Setting",
setting_skin="Layout Setting",
preview="Preview",
keyboard="Keyboard",joystick="Joystick",
blockLayout="Layout Setting",
ctrlSetHelp="Arrowkey to select/change slot,Enter to change,Esc back",
musicRoom="Music Room",
nowPlaying="Now Playing:",
@@ -95,44 +99,34 @@ return{
noScore="No Score Yet",
highScore="Highscore",
newRecord="New Rocord",
errorMsg="Techmino ran into a problem and needs to restart.\nWe collected some error info,and you can send them to author.",
errorMsg="Techmino ran into a problem and needs to restart.\nWe collected some error info, and you can send them to the author.",
actName=actName,
load={[0]="Finished","Loading VOICE","Loading BGM","Loading SFX","Loading modes","Loading other things"},
load={[0]="Finished","Loading VOICE","Loading BGM","Loading SFX","Loading images","Loading modes","Loading other things"},
pauseStat={
"Time:",
"Key/Rot./Hold:",
"Block used:",
"Lines:",
"Attack:",
"Send:",
"Key/Rotate/Hold:",
"Piece:",
"Row/Dig:",
"Attack/DigAtk:",
"Receive:",
"Clear:",
"Spin:",
"B2B:",
"PC:",
"Efficiency:",
"Finesse err:",
"Finesse rate:",
"B2B/B3B/PC/HPC:",
"Finesse:",
},
stat={
"Games run:",
"Games played:",
"Game time:",
"Key pressed:",
"Rotate:",
"Hold:",
"Block used:",
"Lines cleared:",
"Attack(Sent):",
"Receive:",
"Clear:",
"Spin:",
"B2B:",
"PC:",
"Efficiency:",
"Finesse error:",
spin="spin0~3",
clear="clear1~4",
"Game Runned:",
"Game Played:",
"Game Time:",
"Key/Rotate/Hold:",
"Block/Row/Atk.:",
"Recv./Res./Asc.:",
"Dig/Dig Atk.:",
"Eff./Dig Eff.:",
"Finesse Err./Rate:",
"B2B/B3B:",
"PC/HPC:",
},
help={
"I don't think you need \"help\".",
@@ -141,14 +135,14 @@ return{
"",
"Powered by LOVE2D",
"Author:MrZ E-mail:1046101471@qq.com",
"Program:MrZ Art:MrZ Music:MrZ SFX:MrZ VOICE:Miya",
"Program:MrZ Art:MrZ Music:MrZ SFX:MrZ VOICE:MrZ/Miya",
"Special thanks:Flyz,Farter,196,Teatube,T830,[all test staff] and YOU!",
"",
"Any bugs/suggestions to my E-mail.(may with screenshot)",
"Newest game only released in alpha-test group FREE",
"Only released in test group for FREE",
"Game downloaded from other way may implanted with virous",
"Only network/vibrating permission applied",
"Author is not responsible for any loss by eddited game",
"Author is not responsible for any loss by edited game",
},
used=[[
Tool used:
@@ -160,7 +154,7 @@ Lib used:
simple-love-lights[dylhunn]
]],
support="Support Author",
group="Official QQ Group",
group="Official QQ Group(if not hacked):822023725",
WidgetText={
main={
play="Play",
@@ -199,18 +193,6 @@ Lib used:
},
draw={
any="Erase",
block1="Z",
block2="S",
block3="L",
block4="J",
block5="T",
block6="O",
block7="I",
gb1="",
gb2="",
gb3="",
gb4="",
gb5="",
space="×",
clear="Clear",
demo="Don't show ×",
@@ -230,16 +212,12 @@ Lib used:
setting_game={
graphic="←Graphic",
sound="Sound→",
reset="Reset DAS/ARR",
dasD="-",dasU="+",
arrD="-",arrU="+",
sddasD="-",sddasU="+",
sdarrD="-",sdarrU="+",
ctrl="Control setting",
reTime="Delay before game",
maxNext="Max next count",
autoPause="Auto pause",
layout="Layout",
ctrl="Key Setting",
key="Key Setting",
touch="Touch Setting",
quickR="Quick restart",
autoPause="Auto pause",
@@ -254,11 +232,12 @@ Lib used:
grid="Grid",
center="Center",
bg="Background",
bgspace="BG space",
smo="Smoooth drop",
smooth="Smooth drop",
lockFX="Lock FX level",
dropFX="Drop FX level",
shakeFX="Shake FX level",
atkFX="ATK FX level",
text="Line-clear text",
fullscreen="Fullscreen",
frame="draw FPS",
back=BK,
@@ -273,6 +252,15 @@ Lib used:
stereo="Stereo",
back=BK,
},
setting_control={
das="DAS",arr="ARR",
sddas="softdrop DAS",sdarr="softdrop ARR",
ihs="Initial Hold",
irs="Initial Rotate",
ims="Initial Move",
reset="Reset",
back=BK,
},
setting_key={
back=BK,
},
@@ -285,7 +273,8 @@ Lib used:
prev5="",next5="",spin5="R",
prev6="",next6="",spin6="R",
prev7="",next7="",spin7="R",
reset="reset Dir",
skinR="Reset Color",
faceR="Reset Dir.",
back=BK,
},
setting_touch={

692
main.lua

File diff suppressed because it is too large Load Diff

View File

@@ -53,14 +53,14 @@ return{
players[1].modeData.event="M7"
end,
mesDisp=function(P,dx,dy)
mDraw(drawableText.line,-81,300)
mDraw(drawableText.techrash,-81,420)
mDraw(drawableText.grade,-81,170)
mText(drawableText.line,-81,300)
mText(drawableText.techrash,-81,420)
mText(drawableText.grade,-81,170)
setFont(55)
mStr(P.modeData.event,-81,110)
setFont(75)
mStr(P.stat.row,-81,220)
mStr(P.stat.clear_4,-81,340)
mStr(P.stat.clear_S[4],-81,340)
end,
score=function(P)return{P.modeData.point,P.stat.score}end,
scoreDisp=function(D)return sectionName[int(D[1]*.1)+1].." "..D[2]end,

View File

@@ -22,7 +22,7 @@ return{
freshLimit=15,
pushSpeed=2,
task=function(P)
if not(P.control and scene.cur=="play")then return end
if not(P.control and SCN.cur=="play")then return end
if P.atkBuffer.sum==0 then
local p=#P.atkBuffer+1
local B,D=P.atkBuffer,P.modeData
@@ -42,10 +42,10 @@ return{
D.event=D.event+1
D.point=int(72e4/t)*.1
if D.event==20 then
P:showText(text.great,0,-140,100,"appear",.6)
P:showTextF(text.great,0,-140,100,"appear",.6)
P.gameEnv.pushSpeed=3
elseif D.event==50 then
P:showText(text.maxspeed,0,-140,100,"appear",.6)
P:showTextF(text.maxspeed,0,-140,100,"appear",.6)
end
end
end
@@ -60,8 +60,8 @@ return{
setFont(55)
mStr(P.modeData.event,-81,200)
mStr("24",-81,320)
mDraw(drawableText.wave,-81,260)
mDraw(drawableText.nextWave,-81,380)
mText(drawableText.wave,-81,260)
mText(drawableText.nextWave,-81,380)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].." Waves "..toTime(D[2])end,

View File

@@ -21,7 +21,7 @@ return{
fall=8,
freshLimit=15,
task=function(P)
if not(P.control and scene.cur=="play")then return end
if not(P.control and SCN.cur=="play")then return end
if P.atkBuffer.sum<2 then
local p=#P.atkBuffer+1
local B,D=P.atkBuffer,P.modeData
@@ -48,13 +48,13 @@ return{
D.event=D.event+1
D.point=int(s*36e3/t)*.1
if D.event==10 then
P:showText(text.great,0,-140,100,"appear",.6)
P:showTextF(text.great,0,-140,100,"appear",.6)
P.gameEnv.pushSpeed=4
elseif D.event==20 then
P:showText(text.awesome,0,-140,100,"appear",.6)
P:showTextF(text.awesome,0,-140,100,"appear",.6)
P.gameEnv.pushSpeed=5
elseif D.event==30 then
P:showText(text.maxspeed,0,-140,100,"appear",.6)
P:showTextF(text.maxspeed,0,-140,100,"appear",.6)
end
end
end
@@ -73,8 +73,8 @@ return{
or P.modeData.event<20 and 25
or 28
,-81,320)
mDraw(drawableText.wave,-81,260)
mDraw(drawableText.nextWave,-81,380)
mText(drawableText.wave,-81,260)
mText(drawableText.nextWave,-81,380)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].." Waves "..toTime(D[2])end,

View File

@@ -4,7 +4,7 @@ local function getField()
return F
end
local function newField(P)
end
return{
name={

View File

@@ -29,11 +29,11 @@ return{
newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
mDraw(drawableText.line,-81,300)
mDraw(drawableText.techrash,-81,420)
mText(drawableText.line,-81,300)
mText(drawableText.techrash,-81,420)
setFont(75)
mStr(P.stat.row,-81,220)
mStr(P.stat.clear_4,-81,340)
mStr(P.stat.clear_S[4],-81,340)
end,
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,

View File

@@ -31,11 +31,11 @@ return{
newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
mDraw(drawableText.line,-81,300)
mDraw(drawableText.techrash,-81,420)
mText(drawableText.line,-81,300)
mText(drawableText.techrash,-81,420)
setFont(75)
mStr(P.stat.row,-81,220)
mStr(P.stat.clear_4,-81,340)
mStr(P.stat.clear_S[4],-81,340)
end,
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,

View File

@@ -31,11 +31,11 @@ return{
newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
mDraw(drawableText.line,-81,300)
mDraw(drawableText.techrash,-81,420)
mText(drawableText.line,-81,300)
mText(drawableText.techrash,-81,420)
setFont(75)
mStr(P.stat.row,-81,220)
mStr(P.stat.clear_4,-81,340)
mStr(P.stat.clear_S[4],-81,340)
end,
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,

View File

@@ -30,11 +30,11 @@ return{
newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
mDraw(drawableText.line,-81,300)
mDraw(drawableText.techrash,-81,420)
mText(drawableText.line,-81,300)
mText(drawableText.techrash,-81,420)
setFont(75)
mStr(P.stat.row,-81,220)
mStr(P.stat.clear_4,-81,340)
mStr(P.stat.clear_S[4],-81,340)
end,
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
@@ -49,8 +49,8 @@ return{
3
else
return
L>=150 and 3 or
L>=100 and 2 or
L>=126 and 3 or
L>=80 and 2 or
L>=40 and 1 or
L>=1 and 0
end

View File

@@ -32,11 +32,11 @@ return{
newPlayer(1,340,15)
end,
mesDisp=function(P,dx,dy)
mDraw(drawableText.line,-81,300)
mDraw(drawableText.techrash,-81,420)
mText(drawableText.line,-81,300)
mText(drawableText.techrash,-81,420)
setFont(75)
mStr(P.stat.row,-81,220)
mStr(P.stat.clear_4,-81,340)
mStr(P.stat.clear_S[4],-81,340)
end,
score=function(P)return{min(P.stat.row or 200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,

View File

@@ -1,7 +1,7 @@
local rnd,min=math.random,math.min
local function check_c4w(P)
for i=1,#P.clearedRow do
P.field[#P.field+1]=freeRow.get(10)
P.field[#P.field+1]=freeRow.get(13)
P.visTime[#P.visTime+1]=freeRow.get(20)
for i=4,7 do P.field[#P.field][i]=0 end
end
@@ -46,25 +46,25 @@ return{
local P=players[1]
local F=P.field
for i=1,24 do
F[i]=freeRow.get(10)
F[i]=freeRow.get(13)
P.visTime[i]=freeRow.get(20)
for x=4,7 do F[i][x]=0 end
end
local r=rnd(6)
if r==1 then F[1][5],F[1][4],F[2][4]=10,10,10
elseif r==2 then F[1][6],F[1][7],F[2][7]=10,10,10
elseif r==3 then F[1][4],F[2][4],F[2][5]=10,10,10
elseif r==4 then F[1][7],F[2][7],F[2][6]=10,10,10
elseif r==5 then F[1][4],F[1][5],F[1][6]=10,10,10
elseif r==6 then F[1][7],F[1][6],F[1][5]=10,10,10
if r==1 then F[1][5],F[1][4],F[2][4]=13,13,13
elseif r==2 then F[1][6],F[1][7],F[2][7]=13,13,13
elseif r==3 then F[1][4],F[2][4],F[2][5]=13,13,13
elseif r==4 then F[1][7],F[2][7],F[2][6]=13,13,13
elseif r==5 then F[1][4],F[1][5],F[1][6]=13,13,13
elseif r==6 then F[1][7],F[1][6],F[1][5]=13,13,13
end
end,
mesDisp=function(P,dx,dy)
setFont(45)
mStr(P.combo,-81,310)
mStr(P.modeData.point,-81,400)
mDraw(drawableText.combo,-81,358)
mDraw(drawableText.mxcmb,-81,450)
mText(drawableText.combo,-81,358)
mText(drawableText.mxcmb,-81,450)
end,
score=function(P)return{min(P.modeData.point,100),P.stat.time}end,
scoreDisp=function(D)return D[1].." Combo "..toTime(D[2])end,

View File

@@ -1,7 +1,7 @@
local rnd,min=math.random,math.min
local function check_c4w(P)
for i=1,#P.clearedRow do
P.field[#P.field+1]=freeRow.get(10)
P.field[#P.field+1]=freeRow.get(13)
P.visTime[#P.visTime+1]=freeRow.get(20)
for i=4,7 do P.field[#P.field][i]=0 end
end
@@ -44,25 +44,25 @@ return{
local P=players[1]
local F=P.field
for i=1,24 do
F[i]=freeRow.get(10)
F[i]=freeRow.get(13)
P.visTime[i]=freeRow.get(20)
for x=4,7 do F[i][x]=0 end
end
local r=rnd(6)
if r==1 then F[1][5],F[1][4],F[2][4]=10,10,10
elseif r==2 then F[1][6],F[1][7],F[2][7]=10,10,10
elseif r==3 then F[1][4],F[2][4],F[2][5]=10,10,10
elseif r==4 then F[1][7],F[2][7],F[2][6]=10,10,10
elseif r==5 then F[1][4],F[1][5],F[1][6]=10,10,10
elseif r==6 then F[1][7],F[1][6],F[1][5]=10,10,10
if r==1 then F[1][5],F[1][4],F[2][4]=13,13,13
elseif r==2 then F[1][6],F[1][7],F[2][7]=13,13,13
elseif r==3 then F[1][4],F[2][4],F[2][5]=13,13,13
elseif r==4 then F[1][7],F[2][7],F[2][6]=13,13,13
elseif r==5 then F[1][4],F[1][5],F[1][6]=13,13,13
elseif r==6 then F[1][7],F[1][6],F[1][5]=13,13,13
end
end,
mesDisp=function(P,dx,dy)
setFont(45)
mStr(P.combo,-81,310)
mStr(P.modeData.point,-81,400)
mDraw(drawableText.combo,-81,358)
mDraw(drawableText.mxcmb,-81,450)
mText(drawableText.combo,-81,358)
mText(drawableText.mxcmb,-81,450)
end,
score=function(P)return{min(P.modeData.point,100),P.stat.time}end,
scoreDisp=function(D)return D[1].." Combo "..toTime(D[2])end,

View File

@@ -12,7 +12,7 @@ local function check_LVup(P)
end
end
end
return{
name={
"高速经典",
@@ -38,6 +38,7 @@ return{
next=1,hold=false,
sequence="rnd",
freshLimit=0,
face={0,0,2,2,2,0,0},
target=10,dropPiece=check_LVup,
bg="rgb",bgm="rockblock",
},
@@ -49,7 +50,7 @@ return{
setFont(75)
local r=P.gameEnv.target*.1
mStr(r<11 and 18 or r<22 and r+8 or r==22 and"00"or r==23 and"0a"or format("%x",r*10-220),-81,210)
mDraw(drawableText.speedLV,-81,290)
mText(drawableText.speedLV,-81,290)
setFont(45)
mStr(P.stat.row,-81,320)
mStr(P.gameEnv.target,-81,370)

View File

@@ -54,6 +54,7 @@ return{
P.visTime[y]=freeRow.get(t)
for x=1,10 do P.field[y][x]=preField[y][x]end
end
P.garbageBeneath=preField.h
end
modeEnv.bg=customRange.bg[customSel[12]]
modeEnv.bgm=customRange.bgm[customSel[13]]
@@ -62,7 +63,7 @@ return{
setFont(55)
if P.gameEnv.puzzle or P.gameEnv.target>1e10 then
mStr(P.stat.row,-81,225)
mDraw(drawableText.line,-81,290)
mText(drawableText.line,-81,290)
else
local R=P.gameEnv.target-P.stat.row
mStr(R>=0 and R or 0,-81,240)

View File

@@ -7,7 +7,7 @@ local function puzzleCheck(P)
local a,b=preField[y][x],L and L[x]or 0
if a~=0 then
if a==-1 then if b>0 then return end
elseif a<8 then if a~=b then return end
elseif a<12 then if a~=b then return end
elseif a>7 then if b==0 then return end
end
end
@@ -74,7 +74,7 @@ return{
local dx,dy=P.fieldOff.x,P.fieldOff.y
setFont(55)
mStr(P.stat.row,-81,225)
mDraw(drawableText.line,-81,290)
mText(drawableText.line,-81,290)
if P.gameEnv.puzzle and P.modeData.event==0 then
local m=puzzleMark
for y=1,preField.h do for x=1,10 do

View File

@@ -19,10 +19,11 @@ return{
env={
drop=5,lock=60,
fall=6,
next=3,
freshLimit=15,
pushSpeed=2,
task=function(P)
if not(P.control and scene.cur=="play")then return end
if not(P.control and SCN.cur=="play")then return end
P.modeData.counter=P.modeData.counter+1
local t=240-2*P.modeData.event
if P.modeData.counter>=t then
@@ -37,21 +38,21 @@ return{
D.event=D.event+1
D.point=int(144e3/(240-2*D.event))*.1
if D.event==25 then
P:showText(text.great,0,-140,100,"appear",.6)
P:showTextF(text.great,0,-140,100,"appear",.6)
P.gameEnv.pushSpeed=3
P.dropDelay,P.gameEnv.drop=4,4
elseif D.event==50 then
P:showText(text.awesome,0,-140,100,"appear",.6)
P:showTextF(text.awesome,0,-140,100,"appear",.6)
P.gameEnv.pushSpeed=4
P.dropDelay,P.gameEnv.drop=3,3
elseif D.event==75 then
P:showText(text.maxspeed,0,-140,100,"appear",.6)
P:showTextF(text.maxspeed,0,-140,100,"appear",.6)
P.dropDelay,P.gameEnv.drop=2,2
end
end
end
end,
bg="game4",bgm="way",
bg="game4",bgm="shining terminal",
},
pauseLimit=true,
load=function()
@@ -61,8 +62,8 @@ return{
setFont(55)
mStr(P.modeData.event,-81,200)
mStr(P.modeData.point,-81,320)
mDraw(drawableText.wave,-81,260)
mDraw(drawableText.rpm,-81,380)
mText(drawableText.wave,-81,260)
mText(drawableText.rpm,-81,380)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].." Waves "..toTime(D[2])end,

View File

@@ -19,10 +19,11 @@ return{
env={
drop=30,lock=60,
fall=10,
next=3,
freshLimit=15,
pushSpeed=1,
task=function(P)
if not(P.control and scene.cur=="play")then return end
if not(P.control and SCN.cur=="play")then return end
P.modeData.counter=P.modeData.counter+1
local t=360-P.modeData.event*2
if P.modeData.counter>=t then
@@ -37,16 +38,16 @@ return{
D.event=D.event+1
D.point=int(108e3/(360-D.event*2))*.1
if D.event==25 then
P:showText(text.great,0,-140,100,"appear",.6)
P:showTextF(text.great,0,-140,100,"appear",.6)
P.gameEnv.pushSpeed=2
P.dropDelay,P.gameEnv.drop=20,20
elseif D.event==50 then
P:showText(text.awesome,0,-140,100,"appear",.6)
P:showTextF(text.awesome,0,-140,100,"appear",.6)
P.gameEnv.pushSpeed=3
P.dropDelay,P.gameEnv.drop=10,10
elseif D.event==90 then
P.dropDelay,P.gameEnv.drop=5,5
P:showText(text.maxspeed,0,-140,100,"appear",.6)
P:showTextF(text.maxspeed,0,-140,100,"appear",.6)
end
end
end
@@ -61,8 +62,8 @@ return{
setFont(55)
mStr(P.modeData.event,-81,200)
mStr(P.modeData.point,-81,320)
mDraw(drawableText.wave,-81,260)
mDraw(drawableText.rpm,-81,380)
mText(drawableText.wave,-81,260)
mText(drawableText.rpm,-81,380)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].." Waves "..toTime(D[2])end,

View File

@@ -21,11 +21,12 @@ return{
fall=20,
freshLimit=15,
task=function(P)
if not(P.control and scene.cur=="play")then return end
if not(P.control and SCN.cur=="play")then return end
local D=P.modeData
D.counter=D.counter+1
if D.counter>=max(90,180-D.event)then
P:garbageRise(10,1,rnd(10))
P.stat.recv=P.stat.recv+1
D.counter=0
D.event=D.event+1
end
@@ -39,7 +40,7 @@ return{
mesDisp=function(P,dx,dy)
setFont(65)
mStr(P.modeData.event,-81,310)
mDraw(drawableText.wave,-81,375)
mText(drawableText.wave,-81,375)
end,
score=function(P)return{P.modeData.event,P.stat.row}end,
scoreDisp=function(D)return D[1].." Waves "..D[2].." Lines"end,
@@ -52,6 +53,6 @@ return{
W>=80 and 3 or
W>=50 and 2 or
W>=20 and 1 or
L>=5 and 0
P.stat.row>=5 and 0
end,
}

View File

@@ -20,11 +20,12 @@ return{
drop=10,lock=30,
freshLimit=15,
task=function(P)
if not(P.control and scene.cur=="play")then return end
if not(P.control and SCN.cur=="play")then return end
local D=P.modeData
D.counter=D.counter+1
if D.counter>=max(30,80-.3*D.event)then
P:garbageRise(11+D.event%3,1,rnd(10))
P.stat.recv=P.stat.recv+1
D.counter=0
D.event=D.event+1
end
@@ -38,7 +39,7 @@ return{
mesDisp=function(P,dx,dy)
setFont(65)
mStr(P.modeData.event,-81,310)
mDraw(drawableText.wave,-81,375)
mText(drawableText.wave,-81,375)
end,
score=function(P)return{P.modeData.event,P.stat.row}end,
scoreDisp=function(D)return D[1].." Waves "..D[2].." Lines"end,
@@ -51,6 +52,6 @@ return{
W>=80 and 3 or
W>=50 and 2 or
W>=20 and 1 or
L>=5 and 0
P.stat.row>=5 and 0
end,
}

View File

@@ -40,7 +40,7 @@ return{
local L=P.stat.row
if L>=100 then
local T=P.stat.time
return
return
T<=70 and 5 or
T<=110 and 4 or
T<=160 and 3 or

View File

@@ -40,7 +40,7 @@ return{
local L=P.stat.row
if L>=100 then
local T=P.stat.time
return
return
T<=65 and 5 or
T<=100 and 4 or
T<=145 and 3 or

View File

@@ -2,7 +2,7 @@ return{
name={
"本地多人",
"本地多人",
"Hotseat",
"Multiplayer",
},
level={
"2P",
@@ -10,9 +10,9 @@ return{
"2P",
},
info={
"友尽模式",
"友尽模式",
"End of friendship",
"不是联网也不是局域网",
"不是联网也不是局域网",
"No network\nlocal game only",
},
color=color.white,
env={

View File

@@ -2,7 +2,7 @@ return{
name={
"本地多人",
"本地多人",
"Hotseat",
"Multiplayer",
},
level={
"3P",
@@ -10,9 +10,9 @@ return{
"3P",
},
info={
"友尽模式",
"友尽模式",
"End of friendship",
"不是联网也不是局域网",
"不是联网也不是局域网",
"No network\nlocal game only",
},
color=color.white,
env={

View File

@@ -2,7 +2,7 @@ return{
name={
"本地多人",
"本地多人",
"Hotseat",
"Multiplayer",
},
level={
"4P",
@@ -10,9 +10,9 @@ return{
"4P",
},
info={
"友尽模式",
"友尽模式",
"End of friendship",
"不是联网也不是局域网",
"不是联网也不是局域网",
"No network\nlocal game only",
},
color=color.white,
env={

View File

@@ -28,8 +28,8 @@ return{
setFont(45)
mStr(P.stat.atk,-81,260)
mStr(format("%.2f",P.stat.atk/P.stat.row),-81,370)
mDraw(drawableText.atk,-81,313)
mDraw(drawableText.eff,-81,425)
mText(drawableText.atk,-81,313)
mText(drawableText.eff,-81,425)
end,
score=function(P)return{P.stat.score}end,
scoreDisp=function(D)return tostring(D[1])end,

View File

@@ -1,11 +1,8 @@
local format,rnd=string.format,math.random
local function check_rise(P)
local L=P.clearedRow
for i=1,#L do
if L[i]<6 then
P:garbageRise(10,1,rnd(10))
P.modeData.point=P.modeData.point+1
end
while P.garbageBeneath<6 do
P:garbageRise(10,1,rnd(10))
P.modeData.point=P.modeData.point+1
end
end
@@ -44,9 +41,9 @@ return{
mStr(P.modeData.point,-81,190)
mStr(P.stat.atk,-81,310)
mStr(format("%.2f",P.stat.atk/P.stat.row),-81,420)
mDraw(drawableText.line,-81,243)
mDraw(drawableText.atk,-81,363)
mDraw(drawableText.eff,-81,475)
mText(drawableText.line,-81,243)
mText(drawableText.atk,-81,363)
mText(drawableText.eff,-81,475)
end,
score=function(P)return{P.modeData.point}end,
scoreDisp=function(D)return D[1].." Lines"end,

View File

@@ -34,7 +34,7 @@ return{
env={
noFly=true,
mindas=7,minarr=1,minsdarr=1,
drop=.5,fall=30,
drop=.5,wait=8,fall=20,
target=50,dropPiece=check,
bg="strap",bgm="race",
},

View File

@@ -33,7 +33,7 @@ return{
env={
noFly=true,
minsdarr=1,
fall=30,
wait=8,fall=20,
target=10,dropPiece=check_LVup,
mindas=7,minarr=1,minsdarr=1,
bg="strap",bgm="way",

View File

@@ -16,7 +16,7 @@ local function score(P)
elseif P.modeData.point>=100*(P.modeData.event+1)then
local s=P.modeData.event+1;P.modeData.event=s--level up!
local E=P.gameEnv
curBG=s==1 and"game3"or s==2 and"game4"or s==3 and"game5"or s==4 and"game6"or"game5"
BG.set(s==1 and"game3"or s==2 and"game4"or s==3 and"game5"or s==4 and"game6"or"game5")
E.lock=death_lock[s]
E.wait=death_wait[s]
E.fall=death_fall[s]
@@ -26,7 +26,7 @@ local function score(P)
P.modeData.point,P.modeData.event=500,4
P:win("finish")
else
P:showText(text.stage(s),0,-120,80,"fly")
P:showTextF(text.stage(s),0,-120,80,"fly")
end
SFX.play("reach")
end
@@ -78,7 +78,7 @@ return{
getRank=function(P)
local S=P.modeData.point
if S==500 then
local L=P.stat.clear_4
local L=P.stat.clear_S[4]
return
L>=30 and 5 or
L>=25 and 4 or

View File

@@ -15,7 +15,7 @@ local function score(P)
elseif P.modeData.point>=100*(P.modeData.event+1)then
local s=P.modeData.event+1;P.modeData.event=s--level up!
local E=P.gameEnv
curBG=s==1 and"game1"or s==2 and"game2"or s==3 and"game3"or "game4"
BG.set(s==1 and"game1"or s==2 and"game2"or s==3 and"game3"or "game4")
E.lock=rush_lock[s]
E.wait=rush_wait[s]
E.fall=rush_fall[s]
@@ -30,7 +30,7 @@ local function score(P)
P.modeData.point,P.modeData.event=500,4
P:win("finish")
else
P:showText(text.stage(s),0,-120,80,"fly")
P:showTextF(text.stage(s),0,-120,80,"fly")
end
SFX.play("reach")
end
@@ -82,7 +82,7 @@ return{
getRank=function(P)
local S=P.modeData.point
if S==500 then
local L=P.stat.clear_4
local L=P.stat.clear_S[4]
return
L>=30 and 5 or
L>=25 and 4 or

View File

@@ -12,7 +12,7 @@ local function score(P)
if MD.point%100==99 then SFX.play("blip_1")end
if int(MD.point*.01)>MD.event then
local s=MD.event+1;MD.event=s--level up!
P:showText(text.stage(s),0,-120,80,"fly")
P:showTextF(text.stage(s),0,-120,80,"fly")
local E=P.gameEnv
if s<4 then--first 300
if s~=1 then E.lock=E.lock-1 end

View File

@@ -35,7 +35,7 @@ return{
setFont(75)
mStr(P.stat.pc,-81,350)
mDraw(drawableText.pc,-81,432)
mText(drawableText.pc,-81,432)
gc.setColor(.5,.5,.5)
if frame>179 then

View File

@@ -35,7 +35,7 @@ return{
setFont(75)
mStr(P.stat.pc,-81,350)
mDraw(drawableText.pc,-81,432)
mText(drawableText.pc,-81,432)
gc.setColor(.5,.5,.5)
if frame>179 then

View File

@@ -34,7 +34,7 @@ return{
setFont(75)
mStr(P.stat.pc,-81,350)
mDraw(drawableText.pc,-81,432)
mText(drawableText.pc,-81,432)
gc.setColor(.5,.5,.5)
if frame>179 then

View File

@@ -6,13 +6,16 @@ local pc_fall={18,16,14,12,10,9,8,7,6}
local PCbase=require("parts/PCbase")
local PClist=require("parts/PClist")
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
r[j]=PCbase[4*t+i][j]
_=PCbase[4*t+i][j]
r[j]=S[_]or 0
end
ins(P.field,1,r)
ins(P.visTime,1,freeRow.get(20))
@@ -44,19 +47,19 @@ local function newPC(P)
elseif b<5 then b=7-b
end
end
P.next[#P.next+1]={bk=blocks[b][0],id=b,color=b,name=b}--P:newNext(b)'s simple version!
P:getNext(b)
end
P.modeData.counter=P.stat.piece==0 and 20 or 0
newTask(task_PC,P)
TASK.new(task_PC,P)
local s=P.stat.pc*.5
if int(s)==s and s>0 then
P.gameEnv.drop=pc_drop[s]or 10
P.gameEnv.lock=pc_lock[s]or 20
P.gameEnv.fall=pc_fall[s]or 5
if s==10 then
P:showText(text.maxspeed,0,-140,100,"appear",.6)
P:showTextF(text.maxspeed,0,-140,100,"appear",.6)
else
P:showText(text.speedup,0,-140,40,"appear",.8)
P:showTextF(text.speedup,0,-140,40,"appear",.8)
end
end
end
@@ -98,7 +101,7 @@ return{
mesDisp=function(P,dx,dy)
setFont(75)
mStr(P.stat.pc,-81,330)
mDraw(drawableText.pc,-81,412)
mText(drawableText.pc,-81,412)
end,
score=function(P)return{P.stat.pc,P.stat.time}end,
scoreDisp=function(D)return D[1].." PCs "..toTime(D[2])end,

View File

@@ -3,13 +3,16 @@ local ins=table.insert
local PCbase=require("parts/PCbase")
local PClist=require("parts/PClist")
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
r[j]=PCbase[4*t+i][j]
_=PCbase[4*t+i][j]
r[j]=S[_]or 0
end
ins(P.field,1,r)
ins(P.visTime,1,freeRow.get(20))
@@ -40,10 +43,10 @@ local function newPC(P)
elseif b<5 then b=7-b
end
end
P.next[#P.next+1]={bk=blocks[b][0],id=b,color=b,name=b}--P:newNext(b)'s simple version!
P:getNext(b)
end
P.modeData.counter=P.stat.piece==0 and 20 or 0
newTask(task_PC,P)
TASK.new(task_PC,P)
end
end
return{
@@ -81,7 +84,7 @@ return{
mesDisp=function(P,dx,dy)
setFont(75)
mStr(P.stat.pc,-81,330)
mDraw(drawableText.pc,-81,412)
mText(drawableText.pc,-81,412)
end,
score=function(P)return{P.stat.pc,P.stat.time}end,
scoreDisp=function(D)return D[1].." PCs "..toTime(D[2])end,

View File

@@ -46,7 +46,7 @@ return{
if P.result=="WIN"then
local T=P.stat.piece
return
T<=20 and 5 or
T<=23 and 5 or
T<=26 and 4 or
T<=40 and 3 or
T<=60 and 2 or

View File

@@ -43,7 +43,7 @@ return{
getRank=function(P)
if P.stat.row<10 then return end
local T=P.stat.time
return
return
T<=7 and 5 or
T<=10 and 4 or
T<=25 and 3 or

View File

@@ -43,7 +43,7 @@ return{
getRank=function(P)
if P.stat.row<100 then return end
local T=P.stat.time
return
return
T<=62 and 5 or
T<=90 and 4 or
T<=130 and 3 or

View File

@@ -43,7 +43,7 @@ return{
getRank=function(P)
if P.stat.row<1000 then return end
local T=P.stat.time
return
return
T<=626 and 5 or
T<=1000 and 4 or
T<=1400 and 3 or
@@ -51,4 +51,4 @@ return{
T<=3000 and 1 or
0
end,
}
}

View File

@@ -43,7 +43,7 @@ return{
getRank=function(P)
if P.stat.row<20 then return end
local T=P.stat.time
return
return
T<=13 and 5 or
T<=18 and 4 or
T<=45 and 3 or

View File

@@ -43,7 +43,7 @@ return{
getRank=function(P)
if P.stat.row<40 then return end
local T=P.stat.time
return
return
T<=26 and 5 or
T<=32.6 and 4 or
T<=40 and 3 or

View File

@@ -43,7 +43,7 @@ return{
getRank=function(P)
if P.stat.row<400 then return end
local T=P.stat.time
return
return
T<=255 and 5 or
T<=330 and 4 or
T<=420 and 3 or

View File

@@ -20,13 +20,13 @@ return{
drop=30,lock=45,
freshLimit=10,
task=function(P)
if not(P.control and scene.cur=="play")then return end
if not(P.control and SCN.cur=="play")then return end
P.modeData.counter=P.modeData.counter+1
if P.modeData.counter>=max(60,150-2*P.modeData.event)and P.atkBuffer.sum<4 then
P.atkBuffer[#P.atkBuffer+1]={pos=rnd(10),amount=1,countdown=30,cd0=30,time=0,sent=false,lv=1}
P.atkBuffer.sum=P.atkBuffer.sum+1
P.stat.recv=P.stat.recv+1
if P.modeData.event==45 then P:showText(text.maxspeed,0,-140,100,"appear",.6)end
if P.modeData.event==45 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
P.modeData.counter=0
P.modeData.event=P.modeData.event+1
end
@@ -40,7 +40,7 @@ return{
mesDisp=function(P,dx,dy)
setFont(65)
mStr(P.modeData.event,-81,310)
mDraw(drawableText.wave,-81,375)
mText(drawableText.wave,-81,375)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].." Waves "..toTime(D[2])end,

View File

@@ -20,18 +20,19 @@ return{
drop=30,lock=45,
freshLimit=10,
task=function(P)
if not(P.control and scene.cur=="play")then return end
if not(P.control and SCN.cur=="play")then return end
P.modeData.counter=P.modeData.counter+1
if P.modeData.counter>=max(60,180-2*P.modeData.event)and P.atkBuffer.sum<15 then
P.atkBuffer[#P.atkBuffer+1]=
local B=P.atkBuffer
if P.modeData.counter>=max(60,180-2*P.modeData.event)and B.sum<15 then
B[#B+1]=
P.modeData.event%3<2 and
{pos=rnd(10),amount=1,countdown=0,cd0=0,time=0,sent=false,lv=1}
or
{pos=rnd(10),amount=3,countdown=60,cd0=60,time=0,sent=false,lv=2}
local R=(P.modeData.event%3<2 and 1 or 3)
P.atkBuffer.sum=P.atkBuffer.sum+R
B.sum=B.sum+R
P.stat.recv=P.stat.recv+R
if P.modeData.event==60 then P:showText(text.maxspeed,0,-140,100,"appear",.6)end
if P.modeData.event==60 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
P.modeData.counter=0
P.modeData.event=P.modeData.event+1
end
@@ -45,7 +46,7 @@ return{
mesDisp=function(P,dx,dy)
setFont(65)
mStr(P.modeData.event,-81,310)
mDraw(drawableText.wave,-81,375)
mText(drawableText.wave,-81,375)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].." Waves "..toTime(D[2])end,

View File

@@ -20,14 +20,14 @@ return{
drop=30,lock=45,
freshLimit=10,
task=function(P)
if not(P.control and scene.cur=="play")then return end
if not(P.control and SCN.cur=="play")then return end
P.modeData.counter=P.modeData.counter+1
if P.modeData.counter>=max(60,150-P.modeData.event)and P.atkBuffer.sum<20 then
local t=max(60,90-P.modeData.event)
P.atkBuffer[#P.atkBuffer+1]={pos=rnd(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3}
P.atkBuffer.sum=P.atkBuffer.sum+4
P.stat.recv=P.stat.recv+4
if P.modeData.event==60 then P:showText(text.maxspeed,0,-140,100,"appear",.6)end
if P.modeData.event==60 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
P.modeData.counter=0
P.modeData.event=P.modeData.event+1
end
@@ -41,7 +41,7 @@ return{
mesDisp=function(P,dx,dy)
setFont(65)
mStr(P.modeData.event,-81,310)
mDraw(drawableText.wave,-81,375)
mText(drawableText.wave,-81,375)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].." Waves "..toTime(D[2])end,

View File

@@ -20,7 +20,7 @@ return{
drop=30,lock=45,
freshLimit=10,
task=function(P)
if not(P.control and scene.cur=="play")then return end
if not(P.control and SCN.cur=="play")then return end
P.modeData.counter=P.modeData.counter+1
if P.modeData.counter>=max(90,180-2*P.modeData.event)and P.atkBuffer.sum<8 then
local d=P.modeData.event+1
@@ -31,7 +31,7 @@ return{
d%4==3 and{pos=rnd(10),amount=4,countdown=90,cd0=90,time=0,sent=false,lv=3}
P.atkBuffer.sum=P.atkBuffer.sum+d%4+1
P.stat.recv=P.stat.recv+d%4+1
if P.modeData.event==45 then P:showText(text.maxspeed,0,-140,100,"appear",.6)end
if P.modeData.event==45 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
P.modeData.counter=0
P.modeData.event=d
end
@@ -45,7 +45,7 @@ return{
mesDisp=function(P,dx,dy)
setFont(65)
mStr(P.modeData.event,-81,310)
mDraw(drawableText.wave,-81,375)
mText(drawableText.wave,-81,375)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].." Waves "..toTime(D[2])end,

View File

@@ -22,7 +22,7 @@ return{
freshLimit=15,
pushSpeed=2,
task=function(P)
if not(P.control and scene.cur=="play")then return end
if not(P.control and SCN.cur=="play")then return end
P.modeData.counter=P.modeData.counter+1
if P.modeData.counter>=max(300,600-10*P.modeData.event)and P.atkBuffer.sum<20 then
local t=max(300,480-12*P.modeData.event)
@@ -33,7 +33,7 @@ return{
P.atkBuffer[p+3]={pos=rnd(10),amount=6,countdown=1.5*t,cd0=1.5*t,time=0,sent=false,lv=5}
P.atkBuffer.sum=P.atkBuffer.sum+20
P.stat.recv=P.stat.recv+20
if P.modeData.event==31 then P:showText(text.maxspeed,0,-140,100,"appear",.6)end
if P.modeData.event==31 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
P.modeData.counter=0
P.modeData.event=P.modeData.event+1
end
@@ -47,7 +47,7 @@ return{
mesDisp=function(P,dx,dy)
setFont(65)
mStr(P.modeData.event,-81,310)
mDraw(drawableText.wave,-81,375)
mText(drawableText.wave,-81,375)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].." Waves "..toTime(D[2])end,

View File

@@ -36,8 +36,8 @@ return{
setFont(45)
mStr(P.stat.atk,-81,310)
mStr(format("%.2f",P.stat.atk/P.stat.row),-81,420)
mDraw(drawableText.atk,-81,363)
mDraw(drawableText.eff,-81,475)
mText(drawableText.atk,-81,363)
mText(drawableText.eff,-81,475)
end,
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,

View File

@@ -36,8 +36,8 @@ return{
setFont(45)
mStr(P.stat.atk,-81,310)
mStr(format("%.2f",P.stat.atk/P.stat.row),-81,420)
mDraw(drawableText.atk,-81,363)
mDraw(drawableText.eff,-81,475)
mText(drawableText.atk,-81,363)
mText(drawableText.eff,-81,475)
end,
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,

View File

@@ -36,8 +36,8 @@ return{
setFont(45)
mStr(P.stat.atk,-81,310)
mStr(format("%.2f",P.stat.atk/P.stat.row),-81,420)
mDraw(drawableText.atk,-81,363)
mDraw(drawableText.eff,-81,475)
mText(drawableText.atk,-81,363)
mText(drawableText.eff,-81,475)
end,
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,

View File

@@ -36,8 +36,8 @@ return{
setFont(45)
mStr(P.stat.atk,-81,310)
mStr(format("%.2f",P.stat.atk/P.stat.row),-81,420)
mDraw(drawableText.atk,-81,363)
mDraw(drawableText.eff,-81,475)
mText(drawableText.atk,-81,363)
mText(drawableText.eff,-81,475)
end,
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,

View File

@@ -36,8 +36,8 @@ return{
setFont(45)
mStr(P.stat.atk,-81,310)
mStr(format("%.2f",P.stat.atk/P.stat.row),-81,420)
mDraw(drawableText.atk,-81,363)
mDraw(drawableText.eff,-81,475)
mText(drawableText.atk,-81,363)
mText(drawableText.eff,-81,475)
end,
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,

View File

@@ -36,8 +36,8 @@ return{
setFont(45)
mStr(P.stat.atk,-81,310)
mStr(format("%.2f",P.stat.atk/P.stat.row),-81,420)
mDraw(drawableText.atk,-81,363)
mDraw(drawableText.eff,-81,475)
mText(drawableText.atk,-81,363)
mText(drawableText.eff,-81,475)
end,
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,

View File

@@ -39,8 +39,8 @@ return{
setFont(45)
mStr(P.stat.atk,-81,310)
mStr(format("%.2f",P.stat.atk/P.stat.row),-81,420)
mDraw(drawableText.atk,-81,363)
mDraw(drawableText.eff,-81,475)
mText(drawableText.atk,-81,363)
mText(drawableText.eff,-81,475)
end,
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,

View File

@@ -39,8 +39,8 @@ return{
setFont(45)
mStr(P.stat.atk,-81,310)
mStr(format("%.2f",P.stat.atk/P.stat.row),-81,420)
mDraw(drawableText.atk,-81,363)
mDraw(drawableText.eff,-81,475)
mText(drawableText.atk,-81,363)
mText(drawableText.eff,-81,475)
end,
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,

View File

@@ -83,7 +83,7 @@ return{
setFont(25)
gc.print(powerUp[P.strength],-132,290)
for i=1,P.strength do
gc.draw(badgeIcon,16*i-138,260)
gc.draw(IMG.badgeIcon,16*i-138,260)
end
end,
score=function(P)return{P.modeData.event,P.modeData.point}end,

View File

@@ -83,7 +83,7 @@ return{
setFont(25)
gc.print(powerUp[P.strength],-132,290)
for i=1,P.strength do
gc.draw(badgeIcon,16*i-138,260)
gc.draw(IMG.badgeIcon,16*i-138,260)
end
end,
score=function(P)return{P.modeData.event,P.modeData.point}end,

View File

@@ -83,7 +83,7 @@ return{
setFont(25)
gc.print(powerUp[P.strength],-132,290)
for i=1,P.strength do
gc.draw(badgeIcon,16*i-138,260)
gc.draw(IMG.badgeIcon,16*i-138,260)
end
end,
score=function(P)return{P.modeData.event,P.modeData.point}end,

View File

@@ -83,7 +83,7 @@ return{
setFont(25)
gc.print(powerUp[P.strength],-132,290)
for i=1,P.strength do
gc.draw(badgeIcon,16*i-138,260)
gc.draw(IMG.badgeIcon,16*i-138,260)
end
end,
score=function(P)return{P.modeData.event,P.modeData.point}end,

View File

@@ -83,7 +83,7 @@ return{
setFont(25)
gc.print(powerUp[P.strength],-132,290)
for i=1,P.strength do
gc.draw(badgeIcon,16*i-138,260)
gc.draw(IMG.badgeIcon,16*i-138,260)
end
end,
score=function(P)return{P.modeData.event,P.modeData.point}end,

View File

@@ -83,7 +83,7 @@ return{
setFont(25)
gc.print(powerUp[P.strength],-132,290)
for i=1,P.strength do
gc.draw(badgeIcon,16*i-138,260)
gc.draw(IMG.badgeIcon,16*i-138,260)
end
end,
score=function(P)return{P.modeData.event,P.modeData.point}end,

View File

@@ -38,7 +38,7 @@ return{
mesDisp=function(P,dx,dy)
setFont(75)
mStr(P.modeData.event,-81,330)
mDraw(drawableText.tsd,-81,407)
mText(drawableText.tsd,-81,407)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].."TSD "..toTime(D[2])end,

View File

@@ -39,7 +39,7 @@ return{
mesDisp=function(P,dx,dy)
setFont(75)
mStr(P.modeData.event,-81,330)
mDraw(drawableText.tsd,-81,407)
mText(drawableText.tsd,-81,407)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].."TSD "..toTime(D[2])end,

View File

@@ -39,7 +39,7 @@ return{
mesDisp=function(P,dx,dy)
setFont(75)
mStr(P.modeData.event,-81,330)
mDraw(drawableText.tsd,-81,407)
mText(drawableText.tsd,-81,407)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].."TSD "..toTime(D[2])end,

458
paint.lua
View File

@@ -1,9 +1,11 @@
local gc=love.graphics
local setFont=setFont
local int,ceil,rnd,max,min,sin=math.floor,math.ceil,math.random,math.max,math.min,math.sin
local int,ceil,rnd,abs=math.floor,math.ceil,math.random,math.abs
local max,min,sin=math.max,math.min,math.sin
local format=string.format
local Timer=love.timer.getTime
local mStr=mStr
local scr=scr
local scs=require("parts/spinCenters")
local modeRankColor={
@@ -14,6 +16,9 @@ local modeRankColor={
color.lightCyan, --Rank5
color.purple, --Special
}
local rankString={
"C","B","A","S","SS",
}
local miniTitle_rect={
{2,0,5,1},{4,1,1,6},
{9,0,4,1},{9,3,4,1},{9,6,4,1},{8,0,1,7},
@@ -33,7 +38,6 @@ end
FX_attack={}--Attack beam
FX_badge={}--Badge thrown
sysFX={}
local function drawAtkPointer(x,y)
local t=sin(Timer()*20)
gc.setColor(.2,.7+t*.2,1,.6+t*.4)
@@ -57,126 +61,65 @@ local function VirtualkeyPreview()
end
end
local function drawVirtualkey()
local V=virtualkey
local a=setting.VKAlpha*.1
for i=1,#virtualkey do
local B=virtualkey[i]
if B.ava then
local _=virtualkeyDown[i]and gc.setColor(.7,.7,.7,a)or gc.setColor(1,1,1,a)--Dark magic
gc.setLineWidth(B.r*.07)
local ΔY=virtualkeyPressTime[i]
gc.circle("line",B.x,B.y+ΔY,B.r)--Outline circle
if setting.VKIcon then
gc.draw(VKIcon[i],B.x,B.y+ΔY,nil,B.r*.025,nil,18,18)
end--Icon
if ΔY>0 then
gc.setColor(1,1,1,a*ΔY*.1)
gc.circle("line",B.x,B.y,B.r*(1.4-ΔY*.04))
end--Ripple
local _
if setting.VKIcon then
for i=1,#V do
if V[i].ava then
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
_=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
end
end
end
else
for i=1,#V do
if V[i].ava then
local B=V[i]
gc.setColor(1,1,1,a)
gc.setLineWidth(B.r*.07)
gc.circle("line",B.x,B.y,B.r)
_=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))
end
end
end
end
end
local Pnt={BG={}}
function Pnt.BG.none()
gc.clear(.15,.15,.15)
end
function Pnt.BG.grey()
gc.clear(.3,.3,.3)
end
function Pnt.BG.glow()
local t=(sin(Timer()*.5)+sin(Timer()*.7)+sin(Timer()*.9+1)+sin(Timer()*1.5)+sin(Timer()*2+10))*.1
gc.clear(t,t,t)
end
function Pnt.BG.rgb()
gc.clear(
sin(Timer()*1.2)*.15+.2,
sin(Timer()*1.5)*.15+.2,
sin(Timer()*1.9)*.15+.2
)
end
function Pnt.BG.strap()
gc.setColor(.5,.5,.5)
local x=Timer()%16*-64
::L::
gc.draw(background2,x,0,nil,8,scr.h)
x=x+1024--image width*8
if x<scr.w then goto L end
end
function Pnt.BG.flink()
local t=.13-Timer()%3%1.7
if t<.2 then gc.clear(t,t,t)
else gc.clear(0,0,0)
end
end
function Pnt.BG.game1()
gc.setColor(.5,.5,.5)
gc.draw(background1,scr.w*.5,scr.h*.5,Timer()*.15,scr.rad*.0625,nil,16,16)
end--Rainbow
function Pnt.BG.game2()
gc.setColor(.5,.26,.26)
gc.draw(background1,scr.w*.5,scr.h*.5,Timer()*.15,scr.rad*.0625,nil,16,16)
end--Red rainbow
function Pnt.BG.game3()
gc.setColor(.4,.4,.8)
gc.draw(background1,scr.w*.5,scr.h*.5,Timer()*.15,scr.rad*.0625,nil,16,16)
end--Blue rainbow
function Pnt.BG.game4()
gc.setColor(.05,.4,.4)
local x=Timer()%8*-128
::L::
gc.draw(background2,x,0,nil,8,scr.h)
x=x+1024--image width*8
if x<scr.w then goto L end
end--Fast strap
function Pnt.BG.game5()
local t=2.5-Timer()%20%6%2.5
if t<.3 then gc.clear(t,t,t)
else gc.clear(0,0,0)
end
end--Lightning
function Pnt.BG.game6()
local t=1.2-Timer()%10%3%1.2
if t<.3 then gc.clear(t,t,t)
else gc.clear(0,0,0)
end
local R=7-int(Timer()*.5)%7
local _=blockColor[R]
gc.setColor(_[1],_[2],_[3],.1)
gc.draw(miniBlock[R],640,360,Timer()%3.1416*6,400,400,scs[R][0][2]-.5,#blocks[R][0]-scs[R][0][1]+.5)
end--Fast lightning&spining tetromino
local matrixT={}for i=1,20 do matrixT[i]={}for j=1,20 do matrixT[i][j]=love.math.noise(i,j)+2 end end
function Pnt.BG.matrix()
gc.scale(scr.k)
gc.clear(.15,.15,.15)
local _=ceil(scr.h/80)
for i=1,ceil(scr.w/80)do
for j=1,_ do
gc.setColor(1,1,1,sin(matrixT[i][j]*Timer())*.1+.1)
gc.rectangle("fill",80*i,80*j,-80,-80)
end
end
gc.scale(1/scr.k)
end
local Pnt={}
function Pnt.load()
local L=sceneTemp
local S=sceneTemp
gc.setLineWidth(4)
gc.setColor(1,1,1,.5)
gc.rectangle("fill",300,330,L[2]/L[3]*680,60,5)
gc.rectangle("fill",300,330,S.cur/S.tar*680,60,5)
gc.setColor(1,1,1)
gc.rectangle("line",300,330,680,60,5)
setFont(35)
gc.print(text.load[L[1]],340,335)
if sceneTemp[1]~=0 then
gc.printf(sceneTemp[2].."/"..sceneTemp[3],795,335,150,"right")
gc.print(text.load[S.phase],340,335)
if S.phase~=0 then
gc.printf(S.cur.."/"..S.tar,795,335,150,"right")
end
setFont(25)
mStr(L[4],640,400)
mStr(S.tip,640,400)
end
function Pnt.intro()
local T=sceneTemp
gc.stencil(stencil_miniTitle,"replace",1)
gc.setStencilTest("equal",1)
gc.setColor(1,1,1,min(sceneTemp,80)*.005)
gc.setColor(1,1,1,min(T,80)*.005)
gc.push("transform")
gc.translate(250,150)
gc.scale(30)
@@ -185,19 +128,24 @@ function Pnt.intro()
gc.setColor(1,1,1,.06)
for i=41,5,-2 do
gc.setLineWidth(i)
gc.line(200+(sceneTemp-80)*25,130,(sceneTemp-80)*25,590)
gc.line(200+(T-80)*25,130,(T-80)*25,590)
end
gc.setStencilTest()
if T>=80 then
gc.setColor(1,1,1,.5+sin((T-95)/30*3.142)*.5)
mText(drawableText.anykey,640,615+sin(Timer()*3)*5)
end
end
function Pnt.main()
gc.setColor(1,1,1)
gc.draw(coloredTitleImage,60,30,nil,1.3)
gc.draw(IMG.coloredTitleImage,60,30,nil,1.3)
setFont(30)
gc.print(gameVersion,70,125)
gc.print(system,610,100)
players[1]:draw()
end
function Pnt.mode()
local _
local cam=mapCam
gc.push("transform")
gc.translate(640,360)
@@ -214,10 +162,8 @@ function Pnt.mode()
gc.setColor(1,1,1,.2)
for _=1,#M.unlock do
local m=M.unlock[_]
if R[m]then
m=MM[m]
gc.line(M.x,M.y,m.x,m.y)
end
m=MM[m]
gc.line(M.x,M.y,m.x,m.y)
end
local S=M.size
@@ -227,8 +173,8 @@ function Pnt.mode()
if c then
gc.setColor(c)
else
c=.5+sin(Timer()*6+_)*.2
S=S*(.8+c*.5)
c=.5+sin(Timer()*6.26-_)*.2
S=S*(.9+c*.4)
gc.setColor(c,c,c)
end
if M.shape==1 then--Rectangle
@@ -253,6 +199,15 @@ function Pnt.mode()
gc.circle("line",M.x,M.y,S,8)
end
end
_=drawableText[rankString[modeRanks[M.id]]]
if _ then
local dx,dy=6.26*sin(Timer()*1.26+M.id),12.6*sin(Timer()+M.id)
gc.setColor(0,0,0,.5)
mDraw(_,M.x+dx*1.5,M.y+dy*1.5)
gc.setColor(1,1,1,.8)
mDraw(_,M.x+dx,M.y+dy)
end
--[[
if M.icon then
local i=M.icon
local l=i:getWidth()*.5
@@ -265,6 +220,7 @@ function Pnt.mode()
gc.setColor(1,1,1)
gc.draw(i,M.x,M.y,nil,k,nil,l,l)
end
]]
end
end
gc.pop()
@@ -279,10 +235,10 @@ function Pnt.mode()
gc.setColor(1,1,1)
setFont(28)gc.printf(M.info[lang],920,110,360,"center")
if M.slowMark then
gc.draw(ctrlSpeedLimit,1230,50,nil,.4)
gc.draw(IMG.ctrlSpeedLimit,1230,50,nil,.4)
end
if M.score then
mDraw(drawableText.highScore,1100,240)
mText(drawableText.highScore,1100,240)
gc.setColor(.4,.4,.4,.8)
gc.rectangle("fill",940,290,320,280)--Highscore board
local L=M.records
@@ -299,11 +255,11 @@ function Pnt.mode()
setFont(int(26-s*.4))
gc.print(t,955,275+dy+25*i)
setFont(10)
local _=L[i].date
_=L[i].date
if _ then gc.print(_,1155,284+25*i)end
end
else
mDraw(drawableText.noScore,1100,370)
mText(drawableText.noScore,1100,370)
end
end
end
@@ -324,7 +280,7 @@ function Pnt.music()
for i=1,#musicID do
gc.print(musicID[i],50,90+30*i)
end
gc.draw(titleImage,640,310,nil,1.5,nil,206,35)
gc.draw(IMG.titleImage,640,310,nil,1.5,nil,206,35)
if BGM.nowPlay then
setFont(45)
gc.setColor(sin(Timer()*.5)*.2+.8,sin(Timer()*.7)*.2+.8,sin(Timer())*.2+.8)
@@ -332,7 +288,7 @@ function Pnt.music()
local t=-Timer()%2.3/2
if t<1 then
gc.setColor(1,1,1,t)
gc.draw(coloredTitleImage,640,310,nil,1.5+.1-.1*t,1.5+.3-.3*t,206,35)
gc.draw(IMG.coloredTitleImage,640,310,nil,1.5+.1-.1*t,1.5+.3-.3*t,206,35)
end
end
end
@@ -353,7 +309,6 @@ function Pnt.custom()
end
end
end
local blockSkin=blockSkin
function Pnt.draw()
local sx,sy=sceneTemp.x,sceneTemp.y
gc.translate(200,60)
@@ -382,17 +337,24 @@ function Pnt.draw()
local pen=sceneTemp.pen
if pen>0 then
gc.setLineWidth(13)
gc.setColor(blockColor[pen])
gc.rectangle("line",745,460,70,70)
gc.setColor(skin.libColor[pen])
gc.rectangle("line",565,460,70,70)
elseif pen==-1 then
gc.setLineWidth(5)
gc.setColor(.9,.9,.9)
gc.line(755,470,805,520)
gc.line(755,520,805,470)
gc.line(575,470,625,520)
gc.line(575,520,625,470)
end
if sceneTemp.sure>0 then
gc.setColor(1,1,1,sceneTemp.sure*.02)
gc.draw(drawableText.question,660,11)
gc.draw(drawableText.question,1040,430)
end
setFont(40)
local _
for i=1,7 do
_=setting.skin[i]
gc.setColor(skin.libColor[_])
mStr(text.block[i],500+65*_,65)
end
end
function Pnt.play()
@@ -429,12 +391,12 @@ function Pnt.play()
local b=FX_badge[i]
gc.setColor(1,1,1,b.t<10 and b.t*.1 or b.t<50 and 1 or(60-b.t)*.1)
if b.t<10 then
gc.draw(badgeIcon,b[1]-14,b[2]-14)
gc.draw(IMG.badgeIcon,b[1]-14,b[2]-14)
elseif b.t<50 then
local t=((b.t-10)*.025)t=(3-2*t)*t*t
gc.draw(badgeIcon,b[1]*(1-t)+b[3]*t-14,b[2]*(1-t)+b[4]*t-14)
gc.draw(IMG.badgeIcon,b[1]*(1-t)+b[3]*t-14,b[2]*(1-t)+b[4]*t-14)
else
gc.draw(badgeIcon,b[3]-14,b[4]-14)
gc.draw(IMG.badgeIcon,b[3]-14,b[4]-14)
end
end
local P=players[1]
@@ -463,65 +425,146 @@ function Pnt.play()
end
function Pnt.pause()
Pnt.play()
local _=pauseTimer*.02
local S=sceneTemp
local T=S.timer*.02
--Dark BG
local _=T
if gameResult then _=_*.6 end
gc.setColor(.15,.15,.15,_)
gc.push("transform")
gc.origin()
gc.rectangle("fill",0,0,scr.w,scr.h)
gc.pop()
--Pause Info
setFont(25)
gc.setColor(1,1,1,pauseTimer*.02)
if pauseCount>0 then
_=curMode.pauseLimit and pauseTime>30
if _ then gc.setColor(1,.4,.4,pauseTimer*.02)end
gc.print(text.pauseCount..":["..pauseCount.."] "..format("%.2f",pauseTime).."s",110,150)
if _ then gc.setColor(1,1,1,pauseTimer*.02)end
end
for i=1,7 do
gc.print(text.pauseStat[i],95,30*i+310)
gc.print(sceneTemp[i],305,30*i+310)
end
for i=8,14 do
gc.print(text.pauseStat[i],845,30*i+100)
gc.print(sceneTemp[i],1050,30*i+100)
gc.setColor(1,.4,.4,T)
gc.print(text.pauseCount..":["..pauseCount.."] "..format("%.2f",pauseTime).."s",70,100)
end
gc.setColor(1,1,1,T)
--Mode Info
_=drawableText.modeName
gc.draw(_,120,230)
gc.draw(drawableText.levelName,135+_:getWidth(),230)
gc.draw(_,70,180)
gc.draw(drawableText.levelName,90+_:getWidth(),180)
--Result Text
setFont(35)
mDraw(gameResult and drawableText[gameResult]or drawableText.pause,640,50-10*(5-pauseTimer*.1)^1.5)
mText(gameResult and drawableText[gameResult]or drawableText.pause,640,50-10*(5-sceneTemp.timer*.1)^1.5)
--Infos
if frame>180 then
_=S.list
setFont(26)
for i=1,8 do
gc.print(text.pauseStat[i],70,210+40*i)
gc.printf(_[i],245,210+40*i,250,"right")
end
end
--Radar Chart
if T>.5 and frame>180 then
T=T*2-1
gc.setLineWidth(2)
gc.push("transform")
gc.translate(1026,400)
gc.scale((3-2*T)*T)
local C=S.color1;C[4]=T;gc.setColor(C)gc.polygon("fill",S.V1)
C=S.color2;C[4]=T;gc.setColor(C)gc.polygon("fill",S.V2)
gc.setColor(1,1,1,T*(.5+.5*sin(Timer()*12.626)))
gc.polygon("line",S.standard)
gc.setColor(1,1,1,T)
gc.line(S.V1)gc.line(S.V2)
gc.pop()
gc.line(1026,400-160,1026,400+160)
gc.line(1026-160,400,1026+160,400)
_=Timer()%6.2832
if _>3.1416 then
_=_-3.1416
setFont(35)
gc.setColor(1,1,1,T*sin(_))
mStr(text.atk,1026,420-230)
mStr(text.spd,1026+180,340)
mStr(text.recv,1026,420+140)
mStr(text.eff,1026-180,340)
else
gc.setColor(1,1,1,T*sin(_))
_=S.radar1
setFont(23)
mStr(_[1],1026,420-215)
mStr(_[2],1026+180,340)
mStr(_[3],1026,420+140)
mStr(_[4],1026-180,340)
end
end
end
function Pnt.setting_game()
gc.setColor(1,1,1)
mDraw(drawableText.setting_game,640,15)
setFont(33)
mStr("DAS:"..setting.das.."F",340,205)
mStr("ARR:"..setting.arr.."F",660,205)
setFont(22)
mStr(text.softdropdas..setting.sddas.."F",340,323)
mStr(text.softdroparr..setting.sdarr.."F",660,323)
gc.draw(blockSkin[7-int(Timer()*2)%7],720,570,Timer()%6.28319,2,nil,15,15)
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()
gc.setColor(1,1,1)
mDraw(drawableText.setting_graphic,640,15)
mText(drawableText.setting_graphic,640,15)
end
function Pnt.setting_sound()
gc.setColor(1,1,1,.8)
mDraw(drawableText.setting_sound,640,15)
mText(drawableText.setting_sound,640,15)
local t=Timer()
local _=sceneTemp.jump
local x,y=800,340+10*sin(t*.5)+(_-10)*_*.3
gc.translate(x,y)
gc.draw(miya.ch,0,0)
gc.draw(IMG.miyaCH,0,0)
gc.setColor(1,1,1,.7)
gc.draw(miya.f1,4,47+4*sin(t*.9))
gc.draw(miya.f2,42,107+5*sin(t))
gc.draw(miya.f3,93,126+3*sin(t*.7))
gc.draw(miya.f4,129,98+3*sin(t*.7))
gc.draw(IMG.miyaF1,4,47+4*sin(t*.9))
gc.draw(IMG.miyaF2,42,107+5*sin(t))
gc.draw(IMG.miyaF3,93,126+3*sin(t*.7))
gc.draw(IMG.miyaF4,129,98+3*sin(t*.7))
gc.translate(-x,-y)
end
local function timeConv(t)
return t.."F "..int(t*16.67).."ms"
end
function Pnt.setting_control()
--Testing grid line
gc.setLineWidth(4)
gc.setColor(1,1,1,.4)
gc.line(550,540,950,540)
gc.line(550,580,950,580)
gc.line(550,620,950,620)
for x=590,910,40 do
gc.line(x,530,x,630)
end
gc.setColor(1,1,1)
gc.line(550,530,550,630)
gc.line(950,530,950,630)
--Texts
gc.draw(drawableText.setting_control,80,50)
setFont(50)
gc.printf(text.preview,320,540,200,"right")
--Floating number
setFont(30)
local _=setting
mStr(timeConv(_.das),226+35*_.das,145)
mStr(timeConv(_.arr),226+35*_.arr,235)
mStr(timeConv(_.sddas),226+35*_.sddas,325)
mStr(timeConv(_.sdarr),226+35*_.sdarr,415)
--Testing O mino
_=blockSkin[setting.skin[6]]
local x=550+40*sceneTemp.pos
gc.draw(_,x,540,nil,40/30)
gc.draw(_,x,580,nil,40/30)
gc.draw(_,x+40,540,nil,40/30)
gc.draw(_,x+40,580,nil,40/30)
end
function Pnt.setting_key()
local s=sceneTemp
local a=.3+sin(Timer()*15)*.1
@@ -540,11 +583,11 @@ function Pnt.setting_key()
--Selection rect
gc.setColor(1,.3,.3)
mDraw(drawableText.keyboard,340,30)
mDraw(drawableText.keyboard,940,30)
mText(drawableText.keyboard,340,30)
mText(drawableText.keyboard,940,30)
gc.setColor(.3,.3,1)
mDraw(drawableText.joystick,540,30)
mDraw(drawableText.joystick,1140,30)
mText(drawableText.joystick,540,30)
mText(drawableText.joystick,1140,30)
gc.setColor(1,1,1)
setFont(26)
@@ -578,19 +621,19 @@ function Pnt.setting_skin()
for N=1,7 do
local face=setting.face[N]
local B=blocks[N][face]
local x,y=-30+140*N-scs[N][face][2]*30,335+scs[N][face][1]*30
local x,y=-25+140*N-scs[N][face][2]*30,325+scs[N][face][1]*30
local col=#B[1]
for i=1,#B do for j=1,col do
if B[i][j]then
gc.draw(blockSkin[N],x+30*j,y-30*i)
gc.draw(blockSkin[setting.skin[N]],x+30*j,y-30*i)
end
end end
gc.circle("fill",-15+140*N,350,sin(Timer()*10)+5)
gc.circle("fill",-10+140*N,340,sin(Timer()*10)+5)
end
for i=1,5 do
gc.draw(blockSkin[8+i],1110,140+60*i,nil,2)
for i=1,6 do
gc.draw(blockSkin[11+i],1110,100+60*i,nil,2)
end
gc.draw(drawableText.blockLayout,80,50)
gc.draw(drawableText.setting_skin,80,50)
end
function Pnt.setting_touch()
gc.setColor(1,1,1)
@@ -611,38 +654,73 @@ function Pnt.setting_touch()
end
function Pnt.setting_trackSetting()
gc.setColor(1,1,1)
mDraw(drawableText.VKTchW,140+50*setting.VKTchW,260)
mDraw(drawableText.VKOrgW,140+50*setting.VKTchW+50*setting.VKCurW,320)
mDraw(drawableText.VKCurW,640+50*setting.VKCurW,380)
mText(drawableText.VKTchW,140+50*setting.VKTchW,260)
mText(drawableText.VKOrgW,140+50*setting.VKTchW+50*setting.VKCurW,320)
mText(drawableText.VKCurW,640+50*setting.VKCurW,380)
end
function Pnt.help()
setFont(22)
setFont(20)
gc.setColor(1,1,1)
for i=1,#text.help do
gc.printf(text.help[i],200,30*i-10,1000,"center")
gc.printf(text.help[i],150,30*i-10,1000,"center")
end
setFont(19)
gc.print(text.used,30,330)
gc.draw(titleImage,280,610,.1,1+.05*sin(Timer()*2),nil,206,35)
gc.setLineWidth(5)
gc.rectangle("line",17,17,260,260)
gc.rectangle("line",1077,17,186,186)
gc.draw(payCode,20,20)
gc.draw(groupCode,1080,20)
gc.setColor(1,1,1,sin(Timer()*10)*.5+.5)
setFont(30)
mStr(text.support,150,283)
gc.draw(IMG.titleImage,280,610,.1,1+.05*sin(Timer()*2),nil,206,35)
gc.setLineWidth(3)
gc.rectangle("line",18,18,263,263)
gc.rectangle("line",1012,18,250,250)
gc.draw(IMG.pay1,20,20)
gc.draw(IMG.pay2,1014,20)
setFont(20)
mStr(text.group,1170,210)
mStr(text.group,640,490)
gc.setColor(1,1,1,sin(Timer()*10)*.4+.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)
end
function Pnt.stat()
setFont(23)
gc.setColor(1,1,1)
for i=1,16 do
gc.print(text.stat[i],400,30*i+10)
gc.print(sceneTemp[i],720,30*i+10)
local chart=sceneTemp.chart
setFont(24)
local _,__=skin.libColor,setting.skin
local A,B=chart.A1,chart.A2
for x=1,7 do
gc.setColor(_[__[x]])
mStr(text.block[x],80*x,40)
mStr(text.block[x],80*x,280)
for y=1,4 do
mStr(A[x][y],80*x,40+40*y)
mStr(B[x][y],80*x,280+40*y)
end
mStr(chart.Y1[x],80*x,240)
mStr(chart.Y2[x],80*x,480)
end
gc.draw(titleImage,260,570,.2+.07*sin(Timer()*3),nil,nil,206,35)
gc.setColor(1,1,1)
A,B=chart.X1,chart.X2
mStr(text.stat.spin,650,45)
mStr(text.stat.clear,650,285)
for y=1,4 do
mStr(A[y],650,40+40*y)
mStr(B[y],650,280+40*y)
end
setFont(22)
for i=1,11 do
gc.print(sceneTemp.item[i],740,40*i+10)
end
gc.setLineWidth(4)
for x=1,8 do
x=80*x-40
gc.line(x,80,x,240)
gc.line(x,320,x,480)
end
for y=2,6 do
gc.line(40,40*y,600,40*y)
gc.line(40,240+40*y,600,240+40*y)
end
gc.draw(IMG.titleImage,260,615,.2+.04*sin(Timer()*3),nil,nil,206,35)
end
function Pnt.history()
gc.setColor(.2,.2,.2,.7)

View File

@@ -80,14 +80,14 @@ end
-------------------------------------------------⑨Stack setup
local dirCount={1,1,3,3,3,0,1}
local spinOffset={
{1,0,0},--S
{1,0,0},--Z
{1,0,0},--L
{1,0,0},--J
{1,0,0},--T
{0,0,0},--O
{2,0,1},--I
}for i=1,7 do spinOffset[i][0]=0 end
{[0]=0,1,0,0},--Z
{[0]=0,1,0,0},--L
{[0]=0,1,0,0},--J
{[0]=0,1,0,0},--T
{[0]=0,1,0,0},--S
{[0]=0,0,0,0},--O
{[0]=0,2,0,1},--I
}
local FCL={
[1]={
{{11},{11,2},{1},{},{2},{2,2},{12,1},{12}},
@@ -106,10 +106,7 @@ local FCL={
{{11},{11,2},{1},{},{2},{12,1},{12},},
{{4,11},{11,4},{11,3},{1,4},{4},{3},{2,3},{12,4},{12,3},{3,12},},
},
}
FCL[2]=FCL[1]
FCL[4]=FCL[3]
FCL[5]=FCL[3]
}FCL[2],FCL[4],FCL[5]=FCL[1],FCL[3],FCL[3]
local LclearScore={[0]=0,-200,-120,-80,200}
local HclearScore={[0]=0,100,140,200,500}
local function ifoverlapAI(f,bk,x,y)
@@ -256,7 +253,7 @@ AI_think={
P.AI_delay=P.AI_delay0
if Timer()-P.modeData.point>P.modeData.event then
P.modeData.point=Timer()
P.modeData.event=P.AI_delay0+rnd(2,10)
P.modeData.event=P.AI_delay0+rnd(5,15)
P:changeAtkMode(rnd()<.85 and 1 or #P.atker>3 and 4 or rnd()<.3 and 2 or 3)
end
return 1
@@ -294,7 +291,7 @@ AI_think={
P.AI_delay=P.AI_delay0
if Timer()-P.modeData.point>P.modeData.event then
P.modeData.point=Timer()
P.modeData.event=P.AI_delay0+rnd(2,10)
P.modeData.event=P.AI_delay0+rnd(5,15)
P:changeAtkMode(rnd()<.85 and 1 or #P.atker>3 and 4 or rnd()<.3 and 2 or 3)
end
return 1

240
parts/bg.lua Normal file
View File

@@ -0,0 +1,240 @@
local gc=love.graphics
local int,ceil,rnd,abs=math.floor,math.ceil,math.random,math.abs
local max,min,sin,cos=math.max,math.min,math.sin,math.cos
local scr=scr
local BGinit,BGresize,BGupdate,BGdraw,BGdiscard={},{},{},{},{}
local BGvars={_G=_G}
function BGdraw.none()
gc.clear(.15,.15,.15)
end
function BGdraw.grey()
gc.clear(.3,.3,.3)
end
function BGinit.glow()
t=0
end
function BGupdate.glow(dt)
t=t+dt
end
function BGdraw.glow()
local t=(sin(t*.5)+sin(t*.7)+sin(t*.9+1)+sin(t*1.5)+sin(t*2+10))*.08
gc.clear(t,t,t)
end
function BGinit.rgb()
t=0
end
function BGupdate.rgb(dt)
t=t+dt
end
function BGdraw.rgb()
gc.clear(
sin(t*1.2)*.15+.2,
sin(t*1.5)*.15+.2,
sin(t*1.9)*.15+.2
)
end
function BGinit.strap()
t=0
img=_G.IMG.gameBG2
end
function BGupdate.strap(dt)
t=t+dt
end
function BGdraw.strap()
gc.setColor(.5,.5,.5)
local x=t%16*-64
::L::
gc.draw(img,x,0,nil,8,scr.h)
x=x+1024--image width*8
if x<scr.w then goto L end
end
function BGinit.flink()
t=0
end
function BGupdate.flink(dt)
t=t+dt
end
function BGdraw.flink()
local t=.13-t%3%1.7
if t<.2 then gc.clear(t,t,t)
else gc.clear(0,0,0)
end
end
function BGinit.game1()
t=0
img=_G.IMG.gameBG1
end
function BGupdate.game1(dt)
t=t+dt
end
function BGdraw.game1()
gc.setColor(.5,.5,.5)
gc.draw(img,scr.w*.5,scr.h*.5,t*.15,scr.rad*.0625,nil,16,16)
end--Rainbow
function BGinit.game2()
t=0
img=_G.IMG.gameBG1
end
function BGupdate.game2(dt)
t=t+dt
end
function BGdraw.game2()
gc.setColor(.5,.26,.26)
gc.draw(img,scr.w*.5,scr.h*.5,t*.15,scr.rad*.0625,nil,16,16)
end--Red rainbow
function BGinit.game3()
t=0
img=_G.IMG.gameBG1
end
function BGupdate.game3(dt)
t=t+dt
end
function BGdraw.game3()
gc.setColor(.4,.4,.8)
gc.draw(img,scr.w*.5,scr.h*.5,t*.15,scr.rad*.0625,nil,16,16)
end--Blue rainbow
function BGinit.game4()
t=0
img=_G.IMG.gameBG2
end
function BGupdate.game4(dt)
t=t+dt
end
function BGdraw.game4()
gc.setColor(.05,.4,.4)
local x=t%8*-128
::L::
gc.draw(img,x,0,nil,8,scr.h)
x=x+1024--image width*8
if x<scr.w then goto L end
end--Fast strap
function BGinit.game5()
t=0
end
function BGupdate.game5(dt)
t=t+dt
end
function BGdraw.game5()
local t=2.5-t%20%6%2.5
if t<.3 then gc.clear(t,t,t)
else gc.clear(0,0,0)
end
end--Lightning
function BGinit.game6()
t=0
colorLib=_G.skin.libColor
colorSet=_G.setting.skin
miniBlock=_G.miniBlock
end
function BGupdate.game6(dt)
t=t+dt
end
local blocks=require("parts/mino")
local scs=require("parts/spinCenters")
function BGdraw.game6()
local t=1.2-t%10%3%1.2
if t<.3 then gc.clear(t,t,t)
else gc.clear(0,0,0)
end
local R=7-int(t*.5)%7
local _=colorLib[colorSet[R]]
gc.setColor(_[1],_[2],_[3],.1)
gc.draw(miniBlock[R],640,360,t%3.1416*6,400,400,scs[R][0][2]-.5,#blocks[R][0]-scs[R][0][1]+.5)
end--Fast lightning&spining tetromino
local matrixT={}for i=1,50 do matrixT[i]={}for j=1,50 do matrixT[i][j]=love.math.noise(i,j)+2 end end
function BGinit.matrix()
t=0
end
function BGupdate.matrix(dt)
t=t+dt
end
function BGdraw.matrix()
gc.scale(scr.k)
gc.clear(.15,.15,.15)
local _=ceil(scr.h/80)
for i=1,ceil(scr.w/80)do
for j=1,_ do
gc.setColor(1,1,1,sin(matrixT[i][j]*t)*.1+.1)
gc.rectangle("fill",80*i,80*j,-80,-80)
end
end
gc.scale(1/scr.k)
end
function BGinit.space()
stars={}
for i=1,2600,5 do
local s=0.75*2^(rnd()*1.5)
stars[i]=s --size
stars[i+1]=rnd(W) --x
stars[i+2]=rnd(H) --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
end
function BGupdate.space(dt)
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
end--star moving
end
function BGdraw.space()
gc.clear(.2,.2,.2)
if not stars[1]then return end
gc.translate(-50,-50)
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])
end
gc.translate(50,50)
end
function BGdiscard.space()
stars={}
end
for k in next,BGdraw do
if BGinit[k]then setfenv(BGinit[k], BGvars)end
if BGresize[k]then setfenv(BGresize[k], BGvars)end
if BGupdate[k]then setfenv(BGupdate[k], BGvars)end
if BGdraw[k]then setfenv(BGdraw[k], BGvars)end
if BGdiscard[k]then setfenv(BGdiscard[k], BGvars)end
end
local BG={
cur="none",
resize=NULL,
update=NULL,
draw=BGdraw.none,
}
function BG.set(bg)
if bg==BG.cur or not setting.bg then return end
BG.cur=bg
local _=BGdiscard[BG.cur]if _ then _()collectgarbage()end
BG.resize=BGresize[bg]or NULL;BG.resize(scr.w,scr.h)
_=BGinit[bg]if _ then _()end
BG.update=BGupdate[bg]or NULL
BG.draw=BGdraw[bg]
end
return BG

View File

@@ -1,27 +1,13 @@
local rem=table.remove
local BGM={}
BGM.nowPlay=nil
BGM.playing=nil--last loaded source
BGM.playingID=nil--last loaded ID
-- BGM.nowPlay=[str:playing ID]
-- BGM.playing=[src:playing SRC]
BGM.list={
"blank",
"way",
"race",
"newera",
"push",
"reason",
"infinite",
"cruelty",
"final",
"secret7th",
"secret8th",
"rockblock",
"8-bit happiness",
"shining terminal",
"oxygen",
"distortion",
"end",
"blank","way","newera","infinite","reason",
"race","push","secret7th","secret8th",
"rockblock","cruelty","final","8-bit happiness","end",
"shining terminal","oxygen","distortion",
}
function BGM.loadOne(_)
_,BGM.list[_]=BGM.list[_]
@@ -37,20 +23,12 @@ end
function BGM.play(s)
if setting.bgm==0 or not s then return end
if BGM.nowPlay~=s then
if BGM.nowPlay then newTask(Event_task.bgmFadeOut,nil,BGM.nowPlay)end
for i=#Task,1,-1 do
local T=Task[i]
if T.code==Event_task.bgmFadeIn then
T.code=Event_task.bgmFadeOut
elseif T.code==Event_task.bgmFadeOut and T.data==s then
rem(Task,i)
end
end
if s then
BGM.playingID=s
end
BGM.nowPlay=s
newTask(Event_task.bgmFadeIn,nil,s)
if BGM.nowPlay then TASK.new(tickEvent.bgmFadeOut,nil,BGM.nowPlay)end
TASK.changeCode(tickEvent.bgmFadeIn,tickEvent.bgmFadeOut)
TASK.removeTask_data(s)
BGM.nowPlay,BGM.suspend=s
TASK.new(tickEvent.bgmFadeIn,nil,s)
BGM.playing=BGM.list[s]
BGM.playing:play()
end
@@ -60,29 +38,22 @@ function BGM.freshVolume()
local v=setting.bgm*.1
if v>0 then
BGM.playing:setVolume(v)
if not BGM.nowPlay then
if BGM.suspend then
BGM.playing:play()
BGM.nowPlay=BGM.playingID
BGM.nowPlay,BGM.suspend=BGM.suspend
end
else
BGM.playing:pause()
BGM.playing:setVolume(0)
BGM.nowPlay=nil
BGM.playing:pause()
BGM.suspend,BGM.nowPlay=BGM.nowPlay
end
end
end
function BGM.stop()
if BGM.nowPlay then
for i=1,#Task do
local T=Task[i]
if T.code==Event_task.bgmFadeIn and T.data==BGM.nowPlay then
T.code=Event_task.bgmFadeOut
goto L
end
end
BGM.list[BGM.nowPlay]:stop()
::L::
BGM.nowPlay=nil
TASK.new(tickEvent.bgmFadeOut,nil,BGM.nowPlay)
end
TASK.changeCode(tickEvent.bgmFadeIn,tickEvent.bgmFadeOut)
BGM.playing,BGM.nowPlay=nil
end
return BGM

View File

@@ -28,13 +28,17 @@ if setting.lang==1 then
"使用love2d引擎制作",
"有疑问?先看设置有没有你想要的",
"有建议的话可以把信息反馈给作者~",
"不要按F8",
"不要按F10",
"秘密数字:626",
"CLASSIC SEXY RUSSIAN BLOCKS",
"戴上耳机以获得最佳体验",
"少女祈祷中",
"LrL,RlR LLr,RRl RRR/LLL F!!",--ZSLJTTI
"(第一次才准)今日幸运数字:"..math.random(100,626),
"按键/点击以强制满速加载",
"LrL,RlR LLr,RRl RRR,LLL RfR,RRf,rFF FFF",--ZSLJTOI
"RUR'U'R'FR2U'R'U'RUR'F'",
"Am G F G",
"Techmino 好玩!",
"Techminohaowan",
}
elseif setting.lang==2 then
L={
@@ -65,13 +69,17 @@ elseif setting.lang==2 then
"使用love2d引擎制作",
"有疑问?先看设置有没有你想要的",
"有建议的话可以把信息反馈给作者~",
"不要按F8",
"不要按F10",
"秘密数字:626",
"CLASSIC SEXY RUSSIAN BLOCKS",
"戴上耳机以获得最佳体验",
"少女祈祷中",
"LrL,RlR LLr,RRl RRR/LLL F!!",--ZSLJTTI
"(第一次才准)今日幸运数字:"..math.random(100,626),
"按键/点击以强制满速加载",
"LrL,RlR LLr,RRl RRR,LLL RfR,RRf,rFF FFF",--ZSLJTOI
"RUR'U'R'FR2U'R'U'RUR'F'",
"Am G F G",
"Techmino 好玩!",
"Techminohaowan",
}
elseif setting.lang==3 then
L={
@@ -102,13 +110,17 @@ elseif setting.lang==3 then
"Powered by love2d",
"Find out what's in the setting!",
"Any suggestions to author!",
"DO NOT PRESS F8",
"DO NOT PRESS F10",
"Secret num:626",
"Techmino=Technique+Tetromino",
"CLASSIC SEXY RUSSIAN BLOCKS",
"Headphones for better experience",
"少女祈禱中",
"LrL,RlR LLr,RRl RRR/LLL F!!",--ZSLJTTI
"any-key/click to load at fastest speed",
"RUR'U'R'FR2U'R'U'RUR'F'",
"Am G F G",
"LrL,RlR LLr,RRl RRR,LLL RfR,RRf,rFF FFF",--ZSLJTOI
"Techmino is so fun!",
}
end
return L[math.random(#L)]

40
parts/img.lua Normal file
View File

@@ -0,0 +1,40 @@
local IMG={
titleImage="mess/title.png",
coloredTitleImage="mess/title_colored.png",
dialCircle="mess/dialCircle.png",
dialNeedle="mess/dialNeedle.png",
badgeIcon="mess/badge.png",
spinCenter="mess/spinCenter.png",
ctrlSpeedLimit="mess/ctrlSpeedLimit.png",
speedLimit="mess/speedLimit.png",
pay1="mess/pay1.png",
pay2="mess/pay2.png",
miyaCH="miya/ch.png",
miyaF1="miya/f1.png",
miyaF2="miya/f2.png",
miyaF3="miya/f3.png",
miyaF4="miya/f4.png",
gameBG1="BG/bg1.png",
gameBG2="BG/bg2.png",
}
local list={}
local count=0
for k,v in next,IMG do
count=count+1
list[count]=k
end
function IMG.getCount()
return count
end
function IMG.loadOne(_)
local N=list[_]
IMG[N]=love.graphics.newImage("/image/"..IMG[N])
end
function IMG.loadAll()
for i=1,count do
IMG.loadOne(i)
end
end
return IMG

View File

@@ -43,7 +43,7 @@ local TRS={
[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,2}, {-1,2} },
[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} },
@@ -55,7 +55,7 @@ local TRS={
[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,2}, {1,2} },
[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} },
@@ -91,8 +91,8 @@ local TRS={
[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},{1,0}, {-1,0}},
}
[31]={{0,0},{0,-1}, {1,0}, {-1,0}, {0,1} },
}--I
}for i=1,7 do collect(TRS[i])end
local AIRS={
[1]={

View File

@@ -1,13 +1,12 @@
--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("parts/shader/shadowMap.cs")--Shader for caculating the 1D shadow map.
local lightRenderShader=gc.newShader("parts/shader/lightRender.cs")--Shader for rendering blurred lights and shadows.
Lights={}--Lightsource objects
local Lights=Lights
--Private--
local shadowMapShader=gc.newShader("shader/shadowMap.cs")--Shader for caculating the 1D shadow map.
local lightRenderShader=gc.newShader("shader/lightRender.cs")--Shader for rendering blurred lights and shadows.
local Lights={}--Lightsource objects
local function move(L,x,y)
L.x,L.y=x,y
end
@@ -51,18 +50,18 @@ local function draw(L)
--复位
end
--Public--
function drawLight()
function Lights.draw()
for i=1,#Lights do
Lights[i]:draw()
end
end
function clearLight(L)
for i=1,#Lights do
function Lights.clear(L)
for i=#Lights,1,-1 do
Lights[i]:destroy()
Lights[i]=nil
end
end
function addLight(x,y,R,F)
function Lights.add(x,y,R,F)
local id=#Lights+1
Lights[id]={
id=id,
@@ -77,4 +76,5 @@ function addLight(x,y,R,F)
draw=draw,
destroy=destroy,
}
end
end
return Lights

View File

@@ -32,6 +32,7 @@ color={
darkCyan={0,.6,.6},
darkGrey={.3,.3,.3},
black={0,0,0},
orange={1,.6,0},
pink={1,0,.6},
grass={.6,1,0},
@@ -74,7 +75,7 @@ voiceList={
mini={"mini_1","mini_2","mini_3"},
b2b={"b2b_1","b2b_2","b2b_3"},
b3b={"b3b_1","b3b_2"},
pc={"perfectclear_1","perfectclear_2"},
pc={"clear_1","clear_2"},
win={"win_1","win_2","win_3","win_4","win_5","win_6","win_6","win_7"},
lose={"lose_1","lose_2","lose_3"},
bye={"bye_1","bye_2"},

View File

@@ -1,13 +1,3 @@
local O,_=true,false
local L={
{{_,O,O},{O,O,_}}, --Z
{{O,O,_},{_,O,O}}, --S
{{O,O,O},{_,_,O}}, --L
{{O,O,O},{O,_,_}}, --J
{{O,O,O},{_,O,_}}, --T
{{O,O},{O,O}}, --O
{{O,O,O,O}}, --I
}
local function RotCW(B)
local N={}
local r,c=#B,#B[1]--row,col
@@ -19,14 +9,16 @@ local function RotCW(B)
end
return N
end
-- [1,1,1]
-- [0,0,1]--r=2,c=3
-- ↓ (Y inv)
-- [1,1]
-- [1,0]
-- [1,0]
local O,_=true,false
local L={
{{_,O,O},{O,O,_}}, --Z
{{O,O,_},{_,O,O}}, --S
{{O,O,O},{_,_,O}}, --L
{{O,O,O},{O,_,_}}, --J
{{O,O,O},{_,O,_}}, --T
{{O,O},{O,O}}, --O
{{O,O,O,O}}, --I
}
for i=1,#L do
local B=L[i]
L[i]={[0]=B}

View File

@@ -14,76 +14,76 @@ modes={
{"solo_3", id=13, x=-700, y=-1000, size=35,shape=1,icon="solo", unlock={14,16}},
{"solo_4", id=14, x=-900, y=-1000, size=35,shape=1,icon="solo", unlock={15}},
{"solo_5", id=15, x=-1100, y=-1000, size=35,shape=1,icon="solo", unlock={}},
{"techmino49_easy", id=16, x=-900, y=-1200, size=35,shape=1,icon="", unlock={17,19}},
{"techmino49_hard", id=17, x=-900, y=-1400, size=35,shape=1,icon="", unlock={18}},
{"techmino49_ultimate", id=18, x=-900, y=-1600, size=35,shape=1,icon="", unlock={}},
{"techmino49_easy", id=16, x=-900, y=-1200, size=35,shape=1,icon="royale", unlock={17,19}},
{"techmino49_hard", id=17, x=-900, y=-1400, size=35,shape=1,icon="royale", unlock={18}},
{"techmino49_ultimate", id=18, x=-900, y=-1600, size=35,shape=1,icon="royale", unlock={}},
{"techmino99_easy", id=19, x=-1100, y=-1400, size=35,shape=1,icon="", unlock={20}},
{"techmino99_hard", id=20, x=-1100, y=-1600, size=35,shape=1,icon="", unlock={21}},
{"techmino99_ultimate", id=21, x=-1100, y=-1800, size=35,shape=1,icon="", unlock={}},
{"techmino99_easy", id=19, x=-1100, y=-1400, size=35,shape=1,icon="royale", unlock={20}},
{"techmino99_hard", id=20, x=-1100, y=-1600, size=35,shape=1,icon="royale", unlock={21}},
{"techmino99_ultimate", id=21, x=-1100, y=-1800, size=35,shape=1,icon="royale", unlock={}},
{"round_1", id=22, x=-300, y=-800, size=35,shape=1,icon="round", unlock={23}},
{"round_2", id=23, x=-500, y=-800, size=35,shape=1,icon="round", unlock={24}},
{"round_3", id=24, x=-700, y=-800, size=35,shape=1,icon="round", unlock={25}},
{"round_4", id=25, x=-900, y=-800, size=35,shape=1,icon="round", unlock={26}},
{"round_5", id=26, x=-1100, y=-800, size=35,shape=1,icon="round", unlock={}},
{"master_beginner", id=27, x=0, y=-1000, size=35,shape=1,icon="", unlock={28}},
{"master_adavnce", id=28, x=0, y=-1200, size=35,shape=1,icon="", unlock={29,30}},
{"master_final", id=29, x=0, y=-1400, size=35,shape=1,icon="", unlock={}},
{"GM", id=30, x=150, y=-1500, size=35,shape=1,icon="", unlock={}},
{"master_beginner", id=27, x=0, y=-1000, size=35,shape=1,icon="master", unlock={28}},
{"master_adavnce", id=28, x=0, y=-1200, size=35,shape=1,icon="master", unlock={29,30}},
{"master_final", id=29, x=0, y=-1400, size=40,shape=2,icon="master", unlock={}},
{"GM", id=30, x=150, y=-1500, size=35,shape=1,icon="master", unlock={}},
{"blind_easy", id=31, x=150, y=-700, size=35,shape=1,icon="", unlock={32}},
{"blind_normal", id=32, x=150, y=-800, size=35,shape=1,icon="", unlock={33}},
{"blind_hard", id=33, x=150, y=-900, size=35,shape=1,icon="", unlock={34}},
{"blind_lunatic", id=34, x=150, y=-1000, size=35,shape=1,icon="", unlock={35}},
{"blind_ultimate", id=35, x=150, y=-1100, size=35,shape=1,icon="", unlock={}},
{"blind_easy", id=31, x=150, y=-700, size=35,shape=1,icon="blind", unlock={32}},
{"blind_normal", id=32, x=150, y=-800, size=35,shape=1,icon="blind", unlock={33}},
{"blind_hard", id=33, x=150, y=-900, size=35,shape=1,icon="blind", unlock={34}},
{"blind_lunatic", id=34, x=150, y=-1000, size=35,shape=1,icon="blind", unlock={35}},
{"blind_ultimate", id=35, x=150, y=-1100, size=35,shape=1,icon="blind", unlock={}},
{"classic_fast", id=36, x=-300, y=-1200, size=35,shape=2,icon="classic", unlock={}},
{"survivor_easy", id=37, x=300, y=-600, size=35,shape=1,icon="", unlock={38}},
{"survivor_normal", id=38, x=500, y=-600, size=35,shape=1,icon="", unlock={39,42,44,46}},
{"survivor_hard", id=39, x=700, y=-600, size=35,shape=1,icon="", unlock={40}},
{"survivor_lunatic", id=40, x=900, y=-600, size=35,shape=1,icon="", unlock={41}},
{"survivor_ultimate", id=41, x=1100, y=-600, size=35,shape=1,icon="", unlock={}},
{"attacker_hard", id=42, x=300, y=-800, size=35,shape=1,icon="", unlock={43}},
{"attacker_ultimate", id=43, x=300, y=-1000, size=35,shape=1,icon="", 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}},
{"survivor_lunatic", id=40, x=900, y=-600, size=35,shape=1,icon="survivor",unlock={41}},
{"survivor_ultimate", id=41, x=1100, y=-600, size=35,shape=1,icon="survivor",unlock={}},
{"attacker_hard", id=42, x=300, y=-800, size=35,shape=1,icon="attacker",unlock={43}},
{"attacker_ultimate", id=43, x=300, y=-1000, size=35,shape=1,icon="attacker",unlock={}},
{"defender_normal", id=44, x=500, y=-800, size=35,shape=1,icon="", unlock={45}},
{"defender_lunatic", id=45, x=500, y=-1000, size=35,shape=1,icon="", unlock={}},
{"defender_normal", id=44, x=500, y=-800, size=35,shape=1,icon="defender",unlock={45}},
{"defender_lunatic", id=45, x=500, y=-1000, size=35,shape=1,icon="defender",unlock={}},
{"dig_hard", id=46, x=700, y=-800, size=35,shape=1,icon="", unlock={47}},
{"dig_ultimate", id=47, x=700, y=-1000, size=35,shape=1,icon="", unlock={}},
{"dig_hard", id=46, x=700, y=-800, size=35,shape=1,icon="dig", unlock={47}},
{"dig_ultimate", id=47, x=700, y=-1000, size=35,shape=1,icon="dig", unlock={}},
{"bigbang", id=48, x=400, y=-400, size=55,shape=1,icon="", unlock={49,51,56}},
{"c4wtrain_normal", id=49, x=700, y=-400, size=35,shape=1,icon="", unlock={50}},
{"c4wtrain_lunatic", id=50, x=900, y=-400, size=35,shape=1,icon="", unlock={}},
{"bigbang", id=48, x=400, y=-400, size=55,shape=1,icon="bigbang", unlock={49,51,56}},
{"c4wtrain_normal", id=49, x=700, y=-400, size=35,shape=1,icon="c4wtrain",unlock={50}},
{"c4wtrain_lunatic", id=50, x=900, y=-400, size=35,shape=1,icon="c4wtrain",unlock={}},
{"pctrain_normal", id=51, x=700, y=-200, size=35,shape=1,icon="", unlock={52,53}},
{"pctrain_lunatic", id=52, x=900, y=-200, size=35,shape=1,icon="", unlock={}},
{"pcchallenge_normal", id=53, x=800, y=-100, size=35,shape=1,icon="", unlock={54}},
{"pcchallenge_hard", id=54, x=1000, y=-100, size=35,shape=1,icon="", unlock={55}},
{"pcchallenge_lunatic", id=55, x=1200, y=-100, size=35,shape=1,icon="", unlock={}},
{"tech_normal", id=56, x=400, y=-100, size=35,shape=1,icon="", unlock={57,58}},
{"tech_normal+", id=57, x=650, y=150, size=35,shape=1,icon="", unlock={64}},
{"tech_hard", id=58, x=400, y=50, size=35,shape=1,icon="", unlock={59,60}},
{"tech_hard+", id=59, x=250, y=50, size=35,shape=1,icon="", unlock={}},
{"tech_lunatic", id=60, x=400, y=200, size=35,shape=1,icon="", unlock={61,62}},
{"tech_lunatic+", id=61, x=250, y=200, size=35,shape=1,icon="", unlock={}},
{"tech_ultimate", id=62, x=400, y=350, size=35,shape=1,icon="", unlock={63}},
{"tech_ultimate+", id=63, x=250, y=350, size=35,shape=1,icon="", unlock={}},
{"tsd_easy", id=64, x=800, y=200, size=35,shape=1,icon="", unlock={65}},
{"tsd_hard", id=65, x=1000, y=200, size=35,shape=1,icon="", unlock={66}},
{"tsd_ultimate", id=66, x=1200, y=200, size=35,shape=1,icon="", unlock={}},
{"pctrain_normal", id=51, x=700, y=-200, size=35,shape=1,icon="pctrain", unlock={52,53}},
{"pctrain_lunatic", id=52, x=900, y=-200, size=35,shape=1,icon="pctrain", unlock={}},
{"pcchallenge_normal", id=53, x=800, y=-100, size=35,shape=1,icon="pcchallenge",unlock={54}},
{"pcchallenge_hard", id=54, x=1000, y=-100, size=35,shape=1,icon="pcchallenge",unlock={55}},
{"pcchallenge_lunatic", id=55, x=1200, y=-100, size=35,shape=1,icon="pcchallenge",unlock={}},
{"tech_normal", id=56, x=400, y=-100, size=35,shape=1,icon="tech", unlock={57,58}},
{"tech_normal+", id=57, x=650, y=150, size=35,shape=1,icon="tech", unlock={64}},
{"tech_hard", id=58, x=400, y=50, size=35,shape=1,icon="tech", unlock={59,60}},
{"tech_hard+", id=59, x=250, y=50, size=35,shape=1,icon="tech", unlock={}},
{"tech_lunatic", id=60, x=400, y=200, size=35,shape=1,icon="tech", unlock={61,62}},
{"tech_lunatic+", id=61, x=250, y=200, size=35,shape=1,icon="tech", unlock={}},
{"tech_ultimate", id=62, x=400, y=350, size=35,shape=1,icon="tech", unlock={63}},
{"tech_ultimate+", id=63, x=250, y=350, size=35,shape=1,icon="tech", unlock={}},
{"tsd_easy", id=64, x=800, y=200, size=35,shape=1,icon="tsd", unlock={65}},
{"tsd_hard", id=65, x=1000, y=200, size=35,shape=1,icon="tsd", unlock={66}},
{"tsd_ultimate", id=66, x=1200, y=200, size=35,shape=1,icon="tsd", unlock={}},
{"zen", id=67, x=-900, y=-600, size=35,shape=1,icon="zen", unlock={68,69,70}},
{"ultra", id=68, x=-1100, y=-400, size=35,shape=1,icon="", unlock={}},
{"infinite", id=69, x=-900, y=-400, size=35,shape=1,icon="", unlock={}},
{"infinite_dig", id=70, x=-1100, y=-600, size=35,shape=1,icon="", unlock={}},
{"ultra", id=68, x=-1100, y=-400, size=35,shape=1,icon="ultra", unlock={}},
{"infinite", id=69, x=-900, y=-400, size=35,shape=1,icon="infinite",unlock={}},
{"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="", unlock={}},
{"hotseat_3P", id=74, x=-450, y=200, size=45,shape=3,icon="", unlock={}},
{"hotseat_4P", id=75, x=-600, y=200, size=45,shape=3,icon="", 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={}},
}
modeRanks={}
for i=1,#modes do

View File

@@ -17,7 +17,7 @@ SFX.list={
"clear_1","clear_2","clear_3","clear_4",
"spin_0","spin_1","spin_2","spin_3",
"emit","blip_1","blip_2",
"perfectclear",
"clear",
"error",
--Mono sfxs
@@ -38,7 +38,7 @@ function SFX.play(s,v,pos)
while S[n]:isPlaying()do
n=n+1
if not S[n]then
S[n]=S[n-1]:clone()
S[n]=S[1]:clone()
S[n]:seek(0)
break
end

View File

@@ -1,2 +1,5 @@
gc=love.graphics
shader_glow=gc.newShader("parts/shader/glow.cs")
local gc=love.graphics
return{
-- glow=gc.newShader("shader/glow.cs"),
alpha=gc.newShader("shader/alpha.cs"),
}

View File

@@ -34,7 +34,7 @@ skin.libColor={
color.purple,
color.magenta,
color.pink,
color.darkGreen,
color.darkGrey,
color.grey,
color.lightGrey,
color.darkPurple,
@@ -42,6 +42,7 @@ skin.libColor={
color.darkGreen,
}
function skin.load()
local _
gc.push()
gc.origin()
gc.setDefaultFilter("nearest","nearest")
@@ -70,17 +71,17 @@ function skin.load()
gc.setLineWidth(3)
for i=1,11 do
puzzleMark[i]=C(30,30)
local _=blockColor[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(blockColor[i])
gc.setColor(skin.libColor[i])
gc.rectangle("line",7,7,16,16)
end
local _=C(30,30)
_=C(30,30)
gc.setColor(1,1,1)
gc.line(5,5,25,25)
gc.line(5,25,25,5)
@@ -97,42 +98,29 @@ function skin.prevSet()--prev skin_set
setting.skinSet=_
skin.change(_)
_=list[_]
TEXT(_,1100,100,int(300/#_)+5,"fly")
TEXT.show(_,1100,100,int(300/#_)+5,"fly")
end
function skin.nextSet()--next skin_set
local _=setting.skinSet%L+1
setting.skinSet=_
skin.change(_)
_=list[_]
TEXT(_,1100,100,int(300/#_)+5,"fly")
TEXT.show(_,1100,100,int(300/#_)+5,"fly")
end
function skin.prev(i)--prev skin for [i]
local _=setting.skin
_[i]=(_[i]-2)%11+1
skin.adjust(i,_[i])
end
function skin.next(i)--next skin for [i]
local _=setting.skin
_[i]=_[i]%11+1
skin.adjust(i,_[i])
end
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]
for _=1,7 do
skin.adjust(_,setting.skin[_])
end
for _=8,13 do
blockSkin[_]=skin.lib[i][_+4]
blockSkinMini[_]=skin.libMini[i][_+4]
end
end
function skin.adjust(i,id)--load color/image/image_mini of [i] from lib
local S=setting.skinSet
blockSkin[i]=skin.lib[S][id]
blockSkinMini[i]=skin.libMini[S][id]
blockColor[i]=skin.libColor[id]
blockSkin=skin.lib[i]
blockSkinMini=skin.libMini[i]
end
return skin

View File

@@ -1,69 +0,0 @@
local gc=love.graphics
local sin,cos,rnd,min=math.sin,math.cos,math.random,math.min
local W,H,R--w,h+=100,r=real Radius
local stars={}
local planet={}
local function newPlanet()
local a=rnd()*3.142
local r=(H+W)*(2+rnd())*.05
planet.r=r
planet.x=W*.5+cos(a)*(R+r)
planet.y=H*.5+sin(a)*(R+r)
planet.vx=-cos(a+rnd()-.5)*.0626
planet.vy=-sin(a+rnd()-.5)*.0626
planet.R=.7+rnd()*.2
planet.G=.7+rnd()*.1
end
local space={}--LIB
function space.resize(w,h)
R=((w*.5)^2+(h*.5)^2)^.5
W,H=w+100,h+100
end
function space.new()
if not W then space.resize(scr.w,scr.h)end
newPlanet()
for i=1,2600,5 do
local s=0.75*2^(rnd()*1.5)
stars[i]=s --size
stars[i+1]=rnd(W) --x
stars[i+2]=rnd(H) --y
stars[i+3]=(rnd()-.5)*.01*s --vx
stars[i+4]=(rnd()-.5)*.01*s --vy
end--800 stars
end
function space.update(dt)
local x,y=planet.x,planet.y
planet.x=planet.x+planet.vx
planet.y=planet.y+planet.vy
if((planet.x-W*.5)^2+(planet.y-H*.5)^2)^.5>R+planet.r then
newPlanet()
end
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
end--stars moving
end
function space.draw()
if not stars[1]then return end
gc.translate(-50,-50)
gc.setLineWidth(7)
gc.setColor(planet.R,planet.G,.6,.1626)
gc.circle("line",planet.x,planet.y,planet.r+1)
gc.setColor(planet.R,planet.G,.6,.26)
gc.circle("fill",planet.x,planet.y,planet.r)
gc.setColor(.9,.9,.9)
for i=1,2600,5 do
local x,y=stars[i+1],stars[i+2]
gc.circle("fill",x,y,stars[i])
end
gc.translate(50,50)
end
function space.discard()
stars={}
planet={}
collectgarbage()
end
return space

42
parts/sysFX.lua Normal file
View File

@@ -0,0 +1,42 @@
local gc=love.graphics
local setColor=gc.setColor
local setWidth=gc.setLineWidth
local rect=gc.rectangle
local fx={}
local FXdraw={}
function FXdraw.ripple(S)
setWidth(6)
setColor(1,1,1,1-S.t)
local r=(10*S.t)^1.2
rect("line",S[1]-r,S[2]-r,S[3]+2*r,S[4]+2*r)
end
function FXdraw.shade(S)
setColor(S[1],S[2],S[3],1-S.t)
rect("fill",S[4],S[5],S[6],S[7],2)
end
local sysFX={}
function sysFX.update(dt)
for i=#fx,1,-1 do
local S=fx[i]
S.t=S.t+dt*S.rate
if S.t>=1 then
for i=i,#fx do
fx[i]=fx[i+1]
end
end
end
end
function sysFX.draw()
for i=1,#fx do
fx[i]:draw()
end
end
--0=ripple,x,y,w,h
--1=shade,r,g,b,x,y,w,h
function sysFX.new(type,duration,...)
fx[#fx+1]={draw=FXdraw[type],t=0,rate=1/duration,...}
end
return sysFX

View File

@@ -1,95 +1,68 @@
local min=math.min
local mini=love.window.isMinimized
local task={}
function task.pauseGame()
if not mini()then
pauseTimer=pauseTimer+1
end
return pauseTimer==50
end
function task.resumeGame()
pauseTimer=pauseTimer-1
if pauseTimer==0 then
scene.swapTo("play","none")
return true
end
end
function task.finish(P)
if scene.cur~="play"then return true end
P.endCounter=P.endCounter+1
if P.endCounter>120 then pauseGame()end
end
function task.lose(P)
P.endCounter=P.endCounter+1
if P.endCounter>80 then
for i=1,#P.field do
for j=1,10 do
if P.visTime[i][j]>0 then
P.visTime[i][j]=P.visTime[i][j]-1
end
end
end
if P.endCounter==120 then
for _=#P.field,1,-1 do
freeRow.discard(P.field[_])
freeRow.discard(P.visTime[_])
P.field[_],P.visTime[_]=nil
end
if #players==1 and scene=="play"then
pauseGame()
end
return true
end
end
end
function task.throwBadge(A,data)
data[2]=data[2]-1
if data[2]%4==0 then
local S,R=data[1],data[1].lastRecv
local x1,y1,x2,y2
if S.small then
x1,y1=S.centerX,S.centerY
else
x1,y1=S.x+308*S.size,S.y+450*S.size
end
if R.small then
x2,y2=R.centerX,R.centerY
else
x2,y2=R.x+66*R.size,R.y+344*R.size
end
FX_badge[#FX_badge+1]={x1,y1,x2,y2,t=0}
--generate badge object
local rem=table.remove
if not A.ai and data[2]%8==0 then
SFX.play("collect")
local tasks={}
local TASK={}
function TASK.getCount()
return #tasks
end
function TASK.update()
for i=#tasks,1,-1 do
local T=tasks[i]
if T.code(T.P,T.data)then
for i=i,#tasks do
tasks[i]=tasks[i+1]
end
end
end
end
function TASK.new(code,P,data)
tasks[#tasks+1]={
code=code,
P=P,
data=data,
}
end
function TASK.changeCode(c1,c2)
for i=#tasks,1,-1 do
if tasks[i].code==c1 then
tasks[i].code=c2
end
end
if data[2]<=0 then return true end
end
function task.bgmFadeOut(_,id)
local src=BGM.list[id]
local v=src:getVolume()-.025*setting.bgm*.1
src:setVolume(v>0 and v or 0)
if v<=0 then
src:stop()
return true
end
end
function task.bgmFadeIn(_,id)
local src=BGM.list[id]
local v=min(src:getVolume()+.025*setting.bgm*.1,setting.bgm*.1)
src:setVolume(v)
if v>=setting.bgm*.1 then return true end
end
function task.settingSaved(_,T)
T[1]=T[1]-1
if T[1]==0 then
if scene.cur=="main"then
TEXT(text.settingSaved,370,330,28,"appear")
else
TEXT(text.needRestart,1130,130,28,"appear")
function TASK.removeTask_code(code)
for i=#tasks,1,-1 do
if tasks[i].code==code then
rem(tasks,i)
end
return true
end
end
return task
function TASK.removeTask_data(data)
for i=#tasks,1,-1 do
if tasks[i].data==data then
rem(tasks,i)
end
end
end
function TASK.clear(opt)
if opt=="all"then
local i=#tasks
while i>0 do
tasks[i]=nil
i=i-1
end
elseif opt=="play"then
for i=#tasks,1,-1 do
if tasks[i].P then
rem(tasks,i)
end
end
else--Player table
for i=#tasks,1,-1 do
if tasks[i].P==opt then
rem(tasks,i)
end
end
end
end
return TASK

View File

@@ -33,6 +33,8 @@ function textFX.spin(t)
gc.translate(t.x,t.y)
if t.c<.3 then
gc.rotate((.3-t.c)^2*4)
elseif t.c>.8 then
gc.rotate((t.c-.8)^2*-4)
end
mStr(t.text,0,-t.font*.7)
gc.pop()
@@ -60,7 +62,14 @@ function textFX.beat(t)
mStr(t.text,0,-t.font*.7)
gc.pop()
end
function getTEXT(text,x,y,font,style,spd,stop)
function textFX.mark(t)
local _,_,_,T=gc.getColor()
gc.setColor(1,1,1,T*.06626)
mStr(t.text,t.x,t.y-t.font*.7)
end
local TEXT={}
function TEXT.getText(text,x,y,font,style,spd,stop)
return{
c=0,
text=text,
@@ -72,7 +81,7 @@ function getTEXT(text,x,y,font,style,spd,stop)
draw=textFX[style]or error("unavailable type:"..style),
}
end--another version of TEXT()
function TEXT(text,x,y,font,style,spd,stop)
function TEXT.show(text,x,y,font,style,spd,stop)
texts[#texts+1]={
c=0, --timer
text=text, --string
@@ -84,7 +93,7 @@ function TEXT(text,x,y,font,style,spd,stop)
draw=textFX[style]or error("unavailable type:"..style), --draw method
}
end
function updateText(list)
function TEXT.update(list)
for i=#list,1,-1 do
local t=list[i]
t.c=t.c+t.spd
@@ -98,7 +107,7 @@ function updateText(list)
end
end
end
function drawTexts(list)
function TEXT.draw(list)
for i=1,#list do
local t=list[i]
local p=t.c
@@ -106,4 +115,5 @@ function drawTexts(list)
setFont(t.font)
t:draw()
end
end
end
return TEXT

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