Skip to content

Commit

Permalink
Add "Tech Finesse Lock" modes and some other improvements (#946)
Browse files Browse the repository at this point in the history
* Improve Tech FInesse modes and add new player hooks

* Add Tech Finesse[+] Lock into mode map

* Credit PopUpWaffles

* Rearrange mode map
  • Loading branch information
Not-A-Normal-Robot authored Aug 23, 2023
1 parent 5196874 commit 9769b33
Show file tree
Hide file tree
Showing 20 changed files with 596 additions and 365 deletions.
2 changes: 1 addition & 1 deletion Zframework
Submodule Zframework updated 6 files
+0 −26 lowcaser.txt
+2 −2 sfx.lua
+16 −90 stringExtend.lua
+3 −3 text.lua
+0 −26 upcaser.txt
+11 −11 widget.lua
57 changes: 57 additions & 0 deletions parts/eventsets/tech_finesse_lock.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
local function onMove(P)
if not P.cur then return end
P.holdTime=0
VK.keys[8].ava=false
P.modeData.moveCount=P.modeData.moveCount+1
if P.modeData.moveCount>=2 and (P.curY>P.gameEnv.fieldH-2 or P:_roofCheck()) then
P.keyAvailable[1]=false
P.keyAvailable[2]=false
VK.keys[1].ava=false
VK.keys[2].ava=false
end
end
local function onRotate(P)
if not P.cur then return end
P.holdTime=0
VK.keys[8].ava=false
P.modeData.rotations=P.modeData.rotations+1
if P.modeData.rotations>=2 and not (P.curY>P.gameEnv.fieldH-2 or P:_roofCheck()) then
P.keyAvailable[3]=false
P.keyAvailable[4]=false
P.keyAvailable[5]=false
VK.keys[3].ava=false
VK.keys[4].ava=false
VK.keys[5].ava=false
end
end
local function resetLock(P)
for i=1,8 do
P.keyAvailable[i]=true
VK.keys[i].ava=true
end
P.modeData.moveCount=0
P.modeData.rotations=0
P.holdTime=1
end
return {
arr=0,
fineKill=true,
mesDisp=function(P)
setFont(45)
GC.mStr(("%d"):format(P.stat.atk),63,190)
GC.mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310)
mText(TEXTOBJ.atk,63,243)
mText(TEXTOBJ.eff,63,363)
end,
task=function(P)
resetLock(P)
end,
hook_drop=function(P)
resetLock(P)
if P.stat.atk>=100 then
P:win('finish')
end
end,
hook_left_manual=onMove, hook_right_manual=onMove,
hook_rotLeft=onRotate, hook_rotRight=onRotate, hook_rot180=onRotate
}
63 changes: 63 additions & 0 deletions parts/eventsets/tech_finesse_lock_f.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
local function onMove(P)
if not P.cur then return end
P.holdTime=0
VK.keys[8].ava=false
P.modeData.moveCount=P.modeData.moveCount+1
if P.modeData.moveCount>=2 and (P.curY>P.gameEnv.fieldH-2 or P:_roofCheck()) then
P.keyAvailable[1]=false
P.keyAvailable[2]=false
VK.keys[1].ava=false
VK.keys[2].ava=false
end
end
local function onRotate(P)
if not P.cur then return end
P.holdTime=0
VK.keys[8].ava=false
P.modeData.rotations=P.modeData.rotations+1
if P.modeData.rotations>=2 and not (P.curY>P.gameEnv.fieldH-2 or P:_roofCheck()) then
P.keyAvailable[3]=false
P.keyAvailable[4]=false
P.keyAvailable[5]=false
VK.keys[3].ava=false
VK.keys[4].ava=false
VK.keys[5].ava=false
end
end
local function resetLock(P)
for i=1,8 do
P.keyAvailable[i]=true
VK.keys[i].ava=true
end
P.modeData.moveCount=0
P.modeData.rotations=0
P.holdTime=1
end
return {
arr=0,
fineKill=true,
mesDisp=function(P)
setFont(45)
GC.mStr(("%d"):format(P.stat.atk),63,190)
GC.mStr(("%.2f"):format(P.stat.atk/P.stat.row),63,310)
mText(TEXTOBJ.atk,63,243)
mText(TEXTOBJ.eff,63,363)
end,
task=function(P)
resetLock(P)
end,
hook_drop=function(P)
resetLock(P)
if P.lastPiece.row>0 then
if not P.lastPiece.special then
P:lose()
return
end
end
if P.stat.atk>=100 then
P:win('finish')
end
end,
hook_left_manual=onMove, hook_right_manual=onMove,
hook_rotLeft=onRotate, hook_rotRight=onRotate, hook_rot180=onRotate
}
221 changes: 112 additions & 109 deletions parts/language/lang_en.lua

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions parts/language/lang_es.lua
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ return {
"huaji2369",
"Lexitik",
"Tourahi Anime",
"PopUpWaffles",
"[Todo el staff de testeo]",
"…Y a ti!",
},
Expand Down Expand Up @@ -897,6 +898,8 @@ return {
['tech_l_plus']= {"Tech", "Lunático+", "¡Sólo se permiten Spins y PCs!"},
['tech_finesse']= {"Tech", "Finesse", "¡No cometas errores de Finesse!"},
['tech_finesse_f']= {"Tech", "Finesse+", "Sin errores de finesse,\n¡pero tampoco clears normales!"},
-- ['tech_finesse_lock']= {"Tech", "FINESSE LOCK", "No finesse errors, combined with limited inputs!"},
-- ['tech_finesse_lock_f']= {"Tech", "FINESSE+ LOCK", "No normal clears or finesse errors combined with limited inputs!"},
['tsd_e']= {"Desafío de TSD", "Fácil", "¡Sólo se permiten T-Spin Dobles!"},
['tsd_h']= {"Desafío de TSD", "Difícil", "¡Sólo se permiten T-Spin Dobles!"},
['tsd_u']= {"Desafío de TSD", "Supremo", "¡Sólo se permiten T-Spin Dobles!"},
Expand Down
3 changes: 3 additions & 0 deletions parts/language/lang_fr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ return {
"huaji2369",
"Lexitik",
"Tourahi Anime",
"PopUpWaffles",
"[All other test staff]",
"…And You!",
},
Expand Down Expand Up @@ -868,6 +869,8 @@ return {
['tech_l_plus']= {"Tech", "LUNATIQUE+", "Spin & PC uniquement"},
['tech_finesse']= {"Tech", "FINESSE", "Pas d'erreurs de finesse !"},
['tech_finesse_f']={"Tech", "FINESSE+", "Pas de nettoyages normaux,\nPas d'erreurs de finesse !"},
--['tech_finesse_lock']= {"Tech", "FINESSE LOCK", "No finesse errors, combined with limited inputs!"},
--['tech_finesse_lock_f']= {"Tech", "FINESSE+ LOCK", "No normal clears or finesse errors combined with limited inputs!"},
['tsd_e']= {"TSD Challenge", "FACILE", "T-spin doubles uniquement !"},
['tsd_h']= {"TSD Challenge", "DIFFICILE", "T-spin doubles uniquement !"},
['tsd_u']= {"TSD Challenge", "ULTIME", "T-spin doubles uniquement !"},
Expand Down
Loading

0 comments on commit 9769b33

Please sign in to comment.