-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "Tech Finesse Lock" modes and some other improvements (#946)
* Improve Tech FInesse modes and add new player hooks * Add Tech Finesse[+] Lock into mode map * Credit PopUpWaffles * Rearrange mode map
- Loading branch information
1 parent
5196874
commit 9769b33
Showing
20 changed files
with
596 additions
and
365 deletions.
There are no files selected for viewing
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.