0.8.17:Details Update

This commit is contained in:
MrZ_26
2020-04-30 00:24:47 +08:00
parent 7d63386410
commit 00026bc46b
104 changed files with 2069 additions and 2708 deletions

BIN
SFX/virtualKey.ogg Normal file

Binary file not shown.

Binary file not shown.

BIN
SFX/welcome_sfx.ogg Normal file

Binary file not shown.

BIN
VOICE/welcome_voc.ogg Normal file

Binary file not shown.

View File

@@ -1,4 +1,4 @@
gameVersion="Alpha V0.8.16" gameVersion="Alpha V0.8.17"
function love.conf(t) function love.conf(t)
t.identity="Techmino"--SaveDir name t.identity="Techmino"--SaveDir name
t.version="11.1" t.version="11.1"

View File

@@ -17,6 +17,7 @@ setting={
ghost=true,center=true, ghost=true,center=true,
smooth=true,grid=false, smooth=true,grid=false,
bagLine=false,
lockFX=2, lockFX=2,
dropFX=3, dropFX=3,
shakeFX=2, shakeFX=2,
@@ -33,6 +34,7 @@ setting={
stereo=6, stereo=6,
--sound --sound
VKSound=true,--if SFX
VKSwitch=false,--if disp VKSwitch=false,--if disp
VKTrack=false,--if tracked VKTrack=false,--if tracked
VKDodge=false,--if dodge VKDodge=false,--if dodge

View File

@@ -20,7 +20,7 @@ spin判定:
连击:0,0,1,1,2,2,3,3,4,4,3,2,3,2,3,2,3…(后面都是2) 连击:0,0,1,1,2,2,3,3,4,4,3,2,3,2,3,2,3…(后面都是2)
特殊消除会增加B2B点数,让之后的特殊消除获得B2B(B3B)增益(详细说明见下文) 特殊消除会增加B2B点数,让之后的特殊消除获得B2B(B3B)增益(详细说明见下文)
半全消("下方有剩余方块"的全消,如果是I消1行则必须不剩余玩家放置的方块):伤害+2,额外抵挡+2 半全消("下方有剩余方块"的全消,如果是I消1行则必须不剩余玩家放置的方块):伤害+2,额外抵挡+2
全消:将上述伤害之和开根号,再+6~10(本局内递增)+2额外抵挡(注:本局消行数>4时会将B2B点数拉满) 全消:将上述伤害之和开根号,再+6~12(本局内递增)+2额外抵挡(注:本局消行数>4时会将B2B点数拉满)
根据上述规则计算后,向下取整,攻击打出 根据上述规则计算后,向下取整,攻击打出
分数系统: 分数系统:
@@ -37,7 +37,7 @@ spin判定:
back to back(B2B)点数说明: back to back(B2B)点数说明:
B2B点数的范围在0~1200,在点数>=40时进行特殊消除为B2B,>1000时特殊消除为B3B B2B点数的范围在0~1200,在点数>=40时进行特殊消除为B2B,>1000时特殊消除为B3B
普通消除-250 普通消除-250
spin1/2/3:+50/100/180(mini减半) spin1/2/3:+50/100/180(mini变为原来40%)
消四:+100 消四:+100
空spin:+20,此法得到的点数不能超过1000 空spin:+20,此法得到的点数不能超过1000
当点数在1000以上时空放一块-40(不减到低于1000) 当点数在1000以上时空放一块-40(不减到低于1000)

View File

@@ -138,19 +138,22 @@ function File.loadData()
local S=s() local S=s()
if S.version~=gameVersion then if S.version~=gameVersion then
S.version=gameVersion S.version=gameVersion
TEXT.show(text.newVersion,640,200,30,"fly",.3)
end
if not S.version or S.version=="Alpha V0.8.15"then
S.clear_S={S.clear_1,S.clear_2,S.clear_3,S.clear_4} S.clear_S={S.clear_1,S.clear_2,S.clear_3,S.clear_4}
S.clear={{},{},{},{},{},{},{}} 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) local A,B,C,D=int(S.clear_1/7),int(S.clear_2/7),int(S.clear_3/7),S.clear_4
for i=1,7 do for i=1,7 do
S.clear[i][1]=A S.clear[i][1]=A
S.clear[i][2]=B S.clear[i][2]=B
S.clear[i][3]=C S.clear[i][3]=C
S.clear[i][4]=D S.clear[i][4]=0
end end
S.clear[7][4]=D
for i=1,S.clear_1%7 do S.clear[i][1]=S.clear[i][1]+1 end for i=1,S.clear_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_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_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={} S.clear_B={}
for i=1,7 do 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] S.clear_B[i]=S.clear[i][1]+S.clear[i][2]+S.clear[i][3]+S.clear[i][4]
@@ -175,7 +178,11 @@ function File.loadData()
end end
S.hpc=S.c S.hpc=S.c
TEXT.show(text.newVersion,640,200,30,"fly",.3) elseif S.version=="Alpha V0.8.16"then
for i=1,6 do
S.clear[7][4]=S.clear[7][4]+S.clear[i][4]
S.clear[i][4]=0
end
end end
addToTable(S,stat) addToTable(S,stat)
end end

BIN
font.ttf

Binary file not shown.

View File

@@ -1,326 +0,0 @@
local BK="返回"
local actName={
"左移:","右移:",
"顺时针旋转:","逆时针旋转:","180°旋转:",
"硬降:","软降:",
"暂存:","功能键:",
"重新开始:",
"左瞬移:","右瞬移:","软降到底:","软降一格:","软降四格:","软降十格:",
"落在最左:","落在最右:","列在最左:","列在最右:",
}
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",
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"},
mini="Mini",b2b="B2B ",b3b="B2B2B ",
PC="Perfect Clear",HPC="Half Clear",
hold="暂存",next="下一个",
stage=function(n)return"关卡 "..n end,
great="Great!",
awesome="Awesome.",
continue="Continue.",
maxspeed="最高速度",
speedup="速度加快",
win="胜利",
finish="结束",
lose="失败",
pause="暂停",
pauseCount="暂停统计",
atk="ATK",
spd="SPD",
recv="RECV",
eff="EFF",
custom="自定义游戏",
customOption={
drop="下落速度:",
lock="锁定延迟:",
wait="放块延迟:",
fall="消行延迟:",
next="序列数量:",
hold="暂存:",
sequence="序列:",
visible="可见性:",
target="目标行数:",
freshLimit="锁延刷新次数:",
opponent="对手速度等级:",
bg="背景:",
bgm="背景音乐:",
},
customVal={
drop={"0G","1/180G","1/60G","1/40G","1/30G","1/25G","1/20G","1/18G","1/16G","1/14G","1/12G","1/10G","1/9G","1/8G","1/7G","1/6G","1/5G","1/4G","1/3G","1/2G","1G","2G","4G","8G","20G"},
lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,""},
wait=nil,
fall=nil,
next=nil,
hold={"","","无限"},
sequence={"bag7","his4","随机"},
visible={"可见","半隐","全隐","瞬隐"},
target={10,20,40,100,200,500,1000,""},
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返回",
musicRoom="音乐室",
nowPlaying="正在播放:",
settingSaved="设置已保存",
settingSavingError="设置保存失败:",
keyMapSaved="键位设置已保存",
keyMapSavingError="键位保存失败:",
VKSaved="虚拟按键设置已保存",
VKSavingError="虚拟按键保存失败:",
statSavingError="统计保存失败:",
unlockSavingError="解锁保存失败:",
recSavingError="纪录保存失败:",
needRestart="重新开始以生效",
copySuccess="已复制到剪切板",
dataCorrupted="数据损坏",
VKTchW="触摸点权重",
VKOrgW="原始点权重",
VKCurW="当前点权重",
noScore="暂无成绩",
highScore="最佳成绩",
newRecord="打破纪录",
errorMsg="Techmino遇到了问题,需要重新启动.\n我们已收集了一些错误信息,你可以向作者进行反馈.",
actName=actName,
load={[0]="加载完成","加载语音ing","加载音乐ing","加载音效ing","加载图片ing","加载模式ing","加载乱七八糟的东西ing"},
pauseStat={
"时间:",
"按键/旋转/暂存:",
"下块:",
"消行/挖掘:",
"攻击/挖掘攻击:",
"上涨/接收/抵消:",
"B2B/B3B/PC/HPC:",
"Finesse:",
},
stat={
spin="spin0~3",
clear="clear1~4",
"游戏运行次数:",
"游戏局数:",
"游戏时间:",
"按键/旋转/暂存:",
"方块/消行/攻击:",
"接收/抵消/上涨:",
"挖掘/挖掘攻击:",
"效率/挖掘效率:",
"多余操作/极简率:",
"满贯/大满贯:",
"全/半清:",
},
help={
"好像也没啥好帮助的吧?就当是关于了",
"这只是一个普通的方块游戏,请勿称此游戏为某某某方块",
"从TO/C2/KOS/TGM3/JS等方块获得过灵感",
"",
"使用LOVE2D引擎",
"作者:MrZ 邮箱:1046101471@qq.com",
"程序:MrZ 美术:MrZ 音乐:MrZ 音效:MrZ 语音:MrZ/Miya",
"特别感谢:Flyz,Farter,196,Teatube,T830,[所有内测人员]和 你!",
"",
"错误或者建议请附带截图发送到内测群或者作者邮箱~",
"仅通过唯一内测群1057456078进行免费下载/更新",
"其他渠道获得游戏皆有被修改/植入病毒的风险,程序只申请了震动&联网权限!",
"若由于被修改的本游戏产生的各种损失作者不负责(我怎么负责啊跟我有啥关系)",
"请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~",
},
used=[[
使用工具:
Beepbox
GFIE
Goldwave
使用库:
Cold_Clear[MinusKelvin]
simple-love-lights[dylhunn]
]],
support="支持作者",
group="官方QQ群(如果没有被暗改的话就是这个):822023725",
WidgetText={
main={
play="开始",
setting="设置",
music="音乐室",
stat="统计信息",
help="帮助",
qplay="快速开始",
lang="言/A",
quit="退出",
},
mode={
draw="画图(Q)",
custom="参数(E)",
start="开始",
back=BK,
},
music={
bgm="BGM",
up="",
play="播放",
down="",
back=BK,
},
custom={
up="",
down="",
left="",
right="",
set1="40行(1)",
set2="1v1(2)",
set3="无尽(3)",
set4="隐形(4)",
set5="极限(5)",
back=BK,
},
draw={
any="不定",
space="×",
clear="清除",
demo="不显示×",
copy="复制",
paste="粘贴",
back=BK,
},
play={
pause="暂停",
},
pause={
resume= "继续(空格)",
restart="重新开始(R)",
setting="设置(S)",
quit= "退出(esc)",
},
setting_game={
graphic="←画面设置",
sound="声音设置→",
ctrl="控制设置",
reTime="开局等待时间",
maxNext="最大预览数量",
autoPause="自动暂停",
layout="外观",
key="键位设置",
touch="触屏设置",
quickR="快速重新开始",
autoPause="自动暂停",
swap="组合键切换攻击模式",
fine="极简操作提示音",
back=BK,
},
setting_graphic={
sound="←声音设置",
game="游戏设置→",
ghost="阴影",
grid="网格",
center="旋转中心",
bg="背景",
smooth="平滑下落",
lockFX="锁定特效等级",
dropFX="下落特效等级",
shakeFX="晃动特效等级",
atkFX="攻击特效等级",
text="消行文本",
fullscreen="全屏",
frame="绘制帧率",
back=BK,
},
setting_sound={
game="←游戏设置",
graphic="画面设置→",
sfx="音效",
bgm="音乐",
vib="震动",
voc="语音",
stereo="立体声",
back=BK,
},
setting_control={
das="DAS",arr="ARR",
sddas="软降DAS",sdarr="软降ARR",
ihs="提前Hold",
irs="提前旋转",
ims="提前移动",
reset="重置",
back=BK,
},
setting_key={
back=BK,
},
setting_skin={
prev="",next="",
prev1="",next1="",spin1="R",
prev2="",next2="",spin2="R",
prev3="",next3="",spin3="R",
prev4="",next4="",spin4="R",
prev5="",next5="",spin5="R",
prev6="",next6="",spin6="R",
prev7="",next7="",spin7="R",
skinR="重置配色",
faceR="重置方向",
back=BK,
},
setting_touch={
default="默认组合",
snap=function()return text.snapLevelName[sceneTemp.snap]end,
option="选项",
back=BK,
size="大小",
},
setting_touchSwitch={
b1= actName[1],b2=actName[2],b3=actName[3],b4=actName[4],
b5= actName[5],b6=actName[6],b7=actName[7],b8=actName[8],
b9= actName[9],b10=actName[10],b11=actName[11],b12=actName[12],
b13=actName[13],b14=actName[14],b15=actName[15],b16=actName[16],
b17=actName[17],b18=actName[18],b19=actName[19],b20=actName[20],
norm="标准",
pro="专业",
hide="显示虚拟按键",
track="按键自动跟踪",
icon="图标",
tkset="跟踪设置",
alpha="透明度",
back=BK,
},
setting_trackSetting={
VKDodge="自动避让",
back=BK,
},
help={
his="历史",
qq="作者QQ",
back=BK,
},
history={
prev="",
next="",
back=BK,
},
stat={
path="打开存储目录",
back=BK,
},
},
}--文

View File

@@ -1,323 +0,0 @@
local BK="返回"
local actName={
"左移:","右移:",
"顺时针旋转:","逆时针旋转:","180°旋转:",
"硬降:","软降:",
"暂存:","功能键:",
"重新开始:",
"左瞬移:","右瞬移:","软降到底:","软降一格:","软降四格:","软降十格:",
"落在最左:","落在最右:","列在最左:","列在最右:",
}
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="大满贯 四清",
spin={"Z型回旋","S型回旋","L型回旋","J型回旋","T型回旋","O型回旋","I型回旋"},
block={"Z","S","L","J","T","O","I"},
clear={"单清","双清","三清"},
mini="迷你",b2b="满贯",b3b="大满贯",
PC="场地全清",HPC="场地半清",
hold="暂存",next="下一个",
stage=function(n)return"关卡 "..n end,
great="不错!",
awesome="精彩。",
continue="继续。",
maxspeed="最高速度",
speedup="速度加快",
win="胜利",
finish="结束",
lose="失败",
pause="暂停",
pauseCount="暂停统计",
atk="",
spd="",
recv="",
eff="",
custom="自定义游戏",
customOption={
drop="下落速度:",
lock="锁定延迟:",
wait="放块延迟:",
fall="消行延迟:",
next="序列数量:",
hold="暂存:",
sequence="序列:",
visible="可见性:",
target="目标行数:",
freshLimit="锁延刷新次数:",
opponent="对手速度等级:",
bg="背景:",
bgm="背景音乐:",
},
customVal={
drop={"0G","1/180G","1/60G","1/40G","1/30G","1/25G","1/20G","1/18G","1/16G","1/14G","1/12G","1/10G","1/9G","1/8G","1/7G","1/6G","1/5G","1/4G","1/3G","1/2G","1G","2G","4G","8G","20G"},
lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,""},
wait=nil,
fall=nil,
next=nil,
hold={"","","无限"},
sequence={"bag7","his4","随机"},
visible={"可见","半隐","全隐","瞬隐"},
target={10,20,40,100,200,500,1000,""},
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"},
},
snapLevelName={"无吸附","10px吸附","20px吸附","40px吸附","60px吸附","80px吸附"},
setting_game="游戏设置",
setting_graphic="画面设置",
setting_sound="声音设置",
setting_control="控制设置",
setting_skin="外观设置",
preview="预览",
keyboard="键盘",joystick="手柄",
ctrlSetHelp="方向键选择/翻页,回车修改,esc返回",
musicRoom="音乐室",
nowPlaying="正在播放:",
settingSaved="设置已保存",
settingSavingError="设置保存失败:",
keyMapSaved="键位设置已保存",
keyMapSavingError="键位保存失败:",
VKSaved="虚拟按键设置已保存",
VKSavingError="虚拟按键保存失败:",
statSavingError="统计保存失败:",
unlockSavingError="解锁保存失败:",
recSavingError="纪录保存失败:",
needRestart="重新开始以生效",
copySuccess="已复制到剪切板",
dataCorrupted="数据损坏",
VKTchW="触摸点权重",
VKOrgW="原始点权重",
VKCurW="当前点权重",
noScore="暂无成绩",
highScore="最佳成绩",
newRecord="打破纪录",
errorMsg="Techmino遇到了问题,需要重新启动.\n我们已收集了一些错误信息,你可以向作者进行反馈.",
actName=actName,
load={[0]="加载完成","加载语音ing","加载音乐ing","加载音效ing","加载图片ing","加载模式ing","加载乱七八糟的东西ing"},
pauseStat={
"时间:",
"按键/旋转/暂存:",
"下块:",
"消行/挖掘:",
"攻击/挖掘攻击:",
"上涨/接收/抵消:",
"(大)满贯/全(半)清:",
"非极简操作:",
},
stat={
spin="回旋0~3",
clear="消除1~4",
"游戏运行次数:",
"游戏局数:",
"游戏时间:",
"按键/旋转/暂存:",
"方块/消行/攻击:",
"接收/抵消/上涨:",
"挖掘/挖掘攻击:",
"效率/挖掘效率:",
"多余操作/极简率:",
"满贯/大满贯:",
"全/半清:",
},
help={
"好像也没啥好帮助的吧?就当是关于了",
"这只是一个普通的方块游戏,请勿称此游戏为某某某方块",
"从TO/C2/KOS/TGM3/JS等方块获得过灵感",
"",
"使用LOVE2D引擎",
"作者:MrZ 邮箱:1046101471@qq.com",
"程序:MrZ 美术:MrZ 音乐:MrZ 音效:MrZ 语音:MrZ/Miya",
"特别感谢:Flyz,Farter,196,Teatube,T830,[所有内测人员]和 你!",
"",
"错误或者建议请附带截图发送到内测群或者作者邮箱~",
"仅通过唯一内测群1057456078进行免费下载/更新",
"其他渠道获得游戏皆有被修改/植入病毒的风险,程序只申请了震动&联网权限!",
"若由于被修改的本游戏产生的各种损失作者不负责(我怎么负责啊跟我有啥关系)",
"请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~",
},
used=[[
使用工具:
Beepbox
GFIE
Goldwave
使用库:
Cold_Clear[MinusKelvin]
simple-love-lights[dylhunn]
]],
support="支持作者",
group="官方QQ群(如果没有被暗改的话就是这个):822023725",
WidgetText={
main={
play="开始",
setting="设置",
music="音乐室",
stat="统计信息",
help="帮助",
qplay="快速开始",
lang="言/A",
quit="退出",
},
mode={
draw="画图(Q)",
custom="参数(E)",
start="开始",
back=BK,
},
music={
bgm="BGM",
up="",
play="播放",
down="",
back=BK,
},
custom={
up="",
down="",
left="",
right="",
set1="40行(1)",
set2="1v1(2)",
set3="无尽(3)",
set4="隐形(4)",
set5="极限(5)",
back=BK,
},
draw={
any="不定",
space="×",
clear="清除",
demo="不显示×",
copy="复制",
paste="粘贴",
back=BK,
},
play={
pause="暂停",
},
pause={
resume= "继续(空格)",
restart="重新开始(R)",
setting="设置(S)",
quit= "退出(esc)",
},
setting_game={
graphic="←画面设置",
sound="声音设置→",
ctrl="控制设置",
reTime="开局等待时间",
maxNext="最大预览数量",
autoPause="自动暂停",
layout="外观",
key="键位设置",
touch="触屏设置",
quickR="快速重新开始",
swap="组合键切换攻击模式",
fine="极简操作提示音",
back=BK,
},
setting_graphic={
sound="←声音设置",
game="游戏设置→",
ghost="阴影",
grid="网格",
center="旋转中心",
bg="背景",
smooth="平滑下落",
lockFX="锁定特效等级",
dropFX="下落特效等级",
shakeFX="晃动特效等级",
atkFX="攻击特效等级",
text="消行文本",
fullscreen="全屏",
frame="绘制帧率",
back=BK,
},
setting_sound={
game="←游戏设置",
graphic="画面设置→",
sfx="音效",
bgm="音乐",
vib="震动",
voc="语音",
stereo="立体声",
back=BK,
},
setting_control={
das="首次移动延迟",arr="移动重复延迟",
sddas="首次软降延迟",sdarr="软降重复延迟",
ihs="提前暂存",
irs="提前旋转",
ims="提前移动",
reset="重置",
back=BK,
},
setting_key={
back=BK,
},
setting_skin={
prev="",next="",
prev1="",next1="",spin1="",
prev2="",next2="",spin2="",
prev3="",next3="",spin3="",
prev4="",next4="",spin4="",
prev5="",next5="",spin5="",
prev6="",next6="",spin6="",
prev7="",next7="",spin7="",
skinR="重置配色",
faceR="重置方向",
back=BK,
},
setting_touch={
default="默认组合",
snap=function()return text.snapLevelName[sceneTemp.snap]end,
option="选项",
back=BK,
size="大小",
},
setting_touchSwitch={
b1= actName[1],b2=actName[2],b3=actName[3],b4=actName[4],
b5= actName[5],b6=actName[6],b7=actName[7],b8=actName[8],
b9= actName[9],b10=actName[10],b11=actName[11],b12=actName[12],
b13=actName[13],b14=actName[14],b15=actName[15],b16=actName[16],
b17=actName[17],b18=actName[18],b19=actName[19],b20=actName[20],
norm="标准",
pro="专业",
hide="显示虚拟按键",
track="按键自动跟踪",
icon="图标",
tkset="跟踪设置",
alpha="透明度",
back=BK,
},
setting_trackSetting={
VKDodge="自动避让",
back=BK,
},
help={
his="历史",
qq="作者QQ",
back=BK,
},
history={
prev="",
next="",
back=BK,
},
stat={
path="打开存储目录",
back=BK,
},
},
}

View File

@@ -1,321 +0,0 @@
local BK="Back"
local actName={
"Move Left:","Move Right:",
"Rotate Right:","Rotate Left:","Rotate 180°:",
"Hard Drop:","Soft Drop:","Hold:","Function:","Restart:",
"Instant Left:","Instant Right:","Ins Down:","Down 1:","Down 4:","Down 10:",
"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",
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"},
mini="Mini",b2b="B2B ",b3b="B2B2B ",
PC="Perfect Clear",HPC="Clear",
hold="Hold",next="Next",
stage=function(n)return"STAGE "..n end,
great="Great!",
awesome="Awesome.",
continue="Continue.",
maxspeed="Max speed",
speedup="Speed up",
win="WIN",
finish="FINISH",
lose="LOSE",
pause="PAUSE",
pauseCount="Pause Count",
atk="ATK",
spd="SPD",
recv="RECV",
eff="EFF",
custom="Custom Game",
customOption={
drop="Drop speed:",
lock="Lock delay:",
wait="Next piece delay:",
fall="Clear row delay:",
next="Next count:",
hold="Hold:",
sequence="Sequence:",
visible="Visible:",
target="Line limit:",
freshLimit="Lock fresh limit:",
opponent="Opponent speed:",
bg="Background:",
bgm="BGM:",
},
customVal={
drop={"0G","1/180G","1/60G","1/40G","1/30G","1/25G","1/20G","1/18G","1/16G","1/14G","1/12G","1/10G","1/9G","1/8G","1/7G","1/6G","1/5G","1/4G","1/3G","1/2G","1G","2G","4G","8G","20G"},
lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,""},
wait=nil,
fall=nil,
next=nil,
hold={"ON","OFF","FREE"},
sequence={"bag7","his4","random"},
visible={"normal","time","invisible","sudden"},
target={10,20,40,100,200,500,1000,""},
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"},
},
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",
ctrlSetHelp="Arrowkey to select/change slot,Enter to change,Esc back",
musicRoom="Music Room",
nowPlaying="Now Playing:",
settingSaved="Setting Saved",
settingSavingError="Failed to save setting:",
keyMapSaved="Key setting saved",
keyMapSavingError="Failed to save key setting:",
VKSaved="virtual key saved",
VKSavingError="Failed to save virtual key:",
statSavingError="Failed to save stat:",
unlockSavingError="Failed to save unlock:",
recSavingError="Failed to save record:",
needRestart="Effective after restart",
copySuccess="Copy Success",
dataCorrupted="Data Corrupted",
VKTchW="Touch weight",
VKOrgW="Origion weight",
VKCurW="CurPos weight",
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 the author.",
actName=actName,
load={[0]="Finished","Loading VOICE","Loading BGM","Loading SFX","Loading images","Loading modes","Loading other things"},
pauseStat={
"Time:",
"Key/Rotate/Hold:",
"Piece:",
"Row/Dig:",
"Attack/DigAtk:",
"Receive:",
"B2B/B3B/PC/HPC:",
"Finesse:",
},
stat={
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\".",
"THIS IS ONLY A BLOCK GAME,not T****s",
"But just play like playing TO/C2/KOS/TGM3",
"",
"Powered by LOVE2D",
"Author:MrZ E-mail:1046101471@qq.com",
"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)",
"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 edited game",
},
used=[[
Tool used:
Beepbox
GFIE
Goldwave
Lib used:
Cold_Clear[MinusKelvin]
simple-love-lights[dylhunn]
]],
support="Support Author",
group="Official QQ Group(if not hacked):822023725",
WidgetText={
main={
play="Play",
setting="Settings",
music="Music room",
stat="Statistics",
help="Help",
qplay="qPlay",
lang="言/A",
quit="Quit",
},
mode={
draw="Draw(Q)",
custom="Setting(E)",
start="Start",
back=BK,
},
music={
bgm="BGM",
up="",
play="Play",
down="",
back=BK,
},
custom={
up="",
down="",
left="",
right="",
set1="40L(1)",
set2="1v1(2)",
set3="infinite(3)",
set4="blind(4)",
set5="master(5)",
back=BK,
},
draw={
any="Erase",
space="×",
clear="Clear",
demo="Don't show ×",
copy="Copy",
paste="Paste",
back=BK,
},
play={
pause="Pause",
},
pause={
resume="Resume(space)",
restart="Restart(R)",
setting="Setting(S)",
quit="Quit(esc)",
},
setting_game={
graphic="←Graphic",
sound="Sound→",
ctrl="Control setting",
reTime="Delay before game",
maxNext="Max next count",
autoPause="Auto pause",
layout="Layout",
key="Key Setting",
touch="Touch Setting",
quickR="Quick restart",
autoPause="Auto pause",
swap="Combo key to change ATK mode",
fine="Finesse error SFX",
back=BK,
},
setting_graphic={
sound="←Sound",
game="Game→",
ghost="Ghost",
grid="Grid",
center="Center",
bg="Background",
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,
},
setting_sound={
game="←Game",
graphic="Graphic→",
sfx="SFX",
bgm="BGM",
vib="Vibration",
voc="Vocal",
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,
},
setting_skin={
prev="",next="",
prev1="",next1="",spin1="R",
prev2="",next2="",spin2="R",
prev3="",next3="",spin3="R",
prev4="",next4="",spin4="R",
prev5="",next5="",spin5="R",
prev6="",next6="",spin6="R",
prev7="",next7="",spin7="R",
skinR="Reset Color",
faceR="Reset Dir.",
back=BK,
},
setting_touch={
default="Defaults",
snap=function()return text.snapLevelName[sceneTemp.snap]end,
option="Option",
back=BK,
size="Size",
},
setting_touchSwitch={
b1= actName[1],b2=actName[2],b3=actName[3],b4=actName[4],
b5= actName[5],b6=actName[6],b7=actName[7],b8=actName[8],
b9= actName[9],b10=actName[10],b11=actName[11],b12=actName[12],
b13=actName[13],b14=actName[14],b15=actName[15],b16=actName[16],
b17=actName[17],b18=actName[18],b19=actName[19],b20=actName[20],
norm="Normal",
pro="Professioanl",
hide="Show Virtual Key",
track="Auto track",
icon="Icon",
tkset="Track setting",
alpha="Alpha",
back=BK,
},
setting_trackSetting={
VKDodge="Auto Dodge",
back=BK,
},
help={
his="History",
qq="Author's qq",
back=BK,
},
history={
prev="",
next="",
back=BK,
},
stat={
path="Open Data Folder",
back=BK,
},
}
}

169
main.lua
View File

@@ -51,6 +51,7 @@ for i=1,20 do preField[i]={0,0,0,0,0,0,0,0,0,0}end
-- blockSkin,blockSkinMini={},{}--redefined in skin.change -- blockSkin,blockSkinMini={},{}--redefined in skin.change
--Game system Vars --Game system Vars
------------------------------------------------------------- -------------------------------------------------------------
color=require("parts/color")
require("parts/list") require("parts/list")
require("toolfunc") require("toolfunc")
@@ -61,9 +62,10 @@ require("texture")
FILE=require("file") FILE=require("file")
VIB=require("parts/vib") VIB=require("parts/vib")
SFX=require("parts/sfx") SFX=require("parts/sfx")
sysFX=require("parts/sysFX")
BGM=require("parts/bgm") BGM=require("parts/bgm")
VOC=require("parts/voice") VOC=require("parts/voice")
sysFX=require("parts/sysFX") LANG=require("parts/languages")
TEXT=require("parts/text") TEXT=require("parts/text")
TASK=require("parts/task") TASK=require("parts/task")
tickEvent=require("parts/tickEvent") tickEvent=require("parts/tickEvent")
@@ -85,45 +87,42 @@ local Tmr=require("timer")
local Pnt=require("paint") local Pnt=require("paint")
--Modules --Modules
------------------------------------------------------------- -------------------------------------------------------------
local powerInfoCanvas,updatePowerInfo local infoCanvas=gc.newCanvas(108,27)
if sys.getPowerInfo()~="unknown"then local function updatePowerInfo()
powerInfoCanvas=gc.newCanvas(108,27) local state,pow=sys.getPowerInfo()
function updatePowerInfo() gc.setCanvas(infoCanvas)gc.push("transform")gc.origin()
local state,pow=sys.getPowerInfo() gc.clear(0,0,0,.25)
if state~="unknown"then if state~="unknown"then
gc.setCanvas(powerInfoCanvas)gc.push("transform")gc.origin() gc.setLineWidth(4)
gc.clear(0,0,0,.25) local charging=state=="charging"
gc.setLineWidth(4) if state=="nobattery"then
local charging=state=="charging" gc.setColor(1,1,1)
if state=="nobattery"then gc.setLineWidth(2)
gc.setColor(1,1,1) gc.line(74,5,100,22)
gc.setLineWidth(2) elseif pow then
gc.line(74,5,100,22) if charging then gc.setColor(0,1,0)
elseif pow then elseif pow>50 then gc.setColor(1,1,1)
if charging then gc.setColor(0,1,0) elseif pow>26 then gc.setColor(1,1,0)
elseif pow>50 then gc.setColor(1,1,1) elseif pow<26 then gc.setColor(1,0,0)
elseif pow>26 then gc.setColor(1,1,0) else gc.setColor(.5,0,1)
elseif pow<26 then gc.setColor(1,0,0) end
else gc.setColor(.5,0,1) gc.rectangle("fill",76,6,pow*.22,14)
end if pow<100 then
gc.rectangle("fill",76,6,pow*.22,14) setFont(14)
if pow<100 then gc.setColor(0,0,0)
setFont(14) gc.print(pow,77,2)
gc.setColor(0,0,0) gc.print(pow,77,4)
gc.print(pow,77,2) gc.print(pow,79,2)
gc.print(pow,77,4) gc.print(pow,79,4)
gc.print(pow,79,2) gc.setColor(1,1,1)
gc.print(pow,79,4) gc.print(pow,78,3)
gc.setColor(1,1,1)
gc.print(pow,78,3)
end
end end
gc.draw(batteryImage,73,3)
setFont(25)
gc.print(os.date("%H:%M",os.time()),3,-5)
gc.pop()gc.setCanvas()
end end
gc.draw(batteryImage,73,3)
end end
setFont(25)
gc.print(os.date("%H:%M",os.time()),3,-5)
gc.pop()gc.setCanvas()
end end
local function onVirtualkey(x,y) local function onVirtualkey(x,y)
local dist,nearest=1e10 local dist,nearest=1e10
@@ -180,18 +179,16 @@ local touchDown,touchUp,touchMove={},{},{}
local keyDown,keyUp={},{} local keyDown,keyUp={},{}
local gamepadDown,gamepadUp={},{} local gamepadDown,gamepadUp={},{}
function mouseDown.load(x,y,k)
if k==1 then
sceneTemp.skip=true
end
end
function keyDown.load(k) function keyDown.load(k)
if k=="space"or k=="return"then if k=="s"then
marking=nil
sceneTemp.skip=true sceneTemp.skip=true
end end
end end
function touchDown.load() function touchDown.load()
sceneTemp.skip=true if #tc.getTouches()>2 then
sceneTemp.skip=true
end
end end
function mouseDown.intro(x,y,k) function mouseDown.intro(x,y,k)
@@ -633,6 +630,9 @@ function touchDown.play(id,x,y)
local t=onVirtualkey(x,y) local t=onVirtualkey(x,y)
if t then if t then
players[1]:pressKey(t) players[1]:pressKey(t)
if setting.VKSound then
SFX.play("virtualKey")
end
virtualkey[t].isDown=true virtualkey[t].isDown=true
virtualkey[t].pressTime=10 virtualkey[t].pressTime=10
if setting.VKTrack then if setting.VKTrack then
@@ -742,25 +742,23 @@ function gamepadUp.play(key)
end end
function touchDown.help(id,x,y) function touchDown.help(id,x,y)
local S=sceneTemp local pw=sceneTemp.pw
if S.pw==0 then local t=pw%4
S.pw=1 if
t==0 and x<640 and y<360 or
t==1 and x>640 and y<360 or
t==2 and x<640 and y>360 or
t==3 and x>640 and y>360
then
pw=pw+1
if pw==8 then
marking=nil
SFX.play("reach")
end
else else
if y<S.y then pw=x<640 and y<360==1 and 1 or 0
S.pw=0
return
end
if S.pw%2==1 and x>S.x or S.pw%2==0 and x<S.x then
S.pw=S.pw+1
if S.pw==26 then
marking=nil
return
end
else
S.pw=0
end
end end
S.x,S.y=x,y sceneTemp.pw=pw
end end
function wheelMoved.history(x,y) function wheelMoved.history(x,y)
@@ -970,11 +968,21 @@ function love.keypressed(i)
if i=="f5"then if i=="f5"then
print("DEBUG:") print("DEBUG:")
elseif i=="f8"then devMode=nil elseif i=="f8"then
elseif i=="f9"then devMode=1 devMode=nil
elseif i=="f10"then devMode=2 TEXT.show("DEBUG OFF",640,360,80,"fly",.8)
elseif i=="f11"then devMode=3 elseif i=="f9"then
elseif i=="f12"then devMode=4 devMode=1
TEXT.show("DEBUG 1",640,360,80,"fly",.8)
elseif i=="f10"then
devMode=2
TEXT.show("DEBUG 2",640,360,80,"fly",.8)
elseif i=="f11"then
devMode=3
TEXT.show("DEBUG 3",640,360,80,"fly",8)
elseif i=="f12"then
devMode=4
TEXT.show("DEBUG 4",640,360,80,"fly",12)
elseif devMode==2 then elseif devMode==2 then
if i=="k"then if i=="k"then
for i=1,8 do for i=1,8 do
@@ -994,9 +1002,10 @@ function love.keypressed(i)
for k,v in next,_G do for k,v in next,_G do
print(k,v) print(k,v)
end end
elseif i=="6"then elseif i=="z"then
if kb.isDown("z")and kb.isDown("2")then if kb.isDown("m")and kb.isDown("r")then
marking=nil marking=nil
SFX.play("reach")
end end
elseif widget_sel then elseif widget_sel then
local W=widget_sel local W=widget_sel
@@ -1155,8 +1164,8 @@ function love.run()
FCT=FCT+setting.frameMul FCT=FCT+setting.frameMul
if FCT>=100 then if FCT>=100 then
FCT=FCT-100 FCT=FCT-100
gc.discard()--SPEED UPUPUP! gc.discard()--SPEED UPUPUP!
BG.draw() BG.draw()
gc.push("transform") gc.push("transform")
gc.replaceTransform(xOy) gc.replaceTransform(xOy)
@@ -1184,14 +1193,16 @@ function love.run()
t:draw() t:draw()
end--Floating Texts end--Floating Texts
gc.pop() gc.pop()
gc.setColor(1,1,1) gc.setColor(1,1,1)
if powerInfoCanvas then gc.draw(infoCanvas,0,0,0,scr.k)
gc.draw(powerInfoCanvas,0,0,0,scr.k) --Power Info
end--Power Info
if SCN.swapping then if SCN.swapping then
_=SCN.swap _=SCN.swap
_.draw(_.time) _.draw(_.time)
end--Scene swapping animation end--Scene swapping animation
setFont(15) setFont(15)
gc.setColor(1,1,1) gc.setColor(1,1,1)
_=scr.h-20 _=scr.h-20
@@ -1290,13 +1301,8 @@ function love.errorhandler(msg)
end end
end end
-------------------------------------------------------------Reset data relied on setting -------------------------------------------------------------Reset data relied on setting
changeLanguage(setting.lang)
if fs.getInfo("keymap.dat")then fs.remove("keymap.dat")end if fs.getInfo("keymap.dat")then fs.remove("keymap.dat")end
if fs.getInfo("unlock.dat")then FILE.loadUnlock()end
if fs.getInfo("data.dat")then FILE.loadData()end
if fs.getInfo("key.dat")then FILE.loadKeyMap()end
if fs.getInfo("virtualkey.dat")then FILE.loadVK()end
if fs.getInfo("setting.dat")then FILE.loadSetting() if fs.getInfo("setting.dat")then FILE.loadSetting()
else else
-- firstRun=true -- firstRun=true
@@ -1305,4 +1311,11 @@ else
setting.swap=false setting.swap=false
setting.vib=2 setting.vib=2
end end
end end
LANG.set(setting.lang)
if setting.fullscreen then love.window.setFullscreen(true)end
if fs.getInfo("unlock.dat")then FILE.loadUnlock()end
if fs.getInfo("data.dat")then FILE.loadData()end
if fs.getInfo("key.dat")then FILE.loadKeyMap()end
if fs.getInfo("virtualkey.dat")then FILE.loadVK()end

View File

@@ -12,21 +12,6 @@ local function score(P)
end end
return{ return{
name={
"宗师",
"宗师",
"GrandMaster",
},
level={
"GM",
"GM",
"GM",
},
info={
"成为方块大师",
"成为方块大师",
"To be Grand Master",
},
color=color.lightBlue, color=color.lightBlue,
env={ env={
noFly=true, noFly=true,

View File

@@ -1,20 +1,5 @@
local int,rnd=math.floor,math.random local int,rnd=math.floor,math.random
return{ return{
name={
"进攻",
"进攻",
"Attacker",
},
level={
"困难",
"困难",
"HARD",
},
info={
"进攻练习",
"进攻练习",
"Attacking better then defending",
},
color=color.magenta, color=color.magenta,
env={ env={
drop=30,lock=60, drop=30,lock=60,

View File

@@ -1,20 +1,5 @@
local int,rnd=math.floor,math.random local int,rnd=math.floor,math.random
return{ return{
name={
"进攻",
"进攻",
"Attacker",
},
level={
"极限",
"极限",
"ULTIMATE",
},
info={
"进攻练习",
"进攻练习",
"Attacking better then defending",
},
color=color.lightYellow, color=color.lightYellow,
env={ env={
drop=5,lock=60, drop=5,lock=60,

View File

@@ -7,21 +7,6 @@ local function newField(P)
end end
return{ return{
name={
"大爆炸",
"大爆炸",
"Big Bang",
},
level={
"简单",
"简单",
"EASY",
},
info={
"All-spin 入门教程\n未制作完成,下块即通",
"All-spin 入门教程\n未制作完成,下块即通",
"All-spin Tutorial!\nUNFINISHED,drop to win",
},
color=color.lightGrey, color=color.lightGrey,
env={ env={
drop=1e99,lock=1e99, drop=1e99,lock=1e99,

View File

@@ -1,20 +1,5 @@
local min=math.min local min=math.min
return{ return{
name={
"隐形",
"隐形",
"Blind",
},
level={
"半隐",
"半隐",
"HALF",
},
info={
"最强大脑",
"最强大脑",
"Invisible board",
},
color=color.cyan, color=color.cyan,
env={ env={
drop=30,lock=45, drop=30,lock=45,

View File

@@ -1,20 +1,5 @@
local min=math.min local min=math.min
return{ return{
name={
"隐形",
"隐形",
"Blind",
},
level={
"瞬隐",
"瞬隐",
"SUDDEN",
},
info={
"最强大脑",
"最强大脑",
"Invisible board",
},
color=color.magenta, color=color.magenta,
env={ env={
drop=15,lock=45, drop=15,lock=45,

View File

@@ -1,25 +1,11 @@
local min=math.min local min=math.min
return{ return{
name={
"隐形",
"隐形",
"Blind",
},
level={
"瞬隐+",
"瞬隐+",
"SUDDEN+",
},
info={
"最强大脑",
"最强大脑",
"Invisible board",
},
color=color.red, color=color.red,
env={ env={
drop=10,lock=60, drop=10,lock=60,
fall=5, fall=5,
center=false,ghost=false, center=false,ghost=false,
dropFX=0,lockFX=0,
visible="none", visible="none",
dropPiece=player.reach_winCheck, dropPiece=player.reach_winCheck,
freshLimit=15, freshLimit=15,

View File

@@ -1,20 +1,5 @@
local min=math.min local min=math.min
return{ return{
name={
"隐形",
"隐形",
"Blind",
},
level={
"全隐",
"全隐",
"ALL",
},
info={
"最强大脑",
"最强大脑",
"Invisible board",
},
color=color.green, color=color.green,
env={ env={
drop=15,lock=45, drop=15,lock=45,

View File

@@ -1,26 +1,12 @@
local min=math.min local min=math.min
return{ return{
name={
"隐形",
"隐形",
"Blind",
},
level={
"啥都不剩隐",
"啥都不剩隐",
"NOTHING",
},
info={
"最强大脑",
"最强大脑",
"Invisible board",
},
color=color.red, color=color.red,
env={ env={
drop=30,lock=60, drop=30,lock=60,
fall=5, fall=5,
block=false, block=false,
center=false,ghost=false, center=false,ghost=false,
dropFX=0,lockFX=0,
visible="none", visible="none",
dropPiece=player.reach_winCheck, dropPiece=player.reach_winCheck,
freshLimit=15, freshLimit=15,

View File

@@ -18,21 +18,6 @@ local function check_c4w(P)
end end
return{ return{
name={
"C4W练习",
"中四宽练习",
"C4W Training",
},
level={
"疯狂",
"疯狂",
"LUNATIC",
},
info={
"无 限 连 击",
"无 限 连 击",
"Infinite combo",
},
color=color.red, color=color.red,
env={ env={
drop=5,lock=30, drop=5,lock=30,

View File

@@ -16,21 +16,6 @@ local function check_c4w(P)
end end
return{ return{
name={
"C4W练习",
"中四宽练习",
"C4W Training",
},
level={
"普通",
"普通",
"NORMAL",
},
info={
"无 限 连 击",
"无 限 连 击",
"Infinite combo",
},
color=color.green, color=color.green,
env={ env={
drop=30,lock=60,oncehold=false, drop=30,lock=60,oncehold=false,

View File

@@ -14,21 +14,6 @@ local function check_LVup(P)
end end
return{ return{
name={
"高速经典",
"高速经典",
"Classic",
},
level={
"CTWC",
"锦标赛",
"CTWC",
},
info={
"高速经典",
"高速经典",
"Vintage car drag racing",
},
color=color.lightBlue, color=color.lightBlue,
env={ env={
noFly=true, noFly=true,

View File

@@ -1,21 +1,6 @@
local gc=love.graphics local gc=love.graphics
local int=math.floor local int=math.floor
return{ return{
name={
"自定义",
"自定义",
"Custom",
},
level={
"普通",
"普通",
"NORMAL",
},
info={
"画点什么然后把它消除!",
"画点什么然后把它消除!",
"Draw something then clear it!",
},
color=color.white, color=color.white,
env={ env={
dropPiece=player.reach_winCheck, dropPiece=player.reach_winCheck,
@@ -32,9 +17,9 @@ return{
if L~=0 then if L~=0 then
modeEnv.target=nil modeEnv.target=nil
if L<10 then if L<10 then
newPlayer(2,965,360,.5,AITemplate("9S",2*L)) newAIPlayer(2,965,360,.5,AITemplate("9S",2*L))
else else
newPlayer(2,965,360,.5,AITemplate("CC",L-6,2+int((L-11)*.5),modeEnv.hold,15000+5000*(L-10))) newAIPlayer(2,965,360,.5,AITemplate("CC",L-6,2+int((L-11)*.5),modeEnv.hold,15000+5000*(L-10)))
end end
end end
preField.h=20 preField.h=20

View File

@@ -18,21 +18,6 @@ local function puzzleCheck(P)
end end
return{ return{
name={
"自定义",
"自定义",
"Custom",
},
level={
"拼图",
"拼图",
"PUZZLE",
},
info={
"画点什么然后把它拼出来吧!",
"画点什么然后把它拼出来吧!",
"Draw something then stack it!",
},
color=color.white, color=color.white,
env={ env={
puzzle=true, puzzle=true,
@@ -52,9 +37,9 @@ return{
if L~=0 then if L~=0 then
modeEnv.target=nil modeEnv.target=nil
if L<10 then if L<10 then
newPlayer(2,965,360,.5,AITemplate("9S",2*L)) newAIPlayer(2,965,360,.5,AITemplate("9S",2*L))
else else
newPlayer(2,965,360,.5,AITemplate("CC",L-6,2+int((L-11)*.5),modeEnv.hold,15000+5000*(L-10))) newAIPlayer(2,965,360,.5,AITemplate("CC",L-6,2+int((L-11)*.5),modeEnv.hold,15000+5000*(L-10)))
end end
end end
preField.h=20 preField.h=20

View File

@@ -1,20 +1,5 @@
local int,rnd=math.floor,math.random local int,rnd=math.floor,math.random
return{ return{
name={
"防守",
"防守",
"Defender",
},
level={
"疯狂",
"疯狂",
"Lunatic",
},
info={
"防守练习",
"防守练习",
"Hand them!",
},
color=color.red, color=color.red,
env={ env={
drop=5,lock=60, drop=5,lock=60,

View File

@@ -1,20 +1,5 @@
local int,rnd=math.floor,math.random local int,rnd=math.floor,math.random
return{ return{
name={
"防守",
"防守",
"Defender",
},
level={
"普通",
"普通",
"NORMAL",
},
info={
"防守练习",
"防守练习",
"Hand them!",
},
color=color.green, color=color.green,
env={ env={
drop=30,lock=60, drop=30,lock=60,

View File

@@ -1,20 +1,5 @@
local max,rnd=math.max,math.random local max,rnd=math.max,math.random
return{ return{
name={
"挖掘",
"挖掘",
"Dig",
},
level={
"困难",
"困难",
"HARD",
},
info={
"挖掘练习",
"挖掘练习",
"Downstack!",
},
color=color.magenta, color=color.magenta,
env={ env={
drop=60,lock=120, drop=60,lock=120,

View File

@@ -1,20 +1,5 @@
local max,rnd=math.max,math.random local max,rnd=math.max,math.random
return{ return{
name={
"挖掘",
"挖掘",
"Dig",
},
level={
"极限",
"极限",
"ULTIMATE",
},
info={
"挖掘练习",
"挖掘练习",
"Downstack!",
},
color=color.lightYellow, color=color.lightYellow,
env={ env={
drop=10,lock=30, drop=10,lock=30,

View File

@@ -1,25 +1,89 @@
local min=math.min local rnd,min,rem=math.random,math.min,table.remove
return{ return{
name={
"干旱",
"干旱",
"Drought",
},
level={
"100L",
"100行",
"100L",
},
info={
"后 妈 发 牌",
"后 妈 发 牌",
"ERRSEQ flood attack",
},
color=color.red, color=color.red,
env={ env={
drop=20,lock=60, drop=20,lock=60,
sequence="drought2", sequence=function(P)
for i=1,3 do P:getNext(7)end
end,
freshMethod=function(P)
if not P.next[1] then
local height=freeRow.get(0)
local max=#P.field
for x=1,10 do
local h=max
while P.field[h][x]==0 and h>1 do
h=h-1
end
height[x]=h
end--get heights
height[11]=999
local res={1,1,2,2,3,4}
local d=0
local A
for i=1,10 do
d=d+height[i]
end
if d<40 or P.stat.row>2*42 then
A=#res+1
for i=A,A+5 do
res[i]=1
res[i+6]=2
end
goto END
end
--give I when no hole
d=-999--height difference
--A=hole mark
for x=2,11 do
local _=height[x]-height[x-1]
if d<-2 and _>2 then
A=true
end
d=_
end
if not A then
A=#res+1
res[A]=7
res[A+1]=7
res[A+2]=7
end
--give O when no Δ=0/give T when no Δ=1
d=0--Δ=0
A=0--Δ=1
for x=2,10 do
local _=height[x]-height[x-1]
if _==0 then
d=d+1
elseif _==1 or _==-1 then
A=A+1
end
end
if d<3 then
A=#res+1
res[A]=6
res[A+1]=6
res[A+2]=6
end
if A<3 then
A=#res+1
res[A]=5
res[A+1]=5
res[A+2]=5
res[A+3]=5
res[A+4]=5
end
::END::
freeRow.discard(height)
P:getNext(res[rnd(#res)])
end
end,
target=100,dropPiece=player.reach_winCheck, target=100,dropPiece=player.reach_winCheck,
next=1,hold=false,
ospin=false, ospin=false,
freshLimit=15, freshLimit=15,
bg="glow",bgm="reason", bg="glow",bgm="reason",

View File

@@ -1,25 +1,12 @@
local min=math.min local min=math.min
return{ return{
name={
"干旱",
"干旱",
"Drought",
},
level={
"100L",
"100行",
"100L",
},
info={
"你I没了",
"你I没了",
"B a g 6",
},
color=color.green, color=color.green,
env={ env={
drop=20,lock=60, drop=20,lock=60,
sequence="drought1", sequence="bag",
bag={1,1,2,2,3,3,4,4,5,5,6,6},
target=100,dropPiece=player.reach_winCheck, target=100,dropPiece=player.reach_winCheck,
next=3,
ospin=false, ospin=false,
freshLimit=15, freshLimit=15,
bg="glow",bgm="reason", bg="glow",bgm="reason",

View File

@@ -1,19 +1,4 @@
return{ return{
name={
"本地多人",
"本地多人",
"Multiplayer",
},
level={
"2P",
"2P",
"2P",
},
info={
"不是联网也不是局域网",
"不是联网也不是局域网",
"No network\nlocal game only",
},
color=color.white, color=color.white,
env={ env={
drop=60,lock=60, drop=60,lock=60,

View File

@@ -1,19 +1,4 @@
return{ return{
name={
"本地多人",
"本地多人",
"Multiplayer",
},
level={
"3P",
"3P",
"3P",
},
info={
"不是联网也不是局域网",
"不是联网也不是局域网",
"No network\nlocal game only",
},
color=color.white, color=color.white,
env={ env={
drop=60,lock=60, drop=60,lock=60,

View File

@@ -1,19 +1,4 @@
return{ return{
name={
"本地多人",
"本地多人",
"Multiplayer",
},
level={
"4P",
"4P",
"4P",
},
info={
"不是联网也不是局域网",
"不是联网也不是局域网",
"No network\nlocal game only",
},
color=color.white, color=color.white,
env={ env={
drop=60,lock=60, drop=60,lock=60,

View File

@@ -1,20 +1,5 @@
local format=string.format local format=string.format
return{ return{
name={
"无尽",
"无尽",
"Infinite",
},
level={
"",
"",
"",
},
info={
"沙盒",
"沙盒",
"Sandbox",
},
color=color.lightGrey, color=color.lightGrey,
env={ env={
drop=1e99,lock=1e99, drop=1e99,lock=1e99,

View File

@@ -1,27 +1,13 @@
local format,rnd=string.format,math.random local format,rnd=string.format,math.random
local function check_rise(P) local function check_rise(P)
while P.garbageBeneath<6 do if #P.clearedRow==0 then
P:garbageRise(10,1,rnd(10)) for i=1,8-P.garbageBeneath do
P.modeData.point=P.modeData.point+1 P:garbageRise(13,1,rnd(10))
end
end end
end end
return{ return{
name={
"无尽:挖掘",
"无尽:挖掘",
"Infinite:dig",
},
level={
"",
"",
"",
},
info={
"挖呀挖呀挖",
"挖呀挖呀挖",
"Dig to Nether?",
},
color=color.white, color=color.white,
env={ env={
drop=1e99,lock=1e99, drop=1e99,lock=1e99,
@@ -32,24 +18,24 @@ return{
}, },
load=function() load=function()
newPlayer(1,340,15) newPlayer(1,340,15)
for _=1,5 do for _=1,8 do
players[1]:garbageRise(10,1,rnd(10)) players[1]:garbageRise(13,1,rnd(10))
end end
end, end,
mesDisp=function(P,dx,dy) mesDisp=function(P,dx,dy)
setFont(45) setFont(45)
mStr(P.modeData.point,-81,190) mStr(P.stat.dig,-81,190)
mStr(P.stat.atk,-81,310) mStr(P.stat.atk,-81,310)
mStr(format("%.2f",P.stat.atk/P.stat.row),-81,420) mStr(format("%.2f",P.stat.atk/P.stat.row),-81,420)
mText(drawableText.line,-81,243) mText(drawableText.line,-81,243)
mText(drawableText.atk,-81,363) mText(drawableText.atk,-81,363)
mText(drawableText.eff,-81,475) mText(drawableText.eff,-81,475)
end, end,
score=function(P)return{P.modeData.point}end, score=function(P)return{P.stat.dig}end,
scoreDisp=function(D)return D[1].." Lines"end, scoreDisp=function(D)return D[1].." Lines"end,
comp=function(a,b)return a[1]>b[1]end, comp=function(a,b)return a[1]>b[1]end,
getRank=function(P) getRank=function(P)
local L=P.modeData.point local L=P.stat.dig
return return
L>=626 and 5 or L>=626 and 5 or
L>=400 and 4 or L>=400 and 4 or

View File

@@ -15,28 +15,13 @@ local function check(P)
end end
return{ return{
name={
"马拉松",
"马拉松",
"Marathon",
},
level={
"困难",
"困难",
"HARD",
},
info={
"200行高速马拉松",
"200行高速马拉松",
"200L marathon in high speed",
},
color=color.magenta, color=color.magenta,
env={ env={
noFly=true, noFly=true,
mindas=7,minarr=1,minsdarr=1, mindas=7,minarr=1,minsdarr=1,
drop=.5,wait=8,fall=20, drop=.5,wait=8,fall=20,
target=50,dropPiece=check, target=50,dropPiece=check,
bg="strap",bgm="race", bg="strap",bgm="push",
}, },
pauseLimit=true, pauseLimit=true,
slowMark=true, slowMark=true,

View File

@@ -14,21 +14,6 @@ local function check_LVup(P)
end end
return{ return{
name={
"马拉松",
"马拉松",
"Marathon",
},
level={
"普通",
"普通",
"NORMAL",
},
info={
"200行加速马拉松",
"200行加速马拉松",
"200L marathon with acceleration",
},
color=color.green, color=color.green,
env={ env={
noFly=true, noFly=true,
@@ -36,7 +21,7 @@ return{
wait=8,fall=20, wait=8,fall=20,
target=10,dropPiece=check_LVup, target=10,dropPiece=check_LVup,
mindas=7,minarr=1,minsdarr=1, mindas=7,minarr=1,minsdarr=1,
bg="strap",bgm="way", bg="strap",bgm="push",
}, },
pauseLimit=true, pauseLimit=true,
slowMark=true, slowMark=true,

View File

@@ -33,21 +33,6 @@ local function score(P)
end end
return{ return{
name={
"大师",
"大师",
"Master",
},
level={
"极限",
"极限",
"ULTIMATE",
},
info={
"20G:上级者的挑战",
"20G:上级者的挑战",
"20G:For Pro",
},
color=color.red, color=color.red,
env={ env={
noFly=true, noFly=true,

View File

@@ -37,21 +37,6 @@ local function score(P)
end end
return{ return{
name={
"大师",
"大师",
"Master",
},
level={
"疯狂",
"疯狂",
"LUNATIC",
},
info={
"20G:初心者适用",
"20G:初心者适用",
"20G:Back to beginner",
},
color=color.red, color=color.red,
env={ env={
noFly=true, noFly=true,

View File

@@ -34,21 +34,6 @@ local function score(P)
end end
return{ return{
name={
"大师",
"大师",
"Master",
},
level={
"终点",
"终点",
"FINAL",
},
info={
"究极20G:无法触及的终点",
"究极20G:无法触及的终点",
"Extreme 20G:Unreachable destination",
},
color=color.lightGrey, color=color.lightGrey,
env={ env={
noFly=true, noFly=true,

View File

@@ -1,20 +1,5 @@
local gc=love.graphics local gc=love.graphics
return{ return{
name={
"全清挑战",
"全清挑战",
"PC Challenge",
},
level={
"困难",
"困难",
"HARD",
},
info={
"100行内刷PC",
"100行内刷全清",
"More PCs in 100L",
},
color=color.magenta, color=color.magenta,
env={ env={
drop=60,lock=120, drop=60,lock=120,
@@ -36,12 +21,6 @@ return{
setFont(75) setFont(75)
mStr(P.stat.pc,-81,350) mStr(P.stat.pc,-81,350)
mText(drawableText.pc,-81,432) mText(drawableText.pc,-81,432)
gc.setColor(.5,.5,.5)
if frame>179 then
local y=72*(7-(P.stat.piece+(P.hd.id>0 and 2 or 1))%7)-36
gc.line(320,y,442,y)
end
end, end,
score=function(P)return{P.stat.pc,P.stat.time}end, score=function(P)return{P.stat.pc,P.stat.time}end,
scoreDisp=function(D)return D[1].." PCs "..toTime(D[2])end, scoreDisp=function(D)return D[1].." PCs "..toTime(D[2])end,

View File

@@ -1,20 +1,5 @@
local gc=love.graphics local gc=love.graphics
return{ return{
name={
"全清挑战",
"全清挑战",
"PC Challenge",
},
level={
"疯狂",
"疯狂",
"LUNATIC",
},
info={
"100行内刷PC",
"100行内刷全清",
"More PCs in 100L",
},
color=color.red, color=color.red,
env={ env={
drop=20,lock=60, drop=20,lock=60,
@@ -36,12 +21,6 @@ return{
setFont(75) setFont(75)
mStr(P.stat.pc,-81,350) mStr(P.stat.pc,-81,350)
mText(drawableText.pc,-81,432) mText(drawableText.pc,-81,432)
gc.setColor(.5,.5,.5)
if frame>179 then
local y=72*(7-(P.stat.piece+(P.hd.id>0 and 2 or 1))%7)-36
gc.line(320,y,442,y)
end
end, end,
score=function(P)return{P.stat.pc,P.stat.time}end, score=function(P)return{P.stat.pc,P.stat.time}end,
scoreDisp=function(D)return D[1].." PCs "..toTime(D[2])end, scoreDisp=function(D)return D[1].." PCs "..toTime(D[2])end,

View File

@@ -1,20 +1,5 @@
local gc=love.graphics local gc=love.graphics
return{ return{
name={
"全清挑战",
"全清挑战",
"PC Challenge",
},
level={
"普通",
"普通",
"NORMAL",
},
info={
"100行内刷PC",
"100行内刷全清",
"More PCs in 100L",
},
color=color.green, color=color.green,
env={ env={
oncehold=false, oncehold=false,
@@ -35,12 +20,6 @@ return{
setFont(75) setFont(75)
mStr(P.stat.pc,-81,350) mStr(P.stat.pc,-81,350)
mText(drawableText.pc,-81,432) mText(drawableText.pc,-81,432)
gc.setColor(.5,.5,.5)
if frame>179 then
local y=72*(7-(P.stat.piece+(P.hd.id>0 and 2 or 1))%7)-36
gc.line(320,y,442,y)
end
end, end,
score=function(P)return{P.stat.pc,P.stat.time}end, score=function(P)return{P.stat.pc,P.stat.time}end,
scoreDisp=function(D)return D[1].." PCs "..toTime(D[2])end, scoreDisp=function(D)return D[1].." PCs "..toTime(D[2])end,

View File

@@ -66,21 +66,6 @@ local function newPC(P)
end end
return{ return{
name={
"全清训练",
"全清训练",
"PC Training",
},
level={
"疯狂",
"疯狂",
"LUNATIC",
},
info={
"简易PC题库,熟悉全清定式的组合",
"简易全清题库,熟悉全清定式的组合",
"Let's learn some PCs",
},
color=color.red, color=color.red,
env={ env={
next=4, next=4,

View File

@@ -50,21 +50,6 @@ local function newPC(P)
end end
end end
return{ return{
name={
"全清训练",
"全清训练",
"PC Training",
},
level={
"普通",
"普通",
"NORMAL",
},
info={
"简易PC题库,熟悉全清定式的组合",
"简易全清题库,熟悉全清定式的组合",
"Let's learn some PCs",
},
color=color.green, color=color.green,
env={ env={
next=4, next=4,

View File

@@ -11,21 +11,6 @@ local function update_round(P)
end end
return{ return{
name={
"回合制",
"回合制",
"Turn-Based",
},
level={
"简单",
"简单",
"EASY",
},
info={
"下棋模式",
"下棋模式",
"Chess?",
},
color=color.cyan, color=color.cyan,
env={ env={
drop=1e99,lock=1e99, drop=1e99,lock=1e99,
@@ -35,7 +20,8 @@ return{
}, },
load=function() load=function()
newPlayer(1,340,15) newPlayer(1,340,15)
newPlayer(2,965,360,.5,AITemplate("9S",10)) newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,5000))
garbageSpeed=1e99
end, end,
mesDisp=function(P,dx,dy) mesDisp=function(P,dx,dy)
end, end,

View File

@@ -11,21 +11,6 @@ local function update_round(P)
end end
return{ return{
name={
"回合制",
"回合制",
"Turn-Based",
},
level={
"普通",
"普通",
"NORMAL",
},
info={
"下棋模式",
"下棋模式",
"Chess?",
},
color=color.green, color=color.green,
env={ env={
drop=1e99,lock=1e99, drop=1e99,lock=1e99,
@@ -35,7 +20,8 @@ return{
}, },
load=function() load=function()
newPlayer(1,340,15) newPlayer(1,340,15)
newPlayer(2,965,360,.5,AITemplate("9S",10)) newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,10000))
garbageSpeed=1e99
end, end,
mesDisp=function(P,dx,dy) mesDisp=function(P,dx,dy)
end, end,

View File

@@ -11,21 +11,6 @@ local function update_round(P)
end end
return{ return{
name={
"回合制",
"回合制",
"Turn-Based",
},
level={
"困难",
"困难",
"HARD",
},
info={
"下棋模式",
"下棋模式",
"Chess?",
},
color=color.magenta, color=color.magenta,
env={ env={
drop=1e99,lock=1e99, drop=1e99,lock=1e99,
@@ -35,7 +20,8 @@ return{
}, },
load=function() load=function()
newPlayer(1,340,15) newPlayer(1,340,15)
newPlayer(2,965,360,.5,AITemplate("9S",10)) newAIPlayer(2,965,360,.5,AITemplate("CC",10,2,true,12600))
garbageSpeed=1e99
end, end,
mesDisp=function(P,dx,dy) mesDisp=function(P,dx,dy)
end, end,

View File

@@ -11,21 +11,6 @@ local function update_round(P)
end end
return{ return{
name={
"回合制",
"回合制",
"Turn-Based",
},
level={
"疯狂",
"疯狂",
"LUNATIC",
},
info={
"下棋模式",
"下棋模式",
"Chess?",
},
color=color.red, color=color.red,
env={ env={
drop=1e99,lock=1e99, drop=1e99,lock=1e99,
@@ -35,7 +20,8 @@ return{
}, },
load=function() load=function()
newPlayer(1,340,15) newPlayer(1,340,15)
newPlayer(2,965,360,.5,AITemplate("9S",10)) newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,16260))
garbageSpeed=1e99
end, end,
mesDisp=function(P,dx,dy) mesDisp=function(P,dx,dy)
end, end,

View File

@@ -11,21 +11,6 @@ local function update_round(P)
end end
return{ return{
name={
"回合制",
"回合制",
"Turn-Based",
},
level={
"极限",
"极限",
"ULTIMATE",
},
info={
"下棋模式",
"下棋模式",
"Chess?",
},
color=color.lightYellow, color=color.lightYellow,
env={ env={
drop=1e99,lock=1e99, drop=1e99,lock=1e99,
@@ -35,7 +20,8 @@ return{
}, },
load=function() load=function()
newPlayer(1,340,15) newPlayer(1,340,15)
newPlayer(2,965,360,.5,AITemplate("9S",10)) newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,26000))
garbageSpeed=1e99
end, end,
mesDisp=function(P,dx,dy) mesDisp=function(P,dx,dy)
end, end,

View File

@@ -1,19 +1,4 @@
return{ return{
name={
"单挑",
"单挑",
"Battle",
},
level={
"简单",
"简单",
"EASY",
},
info={
"打败AI",
"打败电脑",
"Beat AI",
},
color=color.cyan, color=color.cyan,
env={ env={
drop=60,lock=60, drop=60,lock=60,
@@ -23,7 +8,7 @@ return{
pauseLimit=true, pauseLimit=true,
load=function() load=function()
newPlayer(1,340,15) newPlayer(1,340,15)
newPlayer(2,965,360,.5,AITemplate("9S",3)) newAIPlayer(2,965,360,.5,AITemplate("9S",3))
end, end,
mesDisp=function(P,dx,dy) mesDisp=function(P,dx,dy)
end, end,

View File

@@ -1,19 +1,4 @@
return{ return{
name={
"单挑",
"单挑",
"Battle",
},
level={
"普通",
"普通",
"NORMAL",
},
info={
"打败AI",
"打败AI",
"Beat AI",
},
color=color.green, color=color.green,
env={ env={
drop=60,lock=60, drop=60,lock=60,
@@ -23,7 +8,7 @@ return{
pauseLimit=true, pauseLimit=true,
load=function() load=function()
newPlayer(1,340,15) newPlayer(1,340,15)
newPlayer(2,965,360,.5,AITemplate("9S",5)) newAIPlayer(2,965,360,.5,AITemplate("9S",5))
end, end,
mesDisp=function(P,dx,dy) mesDisp=function(P,dx,dy)
end, end,

View File

@@ -1,19 +1,4 @@
return{ return{
name={
"单挑",
"单挑",
"Battle",
},
level={
"困难",
"困难",
"HARD",
},
info={
"打败AI",
"打败AI",
"Beat AI",
},
color=color.magenta, color=color.magenta,
env={ env={
drop=60,lock=60, drop=60,lock=60,
@@ -23,7 +8,7 @@ return{
pauseLimit=true, pauseLimit=true,
load=function() load=function()
newPlayer(1,340,15) newPlayer(1,340,15)
newPlayer(2,965,360,.5,AITemplate("9S",7)) newAIPlayer(2,965,360,.5,AITemplate("9S",7))
end, end,
mesDisp=function(P,dx,dy) mesDisp=function(P,dx,dy)
end, end,

View File

@@ -1,19 +1,4 @@
return{ return{
name={
"单挑",
"单挑",
"Battle",
},
level={
"疯狂",
"疯狂",
"LUNATIC",
},
info={
"打败AI",
"打败AI",
"Beat AI",
},
color=color.red, color=color.red,
env={ env={
drop=60,lock=60, drop=60,lock=60,
@@ -23,7 +8,7 @@ return{
pauseLimit=true, pauseLimit=true,
load=function() load=function()
newPlayer(1,340,15) newPlayer(1,340,15)
newPlayer(2,965,360,.5,AITemplate("9S",8)) newAIPlayer(2,965,360,.5,AITemplate("CC",9,2,true,26000))
end, end,
mesDisp=function(P,dx,dy) mesDisp=function(P,dx,dy)
end, end,

View File

@@ -1,19 +1,4 @@
return{ return{
name={
"单挑",
"单挑",
"Battle",
},
level={
"极限",
"极限",
"ULTIMATE",
},
info={
"打败AI",
"打败AI",
"Beat AI",
},
color=color.lightYellow, color=color.lightYellow,
env={ env={
drop=60,lock=60, drop=60,lock=60,
@@ -23,7 +8,7 @@ return{
pauseLimit=true, pauseLimit=true,
load=function() load=function()
newPlayer(1,340,15) newPlayer(1,340,15)
newPlayer(2,965,360,.5,AITemplate("9S",9)) newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,50000))
end, end,
mesDisp=function(P,dx,dy) mesDisp=function(P,dx,dy)
end, end,

View File

@@ -1,21 +1,6 @@
local gc=love.graphics local gc=love.graphics
local rnd=math.random local rnd=math.random
return{ return{
name={
"竞速",
"竞速",
"Sprint",
},
level={
"10L",
"10行",
"10L",
},
info={
"消除10行",
"消除10行",
"Clear 10 lines",
},
color=color.cyan, color=color.cyan,
env={ env={
drop=60,lock=60, drop=60,lock=60,

View File

@@ -1,21 +1,6 @@
local gc=love.graphics local gc=love.graphics
local rnd=math.random local rnd=math.random
return{ return{
name={
"竞速",
"竞速",
"Sprint",
},
level={
"100L",
"100行",
"100L",
},
info={
"消除100行",
"消除100行",
"Clear 100 lines",
},
color=color.orange, color=color.orange,
env={ env={
drop=60,lock=60, drop=60,lock=60,

View File

@@ -1,21 +1,6 @@
local gc=love.graphics local gc=love.graphics
local rnd=math.random local rnd=math.random
return{ return{
name={
"竞速",
"竞速",
"Sprint",
},
level={
"1000L",
"1000行",
"1000L",
},
info={
"消除1000行",
"消除1000行",
"Clear 1000 lines",
},
color=color.lightGrey, color=color.lightGrey,
env={ env={
drop=60,lock=60, drop=60,lock=60,

View File

@@ -1,21 +1,6 @@
local gc=love.graphics local gc=love.graphics
local rnd=math.random local rnd=math.random
return{ return{
name={
"竞速",
"竞速",
"Sprint",
},
level={
"20L",
"20行",
"20L",
},
info={
"消除20行",
"消除20行",
"Clear 20 lines",
},
color=color.lightBlue, color=color.lightBlue,
env={ env={
drop=60,lock=60, drop=60,lock=60,

View File

@@ -1,21 +1,6 @@
local gc=love.graphics local gc=love.graphics
local rnd=math.random local rnd=math.random
return{ return{
name={
"竞速",
"竞速",
"Sprint",
},
level={
"40L",
"40行",
"40L",
},
info={
"消除40行",
"消除40行",
"Clear 40 lines",
},
color=color.green, color=color.green,
env={ env={
drop=60,lock=60, drop=60,lock=60,

View File

@@ -1,21 +1,6 @@
local gc=love.graphics local gc=love.graphics
local rnd=math.random local rnd=math.random
return{ return{
name={
"竞速",
"竞速",
"Sprint",
},
level={
"400L",
"400行",
"400L",
},
info={
"消除400行",
"消除400行",
"Clear 400 lines",
},
color=color.red, color=color.red,
env={ env={
drop=60,lock=60, drop=60,lock=60,

View File

@@ -1,20 +1,5 @@
local max,rnd=math.max,math.random local max,rnd=math.max,math.random
return{ return{
name={
"生存",
"生存",
"Survivor",
},
level={
"简单",
"简单",
"EASY",
},
info={
"你能存活多久?",
"你能存活多久?",
"Survive Longer!",
},
color=color.cyan, color=color.cyan,
env={ env={
drop=30,lock=45, drop=30,lock=45,

View File

@@ -1,20 +1,5 @@
local max,rnd=math.max,math.random local max,rnd=math.max,math.random
return{ return{
name={
"生存",
"生存",
"Survivor",
},
level={
"困难",
"困难",
"HARD",
},
info={
"你能存活多久?",
"你能存活多久?",
"Survive Longer!",
},
color=color.magenta, color=color.magenta,
env={ env={
drop=30,lock=45, drop=30,lock=45,

View File

@@ -1,20 +1,5 @@
local max,rnd=math.max,math.random local max,rnd=math.max,math.random
return{ return{
name={
"生存",
"生存",
"Survivor",
},
level={
"疯狂",
"疯狂",
"LUNATIC",
},
info={
"你能存活多久?",
"你能存活多久?",
"Survive Longer!",
},
color=color.red, color=color.red,
env={ env={
drop=30,lock=45, drop=30,lock=45,

View File

@@ -1,20 +1,5 @@
local max,rnd=math.max,math.random local max,rnd=math.max,math.random
return{ return{
name={
"生存",
"生存",
"Survivor",
},
level={
"普通",
"普通",
"NORMAL",
},
info={
"你能存活多久?",
"你能存活多久?",
"Survive Longer!",
},
color=color.green, color=color.green,
env={ env={
drop=30,lock=45, drop=30,lock=45,

View File

@@ -1,20 +1,5 @@
local max,rnd=math.max,math.random local max,rnd=math.max,math.random
return{ return{
name={
"生存",
"生存",
"Survivor",
},
level={
"极限",
"极限",
"ULTIMATE",
},
info={
"你能存活多久?",
"你能存活多久?",
"Survive Longer!",
},
color=color.lightYellow, color=color.lightYellow,
env={ env={
drop=5,lock=60, drop=5,lock=60,

View File

@@ -6,21 +6,6 @@ local function tech_check_ultimate(P)
end end
return{ return{
name={
"科研",
"科研",
"Tech",
},
level={
"困难+",
"困难+",
"HARD+",
},
info={
"仅允许spin与PC",
"仅允许spin与全清",
"Spin&PC only",
},
color=color.darkMagenta, color=color.darkMagenta,
env={ env={
drop=30,lock=60, drop=30,lock=60,

View File

@@ -6,21 +6,6 @@ local function tech_check_easy(P)
end end
return{ return{
name={
"科研",
"科研",
"Tech",
},
level={
"困难",
"困难",
"HARD",
},
info={
"禁止断B2B",
"禁止断满贯",
"Keep B2B",
},
color=color.magenta, color=color.magenta,
env={ env={
drop=20,lock=60, drop=20,lock=60,

View File

@@ -6,21 +6,6 @@ local function tech_check_ultimate(P)
end end
return{ return{
name={
"科研",
"科研",
"Tech",
},
level={
"疯狂+",
"疯狂+",
"LUNATIC+",
},
info={
"仅允许spin与PC",
"仅允许spin与全清",
"Spin&PC only",
},
color=color.darkRed, color=color.darkRed,
env={ env={
_20G=true,lock=60, _20G=true,lock=60,

View File

@@ -6,21 +6,6 @@ local function tech_check_hard(P)
end end
return{ return{
name={
"科研",
"科研",
"Tech",
},
level={
"疯狂",
"疯狂",
"LUNATIC",
},
info={
"禁止普通消除",
"禁止普通消除",
"No normal clear",
},
color=color.red, color=color.red,
env={ env={
_20G=true,lock=60, _20G=true,lock=60,

View File

@@ -6,21 +6,6 @@ local function tech_check_ultimate(P)
end end
return{ return{
name={
"科研",
"科研",
"Tech",
},
level={
"普通+",
"普通+",
"NORMAL+",
},
info={
"仅允许spin与PC",
"仅允许spin与全清",
"Spin&PC only",
},
color=color.darkGreen, color=color.darkGreen,
env={ env={
oncehold=false, oncehold=false,

View File

@@ -6,21 +6,6 @@ local function tech_check_easy(P)
end end
return{ return{
name={
"科研",
"科研",
"Tech",
},
level={
"普通",
"普通",
"NORMAL",
},
info={
"禁止断B2B",
"禁止断B2B",
"Keep B2B",
},
color=color.green, color=color.green,
env={ env={
oncehold=false, oncehold=false,

View File

@@ -6,21 +6,6 @@ local function tech_check_ultimate(P)
end end
return{ return{
name={
"科研",
"科研",
"Tech",
},
level={
"极限+",
"极限+",
"ULTIMATE+",
},
info={
"仅允许spin与PC,强制最简操作",
"仅允许spin与全清,强制最简操作",
"Spin&PC only,no finesse error",
},
color=color.grey, color=color.grey,
env={ env={
arr=0, arr=0,

View File

@@ -6,21 +6,6 @@ local function tech_check_hard(P)
end end
return{ return{
name={
"科研",
"科研",
"Tech",
},
level={
"极限",
"极限",
"ULTIMATE",
},
info={
"禁止普通消除,强制最简操作",
"禁止普通消除,强制最简操作",
"No normal clear,no finesse error",
},
color=color.lightYellow, color=color.lightYellow,
env={ env={
arr=0, arr=0,

View File

@@ -16,21 +16,6 @@ local function selectTarget(P)
end end
return{ return{
name={
"49人混战",
"49人混战",
"Techmino49",
},
level={
"简单",
"简单",
"EASY",
},
info={
"49人混战,活到最后",
"49人混战,活到最后",
"49P melee fight",
},
color=color.cyan, color=color.cyan,
env={ env={
drop=60,lock=60, drop=60,lock=60,
@@ -56,17 +41,17 @@ return{
local n=2 local n=2
for i=1,4 do for j=1,6 do for i=1,4 do for j=1,6 do
if L[n]then if L[n]then
newPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(2,5))) newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(2,5)))
else else
newPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(2,5)-1,2,true,10000)) newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(2,5)-1,2,true,10000))
end end
n=n+1 n=n+1
end end end end
for i=9,12 do for j=1,6 do for i=9,12 do for j=1,6 do
if L[n]then if L[n]then
newPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(2,5))) newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(2,5)))
else else
newPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(2,5)-1,2,true,10000)) newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(2,5)-1,2,true,10000))
end end
n=n+1 n=n+1
end end end end

View File

@@ -16,21 +16,6 @@ local function selectTarget(P)
end end
return{ return{
name={
"49人混战",
"49人混战",
"Techmino49",
},
level={
"困难",
"困难",
"HARD",
},
info={
"49人混战,活到最后",
"49人混战,活到最后",
"49P melee fight",
},
color=color.magenta, color=color.magenta,
env={ env={
drop=60,lock=60, drop=60,lock=60,
@@ -56,17 +41,17 @@ return{
local n=2 local n=2
for i=1,4 do for j=1,6 do for i=1,4 do for j=1,6 do
if L[n]then if L[n]then
newPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(4,7))) newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(4,7)))
else else
newPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(4,7)-1,3,true,20000)) newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(4,7)-1,3,true,20000))
end end
n=n+1 n=n+1
end end end end
for i=9,12 do for j=1,6 do for i=9,12 do for j=1,6 do
if L[n]then if L[n]then
newPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(4,7))) newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(4,7)))
else else
newPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(4,7)-1,3,true,20000)) newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(4,7)-1,3,true,20000))
end end
n=n+1 n=n+1
end end end end

View File

@@ -16,21 +16,6 @@ local function selectTarget(P)
end end
return{ return{
name={
"49人混战",
"49人混战",
"Techmino49",
},
level={
"极限",
"极限",
"ULTIMATE",
},
info={
"49人混战,活到最后",
"49人混战,活到最后",
"49P melee fight",
},
color=color.lightYellow, color=color.lightYellow,
env={ env={
drop=15,lock=60, drop=15,lock=60,
@@ -56,17 +41,17 @@ return{
local n=2 local n=2
for i=1,4 do for j=1,6 do for i=1,4 do for j=1,6 do
if L[n]then if L[n]then
newPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(8,10))) newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(8,10)))
else else
newPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(8,10)-1,4,true,30000)) newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(8,10)-1,4,true,30000))
end end
n=n+1 n=n+1
end end end end
for i=9,12 do for j=1,6 do for i=9,12 do for j=1,6 do
if L[n]then if L[n]then
newPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(8,10))) newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(8,10)))
else else
newPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(8,10)-1,4,true,30000)) newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(8,10)-1,4,true,30000))
end end
n=n+1 n=n+1
end end end end

View File

@@ -16,21 +16,6 @@ local function selectTarget(P)
end end
return{ return{
name={
"99人混战",
"99人混战",
"Techmino99",
},
level={
"简单",
"简单",
"EASY",
},
info={
"99人混战,活到最后",
"99人混战,活到最后",
"99P melee fight",
},
color=color.cyan, color=color.cyan,
env={ env={
drop=60,lock=60, drop=60,lock=60,
@@ -56,17 +41,17 @@ return{
local n=2 local n=2
for i=1,7 do for j=1,7 do for i=1,7 do for j=1,7 do
if L[n]then if L[n]then
newPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(2,5))) newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(2,5)))
else else
newPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(2,5)-1,2,true,10000)) newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(2,5)-1,2,true,10000))
end end
n=n+1 n=n+1
end end end end
for i=15,21 do for j=1,7 do for i=15,21 do for j=1,7 do
if L[n]then if L[n]then
newPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(2,5))) newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(2,5)))
else else
newPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(2,5)-1,2,true,10000)) newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(2,5)-1,2,true,10000))
end end
n=n+1 n=n+1
end end end end

View File

@@ -16,21 +16,6 @@ local function selectTarget(P)
end end
return{ return{
name={
"99人混战",
"99人混战",
"Techmino99",
},
level={
"困难",
"困难",
"HARD",
},
info={
"99人混战,活到最后",
"99人混战,活到最后",
"99P melee fight",
},
color=color.magenta, color=color.magenta,
env={ env={
drop=60,lock=60, drop=60,lock=60,
@@ -56,17 +41,17 @@ return{
local n=2 local n=2
for i=1,7 do for j=1,7 do for i=1,7 do for j=1,7 do
if L[n]then if L[n]then
newPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(4,7))) newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(4,7)))
else else
newPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(4,7)-1,3,true,20000)) newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(4,7)-1,3,true,20000))
end end
n=n+1 n=n+1
end end end end
for i=15,21 do for j=1,7 do for i=15,21 do for j=1,7 do
if L[n]then if L[n]then
newPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(4,7))) newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(4,7)))
else else
newPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(4,7)-1,3,true,20000)) newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(4,7)-1,3,true,20000))
end end
n=n+1 n=n+1
end end end end

View File

@@ -16,21 +16,6 @@ local function selectTarget(P)
end end
return{ return{
name={
"99人混战",
"99人混战",
"Techmino99",
},
level={
"极限",
"极限",
"ULTIMATE",
},
info={
"99人混战,活到最后",
"99人混战,活到最后",
"99P melee fight",
},
color=color.lightYellow, color=color.lightYellow,
env={ env={
drop=15,lock=60, drop=15,lock=60,
@@ -56,17 +41,17 @@ return{
local n=2 local n=2
for i=1,7 do for j=1,7 do for i=1,7 do for j=1,7 do
if L[n]then if L[n]then
newPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(8,10))) newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(8,10)))
else else
newPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(8,10)-1,4,true,30000)) newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(8,10)-1,4,true,30000))
end end
n=n+1 n=n+1
end end end end
for i=15,21 do for j=1,7 do for i=15,21 do for j=1,7 do
if L[n]then if L[n]then
newPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(8,10))) newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(8,10)))
else else
newPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(8,10)-1,4,true,30000)) newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(8,10)-1,4,true,30000))
end end
n=n+1 n=n+1
end end end end

View File

@@ -4,26 +4,14 @@ local function check_tsd(P)
P:lose() P:lose()
elseif #P.clearedRow>0 then elseif #P.clearedRow>0 then
P.modeData.event=P.modeData.event+1 P.modeData.event=P.modeData.event+1
if P.modeData.event==20 then
P:win()
end
end end
end end
end end
return{ return{
name={
"TSD挑战",
"T旋双清挑战",
"TSD Challenge",
},
level={
"简单",
"简单",
"EASY",
},
info={
"你能连续做几个TSD?",
"你能连续做几个T旋双清?",
"T-spin-doubles only",
},
color=color.green, color=color.green,
env={ env={
drop=1e99,lock=1e99, drop=1e99,lock=1e99,
@@ -46,11 +34,11 @@ return{
getRank=function(P) getRank=function(P)
local T=P.modeData.event local T=P.modeData.event
return return
T>=23 and 5 or T>=20 and 5 or
T>=20 and 4 or T>=18 and 4 or
T>=15 and 3 or T>=15 and 3 or
T>=10 and 2 or T>=10 and 2 or
T>=6 and 1 or T>=4 and 1 or
T>=1 and 0 T>=1 and 0
end, end,
} }

View File

@@ -9,21 +9,6 @@ local function check_tsd(P)
end end
return{ return{
name={
"TSD挑战",
"T旋双清挑战",
"TSD Challenge",
},
level={
"困难",
"困难",
"HARD",
},
info={
"你能连续做几个TSD?",
"你能连续做几个T旋双清?",
"T-spin-doubles only",
},
color=color.magenta, color=color.magenta,
env={ env={
drop=60,lock=60, drop=60,lock=60,

View File

@@ -9,21 +9,6 @@ local function check_tsd(P)
end end
return{ return{
name={
"TSD挑战",
"T旋双清挑战",
"TSD Challenge",
},
level={
"极限",
"极限",
"ULTIMATE",
},
info={
"你能连续做几个TSD?",
"你能连续做几个T旋双清?",
"T-spin-doubles only",
},
color=color.lightYellow, color=color.lightYellow,
env={ env={
drop=60,lock=60, drop=60,lock=60,

View File

@@ -1,21 +1,6 @@
local gc=love.graphics local gc=love.graphics
local warnTime={60,90,105,115,116,117,118,119,120} local warnTime={60,90,105,115,116,117,118,119,120}
return{ return{
name={
"限时打分",
"限时打分",
"Ultra",
},
level={
"挑战",
"挑战",
"EXTRA",
},
info={
"在两分钟内尽可能拿到最多的分数",
"在两分钟内尽可能拿到最多的分数",
"Score attack in 120s",
},
color=color.lightGrey, color=color.lightGrey,
env={ env={
noFly=true, noFly=true,

View File

@@ -1,19 +1,4 @@
return{ return{
name={
"",
"",
"Zen",
},
level={
"",
"",
"",
},
info={
"不限时200行",
"不限时200行",
"200 lines without any limits",
},
color=color.lightGrey, color=color.lightGrey,
env={ env={
drop=120,lock=120, drop=120,lock=120,

101
paint.lua
View File

@@ -1,7 +1,7 @@
local gc=love.graphics local gc=love.graphics
local setFont=setFont local setFont=setFont
local int,ceil,rnd,abs=math.floor,math.ceil,math.random,math.abs local int,ceil,rnd,abs=math.floor,math.ceil,math.random,math.abs
local max,min,sin=math.max,math.min,math.sin local max,min,sin,cos=math.max,math.min,math.sin,math.cos
local format=string.format local format=string.format
local Timer=love.timer.getTime local Timer=love.timer.getTime
@@ -12,7 +12,7 @@ local modeRankColor={
color.bronze, --Rank1 color.bronze, --Rank1
color.lightGrey, --Rank2 color.lightGrey, --Rank2
color.lightYellow, --Rank3 color.lightYellow, --Rank3
color.lightMagenta, --Rank4 color.lightPurple, --Rank4
color.lightCyan, --Rank5 color.lightCyan, --Rank5
color.purple, --Special color.purple, --Special
} }
@@ -154,6 +154,7 @@ function Pnt.mode()
gc.scale(cam.k1) gc.scale(cam.k1)
local MM=modes local MM=modes
local R=modeRanks local R=modeRanks
local sel=cam.sel
setFont(30) setFont(30)
for _=1,#MM do for _=1,#MM do
local M=MM[_] local M=MM[_]
@@ -167,7 +168,7 @@ function Pnt.mode()
end end
local S=M.size local S=M.size
local d=((M.x-(cam.x1+(cam.sel and -180 or 0))/cam.k1)^2+(M.y-cam.y1/cam.k1)^2)^.55 local d=((M.x-(cam.x1+(sel and -180 or 0))/cam.k1)^2+(M.y-cam.y1/cam.k1)^2)^.55
if d<500 then S=S*(1.25-d*0.0005) end if d<500 then S=S*(1.25-d*0.0005) end
local c=modeRankColor[modeRanks[M.id]] local c=modeRankColor[modeRanks[M.id]]
if c then if c then
@@ -179,21 +180,21 @@ function Pnt.mode()
end end
if M.shape==1 then--Rectangle if M.shape==1 then--Rectangle
gc.rectangle("fill",M.x-S,M.y-S,2*S,2*S) gc.rectangle("fill",M.x-S,M.y-S,2*S,2*S)
if cam.sel==_ then if sel==_ then
gc.setColor(1,1,1) gc.setColor(1,1,1)
gc.setLineWidth(10) gc.setLineWidth(10)
gc.rectangle("line",M.x-S+5,M.y-S+5,2*S-10,2*S-10) gc.rectangle("line",M.x-S+5,M.y-S+5,2*S-10,2*S-10)
end end
elseif M.shape==2 then--diamond elseif M.shape==2 then--diamond
gc.circle("fill",M.x,M.y,S+5,4) gc.circle("fill",M.x,M.y,S+5,4)
if cam.sel==_ then if sel==_ then
gc.setColor(1,1,1) gc.setColor(1,1,1)
gc.setLineWidth(10) gc.setLineWidth(10)
gc.circle("line",M.x,M.y,S+5,4) gc.circle("line",M.x,M.y,S+5,4)
end end
elseif M.shape==3 then--Octagon elseif M.shape==3 then--Octagon
gc.circle("fill",M.x,M.y,S,8) gc.circle("fill",M.x,M.y,S,8)
if cam.sel==_ then if sel==_ then
gc.setColor(1,1,1) gc.setColor(1,1,1)
gc.setLineWidth(10) gc.setLineWidth(10)
gc.circle("line",M.x,M.y,S,8) gc.circle("line",M.x,M.y,S,8)
@@ -224,16 +225,16 @@ function Pnt.mode()
end end
end end
gc.pop() gc.pop()
if cam.sel then if sel then
local M=MM[cam.sel] local M=MM[sel]
local lang=setting.lang local lang=setting.lang
gc.setColor(.7,.7,.7,.5) gc.setColor(.7,.7,.7,.5)
gc.rectangle("fill",920,0,360,720)--Info board gc.rectangle("fill",920,0,360,720)--Info board
gc.setColor(M.color) gc.setColor(M.color)
setFont(40)mStr(M.name[lang],1100,5) setFont(40)mStr(text.modes[sel][1],1100,5)
setFont(30)mStr(M.level[lang],1100,50) setFont(30)mStr(text.modes[sel][2],1100,50)
gc.setColor(1,1,1) gc.setColor(1,1,1)
setFont(28)gc.printf(M.info[lang],920,110,360,"center") setFont(28)gc.printf(text.modes[sel][3],920,110,360,"center")
if M.slowMark then if M.slowMark then
gc.draw(IMG.ctrlSpeedLimit,1230,50,nil,.4) gc.draw(IMG.ctrlSpeedLimit,1230,50,nil,.4)
end end
@@ -423,11 +424,14 @@ function Pnt.play()
gc.pop() gc.pop()
end end
end end
local hexList={1,0,.5,1.732*.5,-.5,1.732*.5}for i=1,6 do hexList[i]=hexList[i]*150 end
local textPos={90,131,-90,131,-200,-25,-90,-181,90,-181,200,-25}
local dataPos={90,143,-90,143,-200,-13,-90,-169,90,-169,200,-13}
function Pnt.pause() function Pnt.pause()
Pnt.play()
local S=sceneTemp local S=sceneTemp
local T=S.timer*.02 local T=S.timer*.02
if T<1 or gameResult then Pnt.play()end
--Dark BG --Dark BG
local _=T local _=T
if gameResult then _=_*.6 end if gameResult then _=_*.6 end
@@ -448,8 +452,8 @@ function Pnt.pause()
--Mode Info --Mode Info
_=drawableText.modeName _=drawableText.modeName
gc.draw(_,70,180) gc.draw(_,40,180)
gc.draw(drawableText.levelName,90+_:getWidth(),180) gc.draw(drawableText.levelName,60+_:getWidth(),180)
--Result Text --Result Text
setFont(35) setFont(35)
@@ -459,8 +463,8 @@ function Pnt.pause()
if frame>180 then if frame>180 then
_=S.list _=S.list
setFont(26) setFont(26)
for i=1,8 do for i=1,10 do
gc.print(text.pauseStat[i],70,210+40*i) gc.print(text.pauseStat[i],40,210+40*i)
gc.printf(_[i],245,210+40*i,250,"right") gc.printf(_[i],245,210+40*i,250,"right")
end end
end end
@@ -471,36 +475,39 @@ function Pnt.pause()
gc.setLineWidth(2) gc.setLineWidth(2)
gc.push("transform") gc.push("transform")
gc.translate(1026,400) 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) --axes
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.setColor(1,1,1,T)
gc.line(S.V1)gc.line(S.V2) for i=1,3 do
local x,y=hexList[2*i-1],hexList[2*i]
gc.line(-x,-y,x,y)
end
local C
_=Timer()%6.2832
if _>3.1416 then
gc.setColor(1,1,1,-T*sin(_))
setFont(35)
C,_=text.radar,textPos
else
gc.setColor(1,1,1,T*sin(_))
setFont(18)
C,_=S.radar,dataPos
end
for i=1,6 do
mStr(C[i],_[2*i-1],_[2*i])
end
gc.scale((3-2*T)*T)
gc.setColor(1,1,1,T*(.5+.3*sin(Timer()*6.26)))gc.polygon("line",S.standard)
_=S.color
gc.setColor(_[1],_[2],_[3],T)
_=S.val
for i=1,9,2 do
gc.polygon("fill",0,0,_[i],_[i+1],_[i+2],_[i+3])
end
gc.polygon("fill",0,0,_[11],_[12],_[1],_[2])
gc.setColor(1,1,1,T)gc.polygon("line",S.val)
gc.pop() 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
end end
function Pnt.setting_game() function Pnt.setting_game()
@@ -594,11 +601,11 @@ function Pnt.setting_key()
local board=s.board local board=s.board
for N=1,20 do for N=1,20 do
if N<11 then if N<11 then
gc.printf(text.actName[N],47,45*N+22,180,"right") gc.printf(text.acts[N],47,45*N+22,180,"right")
mStr(keyMap[board][N],340,45*N+22) mStr(keyMap[board][N],340,45*N+22)
mStr(keyMap[board+8][N],540,45*N+22) mStr(keyMap[board+8][N],540,45*N+22)
else else
gc.printf(text.actName[N],647,45*N-428,180,"right") gc.printf(text.acts[N],647,45*N-428,180,"right")
mStr(keyMap[board][N],940,45*N-428) mStr(keyMap[board][N],940,45*N-428)
mStr(keyMap[board+8][N],1040,45*N-428) mStr(keyMap[board+8][N],1040,45*N-428)
end end

View File

@@ -1,5 +1,5 @@
local int=math.floor local int=math.floor
local AISpeed={60,50,45,35,25,15,9,6,4,2} local AISpeed={60,50,45,35,25,15,9,6,4,3}
return function(type,speedLV,next,hold,node) return function(type,speedLV,next,hold,node)
if type=="CC"then if type=="CC"then
return{ return{

View File

@@ -50,10 +50,10 @@ end
function BGdraw.strap() function BGdraw.strap()
gc.setColor(.5,.5,.5) gc.setColor(.5,.5,.5)
local x=t%16*-64 local x=t%16*-64
::L:: repeat
gc.draw(img,x,0,nil,8,scr.h) gc.draw(img,x,0,nil,8,scr.h)
x=x+1024--image width*8 x=x+1024--image width*8
if x<scr.w then goto L end until x>=scr.w
end end
function BGinit.flink() function BGinit.flink()
@@ -115,10 +115,10 @@ end
function BGdraw.game4() function BGdraw.game4()
gc.setColor(.05,.4,.4) gc.setColor(.05,.4,.4)
local x=t%8*-128 local x=t%8*-128
::L:: repeat
gc.draw(img,x,0,nil,8,scr.h) gc.draw(img,x,0,nil,8,scr.h)
x=x+1024--image width*8 x=x+1024--image width*8
if x<scr.w then goto L end until x>=scr.w
end--Fast strap end--Fast strap
function BGinit.game5() function BGinit.game5()

View File

@@ -2,6 +2,7 @@ local rem=table.remove
local BGM={} local BGM={}
-- BGM.nowPlay=[str:playing ID] -- BGM.nowPlay=[str:playing ID]
-- BGM.suspend=[str:pausing ID]
-- BGM.playing=[src:playing SRC] -- BGM.playing=[src:playing SRC]
BGM.list={ BGM.list={
"blank","way","newera","infinite","reason", "blank","way","newera","infinite","reason",
@@ -21,7 +22,12 @@ function BGM.loadAll()
end end
end end
function BGM.play(s) function BGM.play(s)
if setting.bgm==0 or not s then return end if setting.bgm==0 then
BGM.suspend,BGM.nowPlay=s
return
elseif not s then
return
end
if BGM.nowPlay~=s then if BGM.nowPlay~=s then
if BGM.nowPlay then TASK.new(tickEvent.bgmFadeOut,nil,BGM.nowPlay)end if BGM.nowPlay then TASK.new(tickEvent.bgmFadeOut,nil,BGM.nowPlay)end
TASK.changeCode(tickEvent.bgmFadeIn,tickEvent.bgmFadeOut) TASK.changeCode(tickEvent.bgmFadeIn,tickEvent.bgmFadeOut)

38
parts/color.lua Normal file
View File

@@ -0,0 +1,38 @@
return{
red={1,0,0},
green={0,1,0},
blue={.2,.2,1},
yellow={1,1,0},
magenta={1,0,1},
cyan={0,1,1},
grey={.6,.6,.6},
lightRed={1,.5,.5},
lightGreen={.5,1,.5},
lightBlue={.6,.6,1},
lightYellow={1,1,.5},
lightMagenta={1,.5,1},
lightCyan={.5,1,1},
lightGrey={.8,.8,.8},
darkRed={.6,0,0},
darkGreen={0,.6,0},
darkBlue={0,0,.6},
darkYellow={.6,.6,0},
darkMagenta={.6,0,.6},
darkCyan={0,.6,.6},
darkGrey={.3,.3,.3},
black={0,0,0},
orange={1,.6,0},
pink={1,0,.6},
grass={.6,1,0},
water={0,1,.6},
bronze={.7,.4,0},
white={1,1,1},
lightOrange={1,.7,.3},
darkOrange={.6,.4,0},
purple={.5,0,1},
lightPurple={.8,.4,1},
darkPurple={.3,0,.6},
}

View File

@@ -33,7 +33,6 @@ if setting.lang==1 then
"CLASSIC SEXY RUSSIAN BLOCKS", "CLASSIC SEXY RUSSIAN BLOCKS",
"戴上耳机以获得最佳体验", "戴上耳机以获得最佳体验",
"少女祈祷中", "少女祈祷中",
"按键/点击以强制满速加载",
"LrL,RlR LLr,RRl RRR,LLL RfR,RRf,rFF FFF",--ZSLJTOI "LrL,RlR LLr,RRl RRR,LLL RfR,RRf,rFF FFF",--ZSLJTOI
"RUR'U'R'FR2U'R'U'RUR'F'", "RUR'U'R'FR2U'R'U'RUR'F'",
"Am G F G", "Am G F G",
@@ -74,7 +73,6 @@ elseif setting.lang==2 then
"CLASSIC SEXY RUSSIAN BLOCKS", "CLASSIC SEXY RUSSIAN BLOCKS",
"戴上耳机以获得最佳体验", "戴上耳机以获得最佳体验",
"少女祈祷中", "少女祈祷中",
"按键/点击以强制满速加载",
"LrL,RlR LLr,RRl RRR,LLL RfR,RRf,rFF FFF",--ZSLJTOI "LrL,RlR LLr,RRl RRR,LLL RfR,RRf,rFF FFF",--ZSLJTOI
"RUR'U'R'FR2U'R'U'RUR'F'", "RUR'U'R'FR2U'R'U'RUR'F'",
"Am G F G", "Am G F G",
@@ -116,7 +114,6 @@ elseif setting.lang==3 then
"CLASSIC SEXY RUSSIAN BLOCKS", "CLASSIC SEXY RUSSIAN BLOCKS",
"Headphones for better experience", "Headphones for better experience",
"少女祈禱中", "少女祈禱中",
"any-key/click to load at fastest speed",
"RUR'U'R'FR2U'R'U'RUR'F'", "RUR'U'R'FR2U'R'U'RUR'F'",
"Am G F G", "Am G F G",
"LrL,RlR LLr,RRl RRR,LLL RfR,RRf,rFF FFF",--ZSLJTOI "LrL,RlR LLr,RRl RRR,LLL RfR,RRf,rFF FFF",--ZSLJTOI

1271
parts/languages.lua Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -7,85 +7,6 @@ actName={
"insLeft","insRight","insDown","down1","down4","down10", "insLeft","insRight","insDown","down1","down4","down10",
"dropLeft","dropRight","addLeft","addRight",--Super contorl system "dropLeft","dropRight","addLeft","addRight",--Super contorl system
} }
color={
red={1,0,0},
green={0,1,0},
blue={.2,.2,1},
yellow={1,1,0},
magenta={1,0,1},
cyan={0,1,1},
grey={.6,.6,.6},
lightRed={1,.5,.5},
lightGreen={.5,1,.5},
lightBlue={.6,.6,1},
lightYellow={1,1,.5},
lightMagenta={1,.5,1},
lightCyan={.5,1,1},
lightGrey={.8,.8,.8},
darkRed={.6,0,0},
darkGreen={0,.6,0},
darkBlue={0,0,.6},
darkYellow={.6,.6,0},
darkMagenta={.6,0,.6},
darkCyan={0,.6,.6},
darkGrey={.3,.3,.3},
black={0,0,0},
orange={1,.6,0},
pink={1,0,.6},
grass={.6,1,0},
water={0,1,.6},
bronze={.7,.4,0},
white={1,1,1},
lightOrange={1,.7,.3},
darkOrange={.6,.4,0},
purple={.5,0,1},
lightPurple={.8,.4,1},
darkPurple={.3,0,.6},
}
voiceBank={}--{{SRC1s},{SRC2s},...}
voiceName={
"zspin","sspin","lspin","jspin","tspin","ospin","ispin",
"single","double","triple","techrash",
"mini","b2b","b3b","pc",
"win","lose",
"bye",
"nya",
"happy",
"doubt",
"sad",
"egg",
}
voiceList={
zspin={"zspin_1","zspin_2","zspin_3"},
sspin={"sspin_1","sspin_2","sspin_3","sspin_4","sspin_5","sspin_6"},
lspin={"lspin_1","lspin_2"},
jspin={"jspin_1","jspin_2","jspin_3","jspin_4"},
tspin={"tspin_1","tspin_2","tspin_3","tspin_4","tspin_5","tspin_6"},
ospin={"ospin_1","ospin_2","ospin_3"},
ispin={"ispin_1","ispin_2","ispin_3"},
single={"single_1","single_2","single_3","single_4","single_5","single_6","single_7"},
double={"double_1","double_2","double_3","double_4","double_5"},
triple={"triple_1","triple_2","triple_3","triple_4","triple_5","triple_6","triple_7"},
techrash={"techrash_1","techrash_2","techrash_3","techrash_4"},
mini={"mini_1","mini_2","mini_3"},
b2b={"b2b_1","b2b_2","b2b_3"},
b3b={"b3b_1","b3b_2"},
pc={"clear_1","clear_2"},
win={"win_1","win_2","win_3","win_4","win_5","win_6","win_6","win_7"},
lose={"lose_1","lose_2","lose_3"},
bye={"bye_1","bye_2"},
nya={"nya_1","nya_2","nya_3","nya_4"},
happy={"nya_happy_1","nya_happy_2","nya_happy_3","nya_happy_4"},
doubt={"nya_doubt_1","nya_doubt_2"},
sad={"nya_sad_1"},
egg={"egg_1","egg_2"},
}
musicID={ musicID={
"blank", "blank",
"way", "way",
@@ -122,7 +43,7 @@ customRange={
fall={0,1,2,3,4,5,6,7,8,10,15,20,30,60}, fall={0,1,2,3,4,5,6,7,8,10,15,20,30,60},
next={0,1,2,3,4,5,6}, next={0,1,2,3,4,5,6},
hold={true,false,true}, hold={true,false,true},
sequence={"bag7","his4","rnd"}, sequence={"bag","his4","rnd"},
visible={"show","time","fast","none"}, visible={"show","time","fast","none"},
target={10,20,40,100,200,500,1000,1e99}, target={10,20,40,100,200,500,1000,1e99},
freshLimit={0,8,15,1e99}, freshLimit={0,8,15,1e99},
@@ -130,6 +51,5 @@ customRange={
bg={"none","game1","game2","game3","strap","rgb","glow","matrix"}, bg={"none","game1","game2","game3","strap","rgb","glow","matrix"},
bgm={"blank","way","race","newera","push","reason","infinite","secret7th","secret8th","rockblock"}, bgm={"blank","way","race","newera","push","reason","infinite","secret7th","secret8th","rockblock"},
} }
RCPB={10,33,200,33,105,5,105,60} RCPB={10,33,200,33,105,5,105,60}
snapLevelValue={1,10,20,40,60,80} snapLevelValue={1,10,20,40,60,80}

View File

@@ -2,11 +2,12 @@ local rem=table.remove
local SFX={} local SFX={}
SFX.list={ SFX.list={
"welcome", "welcome_sfx",
"click","enter", "click","enter",
"finesseError","finesseError_long", "finesseError","finesseError_long",
--Stereo sfxs(cannot set position) --Stereo sfxs(cannot set position)
"virtualKey",
"button","swipe", "button","swipe",
"ready","start","win","fail","collect", "ready","start","win","fail","collect",
"move","rotate","rotatekick","hold", "move","rotate","rotatekick","hold",

View File

@@ -1,10 +1,52 @@
local rnd=math.random local rnd=math.random
local rem=table.remove local rem=table.remove
local voiceQueue={free=0} local voiceQueue={free=0}
local bank={}--{{SRC1s},{SRC2s},...}
local VOC={} local VOC={}
VOC.name={
"zspin","sspin","lspin","jspin","tspin","ospin","ispin",
"single","double","triple","techrash",
"mini","b2b","b3b","pc",
"win","lose",
"bye",
"nya",
"happy",
"doubt",
"sad",
"egg",
"welcome"
}
VOC.list={
zspin={"zspin_1","zspin_2","zspin_3"},
sspin={"sspin_1","sspin_2","sspin_3","sspin_4","sspin_5","sspin_6"},
lspin={"lspin_1","lspin_2"},
jspin={"jspin_1","jspin_2","jspin_3","jspin_4"},
tspin={"tspin_1","tspin_2","tspin_3","tspin_4","tspin_5","tspin_6"},
ospin={"ospin_1","ospin_2","ospin_3"},
ispin={"ispin_1","ispin_2","ispin_3"},
single={"single_1","single_2","single_3","single_4","single_5","single_6","single_7"},
double={"double_1","double_2","double_3","double_4","double_5"},
triple={"triple_1","triple_2","triple_3","triple_4","triple_5","triple_6","triple_7"},
techrash={"techrash_1","techrash_2","techrash_3","techrash_4"},
mini={"mini_1","mini_2","mini_3"},
b2b={"b2b_1","b2b_2","b2b_3"},
b3b={"b3b_1","b3b_2"},
pc={"clear_1","clear_2"},
win={"win_1","win_2","win_3","win_4","win_5","win_6","win_6","win_7"},
lose={"lose_1","lose_2","lose_3"},
bye={"bye_1","bye_2"},
nya={"nya_1","nya_2","nya_3","nya_4"},
happy={"nya_happy_1","nya_happy_2","nya_happy_3","nya_happy_4"},
doubt={"nya_doubt_1","nya_doubt_2"},
sad={"nya_sad_1"},
egg={"egg_1","egg_2"},
welcome={"welcome_voc"},
}
local function getVoice(str) local function getVoice(str)
local L=voiceBank[str] local L=bank[str]
local n=1 local n=1
while L[n]:isPlaying()do while L[n]:isPlaying()do
n=n+1 n=n+1
@@ -17,6 +59,18 @@ local function getVoice(str)
return L[n] return L[n]
--load voice with string --load voice with string
end end
function VOC.loadOne(_)
local N=VOC.name[_]
for i=1,#VOC.list[N]do
local V=VOC.list[N][i]
bank[V]={love.audio.newSource("VOICE/"..V..".ogg","static")}
end
end
function VOC.loadAll()
for i=1,#VOC.list do
VOC.loadOne(i)
end
end
function VOC.getFreeChannel() function VOC.getFreeChannel()
local i=#voiceQueue local i=#voiceQueue
for i=1,i do for i=1,i do
@@ -66,12 +120,12 @@ function VOC.play(s,chn)
if setting.voc>0 then if setting.voc>0 then
if chn then if chn then
local L=voiceQueue[chn] local L=voiceQueue[chn]
local _=voiceList[s] local _=VOC.list[s]
L[#L+1]=_[rnd(#_)] L[#L+1]=_[rnd(#_)]
L.s=1 L.s=1
--添加到queue[chn] --添加到queue[chn]
else else
voiceQueue[VOC.getFreeChannel()]={s=1,voiceList[s][rnd(#voiceList[s])]} voiceQueue[VOC.getFreeChannel()]={s=1,VOC.list[s][rnd(#VOC.list[s])]}
--自动创建空轨/播放 --自动创建空轨/播放
end end
end end

View File

@@ -14,19 +14,20 @@ local gameEnv0={
quickR=true,swap=true, quickR=true,swap=true,
ghost=true,center=true, ghost=true,center=true,
smooth=false,grid=false, smooth=false,grid=false,
bagLine=false,
text=true, text=true,
lockFX=3,dropFX=3, lockFX=3,dropFX=3,
shakeFX=3, shakeFX=3,
_20G=false,bone=false,
drop=60,lock=60, drop=60,lock=60,
wait=0,fall=0, wait=0,fall=0,
next=6,hold=true, _20G=false,bone=false,
oncehold=true, next=6,
hold=true,oncehold=true,
ospin=true, ospin=true,
sequence="bag7", sequence="bag",bag={1,2,3,4,5,6,7},
face=NULL, freshMethod=NULL,
skin=NULL, face=NULL,skin=NULL,
pushSpeed=3, pushSpeed=3,
block=true, block=true,
@@ -63,7 +64,7 @@ local initCenterY={22,22,22,22,22,22.5,21.5}--1 added
local CCblockID={4,3,5,6,1,2,0} local CCblockID={4,3,5,6,1,2,0}
local scs=require("parts/spinCenters") local scs=require("parts/spinCenters")
local kickList=require("parts/kickList") local kickList=require("parts/kickList")
local finesseCtrlPar={ local finesseList={
[1]={ [1]={
{1,2,1,0,1,2,2,1}, {1,2,1,0,1,2,2,1},
{2,2,2,1,1,2,3,2,2}, {2,2,2,1,1,2,3,2,2},
@@ -81,17 +82,18 @@ local finesseCtrlPar={
{1,2,1,0,1,2,1}, {1,2,1,0,1,2,1},
{2,2,2,2,1,1,2,2,2,2}, {2,2,2,2,1,1,2,2,2,2},
},--I },--I
}--SZI逆态视为顺态 }
finesseCtrlPar[2]=finesseCtrlPar[1]--SZ算法相同 finesseList[1][3],finesseList[1][4],finesseList[7][3],finesseList[7][4]=finesseList[1][1],finesseList[1][2],finesseList[7][1],finesseList[7][2]--SZI逆态视为顺态
finesseCtrlPar[4]=finesseCtrlPar[3]--JLT算法相同 finesseList[2]=finesseList[1]--SZ算法相同
finesseCtrlPar[5]=finesseCtrlPar[3]--JLT算法相同 finesseList[4]=finesseList[3]--JLT算法相同
finesseList[5]=finesseList[3]--JLT算法相同
local CCblockID={4,3,5,6,1,2,0} local CCblockID={4,3,5,6,1,2,0}
local freshPrepare={ local freshPrepare={
none=NULL, none=NULL,
bag7=function(P) bag=function(P)
local bag={1,2,3,4,5,6,7} local bag0,bag=P.gameEnv.bag,{}
::L::P:getNext(rem(bag,rnd(#bag))) for i=1,#bag0 do bag[i]=bag0[i]end
if bag[1]then goto L end repeat P:getNext(rem(bag,rnd(#bag)))until not bag[1]
end, end,
his4=function(P) his4=function(P)
P.his={rnd(7),rnd(7),rnd(7),rnd(7)} P.his={rnd(7),rnd(7),rnd(7),rnd(7)}
@@ -109,29 +111,18 @@ local freshPrepare={
P:getNext(rnd(7)) P:getNext(rnd(7))
for i=1,5 do for i=1,5 do
local i local i
::L::i=rnd(7) repeat i=rnd(7)until i~=P.next[#P.next].id
if i==P.next[#P.next].id then goto L end
P:getNext(i) P:getNext(i)
end end
end, end,
drought1=function(P)
local bag={1,2,3,3,4,4,5,5,6,6}
::L::P:getNext(rem(bag,rnd(#bag)))
if bag[1]then goto L end
end,
drought2=function(P)
local bag={1,1,1,2,2,2,6,6,3,4,5,7}
::L::P:getNext(rem(bag,rnd(#bag)))
if bag[1]then goto L end
end,
} }
local freshMethod={ local freshMethod={
none=NULL, none=NULL,
bag7=function(P) bag=function(P)
if #P.next<6 then if #P.next<6 then
local bag={1,2,3,4,5,6,7} local bag0,bag=P.gameEnv.bag,{}
::L::P:getNext(rem(bag,rnd(#bag))) for i=1,#bag0 do bag[i]=bag0[i]end
if bag[1]then goto L end repeat P:getNext(rem(bag,rnd(#bag)))until not bag[1]
end end
end, end,
his4=function(P) his4=function(P)
@@ -151,33 +142,11 @@ local freshMethod={
if #P.next<6 then if #P.next<6 then
for i=1,3 do for i=1,3 do
local i local i
::L::i=rnd(7) repeat i=rnd(7)until i~=P.next[#P.next].id
if i==P.next[#P.next].id then goto L end
P:getNext(i) P:getNext(i)
end end
end end
end, end,
drought1=function(P)
if #P.next<6 then
local bag={1,2,3,4,5,6}
::L::P:getNext(rem(bag,rnd(#bag)))
if bag[1]then goto L end
end
end,
drought2=function(P)
if #P.next<6 then
local i=rnd(18)
P:getNext(
i<=4 and 1 or
i<=8 and 2 or
i<=12 and 6 or
i<=14 and 3 or
i<=16 and 4 or
i==17 and 5 or
7
)
end
end,
} }
local spinName={"zspin","sspin","lspin","jspin","tspin","ospin","ispin"} local spinName={"zspin","sspin","lspin","jspin","tspin","ospin","ispin"}
local clearName={"single","double","triple"} local clearName={"single","double","triple"}
@@ -262,6 +231,7 @@ local function Pdraw_norm(P)
end end
gc.translate(0,dy) gc.translate(0,dy)
end--Field with falling animation end--Field with falling animation
for i=1,#P.lockFX do for i=1,#P.lockFX do
_=P.lockFX[i] _=P.lockFX[i]
if _[3]<.5 then if _[3]<.5 then
@@ -272,6 +242,7 @@ local function Pdraw_norm(P)
gc.rectangle("fill",_[1]+30,_[2],60*_[3]-60,30) gc.rectangle("fill",_[1]+30,_[2],60*_[3]-60,30)
end end
end--lockFX end--lockFX
for i=1,#P.dropFX do for i=1,#P.dropFX do
_=P.dropFX[i] _=P.dropFX[i]
gc.setColor(1,1,1,_[1]*.12) gc.setColor(1,1,1,_[1]*.12)
@@ -281,6 +252,7 @@ local function Pdraw_norm(P)
end end
end end
end--dropFX end--dropFX
if P.waiting==-1 then if P.waiting==-1 then
if P.gameEnv.ghost then if P.gameEnv.ghost then
gc.setColor(1,1,1,.3) gc.setColor(1,1,1,.3)
@@ -290,24 +262,8 @@ local function Pdraw_norm(P)
end end
end end end end
end--Ghost end--Ghost
-- local dy=setting.smooth and(P.y_img~=P.curY and or 1)^4*30 or 0
local dy local dy=P.gameEnv.smooth and P.y_img~=P.curY and (min(P.dropDelay,1e99)/P.gameEnv.drop-1)*30 or 0
if P.gameEnv.smooth then
if P.y_img~=P.curY then
dy=(min(P.dropDelay,1e99)/P.gameEnv.drop-1)*30
else
dy=0
end
--[[
if P.y_img~=P.curY then
dy=(min(P.dropDelay,8e98)/P.gameEnv.drop)^4*30
else
dy=(min(P.lockDelay,8e98)/P.gameEnv.lock)^(P.gameEnv._20G and 3 or 7)*30
end
]]
else
dy=0
end
gc.translate(0,-dy) gc.translate(0,-dy)
local trans=P.lockDelay/P.gameEnv.lock local trans=P.lockDelay/P.gameEnv.lock
if P.gameEnv.block then if P.gameEnv.block then
@@ -396,7 +352,7 @@ local function Pdraw_norm(P)
gc.setBlendMode("alpha") gc.setBlendMode("alpha")
if P.gameEnv.hold then if P.gameEnv.hold then
mText(drawableText.hold,-81,-10) mText(drawableText.hold,-81,-15)
if P.holded then gc.setColor(.6,.5,.5)end if P.holded then gc.setColor(.6,.5,.5)end
local B=P.hd.bk local B=P.hd.bk
for i=1,#B do for j=1,#B[1]do for i=1,#B do for j=1,#B[1]do
@@ -405,11 +361,11 @@ local function Pdraw_norm(P)
end end
end end end end
end--Hold end--Hold
gc.setColor(1,1,1) gc.setColor(1,1,1)
mText(drawableText.next,381,-10) mText(drawableText.next,381,-15)
local N=1 local N=1
::L:: while N<=P.gameEnv.next and P.next[N]do
if N<=P.gameEnv.next and P.next[N]then
local b,c=P.next[N].bk,P.next[N].color local b,c=P.next[N].bk,P.next[N].color
for i=1,#b do for j=1,#b[1] do for i=1,#b do for j=1,#b[1] do
if b[i][j]then if b[i][j]then
@@ -417,9 +373,20 @@ local function Pdraw_norm(P)
end end
end end end end
N=N+1 N=N+1
goto L
end end
--Next --Next(s)
if P.gameEnv.bagLine then
local L=P.gameEnv.bagLen
local C=-P.pieceCount%L--phase
gc.setColor(.5,.5,.5)
for i=C,N-1,L do
local y=72*i+36
gc.line(320,y,442,y)
end
end
--BagLine(s)
gc.setColor(.8,.8,.8) gc.setColor(.8,.8,.8)
gc.draw(drawableText.modeName,-135,-65) gc.draw(drawableText.modeName,-135,-65)
gc.draw(drawableText.levelName,437-drawableText.levelName:getWidth(),-65) gc.draw(drawableText.levelName,437-drawableText.levelName:getWidth(),-65)
@@ -1168,7 +1135,7 @@ local OspinList={
{323,6,0,-1,-1,2},{332,6,0,-2,-1,2},{322,6,0,-1,-2,2},--O {323,6,0,-1,-1,2},{332,6,0,-2,-1,2},{322,6,0,-1,-2,2},--O
}--{key,id,dir,dx,dy,freeLv(0=unmovable,1=↔Unmvb,2=free)} }--{key,id,dir,dx,dy,freeLv(0=unmovable,1=↔Unmvb,2=free)}
function player.spin(P,d,ifpre) function player.spin(P,d,ifpre)
if P.cur.id==6 then--O-spin!Ohhhhhhhhhhhhhhhhhhhhhhhhhh if P.cur.id==6 then
if P.human then if P.human then
SFX.play("rotate",nil,getBlockPosition(P)) SFX.play("rotate",nil,getBlockPosition(P))
end end
@@ -1276,6 +1243,7 @@ function player.hold(P,ifpre)
if P.cur.id==0 then if P.cur.id==0 then
P.cur=rem(P.next,1) P.cur=rem(P.next,1)
P:newNext() P:newNext()
P.pieceCount=P.pieceCount+1
if P.AI_mode=="CC"then BOT.addNext(P.AI_bot,CCblockID[P.next[P.AIdata.next].id])end if P.AI_mode=="CC"then BOT.addNext(P.AI_bot,CCblockID[P.next[P.AIdata.next].id])end
end end
P:resetBlock() P:resetBlock()
@@ -1302,6 +1270,7 @@ function player.popNext(P)--pop next queue to hand
P.cur=rem(P.next,1) P.cur=rem(P.next,1)
P:newNext() P:newNext()
P.pieceCount=P.pieceCount+1
if P.AI_mode=="CC"then BOT.addNext(P.AI_bot,CCblockID[P.next[P.AIdata.next].id])end if P.AI_mode=="CC"then BOT.addNext(P.AI_bot,CCblockID[P.next[P.AIdata.next].id])end
local _=P.keyPressing local _=P.keyPressing
if _[8]and P.gameEnv.hold and P.gameEnv.ihs then if _[8]and P.gameEnv.hold and P.gameEnv.ihs then
@@ -1483,12 +1452,7 @@ function player.drop(P)--Place piece
if dospin then P.ctrlCount=P.ctrlCount-2 end--对无遮挡spin宽松两步 if dospin then P.ctrlCount=P.ctrlCount-2 end--对无遮挡spin宽松两步
local id=P.cur.id local id=P.cur.id
local dir=P.dir+1 local dir=P.dir+1
if id<3 or id==7 then local d=P.ctrlCount-finesseList[id][dir][P.curX]if d>=2 then P:fineError(2)elseif d>0 then P:fineError(d)end --非最简
if dir>2 then
dir=dir-2
end
end--SZI的逆态视为顺态
local d=P.ctrlCount-finesseCtrlPar[id][dir][P.curX]if d>=2 then P:fineError(2)elseif d>0 then P:fineError(d)end --非最简
end end
if cc>0 then if cc>0 then
@@ -1554,7 +1518,7 @@ function player.drop(P)--Place piece
atk=atk*.5 atk=atk*.5
sendTime=sendTime+60 sendTime=sendTime+60
cscore=cscore*.6 cscore=cscore*.6
P.b2b=P.b2b+b2bPoint[cc]*.5 P.b2b=P.b2b+b2bPoint[cc]*.4
if P.human then if P.human then
VOC.play("mini",CHN) VOC.play("mini",CHN)
end end
@@ -1579,7 +1543,7 @@ function player.drop(P)--Place piece
end end
end end
sendTime=sendTime+25*cmb sendTime=sendTime+25*cmb
if cmb>2 then if cmb>1 then
atk=atk+(comboAtk[cmb]or 2) atk=atk+(comboAtk[cmb]or 2)
P:showText(text.cmb[min(cmb,20)],0,25,15+min(cmb,25)*3,cmb<10 and"appear"or"flicker") P:showText(text.cmb[min(cmb,20)],0,25,15+min(cmb,25)*3,cmb<10 and"appear"or"flicker")
cscore=cscore+min(20*cmb,300)*cc cscore=cscore+min(20*cmb,300)*cc
@@ -1587,7 +1551,7 @@ function player.drop(P)--Place piece
if clear then if clear then
if #P.field==0 then if #P.field==0 then
P:showText(text.PC,0,-80,50,"flicker") P:showText(text.PC,0,-80,50,"flicker")
atk=atk^.5+min(6+STAT.pc,10) atk=atk^.5+min(6+STAT.pc,12)
exblock=exblock+2 exblock=exblock+2
sendTime=sendTime+120 sendTime=sendTime+120
if STAT.row+cc>4 then if STAT.row+cc>4 then
@@ -1597,7 +1561,6 @@ function player.drop(P)--Place piece
cscore=cscore+626 cscore=cscore+626
end end
STAT.pc=STAT.pc+1 STAT.pc=STAT.pc+1
P.lastClear=P.cur.id*10+5
if P.human then if P.human then
SFX.play("clear") SFX.play("clear")
VOC.play("pc",CHN) VOC.play("pc",CHN)
@@ -1612,16 +1575,11 @@ function player.drop(P)--Place piece
P.lastClear=cc P.lastClear=cc
if P.human then if P.human then
SFX.play("clear") SFX.play("clear")
VOC.play("pc",CHN)
end end
end end
P.lastClear=P.cur.id*10+5
end end
if P.human then
SFX.play(clear_n[cc])
SFX.play(ren_n[min(cmb,11)])
if cmb>14 then SFX.play("ren_mega",(cmb-10)*.1)end
VIB(cc+1)
end
if P.b2b>1200 then P.b2b=1200 end if P.b2b>1200 then P.b2b=1200 end
if modeEnv.royaleMode then if modeEnv.royaleMode then
@@ -1631,9 +1589,9 @@ function player.drop(P)--Place piece
exblock=exblock+reDef[i] exblock=exblock+reDef[i]
end end
end--Bonus atk/def when focused end--Bonus atk/def when focused
local send=atk
send=atk
if send>0 then if send>0 then
--ATK statistics
if exblock then exblock=int(exblock*(1+P.strength*.25))end if exblock then exblock=int(exblock*(1+P.strength*.25))end
send=int(send*(1+P.strength*.25)) send=int(send*(1+P.strength*.25))
--Badge Buff --Badge Buff
@@ -1689,6 +1647,13 @@ function player.drop(P)--Place piece
if P.human and send>3 then SFX.play("emit",min(send,8)*.1)end if P.human and send>3 then SFX.play("emit",min(send,8)*.1)end
end end
end end
if P.human then
SFX.play(clear_n[cc])
SFX.play(ren_n[min(cmb,11)])
if cmb>14 then SFX.play("ren_mega",(cmb-10)*.1)end
VIB(cc+1)
end
else else
cmb=0 cmb=0
local dropScore=10 local dropScore=10
@@ -1724,6 +1689,19 @@ function player.drop(P)--Place piece
end end
P.combo=cmb P.combo=cmb
STAT.score=STAT.score+int(cscore)
STAT.piece=STAT.piece+1
STAT.row=STAT.row+cc
if atk>0 then
STAT.atk=STAT.atk+int(atk)
if send>0 then
STAT.send=STAT.send+int(send)
end
end
if gbcc>0 then
STAT.dig=STAT.dig+gbcc
STAT.digatk=STAT.digatk+atk*gbcc/cc
end
local n=P.cur.name local n=P.cur.name
if dospin then if dospin then
_=STAT.spin[n] _[cc+1]=_[cc+1]+1--spin[1/2/3/4/5/6/7][0/1/2/3] _=STAT.spin[n] _[cc+1]=_[cc+1]+1--spin[1/2/3/4/5/6/7][0/1/2/3]
@@ -1734,17 +1712,8 @@ function player.drop(P)--Place piece
_=STAT.clear_S _[cc]=_[cc]+1--clear[1/2/3/4] _=STAT.clear_S _[cc]=_[cc]+1--clear[1/2/3/4]
_=STAT.clear_B _[n]=_[n]+1--clear[1/2/3/4/5/6/7] _=STAT.clear_B _[n]=_[n]+1--clear[1/2/3/4/5/6/7]
end end
STAT.score=STAT.score+int(cscore)
STAT.piece=STAT.piece+1
STAT.row=STAT.row+cc
STAT.atk=STAT.atk+atk
STAT.send=STAT.send+send
if gbcc>0 then
STAT.dig=STAT.dig+gbcc
STAT.digatk=STAT.digatk+atk*gbcc/cc
end
--Update stat --Update stat
_=P.gameEnv.dropPiece _=P.gameEnv.dropPiece
if _ then _(P)end if _ then _(P)end
--drop event --drop event
@@ -1781,16 +1750,21 @@ local function gameOver()
R=R(P)--new rank R=R(P)--new rank
if R then if R then
local r=modeRanks[M.id]--old rank local r=modeRanks[M.id]--old rank
local _
if R>r then if R>r then
modeRanks[M.id]=R modeRanks[M.id]=R
if r==0 then _=true
for i=1,#M.unlock do end
local m=M.unlock[i] if r==0 then
if not modeRanks[m]then for i=1,#M.unlock do
modeRanks[m]=modes[m].score and 0 or 6 local m=M.unlock[i]
end if not modeRanks[m]then
modeRanks[m]=modes[m].score and 0 or 6
_=true
end end
end end
end
if _ then
FILE.saveUnlock() FILE.saveUnlock()
end end
local D=M.score(P) local D=M.score(P)
@@ -1953,6 +1927,7 @@ function player.act.moveLeft(P,auto)
if P.keyPressing[9]then if P.keyPressing[9]then
if P.gameEnv.swap then if P.gameEnv.swap then
P:changeAtkMode(1) P:changeAtkMode(1)
P.keyPressing[1]=false
end end
elseif P.control and P.waiting==-1 then elseif P.control and P.waiting==-1 then
if not P:ifoverlap(P.cur.bk,P.curX-1,P.curY)then if not P:ifoverlap(P.cur.bk,P.curX-1,P.curY)then
@@ -1978,6 +1953,7 @@ function player.act.moveRight(P,auto)
if P.keyPressing[9]then if P.keyPressing[9]then
if P.gameEnv.swap then if P.gameEnv.swap then
P:changeAtkMode(2) P:changeAtkMode(2)
P.keyPressing[2]=false
end end
elseif P.control and P.waiting==-1 then elseif P.control and P.waiting==-1 then
if not P:ifoverlap(P.cur.bk,P.curX+1,P.curY)then if not P:ifoverlap(P.cur.bk,P.curX+1,P.curY)then
@@ -2232,7 +2208,8 @@ function newDemoPlayer(id,x,y,size)
next=6,hold=true, next=6,hold=true,
oncehold=true, oncehold=true,
ospin=true, ospin=true,
sequence="bag7", sequence="bag",
bag={1,2,3,4,5,6,7},
face={0,0,0,0,0,0,0}, face={0,0,0,0,0,0,0},
skin=setting.skin, skin=setting.skin,
@@ -2265,9 +2242,10 @@ function newDemoPlayer(id,x,y,size)
P.spinLast,P.lastClear=false,nil P.spinLast,P.lastClear=false,nil
P.spinSeq=0 P.spinSeq=0
P.ctrlCount=0 P.ctrlCount=0
P.pieceCount=0
freshPrepare.bag7(P) freshPrepare.bag(P)
P.newNext=freshMethod.bag7 P.newNext=freshMethod.bag
P.human=false P.human=false
P.AI_mode="CC" P.AI_mode="CC"
@@ -2275,14 +2253,14 @@ function newDemoPlayer(id,x,y,size)
P.AI_needFresh=false P.AI_needFresh=false
P.AI_keys={} P.AI_keys={}
P.AI_delay,P.AI_delay0=3,3 P.AI_delay,P.AI_delay0=3,3
P.AIdata={next=5,hold=true,_20G=false,bag7=true,node=80000} P.AIdata={next=5,hold=true,_20G=false,bag=true,node=80000}
if not BOT then P.AI_mode="9S"end if not BOT then P.AI_mode="9S"end
if P.AI_mode=="CC"then if P.AI_mode=="CC"then
P.RS=kickList.AIRS P.RS=kickList.AIRS
local opt,wei=BOT.getConf() local opt,wei=BOT.getConf()
BOT.setHold(opt,P.AIdata.hold) BOT.setHold(opt,P.AIdata.hold)
BOT.set20G(opt,P.AIdata._20G) BOT.set20G(opt,P.AIdata._20G)
BOT.setBag(opt,P.AIdata.bag7) BOT.setBag(opt,P.AIdata.bag)
BOT.setNode(opt,P.AIdata.node) BOT.setNode(opt,P.AIdata.node)
P.AI_bot=BOT.new(opt,wei) P.AI_bot=BOT.new(opt,wei)
BOT.free(opt)BOT.free(wei) BOT.free(opt)BOT.free(wei)
@@ -2310,7 +2288,7 @@ function newDemoPlayer(id,x,y,size)
P:popNext() P:popNext()
end end
function newPlayer(id,x,y,size,AIdata) function newAIPlayer(id,x,y,size,AIdata)
players[id]={id=id} players[id]={id=id}
local P=players[id] local P=players[id]
P.life=0 P.life=0
@@ -2387,51 +2365,56 @@ function newPlayer(id,x,y,size,AIdata)
P.dropDelay,P.lockDelay=ENV.drop,ENV.lock P.dropDelay,P.lockDelay=ENV.drop,ENV.lock
P.freshTime=0 P.freshTime=0
P.spinLast,P.lastClear=false,nil P.spinLast,P.lastClear=false,nil
P.spinSeq=0--for Ospin,each digit mean a spin P.spinSeq=0--for Ospin, each digit mean a spin
P.ctrlCount=0--key press time,for finesse check P.ctrlCount=0--key press time, for finesse check
P.pieceCount=0--count pieces from next, for drawing bagline
freshPrepare[ENV.sequence](P) if type(ENV.sequence)=="string"then
P.newNext=freshMethod[ENV.sequence] freshPrepare[ENV.sequence](P)
P.newNext=freshMethod[ENV.sequence]
if AIdata then
ENV.face={0,0,0,0,0,0,0}
ENV.skin={1,5,2,8,10,3,7}
P.human=false
P.AI_mode=AIdata.type
P.AI_stage=1
P.AI_needFresh=false
P.AI_keys={}
P.AI_delay=min(int(ENV.drop*.8),2*AIdata.delta)
P.AI_delay0=AIdata.delta
P.AIdata={
next=AIdata.next,
hold=AIdata.hold,
_20G=ENV._20G,
bag7=AIdata.bag7=="bag7",
node=AIdata.node,
}
if not BOT then P.AI_mode="9S"end
if P.AI_mode=="CC"then
P.RS=kickList.AIRS
local opt,wei=BOT.getConf()
BOT.setHold(opt,P.AIdata.hold)
BOT.set20G(opt,P.AIdata._20G)
BOT.setBag(opt,P.AIdata.bag7)
BOT.setNode(opt,P.AIdata.node)
P.AI_bot=BOT.new(opt,wei)
BOT.free(opt)BOT.free(wei)
for i=1,AIdata.next do
BOT.addNext(P.AI_bot,CCblockID[P.next[i].id])
end
elseif P.AI_mode=="9S"then
P.RS=kickList.TRS
P.AI_keys={}
end
else else
P.human=true assert(type(ENV.sequence)=="function"and type(ENV.freshMethod)=="function","wrong sequence generator code")
ENV.sequence(P)
P.newNext=ENV.freshMethod
end
if ENV.sequence~="bag"then
ENV.bagLine=false
else
ENV.bagLen=#ENV.bag
end
ENV.face={0,0,0,0,0,0,0}
ENV.skin={1,5,2,8,10,3,7}
P.human=false
P.AI_mode=AIdata.type
P.AI_stage=1
P.AI_needFresh=false
P.AI_keys={}
P.AI_delay=min(int(ENV.drop*.8),2*AIdata.delta)
P.AI_delay0=AIdata.delta
P.AIdata={
next=AIdata.next,
hold=AIdata.hold,
_20G=ENV._20G,
bag=AIdata.bag=="bag",
node=AIdata.node,
}
if not BOT then P.AI_mode="9S"end
if P.AI_mode=="CC"then
P.RS=kickList.AIRS
local opt,wei=BOT.getConf()
BOT.setHold(opt,P.AIdata.hold)
BOT.set20G(opt,P.AIdata._20G)
BOT.setBag(opt,P.AIdata.bag)
BOT.setNode(opt,P.AIdata.node)
P.AI_bot=BOT.new(opt,wei)
BOT.free(opt)BOT.free(wei)
for i=1,AIdata.next do
BOT.addNext(P.AI_bot,CCblockID[P.next[i].id])
end
elseif P.AI_mode=="9S"then
P.RS=kickList.TRS P.RS=kickList.TRS
players.human=players.human+1 P.AI_keys={}
ENV.next=min(ENV.next,setting.maxNext)
end end
if P.small then if P.small then
@@ -2454,6 +2437,126 @@ function newPlayer(id,x,y,size,AIdata)
P.keepVisible=ENV.visible=="show" P.keepVisible=ENV.visible=="show"
P.keyPressing={}for i=1,12 do P.keyPressing[i]=false end
P.movDir,P.moving,P.downing=0,0,0--last move key,DAS charging,downDAS charging
P.waiting,P.falling=-1,-1
P.clearingRow,P.clearedRow={},{}--clearing animation height,cleared row mark
P.combo,P.b2b=0,0
P.garbageBeneath=0
P.fieldBeneath=0
P.score1,P.b2b1=0,0
P.dropFX,P.lockFX={},{}
P.bonus={}--texts
P.endCounter=0--used after gameover
P.result=nil--string:"WIN"/"K.O."
end
function newPlayer(id,x,y,size)
players[id]={id=id}
local P=players[id]
P.life=0
for k,v in next,player do P[k]=v end--inherit functions of player class
players.alive[#players.alive+1]=P
P.x,P.y,P.size=x,y,size or 1
P.fieldOff={x=0,y=0,vx=0,vy=0}--for shake FX
P.keyRec=true--if calculate keySpeed
P.centerX,P.centerY=P.x+300*P.size,P.y+370*P.size
P.absFieldX=P.x+150*P.size
P.absFieldY=P.y+60*P.size
P.draw=Pdraw_norm
P.dust=clearDust:clone()
P.dust:start()
P.bonus={}--texts
P.update=Pupdate_alive
P.alive=true
P.control=false
P.timing=false
P.stat={
time=0,score=0,
key=0,rotate=0,hold=0,
extraPiece=0,extraRate=0,
piece=0,row=0,dig=0,
atk=0,digatk=0,send=0,recv=0,pend=0,
clear_S={0,0,0,0},clear_B={0,0,0,0,0,0,0},
spin_S={0,0,0,0},spin_B={0,0,0,0,0,0,0},
clear={{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}},
spin={{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}},
pc=0,hpc=0,b2b=0,b3b=0,
}--Current gamestat
P.modeData={point=0,event=0,counter=0}--data use by mode
P.keyTime={}for i=1,10 do P.keyTime[i]=-1e5 end P.keySpeed=0
P.dropTime={}for i=1,10 do P.dropTime[i]=-1e5 end P.dropSpeed=0
P.field,P.visTime={},{}
P.atkBuffer={sum=0}
P.badge,P.strength=0,0
P.atkMode,P.swappingAtkMode=1,20
P.atker,P.atking,P.lastRecv={}
--Royale-related
P.gameEnv={}--Current game setting environment
local ENV=P.gameEnv
for k,v in next,gameEnv0 do
if modeEnv[k]~=nil then
v=modeEnv[k]
elseif setting[k]~=nil then
v=setting[k]
end
ENV[k]=v
end--load game settings
ENV.das=max(ENV.das,ENV.mindas)
ENV.arr=max(ENV.arr,ENV.minarr)
ENV.sdarr=max(ENV.sdarr,ENV.minsdarr)
P.cur={bk={{}},id=0,color=0,name=0}--shape,shapeID,colorID,nameID
P.sc,P.dir,P.r,P.c={0,0},0,0,0--IMG.spinCenter,direction,row,col
P.curX,P.curY,P.y_img=0,0,0--x,y,ghostY
P.hd={bk={{}},id=0,color=0,name=0}
P.holded=false
P.next={}
P.dropDelay,P.lockDelay=ENV.drop,ENV.lock
P.freshTime=0
P.spinLast,P.lastClear=false,nil
P.spinSeq=0--for Ospin, each digit mean a spin
P.ctrlCount=0--key press time, for finesse check
P.pieceCount=0--count pieces from next, for drawing bagline
if type(ENV.sequence)=="string"then
freshPrepare[ENV.sequence](P)
P.newNext=freshMethod[ENV.sequence]
else
assert(type(ENV.sequence)=="function"and type(ENV.freshMethod)=="function","wrong sequence generator code")
ENV.sequence(P)
P.newNext=ENV.freshMethod
end
if ENV.sequence~="bag"then
ENV.bagLine=false
else
ENV.bagLen=#ENV.bag
end
P.human=true
P.RS=kickList.TRS
players.human=players.human+1
ENV.next=min(ENV.next,setting.maxNext)
if ENV.lockFX==0 then ENV.lockFX=nil end
if ENV.dropFX==0 then ENV.dropFX=nil end
if ENV.shakeFX==0 then ENV.shakeFX=nil end
P.color={}
for _=1,7 do
P.color[_]=skin.libColor[ENV.skin[_]]
end
P.showTime=visible_opt[ENV.visible]
P.keepVisible=ENV.visible=="show"
P.keyPressing={}for i=1,12 do P.keyPressing[i]=false end P.keyPressing={}for i=1,12 do P.keyPressing[i]=false end
P.movDir,P.moving,P.downing=0,0,0--last move key,DAS charging,downDAS charging P.movDir,P.moving,P.downing=0,0,0--last move key,DAS charging,downDAS charging
P.waiting,P.falling=-1,-1 P.waiting,P.falling=-1,-1

111
scene.lua
View File

@@ -1,4 +1,6 @@
local int,log,max,format=math.floor,math.log,math.max,string.format local int,log=math.floor,math.log
local sin,cos=math.sin,math.cos
local max,format=math.max,string.format
local SCN={ local SCN={
cur="load",--Current scene cur="load",--Current scene
swapping=false,--ifSwapping swapping=false,--ifSwapping
@@ -17,10 +19,10 @@ local sceneInit={
sceneTemp={ sceneTemp={
phase=1,--Loading stage phase=1,--Loading stage
cur=1,--Counter cur=1,--Counter
tar=#voiceName,--Loading bar lenth(current) tar=#VOC.name,--Loading bar lenth(current)
tip=require("parts/getTip"), tip=require("parts/getTip"),
list={ list={
#voiceName, #VOC.name,
#BGM.list, #BGM.list,
#SFX.list, #SFX.list,
IMG.getCount(), IMG.getCount(),
@@ -103,79 +105,56 @@ local sceneInit={
format("%d(%d) %.2fLPM",S.row,S.dig,S.row/S.time*60), format("%d(%d) %.2fLPM",S.row,S.dig,S.row/S.time*60),
format("%d(%d)",S.atk,S.digatk), format("%d(%d)",S.atk,S.digatk),
format("%d(%d-%d)",S.pend,S.recv,S.recv-S.pend), format("%d(%d-%d)",S.pend,S.recv,S.recv-S.pend),
format("%d/%d/%d/%d",S.clear_S[1],S.clear_S[2],S.clear_S[3],S.clear_S[4]),
format("(%d)/%d/%d/%d",S.spin_S[1],S.spin_S[2],S.spin_S[3],S.spin_S[4]),
format("%d(+%d)/%d(%d)",S.b2b,S.b3b,S.pc,S.hpc), format("%d(+%d)/%d(%d)",S.b2b,S.b3b,S.pc,S.hpc),
format("%d[%.2f%%]",S.extraPiece,100*max(1-S.extraRate/S.piece,0)), format("%d[%.2f%%]",S.extraPiece,100*max(1-S.extraRate/S.piece,0)),
}, },
--从上开始,顺时针90° --从上开始,顺时针90°
radar1={ radar={
S.piece/2.5/S.time*60, --L'PM (S.recv-S.pend+S.dig)/S.time*60,--DefPM
S.atk/S.time*60, --APM (S.recv-S.pend)/S.time*60, --OffPM
S.recv/S.time*60, --RPM S.atk/S.time*60, --AtkPM
S.atk/S.row, --APL S.send/S.time*60, --SendPM
},--外层表观数据 S.piece/S.time*24, --LinePM
radar2={ S.dig/S.time*60, --DigPM
S.dig/S.time*60, --DigPM },
S.digatk/S.time*60, --APM(dig) val={1/80,1/40,1/60,1/60,1/100,1/40},
S.pend/S.time*60, --PendPM
S.digatk/S.dig, --APL(dig)
},--内层挖掘相关数据
V1={1/100,1/60,1/70,1/2},
V2={1/100,1/60,1/70,1/2},
timing=org=="play", timing=org=="play",
} }
local _=sceneTemp local _=sceneTemp
local A,B=_.radar1,_.radar2 local A,B=_.radar,_.val
local C,D=_.V1,_.V2 for i=1,6 do
for i=1,4 do B[i]=B[i]*A[i]if B[i]>1.26 then B[i]=1.26+(B[i]-1.26)*.26 end
if A[i]~=A[i]then A[i]=0 end end--normalize vals
if B[i]~=B[i]then B[i]=0 end for i=1,6 do
C[i]=C[i]*A[i]if C[i]>1.26 then C[i]=1.26+((C[i]-1.26)+1)^.5-1 end A[i]=format("%.2f",A[i])..text.radarData[i]
D[i]=D[i]*B[i]if D[i]>1.26 then D[i]=1.26+((D[i]-1.26)+1)^.5-1 end
end--normalize V1/V2
A[1]=format("%.1fAPM",A[1])
A[2]=format("%.1fL'PM",A[2])
A[3]=format("%.1fRPM",A[3])
A[4]=format("%.1fAPL",A[4])
local s
if C[1]<.5 and C[2]<.5 and C[3]<.5 and C[4]<.5 and D[1]<.5 and D[2]<.5 and D[3]<.5 and D[4]<.5 then
_.color1={.4,.9,.5}
_.color2={.7,.5,.3}
s=1.26
--Vegetable
elseif C[1]>1 or C[2]>1 or C[3]>1 or C[4]>1 or D[1]>1 or D[2]>1 or D[3]>1 or D[4]>1 then
_.color1={1,.3,.3}
_.color2={.4,.2,0}
s=.8
--Diao
else
_.color1={.4,.7,.9}
_.color2={.6,.3,.26}
s=1
--NORMAL
end end
sceneTemp.scale=s local f=1
s=s*126 for i=1,6 do
_.standard={ if B[i]>.5 then f=2 end
0,-s, if B[i]>1 then f=3 break end
s,0, end
0,s, if f==1 then _.color,f={.4,.9,.5},1.25 --Vegetable
-s,0, elseif f==2 then _.color,f={.4,.7,.9},1 --Normal
} elseif f==3 then _.color,f={1,.3,.3},.626 --Diao
sceneTemp.V1={ end
0, -C[1]*s, A={
C[2]*s,0, 120*.5*f, 120*3^.5*.5*f,
0, C[3]*s, 120*-.5*f, 120*3^.5*.5*f,
-C[4]*s,0, 120*-1*f, 120*0*f,
0, -C[1]*s 120*-.5*f, 120*-3^.5*.5*f,
} 120*.5*f, 120*-3^.5*.5*f,
sceneTemp.V2={ 120*1*f, 120*0*f,
0, -D[1]*s,
D[2]*s,0,
0, D[3]*s,
-D[4]*s,0,
0, -D[1]*s
} }
_.scale=f
_.standard=A
for i=6,1,-1 do
B[2*i-1],B[2*i]=B[i]*A[2*i-1],B[i]*A[2*i]
end
_.val=B
end, end,
setting_game=function() setting_game=function()
BG.set("space") BG.set("space")

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