From d00fefd678f0e29ea82872559e68d2e2c1f9f6f3 Mon Sep 17 00:00:00 2001 From: MrZ_26 <1046101471@qq.com> Date: Wed, 13 Nov 2024 23:28:28 +0800 Subject: [PATCH] =?UTF-8?q?invis-haunted=E6=A8=A1=E5=BC=8F=E6=8E=A8?= =?UTF-8?q?=E8=BF=9B=20=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81=20=E6=A1=86?= =?UTF-8?q?=E6=9E=B6=E8=B7=9F=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zenitha | 2 +- assets/game/mode/brik/exterior/invis.lua | 94 +++++++++++++++++------- 2 files changed, 68 insertions(+), 28 deletions(-) diff --git a/Zenitha b/Zenitha index 8c282fb3..f382b07e 160000 --- a/Zenitha +++ b/Zenitha @@ -1 +1 @@ -Subproject commit 8c282fb30691663a99bd07783920f2fe203c3c9e +Subproject commit f382b07ee2f52daa07cfdd3a0bd3e2566316cdfb diff --git a/assets/game/mode/brik/exterior/invis.lua b/assets/game/mode/brik/exterior/invis.lua index b341a1eb..eb494e37 100644 --- a/assets/game/mode/brik/exterior/invis.lua +++ b/assets/game/mode/brik/exterior/invis.lua @@ -1,5 +1,5 @@ local max,min=math.max,math.min -local floor=math.floor +local floor,abs=math.floor,math.abs local ins,rem=table.insert,table.remove local round,cIntp=MATH.round,MATH.clampInterpolate @@ -9,37 +9,76 @@ local round,cIntp=MATH.round,MATH.clampInterpolate -- Phase 3: 160 BPM (375.00 ms/Beat) 6=G local beatItvl={476.19,419.58,375.00} -local function haunted_dropSound1(vol) +local haunted={} +function haunted.dropSound1(vol) FMOD.effect('drop_'..math.random(6),{tune=-4,volume=vol}) end -local function haunted_dropSound2(vol) +function haunted.dropSound2(vol) FMOD.effect('drop_'..math.random(6),{tune=-3,volume=vol}) end -local function haunted_dropSound3(vol) +function haunted.dropSound3(vol) FMOD.effect('drop_'..math.random(6),{tune=-2,volume=vol}) end -local function haunted_afterLock(P) +function haunted.always(P) + P.modeData.energy=P.modeData.energy-1 +end +local len=6 +function haunted.afterLock(P) ---@cast P Techmino.Player.Brik local l=P.modeData.lastDropTimes ins(l,1,P.gameTime) - l[7]=nil + if #l=5 then + local perfect=abs(minDelta)<=26 + local phase=P.modeData.phase + local acc + if perfect then + acc=100 + if phase==1 then + playSample('saw',{'F2',1,62}) + playSample('organ',{'F2',.626,62}) + elseif phase==2 then + playSample('saw',{'G#2',1,62}) + playSample('organ',{'G#2',.626,62}) + elseif phase==3 then + playSample('saw',{'A#2',1,62}) + playSample('organ',{'A#2',.626,62}) + end + else + acc=60 + if phase==1 then + playSample('complex',{'F2',1,62}) + elseif phase==2 then + playSample('complex',{'G#2',1,62}) + elseif phase==3 then + playSample('complex',{'A#2',1,62}) + end + end + P.modeData.energy=P.modeData.energy+acc*1000 + end + else + if P.modeData.beatChain>=5 then + P:playSound('discharge',min(P.modeData.beatChain/10,1)) + end + P.modeData.beatChain=0 end end -local function haunted_p2_afterSpawn(P) +function haunted.p2_afterSpawn(P) local N=P.nextQueue[#P.nextQueue] if not N then return end N=N.matrix @@ -53,7 +92,7 @@ local function haunted_p2_afterSpawn(P) end end end -local function haunted_p3_afterSpawn(P) +function haunted.p3_afterSpawn(P) local N=P.nextQueue[#P.nextQueue] if not N then return end N=N.matrix @@ -67,12 +106,9 @@ local function haunted_p3_afterSpawn(P) end end end -regFuncLib(haunted_dropSound1,'exterior_invis.haunted_dropSound1') -regFuncLib(haunted_dropSound2,'exterior_invis.haunted_dropSound2') -regFuncLib(haunted_dropSound3,'exterior_invis.haunted_dropSound3') -regFuncLib(haunted_afterLock,'exterior_invis.haunted_afterLock') -regFuncLib(haunted_p2_afterSpawn,'exterior_invis.haunted_p2_afterSpawn') -regFuncLib(haunted_p3_afterSpawn,'exterior_invis.haunted_p3_afterSpawn') +regFuncLib({ + haunted=haunted, +},'exterior_invis') ---@type Techmino.Mode return { @@ -118,10 +154,14 @@ return { -- Haunted Phase 1 init P.modeData.phase=1 P.modeData.lastDropTimes={} + P.modeData.beatChain=0 P.modeData.accuracyPoint=0 + P.modeData.energy=0 + P.modeData.energyShow=0 P.settings.spawnDelay=round(beatItvl[1]/2) P.settings.clearDelay=round(beatItvl[1]) P.settings.lockDelay=round(beatItvl[1]*2.5) + P:addEvent('always',haunted_always) P:addEvent('afterLock',haunted_afterLock) playBgm('invisible') P:addSoundEvent('drop',haunted_dropSound1) @@ -189,7 +229,7 @@ return { P.modeData.target.line=260 if passTechrashTorikan and passTimeTorikan then P.settings.spawnDelay=round(beatItvl[3]/2) - P.settings.clearDelay=round(beatItvl[3]/2) + P.settings.clearDelay=0 P.settings.dropDelay=0 P.settings.lockDelay=round(beatItvl[3]*1.5) P.settings.asd=max(P.settings.asd,42)