From 850a31d1721e4c16cafb67f7ef6c4f5431a6752a Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 25 Jul 2021 22:07:01 +0800 Subject: [PATCH] =?UTF-8?q?BRS=E5=9C=A8=E7=A8=8B=E5=BA=8F=E5=86=85?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E6=94=B9=E4=B8=BABiRS=EF=BC=88=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E5=92=8CBPS-RS=E6=AD=A7=E4=B9=89=EF=BC=89=20=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3BiRS=E4=B8=ADZ5=E5=92=8CS5=E7=9A=84180=E5=BA=A6?= =?UTF-8?q?=E8=BD=AC=E7=9A=84=E8=A1=A8=E4=BD=BF=E7=94=A8=E9=94=99=E8=AF=AF?= =?UTF-8?q?=20=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.lua | 2 +- parts/kickList.lua | 25 ++++++++++++------------- parts/scenes/setting_game.lua | 2 +- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/main.lua b/main.lua index 29d6f7b2..1f3f5c4d 100644 --- a/main.lua +++ b/main.lua @@ -267,7 +267,7 @@ do love.event.quit('restart') end if SETTING.ghostType=='greyCell'then SETTING.ghostType='grayCell'needSave=true end - if SETTING.RS=='ZRS'then SETTING.RS='BRS'needSave=true end + if SETTING.RS=='ZRS'or SETTING.RS=='BRS'then SETTING.RS='BiRS'needSave=true end if not SETTING.VKSkin then SETTING.VKSkin=1 end if type(SETTING.skinSet)=='number'then SETTING.skinSet='crystal_scf'end if not TABLE.find({8,10,13,17,22,29,37,47,62,80,100},SETTING.frameMul)then diff --git a/parts/kickList.lua b/parts/kickList.lua index e35ab998..fae7e34b 100644 --- a/parts/kickList.lua +++ b/parts/kickList.lua @@ -443,7 +443,7 @@ do for i=8,29 do SRS[i]=SRS[1]end end -local BRS +local BiRS do local R=vecStrConv{'+0+0','-1+0','-1-1','+0-1','-1+1','+1-1','+1+0','+0+1','+1+1','+0+2','-1+2','+1+2','-2+0','+2+0'} local L=vecStrConv{'+0+0','+1+0','+1-1','+0-1','+1+1','-1-1','-1+0','+0+1','-1+1','+0+2','+1+2','-1+2','+2+0','-2+0'} @@ -457,8 +457,8 @@ do {[02]=F,[20]=F,[13]=F,[31]=F},--O {[02]=F,[20]=F,[13]=R,[31]=L},--I - {[02]=L,[20]=R,[13]=R,[31]=L},--Z5 - {[02]=R,[20]=L,[13]=L,[31]=R},--S5 + {[02]=L,[20]=L,[13]=R,[31]=R},--Z5 + {[02]=R,[20]=R,[13]=L,[31]=L},--S5 {[02]=L,[20]=R,[13]=L,[31]=R},--P {[02]=R,[20]=L,[13]=R,[31]=L},--Q {[02]=R,[20]=L,[13]=L,[31]=R},--F @@ -487,7 +487,7 @@ do list[i][01]=a;list[i][10]=b;list[i][03]=b;list[i][30]=a list[i][12]=a;list[i][21]=b;list[i][32]=b;list[i][23]=a end - BRS=TABLE.new(function(P,d,ifpre) + BiRS=TABLE.new(function(P,d,ifpre) local C=P.cur local idir=(C.dir+d)%4 local kickList=list[C.id][C.dir*10+idir] @@ -498,18 +498,17 @@ do local pressing=P.keyPressing if pressing[1]and P:ifoverlap(C.bk,P.curX-1,P.curY)then dx=dx-1 end if pressing[2]and P:ifoverlap(C.bk,P.curX+1,P.curY)then dx=dx+1 end - if pressing[7]and P:ifoverlap(C.bk,P.curX,P.curY-1)then dy=-1 end + if pressing[7]and P:ifoverlap(C.bk,P.curX,P.curY-1)then dy= -1 end end while true do for test=1,#kickList do - local kick=kickList[test] + local fdx,fdy=kickList[test][1]+dx,kickList[test][2]+dy if - dx*(kick[1]+dx)>=0 and - math.abs(dx+kick[1])<=2 and - ((dx+kick[1])^2+(dy+kick[2])^2)<=5 and - (P.freshTime>0 or kick[2]+dy<=0) + dx*fdx>=0 and + fdx^2+fdy^2<=5 and + (P.freshTime>0 or fdy<=0) then - local x,y=ix+kick[1]+dx,iy+kick[2]+dy + local x,y=ix+fdx,iy+fdy if not P:ifoverlap(icb,x,y)then if P.gameEnv.moveFX and P.gameEnv.block then P:createMoveFX() @@ -522,7 +521,7 @@ do if not ifpre then P:freshBlock('move') end - if kick[2]+dy>0 and P.freshTime==t and P.curY~=P.imgY then + if fdy>0 and P.freshTime==t and P.curY~=P.imgY then P.freshTime=P.freshTime-1 end @@ -651,7 +650,7 @@ for i=1,29 do None[i]=noKickSet_180 end local RS={ TRS=TRS, SRS=SRS, - BRS=BRS, + BiRS=BiRS, ASC=ASC, ASCplus=ASCplus, C2=C2, diff --git a/parts/scenes/setting_game.lua b/parts/scenes/setting_game.lua index f7d12267..e31d166c 100644 --- a/parts/scenes/setting_game.lua +++ b/parts/scenes/setting_game.lua @@ -29,7 +29,7 @@ scene.widgetList={ WIDGET.newButton{name="key", x=640, y=220, w=320,h=80, color='lG',font=35,code=goScene'setting_key'}, WIDGET.newButton{name="touch", x=990, y=220, w=320,h=80, color='lB',font=35,code=goScene'setting_touch'}, WIDGET.newSlider{name="reTime", x=330, y=320, w=300,unit=10,disp=SETval("reTime"),code=SETsto("reTime"),show=function(S)return(.5+S.disp()*.25).."s"end}, - WIDGET.newSelector{name="RS", x=300, y=420, w=300,color='S',list={'TRS','SRS','BRS','ASC','ASCplus','C2','C2sym','Classic','None'},disp=SETval("RS"),code=SETsto("RS")}, + WIDGET.newSelector{name="RS", x=300, y=420, w=300,color='S',list={'TRS','SRS','BiRS','ASC','ASCplus','C2','C2sym','Classic','None'},disp=SETval("RS"),code=SETsto("RS")}, WIDGET.newButton{name="layout", x=250, y=540, w=200,h=70,font=35, code=goScene'setting_skin'}, WIDGET.newSwitch{name="autoPause", x=1060, y=350, disp=SETval("autoPause"), code=SETrev("autoPause")}, WIDGET.newSwitch{name="swap", x=1060, y=460, disp=SETval("swap"), code=SETrev("swap")},