Compare commits

...

14 Commits

Author SHA1 Message Date
MrZ_26
becc092192 0.10.4:漏洞修复 2020-08-14 00:25:00 +08:00
MrZ_26
185862eabf 锁延机制错误(重构锁延代码) 2020-08-13 23:59:26 +08:00
MrZ_26
19ce62997b 代码整理 2020-08-13 23:53:07 +08:00
MrZ_26
d8c096b06b 修复拼图模式序列准备错误(改了自定义忘了改这个) 2020-08-13 21:43:05 +08:00
MrZ_26
aa836c7028 修复游戏结束后马上暂停并解除还会自动暂停(之前没修好) 2020-08-13 02:42:03 +08:00
MrZ_26
e5e378fa07 更改减速debug模式速度 2020-08-13 02:33:31 +08:00
MrZ_26
230514e34a 一条tip 2020-08-13 02:33:03 +08:00
MrZ_26
d196d73448 修复提前硬降失效 2020-08-13 02:09:30 +08:00
MrZ_26
cb98a9094a 修复计算器切场景bug 2020-08-12 22:57:43 +08:00
MrZ_26
ec036037fe 0.10.4:漏洞修复 2020-08-12 21:56:02 +08:00
MrZ_26
882769bb71 修改场景模块方法名 2020-08-12 21:45:42 +08:00
MrZ_26
ba43e5e6a7 软件锁变量名修改 2020-08-12 18:47:00 +08:00
MrZ_26
09c56d74bd 代码整理 2020-08-12 18:46:52 +08:00
MrZ_26
c78630a31e linter查出的几个小问题 2020-08-12 18:43:42 +08:00
18 changed files with 205 additions and 162 deletions

View File

@@ -186,12 +186,12 @@ function keyDown.calculator(k)
TEXT.show("\68\69\86\58\85\78\76\79\67\75\65\76\76",640,360,60,"stretch",.6)
SFX.play("clear_2")
elseif S.val==137926261379 then
SCN.goto("debug")
SCN.go("debug")
end
end
elseif k=="space"then
if S.pass then
SCN.goto("load")
SCN.swapTo("load")
end
end
end
@@ -203,6 +203,8 @@ function keyDown.load(k)
elseif k=="s"then
marking=nil
sceneTemp.skip=true
elseif k=="escape"then
SCN.back()
end
end
function touchDown.load(id,x,y)
@@ -216,7 +218,7 @@ function mouseDown.intro(x,y,k)
VOC.play("bye")
SCN.back()
else
SCN.goto("main")
SCN.go("main")
end
end
function touchDown.intro(id,x,y)
@@ -339,7 +341,7 @@ function keyDown.mode(key)
end
elseif mapCam.sel=="custom_clear" or mapCam.sel=="custom_puzzle" then
if key=="e"then
SCN.goto("custom")
SCN.go("custom")
end
end
end
@@ -396,7 +398,7 @@ function keyDown.custom(key)
BGM.play(customRange.bgm[customSel[sel]])
end
elseif key=="q"then
SCN.goto("sequence")
SCN.go("sequence")
elseif key=="e"then
SCN.swapTo("draw","swipe")
elseif #key==1 then
@@ -685,7 +687,7 @@ function keyDown.pause(key)
elseif key=="escape"then
resumeGame()
elseif key=="s"then
SCN.goto("setting_sound")
SCN.go("setting_sound")
elseif key=="r"then
TASK.clear("play")
resetGameData()
@@ -1092,7 +1094,7 @@ function love.run()
local FCT=0--Framedraw counter
love.resize(gc.getWidth(),gc.getHeight())
SCN.init(setting.lock and "calculator"or"load")--Scene Launch
SCN.init(setting.appLock and "calculator"or"load")--Scene Launch
marking=true
return function()
@@ -1162,7 +1164,7 @@ function love.run()
--Draw scene swapping animation
if SCN.swapping then
_=SCN.swap
_=SCN.stat
_.draw(_.time)
end
@@ -1184,8 +1186,8 @@ function love.run()
for i=1,#LIST do
gc.rectangle("fill",900+2*i,_,2,-LIST[i]*4000)
end
if devMode==3 then WAIT(.26)
elseif devMode==4 then WAIT(.626)
if devMode==3 then WAIT(.1)
elseif devMode==4 then WAIT(.5)
end
end

View File

@@ -85,8 +85,6 @@ local langList={
unlockSavingError="解锁保存失败:",
recSavingError="纪录保存失败:",
ai_fixed="不能同时开启AI和固定序列",
ai_prebag="不能同时开启AI和自定义序列",
switchSpawnSFX="请开启方块出生音效",
needRestart="重新开始以生效",
@@ -277,7 +275,7 @@ local langList={
autoPause="失去焦点自动暂停",
swap="组合键切换攻击模式",
fine="极简操作提示音",
lock="软件锁(密码626)",
appLock="软件锁(密码626)",
back="返回",
},
setting_video={
@@ -555,8 +553,6 @@ local langList={
unlockSavingError="解锁保存失败:",
recSavingError="纪录保存失败:",
ai_fixed="不能同时开启电脑玩家和固定序列",
ai_prebag="不能同时开启电脑玩家和自定义序列",
switchSpawnSFX="请开启方块出生音效",
needRestart="重新开始以生效",
@@ -746,7 +742,7 @@ local langList={
autoPause="失去焦点自动暂停",
swap="组合键切换攻击模式",
fine="极简操作提示音",
lock="软件锁(密码626)",
appLock="软件锁(密码626)",
back="返回",
},
setting_video={
@@ -1024,8 +1020,6 @@ local langList={
unlockSavingError="Failed to save unlock:",
recSavingError="Failed to save record:",
ai_fixed="AI is incompatible with fixed sequence",
ai_prebag="AI is incompatible with custom sequence",
switchSpawnSFX="Switch on spawn SFX to play",
needRestart="Effective after restart",
@@ -1204,7 +1198,7 @@ local langList={
autoPause="Pause when lose focus",
swap="Key Combination (Change Atk. Mode)",
fine="Finesse Error Sound",
lock="Game Lock(pw=626)",
appLock="App Lock(pw=626)",
back="Back",
},
setting_video={
@@ -1658,7 +1652,7 @@ local langList={
autoPause="A||",
swap="=+=+=",
fine="!#!X #!#",
lock="?XX(=626)",
appLock="?XX(=626)",
back="X",
},
setting_video={
@@ -1938,8 +1932,6 @@ local langList={
unlockSavingError="解锁保存失败:",
recSavingError="纪录保存失败:",
ai_fixed="不能同时开启AI和固定序列",
ai_prebag="不能同时开启AI和自定义序列",
switchSpawnSFX="请开启方块出生音效",
needRestart="重新开始以生效",
@@ -2130,7 +2122,7 @@ local langList={
autoPause="失去焦点自动暂停",
swap="组合键切换攻击模式",
fine="极简操作提示音",
lock="家长锁(密码626)",
appLock="家长锁(密码626)",
back="返回",
},
setting_video={

View File

@@ -329,7 +329,7 @@ end
local SCN={
cur="load",--Current scene
swapping=false,--If Swapping
swap={
stat={
tar=nil, --Swapping target
style=nil, --Swapping style
mid=nil, --Loading point
@@ -340,7 +340,7 @@ local SCN={
}--Scene datas, returned
function SCN.swapUpdate()
local S=SCN.swap
local S=SCN.stat
S.time=S.time-1
if S.time==S.mid then
SCN.init(S.tar,SCN.cur)
@@ -395,7 +395,7 @@ local swap={
end},
}--Scene swapping animations
function SCN.swapTo(tar,style)--Parallel scene swapping, cannot back
local S=SCN.swap
local S=SCN.stat
if not SCN.swapping and tar~=SCN.cur then
SCN.swapping=true
if not style then style="fade"end
@@ -407,7 +407,7 @@ function SCN.swapTo(tar,style)--Parallel scene swapping, cannot back
S.draw=swap[3]
end
end
function SCN.goto(tar,style)--Normal scene swapping, can back
function SCN.go(tar,style)--Normal scene swapping, can back
SCN.push()SCN.swapTo(tar,style)
end
function SCN.back()

View File

@@ -131,7 +131,7 @@ function Tmr.mode(dt)
cam.x1=cam.x1*.85+x*.15
cam.y1=cam.y1*.85+y*.15
cam.k1=cam.k1*.85+k*.15
local _=SCN.swap.tar
local _=SCN.stat.tar
cam.zoomMethod=_=="play"and 1 or _=="mode"and 2
if cam.zoomMethod==1 then
if cam.sel then

View File

@@ -118,18 +118,18 @@ local Widgets={
newButton({name="play", x=800,y=600,w=180,h=90, color="lGreen", font=40,code=pressKey("space"),hide=function()return not sceneTemp.pass end}),
},
main={
newButton({name="play", x=150,y=280,w=200,h=160,color="lRed", font=55,code=function()SCN.goto("mode")end}),
newButton({name="setting", x=370,y=280,w=200,h=160,color="lBlue", font=45,code=function()SCN.goto("setting_game")end}),
newButton({name="music", x=590,y=280,w=200,h=160,color="lPurple",font=32,code=function()SCN.goto("music")end}),
newButton({name="help", x=150,y=460,w=200,h=160,color="lYellow",font=50,code=function()SCN.goto("help")end}),
newButton({name="stat", x=370,y=460,w=200,h=160,color="lCyan", font=43,code=function()SCN.goto("stat")end}),
newButton({name="play", x=150,y=280,w=200,h=160,color="lRed", font=55,code=function()SCN.go("mode")end}),
newButton({name="setting", x=370,y=280,w=200,h=160,color="lBlue", font=45,code=function()SCN.go("setting_game")end}),
newButton({name="music", x=590,y=280,w=200,h=160,color="lPurple",font=32,code=function()SCN.go("music")end}),
newButton({name="help", x=150,y=460,w=200,h=160,color="lYellow",font=50,code=function()SCN.go("help")end}),
newButton({name="stat", x=370,y=460,w=200,h=160,color="lCyan", font=43,code=function()SCN.go("stat")end}),
newButton({name="qplay", x=590,y=460,w=200,h=160,color="lOrange",font=43,code=function()SCN.push()loadGame(stat.lastPlay,true)end}),
newButton({name="lang", x=150,y=610,w=160,h=100,color="lGreen", font=45,code=function()SCN.goto("setting_lang")end}),
newButton({name="lang", x=150,y=610,w=160,h=100,color="lGreen", font=45,code=function()SCN.go("setting_lang")end}),
newButton({name="quit", x=590,y=610,w=160,h=100,color="lGrey", font=45,code=function()VOC.play("bye")SCN.swapTo("quit","slowFade")end}),
},
mode={
newButton({name="setting", x=1100,y=540,w=240,h=90,color="lGreen", font=40,code=function()
SCN.goto("custom")
SCN.go("custom")
end,
hide=function()
return mapCam.sel~="custom_clear" and mapCam.sel~="custom_puzzle"
@@ -238,18 +238,18 @@ local Widgets={
setting_game={
newButton({name="graphic", x=200, y=80, w=240,h=80, color="lCyan", font=35,code=function()SCN.swapTo("setting_video","swipe")end}),
newButton({name="sound", x=1080, y=80, w=240,h=80, color="lCyan", font=35,code=function()SCN.swapTo("setting_sound","swipe")end}),
newButton({name="ctrl", x=290, y=220, w=320,h=80, color="lYellow",font=35,code=function()SCN.goto("setting_control")end}),
newButton({name="key", x=640, y=220, w=320,h=80, color="lGreen", font=35,code=function()SCN.goto("setting_key")end}),
newButton({name="touch", x=990, y=220, w=320,h=80, color="lBlue", font=35,code=function()SCN.goto("setting_touch")end}),
newButton({name="ctrl", x=290, y=220, w=320,h=80, color="lYellow",font=35,code=function()SCN.go("setting_control")end}),
newButton({name="key", x=640, y=220, w=320,h=80, color="lGreen", font=35,code=function()SCN.go("setting_key")end}),
newButton({name="touch", x=990, y=220, w=320,h=80, color="lBlue", font=35,code=function()SCN.go("setting_touch")end}),
newSlider({name="reTime", x=350, y=340, w=300,unit=10, font=30,disp=SETval("reTime"), code=SETsto("reTime")}),
newSlider({name="maxNext", x=350, y=440, w=300,unit=6, font=30,disp=SETval("maxNext"), code=SETsto("maxNext")}),
newButton({name="layout", x=460, y=540, w=140,h=70,color="white", font=35,code=function()
SCN.goto("setting_skin")
SCN.go("setting_skin")
end}),
newSwitch({name="autoPause",x=1080, y=320, font=20,disp=SETval("autoPause"), code=SETrev("autoPause")}),
newSwitch({name="swap", x=1080, y=380, font=20,disp=SETval("swap"), code=SETrev("swap")}),
newSwitch({name="fine", x=1080, y=440, font=20,disp=SETval("fine"), code=SETrev("fine")}),
newSwitch({name="lock", x=1080, y=500, font=20,disp=SETval("lock"), code=SETrev("lock")}),
newSwitch({name="appLock", x=1080, y=500, font=20,disp=SETval("appLock"), code=SETrev("appLock")}),
newButton({name="back", x=1140, y=650, w=200,h=80,color="white", font=40,code=BACK}),
},
setting_video={
@@ -390,7 +390,7 @@ local Widgets={
end}),
newButton({name="option", x=520,y=180,w=170,h=80,color="white",font=40,
code=function()
SCN.goto("setting_touchSwitch")
SCN.go("setting_touchSwitch")
end}),
newButton({name="back", x=760,y=180,w=170,h=80,color="white",font=40,code=BACK}),
newSlider({name="size", x=450,y=265,w=460,unit=14,font=40,
@@ -436,7 +436,7 @@ local Widgets={
newSwitch({name="icon", x=850, y=300, font=40,disp=SETval("VKIcon"),code=SETrev("VKIcon")}),
newButton({name="tkset", x=1120, y=420, w=240,h=80,color="white",font=32,
code=function()
SCN.goto("setting_trackSetting")
SCN.go("setting_trackSetting")
end,
hide=function()
return not setting.VKTrack
@@ -459,8 +459,8 @@ local Widgets={
newButton({name="back", x=640, y=600,w=200,h=80,color="white",font=40,code=BACK}),
},
help={
newButton({name="staff", x=980, y=500,w=150,h=80,color="white",font=32,code=function()SCN.goto("staff")end}),
newButton({name="his", x=1160, y=500,w=150,h=80,color="white",font=32,code=function()SCN.goto("history")end}),
newButton({name="staff", x=980, y=500,w=150,h=80,color="white",font=32,code=function()SCN.go("staff")end}),
newButton({name="his", x=1160, y=500,w=150,h=80,color="white",font=32,code=function()SCN.go("history")end}),
newButton({name="qq", x=1070, y=600,w=200,h=80,color="white",font=32,code=function()love.system.openURL("tencent://message/?uin=1046101471&Site=&Menu=yes")end,hide=mobileHide}),
newButton({name="back", x=640, y=600,w=200,h=80,color="white",font=40,code=BACK}),
},

View File

@@ -1,4 +1,4 @@
gameVersion="Alpha V0.10.3"
gameVersion="Alpha V0.10.4"
function love.conf(t)
t.identity="Techmino"--Saving folder
t.version="11.1"

View File

@@ -1,11 +1,11 @@
--[[
______ __ _
/_ __/___ _____ / /_ ____ ___ (_)____ ____
/ / / _ \ / ___// __ \ / __ `__ \ / // __ \ / __ \
/ / / __// /__ / / / // / / / / // // / / // /_/ /
/_/ \___/ \___//_/ /_//_/ /_/ /_//_//_/ /_/ \____/
Techmino is my first "huge project"
optimization is welcomed if you also love tetromino game
______ __ _
/_ __/___ _____ / /_ ____ ___ (_)____ ____
/ / / _ \ / ___// __ \ / __ `__ \ / // __ \ / __ \
/ / / __// /__ / / / // / / / / // // / / // /_/ /
/_/ \___/ \___//_/ /_//_/ /_/ /_//_//_/ /_/ \____/
Techmino is my first "huge project"
optimization is welcomed if you also love tetromino game
]]--
--?
@@ -19,7 +19,6 @@ love.keyboard.setTextInput(false)
love.mouse.setVisible(false)
system=love.system.getOS()
game={}
mapCam={
sel=nil,--Selected mode ID
@@ -41,8 +40,8 @@ preField={h=20}for i=1,20 do preField[i]={0,0,0,0,0,0,0,0,0,0}end
preBag={}
game={
frame=0, --Frame count
result=0, --Game result
frame=0, --Frame count
result=false, --Game result (string)
pauseTime=0, --Time paused
pauseCount=0, --Pausing count
garbageSpeed=1, --Garbage timing speed
@@ -50,7 +49,16 @@ game={
warnLVL=0, --Warning level (show)
recording=false, --If recording
replaying=false, --If replaying
rec={}, --Recording list, key-time
seed=math.random(999999999),--Game seed
setting={}, --Game settings
rec={}, --Recording list, key,time,key,time...
--Data for royale mode
stage=nil, --Game stage
mostBadge=nil, --Most badge owner
secBadge=nil, --Second badge owner
mostDangerous=nil, --Most dangerous player
secDangerous=nil, --Second dangerous player
}--Global game data
players={alive={}}--Players data
curMode=nil--Current mode object

View File

@@ -4,7 +4,7 @@ return{
color=color.magenta,
env={
drop=15,lock=45,
fall=10,lock=60,
fall=10,
center=false,
visible="none",
dropPiece=PLY.reach_winCheck,

View File

@@ -7,7 +7,6 @@ return{
freshLimit=10,
visible="fast",
dropPiece=PLY.reach_winCheck,
freshLimit=10,
target=200,
bg="glow",bgm="reason",
},

View File

@@ -31,7 +31,11 @@ return{
end
modeEnv._20G=modeEnv.drop==0
modeEnv.oncehold=customSel[6]==1
if preBag[1]then modeEnv.bag=preBag end
if preBag[1]then
modeEnv.bag=preBag
else
modeEnv.bag=nil
end
modeEnv.target=0
PLY.newPlayer(1,340,15)
local L=modeEnv.opponent

View File

@@ -17,7 +17,6 @@ return{
color=color.green,
env={
noFly=true,
minsdarr=1,
wait=8,fall=20,
target=10,dropPiece=check_LVup,
mindas=7,minarr=1,minsdarr=1,

View File

@@ -10,7 +10,7 @@ setting={
reTime=4,
autoPause=true,
fine=false,
lock=false,
appLock=false,
lang=1,
skinSet=1,
skin={1,5,8,2,10,3,7,1,5,1,5,8,2,10,3,7,10,7,8,2,8,2,1,5,3},

View File

@@ -310,7 +310,6 @@ function resetGameData()
destroyPlayers()
modeEnv=curMode.env
math.randomseed(game.seed)
curMode.load()--BG/BGM need redefine in custom,so up here
if modeEnv.task then
for i=1,#players do
@@ -363,7 +362,6 @@ function resetPartGameData(replaying)
destroyPlayers()
modeEnv=curMode.env
math.randomseed(game.seed)
curMode.load()
if modeEnv.task then
for i=1,#players do
@@ -388,8 +386,8 @@ function gameStart()
SFX.play("start")
for P=1,#players do
P=players[P]
P:popNext()
P.timing=true
P.control=true
P.timing=true
P:popNext()
end
end

View File

@@ -15,7 +15,6 @@ if setting.lang==1 or setting.lang==2 then
"O spin Triple!",
"nullpomino也很好玩!",
"Naki 可爱!",
"Miya:喵!",
"Miya 可爱!",
"Lua天下第一",
"LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF",
@@ -29,7 +28,6 @@ if setting.lang==1 or setting.lang==2 then
"DT炮=TSD+TST炮",
"Cultris II也很好玩!",
"COOL!!",
"CLASSIC SEXY RUSSIAN BLOCKS",
"BT炮=beta炮",
"B2B2B2B存在吗?",
"B2B2B???",
@@ -39,7 +37,8 @@ if setting.lang==1 or setting.lang==2 then
"有疑问? 先看设置有没有你想要的",
"有建议的话可以把信息反馈给作者~",
"学会使用两个旋转键, 三个更好",
"享受特色旋转系统!",
"新人请千万记住,打好基础,不要太早学那些花里胡哨的",
"享受Tech的特色旋转系统!",
"无聊翻翻设置是好习惯",
"我的世界好玩!",
"提前旋转等设置可以用来救命",
@@ -49,9 +48,11 @@ if setting.lang==1 or setting.lang==2 then
"少女祈祷中",
"扫雷好玩!",
"哦,我的上帝",
"你可以长按R键重新开始游戏(也不是很长)",
"你可以从统计页面打开游戏存档目录",
"你好 世界!",
"魔方好玩!",
"喵!",
"免费吃鸡方块",
"秘密数字:626",
"每个虚拟按键都可以隐藏/显示",
@@ -60,6 +61,8 @@ if setting.lang==1 or setting.lang==2 then
"没学过编曲,音乐都是自己凭感觉写的,觉得不好听就设置里关了吧",
"联网还没做呢, 别急",
"键位是可以自定义的",
"健康小贴士:上厕所太用力容易脑出血(尤其是老年人!)",
"健康小贴士:不要熬夜,真的容易猝死",
"合群了就会消失, 但是消失不代表没有意义",
"更小的DAS和ARR拥有更高的操作上限(如果你还能控制得了的话)",
"俄罗斯方块环游记也不错!",
@@ -68,7 +71,6 @@ if setting.lang==1 or setting.lang==2 then
"戴上耳机以获得最佳体验",
"大满贯10连击消四全清!",
"打好块没有捷径,多练",
"你可以长按R键重新开始游戏(也不是很长)",
"茶娘 可爱!",
"草(日本语)",
"不要在上课时玩游戏!",
@@ -90,6 +92,7 @@ if setting.lang==1 or setting.lang==2 then
"2.7182818284590452353",
"15puzzle好玩!",
"11renPC!",
"100行内23PC来一个?",
"1, 2, 9!!!!!",
"<方块研究所>有一个Nspire-CX版本!",
"↑↑↓↓←→←→BABA",
@@ -111,8 +114,8 @@ elseif setting.lang==3 then
"This in not a casual game",
"This game can be very hard,be mentally perpared",
"Tetris journey has network battle!",
"Terraria is fun!",
"Tetralegends is fun!",
"Terraria is fun!",
"Techmino=Technique+Tetromino",
"Techmino is so fun!",
"Techmino has a Nspire-CX edition!",
@@ -140,10 +143,10 @@ elseif setting.lang==3 then
"l-=-1",
"Is B2B2B2B possible?",
"Initial Rotation etc. can save your life",
"Hold R key to restart game",
"Hello world!",
"Headphones for better experience",
"Have you noticed what does \"rotating\" do to block?",
"Hold R key to restart game",
"Find out what's in the setting!",
"Enjoy Tech. Rotation System!",
"e^(pi*i/2)=i",
@@ -155,8 +158,7 @@ elseif setting.lang==3 then
"Disappearing doesn't mean useless",
"Diao so bully",
"COOL!!",
"CLASSIC SEXY RUSSIAN BLOCKS",
"BT cannon=beta",
"BT cannon=beta cannon",
"Back to Back 10 combo Techrash PC!",
"B2B2B???",
"Any suggestions to author!",
@@ -164,9 +166,9 @@ elseif setting.lang==3 then
"Also try VVVVVV!",
"Also try Tetr.js!",
"Also try Tetr.io!",
"Also try Nullpomino!",
"Also try Jstris!",
"Also try Cultris II!",
"Also try Nullpomino!",
"ALLSPIN!",
"少女祈禱中",
"40L WR: 15.654s",
@@ -223,7 +225,7 @@ elseif setting.lang==5 then
--[[23]]"大半夜的在这干啥呢?不睡觉是会猝死的",
}
return time[tonumber(os.date("%H"))+1]
elseif true or R<.1 then
elseif R<.1 then
local int=math.floor
L={
"平均"..int(stat.row/stat.time*60).."LPM,那可真强呢",
@@ -243,8 +245,10 @@ elseif setting.lang==5 then
"我一个滑铲就挖了个11renPC",
"我曾经在极度愤怒的时候15秒消了40行",
"天天F3F3,怕别人不知道你菜?",
"天天卖弱,你一定把把150apm吧?",
"天天催更催更,你咋不来帮忙开发啊,真以为作者很强催催啥都有?",
"设置都看过一遍了吗?明明都能调还嫌这嫌那,可牛逼了您",
"少玩点,多眨眼,到时候瞎了别怪我没提醒你",
"人只用一只手都能玩,你呢?",
"没那水平别天天整什么花里胡哨的,人玩几年你想几天赶上?",
"满口PCDT信天翁,还会点别的么?",
@@ -253,6 +257,7 @@ elseif setting.lang==5 then
"还搁这玩手机呢,作业做完了?",
"除了雨宫太阳你还认识谁?Jonas知道吗?Ajanba听过吗?",
"不会吧不会吧,真的还有人不能随手Tspin?",
"别会个c4w就以为自己多强,这是基本功罢了",
"60lpm?拍硬降刷的吧",
"4pps不是人均水平?",
"40行还要40多秒,就这?",
@@ -260,9 +265,8 @@ elseif setting.lang==5 then
"20连pc不是随手?",
"100apm?定式刷的吧",
"0202年了,还在玩这种小孩子玩的游戏?",
"天天卖弱,你一定把把150apm吧?",
"别会个c4w就以为自己多强,这是基本功罢了",
"少玩点,多眨眼,到时候瞎了别怪我没提醒你",
"极限20G?那不是随手通",
"全隐40行全消四很难吗??",
}
end
end

View File

@@ -114,7 +114,6 @@ local TRS={
},--T
function(P,d)
if P.human then SFX.fieldPlay("rotate",nil,P)end
P:freshLockDelay()
if not P.gameEnv.ospin then return end
local x,y=P.curX,P.curY
if y==P.imgY and((P:solid(x-1,y)or P:solid(x-1,y+1)))and(P:solid(x+2,y)or P:solid(x+2,y+1))then
@@ -136,7 +135,7 @@ local TRS={
P.dir,P.sc=dir,scs[id][dir]
P.spinLast=2
P.stat.rotate=P.stat.rotate+1
P:freshgho()
P:freshBlock(false,true)
P.spinSeq=0
SFX.fieldPlay("rotatekick",nil,P)
return
@@ -146,6 +145,7 @@ local TRS={
else
P.spinSeq=0
end
P:freshBlock(true,true)
end,--O
{
[01]={{ 0, 1},{ 1, 0},{-2, 0},{-2,-1},{ 1, 2}},
@@ -256,18 +256,18 @@ local TRS={
},--W
function(P,d)
if P.human then SFX.fieldPlay("rotate",nil,P)end
P:freshLockDelay()
local iki=XspinList[d]
for test=1,#iki do
local x,y=P.curX+iki[test][1],P.curY+iki[test][2]
if not P:ifoverlap(P.cur.bk,x,y)then
P.curX,P.curY=x,y
P.spinLast=1
P:freshgho()
P:freshBlock(false,true)
P.stat.rotate=P.stat.rotate+1
return
end
end
P:freshBlock(true,true)
end,--X
{
[01]={{-1, 0},{-1, 1},{ 0,-3},{-1, 1},{-1, 2},{ 0, 1}},

View File

@@ -437,7 +437,7 @@ local function Pupdate_alive(P,dt)
P.curY=P.imgY
end
end
P:freshMinY()
P:freshBlock(true,true)
P.spinLast=false
if P.imgY~=P.curY then
@@ -811,6 +811,12 @@ local function Pdraw_norm(P)
mStr(format("%.2f",P.stat.time),-81,518)--Time
mStr(P.score1,-81,560)--Score
--Display Ys
-- gc.setLineWidth(6)
-- if P.curY then gc.setColor(1,.4,0,.626)gc.line(0,611-P.curY*30,300,611-P.curY*30)end
-- if P.imgY then gc.setColor(0,1,.4,.626)gc.line(0,615-P.imgY*30,300,615-P.imgY*30)end
-- if P.minY then gc.setColor(0,.4,1,.626)gc.line(0,619-P.minY*30,300,619-P.minY*30)end
--Other messages
gc.setColor(1,1,1)
curMode.mesDisp(P)
@@ -1238,7 +1244,7 @@ function player.pushLine(P,L,mir)
P.fieldBeneath=P.fieldBeneath+120
P.curY=P.curY+#L
P.imgY=P.imgY+#L
P:freshgho()
P:freshBlock(true,false)
end
function player.pushNext(P,L,mir)
for i=1,#L do
@@ -1293,59 +1299,64 @@ function player.changeAtk(P,R)
P.atking=nil
end
end
function player.freshgho(P)
if not P.cur then return end
P.imgY=min(#P.field+1,P.curY)
function player.freshBlock(P,keepGhost,control,system)
if not keepGhost and P.cur then
P.imgY=min(#P.field+1,P.curY)
if P.gameEnv._20G or P.keyPressing[7]and P.gameEnv.sdarr==0 then
local _=P.imgY
if P.gameEnv._20G or P.keyPressing[7]and P.gameEnv.sdarr==0 then
local _=P.imgY
--Move ghost to bottom
while not P:ifoverlap(P.cur.bk,P.curX,P.imgY-1)do
P.imgY=P.imgY-1
end
--Cancel spinLast
if _~=P.imgY then
P.spinLast=false
end
--Create FX if dropped
if P.curY>P.imgY then
if P.gameEnv.dropFX then
P:createDropFX(P.curX,P.curY+1,P.curX+P.c-1,P.imgY+P.r-1)
--Move ghost to bottom
while not P:ifoverlap(P.cur.bk,P.curX,P.imgY-1)do
P.imgY=P.imgY-1
end
if P.gameEnv.shakeFX then
P.fieldOff.vy=P.gameEnv.shakeFX*.5
--Cancel spinLast
if _~=P.imgY then
P.spinLast=false
end
--Create FX if dropped
if P.curY>P.imgY then
if P.gameEnv.dropFX then
P:createDropFX(P.curX,P.curY+1,P.curX+P.c-1,P.imgY+P.r-1)
end
if P.gameEnv.shakeFX then
P.fieldOff.vy=P.gameEnv.shakeFX*.5
end
P.curY=P.imgY
end
else
while not P:ifoverlap(P.cur.bk,P.curX,P.imgY-1)do
P.imgY=P.imgY-1
end
P.curY=P.imgY
end
else
while not P:ifoverlap(P.cur.bk,P.curX,P.imgY-1)do
P.imgY=P.imgY-1
end
end
end
function player.freshLockDelay(P)
--Return when fall-fresh but no fall
if not P.gameEnv.easyFresh and P.curY>=P.minY then
return
end
local d,d0=P.lockDelay,P.gameEnv.lock
if d<d0 and(P.freshTime<P.gameEnv.freshLimit or P.curY<P.minY)then
if P.lockDelay<P.gameEnv.lock then
P.dropDelay=P.gameEnv.drop
if control then
if P.gameEnv.easyFresh then
local d,d0=P.lockDelay,P.gameEnv.lock
if d<d0 and P.freshTime<P.gameEnv.freshLimit then
if not system then
P.freshTime=P.freshTime+1
end
P.lockDelay=min(d+d0*.6,d0)
P.dropDelay=P.gameEnv.drop
end
if P.curY<P.minY then
P.minY=P.curY
P.dropDelay=P.gameEnv.drop
P.lockDelay=P.gameEnv.lock
end
else
if P.curY<P.minY then
P.minY=P.curY
if P.lockDelay<P.gameEnv.lock and P.freshTime<P.gameEnv.freshLimit then
P.freshTime=P.freshTime+1
P.dropDelay=P.gameEnv.drop
P.lockDelay=P.gameEnv.lock
end
end
end
P.freshTime=P.freshTime+1
P.lockDelay=min(d+d0*.6,d0)
end
end
function player.freshMinY(P)
if P.curY<P.minY then
P.freshTime=max(P.freshTime-1,0)
P.minY=P.curY
P.lockDelay=P.gameEnv.lock
end
end
function player.lock(P)
@@ -1370,7 +1381,9 @@ function player.spin(P,d,ifpre)
local ix,iy=P.curX+P.sc[2]-isc[2],P.curY+P.sc[1]-isc[1]
iki=iki[P.dir*10+idir]
if not iki then
if P.gameEnv.easyFresh then P:freshLockDelay()end
if P.gameEnv.easyFresh then
P:freshBlock(false,true)
end
SFX.fieldPlay(ifpre and"prerotate"or "rotate",nil,P)
return
end
@@ -1385,10 +1398,10 @@ function player.spin(P,d,ifpre)
P.sc,P.cur.bk=scs[P.cur.id][idir],icb
P.r,P.c=ir,ic
P.spinLast=test==2 and 0 or 1
if not ifpre then P:freshgho()end
P:freshLockDelay()
P:freshMinY()
if iki[test][2]>0 then
if not ifpre then
P:freshBlock(false,true)
end
if iki[test][2]>0 and not P.gameEnv.easyFresh then
P.freshTime=P.freshTime+1
end
@@ -1487,8 +1500,10 @@ function player.hold(P,ifpre)
end
if C then
P:resetBlock()
P:freshgho()
P.dropDelay,P.lockDelay,P.freshTime=P.gameEnv.drop,P.gameEnv.lock,max(P.freshTime-5,0)
P:freshBlock(false,true)
P.dropDelay=P.gameEnv.drop
P.lockDelay=P.gameEnv.lock
P.freshTime=max(P.freshTime-5,0)
if P:ifoverlap(P.cur.bk,P.curX,P.curY)then P:lock()P:lose()end
end
@@ -1519,7 +1534,7 @@ function player.popNext(P)--Pop next queue to hand
BOT.addNext(P.AI_bot,CCblockID[next.id])
end
end
local _=P.keyPressing
--IHS
if _[8]and P.gameEnv.hold and P.gameEnv.ihs then
@@ -1529,15 +1544,23 @@ function player.popNext(P)--Pop next queue to hand
P:resetBlock()
end
P.dropDelay,P.lockDelay,P.freshTime=P.gameEnv.drop,P.gameEnv.lock,0
P.dropDelay=P.gameEnv.drop
P.lockDelay=P.gameEnv.lock
P.freshTime=0
if P.cur then
if P:ifoverlap(P.cur.bk,P.curX,P.curY)then P:lock()P:lose()end
P:freshgho()
if P:ifoverlap(P.cur.bk,P.curX,P.curY)then
P:lock()
P:lose()
end
P:freshBlock(false,true,true)
end
--IHdS
if _[6]then P.act.hardDrop(P)_[6]=false end
if _[6]then
P.act.hardDrop(P)
_[6]=false
end
end
end
@@ -1942,7 +1965,7 @@ function player.drop(P)--Place piece
if P.dropSpeed>60 then
dropScore=dropScore*P.dropSpeed/60
elseif P.dropSpeed>120 then
dropScore=dropScore*1,2*P.dropSpeed/120
dropScore=dropScore*1.2*P.dropSpeed/120
elseif P.dropSpeed>180 then
dropScore=dropScore*1.5*P.dropSpeed/180
end
@@ -2238,8 +2261,7 @@ function player.act.moveLeft(P,auto)
elseif P.control and P.waiting==-1 then
if P.cur and not P:ifoverlap(P.cur.bk,P.curX-1,P.curY)then
P.curX=P.curX-1
P:freshgho()
P:freshLockDelay()
P:freshBlock(false,true)
if P.human and P.curY==P.imgY then SFX.play("move")end
if not auto then P.moving=0 end
P.spinLast=false
@@ -2263,8 +2285,7 @@ function player.act.moveRight(P,auto)
elseif P.control and P.waiting==-1 then
if P.cur and not P:ifoverlap(P.cur.bk,P.curX+1,P.curY)then
P.curX=P.curX+1
P:freshgho()
P:freshLockDelay()
P:freshBlock(false,true)
if P.human and P.curY==P.imgY then SFX.play("move")end
if not auto then P.moving=0 end
P.spinLast=false
@@ -2302,7 +2323,7 @@ function player.act.hardDrop(P)
P:changeAtkMode(3)
end
P.keyPressing[6]=false
elseif P.control and P.waiting==-1 and P.cur then
elseif P.control and P.waiting<=0 and P.cur then
if P.curY~=P.imgY then
if P.gameEnv.dropFX then
P:createDropFX(P.curX,P.curY+1,P.curX+P.c-1,P.imgY+P.r-1)
@@ -2332,7 +2353,7 @@ function player.act.softDrop(P)
if P.control and P.waiting==-1 and P.cur then
if P.curY~=P.imgY then
P.curY=P.curY-1
P:freshMinY()
P:freshBlock(true,true)
P.spinLast=false
end
end
@@ -2360,10 +2381,9 @@ function player.act.insLeft(P,auto)
if P.gameEnv.dropFX then
P:createDropFX(P.curX+P.c,P.curY+P.r-1,P.curX+P.c,P.curY)
end
P:freshgho()
P:freshBlock(false,true)
end
if P.curX~=x0 then
P:freshLockDelay()
P.spinLast=false
end
if P.gameEnv.shakeFX then
@@ -2383,10 +2403,9 @@ function player.act.insRight(P,auto)
if P.gameEnv.dropFX then
P:createDropFX(P.curX-1,P.curY+P.r-1,P.curX-1,P.curY)
end
P:freshgho()
P:freshBlock(false,true)
end
if P.curX~=x0 then
P:freshLockDelay()
P.spinLast=false
end
if P.gameEnv.shakeFX then
@@ -2407,13 +2426,13 @@ function player.act.insDown(P)
P.fieldOff.vy=P.gameEnv.shakeFX*.5
end
P.curY,P.lockDelay,P.spinLast=P.imgY,P.gameEnv.lock,false
P:freshMinY()
P:freshBlock(true,true)
end
end
function player.act.down1(P)
if P.curY~=P.imgY and P.cur then
P.curY=P.curY-1
P:freshMinY()
P:freshBlock(true,true)
P.spinLast=false
end
end
@@ -2421,7 +2440,7 @@ function player.act.down4(P)
for _=1,4 do
if P.curY~=P.imgY and P.cur then
P.curY=P.curY-1
P:freshMinY()
P:freshBlock(true,true)
P.spinLast=false
else
return
@@ -2433,7 +2452,7 @@ function player.act.down10(P)
for _=1,10 do
if P.curY~=P.imgY then
P.curY=P.curY-1
P:freshMinY()
P:freshBlock(true,true)
P.spinLast=false
else
return
@@ -2579,15 +2598,20 @@ end
local function loadGameEnv(P)--Load gameEnv
P.gameEnv={}--Current game setting environment
local ENV=P.gameEnv
local E
--Load game settings
for k,v in next,gameEnv0 do
if modeEnv[k]~=nil then
v=modeEnv[k] --Mode setting
-- DBP("mode-"..k..":"..tostring(v))
elseif game.setting[k]~=nil then
v=game.setting[k] --Game setting
-- DBP("game-"..k..":"..tostring(v))
elseif setting[k]~=nil then
v=setting[k] --Global setting
-- DBP("global-"..k..":"..tostring(v))
-- else
-- DBP("default-"..k..":"..tostring(v))
end
ENV[k]=v --Default setting
end
@@ -2745,9 +2769,9 @@ end
function PLY.newRemotePlayer(id,x,y,size,actions)
local P=newEmptyPlayer(id,x,y,size)
P.human=false -- 录像不是人为操作
P.remote=true -- 远程操作
-- 开发中
P.human=false
P.remote=true
-- P.updateAction=buildActionFunctionFromActions(P, actions)
loadGameEnv(P)

View File

@@ -67,7 +67,7 @@ function Tick.throwBadge(data)--{ifAI,Sender,timer}
end
function Tick.autoPause(data)
data[1]=data[1]+1
if SCN.cur~="play"then return end
if SCN.cur~="play"then return true end
if data[1]==120 then
if SCN.cur=="play"then
pauseGame()

View File

@@ -69,6 +69,19 @@ Future outlook:
more graphic FXs & 3D features & animations
network game
0.10.4: 漏洞修复 Bug Fix
代码:
修改场景模块方法名
软件锁变量名从lock改为appLock
使用linter整理代码
重构锁延相关代码,freshgho,freshLockDelay,freshMinY合并为freshBlock
修复:
BPM120~180之间分数计算不正确
进不指定锁延的模式就报错
锁延机制错误(这次真修好了)
游戏结束后马上暂停并解除还会自动暂停(之前没修好)
提前硬降失效
0.10.3: 软件锁 APP Lock
新内容:
设置增加软件锁选项,打开游戏后进入伪装界面