Compare commits

..

29 Commits

Author SHA1 Message Date
MrZ626
c886d83042 0.10.10:画面优化 2020-09-13 12:06:36 +08:00
MrZ626
10810f3120 优化两个小游戏体验 2020-09-13 12:00:08 +08:00
MrZ626
2bf7cc4781 优化舒尔特方格体验 2020-09-13 01:49:07 +08:00
MrZ626
75417926e2 spin判定代码调整 2020-09-12 22:32:34 +08:00
MrZ626
aedec4b26b 新增生成预览功能 2020-09-12 19:30:04 +08:00
MrZ626
1eec4c957d 暂停界面ADPM计算公式修复 2020-09-12 18:39:27 +08:00
MrZ626
1610527b73 修复新增不可移动spin判定使spin5报错 2020-09-12 12:29:28 +08:00
MrZ626
731e6bfaca 代码优化,卡块spin判定无须最后一步旋转 2020-09-12 12:15:28 +08:00
MrZ626
d89a2f60a9 设置添加超屏视野开关 2020-09-12 01:43:05 +08:00
MrZ626
e57f99364f 整理代码 2020-09-11 22:07:17 +08:00
MrZ626
f1ce68b677 win下提醒用户删掉存档内CCloader,声明两个全局变量 2020-09-10 23:16:48 +08:00
MrZ626
993ef70232 调整15p细节 2020-09-10 18:44:34 +08:00
MrZ626
636ba1ff2a 场地超高时镜头上移 2020-09-10 18:29:27 +08:00
MrZ626
98d45d57a3 目标行数线加入玩家绘图方法 2020-09-10 18:29:20 +08:00
MrZ626
f6deb34121 重构CC加载代码 2020-09-10 18:29:12 +08:00
MrZ626
c2519a32e1 进入场景时滑条数字可见 2020-09-10 15:51:18 +08:00
MrZ626
41d939e98f 显示垃圾行数量错误 2020-09-10 15:31:44 +08:00
MrZ626
d72f445145 修复软降n格报错 2020-09-10 12:05:39 +08:00
MrZ626
50963fbd59 整理代码 2020-09-10 11:11:29 +08:00
MrZ626
aa9dca918d LOG.print取消"short"输出方式 2020-09-10 01:00:45 +08:00
MrZ626
2b3198b4dc 代码整理,可以显示CC加载失败详细信息 2020-09-10 01:00:14 +08:00
MrZ626
2870166a4c 手机锁屏再解锁后可能屏幕方向错误 2020-09-09 23:22:44 +08:00
MrZ626
b56852e16a 新皮肤 2020-09-09 23:22:32 +08:00
MrZ626
454393125b 皮肤/音效/BGM文件缺失时不崩溃,只弹出警告 2020-09-09 23:22:26 +08:00
MrZ626
6a217ad007 修复LOG.print内容显示在时长不同时会出问题 2020-09-09 22:06:03 +08:00
MrZ626
368a4fd51c 音乐室再装修 2020-09-09 21:40:43 +08:00
MrZ626
a6465db5f9 ai难度再调整 2020-09-09 14:32:28 +08:00
MrZ626
a8130ebbe9 优化重开的操作提示和显示 2020-09-09 11:49:59 +08:00
MrZ626
b387cdc72d 设置界面左右切换动画调整 2020-09-09 11:48:38 +08:00
49 changed files with 532 additions and 369 deletions

2
.gitignore vendored
View File

@@ -1,3 +1,3 @@
lib
libAndroid
font.ttf
BGM

View File

@@ -40,6 +40,8 @@ function BGM.loadOne(N)
BGM.list[N]=love.audio.newSource(file,"stream")
BGM.list[N]:setLooping(true)
BGM.list[N]:setVolume(0)
else
LOG.print("No BGM file: "..N,color.red)
end
end
function BGM.loadAll()
@@ -52,10 +54,7 @@ function BGM.play(s)
BGM.playing=BGM.list[s]
BGM.suspend,BGM.nowPlay=s
return
elseif not s then
return
elseif not BGM.list[s]then
LOG.print("Cannot find BGM: "..s,"short",color.red)
elseif not(s and BGM.list[s])then
return
end
if BGM.nowPlay~=s then

View File

@@ -35,7 +35,8 @@ local function dumpTable(L,t)
local T=type(k)
if T=="number"then
if k==count then
k="";count=count+1
k=""
count=count+1
else
k="["..k.."]="
end

View File

@@ -429,7 +429,6 @@ function love.run()
love.resize(gc.getWidth(),gc.getHeight())
SCN.init("load")--Scene Launch
marking=true
return function()
local _
@@ -533,12 +532,14 @@ function love.run()
end
--Fresh power info.
if Timer()-lastFreshPow>2 and setting.powerInfo and loadingFinished then
updatePowerInfo()
lastFreshPow=Timer()
if Timer()-lastFreshPow>2 then
if setting.powerInfo and loadingFinished then
updatePowerInfo()
lastFreshPow=Timer()
end
if gc.getWidth()~=scr.w then
love.resize(gc.getWidth(),gc.getHeight())
LOG.print("Resized",color.yellow)
LOG.print("Screen Resized",color.yellow)
end
end

View File

@@ -2,8 +2,9 @@ local langList={
{
anykey="按任意键继续",
newVersion="检测到更新!",
newBigVersion="检测到大更新!大量存档信息已修改",
marking="游戏作者:MrZ_26\n任何视频/直播不得出现此水印\n任何转述声明无效",
holdR="请长按R键重新开始",
lang="中文",
atkModeName={"随机","徽章","击杀","反击"},
royale_remain=function(n)return"剩余 "..n.." 名玩家"end,
@@ -301,6 +302,8 @@ local langList={
frame="绘制帧率",
text="消行文本",
warn="死亡预警",
highCam="超屏视野",
nextPos="生成预览",
fullscreen="全屏",
bg="背景",
power="电量显示",
@@ -500,8 +503,9 @@ local langList={
{
anykey="按任意键继续",
newVersion="检测到更新!",
newBigVersion="检测到大更新!大量存档信息已修改",
marking="游戏作者:MrZ_26\n任何视频/直播不得出现此水印\n任何转述声明无效",
holdR="请长按R键重新开始",
lang="全中文",
atkModeName={"随机","徽章","击杀","反击"},
royale_remain=function(n)return"剩余 "..n.." 名玩家"end,
@@ -795,6 +799,8 @@ local langList={
frame="绘制帧率",
text="消行文本",
warn="死亡预警",
highCam="超屏视野",
nextPos="生成预览",
fullscreen="全屏",
bg="背景",
power="电量显示",
@@ -994,8 +1000,9 @@ local langList={
{
anykey="Press any button",
newVersion="Update detected!",
newBigVersion="A big update was detected! Save data has been altered.",
marking="Game Author: MrZ_26\nIllegal recording if you can see this\nAny explanation is invalid",
holdR="Hold R key to restart",
lang="English",
atkModeName={"Random","Badges","K.O.s","Attackers"},
royale_remain=function(n)return n.." Players Remaining"end,
@@ -1279,6 +1286,8 @@ local langList={
frame="Render Frame Rate",
text="Action Text",
warn="Death Alert",
highCam="Superhigh view",
nextPos="Next preview",
fullscreen="Full Screen",
bg="Background",
power="Power Info",
@@ -1478,8 +1487,9 @@ local langList={
{
anykey="↓□↓",
newVersion="&!!!",
newBigVersion="&!!!~~~",
marking="Game Author:MrZ_26\nIllegal recording if see this\nAny explanation invalid",
holdR="→→→→R",
lang="?????",
atkModeName={"?","( )","!","←→"},
royale_remain=function(n)return n.."~"end,
@@ -1761,6 +1771,8 @@ local langList={
frame="|=|",
text="ABC",
warn="!↑↑↑!",
highCam="↑__↑",
nextPos="???←",
fullscreen="|←→|",
bg="__?__",
power="+.",
@@ -1960,8 +1972,9 @@ local langList={
{
anykey="您开始了",
newVersion="感谢更新!",
newBigVersion="检测到大更新!大量存档信息已修改",
marking="游戏作者:MrZ_26\n任何视频/直播不得出现此水印\n任何转述声明无效",
holdR="长按重开",
lang="就这",
atkModeName={"随机","徽章","击杀","反击"},
royale_remain=function(n)return""..n..""end,
@@ -2257,6 +2270,8 @@ local langList={
frame="绘制帧率",
text="消行文本",
warn="死亡预警",
highCam="超屏视野",
nextPos="生成预览",
fullscreen="全屏",
bg="背景",
power="电量显示",

View File

@@ -23,8 +23,8 @@ local function draw(L)
gc.setCanvas(L.blackCanvas)C()
gc.setCanvas(L.shadowCanvas)C()
gc.setCanvas(L.renderCanvas)C()
lightRenderShader:send("xresolution",L.size);
shadowMapShader:send("yresolution",L.size);
lightRenderShader:send("xresolution",L.size)
shadowMapShader:send("yresolution",L.size)
--Get up-left of light
local X=L.x-L.size*.5

View File

@@ -17,11 +17,11 @@ function LOG.update()
M.blink=M.blink-1
else
M.time=M.time-1
if i==1 and M.time==0 then
if M.time==0 then
rem(debugMesList,i)
if not debugMesList[1]then
debugMesFloat=0
else
elseif i==1 then
debugMesFloat=debugMesFloat+25
end
end
@@ -46,9 +46,7 @@ end
function LOG.print(text,T,C)--type/time,color
local time
local his
if type(T)=="table"then
C,T=T or color.white
elseif T=="warn"then
if T=="warn"then
C=C or color.yellow
his=true
time=180
@@ -59,16 +57,18 @@ function LOG.print(text,T,C)--type/time,color
elseif T=="message"then
C=C or color.green
his=true
elseif T=="short"then
C=C or color.orange
time=30
elseif type(T)=="number"then
C=C or color.white
time=T
elseif type(T)=="table"then
C,T=T or color.white
elseif not C then
C=color.white
end
if his then
ins(debugMesHistory,SCN.cur..": "..tostring(text))
end
ins(debugMesList,{text=text,r=C[1],g=C[2],b=C[3],blink=30,time=time or 150})
ins(debugMesList,{text=text,r=C[1],g=C[2],b=C[3],blink=30,time=time or 120})
end
function LOG.copy()
local str=table.concat(debugMesHistory,"\n")

View File

@@ -66,12 +66,24 @@ local swap={
gc.setColor(0,0,0,t)
gc.rectangle("fill",0,0,scr.w,scr.h)
end},
swipe={30,15,function(t)
swipeL={30,15,function(t)
t=t/30
gc.setColor(.1,.1,.1,1-abs(t-.5))
t=t*t*(3-2*t)*2-1
gc.rectangle("fill",t*scr.w,0,scr.w,scr.h)
end},
swipeR={30,15,function(t)
t=t/30
gc.setColor(.1,.1,.1,1-abs(t-.5))
t=t*t*(2*t-3)*2+1
gc.rectangle("fill",t*scr.w,0,scr.w,scr.h)
end},
swipeD={30,15,function(t)
t=t/30
gc.setColor(.1,.1,.1,1-abs(t-.5))
t=t*t*(2*t-3)*2+1
gc.rectangle("fill",0,t*scr.h,scr.w,scr.h)
end},
}--Scene swapping animations
function SCN.swapTo(tar,style)--Parallel scene swapping, cannot back
local S=SCN.stat

View File

@@ -26,7 +26,12 @@ SFX.list={
}
function SFX.loadOne(_)
_,SFX.list[_]=SFX.list[_]
SFX.list[_]={love.audio.newSource("/SFX/".._..".ogg","static")}
local N="/SFX/".._..".ogg"
if love.filesystem.getInfo(N)then
SFX.list[_]={love.audio.newSource(N,"static")}
else
LOG.print("No SFX file: "..N,color.red)
end
end
function SFX.loadAll()
for i=1,#SFX.list do

View File

@@ -204,6 +204,7 @@ local sliderShowFunc={
}
function slider:reset()
self.ATV=0
self.TAT=180
self.pos=0
end
function slider:isAbove(x,y)

View File

@@ -141,10 +141,10 @@ local Widgets={
newButton({name="back", x=1200,y=655,w=120,h=80,color="white", font=40,code=BACK}),
},
music={
newSlider({name="bgm", x=760, y=80, w=400, font=35,disp=SETval("bgm"),code=function(v)setting.bgm=v;BGM.freshVolume()end}),
newButton({name="up", x=1100, y=200, w=120, color="white", font=55,code=pressKey("up"),hide=function()return sceneTemp==1 end}),
newButton({name="play", x=1100, y=340, w=120, color="white", font=35,code=pressKey("space"),hide=function()return setting.bgm==0 end}),
newButton({name="down", x=1100, y=480, w=120, color="white", font=55,code=pressKey("down"),hide=function()return sceneTemp==BGM.len end}),
newSlider({name="bgm", x=760, y=80, w=400, font=35,disp=SETval("bgm"),code=function(v)setting.bgm=v BGM.freshVolume()end}),
newButton({name="up", x=200, y=250, w=120, color="white", font=55,code=pressKey("up"),hide=function()return sceneTemp==1 end}),
newButton({name="play", x=200, y=390, w=120, color="white", font=35,code=pressKey("space"),hide=function()return setting.bgm==0 end}),
newButton({name="down", x=200, y=530, w=120, color="white", font=55,code=pressKey("down"),hide=function()return sceneTemp==BGM.len end}),
newButton({name="back", x=1140, y=640, w=180,h=80, color="white", font=35,code=BACK}),
},
custom={
@@ -241,8 +241,8 @@ local Widgets={
newButton({name="quit", x=640, y=600, w=240,h=100,color="white", font=35,code=BACK}),
},
setting_game={
newButton({name="graphic", x=200, y=80, w=240,h=80, color="lCyan", font=35,code=function()SCN.swapTo("setting_video","swipe")end}),
newButton({name="sound", x=1080, y=80, w=240,h=80, color="lCyan", font=35,code=function()SCN.swapTo("setting_sound","swipe")end}),
newButton({name="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")}),
@@ -258,8 +258,8 @@ local Widgets={
newButton({name="back", x=1140, y=640, w=180,h=80,color="white", font=35,code=BACK}),
},
setting_video={
newButton({name="sound", x=200, y=80,w=240,h=80,color="lCyan",font=35,code=function()SCN.swapTo("setting_sound","swipe")end}),
newButton({name="game", x=1080, y=80,w=240,h=80,color="lCyan",font=35,code=function()SCN.swapTo("setting_game","swipe")end}),
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")}),
@@ -279,28 +279,30 @@ local Widgets={
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=260,font=35,disp=SETval("warn"),code=SETrev("warn")}),
newSwitch({name="fullscreen",x=1050,y=340,font=35,disp=SETval("fullscreen"),
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"),
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=420,font=35,disp=SETval("bg"),
newSwitch({name="bg", x=1050, 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=500,font=35,disp=SETval("powerInfo"),
newSwitch({name="power", x=1050, y=540,font=35,disp=SETval("powerInfo"),
code=function()
setting.powerInfo=not setting.powerInfo
end}),
newButton({name="back", x=1140, y=640,w=180,h=80,color="white", font=35,code=BACK}),
},
setting_sound={
newButton({name="game", x=200, y=80,w=240,h=80,color="lCyan", font=35,code=function()SCN.swapTo("setting_game","swipe")end}),
newButton({name="graphic", x=1080, y=80,w=240,h=80,color="lCyan", font=35,code=function()SCN.swapTo("setting_video","swipe")end}),
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")}),
@@ -452,8 +454,8 @@ local Widgets={
},
setting_trackSetting={
newSwitch({name="VKDodge", x=400, y=200, font=35, disp=SETval("VKDodge"),code=SETrev("VKDodge")}),
newSlider({name="VKTchW", x=140, y=310, w=1000, unit=10,font=35,disp=SETval("VKTchW"),code=function(i)setting.VKTchW=i;setting.VKCurW=math.max(setting.VKCurW,i)end}),
newSlider({name="VKCurW", x=140, y=370, w=1000, unit=10,font=35,disp=SETval("VKCurW"),code=function(i)setting.VKCurW=i;setting.VKTchW=math.min(setting.VKTchW,i)end}),
newSlider({name="VKTchW", x=140, y=310, w=1000, unit=10,font=35,disp=SETval("VKTchW"),code=function(i)setting.VKTchW=i setting.VKCurW=math.max(setting.VKCurW,i)end}),
newSlider({name="VKCurW", x=140, y=370, w=1000, unit=10,font=35,disp=SETval("VKCurW"),code=function(i)setting.VKCurW=i setting.VKTchW=math.min(setting.VKTchW,i)end}),
newButton({name="back", x=1140, y=640, w=180,h=80,color="white",font=35,code=BACK}),
},
setting_lang={
@@ -471,7 +473,7 @@ 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==0 then sceneTemp.color=v end end,hide=function()return sceneTemp.state==1 end}),
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}),
@@ -481,8 +483,8 @@ local Widgets={
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=160,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=160,y=410,w=60, font=40,disp=function()return sceneTemp.disappear end,code=pressKey("d"),hide=function()return sceneTemp.state==1 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}),
newButton({name="back", x=1140,y=640,w=180,h=80,color="white", font=35,code=BACK}),
},
help={

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

BIN
image/skin/gem(notypey).png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -11,6 +11,8 @@
--?
function NULL()end
DBP=print--use this if need debugging print
marking=true
NOGAME=false
--Global Setting & Vars
math.randomseed(os.time()*626)
@@ -122,7 +124,7 @@ if fs.getInfo("virtualkey.dat")then FILE.loadVK()end
if fs.getInfo("tech_ultimate.dat")then fs.remove("tech_ultimate.dat")end
if fs.getInfo("tech_ultimate+.dat")then fs.remove("tech_ultimate+.dat")end
--Update modeRanks
--Update data
do
local R=modeRanks
for k,v in next,R do
@@ -152,6 +154,11 @@ do
if S.VKSFX>1 then S.VKSFX=S.VKSFX*.25 end
if S.VKAlpha>1 then S.VKAlpha=S.VKAlpha*.1 end
S=stat
if not S.spin[1][6]then
for i=1,25 do
S.spin[i][6]=0
end
end
if S.version~=gameVersion then
S.version=gameVersion
newVersionLaunch=true

View File

@@ -53,8 +53,8 @@ return{
setFont(55)
mStr(P.modeData.event,69,270)
mStr(
P.modeData.event<10 and 22
or P.modeData.event<20 and 25
P.modeData.event<10 and 20
or P.modeData.event<20 and 24
or 28
,69,390)
mText(drawableText.wave,69,330)

View File

@@ -4,27 +4,32 @@ local death_lock={12,11,10,9,8}
local death_wait={10,9,8,7,6}
local death_fall={10,9,8,7,6}
local function score(P)
local MD=P.modeData
local c=#P.clearedRow
if c==0 and P.modeData.point%100==99 then return end
if c==0 and MD.point%100==99 then return end
local s=c<3 and c+1 or c==3 and 5 or 7
if P.combo>7 then s=s+2
elseif P.combo>3 then s=s+1
end
P.modeData.point=P.modeData.point+s
if P.modeData.point%100==99 then
MD.point=MD.point+s
if MD.point%100==99 then
SFX.play("blip_1")
elseif P.modeData.point>=100*(P.modeData.event+1)then
elseif MD.point>=100*(MD.event+1)then
--Level up!
local s=P.modeData.event+1;P.modeData.event=s
local s=MD.event+1;MD.event=s
local E=P.gameEnv
BG.set(s==1 and"rainbow"or s==2 and"rainbow2"or s==3 and"lightning"or s==4 and"lightning2"or"lightning")
E.lock=death_lock[s]
E.wait=death_wait[s]
E.fall=death_fall[s]
E.das=int(6.9-s*.4)
if s==3 then P.gameEnv.bone=true end
if s==3 then
P.gameEnv.bone=true
end
if s==5 then
P.modeData.point,P.modeData.event=500,4
MD.point,MD.event=500,4
P:win("finish")
else
P:showTextF(text.stage(s),0,-120,80,"fly")

View File

@@ -3,18 +3,21 @@ local rush_lock={20,18,16,15,14}
local rush_wait={12,10,9,8,7}
local rush_fall={18,16,14,13,12}
local function score(P)
local MD=P.modeData
local c=#P.clearedRow
if c==0 and P.modeData.point%100==99 then return end
if c==0 and MD.point%100==99 then return end
local s=c<3 and c+1 or c==3 and 5 or 7
if P.combo>7 then s=s+2
elseif P.combo>3 then s=s+1
end
P.modeData.point=P.modeData.point+s
if P.modeData.point%100==99 then
MD.point=MD.point+s
if MD.point%100==99 then
SFX.play("blip_1")
elseif P.modeData.point>=100*(P.modeData.event+1)then
elseif MD.point>=100*(MD.event+1)then
--Level up!
local s=P.modeData.event+1;P.modeData.event=s
local s=MD.event+1;MD.event=s
local E=P.gameEnv
BG.set(s==1 and"bg1"or s==2 and"bg2"or s==3 and"rainbow"or "rainbow2")
E.lock=rush_lock[s]
@@ -28,7 +31,7 @@ local function score(P)
end
if s==5 then
P.modeData.point,P.modeData.event=500,4
MD.point,MD.event=500,4
P:win("finish")
else
P:showTextF(text.stage(s),0,-120,80,"fly")

View File

@@ -1,14 +1,16 @@
local gc=love.graphics
local int=math.floor
local function score(P)
local MD=P.modeData
local c=#P.clearedRow
if c==0 and P.modeData.point%100==99 then return end
if c==0 and MD.point%100==99 then return end
local s=c<3 and c+1 or c==3 and 5 or 7
if P.combo>7 then s=s+2
elseif P.combo>3 then s=s+1
end
local MD=P.modeData
MD.point=MD.point+s
if MD.point%100==99 then SFX.play("blip_1")end
if int(MD.point*.01)>MD.event then
--Level up!

View File

@@ -20,7 +20,7 @@ return{
},
load=function()
PLY.newPlayer(1,340,15)
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,5000))
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,10000))
game.garbageSpeed=1e99
end,
score=function(P)return{P.stat.piece,P.stat.time}end,

View File

@@ -20,7 +20,7 @@ return{
},
load=function()
PLY.newPlayer(1,340,15)
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,10000))
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,1,true,13000))
game.garbageSpeed=1e99
end,
score=function(P)return{P.stat.piece,P.stat.time}end,

View File

@@ -20,7 +20,7 @@ return{
},
load=function()
PLY.newPlayer(1,340,15)
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,2,true,12600))
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,2,true,16000))
game.garbageSpeed=1e99
end,
score=function(P)return{P.stat.piece,P.stat.time}end,

View File

@@ -20,7 +20,7 @@ return{
},
load=function()
PLY.newPlayer(1,340,15)
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,16260))
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,26000))
game.garbageSpeed=1e99
end,
score=function(P)return{P.stat.piece,P.stat.time}end,

View File

@@ -20,7 +20,7 @@ return{
},
load=function()
PLY.newPlayer(1,340,15)
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,26000))
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",10,3,true,40000))
game.garbageSpeed=1e99
end,
score=function(P)return{P.stat.piece,P.stat.time}end,

View File

@@ -9,7 +9,7 @@ return{
pauseLimit=true,
load=function()
PLY.newPlayer(1,340,15)
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",7,2,true,26000))
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",7,2,true,30000))
end,
score=function(P)return{P.stat.time}end,
scoreDisp=function(D)return toTime(D[1])end,

View File

@@ -9,7 +9,7 @@ return{
pauseLimit=true,
load=function()
PLY.newPlayer(1,340,15)
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",8,3,true,40000))
PLY.newAIPlayer(2,965,360,.5,AITemplate("CC",8,3,true,50000))
end,
score=function(P)return{P.stat.time}end,
scoreDisp=function(D)return toTime(D[1])end,

View File

@@ -12,16 +12,11 @@ return{
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P)
local dx,dy=150+P.fieldOff.x,70+P.fieldOff.y
setFont(55)
local r=40-P.stat.row
if r<0 then r=0 end
mStr(r,69,335)
if r<21 and r>0 then
gc.setLineWidth(4)
gc.setColor(1,r>10 and 0 or rnd(),.5)
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
end
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,

View File

@@ -11,16 +11,11 @@ return{
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P)
local dx,dy=150+P.fieldOff.x,70+P.fieldOff.y
setFont(55)
local r=10-P.stat.row
if r<0 then r=0 end
mStr(r,69,335)
if r>0 then
gc.setLineWidth(4)
gc.setColor(1,r>10 and 0 or rnd(),.5)
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
end
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,

View File

@@ -11,16 +11,11 @@ return{
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P)
local dx,dy=150+P.fieldOff.x,70+P.fieldOff.y
setFont(55)
local r=100-P.stat.row
if r<0 then r=0 end
mStr(r,69,335)
if r<21 and r>0 then
gc.setLineWidth(4)
gc.setColor(1,r>10 and 0 or rnd(),.5)
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
end
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,

View File

@@ -11,16 +11,11 @@ return{
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P)
local dx,dy=150+P.fieldOff.x,70+P.fieldOff.y
setFont(55)
local r=1000-P.stat.row
if r<0 then r=0 end
mStr(r,69,335)
if r<21 and r>0 then
gc.setLineWidth(4)
gc.setColor(1,r>10 and 0 or rnd(),.5)
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
end
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,

View File

@@ -11,16 +11,11 @@ return{
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P)
local dx,dy=150+P.fieldOff.x,70+P.fieldOff.y
setFont(55)
local r=20-P.stat.row
if r<0 then r=0 end
mStr(r,69,335)
if r>0 then
gc.setLineWidth(4)
gc.setColor(1,r>10 and 0 or rnd(),.5)
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
end
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,

View File

@@ -11,16 +11,11 @@ return{
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P)
local dx,dy=150+P.fieldOff.x,70+P.fieldOff.y
setFont(55)
local r=40-P.stat.row
if r<0 then r=0 end
mStr(r,69,335)
if r<21 and r>0 then
gc.setLineWidth(4)
gc.setColor(1,r>10 and 0 or rnd(),.5)
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
end
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,

View File

@@ -11,16 +11,11 @@ return{
PLY.newPlayer(1,340,15)
end,
mesDisp=function(P)
local dx,dy=150+P.fieldOff.x,70+P.fieldOff.y
setFont(55)
local r=400-P.stat.row
if r<0 then r=0 end
mStr(r,69,335)
if r<21 and r>0 then
gc.setLineWidth(4)
gc.setColor(1,r>10 and 0 or rnd(),.5)
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
end
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,

View File

@@ -33,7 +33,7 @@ return{
}
PLY.newPlayer(1,340,15)
local L={}for i=1,49 do L[i]=true end
local t=CCloader_filename[system] and 2 or 0
local t=CC and 2 or 0
while t>0 do
local r=rnd(2,49)
if L[r]then L[r],t=false,t-1 end
@@ -43,7 +43,7 @@ return{
if L[n]then
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(2,5)))
else
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(3,5),2,true,12000))
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(3,5),2,true,20000))
end
n=n+1
end end
@@ -51,7 +51,7 @@ return{
if L[n]then
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(2,5)))
else
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(3,5),2,true,12000))
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(3,5),2,true,20000))
end
n=n+1
end end

View File

@@ -33,7 +33,7 @@ return{
}
PLY.newPlayer(1,340,15)
local L={}for i=1,49 do L[i]=true end
local t=CCloader_filename[system] and 4 or 0
local t=CC and 4 or 0
while t>0 do
local r=rnd(2,49)
if L[r]then L[r],t=false,t-1 end
@@ -43,7 +43,7 @@ return{
if L[n]then
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(4,7)))
else
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(6,8),3,true,20000))
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(6,8),3,true,30000))
end
n=n+1
end end
@@ -51,7 +51,7 @@ return{
if L[n]then
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(4,7)))
else
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(6,8),3,true,20000))
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(6,8),3,true,30000))
end
n=n+1
end end

View File

@@ -33,7 +33,7 @@ return{
}
PLY.newPlayer(1,340,15)
local L={}for i=1,49 do L[i]=true end
local t=CCloader_filename[system] and 6 or 0
local t=CC and 6 or 0
while t>0 do
local r=rnd(2,49)
if L[r]then L[r],t=false,t-1 end
@@ -43,7 +43,7 @@ return{
if L[n]then
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("9S",rnd(8,10)))
else
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(8,10),3,true,30000))
PLY.newAIPlayer(n,78*i-54,115*j-98,.09,AITemplate("CC",rnd(8,10),3,true,40000))
end
n=n+1
end end
@@ -51,7 +51,7 @@ return{
if L[n]then
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("9S",rnd(8,10)))
else
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(8,10),3,true,30000))
PLY.newAIPlayer(n,78*i+267,115*j-98,.09,AITemplate("CC",rnd(8,10),3,true,40000))
end
n=n+1
end end

View File

@@ -33,7 +33,7 @@ return{
}
PLY.newPlayer(1,340,15)
local L={}for i=1,100 do L[i]=true end
local t=CCloader_filename[system] and 4 or 0
local t=CC and 4 or 0
while t>0 do
local r=rnd(2,99)
if L[r]then L[r],t=false,t-1 end
@@ -43,7 +43,7 @@ return{
if L[n]then
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(2,5)))
else
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(3,5),2,true,12000))
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(3,5),2,true,20000))
end
n=n+1
end end
@@ -51,7 +51,7 @@ return{
if L[n]then
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(2,5)))
else
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(3,5),2,true,12000))
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(3,5),2,true,20000))
end
n=n+1
end end

View File

@@ -33,7 +33,7 @@ return{
}
PLY.newPlayer(1,340,15)
local L={}for i=1,100 do L[i]=true end
local t=CCloader_filename[system] and 4 or 0
local t=CC and 4 or 0
while t>0 do
local r=rnd(2,99)
if L[r]then L[r],t=false,t-1 end
@@ -43,7 +43,7 @@ return{
if L[n]then
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(4,7)))
else
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(6,8),3,true,20000))
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(6,8),3,true,30000))
end
n=n+1
end end
@@ -51,7 +51,7 @@ return{
if L[n]then
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(4,7)))
else
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(6,8),3,true,20000))
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(6,8),3,true,30000))
end
n=n+1
end end

View File

@@ -33,7 +33,7 @@ return{
}
PLY.newPlayer(1,340,15)
local L={}for i=1,100 do L[i]=true end
local t=CCloader_filename[system] and 4 or 0
local t=CC and 4 or 0
while t>0 do
local r=rnd(2,99)
if L[r]then L[r],t=false,t-1 end
@@ -43,7 +43,7 @@ return{
if L[n]then
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("9S",rnd(8,10)))
else
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(8,10),3,true,30000))
PLY.newAIPlayer(n,46*i-36,97*j-72,.068,AITemplate("CC",rnd(8,10),3,true,40000))
end
n=n+1
end end
@@ -51,7 +51,7 @@ return{
if L[n]then
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("9S",rnd(8,10)))
else
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(8,10),3,true,30000))
PLY.newAIPlayer(n,46*i+264,97*j-72,.068,AITemplate("CC",rnd(8,10),3,true,40000))
end
n=n+1
end end

View File

@@ -16,35 +16,54 @@ local Timer=love.timer.getTime
local blockPos={4,4,4,4,4,5,4}
local scs={{0,1},{0,1},{0,1},{0,1},{0,1},{.5,.5},{-.5,1.5}}
-------------------------------------------------Cold clear
local CCblockID={6,5,4,3,2,1,0}
CCloader_filename={
Windows={"CCloader.dll",{"x86_64","x86"}},
Android={"libCCloader.so",{"arm64-v8a","armeabi-v7a"}},
Linux={"libCCloader.so",{"x86_64"}},
}
local function loadCC()
if not CCloader_filename[system]then return end
local f
for i=1,#CCloader_filename[system][2]do
function f()
local CCloader_f,size=love.filesystem.read("data",table.concat({"lib",system,CCloader_filename[system][2][i],CCloader_filename[system][1]},"/"))
if not CCloader_f then return end
local success,message=love.filesystem.write(CCloader_filename[system][1],CCloader_f,size)
if not success then return end
local success,message=package.loadlib(table.concat({love.filesystem.getSaveDirectory(),CCloader_filename[system][1]},"/"),"luaopen_CCloader")
return success,message
do
local fs=love.filesystem
if system=="Windows"then
local success,message=require("CCloader")
if success then
LOG.print("CC load successfully","warn",color.green)
else
LOG.print("Cannot load CC: "..message,"warn",color.red)
end
f=f()
if f then break end
if fs.getInfo("CCloader.dll")then
NOGAME="delCC"
end
elseif system=="Android"then
local armList={"arm64-v8a","armeabi-v7a"}
local libFunc,success,message
for i=1,#armList do
local CCloader_f,size=fs.read("data","libAndroid/"..armList[i].."/libCCloader.so")
if CCloader_f then
LOG.print("Read CC-"..armList[i].." successfully","warn",color.green)
success,message=fs.write("libCCloader.so",CCloader_f,size)
if success then
LOG.print("Write CC-"..armList[i].." to saving successfully","warn",color.green)
libFunc,message=package.loadlib(table.concat({fs.getSaveDirectory(),"libCCloader.so"},"/"),"luaopen_CCloader")
if libFunc then
LOG.print("CC lib loaded","warn",color.green)
break
else
LOG.print("Cannot load CC: "..message,"warn",color.red)
end
else
LOG.print("Write CC-"..armList[i].." to saving failed","warn",color.red)
end
else
LOG.print("Read CC-"..armList[i].." failed","warn",color.red)
end
end
if not libFunc then
LOG.print("failed to load CC","warn",color.red)
goto FAILED
end
LOG.print("CC load successfully","warn",color.green)
libFunc()
else
LOG.print("No CC for "..system,"warn",color.red)
goto FAILED
end
if not f then
CCloader_filename[system]=nil
LOG.print("failed to load CC","warn",color.red)
return
end
LOG.print("CC load successfully","warn",color.green)
f()
BOT={
local CCblockID={6,5,4,3,2,1,0}
CC={
getConf= cc.get_default_config ,--()options,weights
--setConf= cc.set_options ,--(options,hold,20g,bag7)
@@ -72,21 +91,21 @@ local function loadCC()
while i<400 do
F[i],i=false,i+1
end
BOT.update(P.AI_bot,F,P.b2b>=100,P.combo)
CC.update(P.AI_bot,F,P.b2b>=100,P.combo)
end
function CC_switch20G(P)
P.AIdata._20G=true
P.AI_keys={}
BOT.destroy(P.AI_bot)
local opt,wei=BOT.getConf()
BOT.setHold(opt,P.AIdata.hold)
BOT.set20G(opt,P.AIdata._20G)
BOT.setBag(opt,P.AIdata.bag7)
BOT.setNode(opt,P.AIdata.node)
P.AI_bot=BOT.new(opt,wei)
BOT.free(opt)BOT.free(wei)
CC.destroy(P.AI_bot)
local opt,wei=CC.getConf()
CC.setHold(opt,P.AIdata.hold)
CC.set20G(opt,P.AIdata._20G)
CC.setBag(opt,P.AIdata.bag7)
CC.setNode(opt,P.AIdata.node)
P.AI_bot=CC.new(opt,wei)
CC.free(opt)CC.free(wei)
for i=1,P.AIdata.next do
BOT.addNext(P.AI_bot,CCblockID[P.next[i].id])
CC.addNext(P.AI_bot,CCblockID[P.next[i].id])
end
CC_updateField(P)
P.hd=nil
@@ -99,12 +118,12 @@ local function loadCC()
P:newNext()
local id=CCblockID[P.next[P.AIdata.next].id]
if id then
BOT.addNext(P.AI_bot,id)
CC.addNext(P.AI_bot,id)
end
collectgarbage()
end
end
loadCC()
::FAILED::
-------------------------------------------------9 Stack setup
local dirCount={1,1,3,3,3,0,1}
local spinOffset={
@@ -303,11 +322,11 @@ return{
},
["CC"]={
function(P)--Start thinking
BOT.think(P.AI_bot)
CC.think(P.AI_bot)
return 2
end,
function(P,ctrl)--Poll keys
local success,dest,hold,move=BOT.getMove(P.AI_bot)
local success,dest,hold,move=CC.getMove(P.AI_bot)
if success==2 then
ins(ctrl,6)
return 3

View File

@@ -30,6 +30,8 @@ setting={
text=true,
warn=true,
highCam=false,
nextPos=false,
fullscreen=false,
bg=true,
powerInfo=false,
@@ -71,7 +73,7 @@ stat={
}
for i=1,25 do
stat.clear[i]={0,0,0,0,0}
stat.spin[i]={0,0,0,0,0}
stat.spin[i]={0,0,0,0,0,0}
end
keyMap={

View File

@@ -34,9 +34,9 @@ function destroyPlayers()
freeRow.discard(rem(P.visTime))
end
if P.AI_mode=="CC"then
BOT.free(P.bot_opt)
BOT.free(P.bot_wei)
BOT.destroy(P.AI_bot)
CC.free(P.bot_opt)
CC.free(P.bot_wei)
CC.destroy(P.AI_bot)
P.AI_mode=nil
end
players[i]=nil
@@ -287,7 +287,7 @@ function loadGame(M,ifQuickPlay)
drawableText.modeName:set(text.modes[M][1])
drawableText.levelName:set(text.modes[M][2])
needResetGameData=true
SCN.swapTo("play",ifQuickPlay and"swipe"or"fade_togame")
SCN.swapTo("play",ifQuickPlay and"swipeD"or"fade_togame")
SFX.play("enter")
end
function resetGameData()

View File

@@ -58,7 +58,6 @@ if setting.lang==1 or setting.lang==2 then
"少女祈祷中",
"扫雷好玩!",
"请不要向对方块不感兴趣的路人推荐此游戏。",
"你可以长按R键重新开始游戏(也不是很长)",
"你可以从统计页面打开游戏存档目录",
"魔方好玩!",
"喵!",
@@ -152,7 +151,6 @@ elseif setting.lang==3 then
"l-=-1",
"Is B2B2B2B possible?",
"Initial Rotation etc. can save your life",
"Hold R key to restart game",
"Hello world!",
"Headphones for better experience",
"Have you noticed what does \"rotating\" do to block?",

View File

@@ -191,7 +191,9 @@ customRange={
local function T(s,t)return love.graphics.newText(setFont(s),t)end
drawableText={
question=T(100,"?"),
right=T(45,""),
bpm=T(15,"BPM"),kpm=T(15,"KPM"),
speedLV=T(20,"speed level"),
atk=T(20,"Attack"),
eff=T(20,"Efficiency"),
@@ -224,7 +226,7 @@ drawableText={
preview=T(40),
keyboard=T(25),joystick=T(25),
ctrlSetHelp=T(30),
musicRoom=T(80),nowPlaying=T(60),
musicRoom=T(80),nowPlaying=T(50),
VKTchW=T(30),VKOrgW=T(30),VKCurW=T(30),
noScore=T(45),highScore=T(30),
}

View File

@@ -26,6 +26,9 @@ local gameEnv0={
clearFX=2,
shakeFX=3,
highCam=false,
nextPos=false,
drop=60,lock=60,
wait=0,fall=0,
_20G=false,bone=false,
@@ -178,9 +181,22 @@ local function updateLine(P,dt)
end
end
end
local bn=P.fieldBeneath
if bn>0 then
P.fieldBeneath=max(bn-P.gameEnv.pushSpeed,0)
local y=P.fieldBeneath
if y>0 then
P.fieldBeneath=max(y-P.gameEnv.pushSpeed,0)
end
if P.gameEnv.highCam then
local f=P.fieldUp
if not P.alive then
y=0
else
y=30*max(min(#P.field-19.5-P.fieldBeneath/30,P.imgY-17),0)
end
if f~=y then
P.fieldUp=f>y and max(f*.95+y*.05-2,y)or ceil(f*.97+y*.03+1,y)
end
end
end
local function updateFXs(P,dt)
@@ -549,6 +565,7 @@ do--function Pdraw_norm(P)
function Pdraw_norm(P)
local _
local ENV=P.gameEnv
local FBN,FUP=P.fieldBeneath,P.fieldUp
gc.push("transform")
gc.translate(P.x,P.y)gc.scale(P.size)
@@ -569,20 +586,25 @@ do--function Pdraw_norm(P)
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(P.fieldBeneath/30))+P.fieldBeneath
y=30*(y-int((FBN+FUP)/30))+FBN+FUP
gc.line(0,y,300,y)
end
end
--In-field things
gc.push("transform")
gc.translate(0,P.fieldBeneath)
gc.translate(0,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)
--Draw field
local V=P.visTime
local F=P.field
if P.falling==-1 then--Blocks only
for j=int(P.fieldBeneath/30+1),#F do
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
@@ -599,7 +621,7 @@ do--function Pdraw_norm(P)
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(P.fieldBeneath/30+1),H do
for j=int(FBN/30+1),H do
while j==P.clearingRow[h]do
h=h+1
dy=dy+stepY
@@ -622,6 +644,11 @@ do--function Pdraw_norm(P)
gc.translate(0,dy)
end
--Draw spawn line
gc.setColor(1,sin(Timer())*.4+.5,0,.5)
gc.setLineWidth(4)
gc.line(0,0-FBN,300,0-FBN)
--Draw FXs
drawFXs(P)
@@ -678,6 +705,22 @@ do--function Pdraw_norm(P)
gc.draw(IMG.spinCenter,x,600-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
end
gc.setScissor()
gc.pop()
@@ -999,6 +1042,14 @@ local function Pdraw_demo(P)
TEXT.draw(P.bonus)
gc.pop()
end
function player.drawTargetLine(P,r)
if r<21+(P.fieldBeneath+P.fieldUp)/30 and r>0 then
gc.setLineWidth(4)
gc.setColor(1,r>10 and 0 or rnd(),.5)
local dx,dy=150+P.fieldOff.x,70+P.fieldOff.y+P.fieldBeneath+P.fieldUp
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
end
end
--------------------------</Paint>--------------------------
--------------------------<Lib Func>--------------------------
@@ -1021,7 +1072,7 @@ local function getNewStatTable()
}
for i=1,25 do
T.clear[i]={0,0,0,0,0}
T.spin[i]={0,0,0,0,0}
T.spin[i]={0,0,0,0,0,0}
T.clears[i]=0
T.spins[i]=0
end
@@ -1165,18 +1216,18 @@ local function loadAI(P,AIdata)--Load AI params
bag=AIdata.bag,
node=AIdata.node,
}
if not BOT then P.AI_mode="9S"end
if not CC then P.AI_mode="9S"end
if P.AI_mode=="CC"then
P.RS=kickList.AIRS
local opt,wei=BOT.getConf()
BOT.setHold(opt,P.AIdata.hold)
BOT.set20G(opt,P.AIdata._20G)
BOT.setBag(opt,P.AIdata.bag=="bag")
BOT.setNode(opt,P.AIdata.node)
P.AI_bot=BOT.new(opt,wei)
BOT.free(opt)BOT.free(wei)
local opt,wei=CC.getConf()
CC.setHold(opt,P.AIdata.hold)
CC.set20G(opt,P.AIdata._20G)
CC.setBag(opt,P.AIdata.bag=="bag")
CC.setNode(opt,P.AIdata.node)
P.AI_bot=CC.new(opt,wei)
CC.free(opt)CC.free(wei)
for i=1,AIdata.next do
BOT.addNext(P.AI_bot,CCblockID[P.next[i].id])
CC.addNext(P.AI_bot,CCblockID[P.next[i].id])
end
elseif P.AI_mode=="9S"then
P.RS=kickList.TRS
@@ -1269,6 +1320,7 @@ local function newEmptyPlayer(id,x,y,size)
P.combo,P.b2b=0,0
P.garbageBeneath=0
P.fieldBeneath=0
P.fieldUp=0
P.score1,P.b2b1=0,0
P.dropFX,P.moveFX,P.lockFX,P.clearFX={},{},{},{}
@@ -1811,7 +1863,7 @@ function player.hold(P,ifpre)
if P.AI_mode=="CC"then
local next=P.next[P.AIdata.next]
if next then
BOT.addNext(P.AI_bot,CCblockID[next.id])
CC.addNext(P.AI_bot,CCblockID[next.id])
end
end
else
@@ -1851,7 +1903,7 @@ function player.popNext(P)--Pop next queue to hand
if P.AI_mode=="CC"then
local next=P.next[P.AIdata.next]
if next then
BOT.addNext(P.AI_bot,CCblockID[next.id])
CC.addNext(P.AI_bot,CCblockID[next.id])
end
end
@@ -1912,8 +1964,8 @@ function player.cancel(P,N)--Cancel Garbage
return off
end
do--player.drop(P)--Place piece
local b2bPoint={50,100,180,300}
local b2bATK={3,5,8,10}
local b2bPoint={50,100,180,300,800}
local b2bATK={3,5,8,10,20}
local clearSCR={80,200,400}
local spinSCR={--[blockName][row]
{200,750,1300},--Z
@@ -1923,7 +1975,7 @@ do--player.drop(P)--Place piece
{250,800,1400},--T
{260,900,1700},--O
{300,1200,1700},--I
{220,800,2000,3000},--Else
{220,800,2000,3000,8000},--Else
}
--B2BMUL:1.2/2.0
--Techrash:1K;MUL:1.3/1.8
@@ -1932,7 +1984,7 @@ do--player.drop(P)--Place piece
local reDef={0,1,1,2,3,3,4,4,5}
local spinName={"zspin","sspin","jspin","lspin","tspin","ospin","ispin","zspin","sspin","pspin","qspin","fspin","espin","tspin","uspin","vspin","wspin","xspin","jspin","lspin","rspin","yspin","hspin","nspin","ispin"}
local clearName={"single","double","triple","techrash","pentcrash"}
local spin_n={[0]="spin_0","spin_1","spin_2","spin_3","spin_3"}
local spin_n={[0]="spin_0","spin_1","spin_2","spin_3","spin_3","spin_3"}
local clear_n={"clear_1","clear_2","clear_3","clear_4","clear_4"}
local ren_n={}for i=1,11 do ren_n[i]="ren_"..i end
local finesseList={
@@ -1964,6 +2016,7 @@ do--player.drop(P)--Place piece
local cmb=P.combo
P.waiting=P.gameEnv.wait
local STAT=P.stat
local CB,CX,CY=P.cur,P.curX,P.curY
local clear--If (perfect)clear
local cc,gbcc=0,0--Row/garbage-row cleared,full-part
local atk,exblock=0,0--Attack & extra defense
@@ -1972,12 +2025,10 @@ do--player.drop(P)--Place piece
local dospin=0
local mini
--Spin check
--Tri-corner spin check
if P.spinLast then
--Tri-corner
if P.cur.id<6 then
local x,y=P.curX+P.sc[2],P.curY+P.sc[1]
if CB.id<6 then
local x,y=CX+P.sc[2],CY+P.sc[1]
local c=0
if P:solid(x-1,y+1)then c=c+1 end
if P:solid(x+1,y+1)then c=c+1 end
@@ -1987,11 +2038,10 @@ do--player.drop(P)--Place piece
if c>2 then dospin=dospin+1 end
end
::NTC::
--Immovable
if P:ifoverlap(P.cur.bk,P.curX-1,P.curY)and P:ifoverlap(P.cur.bk,P.curX+1,P.curY)and P:ifoverlap(P.cur.bk,P.curX,P.curY+1)then
dospin=dospin+2
end
end
--Immovable spin check
if P:ifoverlap(CB.bk,CX,CY+1)and P:ifoverlap(CB.bk,CX-1,CY)and P:ifoverlap(CB.bk,CX+1,CY)then
dospin=dospin+2
end
--Lock block to field
@@ -2002,7 +2052,7 @@ do--player.drop(P)--Place piece
--Check rows to be cleared
for i=0,P.r-1 do
local h=P.curY+i
local h=CY+i
if P:ckfull(h)then
cc=cc+1
P.clearingRow[cc]=h-cc+1
@@ -2033,19 +2083,11 @@ do--player.drop(P)--Place piece
end
--Final spin check
if P.spinLast then
if dospin>0 then
if cc>0 then
if dospin>0 then
dospin=dospin+P.spinLast
if dospin<2 then
mini=P.cur.id<6 and cc<3 and cc<P.r
end
else
dospin=false
end
elseif cc==0 then
if dospin==0 then
dospin=false
dospin=dospin+(P.spinLast or 0)
if dospin<2 then
mini=CB.id<6 and cc<3 and cc<P.r
end
end
else
@@ -2054,21 +2096,24 @@ do--player.drop(P)--Place piece
--Finesse: roof check
local finesse
if P.cur.id>7 then
if CB.id>7 then
finesse=true
elseif P.curY<=18 then
local y0=P.curY
local x,c=P.curX,P.c
local B=P.cur.bk
elseif CY<=18 then
local y0=CY
local x,c=CX,P.c
local B=CB.bk
for x=1,c do
local y
for i=#B,1,-1 do
if B[i][x]then y=i;goto L1 end
if B[i][x]then
y=i
goto L1
end
end
goto L2
::L1::
if y then
x=P.curX+x-1
x=CX+x-1
for y=y0+y,#P.field do
--Roof=finesse
if P:solid(x,y)then
@@ -2111,8 +2156,8 @@ do--player.drop(P)--Place piece
--Finesse check (control)
if not finesse then
if dospin then P.ctrlCount=P.ctrlCount-2 end--Allow 2 more step for roof-less spin
local id=P.cur.id
local d=P.ctrlCount-finesseList[id][P.dir+1][P.curX]
local id=CB.id
local d=P.ctrlCount-finesseList[id][P.dir+1][CX]
if d>=2 then
P:finesseError(2)
elseif d>0 then
@@ -2123,9 +2168,9 @@ do--player.drop(P)--Place piece
if cc>0 then
cmb=cmb+1
if dospin then
cscore=(spinSCR[P.cur.name]or spinSCR[8])[cc]
cscore=(spinSCR[CB.name]or spinSCR[8])[cc]
if P.b2b>1000 then
P:showText(text.b3b..text.block[P.cur.name]..text.spin.." "..text.clear[cc],0,-30,35,"stretch")
P:showText(text.b3b..text.block[CB.name]..text.spin.." "..text.clear[cc],0,-30,35,"stretch")
atk=b2bATK[cc]+cc*.5
exblock=exblock+1
cscore=cscore*2
@@ -2134,7 +2179,7 @@ do--player.drop(P)--Place piece
VOC.play("b3b",CHN)
end
elseif P.b2b>=50 then
P:showText(text.b2b..text.block[P.cur.name]..text.spin.." "..text.clear[cc],0,-30,35,"spin")
P:showText(text.b2b..text.block[CB.name]..text.spin.." "..text.clear[cc],0,-30,35,"spin")
atk=b2bATK[cc]
cscore=cscore*1.2
STAT.b2b=STAT.b2b+1
@@ -2142,7 +2187,7 @@ do--player.drop(P)--Place piece
VOC.play("b2b",CHN)
end
else
P:showText(text.block[P.cur.name]..text.spin.." "..text.clear[cc],0,-30,45,"spin")
P:showText(text.block[CB.name]..text.spin.." "..text.clear[cc],0,-30,45,"spin")
atk=2*cc
end
sendTime=20+atk*20
@@ -2158,10 +2203,10 @@ do--player.drop(P)--Place piece
else
P.b2b=P.b2b+b2bPoint[cc]
end
P.lastClear=P.cur.id*10+cc
P.lastClear=CB.id*10+cc
if P.human then
SFX.play(spin_n[cc])
VOC.play(spinName[P.cur.name],CHN)
VOC.play(spinName[CB.name],CHN)
end
elseif cc>=4 then
cscore=cc==4 and 1000 or 1500
@@ -2190,7 +2235,7 @@ do--player.drop(P)--Place piece
atk=cc
end
P.b2b=P.b2b+cc*80-220
P.lastClear=P.cur.name*10+cc
P.lastClear=CB.name*10+cc
end
if P.human then
VOC.play(clearName[cc],CHN)
@@ -2226,7 +2271,7 @@ do--player.drop(P)--Place piece
else
goto checkB2Breduce
end
P.lastClear=P.cur.name*10+5
P.lastClear=CB.name*10+5
goto skipB2Breduce
end
@@ -2283,7 +2328,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,P.cur.color,P.lastClear,dospin,cmb)
P:attack(P.atker[i],send,sendTime,M,CB.color,P.lastClear,dospin,cmb)
end
else
T=randomTarget(P)
@@ -2296,7 +2341,7 @@ do--player.drop(P)--Place piece
T=randomTarget(P)
end
if T then
P:attack(T,send,sendTime,1,P.cur.color,P.lastClear,dospin,cmb)
P:attack(T,send,sendTime,1,CB.color,P.lastClear,dospin,cmb)
end
end
if P.human and send>3 then SFX.play("emit",min(send,7)*.1)end
@@ -2315,11 +2360,11 @@ do--player.drop(P)--Place piece
--Spin bonus
if dospin then
P:showText(text.block[P.cur.name]..text.spin,0,-30,45,"appear")
P:showText(text.block[CB.name]..text.spin,0,-30,45,"appear")
P.b2b=P.b2b+20
if P.human then
SFX.play("spin_0")
VOC.play(spinName[P.cur.name],CHN)
VOC.play(spinName[CB.name],CHN)
end
dropScore=25
end
@@ -2366,7 +2411,7 @@ do--player.drop(P)--Place piece
end
--Update stat
local n=P.cur.name
local n=CB.name
if dospin then
_=STAT.spin[n] _[cc+1]=_[cc+1]+1--Spin[1~25][0~4]
_=STAT.spins _[cc+1]=_[cc+1]+1--Spin[0~4]
@@ -2490,7 +2535,7 @@ function player.lose(P)
end
if P.AI_mode=="CC"then
BOT.destroy(P.AI_bot)
CC.destroy(P.AI_bot)
P.hd=nil
loadAI(P,P.AIdata)
P:popNext()
@@ -2734,6 +2779,8 @@ function player.act.restart(P)
if game.frame<240 or game.result then
TASK.removeTask_code(TICK.autoPause)
resetPartGameData()
else
LOG.print(text.holdR,20,color.orange)
end
end
function player.act.insLeft(P,auto)
@@ -2781,8 +2828,7 @@ function player.act.insRight(P,auto)
end
end
function player.act.insDown(P)
if not P.cur then return end
if P.curY>P.imgY then
if P.cur and P.curY>P.imgY then
if P.gameEnv.dropFX and P.gameEnv.block and P.curY-P.imgY-P.r>-1 then
P:createDropFX(P.curX,P.curY-1,P.c,P.curY-P.imgY-P.r+1)
end
@@ -2806,9 +2852,8 @@ function player.act.down1(P)
end
end
function player.act.down4(P)
if not P.cur then return end
if P.curY>P.imgY then
local y=max(P.cur-4,P.imgY)
if P.cur and P.curY>P.imgY then
local y=max(P.curY-4,P.imgY)
if P.gameEnv.dropFX and P.gameEnv.block and P.curY-y-P.r>-1 then
P:createDropFX(P.curX,P.curY-1,P.c,P.curY-y-P.r+1)
end
@@ -2818,9 +2863,8 @@ function player.act.down4(P)
end
end
function player.act.down10(P)
if not P.cur then return end
if P.curY>P.imgY then
local y=max(P.cur-10,P.imgY)
if P.cur and P.curY>P.imgY then
local y=max(P.curY-10,P.imgY)
if P.gameEnv.dropFX and P.gameEnv.block and P.curY-y-P.r>-1 then
P:createDropFX(P.curX,P.curY-1,P.c,P.curY-y-P.r+1)
end

View File

@@ -160,7 +160,7 @@ do--p15
move=0,
state=2,
color=2,
color=0,
blind=false,
slide=true,
pathVis=true,
@@ -262,8 +262,10 @@ do--p15
elseif S.time<5 then LOG.print("太强了",color.lBlue)
elseif S.time<7.5 then LOG.print("很强",color.lBlue)
elseif S.time<10 then LOG.print("可以的",color.lBlue)
elseif S.time<20 then LOG.print("再接再厉",color.lBlue)
elseif S.time<30 then LOG.print("多加练习",color.lBlue)
elseif S.time<20 then LOG.print("马上入门了",color.lBlue)
elseif S.time<30 then LOG.print("入门不远了",color.lBlue)
elseif S.time<60 then LOG.print("多加练习",color.lBlue)
else LOG.print("第一次玩?加油",color.lBlue)
end
SFX.play("win")
end
@@ -287,7 +289,7 @@ do--p15
S.time=0
S.move=0
elseif k=="c"then
if S.state==2 then
if S.state~=1 then
S.color=(S.color+1)%5
end
elseif k=="r"then
@@ -339,67 +341,67 @@ do--p15
local frontColor={
[0]={
color.white,color.white,color.white,color.white,
color.white,color.white,color.white,color.white,
color.white,color.white,color.white,color.white,
color.white,color.white,color.white,color.white,
},--Black
{
color.white,color.white,color.white,color.white,
color.white,color.white,color.white,color.white,
color.white,color.white,color.white,color.white,
color.white,color.white,color.white,color.white,
},--Grey
{
color.lRed,color.lRed,color.lRed,color.lRed,
color.lBlue,color.lBlue,color.lBlue,color.lBlue,
color.lGreen,color.lYellow,color.lPurple,color.lPurple,
color.lGreen,color.lYellow,color.lPurple,color.lPurple,
},--Colorful(row)
{
color.lRed,color.lRed,color.lRed,color.lRed,
color.lGreen,color.lBlue,color.lBlue,color.lBlue,
color.lGreen,color.lYellow,color.lPurple,color.lPurple,
color.lGreen,color.lYellow,color.lPurple,color.lPurple,
},--Colorful(rank)
},--Colored(rank)
{
color.lRed,color.lRed,color.lRed,color.lRed,
color.lOrange,color.lYellow,color.lYellow,color.lYellow,
color.lOrange,color.lGreen,color.lBlue,color.lBlue,
color.lOrange,color.lGreen,color.lBlue,color.lBlue,
},--Colorful(row)
},--Rainbow(rank)
{
color.lRed,color.lRed,color.lRed,color.lRed,
color.lBlue,color.lBlue,color.lBlue,color.lBlue,
color.lGreen,color.lYellow,color.lPurple,color.lPurple,
color.lGreen,color.lYellow,color.lPurple,color.lPurple,
},--Colored(row)
{
color.white,color.white,color.white,color.white,
color.white,color.white,color.white,color.white,
color.white,color.white,color.white,color.white,
color.white,color.white,color.white,color.white,
},--Grey
{
color.white,color.white,color.white,color.white,
color.white,color.white,color.white,color.white,
color.white,color.white,color.white,color.white,
color.white,color.white,color.white,color.white,
},--Black
}
local backColor={
[0]={
color.black,color.black,color.black,color.black,
color.black,color.black,color.black,color.black,
color.black,color.black,color.black,color.black,
color.black,color.black,color.black,color.black,
},--Black
{
color.dGrey,color.dGrey,color.dGrey,color.dGrey,
color.dGrey,color.dGrey,color.dGrey,color.dGrey,
color.dGrey,color.dGrey,color.dGrey,color.dGrey,
color.dGrey,color.dGrey,color.dGrey,color.dGrey,
},--Grey
{
color.dRed,color.dRed,color.dRed,color.dRed,
color.dBlue,color.dBlue,color.dBlue,color.dBlue,
color.dGreen,color.dYellow,color.dPurple,color.dPurple,
color.dGreen,color.dYellow,color.dPurple,color.dPurple,
},--Colorful(row)
{
color.dRed,color.dRed,color.dRed,color.dRed,
color.dGreen,color.dBlue,color.dBlue,color.dBlue,
color.dGreen,color.dYellow,color.dPurple,color.dPurple,
color.dGreen,color.dYellow,color.dPurple,color.dPurple,
},--Colorful(rank)
},--Colored(rank)
{
color.dRed,color.dRed,color.dRed,color.dRed,
color.dOrange,color.dYellow,color.dYellow,color.dYellow,
color.dOrange,color.dGreen,color.dBlue,color.dBlue,
color.dOrange,color.dGreen,color.dBlue,color.dBlue,
},--Rainbow(rank)
{
color.dRed,color.dRed,color.dRed,color.dRed,
color.dBlue,color.dBlue,color.dBlue,color.dBlue,
color.dGreen,color.dYellow,color.dPurple,color.dPurple,
color.dGreen,color.dYellow,color.dPurple,color.dPurple,
},--Colored(row)
{
color.dGrey,color.dGrey,color.dGrey,color.dGrey,
color.dGrey,color.dGrey,color.dGrey,color.dGrey,
color.dGrey,color.dGrey,color.dGrey,color.dGrey,
color.dGrey,color.dGrey,color.dGrey,color.dGrey,
},--Grey
{
color.black,color.black,color.black,color.black,
color.black,color.black,color.black,color.black,
color.black,color.black,color.black,color.black,
color.black,color.black,color.black,color.black,
},--Black
}
function Pnt.p15()
local S=sceneTemp
@@ -409,9 +411,16 @@ do--p15
gc.print(format("%.3f",S.time),1026,80)
gc.print(S.move,1026,150)
if S.state==2 then gc.setColor(.9,.9,0) --win
elseif S.state==1 then gc.setColor(.9,.9,.9)--game
elseif S.state==0 then gc.setColor(.2,.8,.2)--ready
if S.state==2 then
--Draw no-setting area
gc.setColor(1,0,0,.3)
gc.rectangle("fill",15,300,285,330)
gc.setColor(.9,.9,0)--win
elseif S.state==1 then
gc.setColor(.9,.9,.9)--game
elseif S.state==0 then
gc.setColor(.2,.8,.2)--ready
end
gc.setLineWidth(10)
gc.rectangle("line",313,33,654,654,18)
@@ -461,7 +470,7 @@ do--schulte_G
time=0,
error=0,
state=0,
target=0,
progress=0,
}
end
@@ -477,26 +486,31 @@ do--schulte_G
end
local function tapBoard(x,y)
local S=sceneTemp
local R=S.rank
if x>320 and x<960 and y>40 and y<680 then
if S.state==0 then
newBoard()
S.state=1
S.startTime=Timer()
S.target=1
S.progress=0
elseif S.state==1 then
x=S.rank*(int((y-40)/640*S.rank))+int((x-320)/640*S.rank)+1
if S.board[x]==S.target then
S.target=S.target+1
if S.target<=S.rank^2 then
local X=int((x-320)/640*R)
local Y=int((y-40)/640*R)
x=R*Y+X+1
if S.board[x]==S.progress+1 then
S.progress=S.progress+1
if S.progress<R^2 then
SFX.play("lock")
else
S.time=Timer()-S.startTime+S.error
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)
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)
end
end
end
@@ -516,7 +530,7 @@ do--schulte_G
S.time=0
S.error=0
S.state=0
S.target=0
S.progress=0
end
elseif key=="z"or key=="x"then
tapBoard(ms.getPosition())
@@ -554,26 +568,33 @@ do--schulte_G
gc.print(S.error,1026,150)
setFont(70)
mStr(S.state==1 and S.target or S.state==0 and"Ready"or S.state==2 and"Win",1130,300)
mStr(S.state==1 and S.progress or S.state==0 and"Ready"or S.state==2 and"Win",1130,300)
if S.state==1 then gc.setColor(.9,.9,.9) --game
elseif S.state==0 then gc.setColor(.2,.8,.2)--ready
elseif S.state==2 then gc.setColor(.9,.9,0) --win
if S.state==2 then
--Draw no-setting area
gc.setColor(1,0,0,.3)
gc.rectangle("fill",60,295,200,150)
gc.setColor(.9,.9,0)--win
elseif S.state==1 then
gc.setColor(.9,.9,.9)--game
elseif S.state==0 then
gc.setColor(.2,.8,.2)--ready
end
gc.setLineWidth(10)
gc.rectangle("line",310,30,660,660)
local rank=S.rank
local width=640/rank
local blind=S.state==0 or S.blind and(S.state==2 or S.target>1)
local blind=S.state==0 or S.blind and S.state==1 and S.progress>0
gc.setLineWidth(4)
local f=fontSize[rank]
setFont(f)
for i=1,rank do
for j=1,rank do
local N=S.board[rank*(i-1)+j]
if not(S.state==1 and S.disappear and N<S.target)then
gc.setColor(.6,.4,.4)
if not(S.state==1 and S.disappear and N<=S.progress)then
gc.setColor(.4,.5,.6)
gc.rectangle("fill",320+(j-1)*width,(i-1)*width+40,width,width)
gc.setColor(1,1,1)
gc.rectangle("line",320+(j-1)*width,(i-1)*width+40,width,width)
@@ -724,12 +745,24 @@ do--intro
if k==2 then
VOC.play("bye")
SCN.back()
elseif newVersionLaunch then
SCN.push("main","fade")
SCN.swapTo("history","fade")
LOG.print(text.newVersion,"warn",color.lBlue)
elseif NOGAME=="delCC"then
LOG.print("Please quit the game, then delete CCloader.dll(21KB) in saving folder!",600,color.yellow)
LOG.print("请关闭游戏,然后删除存档文件夹内的 CCloader.dll(21KB) !",600,color.yellow)
TASK.new(function(S)
S[1]=S[1]-1
if S[1]==0 then
love.system.openURL(love.filesystem.getSaveDirectory())
return true
end
end,{60})
else
SCN.go("main")
if newVersionLaunch then
SCN.push("main","fade")
SCN.swapTo("history","fade")
LOG.print(text.newVersion,"warn",color.lBlue)
else
SCN.go("main")
end
end
end
function touchDown.intro(id,x,y)
@@ -871,9 +904,11 @@ do--mode
end
t=k/t
if cam.sel then
cam.x=(cam.x-180)*t+180;cam.y=cam.y*t
cam.x=(cam.x-180)*t+180
cam.y=cam.y*t
else
cam.x=cam.x*t;cam.y=cam.y*t
cam.x=cam.x*t
cam.y=cam.y*t
end
cam.k=k
cam.keyCtrl=false
@@ -967,18 +1002,18 @@ do--mode
local x,y,k=cam.x,cam.y,cam.k
local F
if not SCN.swapping then
if kb.isDown("up", "w")then y=y-10*k;F=true end
if kb.isDown("down","s")then y=y+10*k;F=true end
if kb.isDown("left","a")then x=x-10*k;F=true end
if kb.isDown("right","d")then x=x+10*k;F=true end
if kb.isDown("up", "w")then y=y-10*k F=true end
if kb.isDown("down","s")then y=y+10*k F=true end
if kb.isDown("left","a")then x=x-10*k F=true end
if kb.isDown("right","d")then x=x+10*k F=true end
local js1=joysticks[1]
if js1 then
local k=js1:getAxis(1)
if k~="c"then
if k=="u"or k=="ul"or k=="ur"then y=y-10*k;F=true end
if k=="d"or k=="dl"or k=="dl"then y=y+10*k;F=true end
if k=="l"or k=="ul"or k=="dl"then x=x-10*k;F=true end
if k=="r"or k=="ur"or k=="dr"then x=x+10*k;F=true end
if k=="u"or k=="ul"or k=="ur"then y=y-10*k F=true end
if k=="d"or k=="dl"or k=="dl"then y=y+10*k F=true end
if k=="l"or k=="ul"or k=="dl"then x=x-10*k F=true end
if k=="r"or k=="ur"or k=="dr"then x=x+10*k F=true end
end
end
end
@@ -1190,14 +1225,23 @@ do--music
wheelScroll(y)
end
function keyDown.music(key)
local S=sceneTemp
if key=="down"then
sceneTemp=min(sceneTemp+1,BGM.len)
if S<BGM.len then
sceneTemp=S+1
SFX.play("move",.7)
end
elseif key=="up"then
sceneTemp=max(sceneTemp-1,1)
if S>1 then
sceneTemp=S-1
SFX.play("move",.7)
end
elseif key=="return"or key=="space"then
if BGM.nowPlay~=BGM.list[sceneTemp]then
SFX.play("click")
BGM.play(BGM.list[sceneTemp])
if BGM.nowPlay~=BGM.list[S]then
if setting.bgm>0 then
SFX.play("click")
BGM.play(BGM.list[S])
end
else
BGM.stop()
end
@@ -1212,27 +1256,27 @@ do--music
gc.setColor(1,1,1)
gc.draw(drawableText.musicRoom,22,23)
setFont(55)
gc.printf(BGM.list[sceneTemp],500,300,500,"right")
setFont(30)
if sceneTemp>1 then
gc.printf(BGM.list[sceneTemp-1],500,270,500,"right")
end
if sceneTemp<BGM.len then
gc.printf(BGM.list[sceneTemp+1],500,370,500,"right")
end
gc.draw(drawableText.right,270,350+10)
setFont(50)
gc.print(BGM.list[sceneTemp],320,350+5)
setFont(35)
if sceneTemp>1 then gc.print(BGM.list[sceneTemp-1],320,350-30)end
if sceneTemp<BGM.len then gc.print(BGM.list[sceneTemp+1],320,350+65)end
setFont(20)
if sceneTemp>2 then gc.print(BGM.list[sceneTemp-2],320,350-50)end
if sceneTemp<BGM.len-1 then gc.print(BGM.list[sceneTemp+2],320,350+110)end
gc.draw(IMG.title,500,610,nil,1.5,nil,206,35)
gc.draw(IMG.title,840,220,nil,1.5,nil,206,35)
if BGM.nowPlay then
gc.draw(drawableText.nowPlaying,490-drawableText.nowPlaying:getWidth(),450)
setFont(60)
gc.draw(drawableText.nowPlaying,700-drawableText.nowPlaying:getWidth(),500)
setFont(50)
gc.setColor(sin(Timer()*.5)*.2+.8,sin(Timer()*.7)*.2+.8,sin(Timer())*.2+.8)
gc.print(BGM.nowPlay,500,450)
gc.print(BGM.nowPlay,710,500)
local t=-Timer()%2.3/2
if t<1 then
gc.setColor(1,1,1,t)
gc.draw(IMG.title_color,500,610,nil,1.5+.1-.1*t,1.5+.3-.3*t,206,35)
gc.draw(IMG.title_color,840,220,nil,1.5+.1-.1*t,1.5+.3-.3*t,206,35)
end
end
end
@@ -1275,7 +1319,7 @@ do--custom
elseif key=="q"then
SCN.go("sequence")
elseif key=="e"then
SCN.swapTo("draw","swipe")
SCN.swapTo("draw","swipeL")
elseif #key==1 then
local T=tonumber(key)
if T and T>=1 and T<=5 then
@@ -1497,7 +1541,7 @@ do--draw
preField[sy][sx]=pen
end
elseif key=="e"then
SCN.swapTo("custom","swipe")
SCN.swapTo("custom","swipeL")
elseif key=="escape"then
SCN.back()
elseif key=="k"then
@@ -1737,6 +1781,7 @@ do--play
function Tmr.play(dt)
local _
local P1=players[1]
game.frame=game.frame+1
stat.time=stat.time+dt
@@ -1750,8 +1795,6 @@ do--play
end
end
local P1=players[1]
--Replay
if game.replaying then
_=game.replaying
@@ -1770,6 +1813,7 @@ do--play
end
game.replaying=_
end
--Counting,include pre-das,directy RETURN,or restart counting
if game.frame<180 then
if game.frame==179 then
@@ -1932,10 +1976,6 @@ do--play
--Warning
gc.push("transform")
gc.origin()
if restartCount>0 then
gc.setColor(0,0,0,restartCount*.05)
gc.rectangle("fill",0,0,scr.w,scr.h)
end
if game.warnLVL>0 then
gc.setColor(0,0,0,0)
SHADER.warning:send("level",game.warnLVL)
@@ -1943,6 +1983,10 @@ do--play
gc.rectangle("fill",0,0,scr.w,scr.h)
gc.setShader()
end
if restartCount>0 then
gc.setColor(0,0,0,restartCount*.05)
gc.rectangle("fill",0,0,scr.w,scr.h)
end
gc.pop()
end
end
@@ -1974,7 +2018,7 @@ do--pause
--From right-down, 60 degree each
radar={
(S.off+S.dig)/S.time*60,--DefPM
(S.send+S.dig)/S.time*60,--ADPM
(S.atk+S.dig)/S.time*60,--ADPM
S.atk/S.time*60, --AtkPM
S.send/S.time*60, --SendPM
S.piece/S.time*24, --LinePM

View File

@@ -16,8 +16,11 @@ local list={
"pure(mrz)",
"ball(shaw)",
"paper(mrz)",
"gem(notypey)",
"classic(_)",
"brick(notypey)",
"brick_light(notypey)",
"cartoon_cup(earety)",
"retro(notypey)",
"retro_grey(notypey)",
"text_bone(mrz)",
@@ -54,8 +57,15 @@ function SKIN.load()
gc.setDefaultFilter("nearest","nearest")
gc.setColor(1,1,1)
for i=1,#list do
local I=gc.newImage("/image/skin/"..list[i]..".png")
SKIN.lib[i],SKIN.libMini[i]={},{}--30/6
local N="/image/skin/"..list[i]..".png"
local I
if love.filesystem.getInfo(N)then
I=gc.newImage(N)
else
I=gc.newImage("/image/skin/"..list[1]..".png")
LOG.print("No skin file: "..list[i],color.red)
end
for j=1,11 do
SKIN.lib[i][j]=C(30,30)
gc.draw(I,30-30*j,0)

View File

@@ -56,7 +56,6 @@ Future outlook:
soduku
link-link
画图智能画笔
超高时场地上移
改连击攻击
场地序列一起复制
自定义消行要求(可复制)
@@ -72,11 +71,38 @@ Future outlook:
task-Z(新AI)
更多画面效果 & 一些3D小玩意
0.10.10: 画面优化 Graphics Update
新内容:
超屏视野:场地超高时镜头上移
生成预览:显示下一个Next的基准生成位置
新皮肤:gem(notypey)
新皮肤:brick_light(notypey)
新皮肤:cartoon_cup(earety)
改动:
卡块spin判定无须最后一步旋转(spin-5可以实现了!)
重开长按操作提示
优化两个小游戏体验
设置界面左右切换动画调整
音乐室再装修
ai难度再调整
可以显示CC加载失败详细信息
进入场景时滑条数字可见
代码:
删除两个多余的文件(6.5MB)
皮肤/音效/BGM文件缺失时不崩溃,只弹出警告
LOG.print取消"short"输出方式
目标行数线加入玩家绘图方法
win下提醒用户删掉存档内CCloader,声明两个全局变量
修复:
手机锁屏再解锁后可能屏幕方向错误(0.10.1没完全好,这次好了)
修复软降n格报错
进攻-极限 显示垃圾行数量错误
0.10.9: 舒尔特方格 Schulte Grid
新内容:
舒尔特方格
15p可关闭滑动轨迹显示
模式回放时方块不会完全隐藏
模式回放时方块不会完全隐藏
画图界面新增顶起一行和消除满行功能
把音乐室装修得更好看了
新BGM: Down
@@ -92,7 +118,7 @@ Future outlook:
整理player.lua文件
整理scr变量相关代码
所有音乐重新转码,BGM文件夹不再追踪
LOG.print新增"short"输出方式仅显示一个时长很短的不重要提示信息
LOG.print新增"short"输出方式,仅显示一个时长很短的不重要提示信息
修复:
CC死后不能正常复活
部分背景不能正确显示
@@ -102,7 +128,7 @@ Future outlook:
单挑模式玩家和电脑各三条生命,剩余生命数显示在场地右下角
新增复活动画
改动:
15p入口由软件锁改为主界面(自己试着找找看吧)
15p入口由软件锁改为主界面(自己试着找找看吧)(未来会开放)
优化15p体验,新增滑动操作开关和键盘反向
优化滑条信息显示
鼠标点击按钮后不失去焦点
@@ -116,7 +142,7 @@ Future outlook:
0.10.7: 15P更新 15puzzle update
新内容:
ghost和center透明度可调
15puzzle(软件锁界面输入815/1524/2435进入)
15puzzle(软件锁界面输入815/1524/2435进入)(已经弃用)
改动:
大多数滑条都会显示当前值
滑条交互机制优化