Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b354604c77 | ||
|
|
5eea97dd8b | ||
|
|
f0a118e714 | ||
|
|
3019f83999 | ||
|
|
438046f77f | ||
|
|
830f0ffbed | ||
|
|
849e5b586e | ||
|
|
f82e979f9c | ||
|
|
c9a3e3ce1b | ||
|
|
72dcb84662 | ||
|
|
4af2126254 | ||
|
|
42d7b1be94 | ||
|
|
a31474c43a | ||
|
|
75c7955bb5 | ||
|
|
c35152cf6e | ||
|
|
1b0ad009b0 | ||
|
|
e7c797bf14 |
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
46
ai.lua
@@ -49,17 +49,18 @@ FCL[5]=FCL[3]
|
||||
clearScore={[0]=0,0,2,4,12}
|
||||
function ifoverlapAI(f,bk,x,y)
|
||||
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
|
||||
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
|
||||
function resetField(f0,f,start)
|
||||
while f[start]do
|
||||
::L::if f[start]then
|
||||
removeRow(f,start)
|
||||
goto L
|
||||
end
|
||||
for i=start,#f0 do
|
||||
f[i]=getNewRow()
|
||||
f[i]=getNewRow(0)
|
||||
for j=1,10 do
|
||||
f[i][j]=f0[i][j]
|
||||
end
|
||||
@@ -68,25 +69,24 @@ end
|
||||
function getScore(field,bn,cb,cx,cy)
|
||||
local score=0
|
||||
local highest=0
|
||||
local height=getNewRow()
|
||||
local height=getNewRow(0)
|
||||
local clear=0
|
||||
local hole=0
|
||||
|
||||
for i=cy+#cb-1,cy,-1 do
|
||||
local f=true
|
||||
for j=1,10 do
|
||||
if field[i][j]==0 then f=false;break end
|
||||
end
|
||||
if f then
|
||||
removeRow(field,i)
|
||||
clear=clear+1
|
||||
if field[i][j]==0 then goto L end
|
||||
end
|
||||
removeRow(field,i)
|
||||
clear=clear+1
|
||||
::L::
|
||||
end
|
||||
if #field==0 then return 9e99 end--PC best
|
||||
for x=1,10 do
|
||||
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
|
||||
goto L
|
||||
end
|
||||
height[x]=h
|
||||
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)
|
||||
score=
|
||||
#field*20
|
||||
-cy*40
|
||||
-cy*35
|
||||
-#cb*25
|
||||
+clearScore[clear]*(8+#field)
|
||||
-hole*50
|
||||
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
|
||||
end
|
||||
function AI_getControls(ctrl)
|
||||
local Tfield={}--test field
|
||||
local field_org=P.field
|
||||
for i=1,#field_org do
|
||||
Tfield[i]=getNewRow()
|
||||
for i=1,#field_org do
|
||||
Tfield[i]=getNewRow(0)
|
||||
for j=1,10 do
|
||||
Tfield[i][j]=field_org[i][j]
|
||||
end
|
||||
end
|
||||
local best={x=1,dir=0,hold=false,score=-9e99}
|
||||
for ifhold=0,P.gameEnv.hold and 1 or 0 do
|
||||
local bn=ifhold==0 and P.bn or P.hn>0 and P.hn or P.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
|
||||
local cb=blocks[bn][dir]
|
||||
for cx=1,11-#cb[1]do--each pos
|
||||
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
|
||||
goto L
|
||||
end--move to bottom
|
||||
for i=1,#cb do
|
||||
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
|
||||
if cb[i][j]~=0 then
|
||||
if cb[i][j]then
|
||||
Tfield[y][cx+j-1]=1
|
||||
end
|
||||
end
|
||||
@@ -156,8 +157,11 @@ function AI_getControls(ctrl)
|
||||
end
|
||||
end
|
||||
end
|
||||
while #Tfield>0 do
|
||||
|
||||
::L::
|
||||
if #Tfield>0 then
|
||||
removeRow(Tfield,1)
|
||||
goto L
|
||||
end--Release cache
|
||||
if best.hold then
|
||||
ins(ctrl,8)
|
||||
|
||||
924
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
|
||||
12
conf.lua
@@ -1,7 +1,7 @@
|
||||
function love.conf(t)
|
||||
local X=nil
|
||||
t.identity="Techmino"--The name of the save directory (string)
|
||||
t.appendidentity=X--Search files in source directory before save directory (boolean)
|
||||
t.identity="Techmino"--Save directory name
|
||||
t.appendidentity=X--If search files in source before save directory
|
||||
t.version="11.1"
|
||||
t.console=X
|
||||
t.accelerometerjoystick=X--If exposing accelerometer on iOS and Android as a Joystick
|
||||
@@ -9,18 +9,18 @@ function love.conf(t)
|
||||
t.audio.mixwithsystem=true--Switch on to keep sysBGM
|
||||
|
||||
local W=t.window
|
||||
W.title="Techmino V0.7.4"
|
||||
W.title="Techmino V0.7.21"
|
||||
W.icon="/image/icon.png"
|
||||
W.width,W.height=1280,720
|
||||
W.minwidth,W.minheight=640,360
|
||||
W.borderless=X
|
||||
W.resizable=true
|
||||
W.minwidth,W.minheight=640,360
|
||||
W.fullscreentype="desktop"--Choose between "desktop" fullscreen or "exclusive" fullscreen mode (string)
|
||||
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.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.highdpi=X--Enable high-dpi mode for the window on a Retina display (boolean)
|
||||
W.x,W.y=nil
|
||||
|
||||
1167
dataList.lua
Normal file
1263
gamefunc.lua
BIN
image/block.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 6.2 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: 201 B |
|
Before Width: | Height: | Size: 638 B |
BIN
image/mess/paycode.png
Normal file
|
After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 972 B |
BIN
image/mess/title_old.png
Normal file
|
After Width: | Height: | Size: 44 KiB |