diff --git a/parts/eventsets/classic_e.lua b/parts/eventsets/classic_e.lua index 483149bad..c512237c9 100644 --- a/parts/eventsets/classic_e.lua +++ b/parts/eventsets/classic_e.lua @@ -1,4 +1,5 @@ -local gc_setColor=love.graphics.setColor +local gc=love.graphics +local gc_setColor=gc.setColor return{ das=16,arr=6, sddas=6,sdarr=6, @@ -14,6 +15,25 @@ return{ noTele=true, keyCancel={5,6}, mesDisp=function(P) + gc.setLineWidth(2) + gc_setColor(.98,.98,.98,.8) + gc.rectangle('line',-100,0,200,100,4) + gc_setColor(.98,.98,.98,.4) + gc.rectangle('fill',-100+2,0+2,200-4,100-4,2) + gc_setColor(1,1,1,1) + setFont(40) + mStr("Score",0,0) + gc_setColor(.6,.6,.6,1) + local score_str="" + local score_length=math.floor(math.log10(P.modeData.gameScore)) + for i=7,0,-1 do + score_str=score_str..(math.floor(P.modeData.gameScore/(math.pow(10,i)))%10) + end + for i=1,8 do + if score_length==-i+8 then gc_setColor(1,1,1,1) end + mStr(string.sub(score_str,i,i),25*i-113,50) + end + gc_setColor(1,1,1,1) setFont(75) local r=P.modeData.target/10 mStr(r<10 and 9 or r<30 and r or("%02x"):format(r*10-300),63,210) @@ -33,6 +53,7 @@ return{ end, task=function(P) P.modeData.target=10 + P.modeData.gameScore=0 end, hook_drop=function(P) local D=P.modeData @@ -52,11 +73,17 @@ return{ SFX.play('warn_2',.7) elseif D.target==200 then P:win('finish') - return else SFX.play('reach') end - D.target=D.target+10 + D.target=D.target>=200 and 200 or D.target+10 + local r=D.target/10 + local l=#P.clearedRow + P.modeData.gameScore=P.modeData.gameScore+((l==1 and 40 or l==2 and 100 or l==3 and 300 or 1200)*((r<10 and 9 or r<30 and r)+1)) + elseif #P.clearedRow>0 then + local r=D.target/10 + local l=#P.clearedRow + P.modeData.gameScore=P.modeData.gameScore+((l==1 and 40 or l==2 and 100 or l==3 and 300 or 1200)*((r<10 and 9 or r<30 and r)+1)) end end, } diff --git a/parts/eventsets/classic_h.lua b/parts/eventsets/classic_h.lua index 2667ae0af..9538c2832 100644 --- a/parts/eventsets/classic_h.lua +++ b/parts/eventsets/classic_h.lua @@ -1,4 +1,5 @@ -local gc_setColor=love.graphics.setColor +local gc=love.graphics +local gc_setColor=gc.setColor return{ das=16,arr=6, sddas=3,sdarr=3, @@ -14,6 +15,25 @@ return{ noTele=true, keyCancel={5,6}, mesDisp=function(P) + gc.setLineWidth(2) + gc_setColor(.98,.98,.98,.8) + gc.rectangle('line',-100,0,200,100,4) + gc_setColor(.98,.98,.98,.4) + gc.rectangle('fill',-100+2,0+2,200-4,100-4,2) + gc_setColor(1,1,1,1) + setFont(40) + mStr("Score",0,0) + gc_setColor(.6,.6,.6,1) + local score_str="" + local score_length=math.floor(math.log10(P.modeData.gameScore)) + for i=7,0,-1 do + score_str=score_str..(math.floor(P.modeData.gameScore/(math.pow(10,i)))%10) + end + for i=1,8 do + if score_length==-i+8 then gc_setColor(1,1,1,1) end + mStr(string.sub(score_str,i,i),25*i-113,50) + end + gc_setColor(1,1,1,1) setFont(75) local r=P.modeData.target/10 mStr(r<11 and 18 or r<22 and r+8 or("%02x"):format(r*10-220),63,210) @@ -33,6 +53,7 @@ return{ end, task=function(P) P.modeData.target=10 + P.modeData.gameScore=0 end, hook_drop=function(P) local D=P.modeData @@ -44,11 +65,17 @@ return{ SFX.play('warn_1') elseif D.target==200 then P:win('finish') - return else SFX.play('reach') end - D.target=D.target+10 + D.target=D.target>=200 and 200 or D.target+10 + local r=D.target/10 + local l=#P.clearedRow + P.modeData.gameScore=P.modeData.gameScore+((l==1 and 40 or l==2 and 100 or l==3 and 300 or 1200)*((r<11 and 18 or r<22 and r+8)+1)) + elseif #P.clearedRow>0 then + local r=D.target/10 + local l=#P.clearedRow + P.modeData.gameScore=P.modeData.gameScore+((l==1 and 40 or l==2 and 100 or l==3 and 300 or 1200)*((r<11 and 18 or r<22 and r+8)+1)) end end, } diff --git a/parts/eventsets/classic_l.lua b/parts/eventsets/classic_l.lua index 3a815da16..a9994c19a 100644 --- a/parts/eventsets/classic_l.lua +++ b/parts/eventsets/classic_l.lua @@ -1,20 +1,39 @@ -local gc_setColor=love.graphics.setColor +local gc=love.graphics +local gc_setColor=gc.setColor return{ das=16,arr=6, sddas=2,sdarr=2, irs=false,ims=false, - drop=2, - lock=2, - wait=10, - fall=25, + drop=2,lock=2, + wait=10,fall=25, freshLimit=0, fieldH=19, - nextCount=1,holdCount=0, + nextCount=1, + holdCount=0, RS='Classic', sequence='rnd', noTele=true, keyCancel={5,6}, mesDisp=function(P) + gc.setLineWidth(2) + gc_setColor(.98,.98,.98,.8) + gc.rectangle('line',-100,0,200,100,4) + gc_setColor(.98,.98,.98,.4) + gc.rectangle('fill',-100+2,0+2,200-4,100-4,2) + gc_setColor(1,1,1,1) + setFont(40) + mStr("Score",0,0) + gc_setColor(.6,.6,.6,1) + local score_str="" + local score_length=math.floor(math.log10(P.modeData.gameScore)) + for i=7,0,-1 do + score_str=score_str..(math.floor(P.modeData.gameScore/(math.pow(10,i)))%10) + end + for i=1,8 do + if score_length==-i+8 then gc_setColor(1,1,1,1) end + mStr(string.sub(score_str,i,i),25*i-113,50) + end + gc_setColor(1,1,1,1) setFont(75) local r=P.modeData.target/10 mStr(r<11 and 19 or r<22 and r+9 or("%02x"):format(r*10-220),63,210) @@ -34,6 +53,7 @@ return{ end, task=function(P) P.modeData.target=10 + P.modeData.gameScore=0 end, hook_drop=function(P) local D=P.modeData @@ -43,9 +63,19 @@ return{ if D.target==200 then P.gameEnv.drop,P.gameEnv.lock=1,1 SFX.play('blip_1') + elseif D.target==300 then + P:win('finish') else SFX.play('reach') end + D.target=D.target>=300 and 300 or D.target+10 + local r=D.target/10 + local l=#P.clearedRow + P.modeData.gameScore=P.modeData.gameScore+((l==1 and 40 or l==2 and 100 or l==3 and 300 or 1200)*((r<11 and 19 or r<22 and r+9)+1)) + elseif #P.clearedRow>0 then + local r=D.target/10 + local l=#P.clearedRow + P.modeData.gameScore=P.modeData.gameScore+((l==1 and 40 or l==2 and 100 or l==3 and 300 or 1200)*((r<11 and 19 or r<22 and r+9)+1)) end end, } \ No newline at end of file diff --git a/parts/eventsets/classic_u.lua b/parts/eventsets/classic_u.lua index 31edc74f3..2a75aa151 100644 --- a/parts/eventsets/classic_u.lua +++ b/parts/eventsets/classic_u.lua @@ -1,4 +1,5 @@ -local gc_setColor=love.graphics.setColor +local gc=love.graphics +local gc_setColor=gc.setColor return{ das=16,arr=6, sddas=1,sdarr=1, @@ -14,6 +15,25 @@ return{ noTele=true, keyCancel={5,6}, mesDisp=function(P) + gc.setLineWidth(2) + gc_setColor(.98,.98,.98,.8) + gc.rectangle('line',-100,0,200,100,4) + gc_setColor(.98,.98,.98,.4) + gc.rectangle('fill',-100+2,0+2,200-4,100-4,2) + gc_setColor(1,1,1,1) + setFont(40) + mStr("Score",0,0) + gc_setColor(.6,.6,.6,1) + local score_str="" + local score_length=math.floor(math.log10(P.modeData.gameScore)) + for i=7,0,-1 do + score_str=score_str..(math.floor(P.modeData.gameScore/(math.pow(10,i)))%10) + end + for i=1,8 do + if score_length==-i+8 then gc_setColor(1,1,1,1) end + mStr(string.sub(score_str,i,i),25*i-113,50) + end + gc_setColor(1,1,1,1) setFont(75) local r=P.modeData.target/10 mStr(r==1 and 29 or("%02x"):format(r*10-20),63,210) @@ -33,6 +53,7 @@ return{ end, task=function(P) P.modeData.target=10 + P.modeData.gameScore=0 end, hook_drop=function(P) local D=P.modeData @@ -40,10 +61,17 @@ return{ if P.stat.row>=D.target then if D.target==100 then P:win('finish') - return end D.target=D.target+10 SFX.play('reach') + D.target=D.target>=100 and 100 or D.target+10 + local r=D.target/10 + local l=#P.clearedRow + P.modeData.gameScore=P.modeData.gameScore+((l==1 and 40 or l==2 and 100 or l==3 and 300 or 1200)*(r+30)) + elseif #P.clearedRow>0 then + local r=D.target/10 + local l=#P.clearedRow + P.modeData.gameScore=P.modeData.gameScore+((l==1 and 40 or l==2 and 100 or l==3 and 300 or 1200)*(r+30)) end end, } diff --git a/parts/modes/classic_e.lua b/parts/modes/classic_e.lua index 1caf50c56..1dc507dbd 100644 --- a/parts/modes/classic_e.lua +++ b/parts/modes/classic_e.lua @@ -7,7 +7,7 @@ return{ bg='rgb',bgm='1980s', }, slowMark=true, - score=function(P)return{P.stat.score,P.stat.row}end, + score=function(P)return{P.modeData.gameScore,P.stat.row}end, scoreDisp=function(D)return D[1].." "..D[2].." Lines"end, comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]b[1]or a[1]==b[1]and a[2]