注释首字母大写
This commit is contained in:
@@ -28,7 +28,7 @@ back.glow={
|
||||
local t=(sin(t*.5)+sin(t*.7)+sin(t*.9+1)+sin(t*1.5)+sin(t*2+10))*.08
|
||||
gc.clear(t,t,t)
|
||||
end,
|
||||
}--light-dark
|
||||
}--Light-dark
|
||||
back.rgb={
|
||||
init=function()
|
||||
t=0
|
||||
@@ -57,7 +57,7 @@ back.flink={
|
||||
else gc.clear(0,0,0)
|
||||
end
|
||||
end,
|
||||
}--flash after random time
|
||||
}--Flash after random time
|
||||
back.aura={
|
||||
init=function()
|
||||
t=rnd()*3600
|
||||
@@ -76,7 +76,7 @@ back.aura={
|
||||
gc.rectangle("fill",0,0,scr.w,scr.h)
|
||||
gc.setShader()
|
||||
end,
|
||||
}--cool liquid background
|
||||
}--Cool liquid background
|
||||
back.game1={
|
||||
init=function()
|
||||
t=0
|
||||
@@ -222,11 +222,11 @@ back.space={
|
||||
local S=stars
|
||||
for i=1,1260,5 do
|
||||
local s=rnd(26,40)*.1
|
||||
S[i]=s*scr.k --size
|
||||
S[i+1]=rnd(W)-10 --x
|
||||
S[i+2]=rnd(H)-10 --y
|
||||
S[i+3]=(rnd()-.5)*.01*s --vx
|
||||
S[i+4]=(rnd()-.5)*.01*s --vy
|
||||
S[i]=s*scr.k --Size
|
||||
S[i+1]=rnd(W)-10 --X
|
||||
S[i+2]=rnd(H)-10 --Y
|
||||
S[i+3]=(rnd()-.5)*.01*s --Vx
|
||||
S[i+4]=(rnd()-.5)*.01*s --Vy
|
||||
end--800 var
|
||||
end,
|
||||
update=function(dt)
|
||||
@@ -234,7 +234,7 @@ back.space={
|
||||
for i=1,1260,5 do
|
||||
S[i+1]=(S[i+1]+S[i+3])%W
|
||||
S[i+2]=(S[i+2]+S[i+4])%H
|
||||
end--star moving
|
||||
end--Star moving
|
||||
end,
|
||||
draw=function()
|
||||
gc.clear(.2,.2,.2)
|
||||
@@ -260,7 +260,7 @@ for _,bg in next,back do
|
||||
if not bg.update then bg.update= NULL end setfenv(bg.update ,BGvars)
|
||||
if not bg.discard then bg.discard=NULL end setfenv(bg.discard ,BGvars)
|
||||
if not bg.draw then bg.draw= NULL end setfenv(bg.draw ,BGvars)
|
||||
end--make BG vars invisible
|
||||
end--Make BG vars invisible
|
||||
|
||||
BG={
|
||||
cur="none",
|
||||
|
||||
@@ -59,7 +59,7 @@ local function dumpTable(L,t)
|
||||
end
|
||||
return s..tabs[t-1].."}"
|
||||
end
|
||||
local function addToTable(G,base)--refresh default base with G-values
|
||||
local function addToTable(G,base)--Refresh default base with G-values
|
||||
for k,v in next,G do
|
||||
if type(v)==type(base[k])then
|
||||
if type(v)=="table"then
|
||||
|
||||
@@ -351,7 +351,7 @@ local langList={
|
||||
},
|
||||
setting_lang={
|
||||
back="返回",
|
||||
},--langName added later
|
||||
},--LangName added later
|
||||
help={
|
||||
staff="制作人员",
|
||||
his="更新历史",
|
||||
@@ -803,7 +803,7 @@ local langList={
|
||||
},
|
||||
setting_lang={
|
||||
back="返回",
|
||||
},--langName added later
|
||||
},--LangName added later
|
||||
help={
|
||||
staff="制作人员",
|
||||
his="更新历史",
|
||||
@@ -1244,7 +1244,7 @@ local langList={
|
||||
},
|
||||
setting_lang={
|
||||
back="Back",
|
||||
},--langName added later
|
||||
},--LangName added later
|
||||
help={
|
||||
staff="Staff",
|
||||
his="History",
|
||||
@@ -1681,7 +1681,7 @@ local langList={
|
||||
},
|
||||
setting_lang={
|
||||
back="X",
|
||||
},--langName added later
|
||||
},--LangName added later
|
||||
help={
|
||||
staff="Orz",
|
||||
his="_&_",
|
||||
|
||||
@@ -26,7 +26,7 @@ local function draw(L)
|
||||
lightRenderShader:send("xresolution",L.size);
|
||||
shadowMapShader:send("yresolution",L.size);
|
||||
|
||||
--get up-left of light
|
||||
--Get up-left of light
|
||||
local X=L.x-L.size*.5
|
||||
local Y=L.y-L.size*.5
|
||||
|
||||
@@ -74,10 +74,10 @@ function LIGHT.add(x,y,R,F)
|
||||
--Methods
|
||||
id=id,
|
||||
x=x,y=y,size=R,
|
||||
blackCanvas=gc.newCanvas(R,R),--solid canvas
|
||||
blackCanvas=gc.newCanvas(R,R),--Solid canvas
|
||||
shadowCanvas=gc.newCanvas(R,1),--1D vis-depth canvas
|
||||
renderCanvas=gc.newCanvas(R,R),--light canvas
|
||||
blackFn=F,--solid draw funcion
|
||||
renderCanvas=gc.newCanvas(R,R),--Light canvas
|
||||
blackFn=F,--Solid draw funcion
|
||||
|
||||
|
||||
move=move,
|
||||
|
||||
@@ -66,7 +66,7 @@ local function drawVirtualkey()
|
||||
gc.setLineWidth(B.r*.07)
|
||||
gc.circle("line",B.x,B.y,B.r,10)--Button outline
|
||||
_=V[i].pressTime
|
||||
gc.draw(icons[i],B.x,B.y,nil,B.r*.026+_*.08,nil,18,18)--icon
|
||||
gc.draw(icons[i],B.x,B.y,nil,B.r*.026+_*.08,nil,18,18)--Icon
|
||||
if _>0 then
|
||||
gc.setColor(1,1,1,a*_*.08)
|
||||
gc.circle("fill",B.x,B.y,B.r*.94,10)--Glow
|
||||
@@ -195,7 +195,7 @@ function Pnt.mode()
|
||||
gc.line(M.x,M.y,m.x,m.y)
|
||||
end
|
||||
end
|
||||
end--lines connecting modes
|
||||
end--Lines connecting modes
|
||||
|
||||
for name,M in next,Modes do
|
||||
if R[name]then
|
||||
@@ -217,7 +217,7 @@ function Pnt.mode()
|
||||
gc.setLineWidth(10)
|
||||
gc.rectangle("line",M.x-S+5,M.y-S+5,2*S-10,2*S-10)
|
||||
end
|
||||
elseif M.shape==2 then--diamond
|
||||
elseif M.shape==2 then--Diamond
|
||||
gc.circle("fill",M.x,M.y,S+5,4)
|
||||
if sel==name then
|
||||
gc.setColor(1,1,1)
|
||||
|
||||
@@ -38,7 +38,7 @@ function SFX.fieldPlay(s,v,P)
|
||||
end
|
||||
function SFX.play(s,vol,pos,force)
|
||||
if setting.sfx==0 and not force then return end
|
||||
local S=SFX.list[s]--source list
|
||||
local S=SFX.list[s]--Source list
|
||||
if not S then return end
|
||||
local n=1
|
||||
while S[n]:isPlaying()do
|
||||
|
||||
@@ -9,6 +9,6 @@ return{
|
||||
aura=N("aura"),
|
||||
gradient1=N("grad1"),--Horizonal red-blue gradient
|
||||
gradient2=N("grad2"),--Vertical red-green gradient
|
||||
rgb1=N("rgb1"),--colorful RGB
|
||||
rgb2=N("rgb2"),--blue RGB
|
||||
rgb1=N("rgb1"),--Colorful RGB
|
||||
rgb2=N("rgb2"),--Blue RGB
|
||||
}
|
||||
@@ -85,17 +85,17 @@ function TEXT.getText(text,x,y,font,style,spd,stop)
|
||||
stop=stop,
|
||||
draw=textFX[style]or assert(false,"unavailable type:"..style),
|
||||
}
|
||||
end--another version of TEXT()
|
||||
end--Another version of TEXT()
|
||||
function TEXT.show(text,x,y,font,style,spd,stop)
|
||||
texts[#texts+1]={
|
||||
c=0, --timer
|
||||
text=text, --string
|
||||
x=x or 0, --x
|
||||
y=y or 0, --y
|
||||
font=font or 40, --font
|
||||
spd=(spd or 1)/60, --timing speed(1=last 1 sec)
|
||||
stop=stop, --stop time(sustained text)
|
||||
draw=textFX[style]or assert(false,"unavailable type:"..style), --draw method
|
||||
c=0, --Timer
|
||||
text=text, --String
|
||||
x=x or 0, --X
|
||||
y=y or 0, --Y
|
||||
font=font or 40, --Font
|
||||
spd=(spd or 1)/60, --Timing speed(1=last 1 sec)
|
||||
stop=stop, --Stop time(sustained text)
|
||||
draw=textFX[style]or assert(false,"unavailable type:"..style), --Draw method
|
||||
}
|
||||
end
|
||||
function TEXT.update(list)
|
||||
|
||||
@@ -18,8 +18,8 @@ function Tmr.load()
|
||||
elseif S.phase==4 then
|
||||
IMG.loadOne(S.cur)
|
||||
elseif S.phase==5 then
|
||||
local m=Modes[S.cur]--mode template
|
||||
local M=require("modes/"..m.name)--mode file
|
||||
local m=Modes[S.cur]--Mode template
|
||||
local M=require("modes/"..m.name)--Mode file
|
||||
Modes[m.name],Modes[S.cur]=M
|
||||
for k,v in next,m do
|
||||
M[k]=v
|
||||
@@ -118,7 +118,7 @@ function Tmr.mode(dt)
|
||||
elseif y<-1900*k then y=-1900*k
|
||||
end
|
||||
cam.x,cam.y=x,y
|
||||
--keyboard controlling
|
||||
--Keyboard controlling
|
||||
|
||||
cam.x1=cam.x1*.85+x*.15
|
||||
cam.y1=cam.y1*.85+y*.15
|
||||
@@ -227,7 +227,7 @@ function Tmr.play(dt)
|
||||
if game.frame%26==0 and setting.warn then
|
||||
local F=P1.field
|
||||
local M=#F
|
||||
local height=0--max height of row 4~7
|
||||
local height=0--Max height of row 4~7
|
||||
for x=4,7 do
|
||||
for y=M,1,-1 do
|
||||
if F[y][x]>0 then
|
||||
|
||||
@@ -57,7 +57,7 @@ local function getVoice(str)
|
||||
end
|
||||
end
|
||||
return L[n]
|
||||
--load voice with string
|
||||
--Load voice with string
|
||||
end
|
||||
function VOC.loadOne(_)
|
||||
local N=VOC.name[_]
|
||||
@@ -94,21 +94,21 @@ function VOC.update()
|
||||
Q[1]:setVolume(setting.voc*.1)
|
||||
Q[1]:play()
|
||||
Q.s=Q[2]and 2 or 4
|
||||
elseif Q.s==2 then--playing 1,ready 2
|
||||
elseif Q.s==2 then--Playing 1,ready 2
|
||||
if Q[1]:getDuration()-Q[1]:tell()<.08 then
|
||||
Q[2]=getVoice(Q[2])
|
||||
Q[2]:setVolume(setting.voc*.1)
|
||||
Q[2]:play()
|
||||
Q.s=3
|
||||
end
|
||||
elseif Q.s==3 then--playing 12 same time
|
||||
elseif Q.s==3 then--Playing 12 same time
|
||||
if not Q[1]:isPlaying()then
|
||||
for i=1,#Q do
|
||||
Q[i]=Q[i+1]
|
||||
end
|
||||
Q.s=Q[2]and 2 or 4
|
||||
end
|
||||
elseif Q.s==4 then--playing last
|
||||
elseif Q.s==4 then--Playing last
|
||||
if not Q[1].isPlaying(Q[1])then
|
||||
Q[1]=nil
|
||||
Q.s=0
|
||||
@@ -124,10 +124,10 @@ function VOC.play(s,chn)
|
||||
if not _ then print("no VOC called:"..s)return end
|
||||
L[#L+1]=_[rnd(#_)]
|
||||
L.s=1
|
||||
--add to queue[chn]
|
||||
--Add to queue[chn]
|
||||
else
|
||||
voiceQueue[VOC.getFreeChannel()]={s=1,VOC.list[s][rnd(#VOC.list[s])]}
|
||||
--create new channel & play
|
||||
--Create new channel & play
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -8,7 +8,7 @@ local EMPTY={}
|
||||
|
||||
local button={
|
||||
type="button",
|
||||
ATV=0,--activating time(0~8)
|
||||
ATV=0,--Activating time(0~8)
|
||||
}
|
||||
function button:reset()
|
||||
self.ATV=0
|
||||
@@ -59,8 +59,8 @@ end
|
||||
|
||||
local switch={
|
||||
type="switch",
|
||||
ATV=0,--activating time(0~8)
|
||||
CHK=0,--check alpha(0~6)
|
||||
ATV=0,--Activating time(0~8)
|
||||
CHK=0,--Check alpha(0~6)
|
||||
}
|
||||
function switch:reset()
|
||||
self.ATV=0
|
||||
@@ -115,8 +115,8 @@ end
|
||||
|
||||
local slider={
|
||||
type="slider",
|
||||
ATV=0,--activating time(0~8)
|
||||
pos=0,--position shown
|
||||
ATV=0,--Activating time(0~8)
|
||||
pos=0,--Position shown
|
||||
}
|
||||
function slider:reset()
|
||||
self.ATV=0
|
||||
@@ -178,8 +178,8 @@ function slider:getInfo()
|
||||
end
|
||||
|
||||
local WIDGET={}
|
||||
WIDGET.active=EMPTY--table, contains all active widgets
|
||||
WIDGET.sel=nil--selected widget
|
||||
WIDGET.active=EMPTY--Table, contains all active widgets
|
||||
WIDGET.sel=nil--Selected widget
|
||||
function WIDGET.set(L)
|
||||
WIDGET.sel=nil
|
||||
WIDGET.active=L or EMPTY
|
||||
@@ -331,7 +331,7 @@ function WIDGET.keyPressed(i)
|
||||
WIDGET.press()
|
||||
end
|
||||
elseif kb.isDown("lshift","lalt","lctrl")then
|
||||
--when hold [↑], control slider with left/right
|
||||
--When hold [↑], control slider with left/right
|
||||
if i=="left"or i=="right"then
|
||||
local W=WIDGET.sel
|
||||
if W then
|
||||
|
||||
@@ -87,7 +87,7 @@ local function VKAdisp(n) return function()return VK_org[n].ava end end
|
||||
local function VKAcode(n) return function()VK_org[n].ava=not VK_org[n].ava end end
|
||||
local function setLang(n) return function()LANG.set(n)setting.lang=n end end
|
||||
|
||||
--newXXX
|
||||
--NewXXX
|
||||
newText=WIDGET.newText
|
||||
newImage=WIDGET.newImage
|
||||
newButton=WIDGET.newButton
|
||||
@@ -333,7 +333,7 @@ local Widgets={
|
||||
newButton({name="spin3", x=410,y=540,w=90,h=65,color="white",font=30,code=nextDir(3)}),
|
||||
newButton({name="spin4", x=550,y=540,w=90,h=65,color="white",font=30,code=nextDir(4)}),
|
||||
newButton({name="spin5", x=690,y=540,w=90,h=65,color="white",font=30,code=nextDir(5)}),
|
||||
--newButton({name="spin6",x=825,y=540,w=90,h=65,color="white",font=30,code=nextDir(6)}),--cannot rotate O
|
||||
--newButton({name="spin6",x=825,y=540,w=90,h=65,color="white",font=30,code=nextDir(6)}),--Cannot rotate O
|
||||
newButton({name="spin7", x=970,y=540,w=90,h=65,color="white",font=30,code=nextDir(7)}),
|
||||
|
||||
newButton({name="skinR", x=200,y=640,w=220,h=80,color="lPurple",font=35,
|
||||
|
||||
18
conf.lua
18
conf.lua
@@ -1,10 +1,10 @@
|
||||
gameVersion="Alpha V0.9.3"
|
||||
function love.conf(t)
|
||||
t.identity="Techmino"--saving folder
|
||||
t.identity="Techmino"--Saving folder
|
||||
t.version="11.1"
|
||||
t.gammacorrect=false
|
||||
t.appendidentity=true--search files in source then in save directory
|
||||
t.accelerometerjoystick=false--accelerometer=joystick on ios/android
|
||||
t.appendidentity=true--Search files in source then in save directory
|
||||
t.accelerometerjoystick=false--Accelerometer=joystick on ios/android
|
||||
if t.audio then t.audio.mixwithsystem=true end
|
||||
|
||||
local W=t.window
|
||||
@@ -16,12 +16,12 @@ function love.conf(t)
|
||||
W.resizable=true
|
||||
W.fullscreentype="desktop"--"exclusive"
|
||||
W.fullscreen=false
|
||||
W.vsync=0--do not limit FPS
|
||||
W.msaa=false--num of samples to use with multi-sampled antialiasing
|
||||
W.depth=0--bits/samp of depth buffer
|
||||
W.stencil=1--bits/samp of stencil buffer
|
||||
W.display=1--monitor ID
|
||||
W.highdpi=true--high-dpi mode for the window on a Retina display
|
||||
W.vsync=0--Do not limit FPS
|
||||
W.msaa=false--Num of samples to use with multi-sampled antialiasing
|
||||
W.depth=0--Bits/samp of depth buffer
|
||||
W.stencil=1--Bits/samp of stencil buffer
|
||||
W.display=1--Monitor ID
|
||||
W.highdpi=true--High-dpi mode for the window on a Retina display
|
||||
W.x,W.y=nil
|
||||
|
||||
local M=t.modules
|
||||
|
||||
@@ -2,7 +2,8 @@ local int,max,min=math.floor,math.max,math.min
|
||||
local sectionName={"M7","M8","M9","M","MK","MV","MO","MM","GM"}
|
||||
local function score(P)
|
||||
local F=false
|
||||
if P.modeData.point<70 then--if Less then MM
|
||||
--If Less then MM
|
||||
if P.modeData.point<70 then
|
||||
local R=#P.clearedRow
|
||||
if R==0 then return end
|
||||
if R==4 then R=10 end
|
||||
|
||||
@@ -11,13 +11,14 @@ return{
|
||||
local height=freeRow.get(0)
|
||||
local max=#P.field
|
||||
if max>0 then
|
||||
--Get heights
|
||||
for x=1,10 do
|
||||
local h=max
|
||||
while P.field[h][x]==0 and h>1 do
|
||||
h=h-1
|
||||
end
|
||||
height[x]=h
|
||||
end--get heights
|
||||
end
|
||||
else
|
||||
for x=1,10 do
|
||||
height[x]=0
|
||||
@@ -42,8 +43,8 @@ return{
|
||||
goto END
|
||||
end
|
||||
|
||||
--give I when no hole
|
||||
d=-999--height difference
|
||||
--Give I when no hole
|
||||
d=-999--Height difference
|
||||
--A=hole mark
|
||||
for x=2,11 do
|
||||
local _=height[x]-height[x-1]
|
||||
@@ -59,7 +60,7 @@ return{
|
||||
res[A+2]=7
|
||||
end
|
||||
|
||||
--give O when no d=0/give T when no d=1
|
||||
--Give O when no d=0/give T when no d=1
|
||||
d=0--d=0 count
|
||||
A=0--d=1 count
|
||||
for x=2,10 do
|
||||
|
||||
@@ -14,7 +14,8 @@ local function score(P)
|
||||
if P.modeData.point%100==99 then
|
||||
SFX.play("blip_1")
|
||||
elseif P.modeData.point>=100*(P.modeData.event+1)then
|
||||
local s=P.modeData.event+1;P.modeData.event=s--level up!
|
||||
--Level up!
|
||||
local s=P.modeData.event+1;P.modeData.event=s
|
||||
local E=P.gameEnv
|
||||
BG.set(s==1 and"game3"or s==2 and"game4"or s==3 and"game5"or s==4 and"game6"or"game5")
|
||||
E.lock=death_lock[s]
|
||||
|
||||
@@ -13,7 +13,8 @@ local function score(P)
|
||||
if P.modeData.point%100==99 then
|
||||
SFX.play("blip_1")
|
||||
elseif P.modeData.point>=100*(P.modeData.event+1)then
|
||||
local s=P.modeData.event+1;P.modeData.event=s--level up!
|
||||
--Level up!
|
||||
local s=P.modeData.event+1;P.modeData.event=s
|
||||
local E=P.gameEnv
|
||||
BG.set(s==1 and"game1"or s==2 and"game2"or s==3 and"game3"or "game4")
|
||||
E.lock=rush_lock[s]
|
||||
|
||||
@@ -11,9 +11,11 @@ local function score(P)
|
||||
MD.point=MD.point+s
|
||||
if MD.point%100==99 then SFX.play("blip_1")end
|
||||
if int(MD.point*.01)>MD.event then
|
||||
local s=MD.event+1;MD.event=s--level up!
|
||||
--Level up!
|
||||
local s=MD.event+1;MD.event=s
|
||||
local E=P.gameEnv
|
||||
if s<4 then--first 300
|
||||
if s<4 then
|
||||
--First 300
|
||||
if s~=1 then E.lock=E.lock-1 end
|
||||
if s~=2 then E.wait=E.wait-1 end
|
||||
if s~=3 then E.fall=E.fall-1 end
|
||||
|
||||
29
parts/ai.lua
29
parts/ai.lua
@@ -198,7 +198,7 @@ end
|
||||
return{
|
||||
["9S"]={
|
||||
function(P,ctrl)
|
||||
local Tfield={}--test field
|
||||
local Tfield={}--Test field
|
||||
local field_org=P.field
|
||||
for i=1,#field_org do
|
||||
Tfield[i]=freeRow.get(0)
|
||||
@@ -217,13 +217,17 @@ return{
|
||||
end
|
||||
if not bn then goto CTN end
|
||||
|
||||
for dir=0,dirCount[bn] do--each dir
|
||||
for dir=0,dirCount[bn] do--Each 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
|
||||
|
||||
--Move to bottom
|
||||
while not ifoverlapAI(Tfield,cb,cx,cy-1)do
|
||||
cy=cy-1
|
||||
end--move to bottom
|
||||
end
|
||||
|
||||
--Simulate lock
|
||||
for i=1,#cb do
|
||||
local y=cy+i-1
|
||||
if not Tfield[y]then Tfield[y]=freeRow.get(0)end
|
||||
@@ -232,7 +236,7 @@ return{
|
||||
Tfield[y][cx+j-1]=1
|
||||
end
|
||||
end
|
||||
end--simulate lock
|
||||
end
|
||||
local score=getScore(Tfield,cb,cy)
|
||||
if score>best.score then
|
||||
best={bn=bn,x=cx,dir=dir,hold=ifhold==1,score=score}
|
||||
@@ -270,11 +274,11 @@ return{
|
||||
end,
|
||||
},
|
||||
["CC"]={
|
||||
function(P)
|
||||
function(P)--Start thinking
|
||||
BOT.think(P.AI_bot)
|
||||
return 2
|
||||
end,--start thinking
|
||||
function(P,ctrl)
|
||||
end,
|
||||
function(P,ctrl)--Poll keys
|
||||
if BOT.ifDead(P.AI_bot)then ins(ctrl,6)return 3 end
|
||||
local success,hold,move=BOT.getMove(P.AI_bot)
|
||||
if success then
|
||||
@@ -290,10 +294,11 @@ return{
|
||||
ins(ctrl,6)
|
||||
return 3
|
||||
else
|
||||
return 2--stay this stage
|
||||
--Stay this stage
|
||||
return 2
|
||||
end
|
||||
end,--poll keys
|
||||
function(P)
|
||||
end,
|
||||
function(P)--Check if time to change target
|
||||
P.AI_delay=P.AI_delay0
|
||||
if Timer()-P.modeData.point>P.modeData.event then
|
||||
P.modeData.point=Timer()
|
||||
@@ -301,6 +306,6 @@ return{
|
||||
P:changeAtkMode(rnd()<.85 and 1 or #P.atker>3 and 4 or rnd()<.3 and 2 or 3)
|
||||
end
|
||||
return 1
|
||||
end,--check if time to change target
|
||||
end,
|
||||
},
|
||||
}--AI think stage
|
||||
@@ -1,5 +1,5 @@
|
||||
setting={
|
||||
--game
|
||||
--Game
|
||||
das=10,arr=2,
|
||||
sddas=0,sdarr=2,
|
||||
ihs=true,irs=true,ims=true,
|
||||
@@ -14,7 +14,7 @@ setting={
|
||||
skin={1,5,8,2,10,3,7,1,5,1,5,8,2,10,3,7,10,7,8,2,8,2,1,5,3},
|
||||
face={},
|
||||
|
||||
--graphic
|
||||
--Graphic
|
||||
ghost=true,center=true,
|
||||
smooth=true,grid=false,
|
||||
bagLine=false,
|
||||
@@ -31,7 +31,7 @@ setting={
|
||||
bg=true,
|
||||
powerInfo=false,
|
||||
|
||||
--sound
|
||||
--Sound
|
||||
sfx=10,
|
||||
spawn=0,
|
||||
bgm=7,
|
||||
@@ -39,15 +39,15 @@ setting={
|
||||
vib=0,
|
||||
voc=0,
|
||||
|
||||
--virtualkey
|
||||
--Virtualkey
|
||||
VKSFX=3,--SFX volume
|
||||
VKVIB=0,--VIB
|
||||
VKSwitch=false,--if disp
|
||||
VKTrack=false,--if tracked
|
||||
VKDodge=false,--if dodge
|
||||
VKSwitch=false,--If disp
|
||||
VKTrack=false,--If tracked
|
||||
VKDodge=false,--If dodge
|
||||
VKTchW=3,--Touch-Pos Weight
|
||||
VKCurW=4,--Cur-Pos Weight
|
||||
VKIcon=true,--if disp icon
|
||||
VKIcon=true,--If disp icon
|
||||
VKAlpha=3,
|
||||
}
|
||||
for i=1,25 do
|
||||
@@ -64,7 +64,7 @@ stat={
|
||||
send=0,recv=0,pend=0,off=0,
|
||||
clear={},spin={},
|
||||
pc=0,hpc=0,b2b=0,b3b=0,score=0,
|
||||
lastPlay="sprint_10",--last played mode ID
|
||||
lastPlay="sprint_10",--Last played mode ID
|
||||
}
|
||||
for i=1,25 do
|
||||
stat.clear[i]={0,0,0,0,0}
|
||||
@@ -73,9 +73,9 @@ end
|
||||
|
||||
keyMap={
|
||||
{"left","right","x","z","c","up","down","space","tab","r"},{},
|
||||
--keyboard
|
||||
--Keyboard
|
||||
{"dpleft","dpright","a","b","y","dpup","dpdown","rightshoulder","x","leftshoulder"},{},
|
||||
--joystick
|
||||
--Joystick
|
||||
}
|
||||
for i=1,#keyMap do for j=1,20 do
|
||||
if not keyMap[i][j]then keyMap[i][j]=""end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
local freeRow={}
|
||||
local L={}--storage
|
||||
local _=0--lenth
|
||||
local L={}--Storage
|
||||
local _=0--Lenth
|
||||
function freeRow.reset(num)
|
||||
if num<_ then
|
||||
for i=_,num+1,-1 do
|
||||
|
||||
@@ -4,7 +4,7 @@ local ZERO={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zer
|
||||
|
||||
local map={}
|
||||
for x=-3,3 do map[x]={}for y=-3,3 do map[x][y]={x,y}end end
|
||||
local function collect(T)--make all vec point to the same vec
|
||||
local function collect(T)--Make all vec point to the same vec
|
||||
if type(T)=="table"then
|
||||
for _,T in next,T do
|
||||
for k,vec in next,T do
|
||||
@@ -14,11 +14,11 @@ local function collect(T)--make all vec point to the same vec
|
||||
end
|
||||
end
|
||||
|
||||
local function C_sym(L)--use this if the block is centrosymmetry, *PTR!!!
|
||||
local function C_sym(L)--Use this if the block is centrosymmetry, *PTR!!!
|
||||
L[23]=L[01]L[32]=L[10]
|
||||
L[21]=L[03]L[12]=L[30]
|
||||
end
|
||||
local function flipList(O)--use this to copy a symmetry list
|
||||
local function flipList(O)--Use this to copy a symmetry list
|
||||
if not O then return end
|
||||
local L={}
|
||||
for i=1,#O do
|
||||
|
||||
@@ -97,33 +97,33 @@ function SKIN.load()
|
||||
gc.pop()
|
||||
end
|
||||
local L=#list
|
||||
function SKIN.prevSet()--prev skin_set
|
||||
function SKIN.prevSet()--Prev skin_set
|
||||
local _=(setting.skinSet-2)%L+1
|
||||
setting.skinSet=_
|
||||
SKIN.change(_)
|
||||
_=list[_]
|
||||
TEXT.show(_,1100,100,int(300/#_)+5,"fly")
|
||||
end
|
||||
function SKIN.nextSet()--next skin_set
|
||||
function SKIN.nextSet()--Next skin_set
|
||||
local _=setting.skinSet%L+1
|
||||
setting.skinSet=_
|
||||
SKIN.change(_)
|
||||
_=list[_]
|
||||
TEXT.show(_,1100,100,int(300/#_)+5,"fly")
|
||||
end
|
||||
function SKIN.prev(i)--prev skin for [i]
|
||||
function SKIN.prev(i)--Prev skin for [i]
|
||||
local _=setting.skin
|
||||
_[i]=(_[i]-2)%11+1
|
||||
end
|
||||
function SKIN.next(i)--next skin for [i]
|
||||
function SKIN.next(i)--Next skin for [i]
|
||||
local _=setting.skin
|
||||
_[i]=_[i]%11+1
|
||||
end
|
||||
function SKIN.rotate(i)--change direction of [i]
|
||||
function SKIN.rotate(i)--Change direction of [i]
|
||||
setting.face[i]=(setting.face[i]+1)%4
|
||||
SFX.play("rotate")
|
||||
end
|
||||
function SKIN.change(i)--change to skin_set[i]
|
||||
function SKIN.change(i)--Change to skin_set[i]
|
||||
blockSkin=SKIN.lib[i]
|
||||
blockSkinMini=SKIN.libMini[i]
|
||||
end
|
||||
|
||||
@@ -53,8 +53,9 @@ function Tick.throwBadge(data)--{ifAI,Sender,timer}
|
||||
else
|
||||
x2,y2=R.x+66*R.size,R.y+344*R.size
|
||||
end
|
||||
|
||||
--Generate badge object
|
||||
FX_badge[#FX_badge+1]={x1,y1,x2,y2,t=0}
|
||||
--generate badge object
|
||||
|
||||
if not data[1]and data[3]%8==0 then
|
||||
SFX.play("collect")
|
||||
|
||||
Reference in New Issue
Block a user