Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5eea97dd8b | ||
|
|
f0a118e714 | ||
|
|
3019f83999 | ||
|
|
438046f77f | ||
|
|
830f0ffbed | ||
|
|
849e5b586e | ||
|
|
f82e979f9c | ||
|
|
c9a3e3ce1b | ||
|
|
72dcb84662 | ||
|
|
4af2126254 | ||
|
|
42d7b1be94 | ||
|
|
a31474c43a | ||
|
|
75c7955bb5 | ||
|
|
c35152cf6e | ||
|
|
1b0ad009b0 | ||
|
|
e7c797bf14 | ||
|
|
e281634f72 |
BIN
BGM/8-bit happiness.ogg
Normal file
BIN
BGM/blank.ogg
BIN
BGM/cruelty.ogg
Normal file
BIN
BGM/end.ogg
Normal file
BIN
BGM/final.ogg
Normal file
BIN
BGM/infinite.ogg
BIN
BGM/newera.ogg
Normal file
BIN
BGM/push.ogg
BIN
BGM/race.ogg
BIN
BGM/reason.ogg
BIN
BGM/rockblock.ogg
Normal file
BIN
BGM/secret7th.ogg
Normal file
BIN
BGM/secret8th.ogg
Normal file
BIN
BGM/way.ogg
BIN
SFX/blip_1.ogg
Normal file
BIN
SFX/blip_2.ogg
Normal file
BIN
SFX/button.ogg
BIN
SFX/collect.ogg
Normal file
BIN
SFX/drop.ogg
BIN
SFX/emit.ogg
Normal file
BIN
SFX/lock.ogg
Normal file
BIN
SFX/ren_mega.ogg
Normal file
BIN
SFX/spin.ogg
BIN
SFX/swipe.ogg
Normal file
BIN
VOICE/I_1.ogg
Normal file
BIN
VOICE/I_2.ogg
Normal file
BIN
VOICE/J_1.ogg
Normal file
BIN
VOICE/J_2.ogg
Normal file
BIN
VOICE/L_1.ogg
Normal file
BIN
VOICE/L_2.ogg
Normal file
BIN
VOICE/O_1.ogg
Normal file
BIN
VOICE/O_2.ogg
Normal file
BIN
VOICE/PC_1.ogg
Normal file
BIN
VOICE/S_1.ogg
Normal file
BIN
VOICE/S_2.ogg
Normal file
BIN
VOICE/T_1.ogg
Normal file
BIN
VOICE/T_2.ogg
Normal file
BIN
VOICE/Z_1.ogg
Normal file
BIN
VOICE/Z_2.ogg
Normal file
BIN
VOICE/b2b_1.ogg
Normal file
BIN
VOICE/b2b_2.ogg
Normal file
BIN
VOICE/b2b_3.ogg
Normal file
BIN
VOICE/b3b_1.ogg
Normal file
BIN
VOICE/double_1.ogg
Normal file
BIN
VOICE/double_2.ogg
Normal file
BIN
VOICE/double_3.ogg
Normal file
BIN
VOICE/lose_1.ogg
Normal file
BIN
VOICE/lose_2.ogg
Normal file
BIN
VOICE/lose_3.ogg
Normal file
BIN
VOICE/mini_1.ogg
Normal file
BIN
VOICE/nya_1.ogg
Normal file
BIN
VOICE/nya_11.ogg
Normal file
BIN
VOICE/nya_12.ogg
Normal file
BIN
VOICE/nya_13.ogg
Normal file
BIN
VOICE/nya_2.ogg
Normal file
BIN
VOICE/nya_21.ogg
Normal file
BIN
VOICE/nya_22.ogg
Normal file
BIN
VOICE/nya_3.ogg
Normal file
BIN
VOICE/nya_31.ogg
Normal file
BIN
VOICE/nya_4.ogg
Normal file
BIN
VOICE/nya_o0.ogg
Normal file
BIN
VOICE/nya_o1.ogg
Normal file
BIN
VOICE/nya_o2.ogg
Normal file
BIN
VOICE/nya_o3.ogg
Normal file
BIN
VOICE/nya_o4.ogg
Normal file
BIN
VOICE/nya_o5.ogg
Normal file
BIN
VOICE/single_1.ogg
Normal file
BIN
VOICE/single_2.ogg
Normal file
BIN
VOICE/single_3.ogg
Normal file
BIN
VOICE/spin-_1.ogg
Normal file
BIN
VOICE/spin-_2.ogg
Normal file
BIN
VOICE/spin_1.ogg
Normal file
BIN
VOICE/spin_2.ogg
Normal file
BIN
VOICE/spin_3.ogg
Normal file
BIN
VOICE/spin_4.ogg
Normal file
BIN
VOICE/spin_5.ogg
Normal file
BIN
VOICE/triple_1.ogg
Normal file
BIN
VOICE/triple_2.ogg
Normal file
BIN
VOICE/tts_1.ogg
Normal file
BIN
VOICE/win_1.ogg
Normal file
BIN
VOICE/win_2.ogg
Normal file
BIN
VOICE/这游戏有问题.ogg
Normal file
80
ai.lua
@@ -21,26 +21,26 @@ spinOffset={
|
|||||||
--[[
|
--[[
|
||||||
controlname:
|
controlname:
|
||||||
1~5:mL,mR,rR,rL,rF,
|
1~5:mL,mR,rR,rL,rF,
|
||||||
6~9:hD,sD,H,R,
|
6~10:hD,sD,H,A,R,
|
||||||
10~12:LL,RR,DD
|
11~13:LL,RR,DD
|
||||||
]]
|
]]
|
||||||
FCL={
|
FCL={
|
||||||
[1]={
|
[1]={
|
||||||
{{10},{10,2},{1},{},{2},{2,2},{11,1},{11}},
|
{{11},{11,2},{1},{},{2},{2,2},{12,1},{12}},
|
||||||
{{10,4},{10,3},{10,2,3},{4},{3},{2,3},{2,2,3},{11,4},{11,3}},
|
{{11,4},{11,3},{11,2,3},{4},{3},{2,3},{2,2,3},{12,4},{12,3}},
|
||||||
},
|
},
|
||||||
[3]={
|
[3]={
|
||||||
{{10},{10,2},{1},{},{2},{2,2},{11,1},{11},},
|
{{11},{11,2},{1},{},{2},{2,2},{12,1},{12},},
|
||||||
{{3,10},{10,3},{10,2,3},{1,3},{3},{2,3},{2,2,3},{11,1,3},{11,3},},
|
{{3,11},{11,3},{11,2,3},{1,3},{3},{2,3},{2,2,3},{12,1,3},{12,3},},
|
||||||
{{10,5},{10,2,5},{1,5},{5},{2,5},{2,2,5},{11,1,5},{11,5},},
|
{{11,5},{11,2,5},{1,5},{5},{2,5},{2,2,5},{12,1,5},{12,5},},
|
||||||
{{10,4},{10,2,4},{1,4},{4},{2,4},{2,2,4},{11,1,4},{11,4},{4,11},},
|
{{11,4},{11,2,4},{1,4},{4},{2,4},{2,2,4},{12,1,4},{12,4},{4,12},},
|
||||||
},
|
},
|
||||||
[6]={
|
[6]={
|
||||||
{{10},{10,2},{1,1},{1},{},{2},{2,2},{11,1},{11},},
|
{{11},{11,2},{1,1},{1},{},{2},{2,2},{12,1},{12},},
|
||||||
},
|
},
|
||||||
[7]={
|
[7]={
|
||||||
{{10},{10,2},{1},{},{2},{11,1},{11},},
|
{{11},{11,2},{1},{},{2},{12,1},{12},},
|
||||||
{{4,10},{10,4},{10,3},{1,4},{4},{3},{2,3},{11,4},{11,3},{3,11},},
|
{{4,11},{11,4},{11,3},{1,4},{4},{3},{2,3},{12,4},{12,3},{3,12},},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
FCL[2]=FCL[1]
|
FCL[2]=FCL[1]
|
||||||
@@ -49,17 +49,18 @@ FCL[5]=FCL[3]
|
|||||||
clearScore={[0]=0,0,2,4,12}
|
clearScore={[0]=0,0,2,4,12}
|
||||||
function ifoverlapAI(f,bk,x,y)
|
function ifoverlapAI(f,bk,x,y)
|
||||||
if y<1 then return true end
|
if y<1 then return true end
|
||||||
if y>#f then return nil end
|
if y>#f then return end
|
||||||
for i=1,#bk do for j=1,#bk[1]do
|
for i=1,#bk do for j=1,#bk[1]do
|
||||||
if f[y+i-1]and bk[i][j]>0 and f[y+i-1][x+j-1]>0 then return true end
|
if f[y+i-1]and bk[i][j]and f[y+i-1][x+j-1]>0 then return true end
|
||||||
end end
|
end end
|
||||||
end
|
end
|
||||||
function resetField(f0,f,start)
|
function resetField(f0,f,start)
|
||||||
while f[start]do
|
::L::if f[start]then
|
||||||
removeRow(f,start)
|
removeRow(f,start)
|
||||||
|
goto L
|
||||||
end
|
end
|
||||||
for i=start,#f0 do
|
for i=start,#f0 do
|
||||||
f[i]=getNewRow()
|
f[i]=getNewRow(0)
|
||||||
for j=1,10 do
|
for j=1,10 do
|
||||||
f[i][j]=f0[i][j]
|
f[i][j]=f0[i][j]
|
||||||
end
|
end
|
||||||
@@ -68,25 +69,24 @@ end
|
|||||||
function getScore(field,bn,cb,cx,cy)
|
function getScore(field,bn,cb,cx,cy)
|
||||||
local score=0
|
local score=0
|
||||||
local highest=0
|
local highest=0
|
||||||
local height=getNewRow()
|
local height=getNewRow(0)
|
||||||
local clear=0
|
local clear=0
|
||||||
local hole=0
|
local hole=0
|
||||||
|
|
||||||
for i=cy+#cb-1,cy,-1 do
|
for i=cy+#cb-1,cy,-1 do
|
||||||
local f=true
|
|
||||||
for j=1,10 do
|
for j=1,10 do
|
||||||
if field[i][j]==0 then f=false;break end
|
if field[i][j]==0 then goto L end
|
||||||
end
|
|
||||||
if f then
|
|
||||||
removeRow(field,i)
|
|
||||||
clear=clear+1
|
|
||||||
end
|
end
|
||||||
|
removeRow(field,i)
|
||||||
|
clear=clear+1
|
||||||
|
::L::
|
||||||
end
|
end
|
||||||
if #field==0 then return 9e99 end--PC best
|
if #field==0 then return 9e99 end--PC best
|
||||||
for x=1,10 do
|
for x=1,10 do
|
||||||
local h=#field
|
local h=#field
|
||||||
while field[h][x]==0 and h>1 do
|
::L::if field[h][x]==0 and h>1 then
|
||||||
h=h-1
|
h=h-1
|
||||||
|
goto L
|
||||||
end
|
end
|
||||||
height[x]=h
|
height[x]=h
|
||||||
if x>3 and x<8 and h>highest then highest=h end
|
if x>3 and x<8 and h>highest then highest=h end
|
||||||
@@ -112,38 +112,39 @@ function getScore(field,bn,cb,cx,cy)
|
|||||||
ins(freeRow,height)
|
ins(freeRow,height)
|
||||||
score=
|
score=
|
||||||
#field*20
|
#field*20
|
||||||
-cy*40
|
-cy*35
|
||||||
-#cb*25
|
-#cb*25
|
||||||
+clearScore[clear]*(8+#field)
|
+clearScore[clear]*(8+#field)
|
||||||
-hole*40
|
-hole*50
|
||||||
if #field>6 then score=score-highest*5 end
|
if #field>6 then score=score-highest*5 end
|
||||||
if mh1>3 then score=score-50-mh1*40 end
|
if mh1>3 then score=score-40-mh1*30 end
|
||||||
return score
|
return score
|
||||||
end
|
end
|
||||||
function AI_getControls(ctrl)
|
function AI_getControls(ctrl)
|
||||||
local Tfield={}--test field
|
local Tfield={}--test field
|
||||||
local field_org=field
|
local field_org=P.field
|
||||||
for i=1,#field_org do
|
for i=1,#field_org do
|
||||||
Tfield[i]=getNewRow()
|
Tfield[i]=getNewRow(0)
|
||||||
for j=1,10 do
|
for j=1,10 do
|
||||||
Tfield[i][j]=field_org[i][j]
|
Tfield[i][j]=field_org[i][j]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local best={x=1,dir=0,hold=false,score=-9e99}
|
local best={x=1,dir=0,hold=false,score=-9e99}
|
||||||
for ifhold=0,gameEnv.hold and 1 or 0 do
|
for ifhold=0,P.gameEnv.hold and 1 or 0 do
|
||||||
local bn=ifhold==0 and bn or hn>0 and hn or nxt[1]
|
local bn=ifhold==0 and P.cur.id or P.hold.id>0 and P.hold.id or P.next[1].id
|
||||||
for dir=0,dirCount[bn] do--each dir
|
for dir=0,dirCount[bn] do--each dir
|
||||||
local cb=blocks[bn][dir]
|
local cb=blocks[bn][dir]
|
||||||
for cx=1,11-#cb[1]do--each pos
|
for cx=1,11-#cb[1]do--each pos
|
||||||
local cy=#Tfield+1
|
local cy=#Tfield+1
|
||||||
while not ifoverlapAI(Tfield,cb,cx,cy-1)do
|
::L::if not ifoverlapAI(Tfield,cb,cx,cy-1)then
|
||||||
cy=cy-1
|
cy=cy-1
|
||||||
|
goto L
|
||||||
end--move to bottom
|
end--move to bottom
|
||||||
for i=1,#cb do
|
for i=1,#cb do
|
||||||
local y=cy+i-1
|
local y=cy+i-1
|
||||||
if not Tfield[y]then Tfield[y]=getNewRow()end
|
if not Tfield[y]then Tfield[y]=getNewRow(0)end
|
||||||
for j=1,#cb[1]do
|
for j=1,#cb[1]do
|
||||||
if cb[i][j]~=0 then
|
if cb[i][j]then
|
||||||
Tfield[y][cx+j-1]=1
|
Tfield[y][cx+j-1]=1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -155,20 +156,19 @@ function AI_getControls(ctrl)
|
|||||||
resetField(field_org,Tfield,cy)
|
resetField(field_org,Tfield,cy)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end--ifHold loop
|
end
|
||||||
|
|
||||||
while #Tfield>0 do
|
::L::
|
||||||
|
if #Tfield>0 then
|
||||||
removeRow(Tfield,1)
|
removeRow(Tfield,1)
|
||||||
|
goto L
|
||||||
end--Release cache
|
end--Release cache
|
||||||
|
|
||||||
if best.hold then
|
if best.hold then
|
||||||
ins(ctrl,8)
|
ins(ctrl,8)
|
||||||
end
|
end
|
||||||
|
|
||||||
local l=FCL[best.bn][best.dir+1][best.x]
|
local l=FCL[best.bn][best.dir+1][best.x]
|
||||||
for i=1,#l do
|
for i=1,#l do
|
||||||
ins(ctrl,l[i])
|
ins(ctrl,l[i])
|
||||||
end
|
end
|
||||||
|
ins(ctrl,6)
|
||||||
ins(ctrl,6)--harddrop
|
|
||||||
end
|
end
|
||||||
925
call&sys.lua
37
class.lua
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
Task={}
|
||||||
|
metatable_task={__index=Task}
|
||||||
|
function newTask(code,P,data)
|
||||||
|
local obj={
|
||||||
|
code=code,
|
||||||
|
P=P,
|
||||||
|
data=data,
|
||||||
|
}
|
||||||
|
setmetatable(obj,metatable_task)
|
||||||
|
ins(Task,obj)
|
||||||
|
end
|
||||||
|
function clearTask(opt)
|
||||||
|
if opt=="all"then
|
||||||
|
while Task[1]do
|
||||||
|
rem(Task,i)
|
||||||
|
end
|
||||||
|
elseif opt=="play"then
|
||||||
|
for i=#Task,1,-1 do
|
||||||
|
if Task[i].P then
|
||||||
|
rem(Task,i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else--Player table
|
||||||
|
for i=#Task,1,-1 do
|
||||||
|
if Task[i].P==P then
|
||||||
|
rem(Task,i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function Task:update()
|
||||||
|
if(not self.P or self.P and scene=="play")and self:code(self.P,self.data)then
|
||||||
|
for i=#Task,1,-1 do
|
||||||
|
if Task[i]==self then rem(Task,i)return end
|
||||||
|
end--Destroy
|
||||||
|
end
|
||||||
|
end
|
||||||
18
conf.lua
@@ -1,26 +1,26 @@
|
|||||||
function love.conf(t)
|
function love.conf(t)
|
||||||
local X=nil
|
local X=nil
|
||||||
t.identity="Techmino"--The name of the save directory (string)
|
t.identity="Techmino"--Save directory name
|
||||||
t.appendidentity=X--Search files in source directory before save directory (boolean)
|
t.appendidentity=X--If search files in source before save directory
|
||||||
t.version="11.1"
|
t.version="11.1"
|
||||||
t.console=X
|
t.console=X
|
||||||
t.accelerometerjoystick=X--Enable the accelerometer on iOS and Android by exposing it as a Joystick (boolean)
|
t.accelerometerjoystick=X--If exposing accelerometer on iOS and Android as a Joystick
|
||||||
t.gammacorrect=X
|
t.gammacorrect=X
|
||||||
t.audio.mixwithsystem=true--Switch on to keep background music playing
|
t.audio.mixwithsystem=true--Switch on to keep sysBGM
|
||||||
|
|
||||||
local W=t.window
|
local W=t.window
|
||||||
W.title="Techmino V0.7.3"
|
W.title="Techmino V0.7.20"
|
||||||
W.icon="/image/icon.png"
|
W.icon="/image/icon.png"
|
||||||
W.width,W.height=1280,720
|
W.width,W.height=1280,720
|
||||||
|
W.minwidth,W.minheight=640,360
|
||||||
W.borderless=X
|
W.borderless=X
|
||||||
W.resizable=true
|
W.resizable=true
|
||||||
W.minwidth,W.minheight=640,360
|
|
||||||
W.fullscreentype="desktop"--Choose between "desktop" fullscreen or "exclusive" fullscreen mode (string)
|
W.fullscreentype="desktop"--Choose between "desktop" fullscreen or "exclusive" fullscreen mode (string)
|
||||||
W.fullscreen=X
|
W.fullscreen=X
|
||||||
W.vsync=X--0 to set ∞fps
|
W.vsync=0--0→∞fps
|
||||||
W.msaa=X--The number of samples to use with multi-sampled antialiasing (number)
|
W.msaa=X--The number of samples to use with multi-sampled antialiasing (number)
|
||||||
W.depth=X--The number of bits per sample in the depth buffer
|
W.depth=X--Bits per sample in the depth buffer
|
||||||
W.stencil=8--The number of bits per sample in the stencil buffer
|
W.stencil=1--The number of bits per sample in the stencil buffer
|
||||||
W.display=1--Monitor ID
|
W.display=1--Monitor ID
|
||||||
W.highdpi=X--Enable high-dpi mode for the window on a Retina display (boolean)
|
W.highdpi=X--Enable high-dpi mode for the window on a Retina display (boolean)
|
||||||
W.x,W.y=nil
|
W.x,W.y=nil
|
||||||
|
|||||||
1166
dataList.lua
Normal file
1339
gamefunc.lua
BIN
image/block.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 6.2 KiB |
BIN
image/icon.png
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 36 KiB |
BIN
image/mess/groupcode.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
image/mess/light.png
Normal file
|
After Width: | Height: | Size: 423 B |
BIN
image/mess/lightBulb.png
Normal file
|
After Width: | Height: | Size: 421 B |
|
Before Width: | Height: | Size: 638 B |
BIN
image/mess/paycode.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 201 B |
BIN
image/virtualkey/func.png
Normal file
|
After Width: | Height: | Size: 370 B |