增加极简连击系统并且极简点数计算系统大改

This commit is contained in:
MrZ626
2020-10-11 01:28:53 +08:00
parent 243a663ee6
commit 30fffd6908
5 changed files with 145 additions and 48 deletions

View File

@@ -119,9 +119,9 @@ local langList={
"接收/抵消/上涨:",
"挖掘/挖掘攻击:",
"效率/挖掘效率:",
"多余操作/极简率:",
"满贯/大满贯:",
"全/半清:",
"多余操作/最大极简连锁/极简率:",
},
help={
"既然你能玩到这个游戏,应该也不需要什么帮助吧?",
@@ -671,9 +671,9 @@ local langList={
"接收/抵消/上涨:",
"挖掘/挖掘攻击:",
"效率/挖掘效率:",
"多余操作/极简率:",
"满贯/大满贯:",
"全/半清:",
"多余操作/最大极简连锁/极简率:",
},
help={
"既然你能玩到这个游戏,应该也不需要什么帮助吧?",
@@ -1218,9 +1218,9 @@ local langList={
"Recv./Res./Asc.:",
"Dig/Dig Atk.:",
"Eff./Dig Eff.:",
"Finesse Errs./Rate:",
"B2B/B3B:",
"PC/HPC:",
"FnsErrs./maxFnsChain/FnsRate:",
},
help={
"Now you can play this, you are probabaly do not need \"help\"?",
@@ -1765,9 +1765,9 @@ local langList={
"←/-↓/↑:",
"↓/↓→.:",
"^%/↓^%:",
"!#!X/%:",
"^/^^:",
"#<>#/<>:",
"!#!X/^#^/%:",
},
help={
"□□□□~~~, ?_?x ?",
@@ -2312,9 +2312,9 @@ local langList={
"接收/抵消/上涨:",
"挖掘/挖掘攻击:",
"效率/挖掘效率:",
"多余操作/极简率:",
"牛逼/很牛逼:",
"消光/消半截:",
"多余操作/最大极简连击/极简率:",
},
help={
"既然你能玩到这个游戏,应该也不需要什么帮助吧?",

View File

@@ -195,6 +195,9 @@ do
S.spin[i][6]=0
end
end
if S.extraRate then
S.finesseRate=S.extraRate
end
if S.version~=gameVersion then
S.version=gameVersion
newVersionLaunch=true

View File

@@ -64,7 +64,7 @@ stat={
version=gameVersion,
run=0,game=0,time=0,
key=0,rotate=0,hold=0,
extraPiece=0,extraRate=0,
extraPiece=0,finesseRate=0,
piece=0,row=0,dig=0,
atk=0,digatk=0,
send=0,recv=0,pend=0,off=0,

View File

@@ -360,6 +360,9 @@ local function Pupdate_alive(P,dt)
else
P.b2b1=max(P.b2b1*.95+P.b2b*.05-.6,P.b2b)
end
if P.finesseComboTime>0 then
P.finesseComboTime=P.finesseComboTime-1
end
updateLine(P,dt)
updateFXs(P,dt)
updateTasks(P)
@@ -382,7 +385,12 @@ local function Pupdate_dead(P,dt)
P.clearingRow={}
end
end
if P.b2b1>0 then P.b2b1=max(0,P.b2b1*.92-1)end
if P.b2b1>0 then
P.b2b1=max(0,P.b2b1*.92-1)
end
if P.finesseComboTime>0 then
P.finesseComboTime=P.finesseComboTime-1
end
updateLine(P,dt)
updateFXs(P,dt)
updateTasks(P)
@@ -783,7 +791,38 @@ local Pdraw_norm do
gc.setColor(1,1,1)
gc.draw(drawableText.bpm,540,550)
gc.draw(drawableText.kpm,494,643)
--Score & Time
setFont(25)
gc.setColor(0,0,0,.3)
gc.print(P.score1,18,579)
gc.print(format("%.2f",P.stat.time),18,609)
gc.setColor(color.lYellow)gc.print(P.score1,20,580)
gc.setColor(color.sky)gc.print(format("%.2f",P.stat.time),20,610)
--FinesseCombo
if P.finesseCombo>2 then
_=P.finesseComboTime
local T=P.finesseCombo.."x"
if _>0 then
gc.setColor(1,1,1,_*.2)
gc.print(T,20,640)
gc.setColor(1,1,1,1.2-_*.1)
gc.push("transform")
gc.translate(20,670)
gc.scale(1+_*.08)
gc.print(T,0,-30)
gc.pop()
else
gc.setColor(1,1,1)
gc.print(T,20,640)
end
end
--Lives
if P.life>0 then
gc.setColor(1,1,1)
if P.life<=3 then
for i=1,P.life do
gc.draw(IMG.lifeIcon,450+25*i,665,nil,.8)
@@ -795,8 +834,6 @@ local Pdraw_norm do
gc.print(P.life,517,665)
end
end
mStr(format("%.2f",P.stat.time),69,588)--Time
mStr(P.score1,69,630)--Score
--Display Ys
-- gc.setLineWidth(6)
@@ -1028,12 +1065,13 @@ local function getNewStatTable()
local T={
time=0,score=0,
key=0,rotate=0,hold=0,
extraPiece=0,extraRate=0,
extraPiece=0,finesseRate=0,
piece=0,row=0,dig=0,
atk=0,digatk=0,
send=0,recv=0,pend=0,off=0,
clear={},clears={},spin={},spins={},
pc=0,hpc=0,b2b=0,b3b=0,
maxCombo=0,maxFinesseCombo=0,
}
for i=1,25 do
T.clear[i]={0,0,0,0,0}
@@ -1409,11 +1447,13 @@ local function newEmptyPlayer(id,x,y,size)
P.waiting,P.falling=-1,-1
P.clearingRow,P.clearedRow={},{}--Clearing animation height,cleared row mark
P.combo,P.b2b=0,0
P.finesseCombo=0
P.garbageBeneath=0
P.fieldBeneath=0
P.fieldUp=0
P.score1,P.b2b1=0,0
P.finesseComboTime=0
P.dropFX,P.moveFX,P.lockFX,P.clearFX={},{},{},{}
P.tasks={}--Tasks
P.bonus={}--Texts
@@ -1579,20 +1619,6 @@ function player.ckfull(P,i)
for j=1,10 do if P.field[i][j]<=0 then return end end
return true
end
function player.finesseError(P,rate)
P.stat.extraPiece=P.stat.extraPiece+1
P.stat.extraRate=P.stat.extraRate+rate
if P.gameEnv.fineKill then
P:lose()
end
if P.sound then
if P.gameEnv.fineKill then
SFX.play("finesseError_long",.6)
elseif setting.fine then
SFX.play("finesseError",.8)
end
end
end
function player.attack(P,R,send,time,...)
if setting.atkFX>0 then
P:createBeam(R,send,time,...)
@@ -1933,13 +1959,12 @@ function player.hold(P,ifpre)
if not(H or C)then return end
--Finesse check
if H and C and H.id==C.id and H.name==C.name or P.ctrlCount>1 then
P:finesseError(1)
if not(H and C and H.id==C.id and H.name==C.name or P.ctrlCount>1)then
P.ctrlCount=0
end
P.holded=P.gameEnv.oncehold
P.spinLast=false
P.ctrlCount=0
P.spinSeq=0
P.cur,P.hd=H,C--Swap hold
@@ -2253,15 +2278,38 @@ do--player.drop(P)--Place piece
end
--Finesse check (control)
local finePts
if not finesse then
if dospin then P.ctrlCount=P.ctrlCount-2 end--Allow 2 more step for roof-less spin
local id=CB.id
local d=P.ctrlCount-finesseList[id][P.dir+1][CX]
if d>=2 then
P:finesseError(2)
elseif d>0 then
P:finesseError(d)
finePts=d<=0 and 4 or max(3-d,0)
else
finePts=4
end
P.stat.finesseRate=P.stat.finesseRate+finePts
if finePts<4 then
P.stat.extraPiece=P.stat.extraPiece+1
if P.gameEnv.fineKill then
P:lose()
end
if P.sound then
if P.gameEnv.fineKill then
SFX.play("finesseError_long",.6)
elseif setting.fine then
SFX.play("finesseError",.8)
end
end
end
if finePts<2 then
P.finesseCombo=0
else
P.finesseCombo=P.finesseCombo+1
if P.finesseCombo>2 then
P.finesseComboTime=12
end
if P.sound then SFX.fieldPlay("lock",nil,P)end
end
if cc>0 then--If lines cleared, about 200 lines below
@@ -2536,9 +2584,13 @@ do--player.drop(P)--Place piece
if ENV.score then
P:showText(cscore,(P.curX+P.sc[2]-5.5)*30,(10-P.curY-P.sc[1])*30+P.fieldBeneath+P.fieldUp,int(8-120/(cscore+20))*5,"score",2)
end
--Update stat
STAT.score=STAT.score+cscore
STAT.piece=STAT.piece+1
STAT.row=STAT.row+cc
STAT.maxFinesseCombo=max(STAT.maxFinesseCombo,P.finesseCombo)
STAT.maxCombo=max(STAT.maxCombo,P.combo)
if atk>0 then
STAT.atk=STAT.atk+atk
if send>0 then
@@ -2552,8 +2604,6 @@ do--player.drop(P)--Place piece
STAT.dig=STAT.dig+gbcc
STAT.digatk=STAT.digatk+atk*gbcc/cc
end
--Update stat
local n=CB.name
if dospin then
_=STAT.spin[n] _[cc+1]=_[cc+1]+1--Spin[1~25][0~4]
@@ -2566,9 +2616,6 @@ do--player.drop(P)--Place piece
--Drop event
_=ENV.dropPiece
if _ then _(P)end
--Stereo SFX
if P.sound then SFX.fieldPlay("lock",nil,P)end
end
end
--------------------------</Methods>--------------------------

View File

@@ -2414,6 +2414,19 @@ do--play
end
end
do--pause
local ranks={
}
local rankColor={
Z=color.lYellow,
S=color.lGrey,
A=color.sky,
B=color.lGreen,
C=color.magenta,
D=color.dGreen,
E=color.red,
F=color.dRed,
}
function sceneInit.pause(org)
if
org=="setting_game"or
@@ -2422,7 +2435,8 @@ do--pause
then
TEXT.show(text.needRestart,640,440,50,"fly",.6)
end
local S=players[1].stat
local P=players[1]
local S=P.stat
sceneTemp={
timer=org=="play"and 0 or 50,
list={
@@ -2435,9 +2449,8 @@ do--pause
format("%d/%d/%d/%d",S.clears[1],S.clears[2],S.clears[3],S.clears[4]),
format("(%d)/%d/%d/%d",S.spins[1],S.spins[2],S.spins[3],S.spins[4]),
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/%dx/%.2f%%",S.extraPiece,S.maxFinesseCombo,S.finesseRate*25/S.piece),
},
--From right-down, 60 degree each
radar={
(S.off+S.dig)/S.time*60,--DefPM
@@ -2450,8 +2463,8 @@ do--pause
val={1/80,1/80,1/80,1/60,1/100,1/40},
timing=org=="play",
}
local _=sceneTemp
local A,B=_.radar,_.val
local S=sceneTemp
local A,B=S.radar,S.val
--Normalize Values
for i=1,6 do
@@ -2466,9 +2479,9 @@ do--pause
if B[i]>.5 then f=2 end
if B[i]>1 then f=3 break end
end
if f==1 then _.color,f={.4,.9,.5},1.25 --Vegetable
elseif f==2 then _.color,f={.4,.7,.9},1 --Normal
elseif f==3 then _.color,f={1,.3,.3},.626 --Diao
if f==1 then S.color,f={.4,.9,.5},1.25 --Vegetable
elseif f==2 then S.color,f={.4,.7,.9},1 --Normal
elseif f==3 then S.color,f={1,.3,.3},.626 --Diao
end
A={
120*.5*f, 120*3^.5*.5*f,
@@ -2478,13 +2491,34 @@ do--pause
120*.5*f, 120*-3^.5*.5*f,
120*1*f, 120*0*f,
}
_.scale=f
_.standard=A
S.scale=f
S.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
S.val=B
if P.result=="WIN"then
local acc=P.stat.finesseRate*.25/P.stat.piece
S.rank=
acc==1. and"Z"or
acc>.97 and"S"or
acc>.94 and"A"or
acc>.87 and"B"or
acc>.70 and"C"or
acc>.50 and"D"or
acc>.30 and"E"or
"F"
S.rankColor=rankColor[S.rank]
if acc==1 then
S.trophy="All Perfect"
S.trophyColor=color.yellow
elseif P.stat.maxFinesseCombo==P.stat.piece then
S.trophy="Full Combo"
S.trophyColor=color.lCyan
end
end
end
function sceneBack.pause()
love.keyboard.setKeyRepeat(true)
@@ -2527,6 +2561,7 @@ do--pause
local S=sceneTemp
local T=S.timer*.02
if T<1 or game.result then Pnt.play()end
--Dark BG
local _=T
if game.result then _=_*.7 end
@@ -2564,6 +2599,18 @@ do--pause
end
end
--rank & trophy
if S.rank then
setFont(60)
gc.setColor(S.rankColor[1],S.rankColor[2],S.rankColor[3],T)
gc.print(S.rank,420,635)
if S.trophy then
setFont(40)
gc.setColor(S.trophyColor[1],S.trophyColor[2],S.trophyColor[3],T*2-1)
gc.print(S.trophy,160-120*(1-T^.5),650)
end
end
--Radar Chart
if T>.5 and game.frame>180 then
T=T*2-1
@@ -3349,9 +3396,9 @@ do--stat
S.recv.." "..S.off.." "..S.pend,
S.dig.." "..int(S.digatk),
format("%.2f %.2f",S.atk/S.row,S.digatk/S.dig),
format("%d/%.3f%%",S.extraPiece,100*max(1-S.extraRate/S.piece,0)),
S.b2b.." "..S.b3b,
S.pc.." "..S.hpc,
format("%d/%.2f%%",S.extraPiece,S.finesseRate*25/S.piece),
},
}
for i=1,11 do