Skip to content

Commit

Permalink
完善haunted模式
Browse files Browse the repository at this point in the history
调整一个成就id
  • Loading branch information
MrZ626 committed Nov 14, 2024
1 parent 8567cf4 commit 507199a
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 42 deletions.
2 changes: 1 addition & 1 deletion assets/game/mode/brik/exterior/hypersonic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ return {
if P.modeData.point>=200 then
if #P.holdQueue==0 then
table.insert(P.holdQueue,P:getBrik('I5'))
PROGRESS.setSecret('exterior_hypersonic_titanium_holdless')
PROGRESS.setSecret('exterior_hypersonic_holdlessTitan')
end
return true
end
Expand Down
90 changes: 53 additions & 37 deletions assets/game/mode/brik/exterior/invis.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local max,min=math.max,math.min
local floor,abs=math.floor,math.abs
local ins,rem=table.insert,table.remove
local round,cIntp=MATH.round,MATH.clampInterpolate
local round,cItp=MATH.round,MATH.clampInterpolate

-- Speed of Invisible EP:
-- Phase 1: 126 BPM (476.19 ms/Beat) 6=F
Expand All @@ -19,9 +19,6 @@ end
function haunted.dropSound3(vol)
FMOD.effect('drop_'..math.random(6),{tune=-2,volume=vol})
end
function haunted.always(P)
P.modeData.energy=P.modeData.energy-1
end
local len=6
function haunted.afterLock(P)
---@cast P Techmino.Player.Brik
Expand All @@ -43,12 +40,12 @@ function haunted.afterLock(P)
end
if abs(minDelta)<=62 then
P.modeData.beatChain=P.modeData.beatChain+1
if P.modeData.beatChain>=5 then
if P.modeData.beatChain>=6 then
local perfect=abs(minDelta)<=26
local phase=P.modeData.phase
local acc
if perfect then
acc=100
acc=10
if phase==1 then
playSample('saw',{'F2',1,62})
playSample('organ',{'F2',.626,62})
Expand All @@ -60,7 +57,7 @@ function haunted.afterLock(P)
playSample('organ',{'A#2',.626,62})
end
else
acc=60
acc=3
if phase==1 then
playSample('complex',{'F2',1,62})
elseif phase==2 then
Expand All @@ -69,15 +66,18 @@ function haunted.afterLock(P)
playSample('complex',{'A#2',1,62})
end
end
P.modeData.energy=P.modeData.energy+acc*1000
P.modeData.energy=P.modeData.energy+acc -- 285 pieces if all Techrashes
end
else
if P.modeData.beatChain>=5 then
P:playSound('discharge',min(P.modeData.beatChain/10,1))
end
P.modeData.beatChain=0
end
end
function haunted.beforeDiscard(P)
if P.modeData.energy>5200 then
PROGRESS.setSecret('exterior_invis_rhythmMaster')
return true
end
end
function haunted.p2_afterSpawn(P)
local N=P.nextQueue[#P.nextQueue]
if not N then return end
Expand Down Expand Up @@ -153,6 +153,7 @@ return {
if P.modeData.subMode then
if P.modeData.subMode=='haunted' then
-- Haunted Phase 1 init
P.modeData.linePoint=P.stat.line
P.modeData.phase=1
P.modeData.lastDropTimes={}
P.modeData.beatChain=0
Expand All @@ -162,7 +163,6 @@ return {
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)
Expand All @@ -185,22 +185,27 @@ return {
function(P,clear)
---@cast P Techmino.Player.Brik
if P.modeData.subMode=='haunted' then
local curLine=P.stat.line
if clear.line>=4 then
-- Gain energy with Techrashes
P.modeData.energy=P.modeData.energy+clear.line/4*100 -- 28.5 techrash
end
P.modeData.linePoint=P.modeData.linePoint+clear.line*2-1
local LP=P.modeData.linePoint
if P.modeData.phase==1 then
if curLine<100 then
if LP<100 then
-- Haunted Phase 1 step
P.settings.dropDelay=round(cIntp(20,beatItvl[1],80,beatItvl[1]/2,MATH.clamp(curLine,20,80)))
P.settings.dropDelay=round(cItp(20,beatItvl[1],80,beatItvl[1]/2,MATH.clamp(LP,20,80)))
mechLib.brik.misc.haunted_turnOn(P,
round(cIntp(70,5,90,20,curLine)),
round(cItp(70,5,90,20,LP)),
260,
round(cIntp(0,1600,80,600,curLine)),
round(cIntp(0,600,80,300,curLine))
round(cItp(0,1600,80,600,LP)),
round(cItp(0,600,80,300,LP))
)
else
-- Haunted Phase 2 init
P.modeData.phase=2
P.modeData.target.line=200
P.settings.spawnDelay=round(beatItvl[2]/2)
P.settings.spawnDelay=round(beatItvl[2]/4)
P.settings.clearDelay=round(beatItvl[2])
P.settings.lockDelay=round(beatItvl[2]*2.5)
P:addEvent('afterSpawn',haunted.p2_afterSpawn)
Expand All @@ -211,25 +216,25 @@ return {
end
end
if P.modeData.phase==2 then
if curLine<200 then
if LP<200 then
-- Haunted Phase 2 step
P.settings.dropDelay=round(cIntp(120,round(beatItvl[2]/2),180,round(beatItvl[2]/4),MATH.clamp(curLine,120,180)))
P.modeData.cyanizeRate=round(cIntp(102,16,126,100,curLine))
P.settings.dropDelay=round(cItp(120,round(beatItvl[2]/2),180,round(beatItvl[2]/4),MATH.clamp(LP,120,180)))
P.modeData.cyanizeRate=round(cItp(102,16,126,100,LP))
mechLib.brik.misc.haunted_turnOn(P,
round(cIntp(100,26,200,42,curLine)),
round(cItp(100,26,200,42,LP)),
260,
round(cIntp(100,800,150,500,curLine)),
round(cIntp(100,400,150,260,curLine))
round(cItp(100,800,150,500,LP)),
round(cItp(100,400,150,260,LP))
)
else
local passTimeTorikan=P.gameTime<=420e3
local passTechrashTorikan=P.stat.clears[4]>=42
if passTechrashTorikan or passTimeTorikan then
local passTimeTorikan=P.gameTime<=260e3
local passEnergyTorikan=P.modeData.energy>=2600
if passTimeTorikan or passEnergyTorikan then
-- Haunted Phase 3 init
P.modeData.phase=3
P.modeData.target.line=260
if passTechrashTorikan and passTimeTorikan then
P.settings.spawnDelay=round(beatItvl[3]/2)
if passEnergyTorikan and passTimeTorikan then
P.settings.spawnDelay=round(beatItvl[3]/4)
P.settings.clearDelay=0
P.settings.dropDelay=0
P.settings.lockDelay=round(beatItvl[3]*1.5)
Expand All @@ -242,6 +247,7 @@ return {
end
P:delEvent('afterSpawn',haunted.p2_afterSpawn)
P:addEvent('afterSpawn',haunted.p3_afterSpawn)
P:addEvent('beforeDiscard',haunted.beforeDiscard)
mechLib.brik.misc.haunted_turnOn(P,62,120,600,1000)
P:addSoundEvent('drop',haunted.dropSound3)
P:playSound('beep_rise')
Expand All @@ -253,10 +259,10 @@ return {
end
end
if P.modeData.phase==3 then
if curLine<260 then
if LP<260 then
-- Haunted Phase 3 step
P.modeData.deColorRate=round(cIntp(200,0,230,42,curLine))
P.modeData.darkRate=round(cIntp(220,26,240,62,curLine))
P.modeData.deColorRate=round(cItp(200,0,230,42,LP))
P.modeData.darkRate=round(cItp(220,26,240,62,LP))
else
-- Haunted finished
P:finish('win')
Expand Down Expand Up @@ -286,13 +292,23 @@ return {
P:drawInfoPanel(-380,-80,160,160)
GC.setColor(COLOR.L)
FONT.set(70)
GC.mStr(P.stat.line,-300,-90)
GC.rectangle('fill',-375,-2,150,4)
GC.mStr(P.modeData.target.line,-300,-5)
if P.modeData.subMode=='haunted' then
GC.mStr(P.modeData.linePoint,-300,-90)
GC.mStr(P.modeData.target.line,-300,-5)
FONT.set(30)
GC.setColor(1,1,P.modeData.energy>=5200 and .62 or 1,P.modeData.phase<3 and P.gameTime>260e3 and .42 or 1)
GC.setLineWidth(1)
GC.rectangle('line',-375,-2,150,4)
GC.rectangle('fill',-375,-2,150*min(P.modeData.energy/2600,1),4)
else
GC.mStr(P.stat.line,-300,-90)
GC.rectangle('fill',-375,-2,150,4)
GC.mStr(P.modeData.target.line,-300,-5)
end
end,
gameOver=function(P,reason)
if P.modeData.subMode=='haunted' then
PROGRESS.setExteriorScore('invis','haunted',min(P.stat.line,260),'>')
PROGRESS.setExteriorScore('invis','haunted',min(P.modeData.linePoint,260),'>')
if reason=='AC' then
PROGRESS.setExteriorScore('invis','haunted_time',P.gameTime,'<')
end
Expand Down
3 changes: 2 additions & 1 deletion assets/language/lang_en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,10 @@ local L={
exterior_sprint_gunJumping="Gun jumping detected",
exterior_excavate_notDig="What are you doing?",
exterior_invis_superBrain="COOL",
exterior_invis_rhythmMaster="To the beat!", -- Keep this as it is. Original from "osu!" title music
exterior_tspin_10TSS="What's this?",
exterior_tspin_10TST="EZ.",
exterior_hypersonic_titanium_holdless="You can hold",
exterior_hypersonic_holdlessTitan="You can hold",
interior_console="What's this?",
language_japanese="あ?",
musicroom_recollection="Recollection is not a song",
Expand Down
3 changes: 2 additions & 1 deletion assets/language/lang_eo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,10 @@ local L={
exterior_sprint_gunJumping="KANONPAFO!!!",
exterior_excavate_notDig="Kion vi faras?",
exterior_invis_superBrain="COOL",
exterior_invis_rhythmMaster="To the beat!", -- Keep this as it is. Original from "osu!" title music
exterior_tspin_10TSS="Kio estas ĉi tio?",
exterior_tspin_10TST="EZ.",
exterior_hypersonic_titanium_holdless="Vi povas uzi la rezervo",
exterior_hypersonic_holdlessTitan="Vi povas uzi la rezervo",
interior_console="Kio estas ĉi tio?",
language_japanese="あ?",
musicroom_recollection="La memoro ne estas kanto",
Expand Down
3 changes: 2 additions & 1 deletion assets/language/lang_it.lua
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,10 @@ local L={
exterior_sprint_gunJumping="SCANNONATA!!!",
exterior_excavate_notDig="Che stai facendo?",
exterior_invis_superBrain="COOL",
exterior_invis_rhythmMaster="To the beat!", -- Keep this as it is. Original from "osu!" title music
exterior_tspin_10TSS="Cos'è questo?",
exterior_tspin_10TST="EZ.",
exterior_hypersonic_titanium_holdless="Puoi usare la riserva",
exterior_hypersonic_holdlessTitan="Puoi usare la riserva",
interior_console="Cos'è questo?",
language_japanese="あ?",
musicroom_recollection="Il ricordo non è una canzone",
Expand Down
3 changes: 2 additions & 1 deletion assets/language/lang_zh.lua
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,10 @@ local L={
exterior_sprint_gunJumping="检测到抢跑",
exterior_excavate_notDig="你在干什么?",
exterior_invis_superBrain="COOL",
exterior_invis_rhythmMaster="To the beat!", -- 保持原样。 出处为游戏 osu! 标题曲
exterior_tspin_10TSS="这是什么?",
exterior_tspin_10TST="轻松。",
exterior_hypersonic_titanium_holdless="你可以暂存的",
exterior_hypersonic_holdlessTitan="你可以暂存的",
interior_console="这是什么?",
language_japanese="あ?",
musicroom_recollection="Recollection不是一首曲子",
Expand Down

0 comments on commit 507199a

Please sign in to comment.