Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98b48cc89e | ||
|
|
f7d435748c | ||
|
|
7983c3a645 | ||
|
|
e2e633bef2 | ||
|
|
31f5393dfc | ||
|
|
2f4cd650fd | ||
|
|
d47629e64a | ||
|
|
43874a09db | ||
|
|
3099043c62 | ||
|
|
62099773f6 | ||
|
|
70b96a44a7 | ||
|
|
079df818a6 | ||
|
|
d9920c3772 | ||
|
|
045b352064 | ||
|
|
b139cfe62f | ||
|
|
f64bf2bc27 | ||
|
|
3c4491ec42 | ||
|
|
e6fea98822 | ||
|
|
c83328c28b | ||
|
|
0e8c40d6d9 | ||
|
|
61073bfdcb | ||
|
|
c787612aa6 | ||
|
|
2368b93efc | ||
|
|
23e8739151 | ||
|
|
7a2477ae46 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
.vscode
|
||||
libAndroid
|
||||
font.ttf
|
||||
BGM
|
||||
@@ -313,7 +313,7 @@ back.lightning={
|
||||
}--Lightning
|
||||
|
||||
local blocks=require("parts/mino")
|
||||
local scs=require("parts/spinCenters")
|
||||
local scs={.5,1.5,.5,1.5,.5,1.5,.5,1.5,.5,1.5,1,1,0,2}
|
||||
back.lightning2={
|
||||
init=function()
|
||||
t=0
|
||||
@@ -325,14 +325,14 @@ back.lightning2={
|
||||
t=t+dt
|
||||
end,
|
||||
draw=function()
|
||||
local t=1.2-t%10%3%1.2
|
||||
if t<.3 then gc.clear(t,t,t)
|
||||
local R=7-int(t*.5%7)
|
||||
local T=1.2-t%10%3%1.2
|
||||
if T<.3 then gc.clear(T,T,T)
|
||||
else gc.clear(0,0,0)
|
||||
end
|
||||
local R=7-int(t*.5)%7
|
||||
local _=colorLib[colorSet[R]]
|
||||
gc.setColor(_[1],_[2],_[3],.1)
|
||||
gc.draw(blockImg[R],640,360,t%3.1416*6,400,400,scs[R][0][2]-.5,#blocks[R][0]-scs[R][0][1]+.5)
|
||||
gc.setColor(_[1],_[2],_[3],.12)
|
||||
gc.draw(blockImg[R],640,360,t%3.1416*6,400,400,scs[2*R],#blocks[R][0]-scs[2*R-1])
|
||||
end,
|
||||
}--Fast lightning + spining tetromino
|
||||
|
||||
@@ -430,6 +430,10 @@ function BG.set(bg,data)
|
||||
BG.discard()
|
||||
collectgarbage()
|
||||
end
|
||||
if not back[bg]then
|
||||
LOG.print("No BG called"..bg,"warn")
|
||||
return
|
||||
end
|
||||
BG.cur=bg
|
||||
bg=back[bg]
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ function BGM.loadOne(N)
|
||||
BGM.list[N]:setLooping(true)
|
||||
BGM.list[N]:setVolume(0)
|
||||
else
|
||||
LOG.print("No BGM file: "..N,color.red)
|
||||
LOG.print("No BGM file: "..N,"warn")
|
||||
end
|
||||
end
|
||||
function BGM.loadAll()
|
||||
|
||||
@@ -3,7 +3,7 @@ local langList={
|
||||
anykey="按任意键继续",
|
||||
newVersion="检测到更新!",
|
||||
marking="游戏作者:MrZ_26\n任何视频/直播不得出现此水印\n任何转述声明无效",
|
||||
holdR="请长按R键重新开始",
|
||||
holdR="长按以重新开始",
|
||||
|
||||
lang="中文",
|
||||
atkModeName={"随机","徽章","击杀","反击"},
|
||||
@@ -31,34 +31,6 @@ local langList={
|
||||
pauseCount="暂停统计",
|
||||
|
||||
custom="自定义游戏",
|
||||
customOption={
|
||||
drop="下落速度:",
|
||||
lock="锁定延迟:",
|
||||
wait="放块延迟:",
|
||||
fall="消行延迟:",
|
||||
next="序列数量:",
|
||||
hold="暂存:",
|
||||
sequence="序列:",
|
||||
visible="可见性:",
|
||||
target="目标行数:",
|
||||
freshLimit="锁延刷新次数:",
|
||||
opponent="对手速度等级:",
|
||||
bg="背景:",
|
||||
bgm="背景音乐:",
|
||||
},
|
||||
customVal={
|
||||
drop={"0G","1/180G","1/60G","1/40G","1/30G","1/25G","1/20G","1/18G","1/16G","1/14G","1/12G","1/10G","1/9G","1/8G","1/7G","1/6G","1/5G","1/4G","1/3G","1/2G","1G","2G","4G","8G","20G"},
|
||||
lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,"∞"},
|
||||
wait=nil,
|
||||
fall=nil,
|
||||
next=nil,
|
||||
hold={"开","关","无限"},
|
||||
sequence={"bag","his4","随机","循环","固定"},
|
||||
visible={"可见","半隐","全隐","瞬隐"},
|
||||
target={10,20,40,100,200,500,1000,"∞"},
|
||||
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"},
|
||||
},
|
||||
sequence="自定义序列",
|
||||
softdropdas="软降DAS:",
|
||||
softdroparr="软降ARR:",
|
||||
@@ -222,16 +194,28 @@ local langList={
|
||||
back="返回",
|
||||
},
|
||||
custom={
|
||||
up="↑",
|
||||
down="↓",
|
||||
left="←",
|
||||
right="→",
|
||||
set1="40行(1)",
|
||||
set2="1v1(2)",
|
||||
set3="无尽(3)",
|
||||
set4="隐形(4)",
|
||||
set5="极限(5)",
|
||||
seq="高级设置(Q)",
|
||||
drop="下落延迟",lock="锁定延迟",wait="出块等待",fall="消行延迟",
|
||||
next="Next",hold="Hold",oncehold="Hold一次",
|
||||
block="方块透明度",ghost="阴影透明度",center="中心透明度",
|
||||
bagLine="包分界线",
|
||||
highCam="超屏视野",
|
||||
nextPos="生成预览",
|
||||
mindas="最小DAS",minarr="最小ARR",minsdarr="最小软降ARR",
|
||||
noTele="禁止瞬移",
|
||||
ospin="O-spin",
|
||||
sequence="序列",
|
||||
target="目标行数",
|
||||
bone="骨块",
|
||||
visible="能见度",
|
||||
freshLimit="锁延刷新限制",
|
||||
easyFresh="普通刷新锁延",
|
||||
fineKill="非极简即死",
|
||||
opponent="对手",
|
||||
life="命数",
|
||||
pushSpeed="上涨速度",
|
||||
bg="背景",
|
||||
bgm="音乐",
|
||||
seq="序列内容(Q)",
|
||||
draw="初始场地(E)",
|
||||
back="返回",
|
||||
},
|
||||
@@ -288,9 +272,10 @@ local langList={
|
||||
setting_video={
|
||||
sound="←声音设置",
|
||||
game="游戏设置→",
|
||||
ghost="阴影",
|
||||
block="方块透明度",
|
||||
ghost="阴影透明度",
|
||||
center="旋转中心透明度",
|
||||
smooth="平滑下落",
|
||||
center="旋转中心",
|
||||
grid="网格",
|
||||
bagLine="包分界线",
|
||||
lockFX="锁定特效等级",
|
||||
@@ -395,6 +380,7 @@ local langList={
|
||||
rank="尺寸",
|
||||
blind="盲打",
|
||||
disappear="消失",
|
||||
tapFX="点击动画",
|
||||
back="返回",
|
||||
},
|
||||
help={
|
||||
@@ -498,13 +484,14 @@ local langList={
|
||||
["custom_clear"]= {"自定义", "普通", "画点什么然后把它消除!"},
|
||||
["custom_puzzle"]= {"自定义", "拼图", "画点什么然后把它拼出来吧!"},
|
||||
["sprintPenta"]= {"竞速", "五联块", "伤脑筋十八块"},
|
||||
["sprintMPH"]= {"竞速", "MPH", "很经典"},
|
||||
},
|
||||
},
|
||||
{
|
||||
anykey="按任意键继续",
|
||||
newVersion="检测到更新!",
|
||||
marking="游戏作者:MrZ_26\n任何视频/直播不得出现此水印\n任何转述声明无效",
|
||||
holdR="请长按R键重新开始",
|
||||
holdR="长按以重新开始",
|
||||
|
||||
lang="全中文",
|
||||
atkModeName={"随机","徽章","击杀","反击"},
|
||||
@@ -532,34 +519,6 @@ local langList={
|
||||
pauseCount="暂停统计",
|
||||
|
||||
custom="自定义游戏",
|
||||
customOption={
|
||||
drop="下落速度:",
|
||||
lock="锁定延迟:",
|
||||
wait="放块延迟:",
|
||||
fall="消行延迟:",
|
||||
next="序列数量:",
|
||||
hold="暂存:",
|
||||
sequence="序列:",
|
||||
visible="可见性:",
|
||||
target="目标行数:",
|
||||
freshLimit="锁延刷新次数:",
|
||||
opponent="对手速度等级:",
|
||||
bg="背景:",
|
||||
bgm="背景音乐:",
|
||||
},
|
||||
customVal={
|
||||
drop={"0G","1/180G","1/60G","1/40G","1/30G","1/25G","1/20G","1/18G","1/16G","1/14G","1/12G","1/10G","1/9G","1/8G","1/7G","1/6G","1/5G","1/4G","1/3G","1/2G","1G","2G","4G","8G","20G"},
|
||||
lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,"∞"},
|
||||
wait=nil,
|
||||
fall=nil,
|
||||
next=nil,
|
||||
hold={"开","关","无限"},
|
||||
sequence={"bag","his4","随机","循环","固定"},
|
||||
visible={"可见","半隐","全隐","瞬隐"},
|
||||
target={10,20,40,100,200,500,1000,"∞"},
|
||||
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"},
|
||||
},
|
||||
sequence="自定义序列",
|
||||
snapLevelName={"无吸附","10像素吸附","20像素吸附","40像素吸附","60像素吸附","80像素吸附"},
|
||||
setting_game="游戏设置",
|
||||
@@ -719,16 +678,28 @@ local langList={
|
||||
back="返回",
|
||||
},
|
||||
custom={
|
||||
up="↑",
|
||||
down="↓",
|
||||
left="←",
|
||||
right="→",
|
||||
set1="40行(1)",
|
||||
set2="1v1(2)",
|
||||
set3="无尽(3)",
|
||||
set4="隐形(4)",
|
||||
set5="极限(5)",
|
||||
seq="高级设置(Q)",
|
||||
drop="下落延迟",lock="锁定延迟",wait="出块等待",fall="消行延迟",
|
||||
next="Next",hold="Hold",oncehold="Hold一次",
|
||||
block="方块透明度",ghost="阴影透明度",center="中心透明度",
|
||||
bagLine="包分界线",
|
||||
highCam="超屏视野",
|
||||
nextPos="生成预览",
|
||||
mindas="最小DAS",minarr="最小ARR",minsdarr="最小软降ARR",
|
||||
noTele="禁止瞬移",
|
||||
ospin="O-spin",
|
||||
sequence="序列",
|
||||
target="目标行数",
|
||||
bone="骨块",
|
||||
visible="能见度",
|
||||
freshLimit="锁延刷新限制",
|
||||
easyFresh="普通刷新锁延",
|
||||
fineKill="非极简即死",
|
||||
opponent="对手",
|
||||
life="命数",
|
||||
pushSpeed="上涨速度",
|
||||
bg="背景",
|
||||
bgm="音乐",
|
||||
seq="序列内容(Q)",
|
||||
draw="初始场地(E)",
|
||||
back="返回",
|
||||
},
|
||||
@@ -785,9 +756,10 @@ local langList={
|
||||
setting_video={
|
||||
sound="←声音设置",
|
||||
game="游戏设置→",
|
||||
ghost="阴影",
|
||||
block="方块透明度",
|
||||
ghost="阴影透明度",
|
||||
center="旋转中心透明度",
|
||||
smooth="平滑下落",
|
||||
center="旋转中心",
|
||||
grid="网格",
|
||||
bagLine="包分界线",
|
||||
lockFX="锁定特效等级",
|
||||
@@ -892,6 +864,7 @@ local langList={
|
||||
rank="尺寸",
|
||||
blind="盲打",
|
||||
disappear="消失",
|
||||
tapFX="点击动画",
|
||||
back="返回",
|
||||
},
|
||||
help={
|
||||
@@ -995,13 +968,14 @@ local langList={
|
||||
["custom_clear"]= {"自定义", "普通", "画点什么然后把它消除!"},
|
||||
["custom_puzzle"]= {"自定义", "拼图", "画点什么然后把它拼出来吧!"},
|
||||
["sprintPenta"]= {"竞速", "五联块", "伤脑筋十八块"},
|
||||
["sprintMPH"]= {"竞速", "纯净", "很经典"},
|
||||
},
|
||||
},
|
||||
{
|
||||
anykey="Press any button",
|
||||
newVersion="Update detected!",
|
||||
marking="Game Author: MrZ_26\nIllegal recording if you can see this\nAny explanation is invalid",
|
||||
holdR="Hold R key to restart",
|
||||
holdR="Hold to restart",
|
||||
|
||||
lang="English",
|
||||
atkModeName={"Random","Badges","K.O.s","Attackers"},
|
||||
@@ -1029,34 +1003,6 @@ local langList={
|
||||
pauseCount="Pauses:",
|
||||
|
||||
custom="Custom Game",
|
||||
customOption={
|
||||
drop="Drop Speed:",
|
||||
lock="Lock Delay:",
|
||||
wait="Entry Delay:",
|
||||
fall="Line Delay:",
|
||||
next="Next Length:",
|
||||
hold="Hold:",
|
||||
sequence="Randomizer:",
|
||||
visible="Visibility:",
|
||||
target="Line Goal:",
|
||||
freshLimit="Lock Reset Limit:",
|
||||
opponent="Opponent Type:",
|
||||
bg="Background:",
|
||||
bgm="Music:",
|
||||
},
|
||||
customVal={
|
||||
drop={"0G","1/180G","1/60G","1/40G","1/30G","1/25G","1/20G","1/18G","1/16G","1/14G","1/12G","1/10G","1/9G","1/8G","1/7G","1/6G","1/5G","1/4G","1/3G","1/2G","1G","2G","4G","8G","20G"},
|
||||
lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,"Inf"},
|
||||
wait=nil,
|
||||
fall=nil,
|
||||
next=nil,
|
||||
hold={"On","Off","Inf"},
|
||||
sequence={"Bag","His4","Random","Loop","Fixed"},
|
||||
visible={"Normal","Slow Fade","Quick Fade","Sudden Fade"},
|
||||
target={10,20,40,100,200,500,1000,"None"},
|
||||
freshLimit={0,8,15,"Inf"},
|
||||
opponent={"None","9S Lv1","9S Lv2","9S Lv3","9S Lv4","9S Lv5","CC Lv1","CC Lv2","CC Lv3","CC Lv4","CC Lv5","CC Lv6"},
|
||||
},
|
||||
sequence="Custom Sequence",
|
||||
snapLevelName={"Free pos","Snap-10","Snap-20","Snap-40","Snap-60","Snap-80"},
|
||||
setting_game="Game Settings",
|
||||
@@ -1206,16 +1152,28 @@ local langList={
|
||||
back="Back",
|
||||
},
|
||||
custom={
|
||||
up="↑",
|
||||
down="↓",
|
||||
left="←",
|
||||
right="→",
|
||||
set1="40L (1)",
|
||||
set2="1v1 (2)",
|
||||
set3="Inf. (3)",
|
||||
set4="Blind (4)",
|
||||
set5="Master (5)",
|
||||
seq="Advanced(Q)",
|
||||
drop="Drop Speed",lock="Lock Delay",wait="Entry Delay",fall="Line Delay",
|
||||
next="Next",hold="Hold",oncehold="Hold Once",
|
||||
block="Block",ghost="Ghost",center="Center",
|
||||
bagLine="Bag Line",
|
||||
highCam="Bird-eye view",
|
||||
nextPos="Next preview",
|
||||
mindas="min DAS",minarr="min ARR",minsdarr="min SDARR",
|
||||
noTele="no Teleport",
|
||||
ospin="O-spin",
|
||||
sequence="Sequence",
|
||||
target="Target",
|
||||
bone="Bone Block",
|
||||
visible="Visibility",
|
||||
freshLimit="LD-Reset Limit",
|
||||
easyFresh="Normal Lock Reset",
|
||||
fineKill="100% Finesse",
|
||||
opponent="Opponent",
|
||||
life="Life",
|
||||
pushSpeed="Garbage Speed",
|
||||
bg="Background",
|
||||
bgm="Music",
|
||||
seq="Sequence(Q)",
|
||||
draw="Edit Field (E)",
|
||||
back="Back",
|
||||
},
|
||||
@@ -1272,9 +1230,10 @@ local langList={
|
||||
setting_video={
|
||||
sound="←Sound",
|
||||
game="Game→",
|
||||
block="Block",
|
||||
ghost="Ghost",
|
||||
smooth="Smooth drop",
|
||||
center="Center",
|
||||
smooth="Smooth drop",
|
||||
grid="Grid",
|
||||
bagLine="Bag Line",
|
||||
lockFX="Lock FX Level",
|
||||
@@ -1286,7 +1245,7 @@ local langList={
|
||||
frame="Render Frame Rate",
|
||||
text="Action Text",
|
||||
warn="Death Alert",
|
||||
highCam="Superhigh view",
|
||||
highCam="Bird-eye view",
|
||||
nextPos="Next preview",
|
||||
fullscreen="Full Screen",
|
||||
bg="Background",
|
||||
@@ -1379,6 +1338,7 @@ local langList={
|
||||
rank="Size",
|
||||
blind="Blind",
|
||||
disappear="Hide",
|
||||
tapFX="tap FX",
|
||||
back="Back",
|
||||
},
|
||||
help={
|
||||
@@ -1482,6 +1442,7 @@ local langList={
|
||||
["custom_clear"]= {"Custom", "NORMAL", "Draw something then clear it!!"},
|
||||
["custom_puzzle"]= {"Custom", "PUZZLE", "Draw something then stack it!!"},
|
||||
["sprintPenta"]= {"Sprint", "Pentomino", "Clear 40 lines with pentominoes.\n18 pentominoes in each bag."},
|
||||
["sprintMPH"]= {"Sprint", "MPH", "Memoriyless.\nPreviewless.\nHoldless."},
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -1498,7 +1459,7 @@ local langList={
|
||||
clear={"1","2","3","4","5"},
|
||||
mini="v",b2b="^ ",b3b="^^ ",
|
||||
PC="#<>#",HPC="<>",
|
||||
hold="[ ]",next="→",
|
||||
hold="[ ]",next="→",
|
||||
replaying="[Replaying]",
|
||||
|
||||
stage=function(n)return"::"..n.."::"end,
|
||||
@@ -1516,34 +1477,6 @@ local langList={
|
||||
pauseCount="=:",
|
||||
|
||||
custom="!@#$%^&*",
|
||||
customOption={
|
||||
drop="↓:",
|
||||
lock="↓_:",
|
||||
wait="→=:",
|
||||
fall="↓=:",
|
||||
next="→:",
|
||||
hold="[ ]:",
|
||||
sequence="$=:",
|
||||
visible="?=:",
|
||||
target="&=:",
|
||||
freshLimit="@:",
|
||||
opponent="^_^:",
|
||||
bg="{~}:",
|
||||
bgm="(~):",
|
||||
},
|
||||
customVal={
|
||||
drop={"0G","1/180G","1/60G","1/40G","1/30G","1/25G","1/20G","1/18G","1/16G","1/14G","1/12G","1/10G","1/9G","1/8G","1/7G","1/6G","1/5G","1/4G","1/3G","1/2G","1G","2G","4G","8G","20G"},
|
||||
lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,"Inf"},
|
||||
wait=nil,
|
||||
fall=nil,
|
||||
next=nil,
|
||||
hold={"+","-","~"},
|
||||
sequence={"(xxx)","[....]","???","{abc}+","==="},
|
||||
visible={"=","-","_","."},
|
||||
target={10,20,40,100,200,500,1000,"x"},
|
||||
freshLimit={0,8,15,"~"},
|
||||
opponent={"x","9S Lv1","9S Lv2","9S Lv3","9S Lv4","9S Lv5","CC Lv1","CC Lv2","CC Lv3","CC Lv4","CC Lv5","CC Lv6"},
|
||||
},
|
||||
sequence="!@#$%^&*",
|
||||
snapLevelName={"~","10","20","40","60","80"},
|
||||
setting_game="%~~%",
|
||||
@@ -1591,7 +1524,7 @@ local langList={
|
||||
load={[0]="___","_vocie_","_BGM_","_SFX_","_images_","_modes_","_???_"},
|
||||
pauseStat={
|
||||
"~:",
|
||||
"=/''/[ ]:",
|
||||
"=/''/[ ]:",
|
||||
"□:",
|
||||
"-/↓:",
|
||||
"→/↓→:",
|
||||
@@ -1616,7 +1549,7 @@ local langList={
|
||||
"@:",
|
||||
"##:",
|
||||
"~:",
|
||||
"=/''/[ ]:",
|
||||
"=/''/[ ]:",
|
||||
"□/-/→.:",
|
||||
"←/-↓/↑:",
|
||||
"↓/↓→.:",
|
||||
@@ -1691,16 +1624,29 @@ local langList={
|
||||
back="X",
|
||||
},
|
||||
custom={
|
||||
up="↑",
|
||||
down="↓",
|
||||
left="←",
|
||||
right="→",
|
||||
set1="40L (1)",
|
||||
set2="1v1 (2)",
|
||||
set3="Inf. (3)",
|
||||
set4="Blind (4)",
|
||||
set5="Master (5)",
|
||||
seq="Advanced(Q)",
|
||||
drop="↓",lock="↓_",wait="→=",fall="↓=",
|
||||
next="→",hold="[ ]",oncehold="[ ]*1",
|
||||
block="==↓==",ghost="__↓__",center="+",
|
||||
bagLine="123|123",
|
||||
highCam="↑__↑",
|
||||
nextPos="???←",
|
||||
mindas="mDAS",minarr="mARR",minsdarr="msdARR",
|
||||
noTele="X→→X",
|
||||
ospin="O→Any",
|
||||
sequence="$=",
|
||||
target="&=",
|
||||
bone="[]",
|
||||
visible="?=",
|
||||
freshLimit="@",
|
||||
easyFresh="普通刷新锁延",
|
||||
fineKill="12 XX 21",
|
||||
opponent="^_^",
|
||||
life="命数",
|
||||
pushSpeed="上涨速度",
|
||||
bg="{~}",
|
||||
bgm="(~)",
|
||||
|
||||
seq="!!!!(Q)",
|
||||
draw="####(E)",
|
||||
back="X",
|
||||
},
|
||||
@@ -1750,16 +1696,17 @@ local langList={
|
||||
layout="=-=-=",
|
||||
autoPause="A||",
|
||||
swap="=+=+=",
|
||||
fine="!#!X #!#",
|
||||
fine="12 X 21",
|
||||
appLock="?XX(=626)",
|
||||
back="X",
|
||||
},
|
||||
setting_video={
|
||||
sound="←Sound",
|
||||
game="Game→",
|
||||
block="==↓==",
|
||||
ghost="__↓__",
|
||||
smooth="~~↓~~",
|
||||
center="+",
|
||||
smooth="~~↓~~",
|
||||
grid="#",
|
||||
bagLine="123|123",
|
||||
lockFX="↓_~",
|
||||
@@ -1864,6 +1811,7 @@ local langList={
|
||||
rank="←?→",
|
||||
blind="???",
|
||||
disappear="=X=",
|
||||
tapFX="↓ !",
|
||||
back="X",
|
||||
},
|
||||
help={
|
||||
@@ -1967,6 +1915,7 @@ local langList={
|
||||
["custom_clear"]= {"Custom", "NORMAL", "Draw something then clear it!!"},
|
||||
["custom_puzzle"]= {"Custom", "PUZZLE", "Draw something then stack it!!"},
|
||||
["sprintPenta"]= {"Sprint", "Pentomino", "Puzzle-18"},
|
||||
["sprintMPH"]= {"Sprint", "MPH", "Memoriyless.\nPreviewless.\nHoldless."},
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -2001,34 +1950,6 @@ local langList={
|
||||
pauseCount="歇多久了",
|
||||
|
||||
custom="随便玩",
|
||||
customOption={
|
||||
drop="落多快:",
|
||||
lock="锁多快:",
|
||||
wait="出多快:",
|
||||
fall="消多快:",
|
||||
next="看几个:",
|
||||
hold="暂存:",
|
||||
sequence="出啥:",
|
||||
visible="看不看得见:",
|
||||
target="要消多少:",
|
||||
freshLimit="能动几下:",
|
||||
opponent="打谁:",
|
||||
bg="背景:",
|
||||
bgm="歌:",
|
||||
},
|
||||
customVal={
|
||||
drop={"0G","1/180G","1/60G","1/40G","1/30G","1/25G","1/20G","1/18G","1/16G","1/14G","1/12G","1/10G","1/9G","1/8G","1/7G","1/6G","1/5G","1/4G","1/3G","1/2G","1G","2G","4G","8G","20G"},
|
||||
lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,"∞"},
|
||||
wait=nil,
|
||||
fall=nil,
|
||||
next=nil,
|
||||
hold={"开","关","无限"},
|
||||
sequence={"bag","his4","乱出","循环","就那几个"},
|
||||
visible={"看得到","还行","看不到","瞎了"},
|
||||
target={10,20,40,100,200,500,1000,"∞"},
|
||||
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"},
|
||||
},
|
||||
sequence="自定义序列",
|
||||
softdropdas="软降DAS:",
|
||||
softdroparr="软降ARR:",
|
||||
@@ -2190,16 +2111,28 @@ local langList={
|
||||
back="返回",
|
||||
},
|
||||
custom={
|
||||
up="↑",
|
||||
down="↓",
|
||||
left="←",
|
||||
right="→",
|
||||
set1="40行(1)",
|
||||
set2="1v1(2)",
|
||||
set3="无尽(3)",
|
||||
set4="隐形(4)",
|
||||
set5="极限(5)",
|
||||
seq="高级设置(Q)",
|
||||
drop="下落延迟",lock="锁定延迟",wait="出块等待",fall="消行延迟",
|
||||
next="Next",hold="Hold",oncehold="Hold一次",
|
||||
block="方块透明度",ghost="阴影透明度",center="中心透明度",
|
||||
bagLine="包分界线",
|
||||
highCam="超屏视野",
|
||||
nextPos="生成预览",
|
||||
mindas="最小DAS",minarr="最小ARR",minsdarr="最小软降ARR",
|
||||
noTele="禁止瞬移",
|
||||
ospin="O-spin",
|
||||
sequence="序列",
|
||||
target="目标行数",
|
||||
bone="骨块",
|
||||
visible="能见度",
|
||||
freshLimit="锁延刷新限制",
|
||||
easyFresh="普通刷新锁延",
|
||||
fineKill="非极简即死",
|
||||
opponent="对手",
|
||||
life="命数",
|
||||
pushSpeed="上涨速度",
|
||||
bg="背景",
|
||||
bgm="音乐",
|
||||
seq="序列内容(Q)",
|
||||
draw="初始场地(E)",
|
||||
back="返回",
|
||||
},
|
||||
@@ -2363,6 +2296,7 @@ local langList={
|
||||
rank="尺寸",
|
||||
blind="盲",
|
||||
disappear="消失",
|
||||
tapFX="动画",
|
||||
back="返回",
|
||||
},
|
||||
help={
|
||||
@@ -2465,7 +2399,8 @@ local langList={
|
||||
["infinite_dig"]= {"无尽:挖掘", "", "闲得慌的话来挖"},
|
||||
["custom_clear"]= {"自定义", "普通", "试验场"},
|
||||
["custom_puzzle"]= {"自定义", "拼图", "宁就是方块艺术家"},
|
||||
["sprintPenta"]= {"竞速", "五联块", "哦哟?你急了"},
|
||||
["sprintPenta"]= {"竞速", "五联块", "离谱"},
|
||||
["sprintMPH"]= {"竞速", "无脑", "听说你反应很快?"},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ function LOG.draw()
|
||||
end
|
||||
end
|
||||
end
|
||||
function LOG.print(text,T,C)--type/time,color
|
||||
function LOG.print(text,T,C)--text,type/time,color
|
||||
local time
|
||||
local his
|
||||
if T=="warn"then
|
||||
|
||||
@@ -30,7 +30,7 @@ function SFX.loadOne(_)
|
||||
if love.filesystem.getInfo(N)then
|
||||
SFX.list[_]={love.audio.newSource(N,"static")}
|
||||
else
|
||||
LOG.print("No SFX file: "..N,color.red)
|
||||
LOG.print("No SFX file: "..N,"warn")
|
||||
end
|
||||
end
|
||||
function SFX.loadAll()
|
||||
|
||||
@@ -2,7 +2,7 @@ local gc=love.graphics
|
||||
local int=math.floor
|
||||
local format=string.format
|
||||
|
||||
do
|
||||
do--setFont
|
||||
local newFont=gc.setNewFont
|
||||
local setNewFont=gc.setFont
|
||||
local fontCache,currentFontSize={}
|
||||
|
||||
@@ -208,7 +208,7 @@ function slider:reset()
|
||||
self.pos=0
|
||||
end
|
||||
function slider:isAbove(x,y)
|
||||
return x>self.x-10 and x<self.x+self.w+10 and y>self.y-20 and y<self.y+20
|
||||
return x>self.x-10 and x<self.x+self.w+10 and y>self.y-25 and y<self.y+25
|
||||
end
|
||||
function slider:getCenter()
|
||||
return self.x+self.w*(self.pos/self.unit),self.y
|
||||
@@ -284,8 +284,90 @@ function slider:printInfo()
|
||||
DBP(format("x=%d,y=%d,w=%d",self.x,self.y,self.w))
|
||||
end
|
||||
|
||||
local selector={
|
||||
type="selector",
|
||||
ATV=8,--Activating time(0~4)
|
||||
select=0,--Selected item ID
|
||||
selText=nil,--Selected item name
|
||||
}
|
||||
function selector:reset()
|
||||
self.ATV=0
|
||||
local V=self.disp()
|
||||
local L=self.list
|
||||
for i=1,#L do
|
||||
if L[i]==V then
|
||||
self.select=i
|
||||
self.selText=self.list[i]
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
function selector:isAbove(x,y)
|
||||
return
|
||||
x>self.x and
|
||||
x<self.x+self.w+2 and
|
||||
y>self.y and
|
||||
y<self.y+60
|
||||
end
|
||||
function selector:getCenter()
|
||||
return self.x+self.w*(self.pos/self.unit),self.y
|
||||
end
|
||||
function selector:update()
|
||||
local atv=self.ATV
|
||||
if WIDGET.sel==self then
|
||||
if atv<8 then
|
||||
self.ATV=atv+1
|
||||
end
|
||||
else
|
||||
if atv>0 then
|
||||
self.ATV=atv-.5
|
||||
end
|
||||
end
|
||||
end
|
||||
function selector:draw()
|
||||
local x,y=self.x,self.y
|
||||
local r,g,b=unpack(self.color)
|
||||
local w=self.w
|
||||
local ATV=self.ATV
|
||||
|
||||
gc.setColor(1,1,1,.6+ATV*.1)
|
||||
gc.setLineWidth(3)
|
||||
gc.rectangle("line",x,y,w,60)
|
||||
|
||||
gc.setColor(1,1,1,.2+ATV*.1)
|
||||
local t=(Timer()%.5)^.5
|
||||
if self.select>1 then
|
||||
gc.draw(drawableText.small,x+6,y+20)
|
||||
if ATV>0 then
|
||||
gc.setColor(1,1,1,ATV*.4*(.5-t))
|
||||
gc.draw(drawableText.small,x+6-t*40,y+20)
|
||||
gc.setColor(1,1,1,.2+ATV*.1)
|
||||
end
|
||||
end
|
||||
if self.select<#self.list then
|
||||
gc.draw(drawableText.large,x+w-24,y+20)
|
||||
if ATV>0 then
|
||||
gc.setColor(1,1,1,ATV*.4*(.5-t))
|
||||
gc.draw(drawableText.large,x+w-24+t*40,y+20)
|
||||
end
|
||||
end
|
||||
|
||||
setFont(28)
|
||||
t=self.text
|
||||
if t then
|
||||
if type(t)=="function"then t=t()end
|
||||
gc.setColor(r,g,b)
|
||||
mStr(self.text,x+w*.5,y+17-21)
|
||||
end
|
||||
gc.setColor(1,1,1)
|
||||
mStr(self.selText,x+w*.5,y+43-21)
|
||||
end
|
||||
function selector:printInfo()
|
||||
DBP(format("x=%d,y=%d,w=%d",self.x,self.y,self.w))
|
||||
end
|
||||
|
||||
local WIDGET={}
|
||||
WIDGET.active={}--Table, contains all active widgets
|
||||
WIDGET.active={}--Table contains all active widgets
|
||||
WIDGET.sel=nil--Selected widget
|
||||
function WIDGET.set(L)
|
||||
WIDGET.sel=nil
|
||||
@@ -306,7 +388,7 @@ function WIDGET.newText(D)
|
||||
x= D.x,
|
||||
y= D.y,
|
||||
align= D.align,
|
||||
color= color[D.color]or D.color,
|
||||
color= D.color and(color[D.color]or D.color)or color.white,
|
||||
font= D.font,
|
||||
hide= D.hide,
|
||||
}for k,v in next,button do _[k]=v end return _
|
||||
@@ -318,7 +400,7 @@ function WIDGET.newImage(D)
|
||||
y= D.y-h*.5,
|
||||
w= D.w,
|
||||
h= D.h,
|
||||
color= color[D.color]or D.color,
|
||||
color= D.color and(color[D.color]or D.color)or color.white,
|
||||
font= D.font,
|
||||
code= D.code,
|
||||
hide= D.hide,
|
||||
@@ -342,7 +424,7 @@ function WIDGET.newButton(D)
|
||||
D.x+D.w*.35,D.y+D.h*.35,
|
||||
},
|
||||
|
||||
color= color[D.color]or D.color,
|
||||
color= D.color and(color[D.color]or D.color)or color.white,
|
||||
font= D.font,
|
||||
code= D.code,
|
||||
hide= D.hide,
|
||||
@@ -366,7 +448,7 @@ function WIDGET.newKey(D)
|
||||
D.x+D.w*.35,D.y+D.h*.35,
|
||||
},
|
||||
|
||||
color= color[D.color]or D.color,
|
||||
color= D.color and(color[D.color]or D.color)or color.white,
|
||||
font= D.font,
|
||||
code= D.code,
|
||||
hide= D.hide,
|
||||
@@ -379,8 +461,6 @@ function WIDGET.newSwitch(D)
|
||||
x= D.x,
|
||||
y= D.y,
|
||||
|
||||
cx= D.x+25,
|
||||
cy= D.y,
|
||||
resCtr={
|
||||
D.x+25,D.y,
|
||||
},
|
||||
@@ -399,8 +479,6 @@ function WIDGET.newSlider(D)
|
||||
y= D.y,
|
||||
w= D.w,
|
||||
|
||||
cx= D.x+D.w*.5,
|
||||
cy= D.y,
|
||||
resCtr={
|
||||
D.x,D.y,
|
||||
D.x+D.w*.25,D.y,
|
||||
@@ -440,6 +518,30 @@ function WIDGET.newSlider(D)
|
||||
end
|
||||
for k,v in next,slider do _[k]=v end return _
|
||||
end
|
||||
function WIDGET.newSelector(D)
|
||||
local _={
|
||||
name= D.name,
|
||||
|
||||
x= D.x-D.w*.5,
|
||||
y= D.y-30,
|
||||
w= D.w,
|
||||
|
||||
resCtr={
|
||||
D.x,D.y,
|
||||
D.x+D.w*.25,D.y,
|
||||
D.x+D.w*.5,D.y,
|
||||
D.x+D.w*.75,D.y,
|
||||
D.x+D.w,D.y,
|
||||
},
|
||||
|
||||
color= D.color and(color[D.color]or D.color)or color.white,
|
||||
list= D.list,
|
||||
disp= D.disp,
|
||||
code= D.code,
|
||||
hide= D.hide,
|
||||
}
|
||||
for k,v in next,selector do _[k]=v end return _
|
||||
end
|
||||
|
||||
function WIDGET.moveCursor(x,y)
|
||||
WIDGET.sel=nil
|
||||
@@ -462,9 +564,28 @@ function WIDGET.press(x,y)
|
||||
SFX.play("lock")
|
||||
elseif W.type=="switch"then
|
||||
W.code()
|
||||
SFX.play("move",.6)
|
||||
SFX.play("move")
|
||||
elseif W.type=="slider"then
|
||||
WIDGET.drag(x,y)
|
||||
elseif W.type=="selector"then
|
||||
local s=W.select
|
||||
if x<W.x+W.w*.5 then
|
||||
if s>1 then
|
||||
s=s-1
|
||||
sysFX.newShade(.3,1,1,1,W.x,W.y,W.w*.5,60)
|
||||
end
|
||||
else
|
||||
if s<#W.list then
|
||||
s=s+1
|
||||
sysFX.newShade(.3,1,1,1,W.x+W.w*.5,W.y,W.w*.5,60)
|
||||
end
|
||||
end
|
||||
if W.select~=s then
|
||||
W.code(W.list[s])
|
||||
W.select=s
|
||||
W.selText=W.list[s]
|
||||
SFX.play("prerotate")
|
||||
end
|
||||
end
|
||||
if W.hide and W.hide()then WIDGET.sel=nil end
|
||||
end
|
||||
@@ -473,8 +594,9 @@ function WIDGET.drag(x,y,dx,dy)
|
||||
if not W then return end
|
||||
if W.type=="slider"then
|
||||
if not x then return end
|
||||
x=x-W.x
|
||||
local p=W.disp()
|
||||
local P=x<W.x and 0 or x>W.x+W.w and W.unit or(x-W.x)/W.w*W.unit
|
||||
local P=x<0 and 0 or x>W.w and W.unit or x/W.w*W.unit
|
||||
if not W.smooth then
|
||||
P=int(P+.5)
|
||||
end
|
||||
@@ -518,6 +640,26 @@ function WIDGET.keyPressed(i)
|
||||
W.lastTime=Timer()
|
||||
W.change()
|
||||
end
|
||||
elseif W.type=="selector"then
|
||||
print(1)
|
||||
local s=W.select
|
||||
if i=="left"then
|
||||
if s>1 then
|
||||
s=s-1
|
||||
sysFX.newShade(.3,1,1,1,W.x,W.y,W.w*.5,60)
|
||||
end
|
||||
else
|
||||
if s<#W.list then
|
||||
s=s+1
|
||||
sysFX.newShade(.3,1,1,1,W.x+W.w*.5,W.y,W.w*.5,60)
|
||||
end
|
||||
end
|
||||
if W.select~=s then
|
||||
W.code(W.list[s])
|
||||
W.select=s
|
||||
W.selText=W.list[s]
|
||||
SFX.play("prerotate")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -74,11 +74,28 @@ local virtualkeySet={
|
||||
{20,1210, 50,30},--zangiRight
|
||||
},--PC key feedback(top&in a row)
|
||||
}
|
||||
|
||||
local CUSlist={
|
||||
drop={1e99,180,60,40,30,25,20,18,16,14,12,10,9,8,7,6,5,4,3,2,1,.5,.25,.125,0},
|
||||
lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99},
|
||||
wait={0,1,2,3,4,5,6,7,8,10,15,20,30,60},
|
||||
fall={0,1,2,3,4,5,6,7,8,10,15,20,30,60},
|
||||
sequence={"bag","his4","rnd","loop","fixed"},
|
||||
target={10,20,40,100,200,500,1000,1e99},
|
||||
visible={"show","time","fast","none"},
|
||||
freshLimit={0,8,15,1e99},
|
||||
opponent={0,1,2,3,4,5,6,7,8,9,10},
|
||||
life={0,1,2,3,4,5,10,42,87,500},
|
||||
pushSpeed={1,2,3,5,15},
|
||||
bg={"none","glow","rgb","flink","aura","bg1","bg2","rainbow","rainbow2","lightning","lightning2","matrix","space"},
|
||||
bgm={"blank","race","push","way","reason","newera","oxygen","infinite","down","secret7th","secret8th","rockblock","cruelty","final"},
|
||||
}
|
||||
--Lambda Funcs for widgets,delete at file end
|
||||
function CUSval(k) return function()return customEnv[k] end end
|
||||
function CUSrev(k) return function()customEnv[k]=not customEnv[k] end end
|
||||
function CUSsto(k) return function(i)customEnv[k]=i end end
|
||||
function SETval(k) return function()return setting[k] end end
|
||||
function SETsto(k) return function(i)setting[k]=i end end
|
||||
function SETrev(k) return function()setting[k]=not setting[k] end end
|
||||
function SETsto(k) return function(i)setting[k]=i end end
|
||||
function pressKey(k)return function()love.keypressed(k) end end
|
||||
function setPen(i) return function()sceneTemp.pen=i end end
|
||||
function prevSkin(n)return function()SKIN.prev(n) end end
|
||||
@@ -96,6 +113,7 @@ newButton=WIDGET.newButton
|
||||
newKey=WIDGET.newKey
|
||||
newSwitch=WIDGET.newSwitch
|
||||
newSlider=WIDGET.newSlider
|
||||
newSelector=WIDGET.newSelector
|
||||
|
||||
--All widgets
|
||||
local Widgets={
|
||||
@@ -148,18 +166,46 @@ local Widgets={
|
||||
newButton({name="back", x=1140, y=640, w=180,h=80, color="white", font=35,code=BACK}),
|
||||
},
|
||||
custom={
|
||||
newKey({name="up", x=1140, y=100, w=100, color="white", font=45,code=function()sceneTemp=(sceneTemp-2)%#customID+1 end}),
|
||||
newKey({name="down", x=1140, y=340, w=100, color="white", font=45,code=function()sceneTemp=sceneTemp%#customID+1 end}),
|
||||
newKey({name="left", x=1080, y=220, w=100, color="white", font=45,code=pressKey("left")}),
|
||||
newKey({name="right", x=1200, y=220, w=100, color="white", font=45,code=pressKey("right")}),
|
||||
--Basic
|
||||
newSelector({name="drop", x=180, y=150+20,w=260,color="red", list=CUSlist.drop, disp=CUSval("drop"), code=CUSsto("drop")}),
|
||||
newSelector({name="lock", x=180, y=230+20,w=260,color="red", list=CUSlist.lock, disp=CUSval("lock"), code=CUSsto("lock")}),
|
||||
newSelector({name="wait", x=180, y=310+20,w=260,color="orange", list=CUSlist.wait, disp=CUSval("wait"), code=CUSsto("wait")}),
|
||||
newSelector({name="fall", x=180, y=390+20,w=260,color="orange", list=CUSlist.fall, disp=CUSval("fall"), code=CUSsto("fall")}),
|
||||
|
||||
newButton({name="set1", x=900, y=320, w=210,h=70, color="lYellow",font=32,code=pressKey("1")}),
|
||||
newButton({name="set2", x=900, y=400, w=210,h=70, color="lYellow",font=32,code=pressKey("2")}),
|
||||
newButton({name="set3", x=900, y=480, w=210,h=70, color="lYellow",font=32,code=pressKey("3")}),
|
||||
newButton({name="set4", x=900, y=560, w=210,h=70, color="lYellow",font=32,code=pressKey("4")}),
|
||||
newButton({name="set5", x=900, y=640, w=210,h=70, color="lYellow",font=32,code=pressKey("5")}),
|
||||
newSlider({name="next", x=120, y=500,w=200,unit=6, font=30, disp=CUSval("next"), code=CUSsto("next")}),
|
||||
newSwitch({name="hold", x=230, y=570, font=30, disp=CUSval("hold"), code=CUSrev("hold")}),
|
||||
newSwitch({name="oncehold", x=230, y=650, font=30, disp=CUSval("oncehold"),code=CUSrev("oncehold"),hide=function()return not customEnv.hold end}),
|
||||
|
||||
newButton({name="seq", x=665, y=415, w=200,h=40, color="lGreen", font=30,code=pressKey("q")}),
|
||||
--Visual
|
||||
newSlider({name="block", x=470, y=150,w=120,unit=1, font=25, disp=CUSval("block"), code=CUSsto("block")}),
|
||||
newSlider({name="ghost", x=470, y=210,w=120,unit=.6, font=25, disp=CUSval("ghost"), code=CUSsto("ghost")}),
|
||||
newSlider({name="center", x=470, y=270,w=120,unit=1, font=25, disp=CUSval("center"), code=CUSsto("center")}),
|
||||
newSwitch({name="bagLine", x=570, y=340, font=30, disp=CUSval("bagLine"), code=CUSrev("bagLine")}),
|
||||
newSwitch({name="highCam", x=570, y=400, font=30, disp=CUSval("highCam"), code=CUSrev("highCam")}),
|
||||
newSwitch({name="nextPos", x=570, y=460, font=30, disp=CUSval("nextPos"), code=CUSrev("nextPos")}),
|
||||
newSwitch({name="bone", x=570, y=520, font=30, disp=CUSval("bone"), code=CUSrev("bone")}),
|
||||
|
||||
--Rule
|
||||
newSlider({name="mindas", x=750, y=150,w=200,unit=15,font=25, disp=CUSval("mindas"), code=CUSsto("mindas")}),
|
||||
newSlider({name="minarr", x=750, y=210,w=200,unit=10,font=25, disp=CUSval("minarr"), code=CUSsto("minarr")}),
|
||||
newSlider({name="minsdarr", x=750, y=270,w=200,unit=4, font=22, disp=CUSval("minsdarr"),code=CUSsto("minsdarr")}),
|
||||
newSelector({name="sequence", x=520, y=600,w=200,color="green", list=CUSlist.sequence, disp=CUSval("sequence"),code=CUSsto("sequence")}),
|
||||
newSwitch({name="ospin", x=860, y=340, font=30, disp=CUSval("ospin"), code=CUSrev("ospin")}),
|
||||
newSwitch({name="noTele", x=860, y=400, font=25, disp=CUSval("noTele"), code=CUSrev("noTele")}),
|
||||
newSwitch({name="fineKill", x=860, y=460, font=22, disp=CUSval("fineKill"),code=CUSrev("fineKill")}),
|
||||
newSwitch({name="easyFresh", x=860, y=520, font=18, disp=CUSval("easyFresh"),code=CUSrev("easyFresh")}),
|
||||
newSelector({name="visible", x=1120, y=60,w=260,color="lBlue", list=CUSlist.visible, disp=CUSval("visible"), code=CUSsto("visible")}),
|
||||
newSelector({name="target", x=1120, y=140,w=260,color="green", list=CUSlist.target, disp=CUSval("target"), code=CUSsto("target")}),
|
||||
newSelector({name="freshLimit", x=1120, y=220,w=260,color="purple", list=CUSlist.freshLimit,disp=CUSval("freshLimit"),code=CUSsto("freshLimit")}),
|
||||
newSelector({name="opponent", x=1120, y=300,w=260,color="red", list=CUSlist.opponent, disp=CUSval("opponent"),code=CUSsto("opponent")}),
|
||||
newSelector({name="life", x=1120, y=380,w=260,color="red", list=CUSlist.life, disp=CUSval("life"), code=CUSsto("life")}),
|
||||
newSelector({name="pushSpeed", x=1120, y=460,w=260,color="red", list=CUSlist.pushSpeed, disp=CUSval("pushSpeed"),code=CUSsto("pushSpeed")}),
|
||||
|
||||
--Else
|
||||
newSelector({name="bg", x=800, y=600, w=220,color="yellow", list=CUSlist.bg, disp=CUSval("bg"), code=function(i)customEnv.bg=i BG.set(i)end}),
|
||||
newSelector({name="bgm", x=800, y=670, w=220,color="yellow", list=CUSlist.bgm, disp=CUSval("bgm"), code=function(i)customEnv.bgm=i BGM.play(i)end}),
|
||||
|
||||
newButton({name="seq", x=520, y=670, w=200,h=60, color="lGreen", font=30,code=pressKey("q")}),
|
||||
newButton({name="draw", x=150, y=80, w=220,h=80, color="white", font=35,code=pressKey("e")}),
|
||||
newButton({name="back", x=1140, y=640, w=180,h=80, color="white", font=35,code=BACK}),
|
||||
},
|
||||
@@ -243,6 +289,7 @@ 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","swipeR")end}),
|
||||
newButton({name="sound", x=1080, y=80, w=240,h=80, color="lCyan", font=35,code=function()SCN.swapTo("setting_sound","swipeL")end}),
|
||||
|
||||
newButton({name="ctrl", x=290, y=220, w=320,h=80, color="lYellow",font=35,code=goScene("setting_control")}),
|
||||
newButton({name="key", x=640, y=220, w=320,h=80, color="lGreen", font=35,code=goScene("setting_key")}),
|
||||
newButton({name="touch", x=990, y=220, w=320,h=80, color="lBlue", font=35,code=goScene("setting_touch")}),
|
||||
@@ -260,41 +307,46 @@ local Widgets={
|
||||
setting_video={
|
||||
newButton({name="sound", x=200, y=80,w=240,h=80,color="lCyan",font=35,code=function()SCN.swapTo("setting_sound","swipeR")end}),
|
||||
newButton({name="game", x=1080, y=80,w=240,h=80,color="lCyan",font=35,code=function()SCN.swapTo("setting_game","swipeL")end}),
|
||||
newSlider({name="ghost", x=250, y=180,w=200,unit=.6,font=35,disp=SETval("ghost"),show="percent",code=SETsto("ghost")}),
|
||||
newSlider({name="center", x=620, y=180,w=200,unit=1, font=35,disp=SETval("center"), code=SETsto("center")}),
|
||||
newSwitch({name="smooth", x=260, y=260, font=25,disp=SETval("smooth"), code=SETrev("smooth")}),
|
||||
newSwitch({name="grid", x=480, y=260, font=35,disp=SETval("grid"), code=SETrev("grid")}),
|
||||
newSwitch({name="bagLine", x=700, y=260, font=30,disp=SETval("bagLine"), code=SETrev("bagLine")}),
|
||||
newSlider({name="lockFX", x=350, y=340,w=373,unit=5, font=32,disp=SETval("lockFX"), code=SETsto("lockFX")}),
|
||||
newSlider({name="dropFX", x=350, y=390,w=373,unit=5, font=32,disp=SETval("dropFX"), code=SETsto("dropFX")}),
|
||||
newSlider({name="moveFX", x=350, y=440,w=373,unit=5, font=32,disp=SETval("moveFX"), code=SETsto("moveFX")}),
|
||||
newSlider({name="clearFX", x=350, y=490,w=373,unit=5, font=32,disp=SETval("clearFX"), code=SETsto("clearFX")}),
|
||||
newSlider({name="shakeFX", x=350, y=540,w=373,unit=5, font=32,disp=SETval("shakeFX"), code=SETsto("shakeFX")}),
|
||||
newSlider({name="atkFX", x=350, y=590,w=373,unit=5, font=32,disp=SETval("atkFX"), code=SETsto("atkFX")}),
|
||||
newSlider({name="frame", x=350, y=640,w=373,unit=10,font=30,
|
||||
|
||||
newSlider({name="block", x=260, y=180,w=200,unit=1, font=30,disp=SETval("block"),show="percent",code=SETsto("block")}),
|
||||
newSlider({name="ghost", x=260, y=240,w=200,unit=.6,font=30,disp=SETval("ghost"),show="percent",code=SETsto("ghost")}),
|
||||
newSlider({name="center", x=260, y=300,w=200,unit=1, font=30,disp=SETval("center"),show="percent",code=SETsto("center")}),
|
||||
|
||||
newSwitch({name="smooth", x=700, y=180, font=30,disp=SETval("smooth"), code=SETrev("smooth")}),
|
||||
newSwitch({name="grid", x=700, y=240, font=30,disp=SETval("grid"), code=SETrev("grid")}),
|
||||
newSwitch({name="bagLine", x=700, y=300, font=30,disp=SETval("bagLine"), code=SETrev("bagLine")}),
|
||||
|
||||
newSlider({name="lockFX", x=350, y=350,w=373,unit=5, font=32,disp=SETval("lockFX"), code=SETsto("lockFX")}),
|
||||
newSlider({name="dropFX", x=350, y=400,w=373,unit=5, font=32,disp=SETval("dropFX"), code=SETsto("dropFX")}),
|
||||
newSlider({name="moveFX", x=350, y=450,w=373,unit=5, font=32,disp=SETval("moveFX"), code=SETsto("moveFX")}),
|
||||
newSlider({name="clearFX", x=350, y=500,w=373,unit=5, font=32,disp=SETval("clearFX"), code=SETsto("clearFX")}),
|
||||
newSlider({name="shakeFX", x=350, y=550,w=373,unit=5, font=32,disp=SETval("shakeFX"), code=SETsto("shakeFX")}),
|
||||
newSlider({name="atkFX", x=350, y=600,w=373,unit=5, font=32,disp=SETval("atkFX"), code=SETsto("atkFX")}),
|
||||
newSlider({name="frame", x=350, y=650,w=373,unit=10,font=30,
|
||||
disp=function()
|
||||
return setting.frameMul>35 and setting.frameMul/10 or setting.frameMul/5-4
|
||||
end,
|
||||
code=function(i)
|
||||
setting.frameMul=i<5 and 5*i+20 or 10*i
|
||||
end}),
|
||||
newSwitch({name="text", x=1050, y=180,font=35,disp=SETval("text"),code=SETrev("text")}),
|
||||
newSwitch({name="warn", x=1050, y=240,font=35,disp=SETval("warn"),code=SETrev("warn")}),
|
||||
newSwitch({name="highCam", x=1050, y=300,font=35,disp=SETval("highCam"),code=SETrev("highCam")}),
|
||||
newSwitch({name="nextPos", x=1050, y=360,font=35,disp=SETval("nextPos"),code=SETrev("nextPos")}),
|
||||
newSwitch({name="fullscreen",x=1050,y=420,font=35,disp=SETval("fullscreen"),
|
||||
|
||||
newSwitch({name="text", x=1100, y=180,font=35,disp=SETval("text"),code=SETrev("text")}),
|
||||
newSwitch({name="warn", x=1100, y=240,font=35,disp=SETval("warn"),code=SETrev("warn")}),
|
||||
newSwitch({name="highCam", x=1100, y=300,font=35,disp=SETval("highCam"),code=SETrev("highCam")}),
|
||||
newSwitch({name="nextPos", x=1100, y=360,font=35,disp=SETval("nextPos"),code=SETrev("nextPos")}),
|
||||
newSwitch({name="fullscreen",x=1100,y=420,font=35,disp=SETval("fullscreen"),
|
||||
code=function()
|
||||
setting.fullscreen=not setting.fullscreen
|
||||
love.window.setFullscreen(setting.fullscreen)
|
||||
love.resize(love.graphics.getWidth(),love.graphics.getHeight())
|
||||
end}),
|
||||
newSwitch({name="bg", x=1050, y=480,font=35,disp=SETval("bg"),
|
||||
newSwitch({name="bg", x=1100, y=480,font=35,disp=SETval("bg"),
|
||||
code=function()
|
||||
BG.set("none")
|
||||
setting.bg=not setting.bg
|
||||
BG.set("space")
|
||||
end}),
|
||||
newSwitch({name="power", x=1050, y=540,font=35,disp=SETval("powerInfo"),
|
||||
newSwitch({name="power", x=1100, y=540,font=35,disp=SETval("powerInfo"),
|
||||
code=function()
|
||||
setting.powerInfo=not setting.powerInfo
|
||||
end}),
|
||||
@@ -303,6 +355,7 @@ local Widgets={
|
||||
setting_sound={
|
||||
newButton({name="game", x=200, y=80,w=240,h=80,color="lCyan", font=35,code=function()SCN.swapTo("setting_game","swipeR")end}),
|
||||
newButton({name="graphic", x=1080, y=80,w=240,h=80,color="lCyan", font=35,code=function()SCN.swapTo("setting_video","swipeL")end}),
|
||||
|
||||
newSlider({name="sfx", x=180, y=200,w=400, font=35,change=function()SFX.play("blip_1")end, disp=SETval("sfx"), code=SETsto("sfx")}),
|
||||
newSlider({name="stereo", x=180, y=500,w=400, 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, font=30,change=function()SFX.fplay("spawn_"..rnd(7),setting.spawn)end,disp=SETval("spawn"), code=SETsto("spawn")}),
|
||||
@@ -401,13 +454,13 @@ local Widgets={
|
||||
SCN.go("setting_touchSwitch")
|
||||
end}),
|
||||
newButton({name="back", x=760,y=180,w=200,h=80,color="white",font=35,code=BACK}),
|
||||
newSlider({name="size", x=450,y=265,w=460,unit=14,font=40,show="vkSize",
|
||||
newSlider({name="size", x=450,y=265,w=460,unit=19,font=40,show="vkSize",
|
||||
disp=function()
|
||||
return VK_org[sceneTemp.sel].r/10-1
|
||||
end,
|
||||
code=function(v)
|
||||
if sceneTemp.sel then
|
||||
VK_org[sceneTemp.sel].r=10+v*10
|
||||
VK_org[sceneTemp.sel].r=(v+1)*10
|
||||
end
|
||||
end,
|
||||
hide=function()
|
||||
@@ -474,17 +527,18 @@ local Widgets={
|
||||
p15={
|
||||
newButton({name="reset", x=160,y=100,w=180,h=100,color="lGreen", font=40,code=pressKey("space")}),
|
||||
newSlider({name="color", x=110,y=250,w=170,unit=4,show=false, font=30,disp=function()return sceneTemp.color end,code=function(v)if sceneTemp.state~=1 then sceneTemp.color=v end end,hide=function()return sceneTemp.state==1 end}),
|
||||
newSwitch({name="blind", x=240,y=330,w=60, font=40,disp=function()return sceneTemp.blind end,code=pressKey("b"),hide=function()return sceneTemp.state==1 end}),
|
||||
newSwitch({name="slide", x=240,y=420,w=60, font=40,disp=function()return sceneTemp.slide end,code=pressKey("s"),hide=function()return sceneTemp.state==1 end}),
|
||||
newSwitch({name="pathVis", x=240,y=510,w=60, font=40,disp=function()return sceneTemp.pathVis end,code=pressKey("p"),hide=function()return sceneTemp.state==1 or not sceneTemp.slide end}),
|
||||
newSwitch({name="revKB", x=240,y=600,w=60, font=40,disp=function()return sceneTemp.revKB end,code=pressKey("r"),hide=function()return sceneTemp.state==1 end}),
|
||||
newSwitch({name="blind", x=240,y=330,w=60, font=40,disp=function()return sceneTemp.blind end,code=pressKey("w"), hide=function()return sceneTemp.state==1 end}),
|
||||
newSwitch({name="slide", x=240,y=420,w=60, font=40,disp=function()return sceneTemp.slide end,code=pressKey("e"), hide=function()return sceneTemp.state==1 end}),
|
||||
newSwitch({name="pathVis", x=240,y=510,w=60, font=40,disp=function()return sceneTemp.pathVis end,code=pressKey("r"), hide=function()return sceneTemp.state==1 or not sceneTemp.slide end}),
|
||||
newSwitch({name="revKB", x=240,y=600,w=60, font=40,disp=function()return sceneTemp.revKB end,code=pressKey("t"), hide=function()return sceneTemp.state==1 end}),
|
||||
newButton({name="back", x=1140,y=640,w=180,h=80,color="white", font=35,code=BACK}),
|
||||
},
|
||||
schulte_G={
|
||||
newButton({name="reset", x=160,y=100,w=180,h=100,color="lGreen", font=40,code=pressKey("r"),hide=function()return sceneTemp.state==0 end}),
|
||||
newSlider({name="rank", x=130,y=250,w=150,unit=3,show=false, font=40,disp=function()return sceneTemp.rank-3 end,code=function(v)sceneTemp.rank=v+3 end,hide=function()return sceneTemp.state>0 end}),
|
||||
newSwitch({name="blind", x=200,y=330,w=60, font=40,disp=function()return sceneTemp.blind end,code=pressKey("b"),hide=function()return sceneTemp.state==1 end}),
|
||||
newSwitch({name="disappear",x=200,y=410,w=60, font=40,disp=function()return sceneTemp.disappear end,code=pressKey("d"),hide=function()return sceneTemp.state==1 end}),
|
||||
newSlider({name="rank", x=130,y=250,w=150,unit=3,show=false, font=40,disp=function()return sceneTemp.rank-3 end, code=function(v)sceneTemp.rank=v+3 end,hide=function()return sceneTemp.state>0 end}),
|
||||
newSwitch({name="blind", x=240,y=330,w=60, font=40,disp=function()return sceneTemp.blind end, code=pressKey("q"),hide=function()return sceneTemp.state==1 end}),
|
||||
newSwitch({name="disappear",x=240,y=420,w=60, font=40,disp=function()return sceneTemp.disappear end, code=pressKey("w"),hide=function()return sceneTemp.state==1 end}),
|
||||
newSwitch({name="tapFX", x=240,y=510,w=60, font=40,disp=function()return sceneTemp.tapFX end, code=pressKey("e"),hide=function()return sceneTemp.state==1 end}),
|
||||
newButton({name="back", x=1140,y=640,w=180,h=80,color="white", font=35,code=BACK}),
|
||||
},
|
||||
help={
|
||||
|
||||
2
conf.lua
2
conf.lua
@@ -1,4 +1,4 @@
|
||||
gameVersion="Alpha V0.10.10"
|
||||
gameVersion="Alpha V0.10.11"
|
||||
function love.conf(t)
|
||||
t.identity="Techmino"--Saving folder
|
||||
t.version="11.1"
|
||||
|
||||
41
main.lua
41
main.lua
@@ -43,7 +43,46 @@ scr={
|
||||
k=1,--Scale size
|
||||
}--1280:720-Rect Screen Info
|
||||
|
||||
customSel={1,22,1,1,7,3,1,1,8,4,1,1,1}
|
||||
customEnv={
|
||||
--Basic
|
||||
drop=60,
|
||||
lock=60,
|
||||
wait=0,
|
||||
fall=0,
|
||||
|
||||
next=6,
|
||||
hold=true,
|
||||
oncehold=true,
|
||||
|
||||
--Visual
|
||||
block=1,
|
||||
ghost=.3,
|
||||
center=1,
|
||||
bagLine=false,
|
||||
highCam=false,
|
||||
nextPos=false,
|
||||
bone=false,
|
||||
|
||||
--Rule
|
||||
mindas=0,
|
||||
minarr=0,
|
||||
minsdarr=0,
|
||||
sequence="bag",
|
||||
ospin=true,
|
||||
noTele=false,
|
||||
fineKill=false,
|
||||
easyFresh=true,
|
||||
visible="show",
|
||||
target=200,
|
||||
freshLimit=1e99,
|
||||
opponent=0,
|
||||
life=0,
|
||||
pushSpeed=3,
|
||||
|
||||
--Else
|
||||
bg="none",
|
||||
bgm="race"
|
||||
}
|
||||
preField={h=20}for i=1,20 do preField[i]={0,0,0,0,0,0,0,0,0,0}end
|
||||
preBag={}
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ return{
|
||||
env={
|
||||
noTele=true,
|
||||
minarr=1,
|
||||
_20G=true,
|
||||
drop=0,lock=15,
|
||||
wait=15,fall=6,
|
||||
next=3,
|
||||
|
||||
@@ -4,7 +4,7 @@ return{
|
||||
env={
|
||||
drop=30,lock=45,
|
||||
visible="time",
|
||||
dropPiece=PLY.reach_winCheck,
|
||||
dropPiece=PLY.check_lineReach,
|
||||
freshLimit=10,
|
||||
target=200,
|
||||
bg="glow",bgm="reason",
|
||||
|
||||
@@ -8,7 +8,7 @@ return{
|
||||
center=false,
|
||||
dropFX=0,lockFX=0,
|
||||
visible="none",
|
||||
dropPiece=PLY.reach_winCheck,
|
||||
dropPiece=PLY.check_lineReach,
|
||||
freshLimit=15,
|
||||
target=200,
|
||||
bg="rgb",bgm="reason",
|
||||
|
||||
@@ -8,7 +8,7 @@ return{
|
||||
center=0,ghost=0,
|
||||
dropFX=0,lockFX=0,
|
||||
visible="none",
|
||||
dropPiece=PLY.reach_winCheck,
|
||||
dropPiece=PLY.check_lineReach,
|
||||
freshLimit=15,
|
||||
target=200,
|
||||
bg="rgb",bgm="reason",
|
||||
|
||||
@@ -6,7 +6,7 @@ return{
|
||||
drop=15,lock=45,
|
||||
freshLimit=10,
|
||||
visible="fast",
|
||||
dropPiece=PLY.reach_winCheck,
|
||||
dropPiece=PLY.check_lineReach,
|
||||
target=200,
|
||||
bg="glow",bgm="reason",
|
||||
},
|
||||
|
||||
@@ -4,11 +4,10 @@ return{
|
||||
color=color.red,
|
||||
env={
|
||||
drop=30,lock=60,
|
||||
block=false,
|
||||
center=0,ghost=0,
|
||||
block=0,center=0,ghost=0,
|
||||
dropFX=0,lockFX=0,
|
||||
visible="none",
|
||||
dropPiece=PLY.reach_winCheck,
|
||||
dropPiece=PLY.check_lineReach,
|
||||
freshLimit=15,
|
||||
target=200,
|
||||
bg="rgb",bgm="way",
|
||||
|
||||
@@ -6,11 +6,10 @@ return{
|
||||
env={
|
||||
drop=30,lock=60,
|
||||
next=1,
|
||||
block=false,
|
||||
center=0,ghost=0,
|
||||
block=0,center=0,ghost=0,
|
||||
dropFX=0,lockFX=0,
|
||||
visible="none",
|
||||
dropPiece=PLY.reach_winCheck,
|
||||
dropPiece=PLY.check_lineReach,
|
||||
freshLimit=15,
|
||||
target=100,
|
||||
bg="none",bgm="way",
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
local min=math.min
|
||||
local function check_c4w(P)
|
||||
for i=1,#P.clearedRow do
|
||||
P.field[#P.field+1]=freeRow.get(13)
|
||||
P.visTime[#P.visTime+1]=freeRow.get(20)
|
||||
for i=4,7 do P.field[#P.field][i]=0 end
|
||||
end
|
||||
if #P.clearedRow==0 then
|
||||
P:lose()
|
||||
else
|
||||
for i=1,#P.clearedRow do
|
||||
P.field[#P.field+1]=freeRow.get(13)
|
||||
P.visTime[#P.visTime+1]=freeRow.get(20)
|
||||
for i=4,7 do P.field[#P.field][i]=0 end
|
||||
end
|
||||
if P.combo>P.modeData.point then
|
||||
P.modeData.point=P.combo
|
||||
end
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
local min=math.min
|
||||
local function check_c4w(P)
|
||||
for i=1,#P.clearedRow do
|
||||
P.field[#P.field+1]=freeRow.get(13)
|
||||
P.visTime[#P.visTime+1]=freeRow.get(20)
|
||||
for i=4,7 do P.field[#P.field][i]=0 end
|
||||
end
|
||||
if #P.clearedRow>0 then
|
||||
for i=1,#P.clearedRow do
|
||||
P.field[#P.field+1]=freeRow.get(13)
|
||||
P.visTime[#P.visTime+1]=freeRow.get(20)
|
||||
for i=4,7 do P.field[#P.field][i]=0 end
|
||||
end
|
||||
if P.combo>P.modeData.point then
|
||||
P.modeData.point=P.combo
|
||||
end
|
||||
|
||||
@@ -3,15 +3,12 @@ local int=math.floor
|
||||
return{
|
||||
color=color.white,
|
||||
env={
|
||||
dropPiece=PLY.reach_winCheck,
|
||||
dropPiece=PLY.check_lineReach,
|
||||
},
|
||||
load=function()
|
||||
for i=1,#customID do
|
||||
local k=customID[i]
|
||||
modeEnv[k]=customRange[k][customSel[i]]
|
||||
for k,v in next,customEnv do
|
||||
modeEnv[k]=v
|
||||
end
|
||||
modeEnv._20G=modeEnv.drop==0
|
||||
modeEnv.oncehold=customSel[6]==1
|
||||
if preBag[1]then
|
||||
modeEnv.bag=preBag
|
||||
else
|
||||
@@ -21,10 +18,10 @@ return{
|
||||
local L=modeEnv.opponent
|
||||
if L~=0 then
|
||||
modeEnv.target=nil
|
||||
if L<10 then
|
||||
if L<6 then
|
||||
PLY.newAIPlayer(2,965,360,.5,AITemplate("9S",2*L))
|
||||
else
|
||||
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",L-6,2+int((L-11)*.5),modeEnv.hold,15000+5000*(L-10)))
|
||||
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",L,int(L*.5-1.5),modeEnv.hold,4000*L))
|
||||
end
|
||||
end
|
||||
preField.h=20
|
||||
@@ -46,8 +43,8 @@ return{
|
||||
end
|
||||
P.garbageBeneath=preField.h
|
||||
end
|
||||
modeEnv.bg=customRange.bg[customSel[12]]
|
||||
modeEnv.bgm=customRange.bgm[customSel[13]]
|
||||
modeEnv.bg=customEnv.bg
|
||||
modeEnv.bgm=customEnv.bgm
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(55)
|
||||
|
||||
@@ -20,31 +20,26 @@ end
|
||||
return{
|
||||
color=color.white,
|
||||
env={
|
||||
puzzle=true,
|
||||
Fkey=function(P)P.modeData.event=1-P.modeData.event end,
|
||||
dropPiece=puzzleCheck,
|
||||
},
|
||||
load=function()
|
||||
for i=1,#customID do
|
||||
local k=customID[i]
|
||||
modeEnv[k]=customRange[k][customSel[i]]
|
||||
for k,v in next,customEnv do
|
||||
modeEnv[k]=v
|
||||
end
|
||||
modeEnv._20G=modeEnv.drop==0
|
||||
modeEnv.oncehold=customSel[6]==1
|
||||
if preBag[1]then
|
||||
modeEnv.bag=preBag
|
||||
else
|
||||
modeEnv.bag=nil
|
||||
end
|
||||
modeEnv.target=0
|
||||
PLY.newPlayer(1,340,15)
|
||||
local L=modeEnv.opponent
|
||||
if L~=0 then
|
||||
modeEnv.target=nil
|
||||
if L<10 then
|
||||
if L<6 then
|
||||
PLY.newAIPlayer(2,965,360,.5,AITemplate("9S",2*L))
|
||||
else
|
||||
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",L-6,2+int((L-11)*.5),modeEnv.hold,15000+5000*(L-10)))
|
||||
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",L,int(L*.5-1.5),modeEnv.hold,4000*L))
|
||||
end
|
||||
end
|
||||
preField.h=20
|
||||
@@ -57,15 +52,15 @@ return{
|
||||
preField.h=preField.h-1
|
||||
until preField.h==0
|
||||
::L::
|
||||
modeEnv.bg=customRange.bg[customSel[12]]
|
||||
modeEnv.bgm=customRange.bgm[customSel[13]]
|
||||
modeEnv.bg=customEnv.bg
|
||||
modeEnv.bgm=customEnv.bgm
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
local dx,dy=P.fieldOff.x,P.fieldOff.y
|
||||
setFont(55)
|
||||
mStr(P.stat.row,69,295)
|
||||
mText(drawableText.line,69,360)
|
||||
if P.gameEnv.puzzle and P.modeData.event==0 then
|
||||
if P.modeData.event==0 then
|
||||
local m=puzzleMark
|
||||
for y=1,preField.h do for x=1,10 do
|
||||
local T=preField[y][x]
|
||||
|
||||
@@ -91,7 +91,7 @@ return{
|
||||
P:getNext(res[P:RND(#res)])
|
||||
end
|
||||
end,
|
||||
target=100,dropPiece=PLY.reach_winCheck,
|
||||
target=100,dropPiece=PLY.check_lineReach,
|
||||
next=1,hold=false,
|
||||
ospin=false,
|
||||
freshLimit=15,
|
||||
|
||||
@@ -5,7 +5,7 @@ return{
|
||||
drop=20,lock=60,
|
||||
sequence="bag",
|
||||
bag={1,1,2,2,3,3,4,4,5,5,6,6},
|
||||
target=100,dropPiece=PLY.reach_winCheck,
|
||||
target=100,dropPiece=PLY.check_lineReach,
|
||||
next=3,
|
||||
ospin=false,
|
||||
freshLimit=15,
|
||||
|
||||
@@ -11,7 +11,7 @@ return{
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(45)
|
||||
mStr(P.stat.atk,69,260)
|
||||
mStr(format("%.1f",P.stat.atk),69,260)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),69,380)
|
||||
mText(drawableText.atk,69,313)
|
||||
mText(drawableText.eff,69,433)
|
||||
|
||||
@@ -6,7 +6,7 @@ local function check(P)
|
||||
P.gameEnv.drop=.25
|
||||
P.gameEnv.target=100
|
||||
elseif T==100 then
|
||||
P.gameEnv._20G=true
|
||||
P._20G=true
|
||||
P.gameEnv.target=200
|
||||
else
|
||||
P:win("finish")
|
||||
|
||||
@@ -43,7 +43,7 @@ return{
|
||||
env={
|
||||
noTele=true,
|
||||
das=6,arr=1,
|
||||
_20G=true,
|
||||
drop=0,
|
||||
lock=death_lock[1],
|
||||
wait=death_wait[1],
|
||||
fall=death_fall[1],
|
||||
|
||||
@@ -45,7 +45,7 @@ return{
|
||||
env={
|
||||
noTele=true,
|
||||
das=9,arr=3,
|
||||
_20G=true,
|
||||
drop=0,
|
||||
lock=rush_lock[1],
|
||||
wait=rush_wait[1],
|
||||
fall=rush_fall[1],
|
||||
|
||||
@@ -43,7 +43,7 @@ return{
|
||||
env={
|
||||
noTele=true,
|
||||
das=5,arr=1,
|
||||
_20G=true,lock=12,
|
||||
drop=0,lock=12,
|
||||
wait=10,fall=10,
|
||||
dropPiece=score,
|
||||
freshLimit=15,
|
||||
|
||||
@@ -4,7 +4,7 @@ return{
|
||||
env={
|
||||
drop=60,lock=120,
|
||||
fall=10,
|
||||
target=100,dropPiece=PLY.reach_winCheck,
|
||||
target=100,dropPiece=PLY.check_lineReach,
|
||||
freshLimit=15,
|
||||
ospin=false,
|
||||
bg="rgb",bgm="newera",
|
||||
|
||||
@@ -4,7 +4,7 @@ return{
|
||||
env={
|
||||
drop=20,lock=60,
|
||||
fall=20,
|
||||
target=100,dropPiece=PLY.reach_winCheck,
|
||||
target=100,dropPiece=PLY.check_lineReach,
|
||||
freshLimit=15,
|
||||
ospin=false,
|
||||
bg="rgb",bgm="newera",
|
||||
|
||||
@@ -4,7 +4,7 @@ return{
|
||||
env={
|
||||
oncehold=false,
|
||||
drop=300,lock=1e99,
|
||||
target=100,dropPiece=PLY.reach_winCheck,
|
||||
target=100,dropPiece=PLY.check_lineReach,
|
||||
ospin=false,
|
||||
bg="rgb",bgm="newera",
|
||||
},
|
||||
|
||||
36
modes/sprintMPH.lua
Normal file
36
modes/sprintMPH.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
return{
|
||||
color=color.green,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
next=0,hold=false,
|
||||
sequence="rnd",
|
||||
target=40,dropPiece=PLY.check_lineReach,
|
||||
bg="aura",bgm="race",
|
||||
},
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P)
|
||||
setFont(55)
|
||||
local r=40-P.stat.row
|
||||
if r<0 then r=0 end
|
||||
mStr(r,69,335)
|
||||
P:drawTargetLine(r)
|
||||
end,
|
||||
score=function(P)return{P.stat.time,P.stat.piece}end,
|
||||
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
|
||||
comp=function(a,b)return a[1]<b[1]or(a[1]==b[1] and a[2]<b[2])end,
|
||||
getRank=function(P)
|
||||
if P.stat.row<40 then return end
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<=60 and 5 or
|
||||
T<=70 and 4 or
|
||||
T<=90 and 3 or
|
||||
T<=110 and 2 or
|
||||
T<=140 and 1 or
|
||||
0
|
||||
end,
|
||||
}
|
||||
@@ -5,7 +5,7 @@ return{
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
sequence="bag",bag={8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25},
|
||||
target=40,dropPiece=PLY.reach_winCheck,
|
||||
target=40,dropPiece=PLY.check_lineReach,
|
||||
bg="aura",bgm="race",
|
||||
},
|
||||
load=function()
|
||||
|
||||
@@ -4,7 +4,7 @@ return{
|
||||
color=color.cyan,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
target=10,dropPiece=PLY.reach_winCheck,
|
||||
target=10,dropPiece=PLY.check_lineReach,
|
||||
bg="bg2",bgm="race",
|
||||
},
|
||||
load=function()
|
||||
|
||||
@@ -4,7 +4,7 @@ return{
|
||||
color=color.orange,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
target=100,dropPiece=PLY.reach_winCheck,
|
||||
target=100,dropPiece=PLY.check_lineReach,
|
||||
bg="bg2",bgm="race",
|
||||
},
|
||||
load=function()
|
||||
|
||||
@@ -4,7 +4,7 @@ return{
|
||||
color=color.lGrey,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
target=1000,dropPiece=PLY.reach_winCheck,
|
||||
target=1000,dropPiece=PLY.check_lineReach,
|
||||
bg="rainbow",bgm="push",
|
||||
},
|
||||
load=function()
|
||||
|
||||
@@ -4,7 +4,7 @@ return{
|
||||
color=color.lBlue,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
target=20,dropPiece=PLY.reach_winCheck,
|
||||
target=20,dropPiece=PLY.check_lineReach,
|
||||
bg="bg2",bgm="race",
|
||||
},
|
||||
load=function()
|
||||
|
||||
@@ -4,7 +4,7 @@ return{
|
||||
color=color.green,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
target=40,dropPiece=PLY.reach_winCheck,
|
||||
target=40,dropPiece=PLY.check_lineReach,
|
||||
bg="bg2",bgm="race",
|
||||
},
|
||||
load=function()
|
||||
|
||||
@@ -4,7 +4,7 @@ return{
|
||||
color=color.red,
|
||||
env={
|
||||
drop=60,lock=60,
|
||||
target=400,dropPiece=PLY.reach_winCheck,
|
||||
target=400,dropPiece=PLY.check_lineReach,
|
||||
bg="rainbow",bgm="push",
|
||||
},
|
||||
load=function()
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
local format=string.format
|
||||
local int=math.floor
|
||||
local function tech_check_hard(P)
|
||||
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
|
||||
P:lose()
|
||||
if #P.clearedRow>0 then
|
||||
if not(P.lastClear.spin or P.lastClear.pc)then
|
||||
P:lose()
|
||||
end
|
||||
end
|
||||
if P.stat.row>=200 then
|
||||
if P.stat.atk>=200 then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
@@ -14,7 +17,6 @@ return{
|
||||
arr=0,
|
||||
drop=1e99,lock=60,
|
||||
freshLimit=15,
|
||||
target=200,
|
||||
fineKill=true,
|
||||
dropPiece=tech_check_hard,
|
||||
bg="flink",bgm="infinite",
|
||||
@@ -25,22 +27,28 @@ return{
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(45)
|
||||
mStr(P.stat.atk,69,260)
|
||||
mStr(format("%.1f",P.stat.atk),69,260)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),69,380)
|
||||
mText(drawableText.atk,69,313)
|
||||
mText(drawableText.eff,69,433)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Attack "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
return
|
||||
L>=200 and 5 or
|
||||
L>=150 and 4 or
|
||||
L>=100 and 3 or
|
||||
L>=70 and 2 or
|
||||
L>=40 and 1 or
|
||||
L>=10 and 0
|
||||
local L=P.stat.atk
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<120 and 5 or
|
||||
T<150 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=150 and 3 or
|
||||
L>=100 and 2 or
|
||||
L>=60 and 1 or
|
||||
L>=20 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
local format=string.format
|
||||
|
||||
local int=math.floor
|
||||
return{
|
||||
color=color.lYellow,
|
||||
env={
|
||||
@@ -7,7 +7,7 @@ return{
|
||||
drop=1e99,lock=60,
|
||||
freshLimit=15,
|
||||
target=200,
|
||||
dropPiece=PLY.reach_winCheck,
|
||||
dropPiece=PLY.check_attackReach,
|
||||
fineKill=true,
|
||||
bg="flink",bgm="infinite",
|
||||
},
|
||||
@@ -17,22 +17,28 @@ return{
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(45)
|
||||
mStr(P.stat.atk,69,260)
|
||||
mStr(format("%.1f",P.stat.atk),69,260)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),69,380)
|
||||
mText(drawableText.atk,69,313)
|
||||
mText(drawableText.eff,69,433)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
return
|
||||
L>=200 and 5 or
|
||||
L>=150 and 4 or
|
||||
L>=100 and 3 or
|
||||
L>=70 and 2 or
|
||||
L>=40 and 1 or
|
||||
L>=10 and 0
|
||||
local L=P.stat.atk
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<120 and 5 or
|
||||
T<150 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=150 and 3 or
|
||||
L>=100 and 2 or
|
||||
L>=60 and 1 or
|
||||
L>=20 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
local format=string.format
|
||||
local int=math.floor
|
||||
local function tech_check_hard(P)
|
||||
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
|
||||
P:lose()
|
||||
if #P.clearedRow>0 then
|
||||
if not(P.lastClear.spin or P.lastClear.pc)then
|
||||
P:lose()
|
||||
end
|
||||
end
|
||||
if P.stat.row>=200 then
|
||||
if P.stat.atk>=200 then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
@@ -13,7 +16,6 @@ return{
|
||||
env={
|
||||
drop=30,lock=60,
|
||||
freshLimit=15,
|
||||
target=200,
|
||||
dropPiece=tech_check_hard,
|
||||
bg="matrix",bgm="push",
|
||||
},
|
||||
@@ -22,22 +24,28 @@ return{
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(45)
|
||||
mStr(P.stat.atk,69,260)
|
||||
mStr(format("%.1f",P.stat.atk),69,260)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),69,380)
|
||||
mText(drawableText.atk,69,313)
|
||||
mText(drawableText.eff,69,433)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Attack "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
return
|
||||
L>=200 and 5 or
|
||||
L>=126 and 4 or
|
||||
L>=90 and 3 or
|
||||
L>=60 and 2 or
|
||||
L>=30 and 1 or
|
||||
L>=5 and 0
|
||||
local L=P.stat.atk
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<130 and 5 or
|
||||
T<160 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=150 and 3 or
|
||||
L>=100 and 2 or
|
||||
L>=60 and 1 or
|
||||
L>=20 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
local format=string.format
|
||||
local int=math.floor
|
||||
local function tech_check_easy(P)
|
||||
if #P.clearedRow>0 and P.b2b<40 then
|
||||
P:lose()
|
||||
end
|
||||
if P.stat.row>=200 then
|
||||
if P.stat.atk>=200 then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
@@ -13,7 +14,6 @@ return{
|
||||
env={
|
||||
drop=20,lock=60,
|
||||
freshLimit=15,
|
||||
target=200,
|
||||
dropPiece=tech_check_easy,
|
||||
bg="matrix",bgm="push",
|
||||
},
|
||||
@@ -22,22 +22,28 @@ return{
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(45)
|
||||
mStr(P.stat.atk,69,260)
|
||||
mStr(format("%.1f",P.stat.atk),69,260)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),69,380)
|
||||
mText(drawableText.atk,69,313)
|
||||
mText(drawableText.eff,69,433)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Attack "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
return
|
||||
L>=200 and 5 or
|
||||
L>=126 and 4 or
|
||||
L>=90 and 3 or
|
||||
L>=60 and 2 or
|
||||
L>=30 and 1 or
|
||||
L>=5 and 0
|
||||
local L=P.stat.atk
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<120 and 5 or
|
||||
T<150 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=150 and 3 or
|
||||
L>=100 and 2 or
|
||||
L>=60 and 1 or
|
||||
L>=20 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
local format=string.format
|
||||
local int=math.floor
|
||||
local function tech_check_hard(P)
|
||||
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
|
||||
P:lose()
|
||||
if #P.clearedRow>0 then
|
||||
if not(P.lastClear.spin or P.lastClear.pc)then
|
||||
P:lose()
|
||||
end
|
||||
end
|
||||
if P.stat.row>=200 then
|
||||
if P.stat.atk>=200 then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
@@ -11,9 +14,8 @@ end
|
||||
return{
|
||||
color=color.dRed,
|
||||
env={
|
||||
_20G=true,lock=60,
|
||||
drop=0,lock=60,
|
||||
freshLimit=15,
|
||||
target=200,
|
||||
dropPiece=tech_check_hard,
|
||||
bg="matrix",bgm="down",
|
||||
},
|
||||
@@ -22,22 +24,28 @@ return{
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(45)
|
||||
mStr(P.stat.atk,69,260)
|
||||
mStr(format("%.1f",P.stat.atk),69,260)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),69,380)
|
||||
mText(drawableText.atk,69,313)
|
||||
mText(drawableText.eff,69,433)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Attack "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
return
|
||||
L>=200 and 5 or
|
||||
L>=140 and 4 or
|
||||
L>=90 and 3 or
|
||||
L>=60 and 2 or
|
||||
L>=30 and 1 or
|
||||
L>=5 and 0
|
||||
local L=P.stat.atk
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<140 and 5 or
|
||||
T<180 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=150 and 3 or
|
||||
L>=100 and 2 or
|
||||
L>=60 and 1 or
|
||||
L>=20 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
local format=string.format
|
||||
local int=math.floor
|
||||
local function tech_check_easy(P)
|
||||
if #P.clearedRow>0 and P.b2b<40 then
|
||||
P:lose()
|
||||
end
|
||||
if P.stat.row>=200 then
|
||||
if P.stat.atk>=200 then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
@@ -11,9 +12,8 @@ end
|
||||
return{
|
||||
color=color.red,
|
||||
env={
|
||||
_20G=true,lock=60,
|
||||
drop=0,lock=60,
|
||||
freshLimit=15,
|
||||
target=200,
|
||||
dropPiece=tech_check_easy,
|
||||
bg="matrix",bgm="down",
|
||||
},
|
||||
@@ -22,22 +22,28 @@ return{
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(45)
|
||||
mStr(P.stat.atk,69,260)
|
||||
mStr(format("%.1f",P.stat.atk),69,260)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),69,380)
|
||||
mText(drawableText.atk,69,313)
|
||||
mText(drawableText.eff,69,433)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Attack "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
return
|
||||
L>=200 and 5 or
|
||||
L>=140 and 4 or
|
||||
L>=90 and 3 or
|
||||
L>=60 and 2 or
|
||||
L>=30 and 1 or
|
||||
L>=5 and 0
|
||||
local L=P.stat.atk
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<130 and 5 or
|
||||
T<160 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=150 and 3 or
|
||||
L>=100 and 2 or
|
||||
L>=60 and 1 or
|
||||
L>=20 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
local format=string.format
|
||||
local int=math.floor
|
||||
local function tech_check_hard(P)
|
||||
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
|
||||
P:lose()
|
||||
if #P.clearedRow>0 then
|
||||
if not(P.lastClear.spin or P.lastClear.pc)then
|
||||
P:lose()
|
||||
end
|
||||
end
|
||||
if P.stat.row>=200 then
|
||||
if P.stat.atk>=200 then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
@@ -13,7 +16,6 @@ return{
|
||||
env={
|
||||
oncehold=false,
|
||||
drop=1e99,lock=1e99,
|
||||
target=200,
|
||||
dropPiece=tech_check_hard,
|
||||
bg="matrix",bgm="newera",
|
||||
},
|
||||
@@ -22,22 +24,28 @@ return{
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(45)
|
||||
mStr(P.stat.atk,69,260)
|
||||
mStr(format("%.1f",P.stat.atk),69,260)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),69,380)
|
||||
mText(drawableText.atk,69,313)
|
||||
mText(drawableText.eff,69,433)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Attack "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
return
|
||||
L>=200 and 5 or
|
||||
L>=126 and 4 or
|
||||
L>=80 and 3 or
|
||||
L>=50 and 2 or
|
||||
L>=20 and 1 or
|
||||
L>=5 and 0
|
||||
local L=P.stat.atk
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<130 and 5 or
|
||||
T<160 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=150 and 3 or
|
||||
L>=100 and 2 or
|
||||
L>=60 and 1 or
|
||||
L>=20 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
local format=string.format
|
||||
local int=math.floor
|
||||
local function tech_check_easy(P)
|
||||
if #P.clearedRow>0 and P.b2b<40 then
|
||||
P:lose()
|
||||
end
|
||||
if P.stat.row>=200 then
|
||||
if P.stat.atk>=200 then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
@@ -13,7 +14,6 @@ return{
|
||||
env={
|
||||
oncehold=false,
|
||||
drop=1e99,lock=1e99,
|
||||
target=200,
|
||||
dropPiece=tech_check_easy,
|
||||
bg="matrix",bgm="newera",
|
||||
},
|
||||
@@ -22,22 +22,28 @@ return{
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(45)
|
||||
mStr(P.stat.atk,69,260)
|
||||
mStr(format("%.1f",P.stat.atk),69,260)
|
||||
mStr(format("%.2f",P.stat.atk/P.stat.row),69,380)
|
||||
mText(drawableText.atk,69,313)
|
||||
mText(drawableText.eff,69,433)
|
||||
end,
|
||||
score=function(P)return{P.stat.row<=200 and P.stat.row or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
|
||||
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].." Attack "..toTime(D[2])end,
|
||||
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
|
||||
getRank=function(P)
|
||||
local L=P.stat.row
|
||||
return
|
||||
L>=200 and 5 or
|
||||
L>=126 and 4 or
|
||||
L>=80 and 3 or
|
||||
L>=50 and 2 or
|
||||
L>=20 and 1 or
|
||||
L>=5 and 0
|
||||
local L=P.stat.atk
|
||||
if L>=200 then
|
||||
local T=P.stat.time
|
||||
return
|
||||
T<120 and 5 or
|
||||
T<150 and 4 or
|
||||
3
|
||||
else
|
||||
return
|
||||
L>=150 and 3 or
|
||||
L>=100 and 2 or
|
||||
L>=60 and 1 or
|
||||
L>=20 and 0
|
||||
end
|
||||
end,
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
local function check_tsd(P)
|
||||
if #P.clearedRow>0 then
|
||||
if P.lastClear~=52 then
|
||||
if P.lastClear.id~=5 or P.lastClear.row~=2 then
|
||||
P:lose()
|
||||
elseif #P.clearedRow>0 then
|
||||
else
|
||||
P.modeData.event=P.modeData.event+1
|
||||
if P.modeData.event==20 then
|
||||
P:win("finish")
|
||||
@@ -24,9 +24,9 @@ return{
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(75)
|
||||
mStr(P.modeData.event,69,400)
|
||||
mText(drawableText.tsd,69,477)
|
||||
setFont(65)
|
||||
mStr(P.modeData.event,69,320)
|
||||
mText(drawableText.tsd,69,385)
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].."TSD "..toTime(D[2])end,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
local function check_tsd(P)
|
||||
if #P.clearedRow>0 then
|
||||
if P.lastClear~=52 then
|
||||
if P.lastClear.id~=5 or P.lastClear.row~=2 then
|
||||
P:lose()
|
||||
elseif #P.clearedRow>0 then
|
||||
else
|
||||
P.modeData.event=P.modeData.event+1
|
||||
end
|
||||
end
|
||||
@@ -22,9 +22,9 @@ return{
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(75)
|
||||
mStr(P.modeData.event,69,400)
|
||||
mText(drawableText.tsd,69,477)
|
||||
setFont(65)
|
||||
mStr(P.modeData.event,69,320)
|
||||
mText(drawableText.tsd,69,385)
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].."TSD "..toTime(D[2])end,
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
local function check_tsd(P)
|
||||
if #P.clearedRow>0 then
|
||||
if P.lastClear~=52 then
|
||||
local C=P.lastClear
|
||||
if P.lastClear.id~=5 or P.lastClear.row~=2 then
|
||||
P:lose()
|
||||
elseif #P.clearedRow>0 then
|
||||
else
|
||||
P.modeData.event=P.modeData.event+1
|
||||
end
|
||||
end
|
||||
@@ -22,9 +23,9 @@ return{
|
||||
PLY.newPlayer(1,340,15)
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
setFont(75)
|
||||
mStr(P.modeData.event,69,400)
|
||||
mText(drawableText.tsd,69,477)
|
||||
setFont(65)
|
||||
mStr(P.modeData.event,69,320)
|
||||
mText(drawableText.tsd,69,385)
|
||||
end,
|
||||
score=function(P)return{P.modeData.event,P.stat.time}end,
|
||||
scoreDisp=function(D)return D[1].."TSD "..toTime(D[2])end,
|
||||
|
||||
@@ -2,8 +2,8 @@ return{
|
||||
color=color.lGrey,
|
||||
env={
|
||||
drop=120,lock=120,
|
||||
oncehold=false,target=200,
|
||||
dropPiece=PLY.reach_winCheck,
|
||||
oncehold=false,
|
||||
target=200,dropPiece=PLY.check_lineReach,
|
||||
bg="bg2",bgm="infinite",
|
||||
},
|
||||
load=function()
|
||||
|
||||
15
parts/ai.lua
15
parts/ai.lua
@@ -91,12 +91,17 @@ do
|
||||
while i<400 do
|
||||
F[i],i=false,i+1
|
||||
end
|
||||
CC.update(P.AI_bot,F,P.b2b>=100,P.combo)
|
||||
if not pcall(CC.update,P.AI_bot,F,P.b2b>=100,P.combo)then
|
||||
LOG.print("CC is dead ("..P.id..")","error")
|
||||
end
|
||||
end
|
||||
function CC_switch20G(P)
|
||||
if not pcall(CC.destroy,P.AI_bot)then
|
||||
LOG.print("CC is dead ("..P.id..")","error")
|
||||
return
|
||||
end
|
||||
P.AIdata._20G=true
|
||||
P.AI_keys={}
|
||||
CC.destroy(P.AI_bot)
|
||||
local opt,wei=CC.getConf()
|
||||
CC.setHold(opt,P.AIdata.hold)
|
||||
CC.set20G(opt,P.AIdata._20G)
|
||||
@@ -321,8 +326,12 @@ return{
|
||||
end,
|
||||
},
|
||||
["CC"]={
|
||||
[0]=NULL,
|
||||
function(P)--Start thinking
|
||||
CC.think(P.AI_bot)
|
||||
if not pcall(CC.think,P.AI_bot)then
|
||||
LOG.print("CC is dead ("..P.id..")","error")
|
||||
return 0
|
||||
end
|
||||
return 2
|
||||
end,
|
||||
function(P,ctrl)--Poll keys
|
||||
|
||||
@@ -17,7 +17,7 @@ setting={
|
||||
face={},
|
||||
|
||||
--Graphic
|
||||
ghost=.3,center=1,
|
||||
block=1,ghost=.3,center=1,
|
||||
smooth=true,grid=false,
|
||||
bagLine=false,
|
||||
lockFX=2,
|
||||
|
||||
@@ -209,13 +209,14 @@ function freshMostBadge()
|
||||
game.mostBadge,game.secBadge=nil
|
||||
local m,m2=0,0
|
||||
for i=1,#players.alive do
|
||||
local h=players.alive[i].badge
|
||||
if h>=m then
|
||||
game.mostBadge,game.secBadge=players.alive[i],game.mostBadge
|
||||
m,m2=h,m
|
||||
elseif h>=m2 then
|
||||
game.secBadge=players.alive[i]
|
||||
m2=h
|
||||
local P=players.alive[i]
|
||||
local b=P.badge
|
||||
if b>=m then
|
||||
game.mostBadge,game.secBadge=P,game.mostBadge
|
||||
m,m2=b,m
|
||||
elseif b>=m2 then
|
||||
game.secBadge=P
|
||||
m2=b
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -251,7 +252,7 @@ function royaleLevelup()
|
||||
P.gameEnv.drop=int(P.gameEnv.drop*.3)
|
||||
if P.gameEnv.drop==0 then
|
||||
P.curY=P.imgY
|
||||
P.gameEnv._20G=true
|
||||
P._20G=true
|
||||
if P.AI_mode=="CC"then CC_switch20G(P)end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -163,35 +163,10 @@ for i=1,8 do
|
||||
end
|
||||
end
|
||||
|
||||
customID={
|
||||
"drop","lock",
|
||||
"wait","fall",
|
||||
"next","hold",
|
||||
"sequence","visible",
|
||||
"target",
|
||||
"freshLimit",
|
||||
"opponent",
|
||||
"bg","bgm",
|
||||
}
|
||||
customRange={
|
||||
drop={1e99,180,60,40,30,25,20,18,16,14,12,10,9,8,7,6,5,4,3,2,1,.5,.25,.125,0},
|
||||
lock={0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,25,30,40,60,180,1e99},
|
||||
wait={0,1,2,3,4,5,6,7,8,10,15,20,30,60},
|
||||
fall={0,1,2,3,4,5,6,7,8,10,15,20,30,60},
|
||||
next={0,1,2,3,4,5,6},
|
||||
hold={true,false,true},
|
||||
sequence={"bag","his4","rnd","loop","fixed"},
|
||||
visible={"show","time","fast","none"},
|
||||
target={10,20,40,100,200,500,1000,1e99},
|
||||
freshLimit={0,8,15,1e99},
|
||||
opponent={0,1,2,3,4,5,11,12,13,14,15,16},
|
||||
bg={"none","bg1","bg2","rainbow","aura","rgb","glow","matrix"},
|
||||
bgm={"blank","way","race","newera","push","reason","infinite","secret7th","secret8th","rockblock"},
|
||||
}
|
||||
local function T(s,t)return love.graphics.newText(setFont(s),t)end
|
||||
drawableText={
|
||||
question=T(100,"?"),
|
||||
right=T(45,"→"),
|
||||
question=T(100,"?"),right=T(45,"→"),
|
||||
small=T(30,"<"),large=T(30,">"),
|
||||
bpm=T(15,"BPM"),kpm=T(15,"KPM"),
|
||||
|
||||
speedLV=T(20,"speed level"),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return{
|
||||
{name="sprint_10", x=0, y=0, size=35,shape=1,icon="sprint", unlock={"sprint_20","sprint_40"}},
|
||||
{name="sprint_20", x=-300, y=0, size=45,shape=1,icon="sprint", unlock={}},
|
||||
{name="sprint_40", x=0, y=-400, size=55,shape=1,icon="sprint", unlock={"sprint_100","marathon_normal","custom_clear","custom_puzzle","sprintPenta"}},
|
||||
{name="sprint_40", x=0, y=-400, size=55,shape=1,icon="sprint", unlock={"sprint_100","marathon_normal","custom_clear","custom_puzzle","sprintPenta","sprintMPH"}},
|
||||
{name="sprint_100", x=-200, y=-400, size=45,shape=1,icon="sprint", unlock={"sprint_400","drought_normal"}},
|
||||
{name="sprint_400", x=-400, y=-400, size=35,shape=1,icon="sprint", unlock={"sprint_1000"}},
|
||||
{name="sprint_1000", x=-600, y=-400, size=35,shape=1,icon="sprint", unlock={}},
|
||||
@@ -82,5 +82,6 @@ return{
|
||||
{name="infinite_dig", x=-1000, y=-600, size=35,shape=1,icon="infinite_dig",unlock={}},
|
||||
{name="custom_clear", x=200, y=-350, size=45,shape=3,icon="custom", unlock={}},
|
||||
{name="custom_puzzle", x=200, y=-200, size=45,shape=3,icon="puzzle", unlock={}},
|
||||
{name="sprintPenta", x=-200, y=-200, size=50,shape=2,icon="sprint", unlock={}},
|
||||
{name="sprintPenta", x=-200, y=-130, size=40,shape=2,icon="sprint", unlock={}},
|
||||
{name="sprintMPH", x=-200, y=-270, size=40,shape=2,icon="sprint", unlock={}},
|
||||
}
|
||||
517
parts/player.lua
517
parts/player.lua
@@ -10,9 +10,7 @@ local setFont=setFont
|
||||
|
||||
--------------------------<Data>--------------------------
|
||||
local gameEnv0={
|
||||
noTele=false,
|
||||
das=10,arr=2,
|
||||
sddas=2,sdarr=2,
|
||||
das=10,arr=2,sddas=2,sdarr=2,
|
||||
ihs=true,irs=true,ims=true,
|
||||
swap=true,
|
||||
|
||||
@@ -36,15 +34,16 @@ local gameEnv0={
|
||||
hold=true,oncehold=true,
|
||||
ospin=true,
|
||||
sequence="bag",bag={1,2,3,4,5,6,7},
|
||||
freshMethod=NULL,
|
||||
face=NULL,skin=NULL,
|
||||
|
||||
life=0,
|
||||
pushSpeed=3,
|
||||
block=true,
|
||||
noTele=false,
|
||||
visible="show",
|
||||
Fkey=NULL,puzzle=false,
|
||||
freshLimit=1e99,easyFresh=true,
|
||||
|
||||
Fkey=NULL,
|
||||
fine=false,fineKill=false,
|
||||
target=1e99,dropPiece=NULL,
|
||||
mindas=0,minarr=0,minsdarr=0,
|
||||
@@ -496,8 +495,66 @@ local frameColor={
|
||||
color.lPurple,
|
||||
color.lOrange,
|
||||
}
|
||||
local function drawPixel(y,x,id)
|
||||
gc.draw(blockSkin[id],30*x-30,600-30*y)
|
||||
local function drawCell(y,x,id)
|
||||
gc.draw(blockSkin[id],30*x-30,-30*y)
|
||||
end
|
||||
local function drawGrid(P)
|
||||
local FBN,FUP=P.fieldBeneath,P.fieldUp
|
||||
gc.setLineWidth(1)
|
||||
gc.setColor(1,1,1,.2)
|
||||
for x=1,9 do
|
||||
gc.line(30*x,-10,30*x,600)
|
||||
end
|
||||
for y=0,19 do
|
||||
y=30*(y-int((FBN+FUP)/30))+FBN+FUP
|
||||
gc.line(0,y,300,y)
|
||||
end
|
||||
end
|
||||
local function drawField(P)
|
||||
local V,F=P.visTime,P.field
|
||||
local start=int((P.fieldBeneath+P.fieldUp)/30+1)
|
||||
local rep=game.replaying
|
||||
if P.falling==-1 then--Blocks only
|
||||
for j=start,min(start+20,#F)do
|
||||
for i=1,10 do
|
||||
if F[j][i]>0 then
|
||||
if V[j][i]>0 then
|
||||
gc.setColor(1,1,1,min(V[j][i]*.05,1))
|
||||
drawCell(j,i,F[j][i])
|
||||
elseif rep then
|
||||
gc.setColor(1,1,1,.3+.08*sin(.5*(j-i)+Timer()*4))
|
||||
gc.rectangle("fill",30*i-30,-30*j,30,30)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
else--With falling animation
|
||||
local ENV=P.gameEnv
|
||||
local dy,stepY=0,ENV.smooth and(P.falling/(ENV.fall+1))^2.5*30 or 30
|
||||
local A=P.falling/ENV.fall
|
||||
local h=1
|
||||
for j=start,min(start+20,#F)do
|
||||
while j==P.clearingRow[h]do
|
||||
h=h+1
|
||||
dy=dy+stepY
|
||||
gc.translate(0,-stepY)
|
||||
gc.setColor(1,1,1,A)
|
||||
gc.rectangle("fill",0,30-30*j,300,stepY)
|
||||
end
|
||||
for i=1,10 do
|
||||
if F[j][i]>0 then
|
||||
if V[j][i]>0 then
|
||||
gc.setColor(1,1,1,min(V[j][i]*.05,1))
|
||||
drawCell(j,i,F[j][i])
|
||||
elseif rep then
|
||||
gc.setColor(1,1,1,.2)
|
||||
gc.rectangle("fill",30*i-30,-30*j,30,30)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
gc.translate(0,dy)
|
||||
end
|
||||
end
|
||||
local function drawFXs(P)
|
||||
--LockFX
|
||||
@@ -517,14 +574,14 @@ local function drawFXs(P)
|
||||
local S=P.dropFX[i]
|
||||
gc.setColor(1,1,1,.6-S[5]*.6)
|
||||
local w=30*S[3]*(1-S[5]*.5)
|
||||
gc.rectangle("fill",30*S[1]-30+15*S[3]-w*.5,600-30*S[2],w,30*S[4])
|
||||
gc.rectangle("fill",30*S[1]-30+15*S[3]-w*.5,-30*S[2],w,30*S[4])
|
||||
end
|
||||
|
||||
--MoveFX
|
||||
for i=1,#P.moveFX do
|
||||
local S=P.moveFX[i]
|
||||
gc.setColor(1,1,1,.6-S[4]*.6)
|
||||
drawPixel(S[3],S[2],S[1])
|
||||
drawCell(S[3],S[2],S[1])
|
||||
end
|
||||
|
||||
--ClearFX
|
||||
@@ -534,9 +591,59 @@ local function drawFXs(P)
|
||||
local x=t<.3 and 1-(3.3333*t-1)^2 or 1
|
||||
local y=t<.2 and 5*t or 1-1.25*(t-.2)
|
||||
gc.setColor(1,1,1,y)
|
||||
gc.rectangle("fill",150-x*150,615-S[1]*30-y*15,300*x,y*30)
|
||||
gc.rectangle("fill",150-x*150,15-S[1]*30-y*15,300*x,y*30)
|
||||
end
|
||||
end
|
||||
local function drawGhost(P,clr)
|
||||
gc.setColor(1,1,1,P.gameEnv.ghost)
|
||||
for i=1,P.r do for j=1,P.c do
|
||||
if P.cur.bk[i][j]then
|
||||
drawCell(i+P.imgY-1,j+P.curX-1,clr)
|
||||
end
|
||||
end end
|
||||
end
|
||||
local function drawBlockOutline(P,clr,trans)
|
||||
SHADER.alpha:send("a",trans)
|
||||
gc.setShader(SHADER.alpha)
|
||||
local _=blockSkin[clr]
|
||||
for i=1,P.r do for j=1,P.c do
|
||||
if P.cur.bk[i][j]then
|
||||
local x=30*(j+P.curX)-60-3
|
||||
local y=30-30*(i+P.curY)-3
|
||||
gc.draw(_,x,y)gc.draw(_,x+6,y+6)
|
||||
gc.draw(_,x+6,y)gc.draw(_,x,y+6)
|
||||
end
|
||||
end end
|
||||
gc.setShader()
|
||||
end
|
||||
local function drawBlock(P,clr)
|
||||
gc.setColor(1,1,1)
|
||||
for i=1,P.r do for j=1,P.c do
|
||||
if P.cur.bk[i][j]then
|
||||
drawCell(i+P.curY-1,j+P.curX-1,clr)
|
||||
end
|
||||
end end
|
||||
end
|
||||
local function drawNextPreview(P,B)
|
||||
gc.setColor(1,1,1,.8)
|
||||
local x=int(6-#B[1]*.5)
|
||||
local y=21+ceil(P.fieldBeneath/30)
|
||||
for i=1,#B do for j=1,#B[1]do
|
||||
if B[i][j]then
|
||||
gc.draw(puzzleMark[-1],30*(x+j-2),30*(1-y-i))
|
||||
end
|
||||
end end
|
||||
end
|
||||
local function drawHold(P,clr)
|
||||
if P.holded then gc.setColor(.6,.4,.4)end
|
||||
local B=P.hd.bk
|
||||
for i=1,#B do for j=1,#B[1]do
|
||||
if B[i][j]then
|
||||
drawCell(i+1.36-#B*.5,j+2.06-#B[1]*.5,clr)
|
||||
end
|
||||
end end
|
||||
end
|
||||
|
||||
local Pdraw_norm
|
||||
do--function Pdraw_norm(P)
|
||||
local attackColor={
|
||||
@@ -578,76 +685,28 @@ do--function Pdraw_norm(P)
|
||||
gc.translate(P.fieldOff.x,P.fieldOff.y)
|
||||
|
||||
--Fill field
|
||||
gc.setColor(0,0,0,.6)gc.rectangle("fill",0,-10,300,610)
|
||||
gc.setColor(0,0,0,.6)
|
||||
gc.rectangle("fill",0,-10,300,610)
|
||||
|
||||
--Grid
|
||||
if ENV.grid then
|
||||
gc.setLineWidth(1)
|
||||
gc.setColor(1,1,1,.2)
|
||||
for x=1,9 do gc.line(30*x,-10,30*x,600)end
|
||||
for y=0,19 do
|
||||
y=30*(y-int((FBN+FUP)/30))+FBN+FUP
|
||||
gc.line(0,y,300,y)
|
||||
end
|
||||
end
|
||||
--Draw grid
|
||||
if ENV.grid then drawGrid(P)end
|
||||
|
||||
--In-field things
|
||||
gc.push("transform")
|
||||
gc.translate(0,FBN+FUP)
|
||||
gc.translate(0,600+FBN+FUP)
|
||||
gc.setScissor(scr.x+(P.absFieldX+P.fieldOff.x)*scr.k,scr.y+(P.absFieldY+P.fieldOff.y)*scr.k,300*P.size*scr.k,610*P.size*scr.k)
|
||||
|
||||
--Draw dangerous area
|
||||
gc.setColor(1,0,0,.2)
|
||||
gc.rectangle("fill",0,0,300,-FUP-FBN-10)
|
||||
gc.setColor(1,0,0,.3)
|
||||
gc.rectangle("fill",0,-600,300,-610-FUP-FBN)
|
||||
|
||||
--Draw field
|
||||
local V=P.visTime
|
||||
local F=P.field
|
||||
if P.falling==-1 then--Blocks only
|
||||
for j=int(FBN/30+1),#F do
|
||||
for i=1,10 do
|
||||
if F[j][i]>0 then
|
||||
if V[j][i]>0 then
|
||||
gc.setColor(1,1,1,min(V[j][i]*.05,1))
|
||||
drawPixel(j,i,F[j][i])
|
||||
elseif game.replaying then
|
||||
gc.setColor(1,1,1,.3+.08*sin(.5*(j-i)+Timer()*4))
|
||||
gc.rectangle("fill",30*i-30,600-30*j,30,30)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
else--With falling animation
|
||||
local dy,stepY=0,ENV.smooth and(P.falling/(ENV.fall+1))^2.5*30 or 30
|
||||
local A=P.falling/ENV.fall
|
||||
local h,H=1,#F
|
||||
for j=int(FBN/30+1),H do
|
||||
while j==P.clearingRow[h]do
|
||||
h=h+1
|
||||
dy=dy+stepY
|
||||
gc.translate(0,-stepY)
|
||||
gc.setColor(1,1,1,A)
|
||||
gc.rectangle("fill",0,630-30*j,300,stepY)
|
||||
end
|
||||
for i=1,10 do
|
||||
if F[j][i]>0 then
|
||||
if V[j][i]>0 then
|
||||
gc.setColor(1,1,1,min(V[j][i]*.05,1))
|
||||
drawPixel(j,i,F[j][i])
|
||||
elseif game.replaying then
|
||||
gc.setColor(1,1,1,.2)
|
||||
gc.rectangle("fill",30*i-30,600-30*j,30,30)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
gc.translate(0,dy)
|
||||
end
|
||||
drawField(P)
|
||||
|
||||
--Draw spawn line
|
||||
gc.setColor(1,sin(Timer())*.4+.5,0,.5)
|
||||
gc.setLineWidth(4)
|
||||
gc.line(0,0-FBN,300,0-FBN)
|
||||
gc.line(0,-600-FBN,300,-600-FBN)
|
||||
|
||||
--Draw FXs
|
||||
drawFXs(P)
|
||||
@@ -656,69 +715,35 @@ do--function Pdraw_norm(P)
|
||||
if P.cur and P.waiting==-1 then
|
||||
local curColor=P.cur.color
|
||||
|
||||
--Ghost
|
||||
if ENV.ghost then
|
||||
gc.setColor(1,1,1,ENV.ghost)
|
||||
for i=1,P.r do for j=1,P.c do
|
||||
if P.cur.bk[i][j]then
|
||||
drawPixel(i+P.imgY-1,j+P.curX-1,curColor)
|
||||
end
|
||||
end end
|
||||
end
|
||||
--Draw ghost
|
||||
if ENV.ghost then drawGhost(P,curColor)end
|
||||
|
||||
local dy=ENV.smooth and P.imgY~=P.curY and(P.dropDelay/ENV.drop-1)*30 or 0
|
||||
gc.translate(0,-dy)
|
||||
local trans=P.lockDelay/ENV.lock
|
||||
if ENV.block then
|
||||
--White Boarder(indicate lockdelay)
|
||||
SHADER.alpha:send("a",trans)
|
||||
gc.setShader(SHADER.alpha)
|
||||
_=blockSkin[curColor]
|
||||
for i=1,P.r do for j=1,P.c do
|
||||
if P.cur.bk[i][j]then
|
||||
local x=30*(j+P.curX)-60-3
|
||||
local y=630-30*(i+P.curY)-3
|
||||
gc.draw(_,x,y)gc.draw(_,x+6,y+6)
|
||||
gc.draw(_,x+6,y)gc.draw(_,x,y+6)
|
||||
end
|
||||
end end
|
||||
gc.setShader()
|
||||
|
||||
--Block
|
||||
gc.setColor(1,1,1)
|
||||
for i=1,P.r do for j=1,P.c do
|
||||
if P.cur.bk[i][j]then
|
||||
drawPixel(i+P.curY-1,j+P.curX-1,curColor)
|
||||
end
|
||||
end end
|
||||
--Draw block
|
||||
if ENV.block then
|
||||
drawBlockOutline(P,curColor,trans)
|
||||
drawBlock(P,curColor)
|
||||
end
|
||||
|
||||
--Rotate center
|
||||
--Draw rotate center
|
||||
local x=30*(P.curX+P.sc[2])-15
|
||||
if ENV.center then
|
||||
gc.setColor(1,1,1,trans*ENV.center)
|
||||
gc.draw(IMG.spinCenter,x,600-30*(P.curY+P.sc[1])+15,nil,nil,nil,4,4)
|
||||
if ENV.center and ENV.block then
|
||||
gc.setColor(1,1,1,ENV.block*ENV.center)
|
||||
gc.draw(IMG.spinCenter,x,-30*(P.curY+P.sc[1])+15,nil,nil,nil,4,4)
|
||||
end
|
||||
gc.translate(0,dy)
|
||||
if ENV.center and ENV.ghost then
|
||||
gc.setColor(1,1,1,trans*ENV.center)
|
||||
gc.draw(IMG.spinCenter,x,600-30*(P.imgY+P.sc[1])+15,nil,nil,nil,4,4)
|
||||
gc.draw(IMG.spinCenter,x,-30*(P.imgY+P.sc[1])+15,nil,nil,nil,4,4)
|
||||
end
|
||||
end
|
||||
|
||||
--Draw next preview
|
||||
if ENV.nextPos and P.next[1]then
|
||||
gc.setColor(1,1,1,.8)
|
||||
local B=P.next[1].bk
|
||||
local x=int(6-#B[1]*.5)
|
||||
local y=21+ceil(P.fieldBeneath/30)
|
||||
for i=1,#B do
|
||||
for j=1,#B[1]do
|
||||
if B[i][j]then
|
||||
gc.draw(puzzleMark[-1],30*(x+j-2),30*(21-y-i))
|
||||
end
|
||||
end
|
||||
end
|
||||
drawNextPreview(P,P.next[1].bk)
|
||||
end
|
||||
|
||||
gc.setScissor()
|
||||
@@ -727,24 +752,9 @@ do--function Pdraw_norm(P)
|
||||
gc.setLineWidth(2)
|
||||
gc.setColor(P.frameColor)
|
||||
gc.rectangle("line",-1,-11,302,612)--Boarder
|
||||
gc.rectangle("line",301,0,15,601)--AtkBuffer boarder
|
||||
gc.rectangle("line",301,-3,15,604)--AtkBuffer boarder
|
||||
gc.rectangle("line",-16,-3,15,604)--B2b bar boarder
|
||||
|
||||
--LockDelay indicator
|
||||
if ENV.easyFresh then
|
||||
gc.setColor(1,1,1)
|
||||
else
|
||||
gc.setColor(1,.26,.26)
|
||||
end
|
||||
if P.lockDelay>=0 then
|
||||
gc.rectangle("fill",0,602,300*P.lockDelay/ENV.lock,6)--Lock delay indicator
|
||||
end
|
||||
_=3
|
||||
for i=1,min(ENV.freshLimit-P.freshTime,15)do
|
||||
gc.rectangle("fill",_,615,14,5)
|
||||
_=_+20
|
||||
end
|
||||
|
||||
--Buffer line
|
||||
local h=0
|
||||
for i=1,#P.atkBuffer do
|
||||
@@ -759,20 +769,20 @@ do--function Pdraw_norm(P)
|
||||
if A.countdown>0 then
|
||||
--Timing
|
||||
gc.setColor(attackColor[A.lv][1])
|
||||
gc.rectangle("fill",303,599-h,11,-bar+3)
|
||||
gc.rectangle("fill",303,599-h,11,-bar)
|
||||
gc.setColor(attackColor[A.lv][2])
|
||||
gc.rectangle("fill",303,599-h+(-bar+3),11,-(-bar+3)*(1-A.countdown/A.cd0))
|
||||
gc.rectangle("fill",303,599-h-bar,11,bar*(1-A.countdown/A.cd0))
|
||||
else
|
||||
--Warning
|
||||
local t=math.sin((Timer()-i)*30)*.5+.5
|
||||
local c1,c2=attackColor[A.lv][1],attackColor[A.lv][2]
|
||||
gc.setColor(c1[1]*t+c2[1]*(1-t),c1[2]*t+c2[2]*(1-t),c1[3]*t+c2[3]*(1-t))
|
||||
gc.rectangle("fill",303,599-h,11,-bar+3)
|
||||
gc.rectangle("fill",303,599-h,11,-bar)
|
||||
end
|
||||
else
|
||||
gc.setColor(attackColor[A.lv][1])
|
||||
bar=bar*(20-A.time)*.05
|
||||
gc.rectangle("fill",303,599-h,11,-bar+2)
|
||||
gc.rectangle("fill",303,599-h,11,-bar)
|
||||
--Disappear
|
||||
end
|
||||
h=h+bar
|
||||
@@ -789,20 +799,32 @@ do--function Pdraw_norm(P)
|
||||
gc.rectangle("fill",-15,b<40 and 578.5 or 98.5,13,3)
|
||||
end
|
||||
|
||||
--LockDelay indicator
|
||||
if ENV.easyFresh then
|
||||
gc.setColor(1,1,1)
|
||||
else
|
||||
gc.setColor(1,.26,.26)
|
||||
end
|
||||
if P.lockDelay>=0 then
|
||||
gc.rectangle("fill",0,602,300*P.lockDelay/ENV.lock,6)--Lock delay indicator
|
||||
end
|
||||
_=3
|
||||
for i=1,min(ENV.freshLimit-P.freshTime,15)do
|
||||
gc.rectangle("fill",_,615,14,5)
|
||||
_=_+20
|
||||
end
|
||||
|
||||
--Draw Hold
|
||||
if ENV.hold then
|
||||
gc.setColor(0,0,0,.4)gc.rectangle("fill",-140,36,124,80)
|
||||
gc.setColor(1,1,1)gc.rectangle("line",-140,36,124,80)
|
||||
mText(drawableText.hold,-78,-15)
|
||||
if P.hd then
|
||||
if P.holded then gc.setColor(.6,.5,.5)end
|
||||
local B=P.hd.bk
|
||||
for i=1,#B do for j=1,#B[1]do
|
||||
if B[i][j]then
|
||||
drawPixel(i+17.5-#B*.5,j-2.6-#B[1]*.5,P.hd.color)
|
||||
end
|
||||
end end
|
||||
end
|
||||
gc.push("transform")
|
||||
gc.translate(-140,116)
|
||||
gc.setColor(0,0,0,.4)gc.rectangle("fill",0,-80,124,80)
|
||||
gc.setColor(1,1,1)gc.rectangle("line",0,-80,124,80)
|
||||
mText(drawableText.hold,62,-131)
|
||||
if P.hd then
|
||||
drawHold(P,P.hd.color)
|
||||
end
|
||||
gc.pop()
|
||||
end
|
||||
|
||||
--Draw Next(s)
|
||||
@@ -816,7 +838,7 @@ do--function Pdraw_norm(P)
|
||||
local b,c=P.next[N].bk,P.next[N].color
|
||||
for i=1,#b do for j=1,#b[1] do
|
||||
if b[i][j]then
|
||||
drawPixel(i+20-2.4*N-#b*.5,j+12.6-#b[1]*.5,c)
|
||||
drawCell(i-2.4*N-#b*.5,j+12.6-#b[1]*.5,c)
|
||||
end
|
||||
end end
|
||||
N=N+1
|
||||
@@ -917,14 +939,18 @@ local function Pdraw_small(P)
|
||||
if P.alive then
|
||||
gc.setLineWidth(2)
|
||||
gc.setColor(P.frameColor)
|
||||
gc.rectangle("line",1,1,58,118)
|
||||
gc.rectangle("line",0,0,60,120)
|
||||
end
|
||||
|
||||
--Draw badge
|
||||
if modeEnv.royaleMode then
|
||||
gc.setColor(1,1,1)
|
||||
for i=1,P.strength do
|
||||
gc.draw(IMG.badgeIcon,12*i-7,4,nil,.5)
|
||||
end
|
||||
end
|
||||
|
||||
--Draw result
|
||||
if P.result then
|
||||
gc.setColor(1,1,1,min(P.endCounter,60)*.01)
|
||||
setFont(17)mStr(P.result,32,47)
|
||||
@@ -961,60 +987,63 @@ local function Pdraw_demo(P)
|
||||
gc.setColor(1,1,1)
|
||||
gc.rectangle("line",-1,-1,302,602)
|
||||
|
||||
if P.falling==-1 then
|
||||
--Field block only
|
||||
for j=int(P.fieldBeneath/30+1),#P.field do
|
||||
for i=1,10 do
|
||||
if P.field[j][i]>0 then
|
||||
gc.setColor(1,1,1,min(P.visTime[j][i]*.05,1))
|
||||
drawPixel(j,i,P.field[j][i])
|
||||
gc.push("transform")
|
||||
gc.translate(0,600)
|
||||
if P.falling==-1 then
|
||||
--Field block only
|
||||
for j=int(P.fieldBeneath/30+1),#P.field do
|
||||
for i=1,10 do
|
||||
if P.field[j][i]>0 then
|
||||
gc.setColor(1,1,1,min(P.visTime[j][i]*.05,1))
|
||||
drawCell(j,i,P.field[j][i])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
--Field with falling animation
|
||||
local dy,stepY=0,ENV.smooth and(P.falling/(ENV.fall+1))^2.5*30 or 30
|
||||
local A=P.falling/ENV.fall
|
||||
local h,H=1,#P.field
|
||||
for j=int(P.fieldBeneath/30+1),H do
|
||||
while j==P.clearingRow[h]do
|
||||
h=h+1
|
||||
dy=dy+stepY
|
||||
gc.translate(0,-stepY)
|
||||
gc.setColor(1,1,1,A)
|
||||
gc.rectangle("fill",0,630-30*j,300,stepY)
|
||||
end
|
||||
for i=1,10 do
|
||||
if P.field[j][i]>0 then
|
||||
gc.setColor(1,1,1,min(P.visTime[j][i]*.05,1))
|
||||
drawPixel(j,i,P.field[j][i])
|
||||
else
|
||||
--Field with falling animation
|
||||
local dy,stepY=0,ENV.smooth and(P.falling/(ENV.fall+1))^2.5*30 or 30
|
||||
local A=P.falling/ENV.fall
|
||||
local h,H=1,#P.field
|
||||
for j=int(P.fieldBeneath/30+1),H do
|
||||
while j==P.clearingRow[h]do
|
||||
h=h+1
|
||||
dy=dy+stepY
|
||||
gc.translate(0,-stepY)
|
||||
gc.setColor(1,1,1,A)
|
||||
gc.rectangle("fill",0,630-30*j,300,stepY)
|
||||
end
|
||||
for i=1,10 do
|
||||
if P.field[j][i]>0 then
|
||||
gc.setColor(1,1,1,min(P.visTime[j][i]*.05,1))
|
||||
drawCell(j,i,P.field[j][i])
|
||||
end
|
||||
end
|
||||
end
|
||||
gc.translate(0,dy)
|
||||
end
|
||||
gc.translate(0,dy)
|
||||
end
|
||||
|
||||
drawFXs(P)
|
||||
drawFXs(P)
|
||||
|
||||
if P.cur and P.waiting==-1 then
|
||||
--Draw ghost
|
||||
if ENV.ghost then
|
||||
gc.setColor(1,1,1,ENV.ghost)
|
||||
if P.cur and P.waiting==-1 then
|
||||
--Draw ghost
|
||||
if ENV.ghost then
|
||||
gc.setColor(1,1,1,ENV.ghost)
|
||||
for i=1,P.r do for j=1,P.c do
|
||||
if P.cur.bk[i][j]then
|
||||
drawCell(i+P.imgY-1,j+P.curX-1,curColor)
|
||||
end
|
||||
end end
|
||||
end
|
||||
|
||||
--Draw block
|
||||
gc.setColor(1,1,1)
|
||||
for i=1,P.r do for j=1,P.c do
|
||||
if P.cur.bk[i][j]then
|
||||
drawPixel(i+P.imgY-1,j+P.curX-1,curColor)
|
||||
drawCell(i+P.curY-1,j+P.curX-1,curColor)
|
||||
end
|
||||
end end
|
||||
end
|
||||
|
||||
--Draw block
|
||||
gc.setColor(1,1,1)
|
||||
for i=1,P.r do for j=1,P.c do
|
||||
if P.cur.bk[i][j]then
|
||||
drawPixel(i+P.curY-1,j+P.curX-1,curColor)
|
||||
end
|
||||
end end
|
||||
end
|
||||
gc.pop()
|
||||
|
||||
--Draw hold
|
||||
local blockImg=TEXTURE.miniBlock
|
||||
@@ -1097,7 +1126,7 @@ end
|
||||
local function pressKey_Rec(P,i)
|
||||
if P.keyAvailable[i]then
|
||||
if game.recording then
|
||||
ins(game.rec,game.frame)
|
||||
ins(game.rec,game.frame+1)
|
||||
ins(game.rec,i)
|
||||
end
|
||||
P.keyPressing[i]=true
|
||||
@@ -1113,7 +1142,7 @@ local function pressKey_Rec(P,i)
|
||||
end
|
||||
local function releaseKey_Rec(P,i)
|
||||
if game.recording then
|
||||
ins(game.rec,game.frame)
|
||||
ins(game.rec,game.frame+1)
|
||||
ins(game.rec,-i)
|
||||
end
|
||||
P.keyPressing[i]=false
|
||||
@@ -1142,6 +1171,7 @@ end
|
||||
local function applyGameEnv(P)--Finish gameEnv processing
|
||||
local ENV=P.gameEnv
|
||||
|
||||
if ENV.drop==0 then P._20G=true end
|
||||
P.dropDelay=ENV.drop
|
||||
P.lockDelay=ENV.lock
|
||||
|
||||
@@ -1179,11 +1209,15 @@ local function applyGameEnv(P)--Finish gameEnv processing
|
||||
ENV.bagLen=#ENV.bag
|
||||
end
|
||||
|
||||
if ENV.next==0 then ENV.nextPos=false end
|
||||
|
||||
if ENV.lockFX==0 then ENV.lockFX=nil end
|
||||
if ENV.dropFX==0 then ENV.dropFX=nil end
|
||||
if ENV.moveFX==0 then ENV.moveFX=nil end
|
||||
if ENV.clearFX==0 then ENV.clearFX=nil end
|
||||
if ENV.shakeFX==0 then ENV.shakeFX=nil end
|
||||
|
||||
if ENV.block==0 then ENV.block=nil end
|
||||
if ENV.ghost==0 then ENV.ghost=nil end
|
||||
if ENV.center==0 then ENV.center=nil end
|
||||
end
|
||||
@@ -1303,7 +1337,16 @@ local function newEmptyPlayer(id,x,y,size)
|
||||
P.next={}
|
||||
|
||||
P.freshTime=0
|
||||
P.spinLast,P.lastClear=false,nil
|
||||
P.spinLast=false
|
||||
P.lastClear={
|
||||
id=1,--block id
|
||||
name=1,--block name
|
||||
row=0,--line cleared
|
||||
spin=false,--if spin
|
||||
mini=false,--if mini
|
||||
pc=false,--if pc
|
||||
special=false,--if special clear (spin, >=4, pc)
|
||||
}
|
||||
P.spinSeq=0--For Ospin, each digit mean a spin
|
||||
P.ctrlCount=0--Key press time, for finesse check
|
||||
P.pieceCount=0--Count pieces from next, for drawing bagline
|
||||
@@ -1350,7 +1393,7 @@ function player.createLockFX(P)
|
||||
for i=1,P.r do
|
||||
local y=P.curY+i-1
|
||||
if without(P.clearedRow,y)then
|
||||
y=600-30*y
|
||||
y=-30*y
|
||||
for j=1,P.c do
|
||||
if BK[i][j]then
|
||||
ins(P.lockFX,{30*(P.curX+j-2),y,0,t})
|
||||
@@ -1399,7 +1442,7 @@ end
|
||||
function player.createClearingFX(P,y,spd)
|
||||
ins(P.clearFX,{y,0,spd})
|
||||
end
|
||||
function player.createBeam(P,R,send,time,target,color,clear,spin,combo)
|
||||
function player.createBeam(P,R,send,time,target,color,clear,combo)
|
||||
local x1,y1,x2,y2
|
||||
if P.small then x1,y1=P.centerX,P.centerY
|
||||
else x1,y1=P.x+(30*(P.curX+P.sc[2])-30+15+150)*P.size,P.y+(600-30*(P.curY+P.sc[1])+15+70)*P.size
|
||||
@@ -1410,9 +1453,9 @@ function player.createBeam(P,R,send,time,target,color,clear,spin,combo)
|
||||
|
||||
local radius,corner
|
||||
local a,r,g,b=1,unpack(SKIN.libColor[color])
|
||||
if clear>10 then
|
||||
if clear.special then
|
||||
radius=10+3*send+100/(target+4)
|
||||
local t=clear%10
|
||||
local t=clear.row
|
||||
if t==1 then
|
||||
corner=3
|
||||
r=.3+r*.4
|
||||
@@ -1656,7 +1699,7 @@ function player.freshBlock(P,keepGhost,control,system)
|
||||
local ENV=P.gameEnv
|
||||
if not keepGhost and P.cur then
|
||||
P.imgY=min(#P.field+1,P.curY)
|
||||
if ENV._20G or P.keyPressing[7]and ENV.sdarr==0 then
|
||||
if _20G or P.keyPressing[7]and ENV.sdarr==0 then
|
||||
local _=P.imgY
|
||||
|
||||
--Move ghost to bottom
|
||||
@@ -2166,6 +2209,10 @@ do--player.drop(P)--Place piece
|
||||
end
|
||||
|
||||
if cc>0 then
|
||||
local C=P.lastClear
|
||||
C.id,C.name=CB.id,CB.name
|
||||
C.row=cc
|
||||
C.spin=dospin
|
||||
cmb=cmb+1
|
||||
if dospin then
|
||||
cscore=(spinSCR[CB.name]or spinSCR[8])[cc]
|
||||
@@ -2203,7 +2250,8 @@ do--player.drop(P)--Place piece
|
||||
else
|
||||
P.b2b=P.b2b+b2bPoint[cc]
|
||||
end
|
||||
P.lastClear=CB.id*10+cc
|
||||
C.mini=mini
|
||||
C.special=true
|
||||
if P.human then
|
||||
SFX.play(spin_n[cc])
|
||||
VOC.play(spinName[CB.name],CHN)
|
||||
@@ -2235,7 +2283,9 @@ do--player.drop(P)--Place piece
|
||||
atk=cc
|
||||
end
|
||||
P.b2b=P.b2b+cc*80-220
|
||||
P.lastClear=CB.name*10+cc
|
||||
C.special=true
|
||||
else
|
||||
C.special=false
|
||||
end
|
||||
if P.human then
|
||||
VOC.play(clearName[cc],CHN)
|
||||
@@ -2258,6 +2308,7 @@ do--player.drop(P)--Place piece
|
||||
SFX.play("clear")
|
||||
VOC.play("pc",CHN)
|
||||
end
|
||||
C.special=true
|
||||
elseif cc>1 or #P.field==P.garbageBeneath then
|
||||
P:showText(text.HPC,0,-80,50,"fly")
|
||||
atk=atk+2
|
||||
@@ -2268,23 +2319,20 @@ do--player.drop(P)--Place piece
|
||||
if P.human then
|
||||
SFX.play("clear")
|
||||
end
|
||||
else
|
||||
goto checkB2Breduce
|
||||
C.special=true
|
||||
end
|
||||
P.lastClear=CB.name*10+5
|
||||
goto skipB2Breduce
|
||||
C.pc=true
|
||||
else
|
||||
C.pc=false
|
||||
end
|
||||
|
||||
::checkB2Breduce::
|
||||
if not(dospin or cc>3)then
|
||||
if not C.special then
|
||||
P.b2b=max(P.b2b-250,0)
|
||||
P:showText(text.clear[cc],0,-30,27+cc*3,"appear",(8-cc)*.3)
|
||||
atk=cc-.5
|
||||
sendTime=20+atk*20
|
||||
cscore=cscore+clearSCR[cc]
|
||||
P.lastClear=cc
|
||||
end
|
||||
::skipB2Breduce::
|
||||
|
||||
sendTime=sendTime+25*cmb
|
||||
if cmb>1 then
|
||||
@@ -2328,7 +2376,7 @@ do--player.drop(P)--Place piece
|
||||
local M=#P.atker
|
||||
if M>0 then
|
||||
for i=1,M do
|
||||
P:attack(P.atker[i],send,sendTime,M,CB.color,P.lastClear,dospin,cmb)
|
||||
P:attack(P.atker[i],send,sendTime,M,CB.color,C,cmb)
|
||||
end
|
||||
else
|
||||
T=randomTarget(P)
|
||||
@@ -2341,7 +2389,7 @@ do--player.drop(P)--Place piece
|
||||
T=randomTarget(P)
|
||||
end
|
||||
if T then
|
||||
P:attack(T,send,sendTime,1,CB.color,P.lastClear,dospin,cmb)
|
||||
P:attack(T,send,sendTime,1,CB.color,C,cmb)
|
||||
end
|
||||
end
|
||||
if P.human and send>3 then SFX.play("emit",min(send,7)*.1)end
|
||||
@@ -2370,7 +2418,7 @@ do--player.drop(P)--Place piece
|
||||
end
|
||||
|
||||
--DropSpeed bonus
|
||||
if P.gameEnv._20G then
|
||||
if P._20G then
|
||||
dropScore=dropScore*2
|
||||
elseif P.gameEnv.drop<3 then
|
||||
dropScore=dropScore*1.5
|
||||
@@ -2641,11 +2689,16 @@ function player.lose(P)
|
||||
end
|
||||
end
|
||||
|
||||
function PLY.reach_winCheck(P)
|
||||
function PLY.check_lineReach(P)
|
||||
if P.stat.row>=P.gameEnv.target then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
function PLY.check_attackReach(P)
|
||||
if P.stat.atk>=P.gameEnv.target then
|
||||
P:win("finish")
|
||||
end
|
||||
end
|
||||
--------------------------<\Events>--------------------------
|
||||
|
||||
--------------------------<Control>--------------------------
|
||||
@@ -2930,12 +2983,22 @@ function PLY.newDemoPlayer(id,x,y,size)
|
||||
P.field,P.visTime={},{}
|
||||
P.atkBuffer={sum=0}
|
||||
P.gameEnv={
|
||||
noTele=false,
|
||||
drop=1e99,lock=1e99,
|
||||
wait=10,fall=20,
|
||||
next=6,hold=true,
|
||||
oncehold=true,
|
||||
|
||||
das=10,arr=2,
|
||||
sddas=2,sdarr=2,
|
||||
swap=true,
|
||||
ghost=setting.ghost,center=setting.center,
|
||||
smooth=setting.smooth,grid=setting.grid,
|
||||
|
||||
--Visual
|
||||
block=true,
|
||||
ghost=setting.ghost,
|
||||
center=setting.center,
|
||||
bone=false,
|
||||
smooth=setting.smooth,
|
||||
grid=setting.grid,
|
||||
text=setting.text,
|
||||
lockFX=setting.lockFX,
|
||||
dropFX=setting.dropFX,
|
||||
@@ -2943,26 +3006,20 @@ function PLY.newDemoPlayer(id,x,y,size)
|
||||
clearFX=setting.clearFX,
|
||||
shakeFX=setting.shakeFX,
|
||||
|
||||
_20G=false,bone=false,
|
||||
drop=1e99,lock=1e99,
|
||||
wait=10,fall=20,
|
||||
next=6,hold=true,
|
||||
oncehold=true,
|
||||
ospin=true,
|
||||
mindas=0,minarr=0,minsdarr=0,
|
||||
sequence="bag",
|
||||
ospin=true,
|
||||
noTele=false,
|
||||
|
||||
easyFresh=true,
|
||||
visible="show",
|
||||
freshLimit=1e99,
|
||||
life=1e99,
|
||||
pushSpeed=3,
|
||||
|
||||
bag={1,2,3,4,5,6,7},
|
||||
face={0,0,0,0,0,0,0},
|
||||
skin=setting.skin,
|
||||
|
||||
life=1e99,
|
||||
pushSpeed=3,
|
||||
block=true,
|
||||
visible="show",
|
||||
Fkey=nil,puzzle=false,
|
||||
freshLimit=1e99,easyFresh=true,
|
||||
fine=false,fineKill=false,
|
||||
target=1e99,dropPiece=NULL,
|
||||
mindas=0,minarr=0,minsdarr=0,
|
||||
}
|
||||
applyGameEnv(P)
|
||||
|
||||
|
||||
117
parts/scenes.lua
117
parts/scenes.lua
@@ -92,7 +92,7 @@ do--calculator
|
||||
elseif S.val==196000+022 then
|
||||
S.pass=true
|
||||
marking=nil
|
||||
LOG.print("\68\69\86\58\87\97\116\101\114\109\97\114\107\32\82\101\109\111\118\101\100","warn",color.lBlue)
|
||||
LOG.print("\68\69\86\58\87\97\116\101\114\109\97\114\107\32\82\101\109\111\118\101\100","message")
|
||||
SFX.play("clear")
|
||||
elseif S.val==72943816 then
|
||||
S.pass=true
|
||||
@@ -102,7 +102,7 @@ do--calculator
|
||||
end
|
||||
end
|
||||
FILE.saveUnlock()
|
||||
LOG.print("\68\69\86\58\85\78\76\79\67\75\65\76\76","warn",color.lBlue)
|
||||
LOG.print("\68\69\86\58\85\78\76\79\67\75\65\76\76","message")
|
||||
SFX.play("clear_2")
|
||||
elseif S.val==1379e8+2626e4+1379 then
|
||||
S.pass=true
|
||||
@@ -288,28 +288,28 @@ do--p15
|
||||
S.state=0
|
||||
S.time=0
|
||||
S.move=0
|
||||
elseif k=="c"then
|
||||
elseif k=="q"then
|
||||
if S.state~=1 then
|
||||
S.color=(S.color+1)%5
|
||||
end
|
||||
elseif k=="r"then
|
||||
elseif k=="w"then
|
||||
if S.state==0 then
|
||||
S.revKB=not S.revKB
|
||||
S.blind=not S.blind
|
||||
end
|
||||
elseif k=="s"then
|
||||
elseif k=="e"then
|
||||
if S.state==0 then
|
||||
S.slide=not S.slide
|
||||
if not S.slide then
|
||||
S.pathVis=false
|
||||
end
|
||||
end
|
||||
elseif k=="p"then
|
||||
elseif k=="r"then
|
||||
if S.state==0 and S.slide then
|
||||
S.pathVis=not S.pathVis
|
||||
end
|
||||
elseif k=="b"then
|
||||
elseif k=="t"then
|
||||
if S.state==0 then
|
||||
S.blind=not S.blind
|
||||
S.revKB=not S.revKB
|
||||
end
|
||||
elseif k=="escape"then
|
||||
SCN.back()
|
||||
@@ -414,7 +414,7 @@ do--p15
|
||||
if S.state==2 then
|
||||
--Draw no-setting area
|
||||
gc.setColor(1,0,0,.3)
|
||||
gc.rectangle("fill",15,300,285,330)
|
||||
gc.rectangle("fill",15,295,285,340)
|
||||
|
||||
gc.setColor(.9,.9,0)--win
|
||||
elseif S.state==1 then
|
||||
@@ -465,6 +465,7 @@ do--schulte_G
|
||||
rank=3,
|
||||
blind=false,
|
||||
disappear=false,
|
||||
tapFX=true,
|
||||
|
||||
startTime=0,
|
||||
time=0,
|
||||
@@ -506,11 +507,15 @@ do--schulte_G
|
||||
S.state=2
|
||||
SFX.play("reach")
|
||||
end
|
||||
sysFX.newShade(.3,.6,.8,1,320+640/R*X,40+640/R*Y,640/R,640/R)
|
||||
if S.tapFX then
|
||||
sysFX.newShade(.3,.6,.8,1,320+640/R*X,40+640/R*Y,640/R,640/R)
|
||||
end
|
||||
else
|
||||
SFX.play("finesseError")
|
||||
S.error=S.error+1
|
||||
sysFX.newShade(.5,1,.4,.5,320+640/R*X,40+640/R*Y,640/R,640/R)
|
||||
if S.tapFX then
|
||||
sysFX.newShade(.5,1,.4,.5,320+640/R*X,40+640/R*Y,640/R,640/R)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -533,15 +538,19 @@ do--schulte_G
|
||||
S.progress=0
|
||||
end
|
||||
elseif key=="z"or key=="x"then
|
||||
tapBoard(ms.getPosition())
|
||||
elseif key=="b"then
|
||||
love.mousepressed(ms.getPosition())
|
||||
elseif key=="q"then
|
||||
if S.state==0 then
|
||||
S.blind=not S.blind
|
||||
end
|
||||
elseif key=="d"then
|
||||
elseif key=="w"then
|
||||
if S.state==0 then
|
||||
S.disappear=not S.disappear
|
||||
end
|
||||
elseif key=="e"then
|
||||
if S.state==0 then
|
||||
S.tapFX=not S.tapFX
|
||||
end
|
||||
elseif key=="3"or key=="4"or key=="5"or key=="6"then
|
||||
if S.state==0 then
|
||||
S.rank=tonumber(key)
|
||||
@@ -573,7 +582,7 @@ do--schulte_G
|
||||
if S.state==2 then
|
||||
--Draw no-setting area
|
||||
gc.setColor(1,0,0,.3)
|
||||
gc.rectangle("fill",60,295,200,150)
|
||||
gc.rectangle("fill",15,295,285,250)
|
||||
|
||||
gc.setColor(.9,.9,0)--win
|
||||
elseif S.state==1 then
|
||||
@@ -970,12 +979,12 @@ do--mode
|
||||
if key=="return"then
|
||||
if mapCam.sel then
|
||||
if mapCam.sel=="custom_clear"or mapCam.sel=="custom_puzzle"then
|
||||
if customSel[11]>1 then
|
||||
if customSel[7]==5 then
|
||||
LOG.print(text.ai_fixed,"warn",color.red)
|
||||
if customEnv.opponent>1 then
|
||||
if customEnv.seq=="fixed"then
|
||||
LOG.print(text.ai_fixed,"warn")
|
||||
return
|
||||
elseif #preBag>0 then
|
||||
LOG.print(text.ai_prebag,"warn",color.red)
|
||||
LOG.print(text.ai_prebag,"warn")
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -1251,10 +1260,7 @@ do--music
|
||||
end
|
||||
|
||||
function Pnt.music()
|
||||
gc.setColor(.7,.7,.7)
|
||||
gc.draw(drawableText.musicRoom,20,20)
|
||||
gc.setColor(1,1,1)
|
||||
gc.draw(drawableText.musicRoom,22,23)
|
||||
gc.setColor(1,1,1)gc.draw(drawableText.musicRoom,22,23)
|
||||
|
||||
gc.draw(drawableText.right,270,350+10)
|
||||
setFont(50)
|
||||
@@ -1283,73 +1289,28 @@ do--music
|
||||
end
|
||||
do--custom
|
||||
function sceneInit.custom()
|
||||
BG.set("space")
|
||||
sceneTemp=1--Option selected
|
||||
destroyPlayers()
|
||||
BG.set(customRange.bg[customSel[12]])
|
||||
BGM.play(customRange.bgm[customSel[13]])
|
||||
BG.set(customEnv.bg)
|
||||
BGM.play(customEnv.bgm)
|
||||
end
|
||||
|
||||
local customSet={
|
||||
{3,20,1,1,7,1,1,1,3,4,1,2,3},
|
||||
{5,20,1,1,7,1,1,1,8,3,8,3,3},
|
||||
{1,22,1,1,7,3,1,1,8,4,1,6,7},
|
||||
{3,20,1,1,7,1,1,3,8,3,1,6,8},
|
||||
{25,11,8,11,4,1,2,1,8,3,1,4,9},
|
||||
}
|
||||
function keyDown.custom(key)
|
||||
local sel=sceneTemp
|
||||
if key=="up"or key=="w"then
|
||||
sceneTemp=(sel-2)%#customID+1
|
||||
elseif key=="down"or key=="s"then
|
||||
sceneTemp=sel%#customID+1
|
||||
elseif key=="left"or key=="a"then
|
||||
customSel[sel]=(customSel[sel]-2)%#customRange[customID[sel]]+1
|
||||
if sel==12 then
|
||||
BG.set(customRange.bg[customSel[12]])
|
||||
elseif sel==13 then
|
||||
BGM.play(customRange.bgm[customSel[13]])
|
||||
end
|
||||
elseif key=="right"or key=="d"then
|
||||
customSel[sel]=customSel[sel]%#customRange[customID[sel]]+1
|
||||
if sel==12 then
|
||||
BG.set(customRange.bg[customSel[sel]])
|
||||
elseif sel==13 then
|
||||
BGM.play(customRange.bgm[customSel[sel]])
|
||||
end
|
||||
elseif key=="q"then
|
||||
if key=="q"then
|
||||
SCN.go("sequence")
|
||||
elseif key=="e"then
|
||||
SCN.swapTo("draw","swipeL")
|
||||
elseif #key==1 then
|
||||
local T=tonumber(key)
|
||||
if T and T>=1 and T<=5 then
|
||||
for i=1,#customSet[T]do
|
||||
customSel[i]=customSet[T][i]
|
||||
end
|
||||
BG.set(customRange.bg[customSel[12]])
|
||||
BGM.play(customRange.bgm[customSel[13]])
|
||||
end
|
||||
elseif key=="escape"then
|
||||
SCN.back()
|
||||
else
|
||||
WIDGET.keyPressed(key)
|
||||
end
|
||||
end
|
||||
|
||||
function Pnt.custom()
|
||||
gc.setColor(1,1,1,.3+sin(Timer()*8)*.2)
|
||||
gc.rectangle("fill",100,115+40*sceneTemp,570,40)
|
||||
gc.setColor(.7,.7,.7)gc.draw(drawableText.custom,360,20)
|
||||
gc.setColor(1,1,1)gc.draw(drawableText.custom,362,23)
|
||||
setFont(35)
|
||||
for i=1,#customID do
|
||||
local k=customID[i]
|
||||
local y=110+40*i
|
||||
gc.printf(text.customOption[k],100,y,320,"right")
|
||||
if text.customVal[k]then
|
||||
gc.print(text.customVal[k][customSel[i]],440,y)
|
||||
else
|
||||
gc.print(customRange[k][customSel[i]],440,y)
|
||||
end
|
||||
end
|
||||
gc.setColor(1,1,1)gc.draw(drawableText.custom,362,10)
|
||||
end
|
||||
end
|
||||
do--sequence
|
||||
@@ -1424,7 +1385,6 @@ do--sequence
|
||||
|
||||
function Pnt.sequence()
|
||||
local S=sceneTemp
|
||||
gc.setColor(.7,.7,.7)gc.draw(drawableText.sequence,120,-15)
|
||||
gc.setColor(1,1,1)gc.draw(drawableText.sequence,122,-12)
|
||||
gc.setLineWidth(4)
|
||||
gc.rectangle("line",100,100,1080,260)
|
||||
@@ -1782,6 +1742,7 @@ do--play
|
||||
function Tmr.play(dt)
|
||||
local _
|
||||
local P1=players[1]
|
||||
local game=game
|
||||
game.frame=game.frame+1
|
||||
stat.time=stat.time+dt
|
||||
|
||||
@@ -2335,7 +2296,6 @@ do--setting_control
|
||||
gc.line(950,530,950,630)
|
||||
|
||||
--Texts
|
||||
gc.setColor(.7,.7,.7)gc.draw(drawableText.setting_control,80,50)
|
||||
gc.setColor(1,1,1)gc.draw(drawableText.setting_control,80,50)
|
||||
setFont(50)
|
||||
gc.printf(text.preview,320,540,200,"right")
|
||||
@@ -2485,7 +2445,6 @@ end
|
||||
do--setting_skin
|
||||
local scs=require("parts/spinCenters")
|
||||
function Pnt.setting_skin()
|
||||
gc.setColor(.7,.7,.7)gc.draw(drawableText.setting_skin,80,50)
|
||||
gc.setColor(1,1,1)gc.draw(drawableText.setting_skin,80,50)
|
||||
for N=1,7 do
|
||||
local face=setting.face[N]
|
||||
|
||||
@@ -64,7 +64,7 @@ function SKIN.load()
|
||||
I=gc.newImage(N)
|
||||
else
|
||||
I=gc.newImage("/image/skin/"..list[1]..".png")
|
||||
LOG.print("No skin file: "..list[i],color.red)
|
||||
LOG.print("No skin file: "..list[i],"warn")
|
||||
end
|
||||
for j=1,11 do
|
||||
SKIN.lib[i][j]=C(30,30)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
local gc=love.graphics
|
||||
local Tick={}
|
||||
function Tick.finish(P)
|
||||
P.endCounter=P.endCounter+1
|
||||
|
||||
@@ -60,6 +60,7 @@ Future outlook:
|
||||
场地序列一起复制
|
||||
自定义消行要求(可复制)
|
||||
录像保存/导出
|
||||
按块回放录像
|
||||
工程编译到字节码
|
||||
游戏内文档
|
||||
方块散落动画
|
||||
@@ -71,6 +72,31 @@ Future outlook:
|
||||
task-Z(新AI)
|
||||
更多画面效果 & 一些3D小玩意
|
||||
|
||||
0.10.11: 自定义游戏更新 Custom-game Update
|
||||
新内容:
|
||||
全新自定义游戏设置界面
|
||||
新模式:MPH竞速
|
||||
新控件:选择器 (用于调整自定义游戏的选项)
|
||||
当前方块透明度可调
|
||||
改动:
|
||||
小游戏开关排版调整,使用qwer切换选项,增加舒尔特方格特效开关
|
||||
0next时不显示生成预览
|
||||
垃圾行缓冲槽显示微调
|
||||
科研模式目标改为200行攻击
|
||||
虚拟按键最大尺寸增加
|
||||
画面设置布局微调
|
||||
代码:
|
||||
玩家方法reach_winCheck改为check_lineReach,新增攻击达标检测函数
|
||||
玩家上次消行信息lastClear属性改为表,包含更多信息
|
||||
整理并重写部分玩家draw_norm代码
|
||||
整理游戏设置变量
|
||||
20G移出gameEnv属性
|
||||
修复:
|
||||
修复回放录像时间轴错开一帧
|
||||
对CC崩溃进行一定保护,游戏可能不会闪退
|
||||
背景lightning2的方块显示错误
|
||||
科研模式显示的攻击改为一位小数
|
||||
|
||||
0.10.10: 画面优化 Graphics Update
|
||||
新内容:
|
||||
超屏视野:场地超高时镜头上移
|
||||
|
||||
Reference in New Issue
Block a user