This commit is contained in:
MrZ_26
2020-03-20 23:07:50 +08:00
parent 15df07ae3f
commit ed0f8031d0
29 changed files with 501 additions and 416 deletions

View File

@@ -1,4 +1,4 @@
gameVersion="Alpha V0.8.12" gameVersion="Alpha V0.8.13"
function love.conf(t) function love.conf(t)
t.identity="Techmino"--SaveDir name t.identity="Techmino"--SaveDir name
t.version="11.1" t.version="11.1"

View File

@@ -1,5 +1,5 @@
游戏方法: 游戏方法:
控制系统提供的一个个四联方块(左右移动和旋转90,180,270度),每填满场地的一行就会将其消除,根据消除方式会给对手攻击(如果有对手的话) 系统提供的一个个四联骨牌("方块",总共7种),玩家需要控制(左右移动和旋转90,180,270度),每填满场地的一行就会将其消除,根据消除方式会给对手攻击(如果有对手的话)
活到最后或者完成目标即胜利. 活到最后或者完成目标即胜利.
旋转系统: 旋转系统:
@@ -16,8 +16,8 @@ spin判定:
特殊消除: 特殊消除:
spin1/2/3攻击2/4/6,若mini则减半 spin1/2/3攻击2/4/6,若mini则减半
B2B:加1(techrash/spin1/spin2)或2(spin3)攻击 B2B:加1(techrash/spin1/spin2)或2(spin3)攻击
B3B:在B2B效果之上再+1攻击和+1额外抵挡 B3B:在B2B效果之上消四再加1,spin再加0.5*消行数攻击,二者都+1额外抵挡
连击:0,0,1,1,2,2,3,3,4,4,3…… 连击:0,0,1,1,2,2,2,3,3,4,3,2…(后面都是2)
特殊消除会增加B2B点数,让之后的特殊消除获得B2B(B3B)增益(详细说明见下文) 特殊消除会增加B2B点数,让之后的特殊消除获得B2B(B3B)增益(详细说明见下文)
PC:将上述伤害之和开根号,再+6~10(本局内递增)+2额外抵挡(注:本局消行数>4时会将B2B点数拉满) PC:将上述伤害之和开根号,再+6~10(本局内递增)+2额外抵挡(注:本局消行数>4时会将B2B点数拉满)
根据上述规则计算后,向下取整,攻击打出 根据上述规则计算后,向下取整,攻击打出

View File

@@ -148,7 +148,9 @@ function loadSetting()
local F=FILE.setting local F=FILE.setting
if F:open("r")then if F:open("r")then
local s=F:read() local s=F:read()
if s:sub(1,6)~="return"then s="return{"..s.."}"end if s:sub(1,6)~="return"then
s="return{"..s:gsub("\n",",").."}"
end
s=loadstring(s) s=loadstring(s)
F:close() F:close()
if s then if s then

BIN
font.ttf

Binary file not shown.

View File

@@ -72,9 +72,11 @@ return{
setting_game="游戏设置", setting_game="游戏设置",
setting_graphic="画面设置", setting_graphic="画面设置",
setting_sound="声音设置", setting_sound="声音设置",
setting_control="控制设置",
setting_skin="外观设置",
preview="预览",
keyboard="键盘",joystick="手柄", keyboard="键盘",joystick="手柄",
ctrlSetHelp="方向键选择/翻页,回车修改,esc返回", ctrlSetHelp="方向键选择/翻页,回车修改,esc返回",
blockLayout="外观设置",
musicRoom="音乐室", musicRoom="音乐室",
nowPlaying="正在播放:", nowPlaying="正在播放:",
@@ -147,7 +149,7 @@ return{
"特别感谢:Flyz,Farter,196,Teatube,T830,[所有内测人员]和 你!", "特别感谢:Flyz,Farter,196,Teatube,T830,[所有内测人员]和 你!",
"", "",
"错误或者建议请附带截图发送到内测群或者作者邮箱~", "错误或者建议请附带截图发送到内测群或者作者邮箱~",
"游戏现在仅通过内测群1057456078进行免费下载/更新", "仅通过唯一内测群1057456078进行免费下载/更新",
"其他渠道获得游戏皆有被修改/植入病毒的风险,程序只申请了震动&联网权限!", "其他渠道获得游戏皆有被修改/植入病毒的风险,程序只申请了震动&联网权限!",
"若由于被修改的本游戏产生的各种损失作者不负责(我怎么负责啊跟我有啥关系)", "若由于被修改的本游戏产生的各种损失作者不负责(我怎么负责啊跟我有啥关系)",
"请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~", "请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~",
@@ -201,18 +203,6 @@ return{
}, },
draw={ draw={
any="不定", any="不定",
block1="Z",
block2="S",
block3="L",
block4="J",
block5="T",
block6="O",
block7="I",
gb1="",
gb2="",
gb3="",
gb4="",
gb5="",
space="×", space="×",
clear="清除", clear="清除",
demo="不显示×", demo="不显示×",
@@ -232,16 +222,12 @@ return{
setting_game={ setting_game={
graphic="←画面设置", graphic="←画面设置",
sound="声音设置→", sound="声音设置→",
reset="重置DAS/ARR", ctrl="控制设置",
dasD="-",dasU="+",
arrD="-",arrU="+",
sddasD="-",sddasU="+",
sdarrD="-",sdarrU="+",
reTime="开局等待时间", reTime="开局等待时间",
maxNext="最大预览数量", maxNext="最大预览数量",
autoPause="自动暂停", autoPause="自动暂停",
layout="外观", layout="外观",
ctrl="键位设置", key="键位设置",
touch="触屏设置", touch="触屏设置",
quickR="快速重新开始", quickR="快速重新开始",
autoPause="自动暂停", autoPause="自动暂停",
@@ -275,6 +261,12 @@ return{
stereo="立体声", stereo="立体声",
back=BK, back=BK,
}, },
setting_control={
das="DAS",arr="ARR",
sddas="软降DAS",sdarr="软降ARR",
reset="重置",
back=BK,
},
setting_key={ setting_key={
back=BK, back=BK,
}, },

View File

@@ -66,15 +66,15 @@ return{
freshLimit={0,8,15,""}, freshLimit={0,8,15,""},
opponent={"无电脑","9S Lv1","9S Lv2","9S Lv3","9S Lv4","9S Lv5","CC Lv1","CC Lv2","CC Lv3","CC Lv4","CC Lv5","CC Lv6"}, opponent={"无电脑","9S Lv1","9S Lv2","9S Lv3","9S Lv4","9S Lv5","CC Lv1","CC Lv2","CC Lv3","CC Lv4","CC Lv5","CC Lv6"},
}, },
softdropdas="软降DAS:",
softdroparr="软降ARR:",
snapLevelName={"无吸附","10px吸附","20px吸附","40px吸附","60px吸附","80px吸附"}, snapLevelName={"无吸附","10px吸附","20px吸附","40px吸附","60px吸附","80px吸附"},
setting_game="游戏设置", setting_game="游戏设置",
setting_graphic="画面设置", setting_graphic="画面设置",
setting_sound="声音设置", setting_sound="声音设置",
setting_control="控制设置",
setting_skin="外观设置",
preview="预览",
keyboard="键盘",joystick="手柄", keyboard="键盘",joystick="手柄",
ctrlSetHelp="方向键选择/翻页,回车修改,esc返回", ctrlSetHelp="方向键选择/翻页,回车修改,esc返回",
blockLayout="外观设置",
musicRoom="音乐室", musicRoom="音乐室",
nowPlaying="正在播放:", nowPlaying="正在播放:",
@@ -147,7 +147,7 @@ return{
"特别感谢:Flyz,Farter,196,Teatube,T830,[所有内测人员]和 你!", "特别感谢:Flyz,Farter,196,Teatube,T830,[所有内测人员]和 你!",
"", "",
"错误或者建议请附带截图发送到内测群或者作者邮箱~", "错误或者建议请附带截图发送到内测群或者作者邮箱~",
"游戏现在仅通过内测群1057456078进行免费下载/更新", "仅通过唯一内测群1057456078进行免费下载/更新",
"其他渠道获得游戏皆有被修改/植入病毒的风险,程序只申请了震动&联网权限!", "其他渠道获得游戏皆有被修改/植入病毒的风险,程序只申请了震动&联网权限!",
"若由于被修改的本游戏产生的各种损失作者不负责(我怎么负责啊跟我有啥关系)", "若由于被修改的本游戏产生的各种损失作者不负责(我怎么负责啊跟我有啥关系)",
"请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~", "请从正规途径获得最新版,游戏现为免费,不过有打赏当然感谢啦~",
@@ -201,18 +201,6 @@ return{
}, },
draw={ draw={
any="不定", any="不定",
block1="Z",
block2="S",
block3="L",
block4="J",
block5="T",
block6="O",
block7="I",
gb1="",
gb2="",
gb3="",
gb4="",
gb5="",
space="×", space="×",
clear="清除", clear="清除",
demo="不显示×", demo="不显示×",
@@ -232,16 +220,12 @@ return{
setting_game={ setting_game={
graphic="←画面设置", graphic="←画面设置",
sound="声音设置→", sound="声音设置→",
reset="重置DAS/ARR", ctrl="控制设置",
dasD="-",dasU="+",
arrD="-",arrU="+",
sddasD="-",sddasU="+",
sdarrD="-",sdarrU="+",
reTime="开局等待时间", reTime="开局等待时间",
maxNext="最大预览数量", maxNext="最大预览数量",
autoPause="自动暂停", autoPause="自动暂停",
layout="外观", layout="外观",
ctrl="键位设置", key="键位设置",
touch="触屏设置", touch="触屏设置",
quickR="快速重新开始", quickR="快速重新开始",
swap="组合键切换攻击模式", swap="组合键切换攻击模式",
@@ -274,6 +258,12 @@ return{
stereo="立体声", stereo="立体声",
back=BK, back=BK,
}, },
setting_control={
das="首次移动延迟",arr="移动重复延迟",
sddas="首次软降延迟",sdarr="软降重复延迟",
reset="重置",
back=BK,
},
setting_key={ setting_key={
back=BK, back=BK,
}, },

View File

@@ -64,14 +64,14 @@ return{
freshLimit={0,8,15,""}, freshLimit={0,8,15,""},
opponent={"No CPU","9S Lv1","9S Lv2","9S Lv3","9S Lv4","9S Lv5","CC Lv1","CC Lv2","CC Lv3","CC Lv4","CC Lv5","CC Lv6"}, opponent={"No CPU","9S Lv1","9S Lv2","9S Lv3","9S Lv4","9S Lv5","CC Lv1","CC Lv2","CC Lv3","CC Lv4","CC Lv5","CC Lv6"},
}, },
softdropdas="Down DAS:",
softdroparr="Down ARR:",
snapLevelName={"Free pos","Snap-10","Snap-20","Snap-40","Snap-60","Snap-80"}, snapLevelName={"Free pos","Snap-10","Snap-20","Snap-40","Snap-60","Snap-80"},
setting_game="Game setting", setting_game="Game setting",
setting_graphic="Graphic setting", setting_graphic="Graphic setting",
setting_sound="Sound setting", setting_sound="Sound setting",
setting_control="Control Setting",
setting_skin="Layout Setting",
preview="Preview",
keyboard="Keyboard",joystick="Joystick", keyboard="Keyboard",joystick="Joystick",
blockLayout="Layout Setting",
ctrlSetHelp="Arrowkey to select/change slot,Enter to change,Esc back", ctrlSetHelp="Arrowkey to select/change slot,Enter to change,Esc back",
musicRoom="Music Room", musicRoom="Music Room",
nowPlaying="Now Playing:", nowPlaying="Now Playing:",
@@ -145,7 +145,7 @@ return{
"Special thanks:Flyz,Farter,196,Teatube,T830,[all test staff] and YOU!", "Special thanks:Flyz,Farter,196,Teatube,T830,[all test staff] and YOU!",
"", "",
"Any bugs/suggestions to my E-mail.(may with screenshot)", "Any bugs/suggestions to my E-mail.(may with screenshot)",
"Newest game only released in alpha-test group FREE", "Only released in test group for FREE",
"Game downloaded from other way may implanted with virous", "Game downloaded from other way may implanted with virous",
"Only network/vibrating permission applied", "Only network/vibrating permission applied",
"Author is not responsible for any loss by eddited game", "Author is not responsible for any loss by eddited game",
@@ -199,18 +199,6 @@ Lib used:
}, },
draw={ draw={
any="Erase", any="Erase",
block1="Z",
block2="S",
block3="L",
block4="J",
block5="T",
block6="O",
block7="I",
gb1="",
gb2="",
gb3="",
gb4="",
gb5="",
space="×", space="×",
clear="Clear", clear="Clear",
demo="Don't show ×", demo="Don't show ×",
@@ -230,16 +218,12 @@ Lib used:
setting_game={ setting_game={
graphic="←Graphic", graphic="←Graphic",
sound="Sound→", sound="Sound→",
reset="Reset DAS/ARR", ctrl="Control setting",
dasD="-",dasU="+",
arrD="-",arrU="+",
sddasD="-",sddasU="+",
sdarrD="-",sdarrU="+",
reTime="Delay before game", reTime="Delay before game",
maxNext="Max next count", maxNext="Max next count",
autoPause="Auto pause", autoPause="Auto pause",
layout="Layout", layout="Layout",
ctrl="Key Setting", key="Key Setting",
touch="Touch Setting", touch="Touch Setting",
quickR="Quick restart", quickR="Quick restart",
autoPause="Auto pause", autoPause="Auto pause",
@@ -273,6 +257,12 @@ Lib used:
stereo="Stereo", stereo="Stereo",
back=BK, back=BK,
}, },
setting_control={
das="DAS",arr="ARR",
sddas="softdrop DAS",sdarr="softdrop ARR",
reset="Reset",
back=BK,
},
setting_key={ setting_key={
back=BK, back=BK,
}, },

View File

@@ -37,16 +37,10 @@ mapCam={
zoomK=nil, zoomK=nil,
--for auto zooming when enter/leave scene --for auto zooming when enter/leave scene
} }
blockColor={}
curBG="none" curBG="none"
voiceQueue={free=0} voiceQueue={free=0}
texts={} texts={}
widget_sel=nil--selected widget object widget_sel=nil--selected widget object
virtualkeyDown,virtualkeyPressTime={},{}
for i=1,20 do
virtualkeyDown[i]=X
virtualkeyPressTime[i]=0
end
kb.setKeyRepeat(true) kb.setKeyRepeat(true)
kb.setTextInput(false) kb.setTextInput(false)
@@ -56,7 +50,7 @@ ms.setVisible(false)
customSel={1,22,1,1,7,3,1,1,8,4,1,1,1} customSel={1,22,1,1,7,3,1,1,8,4,1,1,1}
preField={h=20} preField={h=20}
for i=1,20 do preField[i]={0,0,0,0,0,0,0,0,0,0}end for i=1,20 do preField[i]={0,0,0,0,0,0,0,0,0,0}end
blockSkin,blockSkinMini={},{} -- blockSkin,blockSkinMini={},{}--redefined in skin.change
--Game system Vars --Game system Vars
------------------------------------------------------------- -------------------------------------------------------------
require("parts/list") require("parts/list")
@@ -406,23 +400,13 @@ function touchMove.draw(id,x,y,dx,dy)
end end
end end
local penKey={ local penKey={
["1"]=1,["2"]=2,["3"]=3, q=1,w=2,e=3,r=4,t=5,y=6,u=7,i=8,o=9,p=10,["["]=11,
q=4, w=5, e=6, a=12,s=13,d=14,f=15,g=16,h=17,
a=7, s=9, d=10, z=0,x=-1,
z=11, x=12, c=13,
tab=0, backspace=0,
lshift=-1, lalt=-1,
} }
function keyDown.draw(key) function keyDown.draw(key)
local sx,sy,pen=sceneTemp.x,sceneTemp.y,sceneTemp.pen local sx,sy,pen=sceneTemp.x,sceneTemp.y,sceneTemp.pen
if key=="delete"then if key=="up"or key=="down"or key=="left"or key=="right"then
if sceneTemp.sure>15 then
for y=1,20 do for x=1,10 do preField[y][x]=0 end end
sceneTemp.sure=0
else
sceneTemp.sure=50
end
elseif key=="up"or key=="down"or key=="left"or key=="right"then
if not sx then sx=1 end if not sx then sx=1 end
if not sy then sy=1 end if not sy then sy=1 end
if key=="up"and sy<20 then sy=sy+1 if key=="up"and sy<20 then sy=sy+1
@@ -433,6 +417,13 @@ function keyDown.draw(key)
if kb.isDown("space")then if kb.isDown("space")then
preField[sy][sx]=pen preField[sy][sx]=pen
end end
elseif key=="delete"then
if sceneTemp.sure>20 then
for y=1,20 do for x=1,10 do preField[y][x]=0 end end
sceneTemp.sure=0
else
sceneTemp.sure=50
end
elseif key=="space"then elseif key=="space"then
if sx and sy then if sx and sy then
preField[sy][sx]=pen preField[sy][sx]=pen
@@ -626,13 +617,12 @@ function touchDown.play(id,x,y)
local t=onVirtualkey(x,y) local t=onVirtualkey(x,y)
if t then if t then
players[1]:pressKey(t) players[1]:pressKey(t)
virtualkeyDown[t]=true virtualkey[t].isDown=true
virtualkeyPressTime[t]=10 virtualkey[t].pressTime=10
if setting.VKTrack then if setting.VKTrack then
local B=virtualkey[t] local B=virtualkey[t]
--按钮软碰撞(做不来hhh随便做一个,效果还行!) if setting.VKDodge then--按钮软碰撞(做不来hhh随便做一个,效果还行!)
if setting.VKDodge then for i=1,#virtualkey do
for i=1,#virtualkey do
local b=virtualkey[i] local b=virtualkey[i]
local d=B.r+b.r-((B.x-b.x)^2+(B.y-b.y)^2)^.5--碰撞深度(负数=间隔距离) local d=B.r+b.r-((B.x-b.x)^2+(B.y-b.y)^2)^.5--碰撞深度(负数=间隔距离)
if d>0 then if d>0 then
@@ -644,8 +634,8 @@ function touchDown.play(id,x,y)
local O=VK_org[t] local O=VK_org[t]
local _FW,_CW=setting.VKTchW*.1,1-setting.VKCurW*.1 local _FW,_CW=setting.VKTchW*.1,1-setting.VKCurW*.1
local _OW=1-_FW-_CW local _OW=1-_FW-_CW
B.x,B.y=x*_FW+B.x*_CW+O.x*_OW,y*_FW+B.y*_CW+O.y*_OW
--按钮自动跟随:手指位置,当前位置,原始位置,权重取决于设置 --按钮自动跟随:手指位置,当前位置,原始位置,权重取决于设置
B.x,B.y=x*_FW+B.x*_CW+O.x*_OW,y*_FW+B.y*_CW+O.y*_OW
end end
VIB(0) VIB(0)
end end
@@ -677,7 +667,7 @@ function touchMove.play(id,x,y,dx,dy)
end end
function keyDown.play(key) function keyDown.play(key)
if key=="escape"then if key=="escape"then
(frame<180 and back or pauseGame)() (frame<180 and scene.back or pauseGame)()
return return
end end
local m=keyMap local m=keyMap
@@ -686,8 +676,8 @@ function keyDown.play(key)
if key==m[2*p-1][k]or key==m[2*p][k]then if key==m[2*p-1][k]or key==m[2*p][k]then
players[p]:pressKey(k) players[p]:pressKey(k)
if p==1 then if p==1 then
virtualkeyDown[k]=true virtualkey[k].isDown=true
virtualkeyPressTime[k]=10 virtualkey[k].pressTime=10
end end
return return
end end
@@ -700,6 +690,7 @@ function keyUp.play(key)
for k=1,20 do for k=1,20 do
if key==m[2*p-1][k]or key==m[2*p][k]then if key==m[2*p-1][k]or key==m[2*p][k]then
players[p]:releaseKey(k) players[p]:releaseKey(k)
if p==1 then virtualkey[k].isDown=false end
return return
end end
end end
@@ -713,8 +704,8 @@ function gamepadDown.play(key)
if key==m[2*p+7][k]or key==m[2*p+8][k]then if key==m[2*p+7][k]or key==m[2*p+8][k]then
players[p]:pressKey(k) players[p]:pressKey(k)
if p==1 then if p==1 then
virtualkeyDown[k]=true virtualkey[k].isDown=true
virtualkeyPressTime[k]=10 virtualkey[k].pressTime=10
end end
return return
end end
@@ -727,12 +718,12 @@ function gamepadUp.play(key)
for k=1,20 do for k=1,20 do
if key==m[2*p+7][k]or key==m[2*p+8][k]then if key==m[2*p+7][k]or key==m[2*p+8][k]then
players[p]:releaseKey(k) players[p]:releaseKey(k)
if p==1 then virtualkey[k].isDown=false end
return return
end end
end end
end end
end end
function wheelMoved.history(x,y) function wheelMoved.history(x,y)
wheelScroll(y) wheelScroll(y)
end end
@@ -851,8 +842,10 @@ function love.mousemoved(x,y,dx,dy,t)
if mouseMove[scene.cur]then if mouseMove[scene.cur]then
mouseMove[scene.cur](mx,my,dx,dy) mouseMove[scene.cur](mx,my,dx,dy)
end end
if ms.isDown(1)and widget_sel then if ms.isDown(1) then
widgetDrag(widget_sel,mx,my,dx,dy) if widget_sel then
widgetDrag(widget_sel,mx,my,dx,dy)
end
else else
widget_sel=nil widget_sel=nil
for _,W in next,Widget[scene.cur]do for _,W in next,Widget[scene.cur]do
@@ -900,18 +893,19 @@ function love.touchmoved(id,x,y,dx,dy)
touchMove[scene.cur](id,x,y,dx/scr.k,dy/scr.k) touchMove[scene.cur](id,x,y,dx/scr.k,dy/scr.k)
end end
if widget_sel then if widget_sel then
widgetDrag(widget_sel,x,y,dx,dy) if touching then
widgetDrag(widget_sel,x,y,dx,dy)
end
else else
widget_sel=nil
for _,W in next,Widget[scene.cur]do for _,W in next,Widget[scene.cur]do
if not(W.hide and W.hide())and W:isAbove(x,y)then if not(W.hide and W.hide())and W:isAbove(x,y)then
widget_sel=W widget_sel=W
return return
end end
end end
end if not widget_sel then
if not widget_sel then touching=nil
touching=nil end
end end
end end
function love.touchreleased(id,x,y) function love.touchreleased(id,x,y)
@@ -937,6 +931,7 @@ function love.keypressed(i)
if i=="f8"then devMode=0 if i=="f8"then devMode=0
elseif i=="f9"then devMode=1 elseif i=="f9"then devMode=1
elseif i=="f10"then devMode=2 elseif i=="f10"then devMode=2
elseif i=="f11"then devMode=3
elseif devMode==2 then elseif devMode==2 then
if i=="k"then if i=="k"then
for i=1,8 do for i=1,8 do
@@ -1086,8 +1081,8 @@ local function love_update(dt)
local S=scene.swap local S=scene.swap
S.time=S.time-1 S.time=S.time-1
if S.time==S.mid then if S.time==S.mid then
scene.init(S.tar,scene.cur)
scene.cur=S.tar scene.cur=S.tar
scene.init(S.tar)
for _,W in next,Widget[S.tar]do for _,W in next,Widget[S.tar]do
W:reset() W:reset()
end--重置控件 end--重置控件
@@ -1099,8 +1094,8 @@ local function love_update(dt)
scene.swapping=false scene.swapping=false
end end
end end
local i=Tmr[scene.cur] local _=Tmr[scene.cur]
if i then i(dt)end if _ then _(dt)end
for i=#Task,1,-1 do for i=#Task,1,-1 do
local T=Task[i] local T=Task[i]
if T.code(T.P,T.data)then if T.code(T.P,T.data)then
@@ -1144,9 +1139,10 @@ local function love_update(dt)
end end
end end
end end
--更新控件
for _,W in next,Widget[scene.cur]do for _,W in next,Widget[scene.cur]do
W:update() W:update()
end--更新控件 end
end end
local scs={1,2,1,2,1,2,1,2,1,2,1.5,1.5,.5,2.5} local scs={1,2,1,2,1,2,1,2,1,2,1.5,1.5,.5,2.5}
local FPS=love.timer.getFPS local FPS=love.timer.getFPS
@@ -1167,7 +1163,7 @@ local function love_draw()
if mouseShow then if mouseShow then
local r=Timer()*.5 local r=Timer()*.5
local R=int(r)%7+1 local R=int(r)%7+1
local _=blockColor[R] local _=skin.libColor[setting.skin[R]]
gc.setColor(_[1],_[2],_[3],min(1-abs(1-r%1*2),.3)) gc.setColor(_[1],_[2],_[3],min(1-abs(1-r%1*2),.3))
gc.draw(miniBlock[R],mx,my,Timer()%3.1416*4,20,20,scs[2*R]-.5,#blocks[R][0]-scs[2*R-1]+.5) gc.draw(miniBlock[R],mx,my,Timer()%3.1416*4,20,20,scs[2*R]-.5,#blocks[R][0]-scs[2*R-1]+.5)
gc.setColor(1,1,1,.5)gc.circle("fill",mx,my,5) gc.setColor(1,1,1,.5)gc.circle("fill",mx,my,5)
@@ -1214,6 +1210,9 @@ local function love_draw()
gc.print("Mouse:"..mx.." "..my,5,_-60) gc.print("Mouse:"..mx.." "..my,5,_-60)
gc.print("Voices:"..#voiceQueue,5,_-80) gc.print("Voices:"..#voiceQueue,5,_-80)
gc.print("Tasks:"..#Task,5,_-100) gc.print("Tasks:"..#Task,5,_-100)
if devMode==3 then
love.timer.sleep(.5)
end
end--DEV info end--DEV info
end end
love.draw,love.update=NULL,NULL love.draw,love.update=NULL,NULL
@@ -1325,10 +1324,4 @@ function love.errorhandler(msg)
end end
end end
-------------------------------------------------------------Reset data relied on setting -------------------------------------------------------------Reset data relied on setting
for _=1,7 do
blockColor[_]=skin.libColor[setting.skin[_]]
end
for _=8,17 do
blockColor[_]=skin.libColor[_]
end
changeLanguage(setting.lang) changeLanguage(setting.lang)

View File

@@ -38,6 +38,7 @@ return{
next=1,hold=false, next=1,hold=false,
sequence="rnd", sequence="rnd",
freshLimit=0, freshLimit=0,
face={0,0,2,2,2,0,0},
target=10,dropPiece=check_LVup, target=10,dropPiece=check_LVup,
bg="rgb",bgm="rockblock", bg="rgb",bgm="rockblock",
}, },

View File

@@ -7,7 +7,7 @@ local function puzzleCheck(P)
local a,b=preField[y][x],L and L[x]or 0 local a,b=preField[y][x],L and L[x]or 0
if a~=0 then if a~=0 then
if a==-1 then if b>0 then return end if a==-1 then if b>0 then return end
elseif a<8 then if a~=b then return end elseif a<12 then if a~=b then return end
elseif a>7 then if b==0 then return end elseif a>7 then if b==0 then return end
end end
end end

View File

@@ -52,6 +52,6 @@ return{
W>=80 and 3 or W>=80 and 3 or
W>=50 and 2 or W>=50 and 2 or
W>=20 and 1 or W>=20 and 1 or
L>=5 and 0 P.stat.row>=5 and 0
end, end,
} }

View File

@@ -51,6 +51,6 @@ return{
W>=80 and 3 or W>=80 and 3 or
W>=50 and 2 or W>=50 and 2 or
W>=20 and 1 or W>=20 and 1 or
L>=5 and 0 P.stat.row>=5 and 0
end, end,
} }

143
paint.lua
View File

@@ -1,9 +1,11 @@
local gc=love.graphics local gc=love.graphics
local setFont=setFont local setFont=setFont
local int,ceil,rnd,max,min,sin=math.floor,math.ceil,math.random,math.max,math.min,math.sin local int,ceil,rnd,abs=math.floor,math.ceil,math.random,math.abs
local max,min,sin=math.max,math.min,math.sin
local format=string.format local format=string.format
local Timer=love.timer.getTime local Timer=love.timer.getTime
local mStr=mStr
local scr=scr local scr=scr
local scs=require("parts/spinCenters") local scs=require("parts/spinCenters")
local modeRankColor={ local modeRankColor={
@@ -57,21 +59,38 @@ local function VirtualkeyPreview()
end end
end end
local function drawVirtualkey() local function drawVirtualkey()
local V=virtualkey
local a=setting.VKAlpha*.1 local a=setting.VKAlpha*.1
for i=1,#virtualkey do if setting.VKIcon then
local B=virtualkey[i] for i=1,#V do
if B.ava then if V[i].ava then
local _=virtualkeyDown[i]and gc.setColor(.7,.7,.7,a)or gc.setColor(1,1,1,a)--Dark magic local B=V[i]
gc.setLineWidth(B.r*.07) gc.setColor(1,1,1,a)
local ΔY=virtualkeyPressTime[i] gc.setLineWidth(B.r*.07)
gc.circle("line",B.x,B.y+ΔY,B.r)--Outline circle gc.circle("line",B.x,B.y,B.r)--Button outline
if setting.VKIcon then local _=V[i].pressTime
gc.draw(VKIcon[i],B.x,B.y+ΔY,nil,B.r*.025,nil,18,18) gc.draw(VKIcon[i],B.x,B.y,nil,B.r*.026+_*.08,nil,18,18)--icon
end--Icon if _>0 then
if ΔY>0 then gc.setColor(1,1,1,a*_*.08)
gc.setColor(1,1,1,a*ΔY*.1) gc.circle("fill",B.x,B.y,B.r*.94)--Glow
gc.circle("line",B.x,B.y,B.r*(1.4-ΔY*.04)) gc.circle("line",B.x,B.y,B.r*(1.4-_*.04))--Ripple
end--Ripple end
end
end
else
for i=1,#V do
if V[i].ava then
local B=V[i]
gc.setColor(1,1,1,a)
gc.setLineWidth(B.r*.07)
gc.circle("line",B.x,B.y,B.r)
local _=V[i].pressTime
if _>0 then
gc.setColor(1,1,1,a*_*.08)
gc.circle("fill",B.x,B.y,B.r*.94)
gc.circle("line",B.x,B.y,B.r*(1.4-_*.04))
end
end
end end
end end
end end
@@ -134,17 +153,18 @@ function Pnt.BG.game5()
else gc.clear(0,0,0) else gc.clear(0,0,0)
end end
end--Lightning end--Lightning
local miniBlockColor={}
function Pnt.BG.game6() function Pnt.BG.game6()
local t=1.2-Timer()%10%3%1.2 local t=1.2-Timer()%10%3%1.2
if t<.3 then gc.clear(t,t,t) if t<.3 then gc.clear(t,t,t)
else gc.clear(0,0,0) else gc.clear(0,0,0)
end end
local R=7-int(Timer()*.5)%7 local R=7-int(Timer()*.5)%7
local _=blockColor[R] local _=miniBlockColor[R]
gc.setColor(_[1],_[2],_[3],.1) gc.setColor(_[1],_[2],_[3],.1)
gc.draw(miniBlock[R],640,360,Timer()%3.1416*6,400,400,scs[R][0][2]-.5,#blocks[R][0]-scs[R][0][1]+.5) gc.draw(miniBlock[R],640,360,Timer()%3.1416*6,400,400,scs[R][0][2]-.5,#blocks[R][0]-scs[R][0][1]+.5)
end--Fast lightning&spining tetromino end--Fast lightning&spining tetromino
local matrixT={}for i=1,20 do matrixT[i]={}for j=1,20 do matrixT[i][j]=love.math.noise(i,j)+2 end end local matrixT={}for i=1,50 do matrixT[i]={}for j=1,50 do matrixT[i][j]=love.math.noise(i,j)+2 end end
function Pnt.BG.matrix() function Pnt.BG.matrix()
gc.scale(scr.k) gc.scale(scr.k)
gc.clear(.15,.15,.15) gc.clear(.15,.15,.15)
@@ -227,8 +247,8 @@ function Pnt.mode()
if c then if c then
gc.setColor(c) gc.setColor(c)
else else
c=.5+sin(Timer()*6+_)*.2 c=.5+sin(Timer()*6.26-_)*.2
S=S*(.8+c*.5) S=S*(.9+c*.4)
gc.setColor(c,c,c) gc.setColor(c,c,c)
end end
if M.shape==1 then--Rectangle if M.shape==1 then--Rectangle
@@ -353,7 +373,6 @@ function Pnt.custom()
end end
end end
end end
local blockSkin=blockSkin
function Pnt.draw() function Pnt.draw()
local sx,sy=sceneTemp.x,sceneTemp.y local sx,sy=sceneTemp.x,sceneTemp.y
gc.translate(200,60) gc.translate(200,60)
@@ -382,17 +401,23 @@ function Pnt.draw()
local pen=sceneTemp.pen local pen=sceneTemp.pen
if pen>0 then if pen>0 then
gc.setLineWidth(13) gc.setLineWidth(13)
gc.setColor(blockColor[pen]) gc.setColor(skin.libColor[pen])
gc.rectangle("line",745,460,70,70) gc.rectangle("line",565,460,70,70)
elseif pen==-1 then elseif pen==-1 then
gc.setLineWidth(5) gc.setLineWidth(5)
gc.setColor(.9,.9,.9) gc.setColor(.9,.9,.9)
gc.line(755,470,805,520) gc.line(575,470,625,520)
gc.line(755,520,805,470) gc.line(575,520,625,470)
end end
if sceneTemp.sure>0 then if sceneTemp.sure>0 then
gc.setColor(1,1,1,sceneTemp.sure*.02) gc.setColor(1,1,1,sceneTemp.sure*.02)
gc.draw(drawableText.question,660,11) gc.draw(drawableText.question,1040,430)
end
setFont(40)
for i=1,7 do
local _=setting.skin[i]
gc.setColor(skin.libColor[_])
mStr(text.block[i],500+65*_,65)
end end
end end
function Pnt.play() function Pnt.play()
@@ -463,20 +488,21 @@ function Pnt.play()
end end
function Pnt.pause() function Pnt.pause()
Pnt.play() Pnt.play()
local _=pauseTimer*.02 local T=sceneTemp.timer*.02
if gameResult then _=_*.6 end local t=T
gc.setColor(.15,.15,.15,_) if gameResult then t=t*.6 end
gc.setColor(.15,.15,.15,t)
gc.push("transform") gc.push("transform")
gc.origin() gc.origin()
gc.rectangle("fill",0,0,scr.w,scr.h) gc.rectangle("fill",0,0,scr.w,scr.h)
gc.pop() gc.pop()
setFont(25) setFont(25)
gc.setColor(1,1,1,pauseTimer*.02) gc.setColor(1,1,1,T)
if pauseCount>0 then if pauseCount>0 then
_=curMode.pauseLimit and pauseTime>30 t=curMode.pauseLimit and pauseTime>30
if _ then gc.setColor(1,.4,.4,pauseTimer*.02)end if t then gc.setColor(1,.4,.4,T)end
gc.print(text.pauseCount..":["..pauseCount.."] "..format("%.2f",pauseTime).."s",110,150) gc.print(text.pauseCount..":["..pauseCount.."] "..format("%.2f",pauseTime).."s",110,150)
if _ then gc.setColor(1,1,1,pauseTimer*.02)end if t then gc.setColor(1,1,1,T)end
end end
for i=1,7 do for i=1,7 do
gc.print(text.pauseStat[i],95,30*i+310) gc.print(text.pauseStat[i],95,30*i+310)
@@ -487,21 +513,15 @@ function Pnt.pause()
gc.print(sceneTemp[i],1050,30*i+100) gc.print(sceneTemp[i],1050,30*i+100)
end end
_=drawableText.modeName _=drawableText.modeName
gc.draw(_,120,230) gc.draw(_,100,230)
gc.draw(drawableText.levelName,135+_:getWidth(),230) gc.draw(drawableText.levelName,135+_:getWidth(),230)
setFont(35) setFont(35)
mDraw(gameResult and drawableText[gameResult]or drawableText.pause,640,50-10*(5-pauseTimer*.1)^1.5) mDraw(gameResult and drawableText[gameResult]or drawableText.pause,640,50-10*(5-sceneTemp.timer*.1)^1.5)
end end
function Pnt.setting_game() function Pnt.setting_game()
gc.setColor(1,1,1) gc.setColor(1,1,1)
mDraw(drawableText.setting_game,640,15) mDraw(drawableText.setting_game,640,15)
setFont(33) gc.draw(blockSkin[int(Timer()*2)%11+1],720,540,Timer()%6.28319,2,nil,15,15)
mStr("DAS:"..setting.das.."F",340,205)
mStr("ARR:"..setting.arr.."F",660,205)
setFont(22)
mStr(text.softdropdas..setting.sddas.."F",340,323)
mStr(text.softdroparr..setting.sdarr.."F",660,323)
gc.draw(blockSkin[7-int(Timer()*2)%7],720,570,Timer()%6.28319,2,nil,15,15)
end end
function Pnt.setting_graphic() function Pnt.setting_graphic()
gc.setColor(1,1,1) gc.setColor(1,1,1)
@@ -522,6 +542,41 @@ function Pnt.setting_sound()
gc.draw(miya.f4,129,98+3*sin(t*.7)) gc.draw(miya.f4,129,98+3*sin(t*.7))
gc.translate(-x,-y) gc.translate(-x,-y)
end end
function Pnt.setting_control()
--Testing grid line
gc.setLineWidth(4)
gc.setColor(1,1,1,.4)
gc.line(550,540,950,540)
gc.line(550,580,950,580)
gc.line(550,620,950,620)
for x=590,910,40 do
gc.line(x,530,x,630)
end
gc.setColor(1,1,1)
gc.line(550,530,550,630)
gc.line(950,530,950,630)
--Texts
gc.draw(drawableText.setting_control,80,50)
setFont(50)
gc.printf(text.preview,320,540,200,"right")
--Floating number
setFont(30)
local _=setting
mStr(_.das,226+35*_.das,150)
mStr(_.arr,226+35*_.arr,240)
mStr(_.sddas,226+35*_.sddas,330)
mStr(_.sdarr,226+35*_.sdarr,420)
--Testing O mino
_=blockSkin[setting.skin[6]]
local x=550+40*sceneTemp.pos
gc.draw(_,x,540,nil,40/30)
gc.draw(_,x,580,nil,40/30)
gc.draw(_,x+40,540,nil,40/30)
gc.draw(_,x+40,580,nil,40/30)
end
function Pnt.setting_key() function Pnt.setting_key()
local s=sceneTemp local s=sceneTemp
local a=.3+sin(Timer()*15)*.1 local a=.3+sin(Timer()*15)*.1
@@ -582,15 +637,15 @@ function Pnt.setting_skin()
local col=#B[1] local col=#B[1]
for i=1,#B do for j=1,col do for i=1,#B do for j=1,col do
if B[i][j]then if B[i][j]then
gc.draw(blockSkin[N],x+30*j,y-30*i) gc.draw(blockSkin[setting.skin[N]],x+30*j,y-30*i)
end end
end end end end
gc.circle("fill",-15+140*N,350,sin(Timer()*10)+5) gc.circle("fill",-15+140*N,350,sin(Timer()*10)+5)
end end
for i=1,5 do for i=1,5 do
gc.draw(blockSkin[8+i],1110,140+60*i,nil,2) gc.draw(blockSkin[12+i],1110,140+60*i,nil,2)
end end
gc.draw(drawableText.blockLayout,80,50) gc.draw(drawableText.setting_skin,80,50)
end end
function Pnt.setting_touch() function Pnt.setting_touch()
gc.setColor(1,1,1) gc.setColor(1,1,1)

View File

@@ -3,8 +3,8 @@
--https://github.com/mattdesl/lwjgl-basics/wiki/2D-Pixel-Perfect-Shadows --https://github.com/mattdesl/lwjgl-basics/wiki/2D-Pixel-Perfect-Shadows
local gc=love.graphics local gc=love.graphics
local C=gc.clear local C=gc.clear
local shadowMapShader=gc.newShader("parts/shader/shadowMap.cs")--Shader for caculating the 1D shadow map. local shadowMapShader=gc.newShader("shader/shadowMap.cs")--Shader for caculating the 1D shadow map.
local lightRenderShader=gc.newShader("parts/shader/lightRender.cs")--Shader for rendering blurred lights and shadows. local lightRenderShader=gc.newShader("shader/lightRender.cs")--Shader for rendering blurred lights and shadows.
Lights={}--Lightsource objects Lights={}--Lightsource objects
local Lights=Lights local Lights=Lights
--Private-- --Private--

View File

@@ -32,6 +32,7 @@ color={
darkCyan={0,.6,.6}, darkCyan={0,.6,.6},
darkGrey={.3,.3,.3}, darkGrey={.3,.3,.3},
black={0,0,0},
orange={1,.6,0}, orange={1,.6,0},
pink={1,0,.6}, pink={1,0,.6},
grass={.6,1,0}, grass={.6,1,0},

View File

@@ -1,2 +1,2 @@
gc=love.graphics gc=love.graphics
shader_glow=gc.newShader("parts/shader/glow.cs") shader_glow=gc.newShader("shader/glow.cs")

View File

@@ -34,7 +34,7 @@ skin.libColor={
color.purple, color.purple,
color.magenta, color.magenta,
color.pink, color.pink,
color.darkGreen, color.darkGrey,
color.grey, color.grey,
color.lightGrey, color.lightGrey,
color.darkPurple, color.darkPurple,
@@ -70,14 +70,14 @@ function skin.load()
gc.setLineWidth(3) gc.setLineWidth(3)
for i=1,11 do for i=1,11 do
puzzleMark[i]=C(30,30) puzzleMark[i]=C(30,30)
local _=blockColor[i] local _=skin.libColor[i]
gc.setColor(_[1],_[2],_[3],.6) gc.setColor(_[1],_[2],_[3],.6)
gc.rectangle("line",5,5,20,20) gc.rectangle("line",5,5,20,20)
gc.rectangle("line",10,10,10,10) gc.rectangle("line",10,10,10,10)
end end
for i=12,17 do for i=12,17 do
puzzleMark[i]=C(30,30) puzzleMark[i]=C(30,30)
gc.setColor(blockColor[i]) gc.setColor(skin.libColor[i])
gc.rectangle("line",7,7,16,16) gc.rectangle("line",7,7,16,16)
end end
local _=C(30,30) local _=C(30,30)
@@ -109,30 +109,17 @@ end
function skin.prev(i)--prev skin for [i] function skin.prev(i)--prev skin for [i]
local _=setting.skin local _=setting.skin
_[i]=(_[i]-2)%11+1 _[i]=(_[i]-2)%11+1
skin.adjust(i,_[i])
end end
function skin.next(i)--next skin for [i] function skin.next(i)--next skin for [i]
local _=setting.skin local _=setting.skin
_[i]=_[i]%11+1 _[i]=_[i]%11+1
skin.adjust(i,_[i])
end end
function skin.rotate(i)--change direction of [i] function skin.rotate(i)--change direction of [i]
setting.face[i]=(setting.face[i]+1)%4 setting.face[i]=(setting.face[i]+1)%4
SFX.play("rotate") SFX.play("rotate")
end end
function skin.change(i)--change to skin_set[i] function skin.change(i)--change to skin_set[i]
for _=1,7 do blockSkin=skin.lib[i]
skin.adjust(_,setting.skin[_]) blockSkinMini=skin.libMini[i]
end
for _=8,13 do
blockSkin[_]=skin.lib[i][_+4]
blockSkinMini[_]=skin.libMini[i][_+4]
end
end
function skin.adjust(i,id)--load color/image/image_mini of [i] from lib
local S=setting.skinSet
blockSkin[i]=skin.lib[S][id]
blockSkinMini[i]=skin.libMini[S][id]
blockColor[i]=skin.libColor[id]
end end
return skin return skin

View File

@@ -13,8 +13,9 @@ local function newPlanet()
planet.y=H*.5+sin(a)*(R+r) planet.y=H*.5+sin(a)*(R+r)
planet.vx=-cos(a+rnd()-.5)*.0626 planet.vx=-cos(a+rnd()-.5)*.0626
planet.vy=-sin(a+rnd()-.5)*.0626 planet.vy=-sin(a+rnd()-.5)*.0626
planet.R=.7+rnd()*.2 planet.R=.7+rnd()*.22
planet.G=.7+rnd()*.1 planet.G=planet.R+rnd()*.16-.1
planet.B=.7+rnd()*.2
end end
local space={}--LIB local space={}--LIB
@@ -50,9 +51,9 @@ function space.draw()
if not stars[1]then return end if not stars[1]then return end
gc.translate(-50,-50) gc.translate(-50,-50)
gc.setLineWidth(7) gc.setLineWidth(7)
gc.setColor(planet.R,planet.G,.6,.1626) gc.setColor(planet.R,planet.G,planet.B,.1626)
gc.circle("line",planet.x,planet.y,planet.r+1) gc.circle("line",planet.x,planet.y,planet.r+1)
gc.setColor(planet.R,planet.G,.6,.26) gc.setColor(planet.R,.6,planet.B,.26)
gc.circle("fill",planet.x,planet.y,planet.r) gc.circle("fill",planet.x,planet.y,planet.r)
gc.setColor(.9,.9,.9) gc.setColor(.9,.9,.9)
for i=1,2600,5 do for i=1,2600,5 do

View File

@@ -1,19 +1,6 @@
local min=math.min local min=math.min
local mini=love.window.isMinimized local mini=love.window.isMinimized
local task={} local task={}
function task.pauseGame()
if not mini()then
pauseTimer=pauseTimer+1
end
return pauseTimer==50
end
function task.resumeGame()
pauseTimer=pauseTimer-1
if pauseTimer==0 then
scene.swapTo("play","none")
return true
end
end
function task.finish(P) function task.finish(P)
if scene.cur~="play"then return true end if scene.cur~="play"then return true end
P.endCounter=P.endCounter+1 P.endCounter=P.endCounter+1
@@ -81,15 +68,4 @@ function task.bgmFadeIn(_,id)
src:setVolume(v) src:setVolume(v)
if v>=setting.bgm*.1 then return true end if v>=setting.bgm*.1 then return true end
end end
function task.settingSaved(_,T)
T[1]=T[1]-1
if T[1]==0 then
if scene.cur=="main"then
TEXT(text.settingSaved,370,330,28,"appear")
else
TEXT(text.needRestart,1130,130,28,"appear")
end
return true
end
end
return task return task

View File

@@ -5,7 +5,6 @@ local ins,rem=table.insert,table.remove
local format=string.format local format=string.format
local actName=actName--controllings' id local actName=actName--controllings' id
local scr=scr--screen camera local scr=scr--screen camera
local blockSkin,blockSkinMini=blockSkin,blockSkinMini--skinTable
-------------------------<GameData>------------------------- -------------------------<GameData>-------------------------
local gameEnv0={ local gameEnv0={
noFly=false, noFly=false,
@@ -22,10 +21,11 @@ local gameEnv0={
ospin=true, ospin=true,
sequence="bag7", sequence="bag7",
face=NULL, face=NULL,
skin=NULL,
pushSpeed=3, pushSpeed=3,
block=true, block=true,
visible="show",--keepVisible=visile~="show" visible="show",
Fkey=NULL,puzzle=false, Fkey=NULL,puzzle=false,
freshLimit=1e99,easyFresh=true, freshLimit=1e99,easyFresh=true,
fine=false,fineKill=false, fine=false,fineKill=false,
@@ -33,7 +33,7 @@ local gameEnv0={
mindas=0,minarr=0,minsdarr=0, mindas=0,minarr=0,minsdarr=0,
bg="none",bgm="race" bg="none",bgm="race"
} }
local renATK={[0]=0,0,0,1,1,2,2,3,3,4,4}--3 else local comboAtk={0,0,1,1,2,2,2,3,3,4,3}--2 else
local b2bPoint={50,100,180} local b2bPoint={50,100,180}
local b2bATK={3,5,8} local b2bATK={3,5,8}
local clearSCR={80,200,400} local clearSCR={80,200,400}
@@ -43,8 +43,8 @@ local spinSCR={--[blockName][row]
{220,700,1600},--L {220,700,1600},--L
{220,700,1600},--J {220,700,1600},--J
{250,800,1500},--T {250,800,1500},--T
{300,1000,2200},--O {260,900,1800},--O
{300,1000,1800},--I {300,1200,1700},--I
} }
--B2BMUL:1.2/2.0 --B2BMUL:1.2/2.0
--Techrash:1K;MUL:1.3/1.8 --Techrash:1K;MUL:1.3/1.8
@@ -482,23 +482,21 @@ local function Pdraw_demo(P)
end end
end end--Block end end--Block
end end
local N=P.hd.color local id=P.hd.id
local _=blockColor[N] if id>0 then
if _ then local _=P.color[id]
gc.setColor(_[1],_[2],_[3],.3) gc.setColor(_[1],_[2],_[3],.3)
N=miniBlock[N] _=miniBlock[P.hd.id]
gc.draw(N,15,30,nil,16,nil,0,N:getHeight()*.5) gc.draw(_,15,30,nil,16,nil,0,_:getHeight()*.5)
end end
N=1 local N=1
::L:: ::L::
if N<=P.gameEnv.next and P.next[N]then if N<=P.gameEnv.next and P.next[N]then
local n=P.next[N].color local id=P.next[N].id
local _=blockColor[n] local _=P.color[id]
if _ then gc.setColor(_[1],_[2],_[3],.3)
gc.setColor(_[1],_[2],_[3],.3) _=miniBlock[id]
_=miniBlock[n] gc.draw(_,285,40*N-10,nil,16,nil,_:getWidth(),_:getHeight()*.5)
gc.draw(_,285,40*N-10,nil,16,nil,_:getWidth(),_:getHeight()*.5)
end
N=N+1 N=N+1
goto L goto L
end end
@@ -554,10 +552,11 @@ end
local function Pupdate_alive(P,dt) local function Pupdate_alive(P,dt)
if P.timing then P.stat.time=P.stat.time+dt end if P.timing then P.stat.time=P.stat.time+dt end
if P.keyRec then if P.keyRec then
local _=frame
local v=0 local v=0
for i=2,10 do v=v+i*(i-1)*7.2/(frame-P.keyTime[i])end P.keySpeed=P.keySpeed*.99+v*.1 for i=2,10 do v=v+i*(i-1)*7.2/(_-P.keyTime[i])end P.keySpeed=P.keySpeed*.99+v*.1
v=0 v=0
for i=2,10 do v=v+i*(i-1)*7.2/(frame-P.dropTime[i])end P.dropSpeed=P.dropSpeed*.99+v*.1 for i=2,10 do v=v+i*(i-1)*7.2/(_-P.dropTime[i])end P.dropSpeed=P.dropSpeed*.99+v*.1
--Update speeds --Update speeds
if modeEnv.royaleMode then if modeEnv.royaleMode then
if P.keyPressing[9]then if P.keyPressing[9]then
@@ -586,41 +585,67 @@ local function Pupdate_alive(P,dt)
end--Fresh visible time end--Fresh visible time
if P.moving<0 then if P.moving<0 then
if P.keyPressing[1]then if P.keyPressing[1]then
if -P.moving<=P.gameEnv.das then local flag=false
P.moving=P.moving-1 local moving=-P.moving-1--remove sign mark
elseif P.waiting==-1 then if moving<P.gameEnv.das then
local x=P.curX moving=moving+1
if P.gameEnv.arr>0 then if moving==P.gameEnv.das then
P.act.moveLeft(P,true) if P.waiting==-1 then
else flag=true
P.act.insLeft(P,true) end
end end
if x~=P.curX then else
P.moving=P.moving+P.gameEnv.arr-1 moving=moving+1
elseif not P.small then if moving>P.gameEnv.das+P.gameEnv.arr then
P.fieldOff.vx=-setting.shakeFX*.5 moving=P.gameEnv.das
flag=true
end end
end end
if flag then
local x=P.curX
if P.gameEnv.arr==0 then
P.act.insLeft(P,true)
else
P.act.moveLeft(P,true)
end
end
if P:ifoverlap(P.cur.bk,P.curX-1,P.curY) and not P.small then
P.fieldOff.vx=-setting.shakeFX*.5
end
P.moving=-moving-1
else else
P.moving=0 P.moving=0
end end
elseif P.moving>0 then elseif P.moving>0 then
if P.keyPressing[2]then if P.keyPressing[2]then
if P.moving<=P.gameEnv.das then local flag=false
P.moving=P.moving+1 local moving=P.moving-1--remove sign mark
elseif P.waiting==-1 then if moving<P.gameEnv.das then
local x=P.curX moving=moving+1
if P.gameEnv.arr>0 then if moving==P.gameEnv.das then
P.act.moveRight(P,true) if P.waiting==-1 then
else flag=true
P.act.insRight(P,true) end
end end
if x~=P.curX then else
P.moving=P.moving-P.gameEnv.arr+1 moving=moving+1
elseif not P.small then if moving>P.gameEnv.das+P.gameEnv.arr then
P.fieldOff.vx=setting.shakeFX*.5 moving=P.gameEnv.das
flag=true
end end
end end
if flag then
local x=P.curX
if P.gameEnv.arr==0 then
P.act.insRight(P,true)
else
P.act.moveRight(P,true)
end
end
if P:ifoverlap(P.cur.bk,P.curX+1,P.curY) and not P.small then
P.fieldOff.vx=setting.shakeFX*.5
end
P.moving=moving+1
else else
P.moving=0 P.moving=0
end end
@@ -654,9 +679,9 @@ local function Pupdate_alive(P,dt)
end end
end end
if not P.control then goto stop end if not P.control then goto stop end
if P.waiting==0 then P:freshNext()end
if P.waiting>=0 then if P.waiting>=0 then
P.waiting=P.waiting-1 P.waiting=P.waiting-1
if P.waiting==-1 then P:freshNext()end
goto stop goto stop
end end
if P.curY~=P.y_img then if P.curY~=P.y_img then
@@ -758,7 +783,7 @@ function player.createBeam(P,R,send,time,target,color,clear,spin,mini,combo)
end end
local radius,corner local radius,corner
local a,r,g,b=1,unpack(blockColor[color]) local a,r,g,b=1,unpack(P.color[color])
if clear>10 then if clear>10 then
radius=10+3*send+100/(target+4) radius=10+3*send+100/(target+4)
local t=clear%10 local t=clear%10
@@ -814,18 +839,6 @@ end
-------------------------</FX>------------------------- -------------------------</FX>-------------------------
-------------------------<Method>------------------------- -------------------------<Method>-------------------------
local function ifoverlap(P,bk,x,y)
local C=#bk[1]
if x<1 or x+C>11 or y<1 then return true end
if y>#P.field then return end
for i=1,#bk do
if P.field[y+i-1]then
for j=1,C do
if bk[i][j]and P.field[y+i-1][x+j-1]>0 then return true end
end
end
end
end
local function solid(P,x,y) local function solid(P,x,y)
if x<1 or x>10 or y<1 then return true end if x<1 or x>10 or y<1 then return true end
if y>#P.field then return false end if y>#P.field then return false end
@@ -855,6 +868,18 @@ local OspinList={
{222,7,2,-2, 0, true},--I {222,7,2,-2, 0, true},--I
{222,7,2, 0, 0, true},--I {222,7,2, 0, 0, true},--I
}--key,type,dir,dx,dy,ifFix }--key,type,dir,dx,dy,ifFix
function player.ifoverlap(P,bk,x,y)
local C=#bk[1]
if x<1 or x+C>11 or y<1 then return true end
if y>#P.field then return end
for i=1,#bk do
if P.field[y+i-1]then
for j=1,C do
if bk[i][j]and P.field[y+i-1][x+j-1]>0 then return true end
end
end
end
end
function player.ckfull(P,i) function player.ckfull(P,i)
for j=1,10 do if P.field[i][j]<=0 then return end end for j=1,10 do if P.field[i][j]<=0 then return end end
return true return true
@@ -989,7 +1014,7 @@ end
function player.freshgho(P) function player.freshgho(P)
P.y_img=min(#P.field+1,P.curY) P.y_img=min(#P.field+1,P.curY)
if P.gameEnv._20G or P.keyPressing[7]and P.gameEnv.sdarr==0 then if P.gameEnv._20G or P.keyPressing[7]and P.gameEnv.sdarr==0 then
while not ifoverlap(P,P.cur.bk,P.curX,P.y_img-1)do while not P:ifoverlap(P.cur.bk,P.curX,P.y_img-1)do
P.y_img=P.y_img-1 P.y_img=P.y_img-1
P.spinLast=false P.spinLast=false
end end
@@ -1003,7 +1028,7 @@ function player.freshgho(P)
P.curY=P.y_img P.curY=P.y_img
end end
else else
while not ifoverlap(P,P.cur.bk,P.curX,P.y_img-1)do while not P:ifoverlap(P.cur.bk,P.curX,P.y_img-1)do
P.y_img=P.y_img-1 P.y_img=P.y_img-1
end end
end end
@@ -1039,7 +1064,7 @@ function player.spin(P,d,ifpre)
end end
if P.gameEnv.ospin then if P.gameEnv.ospin then
local x,y=P.curX,P.curY local x,y=P.curX,P.curY
if y==P.y_img and(solid(P,x-1,y+1)or solid(P,x+2,y+1))and(solid(P,x-1,y)or solid(P,x+2,y))then if y==P.y_img and((solid(P,x-1,y)or solid(P,x-1,y+1)))and(solid(P,x+2,y)or solid(P,x+2,y+1))then
local D=P.spinSeq%100*10+d local D=P.spinSeq%100*10+d
P.spinSeq=D P.spinSeq=D
if D>100 then if D>100 then
@@ -1049,7 +1074,7 @@ function player.spin(P,d,ifpre)
local id,dir=L[2],L[3] local id,dir=L[2],L[3]
local bk=blocks[id][dir] local bk=blocks[id][dir]
local x,y=P.curX+L[4],P.curY+L[5] local x,y=P.curX+L[4],P.curY+L[5]
if not ifoverlap(P,bk,x,y)and ifoverlap(P,bk,x,y+1)and(L[6]or ifoverlap(P,bk,x-1,y)and ifoverlap(P,bk,x+1,y))then if not P:ifoverlap(bk,x,y)and P:ifoverlap(bk,x,y+1)and(L[6]or P:ifoverlap(bk,x-1,y)and P:ifoverlap(bk,x+1,y))then
local C=P.cur local C=P.cur
C.id=id C.id=id
C.bk=bk C.bk=bk
@@ -1080,7 +1105,7 @@ function player.spin(P,d,ifpre)
local iki=P.RS[P.cur.id][P.dir*10+idir] local iki=P.RS[P.cur.id][P.dir*10+idir]
for i=1,P.freshTime<=1.2*P.gameEnv.freshLimit and #iki or 1 do for i=1,P.freshTime<=1.2*P.gameEnv.freshLimit and #iki or 1 do
local x,y=ix+iki[i][1],iy+iki[i][2] local x,y=ix+iki[i][1],iy+iki[i][2]
if not ifoverlap(P,icb,x,y)then if not P:ifoverlap(icb,x,y)then
ix=x;iy=y;t=i ix=x;iy=y;t=i
goto spin goto spin
end end
@@ -1098,7 +1123,7 @@ function player.spin(P,d,ifpre)
if not ifpre then P:freshgho()end if not ifpre then P:freshgho()end
if P.gameEnv.easyFresh or y0>P.curY then P:freshLockDelay()end if P.gameEnv.easyFresh or y0>P.curY then P:freshLockDelay()end
if P.human then if P.human then
SFX.play(ifpre and"prerotate"or ifoverlap(P,P.cur.bk,P.curX,P.curY+1)and ifoverlap(P,P.cur.bk,P.curX-1,P.curY)and ifoverlap(P,P.cur.bk,P.curX+1,P.curY)and"rotatekick"or"rotate",nil,getBlockPosition(P)) SFX.play(ifpre and"prerotate"or P:ifoverlap(P.cur.bk,P.curX,P.curY+1)and P:ifoverlap(P.cur.bk,P.curX-1,P.curY)and P:ifoverlap(P.cur.bk,P.curX+1,P.curY)and"rotatekick"or"rotate",nil,getBlockPosition(P))
end end
P.stat.rotate=P.stat.rotate+1 P.stat.rotate=P.stat.rotate+1
end end
@@ -1111,13 +1136,13 @@ function player.resetBlock(P)
P.r,P.c=#P.cur.bk,#P.cur.bk[1] --row/column P.r,P.c=#P.cur.bk,#P.cur.bk[1] --row/column
P.curX=initCenterX[id]-sc[2] P.curX=initCenterX[id]-sc[2]
P.curY=initCenterY[id]-sc[1]+ceil(P.fieldBeneath/30) P.curY=initCenterY[id]-sc[1]+ceil(P.fieldBeneath/30)
if abs(P.moving)>P.gameEnv.das and not ifoverlap(P,P.cur.bk,P.curX+(P.moving>0 and 1 or -1),P.curY)then if abs(P.moving)>P.gameEnv.das and not P:ifoverlap(P.cur.bk,P.curX+(P.moving>0 and 1 or -1),P.curY)then
P.curX=P.curX+(P.moving>0 and 1 or -1) P.curX=P.curX+(P.moving>0 and 1 or -1)
end end
--IMS --IMS
end end
function player.hold(P,ifpre) function player.hold(P,ifpre)
if not P.holded and P.waiting==-1 and P.gameEnv.hold then if not P.holded and (ifpre or P.waiting==-1) and P.gameEnv.hold then
--Finesse check --Finesse check
local H,B=P.hd,P.cur local H,B=P.hd,P.cur
if H and H.id==B.id and H.name==B.name then if H and H.id==B.id and H.name==B.name then
@@ -1142,7 +1167,7 @@ function player.hold(P,ifpre)
P:freshgho() P:freshgho()
P.dropDelay,P.lockDelay,P.freshTime=P.gameEnv.drop,P.gameEnv.lock,max(P.freshTime-5,0) P.dropDelay,P.lockDelay,P.freshTime=P.gameEnv.drop,P.gameEnv.lock,max(P.freshTime-5,0)
if ifoverlap(P,P.cur.bk,P.curX,P.curY)then P:lock()P:lose()end if P:ifoverlap(P.cur.bk,P.curX,P.curY)then P:lock()P:lose()end
if P.human then if P.human then
SFX.play(ifpre and"prehold"or"hold") SFX.play(ifpre and"prehold"or"hold")
@@ -1151,7 +1176,7 @@ function player.hold(P,ifpre)
end end
end end
function player.getNext(P,n) function player.getNext(P,n)
P.next[#P.next+1]={bk=blocks[n][P.gameEnv.face[n]],id=n,color=P.gameEnv.bone and 8 or n,name=n} P.next[#P.next+1]={bk=blocks[n][P.gameEnv.face[n]],id=n,color=P.gameEnv.bone and 12 or P.gameEnv.skin[n],name=n}
end end
--function player.newNext()--check/add new next to next queue,defined when create player --function player.newNext()--check/add new next to next queue,defined when create player
function player.freshNext(P) function player.freshNext(P)
@@ -1163,15 +1188,14 @@ function player.freshNext(P)
P.cur=rem(P.next,1) P.cur=rem(P.next,1)
P:newNext() P:newNext()
if P.AI_mode=="CC"then BOT.addNext(P.AI_bot,CCblockID[P.next[P.AIdata.next].id])end if P.AI_mode=="CC"then BOT.addNext(P.AI_bot,CCblockID[P.next[P.AIdata.next].id])end
P.dropDelay,P.lockDelay,P.freshTime=P.gameEnv.drop,P.gameEnv.lock,0
local _=P.keyPressing local _=P.keyPressing
if _[8]then if P.gameEnv.hold and _[8]then
P:hold(true) P:hold(true)
else else
P:resetBlock() P:resetBlock()
end end
--IHS --IHS
P.dropDelay,P.lockDelay,P.freshTime=P.gameEnv.drop,P.gameEnv.lock,0
if _[5]then if _[5]then
P:spin(2,true) P:spin(2,true)
else else
@@ -1186,7 +1210,7 @@ function player.freshNext(P)
end end
end end
--IRS --IRS
if ifoverlap(P,P.cur.bk,P.curX,P.curY)then P:lock()P:lose()end if P:ifoverlap(P.cur.bk,P.curX,P.curY)then P:lock()P:lose()end
P:freshgho() P:freshgho()
if _[6]then P.act.hardDrop(P)_[6]=false end if _[6]then P.act.hardDrop(P)_[6]=false end
--IHdS --IHdS
@@ -1214,7 +1238,7 @@ function player.drop(P)--Place piece
if c>2 then dospin=dospin+1 end if c>2 then dospin=dospin+1 end
end--三角 end--三角
::NTC:: ::NTC::
if P.cur.id~=6 and ifoverlap(P,P.cur.bk,P.curX-1,P.curY)and ifoverlap(P,P.cur.bk,P.curX+1,P.curY)and ifoverlap(P,P.cur.bk,P.curX,P.curY+1)then if P.cur.id~=6 and P:ifoverlap(P.cur.bk,P.curX-1,P.curY)and P:ifoverlap(P.cur.bk,P.curX+1,P.curY)and P:ifoverlap(P.cur.bk,P.curX,P.curY+1)then
dospin=dospin+2 dospin=dospin+2
end--卡块 end--卡块
end end
@@ -1357,7 +1381,7 @@ function player.drop(P)--Place piece
cscore=spinSCR[P.cur.name][cc] cscore=spinSCR[P.cur.name][cc]
if P.b2b>1000 then if P.b2b>1000 then
P:showText(text.b3b..text.spin[P.cur.name]..text.clear[cc],0,-30,35,"spin") P:showText(text.b3b..text.spin[P.cur.name]..text.clear[cc],0,-30,35,"spin")
send=b2bATK[cc]+1 send=b2bATK[cc]+.5*cc
exblock=exblock+1 exblock=exblock+1
cscore=cscore*2 cscore=cscore*2
P.stat.b3b=P.stat.b3b+1 P.stat.b3b=P.stat.b3b+1
@@ -1410,7 +1434,7 @@ function player.drop(P)--Place piece
end end
sendTime=sendTime+25*cmb sendTime=sendTime+25*cmb
if cmb>2 then if cmb>2 then
send=send+(renATK[cmb]or 3) send=send+(comboAtk[cmb]or 2)
P:showText(text.cmb[min(cmb,20)],0,25,15+min(cmb,25)*3,cmb<10 and"appear"or"flicker") P:showText(text.cmb[min(cmb,20)],0,25,15+min(cmb,25)*3,cmb<10 and"appear"or"flicker")
cscore=cscore+min(20*cmb,300)*cc cscore=cscore+min(20*cmb,300)*cc
end end
@@ -1551,8 +1575,11 @@ end
function player.pressKey(P,i) function player.pressKey(P,i)
P.keyPressing[i]=true P.keyPressing[i]=true
P.act[actName[i]](P) P.act[actName[i]](P)
if P.alive then if P.control then
P.keyTime[11]=ins(P.keyTime,1,frame) if P.keyRec then
ins(P.keyTime,1,frame)
P.keyTime[11]=nil
end
P.stat.key=P.stat.key+1 P.stat.key=P.stat.key+1
end end
--ins(rec,{i,frame}) --ins(rec,{i,frame})
@@ -1560,7 +1587,6 @@ end
function player.releaseKey(P,i) function player.releaseKey(P,i)
if P.keyPressing[i]then if P.keyPressing[i]then
P.keyPressing[i]=false P.keyPressing[i]=false
if P.id==1 then virtualkeyDown[i]=false end
-- if recording then ins(rec,{-i,frame})end -- if recording then ins(rec,{-i,frame})end
end end
end end
@@ -1748,7 +1774,7 @@ function player.act.moveLeft(P,auto)
P:changeAtkMode(1) P:changeAtkMode(1)
end end
elseif P.control and P.waiting==-1 then elseif P.control and P.waiting==-1 then
if not ifoverlap(P,P.cur.bk,P.curX-1,P.curY)then if not P:ifoverlap(P.cur.bk,P.curX-1,P.curY)then
P.curX=P.curX-1 P.curX=P.curX-1
local y0=P.curY local y0=P.curY
P:freshgho() P:freshgho()
@@ -1774,7 +1800,7 @@ function player.act.moveRight(P,auto)
P:changeAtkMode(2) P:changeAtkMode(2)
end end
elseif P.control and P.waiting==-1 then elseif P.control and P.waiting==-1 then
if not ifoverlap(P,P.cur.bk,P.curX+1,P.curY)then if not P:ifoverlap(P.cur.bk,P.curX+1,P.curY)then
P.curX=P.curX+1 P.curX=P.curX+1
local y0=P.curY local y0=P.curY
P:freshgho() P:freshgho()
@@ -1872,10 +1898,10 @@ end
function player.act.insLeft(P,auto) function player.act.insLeft(P,auto)
if P.gameEnv.nofly then return end if P.gameEnv.nofly then return end
local x0,y0=P.curX,P.curY local x0,y0=P.curX,P.curY
while not ifoverlap(P,P.cur.bk,P.curX-1,P.curY)do while not P:ifoverlap(P.cur.bk,P.curX-1,P.curY)do
P.curX=P.curX-1 P.curX=P.curX-1
if not P.small and setting.dropFX>0 then if not P.small and setting.dropFX>0 then
P:createShade(P.curX+1,P.curY+P.r-1,P.curX+1,P.curY) P:createShade(P.curX+P.c,P.curY+P.r-1,P.curX+P.c,P.curY)
end end
P:freshgho() P:freshgho()
end end
@@ -1894,10 +1920,10 @@ end
function player.act.insRight(P,auto) function player.act.insRight(P,auto)
if P.gameEnv.nofly then return end if P.gameEnv.nofly then return end
local x0,y0=P.curX,P.curY local x0,y0=P.curX,P.curY
while not ifoverlap(P,P.cur.bk,P.curX+1,P.curY)do while not P:ifoverlap(P.cur.bk,P.curX+1,P.curY)do
P.curX=P.curX+1 P.curX=P.curX+1
if not P.small and setting.dropFX>0 then if not P.small and setting.dropFX>0 then
P:createShade(P.curX+P.c-1,P.curY+P.r-1,P.curX+P.c-1,P.curY) P:createShade(P.curX-1,P.curY+P.r-1,P.curX-1,P.curY)
end end
P:freshgho() P:freshgho()
end end
@@ -2003,11 +2029,10 @@ function newDemoPlayer(id,x,y,size)
pc=0,b2b=0,b3b=0, pc=0,b2b=0,b3b=0,
} }
P.modeData={point=0,event=0,counter=0} P.modeData={point=0,event=0,counter=0}
P.keyTime={}for i=1,10 do P.keyTime[i]=-1e5 end P.keySpeed=0 P.keyTime={}P.keySpeed=0
P.dropTime={}for i=1,10 do P.dropTime[i]=-1e5 end P.dropSpeed=0 P.dropTime={}P.dropSpeed=0
P.atker={} P.atker={}P.strength=0
P.strength=0
P.field,P.visTime={},{} P.field,P.visTime={},{}
P.atkBuffer={sum=0} P.atkBuffer={sum=0}
@@ -2026,16 +2051,21 @@ function newDemoPlayer(id,x,y,size)
ospin=true, ospin=true,
sequence="bag7", sequence="bag7",
face={0,0,0,0,0,0,0}, face={0,0,0,0,0,0,0},
skin={1,5,2,8,10,3,7},
pushSpeed=3, pushSpeed=3,
block=true, block=true,
visible="show",--keepVisible=visile~="show" visible="show",
Fkey=nil,puzzle=false, Fkey=nil,puzzle=false,
freshLimit=1e99,easyFresh=true, freshLimit=1e99,easyFresh=true,
fine=false,fineKill=false, fine=false,fineKill=false,
target=1e99,dropPiece=NULL, target=1e99,dropPiece=NULL,
mindas=0,minarr=0,minsdarr=0, mindas=0,minarr=0,minsdarr=0,
} }
P.color={}
for _=1,7 do
P.color[_]=skin.libColor[P.gameEnv.skin[_]]
end
P.cur={bk={{}},id=0,color=0,name=0} P.cur={bk={{}},id=0,color=0,name=0}
P.sc,P.dir,P.r,P.c={0,0},0,0,0 P.sc,P.dir,P.r,P.c={0,0},0,0,0
P.curX,P.curY,P.y_img=0,0,0 P.curX,P.curY,P.y_img=0,0,0
@@ -2054,9 +2084,9 @@ function newDemoPlayer(id,x,y,size)
P:getNext(rem(bag1,rnd(#bag1))) P:getNext(rem(bag1,rnd(#bag1)))
end end
P.newNext=freshMethod.bag7 P.newNext=freshMethod.bag7
if P.gameEnv.sequence==1 then P.bag={}--Bag7 if P.gameEnv.sequence==1 then P.bag={}
elseif P.gameEnv.sequence==2 then P.his={}for i=1,4 do P.his[i]=P.next.id[i+3]end--History4 elseif P.gameEnv.sequence==2 then P.his={}for i=1,4 do P.his[i]=P.next.id[i+3]end
elseif P.gameEnv.sequence==3 then--Pure random elseif P.gameEnv.sequence==3 then
end end
P.human=false P.human=false
@@ -2093,7 +2123,7 @@ function newDemoPlayer(id,x,y,size)
P.fieldBeneath=0 P.fieldBeneath=0
P.score1,P.b2b1=0,0 P.score1,P.b2b1=0,0
P.shade={} P.shade={}
P.bonus={}--texts P.bonus={}
P.dust=clearDust:clone() P.dust=clearDust:clone()
P.dust:start() P.dust:start()
@@ -2236,14 +2266,23 @@ function newPlayer(id,x,y,size,AIdata)
P.RS=kickList.TRS P.RS=kickList.TRS
P.AI_keys={} P.AI_keys={}
end end
P.gameEnv.face={0,0,0,0,0,0,0}
P.gameEnv.skin={1,5,2,8,10,3,7}
else else
P.human=true P.human=true
P.RS=kickList.TRS P.RS=kickList.TRS
players.human=players.human+1 players.human=players.human+1
end end
P.color={}
for _=1,7 do
P.color[_]=skin.libColor[P.gameEnv.skin[_]]
end
P.showTime=visible_opt[P.gameEnv.visible] P.showTime=visible_opt[P.gameEnv.visible]
P.keepVisible=P.gameEnv.visible=="show" P.keepVisible=P.gameEnv.visible=="show"
P.keyPressing={}for i=1,12 do P.keyPressing[i]=false end P.keyPressing={}for i=1,12 do P.keyPressing[i]=false end
P.moving,P.downing=0,0 P.moving,P.downing=0,0
P.waiting,P.falling=-1,-1 P.waiting,P.falling=-1,-1

View File

@@ -46,12 +46,12 @@ local sceneInit={
sceneTemp=1 sceneTemp=1
end end
end, end,
mode=function() mode=function(org)
curBG="none" curBG="none"
BGM.play("blank") BGM.play("blank")
destroyPlayers() destroyPlayers()
local cam=mapCam local cam=mapCam
cam.zoomK=scene.swap.tar=="mode"and 5 or 1 cam.zoomK=org=="main"and 5 or 1
if cam.sel then if cam.sel then
local M=modes[cam.sel] local M=modes[cam.sel]
cam.x,cam.y=M.x*cam.k+180,M.y*cam.k cam.x,cam.y=M.x*cam.k+180,M.y*cam.k
@@ -82,9 +82,10 @@ local sceneInit={
end end
curBG=modeEnv.bg curBG=modeEnv.bg
end, end,
pause=function() pause=function(org)
local S=players[1].stat local S=players[1].stat
sceneTemp={ sceneTemp={
timer=org=="play"and 0 or 50,
toTime(S.time), toTime(S.time),
S.key.."/"..S.rotate.."/"..S.hold, S.key.."/"..S.rotate.."/"..S.hold,
S.piece.." "..(int(S.piece/S.time*100)*.01).."PPS", S.piece.." "..(int(S.piece/S.time*100)*.01).."PPS",
@@ -98,7 +99,7 @@ local sceneInit={
S.pc, S.pc,
format("%.3f",S.atk/S.row), format("%.3f",S.atk/S.row),
S.extraPiece, S.extraPiece,
format("%.2f",100*max(1-S.extraRate/S.piece,0)), format("%.2f%%",100*max(1-S.extraRate/S.piece,0)),
} }
end, end,
setting_game=function() setting_game=function()
@@ -111,6 +112,16 @@ local sceneInit={
sceneTemp={last=0,jump=0}--last sound time,animation count(10→0) sceneTemp={last=0,jump=0}--last sound time,animation count(10→0)
curBG="none" curBG="none"
end, end,
setting_control=function()
sceneTemp={
das=setting.das,
arr=setting.arr,
pos=0,
dir=1,
wait=30,
}
curBG="strap"
end,
setting_key=function() setting_key=function()
sceneTemp={ sceneTemp={
board=1, board=1,
@@ -195,8 +206,8 @@ local backFunc={
setting_graphic=function()saveSetting()end, setting_graphic=function()saveSetting()end,
setting_sound= function()saveSetting()end, setting_sound= function()saveSetting()end,
} }
function scene.init(s) function scene.init(s,org)
if sceneInit[s]then sceneInit[s]()end if sceneInit[s]then sceneInit[s](org)end
end end
function scene.push(tar,style) function scene.push(tar,style)
if not scene.swapping then if not scene.swapping then

View File

@@ -10,6 +10,7 @@ end
local c local c
gc.setDefaultFilter("nearest","nearest") gc.setDefaultFilter("nearest","nearest")
gc.setColor(1,1,1)
local VKI=N("/image/virtualkey.png") local VKI=N("/image/virtualkey.png")
VKIcon={} VKIcon={}
for i=1,#actName do for i=1,#actName do
@@ -18,7 +19,6 @@ for i=1,#actName do
end end
miniBlock={} miniBlock={}
gc.setColor(1,1,1)
for i=1,7 do for i=1,7 do
local b=blocks[i][0] local b=blocks[i][0]
miniBlock[i]=C(#b[1],#b) miniBlock[i]=C(#b[1],#b)
@@ -74,9 +74,10 @@ drawableText={
custom=T(80), custom=T(80),
setting_game=T(80),setting_graphic=T(80),setting_sound=T(80), setting_game=T(80),setting_graphic=T(80),setting_sound=T(80),
setting_control=T(70),setting_skin=T(70),
preview=T(40),
keyboard=T(25),joystick=T(25), keyboard=T(25),joystick=T(25),
ctrlSetHelp=T(30), ctrlSetHelp=T(30),
blockLayout=T(70),
musicRoom=T(80), musicRoom=T(80),
nowPlaying=T(50), nowPlaying=T(50),
VKTchW=T(30),VKOrgW=T(30),VKCurW=T(30), VKTchW=T(30),VKOrgW=T(30),VKCurW=T(30),

View File

@@ -220,8 +220,9 @@ function Tmr.play(dt)
end end
end end
for i=1,#virtualkey do for i=1,#virtualkey do
if virtualkeyPressTime[i]>0 then local _=virtualkey[i]
virtualkeyPressTime[i]=virtualkeyPressTime[i]-1 if _.pressTime>0 then
_.pressTime=_.pressTime-1
end end
end end
@@ -235,10 +236,14 @@ function Tmr.play(dt)
local P=players[p] local P=players[p]
if P.keyPressing[1]then if P.keyPressing[1]then
if P.moving>0 then P.moving=0 end if P.moving>0 then P.moving=0 end
P.moving=P.moving-1 if -P.moving<=P.gameEnv.das then
P.moving=P.moving-1
end
elseif P.keyPressing[2]then elseif P.keyPressing[2]then
if P.moving<0 then P.moving=0 end if P.moving<0 then P.moving=0 end
P.moving=P.moving+1 if P.moving<=P.gameEnv.das then
P.moving=P.moving+1
end
else else
P.moving=0 P.moving=0
end end
@@ -266,6 +271,9 @@ function Tmr.pause(dt)
if not gameResult then if not gameResult then
pauseTime=pauseTime+dt pauseTime=pauseTime+dt
end end
if sceneTemp.timer<50 then
sceneTemp.timer=sceneTemp.timer+1
end
end end
function Tmr.setting_sound() function Tmr.setting_sound()
local t=sceneTemp.jump local t=sceneTemp.jump
@@ -273,4 +281,32 @@ function Tmr.setting_sound()
sceneTemp.jump=t-1 sceneTemp.jump=t-1
end end
end end
function Tmr.setting_control()
local T=sceneTemp
if T.wait>0 then
T.wait=T.wait-1
if T.wait==0 then
T.pos=T.pos+T.dir
else
return
end
end
if T.das>0 then
T.das=T.das-1
else
T.arr=T.arr-1
if T.arr==0 then
T.pos=T.pos+T.dir
T.arr=setting.arr
elseif T.arr==-1 then
T.pos=T.dir>0 and 8 or 0
T.arr=setting.arr
end
if T.pos%8==0 then
T.dir=-T.dir
T.wait=20
T.das=setting.das
end
end
end
return Tmr return Tmr

View File

@@ -55,9 +55,10 @@ local drawableTextLoad={
"setting_graphic", "setting_graphic",
"setting_sound", "setting_sound",
"setting_sound", "setting_sound",
"setting_control",
"setting_skin",
"keyboard","joystick", "keyboard","joystick",
"ctrlSetHelp", "ctrlSetHelp",
"blockLayout",
"musicRoom", "musicRoom",
"nowPlaying", "nowPlaying",
"VKTchW","VKOrgW","VKCurW", "VKTchW","VKOrgW","VKCurW",
@@ -97,6 +98,8 @@ function restoreVirtualKey()
B.x=O.x B.x=O.x
B.y=O.y B.y=O.y
B.r=O.r B.r=O.r
B.isDown=false
B.pressTime=0
end end
if not modeEnv.Fkey then if not modeEnv.Fkey then
virtualkey[9].ava=false virtualkey[9].ava=false
@@ -117,12 +120,9 @@ function copyBoard()
for y=1,H do for y=1,H do
local S="" local S=""
local L=preField[y] local L=preField[y]
for x=1,10,2 do for x=1,10 do
local H=L[x] local _=L[x]+1
local L=L[x+1] S=S..char(_)
if H<8 then H=H+1 end
if L<8 then L=L+1 end
S=S..char(H*16+L)
end end
str=str..S str=str..S
end end
@@ -132,7 +132,7 @@ end
function pasteBoard() function pasteBoard()
local str=love.system.getClipboardText() local str=love.system.getClipboardText()
local fX,fY=1,1--*ptr for Field(r*10+(c-1)) local fX,fY=1,1--*ptr for Field(r*10+(c-1))
local _,__ local _,Bid
local p=find(str,":")--ptr* local p=find(str,":")--ptr*
if p then str=sub(str,p+1)end if p then str=sub(str,p+1)end
_,str=pcall(data.decode,"string","base64",str) _,str=pcall(data.decode,"string","base64",str)
@@ -147,13 +147,12 @@ function pasteBoard()
else goto FINISH else goto FINISH
end end
end--str end end--str end
__=_%16--low4b __=_%32-1--block id
_=(_-__)/16--high4b if __>16 then goto ERROR end--illegal blockid
if _>13 or __>13 then goto ERROR end--illegal blockid _=int(_/32)--mode id
if _<9 then _=_-1 end if __<9 then __=__-1 end preField[fY][fX]=__
preField[fY][fX]=_;preField[fY][fX+1]=__ if fX<10 then
if fX<9 then fX=fX+1
fX=fX+2
else else
if fY==20 then goto FINISH end if fY==20 then goto FINISH end
fX=1;fY=fY+1 fX=1;fY=fY+1
@@ -255,9 +254,8 @@ function royaleLevelup()
end end
end end
function pauseGame() function pauseGame()
if pauseTimer==0 then if not scene.swapping then
restartCount=0--Avoid strange darkness restartCount=0--Avoid strange darkness
newTask(Event_task.pauseGame)
if not gameResult then if not gameResult then
pauseCount=pauseCount+1 pauseCount=pauseCount+1
end end
@@ -273,9 +271,7 @@ function pauseGame()
end end
end end
function resumeGame() function resumeGame()
if pauseTimer==50 then scene.swapTo("play","none")
newTask(Event_task.resumeGame)
end
end end
function loadGame(M) function loadGame(M)
--rec={} --rec={}
@@ -291,7 +287,6 @@ function loadGame(M)
end end
function resetPartGameData() function resetPartGameData()
gameResult=false gameResult=false
pauseTimer=0
frame=150-setting.reTime*15 frame=150-setting.reTime*15
destroyPlayers() destroyPlayers()
curMode.load() curMode.load()
@@ -326,7 +321,6 @@ function resetPartGameData()
end end
function resetGameData() function resetGameData()
gameResult=false gameResult=false
pauseTimer=0--Pause timer for animation
frame=150-setting.reTime*15 frame=150-setting.reTime*15
garbageSpeed=1 garbageSpeed=1
pauseTime=0--Time paused pauseTime=0--Time paused
@@ -356,10 +350,6 @@ function resetGameData()
restoreVirtualKey() restoreVirtualKey()
stat.game=stat.game+1 stat.game=stat.game+1
freeRow.reset(30*#players) freeRow.reset(30*#players)
for i=1,20 do
virtualkeyDown[i]=X
virtualkeyPressTime[i]=0
end
SFX.play("ready") SFX.play("ready")
collectgarbage() collectgarbage()
end end

View File

@@ -1,23 +1,28 @@
local S=[=[ local S=[=[
"Patron"(rmb10+)(ordered by first char): "Patron"(rmb10+)(ordered by first char):
10元 10元
八零哥
Fireboos Fireboos
gggf127 gggf127
金巧
乐↗乐↘ 乐↗乐↘
立斐 立斐
仁参 仁参
Sasoric" Sasoric
sfqr sfqr
时雪 时雪
T080 ThTsOd
ThTsOd"
夏小亚 夏小亚
xin心痕 心痕
蕴空之灵 蕴空之灵
yyangdid yyangdid
?[D*a] ?[D*a]
Thanks!
Future outlook: Future outlook:
New mode: New mode:
finesse
round-based dig round-based dig
Infinite battle Infinite battle
Bigbang Bigbang
@@ -31,16 +36,29 @@ Future outlook:
game recording game recording
(powerinfo switch) (powerinfo switch)
new virtualWidgets like joysticks new virtualWidgets like joysticks
splashing block
custom sequence custom sequence
splashing block
more FXs & 3d features & animations more FXs & 3d features & animations
Encrypt source code(compile to byte code) Encrypt source code(compile to byte code)
new AI:task-Z new AI:task-Z
CC smarter(think of garbage buffer) CC smarter(think of garbage buffer)
0.8.13:
new:
a independent page to set DAS/ARR,with an animation for preview
changed:
new virtualkey animation
freer drawing mode(Incompatible with old ver.)
score of spins little changed
combo&b3b attack changed
fixed:
wrong behavior in pause scene
ospin error in 0.8.12
memory leakage in t49/t99
new behavior of widgets
0.8.12: 0.8.12:
new: new:
layout setting:skin system with customizable block color/direction layout setting:skin system with customizable block color/direction
more information in pause page more information when pause
block has more color(7→11) block has more color(7→11)
skin:smooth(MrZ),contrast(MrZ),steel(kulumi),ball(shaw) skin:smooth(MrZ),contrast(MrZ),steel(kulumi),ball(shaw)
changed: changed:

View File

@@ -190,21 +190,28 @@ local Widget={
back= newButton(640, 630,180,60, C.white, 35,scene.back), back= newButton(640, 630,180,60, C.white, 35,scene.back),
}, },
draw={ draw={
block1= newButton(920, 80, 120,120,C.red, 60,setPen(1)), b1= newButton(500+65*1, 150,58,58,C.red, 30,setPen(1)),--B1
block2= newButton(1060, 80, 120,120,C.green, 60,setPen(2)), b2= newButton(500+65*2, 150,58,58,C.orange, 30,setPen(2)),--B2
block3= newButton(1200, 80, 120,120,C.orange, 60,setPen(3)), b3= newButton(500+65*3, 150,58,58,C.yellow, 30,setPen(3)),--B3
block4= newButton(920, 220,120,120,C.blue, 60,setPen(4)), b4= newButton(500+65*4, 150,58,58,C.grass, 30,setPen(4)),--B4
block5= newButton(1060, 220,120,120,C.magenta, 60,setPen(5)), b5= newButton(500+65*5, 150,58,58,C.green, 30,setPen(5)),--B5
block6= newButton(1200, 220,120,120,C.yellow, 60,setPen(6)), b6= newButton(500+65*6, 150,58,58,C.water, 30,setPen(6)),--B6
block7= newButton(920, 360,120,120,C.cyan, 60,setPen(7)), b7= newButton(500+65*7, 150,58,58,C.cyan, 30,setPen(7)),--B7
gb1= newButton(1060, 360,120,120,C.darkGrey, 60,setPen(9)), b8= newButton(500+65*8, 150,58,58,C.blue, 30,setPen(8)),--B8
gb2= newButton(1200, 360,120,120,C.grey, 60,setPen(10)), b9= newButton(500+65*9, 150,58,58,C.purple, 30,setPen(9)),--B9
gb3= newButton(920, 500,120,120,C.darkPurple, 60,setPen(11)), b10= newButton(500+65*10,150,58,58,C.magenta, 30,setPen(10)),--B10
gb4= newButton(1060, 500,120,120,C.darkRed, 60,setPen(12)), b11= newButton(500+65*11,150,58,58,C.pink, 30,setPen(11)),--B11
gb5= newButton(1200, 500,120,120,C.darkGreen, 60,setPen(13)),
clear= newButton(780, 80, 120,120,C.white, 40,pressKey("delete")), b12= newButton(500+65*1, 230,58,58,C.darkGrey, 30,setPen(12)),--Bone
any= newButton(780, 220,120,120,C.lightGrey, 40,setPen(0)), b13= newButton(500+65*2, 230,58,58,C.grey, 30,setPen(13)),--GB1
space= newButton(780, 360,120,120,C.grey, 65,setPen(-1)), b14= newButton(500+65*3, 230,58,58,C.lightGrey, 30,setPen(14)),--GB2
b15= newButton(500+65*4, 230,58,58,C.darkPurple, 30,setPen(15)),--GB3
b16= newButton(500+65*5, 230,58,58,C.darkRed, 30,setPen(16)),--GB4
b17= newButton(500+65*6, 230,58,58,C.darkGreen, 30,setPen(17)),--GB5
any= newButton(600, 360,120,120,C.lightGrey, 40,setPen(0)),
space= newButton(730, 360,120,120,C.grey, 65,setPen(-1)),
clear= newButton(1200, 500,120,120,C.white, 40,pressKey("delete")),
demo= newSwitch(755, 640,30,function()return sceneTemp.demo end,function()sceneTemp.demo=not sceneTemp.demo end), demo= newSwitch(755, 640,30,function()return sceneTemp.demo end,function()sceneTemp.demo=not sceneTemp.demo end),
copy= newButton(920, 640,120,120,C.lightRed, 35,copyBoard), copy= newButton(920, 640,120,120,C.lightRed, 35,copyBoard),
paste= newButton(1060, 640,120,120,C.lightBlue, 35,pasteBoard), paste= newButton(1060, 640,120,120,C.lightBlue, 35,pasteBoard),
@@ -216,60 +223,44 @@ local Widget={
pause={ pause={
resume= newButton(640,290,240,100,C.white,30,resumeGame), resume= newButton(640,290,240,100,C.white,30,resumeGame),
restart=newButton(640,445,240,100,C.white,33,function() restart=newButton(640,445,240,100,C.white,33,function()
if pauseTimer==50 then clearTask("play")
clearTask("play") updateStat()
updateStat() resetGameData()
resetGameData() scene.swapTo("play","none")
scene.swapTo("play","none") end),
end setting=newButton(1130,70,180,90,C.lightBlue,35,function()
scene.push()scene.swapTo("setting_sound")
end), end),
setting=newButton(1130,70,180,90,C.lightBlue,35,function()scene.push()scene.swapTo("setting_sound")end),
quit= newButton(640,600,240,100,C.white,35,scene.back), quit= newButton(640,600,240,100,C.white,35,scene.back),
}, },
setting_game={ setting_game={
graphic=newButton(200,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_graphic")end,nil,"sound"), graphic=newButton(200,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_graphic")end, nil,"sound"),
sound= newButton(1080,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_sound")end, nil,"reset"), sound= newButton(1080,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_sound")end, nil,"ctrl"),
reset= newButton(100,285,150,80,C.lightRed,18,function() ctrl= newButton(290,220,320,80,C.lightYellow,35,function()scene.push()scene.swapTo("setting_control")end, nil,"key"),
setting.das,setting.arr=10,2 key= newButton(640,220,320,80,C.lightGreen,35,function()scene.push()scene.swapTo("setting_key")end, nil,"touch"),
setting.sddas,setting.sdarr=0,2 touch= newButton(990,220,320,80,C.lightBlue,35,function()scene.push()scene.swapTo("setting_touch")end, nil,"reTime"),
local _=Widget.setting_game reTime= newSlider(350,340,300,10,30,nil, SETval("reTime"), SETsto("reTime"), nil,"maxNext"),
_.dasU:FX()_.dasD:FX() maxNext=newSlider(350,440,300,6,30,nil, SETval("maxNext"), SETsto("maxNext"), nil,"autoPause"),
_.arrU:FX()_.arrD:FX() autoPause=newSwitch(350,540,20, SETval("autoPause"), SETrev("autoPause"), nil,"layout"),
_.sddasU:FX()_.sddasD:FX() layout= newButton(590,540,140,70,C.white,35,function()
_.sdarrU:FX()_.sdarrD:FX()
end,nil,"dasD"),
dasD= newButton(230,230,50,50,C.white,40,function()setting.das=setting.das-1 ARRcheck()end,function()return setting.das==0 end, "dasU"),
dasU= newButton(450,230,50,50,C.white,40,function()setting.das=setting.das+1 ARRcheck()end,function()return setting.das==30 end, "arrD"),
arrD= newButton(550,230,50,50,C.white,40,function()setting.arr=setting.arr-1 DAScheck()end,function()return setting.arr==0 end, "arrU"),
arrU= newButton(770,230,50,50,C.white,40,function()setting.arr=setting.arr+1 DAScheck()end,function()return setting.arr==15 end, "sddasD"),
sddasD= newButton(230,340,50,50,C.white,40, function()setting.sddas=(setting.sddas-1)%11 end, nil,"sddasU"),
sddasU= newButton(450,340,50,50,C.white,40, function()setting.sddas=(setting.sddas+1)%11 end, nil,"sdarrD"),
sdarrD= newButton(550,340,50,50,C.white,40, function()setting.sdarr=(setting.sdarr-1)%4 end, nil,"sdarrU"),
sdarrU= newButton(770,340,50,50,C.white,40, function()setting.sdarr=(setting.sdarr+1)%4 end, nil,"reTime"),
reTime= newSlider(350,430,300,10,30,nil, SETval("reTime"), SETsto("reTime"), nil,"maxNext"),
maxNext=newSlider(350,500,300,6,30,nil, SETval("maxNext"), SETsto("maxNext"), nil,"autoPause"),
autoPause=newSwitch(350,570,20, SETval("autoPause"), SETrev("autoPause"), nil,"layout"),
layout= newButton(590,570,140,70,C.white,35,function()
scene.push() scene.push()
scene.swapTo("setting_skin") scene.swapTo("setting_skin")
end,nil,"ctrl"), end,nil,"quickR"),
ctrl= newButton(1020,230,320,80,C.white,35,function()scene.push()scene.swapTo("setting_key")end, nil,"touch"), quickR= newSwitch(1050,340,35, SETval("quickR"), SETrev("quickR"), nil,"swap"),
touch= newButton(1020,340,320,80,C.white,35,function()scene.push()scene.swapTo("setting_touch")end,nil,"quickR"), swap= newSwitch(1050,440,19, SETval("swap"), SETrev("swap"), nil,"fine"),
quickR= newSwitch(1000,430,35, SETval("quickR"), SETrev("quickR"), nil,"swap"), fine= newSwitch(1050,540,20, SETval("fine"), SETrev("fine"), nil,"back"),
swap= newSwitch(1000,500,19, SETval("swap"), SETrev("swap"), nil,"fine"),
fine= newSwitch(1000,570,20, SETval("fine"), SETrev("fine"), nil,"back"),
back= newButton(1140,650,200,80,C.white,40,scene.back, nil,"graphic"), back= newButton(1140,650,200,80,C.white,40,scene.back, nil,"graphic"),
}, },
setting_graphic={ setting_graphic={
sound= newButton(200,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_sound")end, nil,"game"), sound= newButton(200,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_sound")end, nil,"game"),
game= newButton(1080,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_game")end, nil,"ghost"), game= newButton(1080,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_game")end, nil,"ghost"),
ghost= newSwitch(310,180,35,SETval("ghost"), SETrev("ghost"), nil,"center"), ghost= newSwitch(310,180,35, SETval("ghost"), SETrev("ghost"), nil,"center"),
center= newSwitch(580,180,35,SETval("center"), SETrev("center"), nil,"smo"), center= newSwitch(580,180,35, SETval("center"), SETrev("center"), nil,"smo"),
smo= newSwitch(310,260,25,SETval("smo"), SETrev("smo"), nil,"grid"), smo= newSwitch(310,260,25, SETval("smo"), SETrev("smo"), nil,"grid"),
grid= newSwitch(580,260,30,SETval("grid"), SETrev("grid"), nil,"dropFX"), grid= newSwitch(580,260,30, SETval("grid"), SETrev("grid"), nil,"dropFX"),
dropFX= newSlider(310,350,373,5,35,nil,SETval("dropFX"), SETsto("dropFX"), nil,"shakeFX"), dropFX= newSlider(310,350,373,5,35,nil, SETval("dropFX"), SETsto("dropFX"), nil,"shakeFX"),
shakeFX=newSlider(310,430,373,5,35,nil,SETval("shakeFX"), SETsto("shakeFX"), nil,"atkFX"), shakeFX=newSlider(310,430,373,5,35,nil, SETval("shakeFX"), SETsto("shakeFX"), nil,"atkFX"),
atkFX= newSlider(310,510,373,5,35,nil,SETval("atkFX"), SETsto("atkFX"), nil,"frame"), atkFX= newSlider(310,510,373,5,35,nil, SETval("atkFX"), SETsto("atkFX"), nil,"frame"),
frame= newSlider(310,590,373,10,35,nil,function()return setting.frameMul>35 and setting.frameMul/10 or setting.frameMul/5-4 end,function(i)setting.frameMul=i<5 and 5*i+20 or 10*i end,nil,"fullscreen"), frame= newSlider(310,590,373,10,35,nil,function()return setting.frameMul>35 and setting.frameMul/10 or setting.frameMul/5-4 end,function(i)setting.frameMul=i<5 and 5*i+20 or 10*i end,nil,"fullscreen"),
fullscreen=newSwitch(990,180,40,SETval("fullscreen"),function() fullscreen=newSwitch(990,180,40,SETval("fullscreen"),function()
setting.fullscreen=not setting.fullscreen setting.fullscreen=not setting.fullscreen
@@ -288,17 +279,28 @@ local Widget={
end end
end,nil,"back"), end,nil,"back"),
back= newButton(1140,650,200,80,C.white,40,scene.back,nil,"sound"), back= newButton(1140,650,200,80,C.white,40,scene.back,nil,"sound"),
}, },
setting_sound={ setting_sound={
game= newButton(200,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_game")end, nil,"graphic"), game= newButton(200,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_game")end, nil,"graphic"),
graphic=newButton(1080,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_graphic")end, nil,"sfx"), graphic=newButton(1080,80,240,80,C.lightCyan,35,function()scene.swapTo("setting_graphic")end, nil,"sfx"),
sfx= newSlider(180,250,400,10,35,function()SFX.play("blip_1")end, SETval("sfx"), SETsto("sfx"), nil,"bgm"), sfx= newSlider(180,250,400,10,35,function()SFX.play("blip_1")end, SETval("sfx"), SETsto("sfx"), nil,"bgm"),
bgm= newSlider(750,250,400,10,35,function()BGM.freshVolume()end, SETval("bgm"), SETsto("bgm"), nil,"vib"), bgm= newSlider(750,250,400,10,35,function()BGM.freshVolume()end, SETval("bgm"), SETsto("bgm"), nil,"vib"),
vib= newSlider(180,440,400,5 ,28,function()VIB(1)end, SETval("vib"), SETsto("vib"), nil,"voc"), vib= newSlider(180,440,400,5 ,28,function()VIB(1)end, SETval("vib"), SETsto("vib"), nil,"voc"),
voc= newSlider(750,440,400,10,32,function()VOICE("nya")end, SETval("voc"), SETsto("voc"), nil,"stereo"), voc= newSlider(750,440,400,10,32,function()VOICE("nya")end, SETval("voc"), SETsto("voc"), nil,"stereo"),
stereo= newSlider(180,630,400,10,35,function()SFX.play("move",1,-1)SFX.play("lock",1,1)end, SETval("stereo"), SETsto("stereo"),function()return setting.sfx==0 end,"back"), stereo= newSlider(180,630,400,10,35,function()SFX.play("move",1,-1)SFX.play("lock",1,1)end, SETval("stereo"), SETsto("stereo"),function()return setting.sfx==0 end,"back"),
back= newButton(1140,650,200,80,C.white,40,scene.back,nil,"game"), back= newButton(1140,650,200,80,C.white,40,scene.back,nil,"game"),
}, },
setting_control={
das= newSlider(226,200,910, 26, 30,nil,SETval("das"), SETsto("das"), nil,"arr"),
arr= newSlider(226,290,525, 15, 30,nil,SETval("arr"), SETsto("arr"), nil,"sddas"),
sddas= newSlider(226,380,350, 10, 30,nil,SETval("sddas"), SETsto("sddas"),nil,"sdarr"),
sdarr= newSlider(226,470,140, 4, 30,nil,SETval("sdarr"), SETsto("sdarr"),nil,"reset"),
reset= newButton(160,580,200, 100,C.lightRed,40,function()
setting.das,setting.arr=10,2
setting.sddas,setting.sdarr=0,2
end,nil,"back"),
back= newButton(1140,650,200,80,C.white,40,scene.back,nil,"das"),
},
setting_key={ setting_key={
back=newButton(1140,650,200,80,C.white,45,scene.back), back=newButton(1140,650,200,80,C.white,45,scene.back),
}, },