Files
Techmino/parts/eventsets/marathon_bfmax.lua
MrZ626 7ad386d28f 重构模式环境的dropPiece和task事件为更强大的自定义和未来联网任意模式做准备
整理出所有模式的这两个事件独立到一个文件夹并整理所有模式引用它们的方式
警告:很可能有错误,需要他人帮助测试
2021-08-26 23:49:20 +08:00

35 lines
1.1 KiB
Lua

local dropSpeed={50,40,30,25,20,15,12,9,7,5,4,3,2,1,1,.5,.5,.25,.25}
return{
task=function(P)
P.gameEnv.drop=60
P.gameEnv.wait=8
P.gameEnv.fall=20
P.modeData.target=10
end,
dropPiece=function(P)
local flag
local l=P.lastPiece
if P.combo>1 then flag=true;P:showText("2x",0,-220,40,'flicker',.3)end
if l.spin then flag=true;P:showText("spin",0,-180,40,'flicker',.3)end
if l.row>1 then flag=true;P:showText("1+",0,-140,40,'flicker',.3)end
if l.pc then flag=true;P:showText("PC",0,-100,40,'flicker',.3)end
if l.hpc then flag=true;P:showText("HPC",0,-100,40,'flicker',.3)end
if flag then
P:lose()
else
local T=P.modeData.target
if P.stat.row>=T then
if T==200 then
P:win('finish')
else
T=T+10
P.gameEnv.drop=dropSpeed[T/10]
P.modeData.target=T
SFX.play('reach')
end
end
end
end,
}