Skip to content

Commit

Permalink
优化spin模式并加到大地图,微调相关区域布局
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Aug 2, 2024
1 parent 4c193ef commit 583819e
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 24 deletions.
2 changes: 2 additions & 0 deletions parts/language/lang_en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,8 @@ C. Gamepad
['infinite']= {"Infinite", "", "Just a sandbox"},
['infinite_dig']= {"Dig", "INFINITE", "Dig-diggin'-dug"},
['marathon_inf']= {"Marathon", "INFINITE", "Infinite marathon."},
['spinren']= {"Spin Ren", "EFFICIENCY", "Spike in a blink"},
-- ['spinren']= {"Spin Ren", "EFFICIENCY", "Spike in a blink"},

['custom_clear']= {"Custom", "NORMAL"},
['custom_puzzle']= {"Custom", "PUZZLE"},
Expand Down
1 change: 1 addition & 0 deletions parts/language/lang_es.lua
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,7 @@ return {
['infinite']= {"Infinito", "", "Modo Sandbox."},
['infinite_dig']= {"Infinito: Queso", "", "Limpia, limpia, más limpia que tú."},
['marathon_inf']= {"Maratón", "Infinito", "Maratón infinita."},
-- ['spinren']= {"Spin Ren", "EFFICIENCY", "Spike in a blink"},

['custom_clear']= {"Personalizado", "Normal"},
['custom_puzzle']= {"Personalizado", "Puzzle"},
Expand Down
1 change: 1 addition & 0 deletions parts/language/lang_fr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,7 @@ return {
['infinite']= {"Infini", "", "Mode tranquile."},
['infinite_dig']= {"Infini : Dig", "", "Creuser, creuser, creuser."},
['marathon_inf']= {"Marathon", "Infini", "Marathon infini."},
-- ['spinren']= {"Spin Ren", "EFFICIENCY", "Spike in a blink"},

['custom_clear']= {"Perso.", "NORMAL"},
['custom_puzzle']= {"Perso.", "PUZZLE"},
Expand Down
1 change: 1 addition & 0 deletions parts/language/lang_id.lua
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,7 @@ return {
['infinite']= {"Tak Terbatas", "", "Bak pasir"},
['infinite_dig']= {"Tak Terbatas: Gali","", "Gali, gali, gali"},
['marathon_inf']= {"Maraton", "TAK TERBATAS", "Maraton tanpa akhir."},
-- ['spinren']= {"Spin Ren", "EFFICIENCY", "Spike in a blink"},

['custom_clear']= {"Tersesuai", "NORMAL"},
['custom_puzzle']= {"Tersesuai", "TEKA-TEKI"},
Expand Down
1 change: 1 addition & 0 deletions parts/language/lang_ja.lua
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,7 @@ C. ゲームパッド
['infinite']= {"無限", "", "サンドボックス"},
['infinite_dig']= {"無限: 掘り", "", "掘れ掘れ掘れ掘れ掘れ掘・・・"},
['marathon_inf']= {"マラソン", "INFINITE", "ずっと走れるね"},
-- ['spinren']= {"Spin Ren", "EFFICIENCY", "Spike in a blink"},

['custom_clear']= {"カスタム", "NORMAL"},
['custom_puzzle']= {"カスタム", "PUZZLE"},
Expand Down
1 change: 1 addition & 0 deletions parts/language/lang_pt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,7 @@ return {
['infinite']= {"Infinito", "", "Modo Sandbox."},
['infinite_dig']= {"Infinito:Cave", "", "Cava, Cava, Cava."},
['marathon_inf']= {"Maratona", "Infinito", "Infinito maratona."},
-- ['spinren']= {"Spin Ren", "EFFICIENCY", "Spike in a blink"},

['custom_clear']= {"Custom", "NORMAL"},
['custom_puzzle']= {"Custom", "PUZZLE"},
Expand Down
1 change: 1 addition & 0 deletions parts/language/lang_vi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,7 @@ C. Tay cầm chơi game (Gamepad):
['infinite']= {"Infinite", "", "Chỉ là một chế độ tự do"},
['infinite_dig']= {"Infinite: Dig", "", "Đào, đào nữa, đào mãi"},
['marathon_inf']= {"Marathon", "VÔ TẬN", "Marathon không có điểm dừng."},
-- ['spinren']= {"Spin Ren", "EFFICIENCY", "Spike in a blink"},

['custom_clear']= {"Custom", "NORMAL"},
['custom_puzzle']= {"Custom", "PUZZLE"},
Expand Down
1 change: 1 addition & 0 deletions parts/language/lang_zh.lua
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,7 @@ return {
['infinite']= {"无尽", "", "沙盒"},
['infinite_dig']= {"无尽:挖掘", "", "挖呀挖呀挖"},
['marathon_inf']= {"马拉松", "无尽", "无尽马拉松"},
['spinren']= {"Spin连击", "效率", "掌管效率的神"},

['custom_clear']= {"自定义", "普通"},
['custom_puzzle']= {"自定义", "拼图"},
Expand Down
3 changes: 2 additions & 1 deletion parts/language/lang_zh_code.lua
Original file line number Diff line number Diff line change
Expand Up @@ -881,10 +881,11 @@ return {
['sprintAtk']= {"Sprint(100ATK);", "", "打出100攻击"},
['sprintEff']= {"Sprint(EFF);", "", "40行内打出更高的攻击"},
['zen']= {"Zen(200L);", "", "不限时200行"},
['ultra']= {"Ultra(EXTRA);", "", "在两分钟内尽可能拿到最多的分数"},
['ultra']= {"Ultra(Extra);", "", "在两分钟内尽可能拿到最多的分数"},
['infinite']= {"Infinite();", "", "沙盒"},
['infinite_dig']= {"InfDig();", "", "挖呀挖呀挖"},
['marathon_inf']= {"Marathon(Inf);", "", "无尽马拉松"},
['spinren']= {"Spinren(EFF)", "", "掌管效率的神"},

['custom_clear']= {"Custom(Clear);", ""},
['custom_puzzle']= {"Custom(Puzzle);", ""},
Expand Down
1 change: 1 addition & 0 deletions parts/language/lang_zh_trad.lua
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,7 @@ return {
['infinite']= {"無盡", "", "沙盒"},
['infinite_dig']= {"無盡:挖掘", "", "挖呀挖呀挖"},
['marathon_inf']= {"馬拉松", "無盡", "無盡馬拉松"},
['spinren']= {"Spin連擊", "效率", "掌管效率的神"},

['custom_clear']= {"自定義", "普通"},
['custom_puzzle']= {"自定義", "拼圖"},
Expand Down
22 changes: 12 additions & 10 deletions parts/modes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,21 @@ return {
{name='dig_h', x=850, y=-800, size=40,shape=1,icon="dig", unlock={'dig_u'}},
{name='dig_u', x=850, y=-1000,size=40,shape=1,icon="dig"},

{name='c4wtrain_n', x=700, y=-450, size=40,shape=1,icon="pc", unlock={'c4wtrain_l'}},
{name='c4wtrain_l', x=900, y=-450, size=40,shape=1,icon="pc"},
{name='c4wtrain_n', x=700, y=-140, size=40,shape=1,icon="pc", unlock={'c4wtrain_l'}},
{name='c4wtrain_l', x=900, y=-140, size=40,shape=1,icon="pc"},

{name='pctrain_n', x=700, y=-300, size=40,shape=1,icon="pc", unlock={'pctrain_l','pc_n'}},
{name='pctrain_l', x=900, y=-300, size=40,shape=1,icon="pc"},
{name='sprintAtk', x=500, y=-300, size=40,shape=1,icon="sprint2", unlock={'sprintEff','tech_n','tech_finesse','tsd_e','backfire_n','spinren'}},
{name='sprintEff', x=360, y=-150, size=40,shape=1,icon="sprint2"},

{name='pc_n', x=800, y=-140, size=40,shape=1,icon="pc", unlock={'pc_h'}},
{name='pc_h', x=950, y=-140, size=40,shape=3,icon="pc", unlock={'pc_l','pc_inf'}},
{name='pc_l', x=1100, y=-140, size=40,shape=3,icon="pc"},
{name='pc_inf', x=1100, y=-280, size=40,shape=2,icon="pc"},
{name='spinren', x=710, y=-300, size=40,shape=2,icon="tsd"},

{name='sprintAtk', x=500, y=-280, size=40,shape=1,icon="sprint2", unlock={'sprintEff','tech_n','tech_finesse','tsd_e','backfire_n'}},
{name='sprintEff', x=360, y=-150, size=40,shape=1,icon="sprint2"},
{name='pctrain_n', x=750, y=-450, size=40,shape=1,icon="pc", unlock={'pctrain_l','pc_n'}},
{name='pctrain_l', x=950, y=-450, size=40,shape=1,icon="pc"},

{name='pc_n', x=850, y=-300, size=40,shape=1,icon="pc", unlock={'pc_h'}},
{name='pc_h', x=1000, y=-300, size=40,shape=3,icon="pc", unlock={'pc_l','pc_inf'}},
{name='pc_l', x=1150, y=-300, size=40,shape=3,icon="pc"},
{name='pc_inf', x=1150, y=-450, size=40,shape=2,icon="pc"},

{name='tech_n', x=400, y=20, size=40,shape=1,icon="tech", unlock={'tech_n_plus','tech_h'}},
{name='tech_n_plus', x=200, y=-10, size=40,shape=3,icon="tech_plus"},
Expand Down
41 changes: 28 additions & 13 deletions parts/modes/spinren.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---@param RND RandomGenerator
local skip
---@param RND love.RandomGenerator
local function randomizer(RND)
local last=RND:random(2)==1 and 1 or 4
local function get_next()
Expand Down Expand Up @@ -26,41 +27,55 @@ local function randomizer(RND)
end
end
local lines={
{1,2,3,4,0,0,5,6,7,8},
{7,6,5,0,0,0,4,3,2,1},
{1,2,3,4,0,0,0,5,6,7},
{7,6,5,0,0,0,0,4,3,2}
{1,1,1,1,0,0,1,1,1,1},
{1,1,1,0,0,0,1,1,1,1},
{1,1,1,1,0,0,0,1,1,1},
{1,1,1,0,0,0,0,1,1,1}
}
local function get_lines(n,f)
local function get_lines(n,P)
local ret={}
for _=1,n do
table.insert(ret,lines[f()])
local L=TABLE.shift(lines[P.randomizer_spinren()])
for i=1,#L do
if L[i]==1 then
L[i]=P.modeData.colorSet[P.holeRND:random(4)]
end
end
table.insert(ret,L)
end
return ret
end

return {
load=function()
PLY.newPlayer(1)
local our=PLY_ALIVE[1]
our.randomizer_spinren=randomizer(our.holeRND)
our:pushLineList(get_lines(20,our.randomizer_spinren))
local P=PLY_ALIVE[1]
P.modeData.colorSet={}
for i=1,4 do
P.modeData.colorSet[i]=P.holeRND:random(25)
end
P.randomizer_spinren=randomizer(P.holeRND)
P:pushLineList(get_lines(20,P))
P.fieldBeneath=0
end,
env={
lock=1e99,
drop=1e99,
minsdarr=4,
infHold=true,
highCam=false,
bgm='lounge',
eventSet='sprintEff_40',
hook_drop=function(P)
if P.lastPiece.row==0 then
P:win('finish')
end
local up=MATH.clamp(20-P.stat.row+P.lastPiece.row,0,P.lastPiece.row)
P:pushLineList(get_lines(up,P.randomizer_spinren))
P:pushLineList(get_lines(up,P))
end
},
score=function(P) return {P.stat.atk/P.stat.row,P.stat.time} end,
scoreDisp=function(D) return string.format("%.3f",D[1]).." Efficiency "..STRING.time(D[2]) end,
scoreDisp=function(D) return ("%.2f"):format(D[1]).." Efficiency "..STRING.time(D[2]) end,
comp=function(a,b) return a[1]>b[1] or a[1]==b[1] and a[2]<b[2] end,
getRank=function(P)
if P.stat.row<10 then return end
Expand All @@ -73,4 +88,4 @@ return {
E>=3 and 1 or
0
end
}
}
2 changes: 2 additions & 0 deletions updateLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
正在点亮科技树...

0.17.18: 暂停 Break
新增:
新模式:Spin连击 (by Gompyn) #1129
修复:
第三季度主菜单音乐名称打错导致没有bgm和进音乐室报错
c4w普通的计分完全改为竞速 #1126
Expand Down

0 comments on commit 583819e

Please sign in to comment.