Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
becc092192 | ||
|
|
185862eabf | ||
|
|
19ce62997b | ||
|
|
d8c096b06b | ||
|
|
aa836c7028 | ||
|
|
e5e378fa07 | ||
|
|
230514e34a | ||
|
|
d196d73448 | ||
|
|
cb98a9094a | ||
|
|
ec036037fe | ||
|
|
882769bb71 | ||
|
|
ba43e5e6a7 | ||
|
|
09c56d74bd | ||
|
|
c78630a31e | ||
|
|
d46d111900 | ||
|
|
87d6e0b501 | ||
|
|
45430a6a4a | ||
|
|
7f8a10327b | ||
|
|
bebe4b96a3 | ||
|
|
c1fd22f0b4 | ||
|
|
0f204e8659 | ||
|
|
9529597a0d | ||
|
|
392ec9abab | ||
|
|
d0c7e14f74 | ||
|
|
3cd86472f8 | ||
|
|
1e6e3d0d50 | ||
|
|
ed89685925 | ||
|
|
971dce6a66 | ||
|
|
5de78e924d | ||
|
|
de0de3a771 |
@@ -25,6 +25,7 @@ local Timer=love.timer.getTime
|
||||
local int,rnd,max,min=math.floor,math.random,math.max,math.min
|
||||
local abs=math.abs
|
||||
local ins,rem=table.insert,table.remove
|
||||
local byte=string.byte
|
||||
|
||||
local scr=scr
|
||||
local xOy=love.math.newTransform()
|
||||
@@ -127,12 +128,83 @@ local touchDown,touchUp,touchMove={},{},{}
|
||||
local keyDown,keyUp={},{}
|
||||
local gamepadDown,gamepadUp={},{}
|
||||
|
||||
function keyDown.calculator(k)
|
||||
local S=sceneTemp
|
||||
if byte(k)>=48 and byte(k)<=57 then
|
||||
if S.sym=="="then
|
||||
S.val=tonumber(k)
|
||||
S.sym=false
|
||||
elseif S.sym then
|
||||
if not S.reg then
|
||||
S.reg=S.val
|
||||
S.val=tonumber(k)
|
||||
elseif S.val<1e13 then
|
||||
S.val=S.val*10+tonumber(k)
|
||||
end
|
||||
else
|
||||
if S.val<1e13 then
|
||||
S.val=S.val*10+tonumber(k)
|
||||
end
|
||||
end
|
||||
elseif k=="backspace"then
|
||||
if S.val>0 then
|
||||
S.val=int(S.val/10)
|
||||
end
|
||||
elseif k=="+"or k=="="and kb.isDown("rshift","lshift")then
|
||||
S.sym="+"
|
||||
elseif k=="-"then
|
||||
S.sym="-"
|
||||
elseif k=="*"or k=="8"and kb.isDown("rshift","lshift")then
|
||||
S.sym="*"
|
||||
elseif k=="/"then
|
||||
S.sym="/"
|
||||
elseif k=="return"then
|
||||
if S.val then
|
||||
if S.sym and S.reg then
|
||||
S.val=
|
||||
S.sym=="+"and S.reg+S.val or
|
||||
S.sym=="-"and S.reg-S.val or
|
||||
S.sym=="*"and S.reg*S.val or
|
||||
S.sym=="/"and S.reg/S.val or
|
||||
-1
|
||||
end
|
||||
S.sym="="
|
||||
S.reg=false
|
||||
if S.val==626 then
|
||||
S.pass=true
|
||||
elseif S.val==196022 then
|
||||
marking=nil
|
||||
TEXT.show("\68\69\86\58\87\97\116\101\114\109\97\114\107\32\82\101\109\111\118\101\100",640,360,60,"stretch",.6)
|
||||
SFX.play("clear")
|
||||
elseif S.val==72943816 then
|
||||
for name,M in next,Modes do
|
||||
if not modeRanks[name]then
|
||||
modeRanks[name]=M.score and 0 or 6
|
||||
end
|
||||
end
|
||||
FILE.saveUnlock()
|
||||
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.go("debug")
|
||||
end
|
||||
end
|
||||
elseif k=="space"then
|
||||
if S.pass then
|
||||
SCN.swapTo("load")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function keyDown.load(k)
|
||||
if k=="a"then
|
||||
sceneTemp.skip=true
|
||||
elseif k=="s"then
|
||||
marking=nil
|
||||
sceneTemp.skip=true
|
||||
elseif k=="escape"then
|
||||
SCN.back()
|
||||
end
|
||||
end
|
||||
function touchDown.load(id,x,y)
|
||||
@@ -146,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)
|
||||
@@ -269,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
|
||||
@@ -326,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
|
||||
@@ -615,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()
|
||||
@@ -738,34 +810,6 @@ function gamepadUp.play(key)
|
||||
end
|
||||
end
|
||||
|
||||
function keyDown.staff(key,RESET)
|
||||
if key=="escape"then
|
||||
SCN.back()
|
||||
elseif key=="\122"then
|
||||
if RESET or kb.isDown("\109")and kb.isDown("\114")then
|
||||
SCN.goto("debug")
|
||||
end
|
||||
end
|
||||
end
|
||||
function touchDown.staff(id,x,y)
|
||||
local pw=sceneTemp.pw
|
||||
local t=pw%4
|
||||
if
|
||||
t==0 and x<640 and y<360 or
|
||||
t==1 and x>640 and y<360 or
|
||||
t==2 and x<640 and y>360 or
|
||||
t==3 and x>640 and y>360
|
||||
then
|
||||
pw=pw+1
|
||||
if pw==8 then
|
||||
SCN.goto("debug")
|
||||
end
|
||||
else
|
||||
pw=x<640 and y<360==1 and 1 or 0
|
||||
end
|
||||
sceneTemp.pw=pw
|
||||
end
|
||||
|
||||
function wheelMoved.history(x,y)
|
||||
wheelScroll(y)
|
||||
end
|
||||
@@ -1050,7 +1094,7 @@ function love.run()
|
||||
local FCT=0--Framedraw counter
|
||||
|
||||
love.resize(gc.getWidth(),gc.getHeight())
|
||||
SCN.init("load")--Scene Launch
|
||||
SCN.init(setting.appLock and "calculator"or"load")--Scene Launch
|
||||
marking=true
|
||||
|
||||
return function()
|
||||
@@ -1120,7 +1164,7 @@ function love.run()
|
||||
|
||||
--Draw scene swapping animation
|
||||
if SCN.swapping then
|
||||
_=SCN.swap
|
||||
_=SCN.stat
|
||||
_.draw(_.time)
|
||||
end
|
||||
|
||||
@@ -1142,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
|
||||
|
||||
@@ -1152,7 +1196,7 @@ function love.run()
|
||||
end
|
||||
|
||||
--Fresh power info.
|
||||
if Timer()-lastFreshPow>2 and setting.powerInfo and SCN.cur~="load"then
|
||||
if Timer()-lastFreshPow>2 and setting.powerInfo and loadingFinished then
|
||||
updatePowerInfo()
|
||||
lastFreshPow=Timer()
|
||||
_=gc.getWidth()
|
||||
|
||||
@@ -85,8 +85,6 @@ local langList={
|
||||
unlockSavingError="解锁保存失败:",
|
||||
recSavingError="纪录保存失败:",
|
||||
|
||||
ai_fixed="不能同时开启AI和固定序列",
|
||||
ai_prebag="不能同时开启AI和自定义序列",
|
||||
switchSpawnSFX="请开启方块出生音效",
|
||||
|
||||
needRestart="重新开始以生效",
|
||||
@@ -186,6 +184,17 @@ local langList={
|
||||
support="支持作者",
|
||||
group="官方QQ群(如果没有被暗改的话就是这个):1080457319",
|
||||
WidgetText={
|
||||
calculator={
|
||||
_1="1",_2="2",_3="3",
|
||||
_4="4",_5="5",_6="6",
|
||||
_7="7",_8="8",_9="9",
|
||||
_0="0",["<"]="<",["="]="=",
|
||||
["+"]="+",
|
||||
["-"]="-",
|
||||
["*"]="*",
|
||||
["/"]="/",
|
||||
play="开始",
|
||||
},
|
||||
main={
|
||||
play="开始",
|
||||
setting="设置",
|
||||
@@ -258,15 +267,15 @@ local langList={
|
||||
graphic="←画面设置",
|
||||
sound="声音设置→",
|
||||
ctrl="控制设置",
|
||||
reTime="开局等待时间",
|
||||
maxNext="最大预览数量",
|
||||
autoPause="自动暂停",
|
||||
layout="外观",
|
||||
key="键位设置",
|
||||
touch="触屏设置",
|
||||
quickR="快速重新开始",
|
||||
reTime="开局等待时间",
|
||||
maxNext="最大预览数量",
|
||||
layout="外观",
|
||||
autoPause="失去焦点自动暂停",
|
||||
swap="组合键切换攻击模式",
|
||||
fine="极简操作提示音",
|
||||
appLock="软件锁(密码626)",
|
||||
back="返回",
|
||||
},
|
||||
setting_video={
|
||||
@@ -376,8 +385,6 @@ local langList={
|
||||
back="返回",
|
||||
},
|
||||
debug={
|
||||
killWTM="关闭水印",
|
||||
unlock="解锁全模式",
|
||||
reset="重置?",
|
||||
reset1="重置解锁/等级",
|
||||
reset2="重置统计",
|
||||
@@ -546,8 +553,6 @@ local langList={
|
||||
unlockSavingError="解锁保存失败:",
|
||||
recSavingError="纪录保存失败:",
|
||||
|
||||
ai_fixed="不能同时开启电脑玩家和固定序列",
|
||||
ai_prebag="不能同时开启电脑玩家和自定义序列",
|
||||
switchSpawnSFX="请开启方块出生音效",
|
||||
|
||||
needRestart="重新开始以生效",
|
||||
@@ -646,6 +651,17 @@ local langList={
|
||||
support="支持作者",
|
||||
group="官方QQ群(如果没有被暗改的话就是这个):1080457319",
|
||||
WidgetText={
|
||||
calculator={
|
||||
_1="1",_2="2",_3="3",
|
||||
_4="4",_5="5",_6="6",
|
||||
_7="7",_8="8",_9="9",
|
||||
_0="0",["<"]="<",["="]="=",
|
||||
["+"]="+",
|
||||
["-"]="-",
|
||||
["*"]="*",
|
||||
["/"]="/",
|
||||
play="开始",
|
||||
},
|
||||
main={
|
||||
play="开始",
|
||||
setting="设置",
|
||||
@@ -718,15 +734,15 @@ local langList={
|
||||
graphic="←画面设置",
|
||||
sound="声音设置→",
|
||||
ctrl="控制设置",
|
||||
reTime="开局等待时间",
|
||||
maxNext="最大预览数量",
|
||||
autoPause="自动暂停",
|
||||
layout="外观",
|
||||
key="键位设置",
|
||||
touch="触屏设置",
|
||||
quickR="快速重新开始",
|
||||
reTime="开局等待时间",
|
||||
maxNext="最大预览数量",
|
||||
layout="外观",
|
||||
autoPause="失去焦点自动暂停",
|
||||
swap="组合键切换攻击模式",
|
||||
fine="极简操作提示音",
|
||||
appLock="软件锁(密码626)",
|
||||
back="返回",
|
||||
},
|
||||
setting_video={
|
||||
@@ -836,8 +852,6 @@ local langList={
|
||||
back="返回",
|
||||
},
|
||||
debug={
|
||||
killWTM="关闭水印",
|
||||
unlock="解锁全模式",
|
||||
reset="重置?",
|
||||
reset1="重置解锁/等级",
|
||||
reset2="重置统计",
|
||||
@@ -1006,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",
|
||||
@@ -1095,6 +1107,17 @@ local langList={
|
||||
support="Support author",
|
||||
group="Official QQ Group(if not hacked):1080457319",
|
||||
WidgetText={
|
||||
calculator={
|
||||
_1="1",_2="2",_3="3",
|
||||
_4="4",_5="5",_6="6",
|
||||
_7="7",_8="8",_9="9",
|
||||
_0="0",["<"]="<",["="]="=",
|
||||
["+"]="+",
|
||||
["-"]="-",
|
||||
["*"]="*",
|
||||
["/"]="/",
|
||||
play="Play",
|
||||
},
|
||||
main={
|
||||
play="Play",
|
||||
setting="Settings",
|
||||
@@ -1167,15 +1190,15 @@ local langList={
|
||||
graphic="←Video",
|
||||
sound="Sound→",
|
||||
ctrl="Control settings",
|
||||
reTime="Start Delay",
|
||||
maxNext="Next Queue Length",
|
||||
autoPause="Auto pause",
|
||||
layout="Layout",
|
||||
key="Key Mappings",
|
||||
touch="Touch Settings",
|
||||
quickR="Quick Retry",
|
||||
reTime="Start Delay",
|
||||
maxNext="Next Queue Length",
|
||||
layout="Layout",
|
||||
autoPause="Pause when lose focus",
|
||||
swap="Key Combination (Change Atk. Mode)",
|
||||
fine="Finesse Error Sound",
|
||||
appLock="App Lock(pw=626)",
|
||||
back="Back",
|
||||
},
|
||||
setting_video={
|
||||
@@ -1285,8 +1308,6 @@ local langList={
|
||||
back="Back",
|
||||
},
|
||||
debug={
|
||||
killWTM="Kill watermark",
|
||||
unlock="Unlock all",
|
||||
reset="Reset?",
|
||||
reset1="Reset rank",
|
||||
reset2="Reset data",
|
||||
@@ -1540,6 +1561,17 @@ local langList={
|
||||
support="Support author",
|
||||
group="Official QQ Group(if not hacked):1080457319",
|
||||
WidgetText={
|
||||
calculator={
|
||||
_1="1",_2="2",_3="3",
|
||||
_4="4",_5="5",_6="6",
|
||||
_7="7",_8="8",_9="9",
|
||||
_0="0",["<"]="<",["="]="=",
|
||||
["+"]="+",
|
||||
["-"]="-",
|
||||
["*"]="*",
|
||||
["/"]="/",
|
||||
play="!!!",
|
||||
},
|
||||
main={
|
||||
play="!!!",
|
||||
setting="_?_",
|
||||
@@ -1612,15 +1644,15 @@ local langList={
|
||||
graphic="←Video",
|
||||
sound="Sound→",
|
||||
ctrl="=?=",
|
||||
reTime="3-2-1",
|
||||
maxNext="=123",
|
||||
autoPause="A||",
|
||||
layout="=-=-=",
|
||||
key="=?",
|
||||
touch="_?",
|
||||
quickR="R!",
|
||||
reTime="3-2-1",
|
||||
maxNext="=123",
|
||||
layout="=-=-=",
|
||||
autoPause="A||",
|
||||
swap="=+=+=",
|
||||
fine="!#!X #!#",
|
||||
appLock="?XX(=626)",
|
||||
back="X",
|
||||
},
|
||||
setting_video={
|
||||
@@ -1730,8 +1762,6 @@ local langList={
|
||||
back="X",
|
||||
},
|
||||
debug={
|
||||
killWTM="Kill watermark",
|
||||
unlock="Unlock all",
|
||||
reset="Reset?",
|
||||
reset1="Reset rank",
|
||||
reset2="Reset data",
|
||||
@@ -1902,8 +1932,6 @@ local langList={
|
||||
unlockSavingError="解锁保存失败:",
|
||||
recSavingError="纪录保存失败:",
|
||||
|
||||
ai_fixed="不能同时开启AI和固定序列",
|
||||
ai_prebag="不能同时开启AI和自定义序列",
|
||||
switchSpawnSFX="请开启方块出生音效",
|
||||
|
||||
needRestart="重新开始以生效",
|
||||
@@ -2003,6 +2031,17 @@ local langList={
|
||||
support="支持作者",
|
||||
group="官方QQ群(如果没有被暗改的话就是这个):1080457319",
|
||||
WidgetText={
|
||||
calculator={
|
||||
_1="1",_2="2",_3="3",
|
||||
_4="4",_5="5",_6="6",
|
||||
_7="7",_8="8",_9="9",
|
||||
_0="0",["<"]="<",["="]="=",
|
||||
["+"]="+",
|
||||
["-"]="-",
|
||||
["*"]="*",
|
||||
["/"]="/",
|
||||
play="开始",
|
||||
},
|
||||
main={
|
||||
play="开始",
|
||||
setting="设置",
|
||||
@@ -2075,15 +2114,15 @@ local langList={
|
||||
graphic="←改画面",
|
||||
sound="改声音→",
|
||||
ctrl="改控制",
|
||||
reTime="开局等待时间",
|
||||
maxNext="最大预览数量",
|
||||
autoPause="自动暂停",
|
||||
layout="外观",
|
||||
key="改键位",
|
||||
touch="改触屏",
|
||||
quickR="快速重新开始",
|
||||
reTime="开局等待时间",
|
||||
maxNext="最大预览数量",
|
||||
layout="外观",
|
||||
autoPause="失去焦点自动暂停",
|
||||
swap="组合键切换攻击模式",
|
||||
fine="极简操作提示音",
|
||||
appLock="家长锁(密码626)",
|
||||
back="返回",
|
||||
},
|
||||
setting_video={
|
||||
@@ -2193,8 +2232,6 @@ local langList={
|
||||
back="返回",
|
||||
},
|
||||
debug={
|
||||
killWTM="关水印",
|
||||
unlock="解锁全模式",
|
||||
reset="重置?",
|
||||
reset1="重置解锁/等级",
|
||||
reset2="重置统计",
|
||||
@@ -2356,7 +2393,6 @@ function LANG.set(l)
|
||||
end
|
||||
end
|
||||
for _,s in next,drawableTextLoad do
|
||||
print(s)
|
||||
drawableText[s]:set(text[s])
|
||||
end
|
||||
collectgarbage()
|
||||
|
||||
@@ -94,6 +94,16 @@ end
|
||||
|
||||
local Pnt={}
|
||||
|
||||
function Pnt.calculator()
|
||||
local S=sceneTemp
|
||||
gc.setLineWidth(4)
|
||||
gc.rectangle("line",100,80,650,150)
|
||||
setFont(45)
|
||||
if S.reg then gc.printf(S.reg,0,100,720,"right")end
|
||||
if S.val then gc.printf(S.val,0,150,720,"right")end
|
||||
setFont(50)
|
||||
if S.sym then gc.print(S.sym,126,150)end
|
||||
end
|
||||
function Pnt.load()
|
||||
local S=sceneTemp
|
||||
gc.setLineWidth(4)
|
||||
@@ -381,7 +391,6 @@ function Pnt.sequence()
|
||||
gc.draw(drawableText.question,980,470)
|
||||
end
|
||||
end
|
||||
|
||||
function Pnt.draw()
|
||||
local sx,sy=sceneTemp.x,sceneTemp.y
|
||||
gc.translate(200,60)
|
||||
@@ -531,10 +540,10 @@ function Pnt.play()
|
||||
end
|
||||
gc.pop()
|
||||
end
|
||||
|
||||
local hexList={1,0,.5,1.732*.5,-.5,1.732*.5}for i=1,6 do hexList[i]=hexList[i]*150 end
|
||||
local textPos={90,131,-90,131,-200,-25,-90,-181,90,-181,200,-25}
|
||||
local dataPos={90,143,-90,143,-200,-13,-90,-169,90,-169,200,-13}
|
||||
|
||||
function Pnt.pause()
|
||||
local S=sceneTemp
|
||||
local T=S.timer*.02
|
||||
@@ -625,7 +634,7 @@ end
|
||||
function Pnt.setting_game()
|
||||
gc.setColor(1,1,1)
|
||||
mText(drawableText.setting_game,640,15)
|
||||
gc.draw(blockSkin[int(Timer()*2)%11+1],720,540,Timer()%6.28319,2,nil,15,15)
|
||||
gc.draw(blockSkin[int(Timer()*2)%11+1],590,540,Timer()%6.28319,2,nil,15,15)
|
||||
end
|
||||
function Pnt.setting_video()
|
||||
gc.setColor(1,1,1)
|
||||
@@ -646,6 +655,7 @@ function Pnt.setting_sound()
|
||||
gc.draw(IMG.miyaF4,129,98+3*sin(t*.7))
|
||||
gc.translate(-x,-y)
|
||||
end
|
||||
|
||||
local function timeConv(t)
|
||||
return t.."F "..int(t*16.67).."ms"
|
||||
end
|
||||
|
||||
@@ -7,6 +7,14 @@ local scr=scr
|
||||
|
||||
local sceneInit={}
|
||||
sceneInit.quit=love.event.quit
|
||||
function sceneInit.calculator()
|
||||
sceneTemp={
|
||||
reg=false,
|
||||
val=0,
|
||||
sym=false,
|
||||
pass=false,
|
||||
}
|
||||
end
|
||||
function sceneInit.load()
|
||||
sceneTemp={
|
||||
phase=1,--Loading stage
|
||||
@@ -221,7 +229,6 @@ function sceneInit.help()
|
||||
end
|
||||
function sceneInit.staff()
|
||||
sceneTemp={
|
||||
pw=0,
|
||||
time=0,
|
||||
v=1,
|
||||
}
|
||||
@@ -322,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
|
||||
@@ -333,12 +340,10 @@ 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)
|
||||
SCN.cur=S.tar
|
||||
WIDGET.set(Widgets[S.tar])
|
||||
collectgarbage()
|
||||
--Scene swapped this moment
|
||||
end
|
||||
@@ -348,6 +353,8 @@ function SCN.swapUpdate()
|
||||
end
|
||||
function SCN.init(s,org)
|
||||
if sceneInit[s]then sceneInit[s](org)end
|
||||
SCN.cur=s
|
||||
WIDGET.set(Widgets[s])
|
||||
end
|
||||
function SCN.push(tar,style)
|
||||
if not SCN.swapping then
|
||||
@@ -388,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
|
||||
@@ -400,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()
|
||||
|
||||
@@ -52,6 +52,7 @@ function Tmr.load()
|
||||
SCN.swapTo("intro","none")
|
||||
end
|
||||
end
|
||||
loadingFinished=true
|
||||
return
|
||||
end
|
||||
S.cur=S.cur+1
|
||||
@@ -130,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
|
||||
|
||||
@@ -91,13 +91,13 @@ function VOC.update()
|
||||
end
|
||||
elseif Q.s==1 then--Waiting load source
|
||||
Q[1]=getVoice(Q[1])
|
||||
Q[1]:setVolume(setting.voc*.1)
|
||||
Q[1]:setVolume(setting.voc*.01)
|
||||
Q[1]:play()
|
||||
Q.s=Q[2]and 2 or 4
|
||||
elseif Q.s==2 then--Playing 1,ready 2
|
||||
if Q[1]:getDuration()-Q[1]:tell()<.08 then
|
||||
Q[2]=getVoice(Q[2])
|
||||
Q[2]:setVolume(setting.voc*.1)
|
||||
Q[2]:setVolume(setting.voc*.01)
|
||||
Q[2]:play()
|
||||
Q.s=3
|
||||
end
|
||||
@@ -121,7 +121,7 @@ function VOC.play(s,chn)
|
||||
if chn then
|
||||
local L=voiceQueue[chn]
|
||||
local _=VOC.list[s]
|
||||
if not _ then DBP("no VOC called:"..s)return end
|
||||
if not _ then return end
|
||||
L[#L+1]=_[rnd(#_)]
|
||||
L.s=1
|
||||
--Add to queue[chn]
|
||||
|
||||
@@ -395,7 +395,6 @@ function WIDGET.press(x,y)
|
||||
W.code()
|
||||
W:FX()
|
||||
SFX.play("button")
|
||||
VOC.play("nya")
|
||||
elseif W.type=="key"then
|
||||
W.code()
|
||||
SFX.play("lock")
|
||||
|
||||
@@ -98,19 +98,38 @@ newSlider=WIDGET.newSlider
|
||||
--All widgets
|
||||
local Widgets={
|
||||
load={},intro={},quit={},
|
||||
calculator={
|
||||
newKey({name="_1", x=300,y=300,w=90,h=90, color="white", font=50,code=pressKey("1")}),
|
||||
newKey({name="_2", x=400,y=300,w=90,h=90, color="white", font=50,code=pressKey("2")}),
|
||||
newKey({name="_3", x=500,y=300,w=90,h=90, color="white", font=50,code=pressKey("3")}),
|
||||
newKey({name="_4", x=300,y=400,w=90,h=90, color="white", font=50,code=pressKey("4")}),
|
||||
newKey({name="_5", x=400,y=400,w=90,h=90, color="white", font=50,code=pressKey("5")}),
|
||||
newKey({name="_6", x=500,y=400,w=90,h=90, color="white", font=50,code=pressKey("6")}),
|
||||
newKey({name="_7", x=300,y=500,w=90,h=90, color="white", font=50,code=pressKey("7")}),
|
||||
newKey({name="_8", x=400,y=500,w=90,h=90, color="white", font=50,code=pressKey("8")}),
|
||||
newKey({name="_9", x=500,y=500,w=90,h=90, color="white", font=50,code=pressKey("9")}),
|
||||
newKey({name="_0", x=300,y=600,w=90,h=90, color="white", font=50,code=pressKey("0")}),
|
||||
newKey({name="<", x=400,y=600,w=90,h=90, color="lRed", font=50,code=pressKey("backspace")}),
|
||||
newKey({name="=", x=500,y=600,w=90,h=90, color="lYellow",font=50,code=pressKey("return")}),
|
||||
newKey({name="+", x=600,y=300,w=90,h=90, color="lBlue", font=50,code=pressKey("+")}),
|
||||
newKey({name="-", x=600,y=400,w=90,h=90, color="lBlue", font=50,code=pressKey("-")}),
|
||||
newKey({name="*", x=600,y=500,w=90,h=90, color="lBlue", font=50,code=pressKey("*")}),
|
||||
newKey({name="/", x=600,y=600,w=90,h=90, color="lBlue", font=50,code=pressKey("/")}),
|
||||
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"
|
||||
@@ -219,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")}),
|
||||
newSwitch({name="autoPause",x=350, y=540, font=20,disp=SETval("autoPause"),code=SETrev("autoPause")}),
|
||||
newButton({name="layout", x=590, y=540, w=140,h=70,color="white", font=35,code=function()
|
||||
SCN.goto("setting_skin")
|
||||
newButton({name="layout", x=460, y=540, w=140,h=70,color="white", font=35,code=function()
|
||||
SCN.go("setting_skin")
|
||||
end}),
|
||||
newSwitch({name="quickR", x=1050, y=320, font=35,disp=SETval("quickR"), code=SETrev("quickR")}),
|
||||
newSwitch({name="swap", x=1050, y=400, font=20,disp=SETval("swap"), code=SETrev("swap")}),
|
||||
newSwitch({name="fine", x=1050, y=480, font=20,disp=SETval("fine"), code=SETrev("fine")}),
|
||||
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="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={
|
||||
@@ -278,10 +297,10 @@ local Widgets={
|
||||
newButton({name="graphic", x=1080, y=80,w=240,h=80,color="lCyan",font=35,code=function()SCN.swapTo("setting_video","swipe")end}),
|
||||
newSlider({name="sfx", x=180, y=200,w=400,unit=100,noUnit=true,font=35,change=function()SFX.play("blip_1")end, disp=SETval("sfx"), code=SETsto("sfx")}),
|
||||
newSlider({name="stereo", x=180, y=500,w=400,unit=10, font=35,change=function()SFX.play("move",1,-1)SFX.play("lock",1,1)end, disp=SETval("stereo"), code=SETsto("stereo"),hide=function()return setting.sfx==0 end}),
|
||||
newSlider({name="spawn", x=180, y=300,w=400,unit=100,noUnit=true,font=30,change=function()SFX.fplay("spawn_1",setting.spawn)end, disp=SETval("spawn"), code=SETsto("spawn")}),
|
||||
newSlider({name="spawn", x=180, y=300,w=400,unit=100,noUnit=true,font=30,change=function()SFX.fplay("spawn_1",setting.spawn)end, disp=SETval("spawn"), code=SETsto("spawn")}),
|
||||
newSlider({name="bgm", x=180, y=400,w=400,unit=100,noUnit=true,font=35,change=function()BGM.freshVolume()end, disp=SETval("bgm"), code=SETsto("bgm")}),
|
||||
newSlider({name="vib", x=750, y=200,w=400,unit=5, font=28,change=function()VIB(2)end, disp=SETval("vib"), code=SETsto("vib")}),
|
||||
newSlider({name="voc", x=750, y=300,w=400,unit=10,font=32,change=function()VOC.play("nya")end, disp=SETval("voc"), code=SETsto("voc")}),
|
||||
newSlider({name="vib", x=750, y=200,w=400,unit=5, font=28,change=function()VIB(2)end, disp=SETval("vib"), code=SETsto("vib")}),
|
||||
newSlider({name="voc", x=750, y=300,w=400,unit=100,noUnit=true,font=32,change=function()VOC.play("nya")end, disp=SETval("voc"), code=SETsto("voc")}),
|
||||
newButton({name="back", x=1140, y=650,w=200,h=80,color="white",font=40,code=BACK}),
|
||||
},
|
||||
setting_control={
|
||||
@@ -371,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,
|
||||
@@ -417,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
|
||||
@@ -440,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}),
|
||||
},
|
||||
@@ -458,27 +477,7 @@ local Widgets={
|
||||
newButton({name="back", x=640, y=620,w=200,h=80,color="white",font=40,code=BACK}),
|
||||
},
|
||||
debug={
|
||||
newButton({name="killWTM", x=340,y=200,w=260,h=100,color="white",font=35,
|
||||
code=function()
|
||||
marking=nil
|
||||
TEXT.show("\68\69\86\58\87\97\116\101\114\109\97\114\107\32\82\101\109\111\118\101\100",640,360,60,"stretch",.6)
|
||||
SFX.play("clear")
|
||||
end,
|
||||
hide=function()
|
||||
return not marking
|
||||
end}),
|
||||
newButton({name="unlock", x=640,y=200,w=260,h=100,color="white",font=40,
|
||||
code=function()
|
||||
for name,M in next,Modes do
|
||||
if not modeRanks[name]then
|
||||
modeRanks[name]=M.score and 0 or 6
|
||||
end
|
||||
end
|
||||
FILE.saveUnlock()
|
||||
TEXT.show("\68\69\86\58\85\78\76\79\67\75\65\76\76",640,360,60,"stretch",.6)
|
||||
SFX.play("clear_2")
|
||||
end}),
|
||||
newButton({name="reset", x=940,y=200,w=260,h=100,color="yellow",font=40,
|
||||
newButton({name="reset", x=640,y=200,w=260,h=100,color="yellow",font=40,
|
||||
code=function()
|
||||
sceneTemp.reset=true
|
||||
end,
|
||||
|
||||
2
conf.lua
2
conf.lua
@@ -1,4 +1,4 @@
|
||||
gameVersion="Alpha V0.10.2"
|
||||
gameVersion="Alpha V0.10.4"
|
||||
function love.conf(t)
|
||||
t.identity="Techmino"--Saving folder
|
||||
t.version="11.1"
|
||||
|
||||
36
main.lua
36
main.lua
@@ -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
|
||||
|
||||
@@ -34,15 +33,15 @@ mapCam={
|
||||
zoomMethod=nil,
|
||||
zoomK=nil,
|
||||
}
|
||||
scr={x=0,y=0,w=0,h=0,rad=0,k=1}--wid,hei,radius,scale K
|
||||
scr={x=0,y=0,w=0,h=0,W=0,H=0,rad=0,k=1}--wid,hei,radius,scale K
|
||||
|
||||
customSel={1,22,1,1,7,3,1,1,8,4,1,1,1}
|
||||
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
|
||||
@@ -121,12 +129,12 @@ end
|
||||
|
||||
--Update data file
|
||||
S=stat
|
||||
if S.version=="Alpha V0.9.1"or type(setting.spawn)~="number"then
|
||||
if type(setting.spawn)~="number"then
|
||||
setting.spawn=0
|
||||
end
|
||||
if S.version~=gameVersion then
|
||||
S.version=gameVersion
|
||||
TEXT.show(text.newBigVersion,640,200,30,"fly",.3)
|
||||
TEXT.show(text.newVersion,640,200,30,"fly",.3)
|
||||
newVersionLaunch=true
|
||||
|
||||
fs.remove("sprintPenta.dat")
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -7,7 +7,6 @@ return{
|
||||
freshLimit=10,
|
||||
visible="fast",
|
||||
dropPiece=PLY.reach_winCheck,
|
||||
freshLimit=10,
|
||||
target=200,
|
||||
bg="glow",bgm="reason",
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local min=math.random,math.min
|
||||
local min=math.min
|
||||
local function check_c4w(P)
|
||||
for i=1,#P.clearedRow do
|
||||
P.field[#P.field+1]=freeRow.get(13)
|
||||
@@ -59,7 +59,7 @@ return{
|
||||
if L==100 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=36 and 5 or
|
||||
T<=40 and 5 or
|
||||
T<=60 and 4 or
|
||||
3
|
||||
else
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -18,8 +18,9 @@ return{
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
local P=players[1]
|
||||
for _=1,8 do
|
||||
players[1]:garbageRise(13,1,P:RND(10))
|
||||
P:garbageRise(13,1,P:RND(10))
|
||||
end
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -3,12 +3,14 @@ setting={
|
||||
das=10,arr=2,
|
||||
sddas=0,sdarr=2,
|
||||
ihs=true,irs=true,ims=true,
|
||||
reTime=4,
|
||||
maxNext=6,
|
||||
autoPause=true,
|
||||
quickR=true,
|
||||
swap=true,
|
||||
|
||||
--System
|
||||
reTime=4,
|
||||
autoPause=true,
|
||||
fine=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},
|
||||
|
||||
@@ -263,11 +263,13 @@ function pauseGame()
|
||||
if not game.result then
|
||||
game.pauseCount=game.pauseCount+1
|
||||
end
|
||||
for i=1,#players do
|
||||
local l=players[i].keyPressing
|
||||
for j=1,#l do
|
||||
if l[j]then
|
||||
players[i]:releaseKey(j)
|
||||
if not game.replaying then
|
||||
for i=1,#players do
|
||||
local l=players[i].keyPressing
|
||||
for j=1,#l do
|
||||
if l[j]then
|
||||
players[i]:releaseKey(j)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -308,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
|
||||
@@ -361,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
|
||||
@@ -386,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
|
||||
@@ -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连击消四全清!",
|
||||
"打好块没有捷径,多练",
|
||||
"车车人在此",
|
||||
"茶娘 可爱!",
|
||||
"草(日本语)",
|
||||
"不要在上课时玩游戏!",
|
||||
@@ -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,6 +143,7 @@ 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?",
|
||||
@@ -154,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!",
|
||||
@@ -163,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",
|
||||
@@ -196,32 +199,33 @@ elseif setting.lang==5 then
|
||||
local R=math.random()
|
||||
if R<.05 then
|
||||
local time={
|
||||
"大半夜的在这干啥呢?不睡觉是会猝死的",
|
||||
"大半夜的在这干啥呢?不睡觉是会猝死的",
|
||||
"现在打块你是认真的?",
|
||||
"现在打块你是认真的?",
|
||||
"早起是好的,但是你不应该打块",
|
||||
"早起是好的,但是你不应该打块",
|
||||
"早饭吃好了?",
|
||||
"早饭吃好了?",
|
||||
"九点多了,没自己的事情要做?",
|
||||
"十点多了,没自己的事情要做?",
|
||||
"十一点多了,午饭有的吃么",
|
||||
"十二点多了,午饭有的吃么",
|
||||
"累了累了,现在不想说你",
|
||||
"累了累了,现在不想说你",
|
||||
"累了累了,现在不想说你",
|
||||
"累了累了,现在不想说你",
|
||||
"累了累了,现在不想说你",
|
||||
"晚饭吃好了?",
|
||||
"晚饭吃好了?",
|
||||
"累了累了,现在不想说你",
|
||||
"累了累了,现在不想说你",
|
||||
"好睡了,作息健康活得久",
|
||||
"大半夜的在这干啥呢?不睡觉是会猝死的",
|
||||
--[[00]]"大半夜的在这干啥呢?不睡觉是会猝死的",
|
||||
--[[01]]"大半夜的在这干啥呢?不睡觉是会猝死的",
|
||||
--[[02]]"现在打块你是认真的?",
|
||||
--[[03]]"现在打块你是认真的?",
|
||||
--[[04]]"早起是好的,但是你不应该打块",
|
||||
--[[05]]"早起是好的,但是你不应该打块",
|
||||
--[[06]]"早饭吃好了?",
|
||||
--[[07]]"早饭吃好了?",
|
||||
--[[08]]"九点多了,没自己的事情要做?",
|
||||
--[[09]]"十点多了,没自己的事情要做?",
|
||||
--[[10]]"十一点多了,午饭有的吃么",
|
||||
--[[11]]"十二点多了,午饭有的吃么",
|
||||
--[[12]]"累了累了,现在不想说你",
|
||||
--[[13]]"累了累了,现在不想说你",
|
||||
--[[14]]"累了累了,现在不想说你",
|
||||
--[[15]]"累了累了,现在不想说你",
|
||||
--[[16]]"累了累了,现在不想说你",
|
||||
--[[17]]"晚饭吃好了?",
|
||||
--[[18]]"晚饭吃好了?",
|
||||
--[[19]]"累了累了,现在不想说你",
|
||||
--[[20]]"累了累了,现在不想说你",
|
||||
--[[21]]"好睡了,作息健康活得久",
|
||||
--[[22]]"好睡了,作息健康活得久",
|
||||
--[[23]]"大半夜的在这干啥呢?不睡觉是会猝死的",
|
||||
}
|
||||
return time[os.date("%H")]
|
||||
elseif true or R<.1 then
|
||||
return time[tonumber(os.date("%H"))+1]
|
||||
elseif R<.1 then
|
||||
local int=math.floor
|
||||
L={
|
||||
"平均"..int(stat.row/stat.time*60).."LPM,那可真强呢",
|
||||
@@ -241,8 +245,10 @@ elseif setting.lang==5 then
|
||||
"我一个滑铲就挖了个11renPC",
|
||||
"我曾经在极度愤怒的时候15秒消了40行",
|
||||
"天天F3F3,怕别人不知道你菜?",
|
||||
"天天卖弱,你一定把把150apm吧?",
|
||||
"天天催更催更,你咋不来帮忙开发啊,真以为作者很强催催啥都有?",
|
||||
"设置都看过一遍了吗?明明都能调还嫌这嫌那,可牛逼了您",
|
||||
"少玩点,多眨眼,到时候瞎了别怪我没提醒你",
|
||||
"人只用一只手都能玩,你呢?",
|
||||
"没那水平别天天整什么花里胡哨的,人玩几年你想几天赶上?",
|
||||
"满口PCDT信天翁,还会点别的么?",
|
||||
@@ -251,6 +257,7 @@ elseif setting.lang==5 then
|
||||
"还搁这玩手机呢,作业做完了?",
|
||||
"除了雨宫太阳你还认识谁?Jonas知道吗?Ajanba听过吗?",
|
||||
"不会吧不会吧,真的还有人不能随手Tspin?",
|
||||
"别会个c4w就以为自己多强,这是基本功罢了",
|
||||
"60lpm?拍硬降刷的吧",
|
||||
"4pps不是人均水平?",
|
||||
"40行还要40多秒,就这?",
|
||||
@@ -258,8 +265,8 @@ elseif setting.lang==5 then
|
||||
"20连pc不是随手?",
|
||||
"100apm?定式刷的吧",
|
||||
"0202年了,还在玩这种小孩子玩的游戏?",
|
||||
"天天卖弱,你一定把把150apm吧?",
|
||||
"别会个c4w就以为自己多强,这是基本功罢了",
|
||||
"极限20G?那不是随手通",
|
||||
"全隐40行全消四很难吗??",
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -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}},
|
||||
|
||||
203
parts/player.lua
203
parts/player.lua
@@ -5,13 +5,15 @@ local int,ceil,abs,rnd,max,min=math.floor,math.ceil,math.abs,math.random,math.ma
|
||||
local ins,rem=table.insert,table.remove
|
||||
local format=string.format
|
||||
local scr=scr--Screen camera
|
||||
local setFont=setFont
|
||||
--------------------------<GameData>--------------------------
|
||||
local gameEnv0={
|
||||
noFly=false,
|
||||
das=10,arr=2,
|
||||
sddas=2,sdarr=2,
|
||||
ihs=true,irs=true,ims=true,
|
||||
quickR=true,swap=true,
|
||||
swap=true,
|
||||
|
||||
ghost=true,center=true,
|
||||
smooth=false,grid=false,
|
||||
bagLine=false,
|
||||
@@ -435,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
|
||||
@@ -688,9 +690,9 @@ local function Pdraw_norm(P)
|
||||
if P.lockDelay>=0 then
|
||||
gc.rectangle("fill",0,602,300*P.lockDelay/P.gameEnv.lock,6)--Lock delay indicator
|
||||
end
|
||||
_=10
|
||||
_=3
|
||||
for i=1,min(P.gameEnv.freshLimit-P.freshTime,15)do
|
||||
gc.circle("fill",_,615,5)
|
||||
gc.rectangle("fill",_,615,14,5)
|
||||
_=_+20
|
||||
end
|
||||
|
||||
@@ -809,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)
|
||||
@@ -1136,7 +1144,7 @@ function player.finesseError(P,rate)
|
||||
SFX.play("finesseError_long",.6)
|
||||
P:lose()
|
||||
elseif setting.fine then
|
||||
SFX.play("finesseError",.3)
|
||||
SFX.play("finesseError",.8)
|
||||
end
|
||||
elseif P.gameEnv.fineKill then
|
||||
P:lose()
|
||||
@@ -1197,9 +1205,11 @@ function player.garbageRise(P,color,amount,pos)
|
||||
P.field[1][pos]=0
|
||||
end
|
||||
P.fieldBeneath=P.fieldBeneath+amount*30
|
||||
P.curY=P.curY+amount
|
||||
if P.cur then
|
||||
P.curY=P.curY+amount
|
||||
P.imgY=P.imgY+amount
|
||||
end
|
||||
P.garbageBeneath=P.garbageBeneath+amount
|
||||
P.imgY=P.imgY+amount
|
||||
for i=1,#P.clearingRow do
|
||||
P.clearingRow[i]=P.clearingRow[i]+amount
|
||||
end
|
||||
@@ -1234,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
|
||||
@@ -1289,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)
|
||||
@@ -1366,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
|
||||
@@ -1381,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
|
||||
|
||||
@@ -1483,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
|
||||
|
||||
@@ -1515,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
|
||||
@@ -1525,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
|
||||
|
||||
@@ -1938,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
|
||||
@@ -2029,6 +2056,7 @@ end
|
||||
|
||||
--------------------------<Events>--------------------------
|
||||
local function gameOver()--Save record
|
||||
if game.replaying then return end
|
||||
FILE.saveData()
|
||||
local M=curMode
|
||||
local R=M.getRank
|
||||
@@ -2233,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
|
||||
@@ -2258,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
|
||||
@@ -2297,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)
|
||||
@@ -2327,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
|
||||
@@ -2342,7 +2368,7 @@ function player.act.func(P)
|
||||
P.gameEnv.Fkey(P)
|
||||
end
|
||||
function player.act.restart(P)
|
||||
if P.gameEnv.quickR or game.frame<180 then
|
||||
if game.frame<240 or game.result then
|
||||
TASK.removeTask_code(TICK.autoPause)
|
||||
resetPartGameData()
|
||||
end
|
||||
@@ -2355,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
|
||||
@@ -2378,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
|
||||
@@ -2402,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
|
||||
@@ -2416,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
|
||||
@@ -2428,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
|
||||
@@ -2574,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
|
||||
@@ -2687,7 +2716,7 @@ function PLY.newDemoPlayer(id,x,y,size)
|
||||
noFly=false,
|
||||
das=10,arr=2,
|
||||
sddas=2,sdarr=2,
|
||||
quickR=true,swap=true,
|
||||
swap=true,
|
||||
ghost=setting.ghost,center=setting.center,
|
||||
smooth=setting.smooth,grid=setting.grid,
|
||||
text=setting.text,
|
||||
@@ -2740,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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -56,7 +56,6 @@ Future outlook:
|
||||
mine sweeper
|
||||
tank battle
|
||||
new AI: task-Z
|
||||
self protection
|
||||
cool backgrounds
|
||||
'Encrypt'(compile to byte code)
|
||||
better drop FX
|
||||
@@ -70,11 +69,43 @@ 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
|
||||
新内容:
|
||||
设置增加软件锁选项,打开游戏后进入伪装界面
|
||||
改动:
|
||||
剩余锁延重置次数指示器改为长方形
|
||||
debug界面改为重置界面,进入方法修改
|
||||
游戏设置页面布局更改
|
||||
语音音量条改为无刻度
|
||||
取消快速重开设置,游戏过程中长按重开,结束后开局一秒内点击重开
|
||||
修复:
|
||||
无尽挖掘报错
|
||||
极简错误提示声音太小
|
||||
修复回放也计入排行榜
|
||||
回放时暂停不打断玩家操作
|
||||
c4w练习的lunatic分数bug
|
||||
|
||||
0.10.2: 锁延修复 Lock Delay Fixed
|
||||
改动:
|
||||
锁延机制再修正
|
||||
"失败"字样改为"游戏结束"
|
||||
"失败"改为"游戏结束"
|
||||
修复:
|
||||
纠正部分rank文件转换错误
|
||||
模式文件使用玩家的随机器以正确回放
|
||||
游戏结束后马上暂停并解除还会自动暂停
|
||||
改设置后回放错误
|
||||
字库缺字
|
||||
|
||||
|
||||
Reference in New Issue
Block a user