mesDisp加入eventSet

eventSet中的规则不在覆盖,而是全部同时生效
调整部分模式的信息显示
自定义游戏可以选择部分eventSet
整理代码
警告:可能部分模式有问题,需要测试
This commit is contained in:
MrZ626
2021-08-28 04:01:58 +08:00
parent 5963db479e
commit 7f7f7e752e
141 changed files with 628 additions and 767 deletions

View File

@@ -1,4 +1,11 @@
return{
mesDisp=function(P)
setFont(55)
mStr(P.modeData.wave,63,200)
mStr("22",63,320)
mText(drawableText.wave,63,260)
mText(drawableText.nextWave,63,380)
end,
task=function(P)
while true do
YIELD()

View File

@@ -1,4 +1,11 @@
return{
mesDisp=function(P)
setFont(55)
mStr(P.modeData.wave,63,200)
mStr(20+4*math.min(math.floor(P.modeData.wave/10),2),63,320)
mText(drawableText.wave,63,260)
mText(drawableText.nextWave,63,380)
end,
task=function(P)
while true do
YIELD()

View File

@@ -0,0 +1,13 @@
local gc=love.graphics
return{
mesDisp=function(P)
mText(drawableText.techrash,63,420)
setFont(75)
mStr(P.stat.clears[4],63,340)
PLY.draw.applyField(P)
gc.setColor(1,1,1,.1)
gc.draw(IMG.electric,0,106,0,2.6)
PLY.draw.cancelField(P)
end,
}

View File

@@ -1,6 +1,13 @@
local rem=table.remove
return{
mesDisp=function(P)
setFont(45)
mStr(P.combo,63,310)
mStr(P.modeData.maxCombo,63,400)
mText(drawableText.combo,63,358)
mText(drawableText.maxcmb,63,450)
end,
task=function(P)
local F=P.field
for i=1,24 do

View File

@@ -1,4 +1,11 @@
return{
mesDisp=function(P)
setFont(45)
mStr(("%.1f"):format(P.stat.atk),63,190)
mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310)
mText(drawableText.atk,63,243)
mText(drawableText.eff,63,363)
end,
dropPiece=function(P)
if P.stat.atk>=100 then
P:win('finish')

View File

@@ -1,4 +1,11 @@
return{
mesDisp=function(P)
setFont(55)
local r=10-P.stat.row
if r<0 then r=0 end
mStr(r,63,265)
PLY.draw.drawTargetLine(P,r)
end,
dropPiece=function(P)
if P.stat.row>=10 then
P:win('finish')

View File

@@ -1,4 +1,11 @@
return{
mesDisp=function(P)
setFont(55)
local r=100-P.stat.row
if r<0 then r=0 end
mStr(r,63,265)
PLY.draw.drawTargetLine(P,r)
end,
dropPiece=function(P)
if P.stat.row>=100 then
P:win('finish')

View File

@@ -1,4 +1,11 @@
return{
mesDisp=function(P)
setFont(55)
local r=1000-P.stat.row
if r<0 then r=0 end
mStr(r,63,265)
PLY.draw.drawTargetLine(P,r)
end,
dropPiece=function(P)
if P.stat.row>=1000 then
P:win('finish')

View File

@@ -1,4 +1,11 @@
return{
mesDisp=function(P)
setFont(55)
local r=20-P.stat.row
if r<0 then r=0 end
mStr(r,63,265)
PLY.draw.drawTargetLine(P,r)
end,
dropPiece=function(P)
if P.stat.row>=20 then
P:win('finish')

View File

@@ -1,4 +1,11 @@
return{
mesDisp=function(P)
setFont(55)
local r=200-P.stat.row
if r<0 then r=0 end
mStr(r,63,265)
PLY.draw.drawTargetLine(P,r)
end,
dropPiece=function(P)
if P.stat.row>=200 then
P:win('finish')

View File

@@ -1,4 +1,11 @@
return{
mesDisp=function(P)
setFont(55)
local r=40-P.stat.row
if r<0 then r=0 end
mStr(r,63,265)
PLY.draw.drawTargetLine(P,r)
end,
dropPiece=function(P)
if P.stat.row>=40 then
P:win('finish')

View File

@@ -1,4 +1,11 @@
return{
mesDisp=function(P)
setFont(55)
local r=400-P.stat.row
if r<0 then r=0 end
mStr(r,63,265)
PLY.draw.drawTargetLine(P,r)
end,
dropPiece=function(P)
if P.stat.row>=400 then
P:win('finish')

View File

@@ -1,5 +1,30 @@
return{
mesDisp=function(P)
setFont(75)
local r=P.modeData.target*.1
mStr(r<11 and 18 or r<22 and r+8 or("%02x"):format(r*10-220),63,210)
mText(drawableText.speedLV,63,290)
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
end,
task=function(P)
P.gameEnv.das=16
P.gameEnv.arr=6
P.gameEnv.sddas=2
P.gameEnv.sdarr=2
P.gameEnv.irs=false
P.gameEnv.ims=false
P.gameEnv.drop=3
P.gameEnv.lock=3
P.gameEnv.wait=10
P.gameEnv.fall=25
P.gameEnv.fieldH=19
P.gameEnv.nextCount=1
P.gameEnv.holdCount=0
P.gameEnv.RS='Classic'
P.gameEnv.sequence='rnd'
P.gameEnv.noTele=true
P.gameEnv.keyCancel={5,6}
P.modeData.target=10
end,
dropPiece=function(P)

View File

@@ -1,4 +1,11 @@
return{
mesDisp=function(P)
setFont(55)
mStr(P.modeData.wave,63,200)
mStr(P.modeData.rpm,63,320)
mText(drawableText.wave,63,260)
mText(drawableText.rpm,63,380)
end,
task=function(P)
while true do
YIELD()

View File

@@ -1,4 +1,11 @@
return{
mesDisp=function(P)
setFont(55)
mStr(P.modeData.wave,63,200)
mStr(P.modeData.rpm,63,320)
mText(drawableText.wave,63,260)
mText(drawableText.rpm,63,380)
end,
task=function(P)
while true do
YIELD()

View File

@@ -1,4 +1,9 @@
return{
mesDisp=function(P)
setFont(60)
mStr(P.modeData.wave,63,310)
mText(drawableText.wave,63,375)
end,
task=function(P)
while true do
YIELD()

View File

@@ -1,4 +1,9 @@
return{
mesDisp=function(P)
setFont(60)
mStr(P.modeData.wave,63,310)
mText(drawableText.wave,63,375)
end,
task=function(P)
while true do
YIELD()

View File

@@ -1,6 +1,10 @@
local dropSpeed={50,40,30,25,20,15,12,9,7,5,4,3,2,1,1,.5,.5,.25,.25}
return{
mesDisp=function(P)
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
PLY.draw.drawTargetLine(P,200-P.stat.row)
end,
task=function(P)
P.gameEnv.drop=60
P.gameEnv.wait=8

View File

@@ -1,5 +1,9 @@
return
{
mesDisp=function(P)
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
PLY.draw.drawTargetLine(P,200-P.stat.row)
end,
task=function(P)
P.gameEnv.drop=.5
P.gameEnv.wait=8

View File

@@ -2,6 +2,10 @@ local dropSpeed={50,40,30,24,18,14,10,8,6,5,4,3,2,1,1,.5,.5,.25,.25}
return
{
mesDisp=function(P)
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
PLY.draw.drawTargetLine(P,200-P.stat.row)
end,
task=function(P)
P.gameEnv.drop=60
P.gameEnv.wait=8

View File

@@ -2,6 +2,17 @@ local sectionName={"D","C","B","A","A+","S-","S","S+","S+","SS","SS","U","U","X"
local passPoint=16
return{
mesDisp=function(P)
mText(drawableText.line,63,300)
mText(drawableText.techrash,63,420)
mText(drawableText.grade,63,170)
setFont(55)
mStr(P.modeData.rankName,63,110)
setFont(20)
mStr(("%.1f"):format(P.modeData.rankPoint/10),63,198)
setFont(75)
mStr(P.stat.clears[4],63,340)
end,
dropPiece=function(P)
if P.modeData.rankPoint<140-passPoint then--If Less then X
local R=#P.clearedRow

View File

@@ -1,4 +1,7 @@
return{
mesDisp=function(P)
PLY.draw.drawProgress(P.modeData.pt,P.modeData.target)
end,
dropPiece=function(P)
local D=P.modeData

View File

@@ -3,6 +3,9 @@ local death_wait={10,9, 8, 7,6, 6,6,5,5,4}
local death_fall={10,9, 8, 7,6, 6,5,5,4,4}
return{
mesDisp=function(P)
PLY.draw.drawProgress(P.modeData.pt,P.modeData.target)
end,
dropPiece=function(P)
local D=P.modeData

View File

@@ -3,6 +3,9 @@ local rush_wait={12,10, 9, 8, 7}
local rush_fall={18,16,14,13,12}
return{
mesDisp=function(P)
PLY.draw.drawProgress(P.modeData.pt,P.modeData.target)
end,
dropPiece=function(P)
local D=P.modeData

View File

@@ -3,6 +3,9 @@ local rush_wait={12,11,11,10,10, 10,10, 9, 9, 9}
local rush_fall={18,16,14,13,12, 12,11,11,10,10}
return{
mesDisp=function(P)
PLY.draw.drawProgress(P.modeData.pt,P.modeData.target)
end,
dropPiece=function(P)
local D=P.modeData

View File

@@ -1,5 +1,8 @@
return
{
mesDisp=function(P)
PLY.draw.drawProgress(P.modeData.pt,P.modeData.target)
end,
dropPiece=function(P)
local p=P.modeData.pt+P.lastPiece.row
if p>=P.modeData.target then

View File

@@ -3,6 +3,9 @@ local death_wait={10, 9, 8,7,6, 6,5,4,4,3}
local death_fall={10, 9, 8,7,6, 5,5,4,3,3}
return{
mesDisp=function(P)
PLY.draw.drawProgress(P.modeData.pt,P.modeData.target)
end,
dropPiece=function(P)
local D=P.modeData

View File

@@ -1,4 +1,9 @@
return{
mesDisp=function(P)
setFont(60)
mStr(P.stat.pc,63,340)
mText(drawableText.pc,63,410)
end,
task=function(P)
P.gameEnv.heightLimit=4
end,

View File

@@ -41,6 +41,11 @@ local function check(P)
end
end
return{
mesDisp=function(P)
setFont(60)
mStr(P.stat.pc,63,340)
mText(drawableText.pc,63,410)
end,
dropPiece=check,
task=check,
}

View File

@@ -32,6 +32,11 @@ local function check(P)
end
end
return{
mesDisp=function(P)
setFont(60)
mStr(P.stat.pc,63,340)
mText(drawableText.pc,63,410)
end,
dropPiece=check,
task=check,
}

View File

@@ -1,6 +1,21 @@
local gc=love.graphics
local dropSpeed={[0]=40,33,27,20,16,12,11,10,9,8,7,6,5,4,3,3,2,2,1,1}
return{
mesDisp=function(P)
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
setFont(30)
mStr(P.modeData.bpm,63,178)
gc.setLineWidth(4)
gc.circle('line',63,200,30)
local beat=P.modeData.counter/P.modeData.beatFrame
gc.setColor(1,1,1,1-beat)
gc.setLineWidth(3)
gc.circle('line',63,200,30+45*beat)
end,
dropPiece=function(P)
if P.stat.row>=P.modeData.target then
if P.modeData.target==200 then

View File

@@ -1,6 +1,21 @@
local gc=love.graphics
local dropSpeed={[0]=30,26,23,20,17,14,12,10,8,6,5,4,3,2,1,1,.5,.5,.25,.25}
return{
mesDisp=function(P)
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
setFont(30)
mStr(P.modeData.bpm,63,178)
gc.setLineWidth(4)
gc.circle('line',63,200,30)
local beat=P.modeData.counter/P.modeData.beatFrame
gc.setColor(1,1,1,1-beat)
gc.setLineWidth(3)
gc.circle('line',63,200,30+45*beat)
end,
dropPiece=function(P)
if P.stat.row>=P.modeData.target then
if P.modeData.target==200 then

View File

@@ -1,4 +1,20 @@
local gc=love.graphics
return{
mesDisp=function(P)
PLY.draw.drawProgress(P.stat.row,P.modeData.target)
setFont(30)
mStr(P.modeData.bpm,63,178)
gc.setLineWidth(4)
gc.circle('line',63,200,30)
local beat=P.modeData.counter/P.modeData.beatFrame
gc.setColor(1,1,1,1-beat)
gc.setLineWidth(3)
gc.circle('line',63,200,30+45*beat)
end,
dropPiece=function(P)
if P.stat.row>=P.modeData.target then
if P.modeData.target==200 then

View File

@@ -1,4 +1,9 @@
return{
mesDisp=function(P)
setFont(60)
mStr(P.modeData.wave,63,310)
mText(drawableText.wave,63,375)
end,
task=function(P)
while true do
YIELD()

View File

@@ -1,4 +1,9 @@
return{
mesDisp=function(P)
setFont(60)
mStr(P.modeData.wave,63,310)
mText(drawableText.wave,63,375)
end,
task=function(P)
while true do
YIELD()

View File

@@ -1,4 +1,9 @@
return{
mesDisp=function(P)
setFont(60)
mStr(P.modeData.wave,63,310)
mText(drawableText.wave,63,375)
end,
task=function(P)
while true do
YIELD()

View File

@@ -1,4 +1,9 @@
return{
mesDisp=function(P)
setFont(60)
mStr(P.modeData.wave,63,310)
mText(drawableText.wave,63,375)
end,
task=function(P)
while true do
YIELD()

View File

@@ -1,4 +1,9 @@
return{
mesDisp=function(P)
setFont(60)
mStr(P.modeData.wave,63,310)
mText(drawableText.wave,63,375)
end,
task=function(P)
while true do
YIELD()

20
parts/eventsets/tsd_e.lua Normal file
View File

@@ -0,0 +1,20 @@
return{
mesDisp=function(P)
setFont(60)
mStr(P.modeData.tsd,63,250)
mText(drawableText.tsd,63,315)
end,
dropPiece=function(P)
local C=P.lastPiece
if C.row>0 then
if C.id==5 and C.row==2 and C.spin then
P.modeData.tsd=P.modeData.tsd+1
else
P:lose()
end
end
end,
task=function(P)
P.modeData.history={}
end,
}

View File

@@ -1,4 +1,18 @@
local gc=love.graphics
return{
mesDisp=function(P)
setFont(60)
mStr(P.modeData.tsd,63,250)
mText(drawableText.tsd,63,315)
local L=P.modeData.history
if L[1]and L[1]==L[2]and L[1]==L[3]then
PLY.draw.applyField(P)
gc.setColor(1,.5,.5,.2)
gc.rectangle('fill',30*L[1]-30,0,30,600)
PLY.draw.cancelField(P)
end
end,
dropPiece=function(P)
local C=P.lastPiece
if C.row>0 then

View File

@@ -1,4 +1,18 @@
local gc=love.graphics
return{
mesDisp=function(P)
setFont(60)
mStr(P.modeData.tsd,63,250)
mText(drawableText.tsd,63,315)
PLY.draw.applyField(P)
local L=P.modeData.history
for i=1,#L do
gc.setColor(1,.5,.5,.3-i*.05)
gc.rectangle('fill',30*L[i]-30,0,30,600)
end
PLY.draw.cancelField(P)
end,
dropPiece=function(P)
local C=P.lastPiece
if C.row>0 then

View File

@@ -1,6 +1,14 @@
local gc=love.graphics
local warnTime={60,90,105,115,116,117,118,119,120}
return{
mesDisp=function(P)
gc.setLineWidth(2)
gc.rectangle('line',55,110,32,402)
local T=P.stat.frame/60/120
gc.setColor(2*T,2-2*T,.2)
gc.rectangle('fill',56,511,30,(T-1)*400)
end,
task=function(P)
P.modeData.stage=1
while true do