From 2745f69c3d24c36ec602961c63bebdbb9b594076 Mon Sep 17 00:00:00 2001 From: MrZ_26 <1046101471@qq.com> Date: Sun, 21 Jul 2024 13:03:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=80=E4=B8=AA=E6=9A=82?= =?UTF-8?q?=E6=97=B6=E6=B2=A1=E5=95=A5=E7=94=A8=E7=9A=84PROGRESS=E6=96=B9?= =?UTF-8?q?=E6=B3=95=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 --- assets/game/mode/brik/exterior/dig.lua | 20 +++++++++---------- assets/game/mode/brik/exterior/drill.lua | 18 ++++++++--------- assets/game/mode/brik/exterior/excavate.lua | 13 ++++++------ assets/game/mode/brik/exterior/hypersonic.lua | 7 +++---- assets/game/mode/brik/exterior/marathon.lua | 6 +++--- assets/game/mode/brik/exterior/sequence.lua | 7 +++---- assets/game/mode/brik/exterior/sprint.lua | 12 +++++------ assets/game/mode/brik/exterior/tspin.lua | 4 ++-- assets/progress.lua | 8 +------- 9 files changed, 43 insertions(+), 52 deletions(-) diff --git a/assets/game/mode/brik/exterior/dig.lua b/assets/game/mode/brik/exterior/dig.lua index a65d5624..d8c23964 100644 --- a/assets/game/mode/brik/exterior/dig.lua +++ b/assets/game/mode/brik/exterior/dig.lua @@ -41,22 +41,22 @@ return { end end, function() - if PROGRESS.getExteriorModeState('excavate') then return true end + if PROGRESS.getExteriorUnlock('excavate') then return true end if - 0.4/PROGRESS.getExteriorModeState('dig').spl10+ - 0.3/PROGRESS.getExteriorModeState('dig').spl20+ - 0.2/PROGRESS.getExteriorModeState('dig').spl40+ - 0.3/PROGRESS.getExteriorModeState('dig').spl100 + 0.4/PROGRESS.getExteriorModeScore('dig','spl10')+ + 0.3/PROGRESS.getExteriorModeScore('dig','spl20')+ + 0.2/PROGRESS.getExteriorModeScore('dig','spl40')+ + 0.3/PROGRESS.getExteriorModeScore('dig','spl100') >=0.26 -- lps, ≈3.85 spl then PROGRESS.setExteriorUnlock('excavate') return true end end, function() - if PROGRESS.getExteriorModeState('drill') then return true end + if PROGRESS.getExteriorUnlock('drill') then return true end if - 0.4/PROGRESS.getExteriorModeState('dig').ppl10+ - 0.3/PROGRESS.getExteriorModeState('dig').ppl20+ - 0.2/PROGRESS.getExteriorModeState('dig').ppl40+ - 0.3/PROGRESS.getExteriorModeState('dig').ppl100 + 0.4/PROGRESS.getExteriorModeScore('dig','ppl10')+ + 0.3/PROGRESS.getExteriorModeScore('dig','ppl20')+ + 0.2/PROGRESS.getExteriorModeScore('dig','ppl40')+ + 0.3/PROGRESS.getExteriorModeScore('dig','ppl100') >=0.42 -- lpp, ≈2.38 ppl then PROGRESS.setExteriorUnlock('drill') return true end end, diff --git a/assets/game/mode/brik/exterior/drill.lua b/assets/game/mode/brik/exterior/drill.lua index 49b0d35e..a4676450 100644 --- a/assets/game/mode/brik/exterior/drill.lua +++ b/assets/game/mode/brik/exterior/drill.lua @@ -41,22 +41,22 @@ return { end end, function() - if PROGRESS.getExteriorModeState('survivor') then return true end + if PROGRESS.getExteriorUnlock('survivor') then return true end if - 0.3/PROGRESS.getExteriorModeState('drill').spl10+ - 0.3/PROGRESS.getExteriorModeState('drill').spl20+ - 0.2/PROGRESS.getExteriorModeState('drill').spl40+ - 0.4/PROGRESS.getExteriorModeState('drill').spl100 + 0.3/PROGRESS.getExteriorModeScore('drill','spl10')+ + 0.3/PROGRESS.getExteriorModeScore('drill','spl20')+ + 0.2/PROGRESS.getExteriorModeScore('drill','spl40')+ + 0.4/PROGRESS.getExteriorModeScore('drill','spl100') >=0.355 -- lps, ≈2.82 spl then PROGRESS.setExteriorUnlock('survivor') return true end end, function() if PROGRESS.getStyleUnlock('acry') then return true end if - 0.3/PROGRESS.getExteriorModeState('drill').ppl10+ - 0.3/PROGRESS.getExteriorModeState('drill').ppl20+ - 0.2/PROGRESS.getExteriorModeState('drill').ppl40+ - 0.4/PROGRESS.getExteriorModeState('drill').ppl100 + 0.3/PROGRESS.getExteriorModeScore('drill','ppl10')+ + 0.3/PROGRESS.getExteriorModeScore('drill','ppl20')+ + 0.2/PROGRESS.getExteriorModeScore('drill','ppl40')+ + 0.4/PROGRESS.getExteriorModeScore('drill','ppl100') >=0.495 -- lpp, ≈2.02 ppl then PROGRESS.setStyleUnlock('acry') diff --git a/assets/game/mode/brik/exterior/excavate.lua b/assets/game/mode/brik/exterior/excavate.lua index c58e00f6..cb65258a 100644 --- a/assets/game/mode/brik/exterior/excavate.lua +++ b/assets/game/mode/brik/exterior/excavate.lua @@ -21,11 +21,10 @@ return { T.add(P,'excavate_shale', 'modeTask_excavate_shale_title', 'modeTask_excavate_shale_desc') T.add(P,'excavate_volcanics', 'modeTask_excavate_volcanics_title', 'modeTask_excavate_volcanics_desc') - local S=PROGRESS.getExteriorModeState('excavate') or NONE - if S.shale and S.volcanics then + if PROGRESS.getExteriorModeScore('excavate','shale') and PROGRESS.getExteriorModeScore('excavate','volcanics') then PROGRESS.setExteriorScore('excavate','showChecker',1) end - if S.showChecker then + if PROGRESS.getExteriorModeScore('excavate','showChecker') then T.add(P,'excavate_checker','modeTask_excavate_checker_title','modeTask_excavate_checker_desc') else T.add(P,'excavate_checker','modeTask_unknown_title','modeTask_excavate_unknown_desc') @@ -99,11 +98,11 @@ return { PROGRESS.setExteriorScore('dig','volcanics',P.gameTime,'<') end - local playCount=PROGRESS.getExteriorModeState('dig').playCount or 0 + local playCount=PROGRESS.getExteriorModeScore('dig','playCount') or 0 if - (PROGRESS.getExteriorModeState('dig').shale or 1e99)<=100e3+10e3*playCount or - (PROGRESS.getExteriorModeState('dig').volcanics or 1e99)<=100e3+10e3*playCount or - (PROGRESS.getExteriorModeState('dig').checker or 1e99)<=60e3+5e3*playCount + (PROGRESS.getExteriorModeScore('dig','shale') or 1e99)<=100e3+10e3*playCount or + (PROGRESS.getExteriorModeScore('dig','volcanics') or 1e99)<=100e3+10e3*playCount or + (PROGRESS.getExteriorModeScore('dig','checker') or 1e99)<=60e3+5e3*playCount then PROGRESS.setExteriorUnlock('backfire') return true diff --git a/assets/game/mode/brik/exterior/hypersonic.lua b/assets/game/mode/brik/exterior/hypersonic.lua index e0060f9e..4d1f2936 100644 --- a/assets/game/mode/brik/exterior/hypersonic.lua +++ b/assets/game/mode/brik/exterior/hypersonic.lua @@ -20,17 +20,16 @@ return { T.add(P,'hypersonic_low','modeTask_hypersonic_low_title','modeTask_hypersonic_low_desc','(0/4)') T.add(P,'hypersonic_high','modeTask_hypersonic_high_title','modeTask_hypersonic_high_desc') - local S=PROGRESS.getExteriorModeState('hypersonic') or NONE - if S.showHidden then + if PROGRESS.getExteriorModeScore('hypersonic','showHidden') then T.add(P,'hypersonic_hidden','modeTask_hypersonic_hidden_title','modeTask_hypersonic_hidden_desc') else T.add(P,'hypersonic_hidden','modeTask_unknown_title','modeTask_unknown_desc') end - if S.high then + if PROGRESS.getExteriorModeScore('hypersonic','high') then PROGRESS.setExteriorScore('hypersonic','showTitanium',1) end - if S.showTitanium then + if PROGRESS.getExteriorModeScore('hypersonic','showTitanium') then T.add(P,'hypersonic_titanium','modeTask_hypersonic_titanium_title','modeTask_hypersonic_titanium_desc') end end, diff --git a/assets/game/mode/brik/exterior/marathon.lua b/assets/game/mode/brik/exterior/marathon.lua index bebdbf8f..f845d177 100644 --- a/assets/game/mode/brik/exterior/marathon.lua +++ b/assets/game/mode/brik/exterior/marathon.lua @@ -11,21 +11,21 @@ return { mechLib.brik.marathon.event_playerInit, function(P) mechLib.common.music.set(P,{id='level_marathon_exterior',path='.level'},'afterClear') - if not PROGRESS.getExteriorModeState('combo') then + if not PROGRESS.getExteriorUnlock('combo') then P.settings.combo_sound=true end end, }, afterClear={ function(P) - if PROGRESS.getExteriorModeState('allclear') then return true end + if PROGRESS.getExteriorUnlock('allclear') then return true end if P.stat.allclear>0 then PROGRESS.setExteriorUnlock('allclear') return true end end, function(P) - if PROGRESS.getExteriorModeState('combo') then return true end + if PROGRESS.getExteriorUnlock('combo') then return true end if P.combo==10 then PROGRESS.setExteriorUnlock('combo') return true diff --git a/assets/game/mode/brik/exterior/sequence.lua b/assets/game/mode/brik/exterior/sequence.lua index 3df918fa..90423f06 100644 --- a/assets/game/mode/brik/exterior/sequence.lua +++ b/assets/game/mode/brik/exterior/sequence.lua @@ -82,19 +82,18 @@ return { T.add(P,'sequence_rect', 'modeTask_sequence_rect_title', 'modeTask_sequence_rect_desc') T.add(P,'sequence_rain', 'modeTask_sequence_rain_title', 'modeTask_sequence_rain_desc') - local S=PROGRESS.getExteriorModeState('sequence') or NONE local count=0 for _,v in next,{'mph','flood','drought','saw','rect','rain','pento'} do - if S[v] then count=count+1 end + if PROGRESS.getExteriorModeScore('sequence',v) then count=count+1 end end if count>=6 then PROGRESS.setExteriorScore('sequence','showPento',1) end - if S.showPento then + if PROGRESS.getExteriorModeScore('sequence','showPento') then T.add(P,'sequence_pento','modeTask_sequence_pento_title','modeTask_sequence_pento_desc') else T.add(P,'sequence_pento','modeTask_unknown_title','modeTask_sequence_unknown_desc') end - if S.showMPH then + if PROGRESS.getExteriorModeScore('sequence','showMPH') then T.add(P,'sequence_mph','modeTask_sequence_mph_title','modeTask_sequence_mph_desc') end end, diff --git a/assets/game/mode/brik/exterior/sprint.lua b/assets/game/mode/brik/exterior/sprint.lua index f92d580d..15e3f933 100644 --- a/assets/game/mode/brik/exterior/sprint.lua +++ b/assets/game/mode/brik/exterior/sprint.lua @@ -17,10 +17,10 @@ return { P.modeData.target.line=40 P.modeData.keyCount={} P.modeData.curKeyCount=0 - if not PROGRESS.getExteriorModeState('combo') then + if not PROGRESS.getExteriorUnlock('combo') then P.settings.combo_sound=true end - if PROGRESS.getExteriorModeState('tspin') then + if PROGRESS.getExteriorUnlock('tspin') then P.settings.spin_immobile=false P.settings.spin_corners=false end @@ -40,7 +40,7 @@ return { P.modeData.curKeyCount=0 end, afterPress=function(P) - if PROGRESS.getExteriorModeState('tspin') then return true end + if PROGRESS.getExteriorUnlock('tspin') then return true end local move=P.lastMovement if move and (move.immobile or move.corners) then PROGRESS.setExteriorUnlock('tspin') @@ -126,21 +126,21 @@ return { end end, function(P) - if PROGRESS.getExteriorModeState('allclear') then return true end + if PROGRESS.getExteriorUnlock('allclear') then return true end if P.stat.allclear>0 then PROGRESS.setExteriorUnlock('allclear') return true end end, function(P) - if PROGRESS.getExteriorModeState('combo') then return true end + if PROGRESS.getExteriorUnlock('combo') then return true end if P.combo==10 then PROGRESS.setExteriorUnlock('combo') return true end end, function(P) - if PROGRESS.getExteriorModeState('hidden') then return true end + if PROGRESS.getExteriorUnlock('hidden') then return true end if P.stat.line>=40 then if P.stat.piece<102.6 then PROGRESS.setExteriorUnlock('sequence') diff --git a/assets/game/mode/brik/exterior/tspin.lua b/assets/game/mode/brik/exterior/tspin.lua index 81df5235..7ecfaf6f 100644 --- a/assets/game/mode/brik/exterior/tspin.lua +++ b/assets/game/mode/brik/exterior/tspin.lua @@ -96,8 +96,8 @@ return { -- Unlock Gela if - not (PROGRESS.getStyleUnlock('gela') and PROGRESS.getExteriorModeState('chain')) and - (PROGRESS.getExteriorModeState('tspin').tsd_hard or 0)+(PROGRESS.getExteriorModeState('tspin').tsd or 0)>=26 + not (PROGRESS.getStyleUnlock('gela') and PROGRESS.getExteriorUnlock('chain')) and + (PROGRESS.getExteriorModeScore('tspin','tsd_hard') or 0)+(PROGRESS.getExteriorModeScore('tspin','tsd') or 0)>=26 then PROGRESS.setStyleUnlock('gela') PROGRESS.setExteriorUnlock('chain') diff --git a/assets/progress.lua b/assets/progress.lua index 177f472e..8f78e7e7 100644 --- a/assets/progress.lua +++ b/assets/progress.lua @@ -404,7 +404,7 @@ end function PROGRESS.getInteriorScore(mode) return prgs.interiorScore[mode] end function PROGRESS.getTotalInteriorScore() return prgs.interiorScore.dig+prgs.interiorScore.sprint+prgs.interiorScore.marathon end function PROGRESS.getExteriorMapState() return prgs.exteriorMap end -function PROGRESS.getExteriorModeState(mode) return prgs.exteriorMap[mode] end ---@param mode Techmino.ModeName +function PROGRESS.getExteriorUnlock(mode) return not not prgs.exteriorMap[mode] end ---@param mode Techmino.ModeName function PROGRESS.getExteriorModeScore(mode,key) local M=prgs.exteriorMap[mode] return M and M[key] end --[[@param mode Techmino.ModeName]] --[[@param key string]] function PROGRESS.getSecret(id) return not not prgs.secretFound[id] end @@ -479,12 +479,6 @@ function PROGRESS.setExteriorUnlock(mode,outsideGame) end end ----@param mode Techmino.ModeName ----@param data table -function PROGRESS.setExteriorModeState(mode,data) - prgs.exteriorMap[mode]=data -end - ---@param mode Techmino.ModeName ---@param key string ---@param value number