Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c35152cf6e |
BIN
SFX/blip_1.ogg
Normal file
BIN
SFX/blip_1.ogg
Normal file
Binary file not shown.
BIN
SFX/blip_2.ogg
Normal file
BIN
SFX/blip_2.ogg
Normal file
Binary file not shown.
BIN
SFX/emit.ogg
Normal file
BIN
SFX/emit.ogg
Normal file
Binary file not shown.
@@ -88,7 +88,7 @@ function keyDown.mode(key)
|
||||
levelSel=levelSel+1
|
||||
end
|
||||
elseif key=="return"then
|
||||
loadGame(modeID[modeSel],levelSel)
|
||||
loadGame(modeSel,levelSel)
|
||||
elseif key=="c"then
|
||||
gotoScene("custom")
|
||||
elseif key=="escape"then
|
||||
@@ -107,7 +107,7 @@ function keyDown.custom(key)
|
||||
elseif key=="up"then
|
||||
optSel=(optSel-2)%#customID+1
|
||||
elseif key=="return"then
|
||||
loadGame("custom",1)
|
||||
loadGame(0,1)
|
||||
elseif key=="escape"then
|
||||
back()
|
||||
end
|
||||
@@ -185,7 +185,7 @@ function gamepadDown.mode(key)
|
||||
elseif key=="dpup"then
|
||||
if modeSel>1 then modeSel=modeSel-1 end
|
||||
elseif key=="start"then
|
||||
loadGame(modeID[modeSel],levelSel)
|
||||
loadGame(modeSel,levelSel)
|
||||
elseif key=="back"then
|
||||
back()
|
||||
end
|
||||
|
||||
2
conf.lua
2
conf.lua
@@ -9,7 +9,7 @@ function love.conf(t)
|
||||
t.audio.mixwithsystem=true--Switch on to keep sysBGM
|
||||
|
||||
local W=t.window
|
||||
W.title="Techmino V0.7.6"
|
||||
W.title="Techmino V0.7.7"
|
||||
W.icon="/image/icon.png"
|
||||
W.width,W.height=1280,720
|
||||
W.borderless=X
|
||||
|
||||
80
gamefunc.lua
80
gamefunc.lua
@@ -1,15 +1,17 @@
|
||||
function loadGame(mode,level)
|
||||
--rec={}
|
||||
gameMode,gameLevel=mode,level
|
||||
print(mode)
|
||||
curMode={id=modeID[mode],lv=level,modeName=modeName[mode],levelName=modeLevel[modeID[mode]][level]}
|
||||
gotoScene("play")
|
||||
end
|
||||
function resetGameData()
|
||||
frame=0
|
||||
pushSpeed,garbageSpeed=3,1
|
||||
garbageSpeed=1
|
||||
pushSpeed=3
|
||||
|
||||
players={alive={}}
|
||||
modeEnv=defaultModeEnv[gameMode][gameLevel]or defaultModeEnv[gameMode][1]
|
||||
loadmode[gameMode]()
|
||||
modeEnv=defaultModeEnv[curMode.id][curMode.lv]or defaultModeEnv[curMode.id][1]
|
||||
loadmode[curMode.id]()
|
||||
|
||||
FX.beam={}
|
||||
for k,v in pairs(PTC.dust)do
|
||||
@@ -27,8 +29,8 @@ function resetGameData()
|
||||
end
|
||||
mostBadge,mostDangerous,secBadge,secDangerous=nil
|
||||
gameStage=1
|
||||
pushSpeed=2
|
||||
garbageSpeed=.3
|
||||
pushSpeed=2
|
||||
end
|
||||
for i=1,#virtualkey do
|
||||
virtualkey[i].press=false
|
||||
@@ -77,12 +79,12 @@ function createPlayer(id,x,y,size,AIspeed,data)
|
||||
P.control=false
|
||||
P.timing=false
|
||||
P.time=0
|
||||
P.cstat={key=0,piece=0,row=0,atk=0,techrash=0,pc=0}--Current gamestat
|
||||
P.cstat={key=0,piece=0,row=0,atk=0,techrash=0,pc=0,event=0}--Current gamestat
|
||||
P.keyTime={}for i=1,10 do P.keyTime[i]=-1e5 end P.keySpeed=0
|
||||
P.dropTime={}for i=1,10 do P.dropTime[i]=-1e5 end P.dropSpeed=0
|
||||
|
||||
P.field,P.visTime,P.atkBuffer={},{},{}
|
||||
|
||||
P.field,P.visTime={},{}
|
||||
P.atkBuffer={sum=0}
|
||||
|
||||
P.ko,P.badge,P.strength=0,0,0
|
||||
P.atkMode,P.swappingAtkMode=1,20
|
||||
@@ -151,11 +153,12 @@ function createPlayer(id,x,y,size,AIspeed,data)
|
||||
P.b2b=0
|
||||
P.b2b1=0
|
||||
|
||||
P.endCounter=0
|
||||
P.counter=0
|
||||
P.result=nil--string,"win"/"lose"
|
||||
P.task={}
|
||||
P.bonus={}
|
||||
end
|
||||
end
|
||||
function showText(P,text,type,font,dy,spd,inf)
|
||||
if not P.small then
|
||||
ins(P.bonus,{t=0,text=text,draw=FX[type],font=font,dy=dy or 0,speed=spd or 1,inf=inf})
|
||||
@@ -233,47 +236,53 @@ function changeAtk(P,R)
|
||||
P.atking=nil
|
||||
end
|
||||
end
|
||||
function freshRoyaleTarget()
|
||||
mostBadge,secBadge,mostDangerous,secDangerous=nil
|
||||
local h,b=0,0
|
||||
function freshMostBadge()
|
||||
mostBadge,secBadge=nil
|
||||
local m=0
|
||||
for i=1,#players.alive do
|
||||
if players.alive[i].badge>=h then
|
||||
if players.alive[i].badge>=m then
|
||||
mostBadge,secBadge=players.alive[i],mostBadge
|
||||
h=players[i].badge
|
||||
m=players.alive[i].badge
|
||||
end
|
||||
if #players.alive[i].field>=b then
|
||||
end
|
||||
end
|
||||
function freshMostDangerous()
|
||||
mostDangerous,secDangerous=nil
|
||||
local m=0
|
||||
for i=1,#players.alive do
|
||||
if #players.alive[i].field>=m then
|
||||
mostDangerous,secDangerous=players.alive[i],mostDangerous
|
||||
b=#players.alive[i].field
|
||||
m=#players.alive[i].field
|
||||
end
|
||||
end
|
||||
end
|
||||
function royaleLevelup()
|
||||
gameStage=gameStage+1
|
||||
local s
|
||||
local spd
|
||||
if(gameStage==3 or gameStage>4)and players[1].alive then
|
||||
showText(players[1],#players.alive.." Players Remain","beat",50,-100,.3)
|
||||
end
|
||||
if gameStage==2 then
|
||||
s=30
|
||||
spd=30
|
||||
elseif gameStage==3 then
|
||||
s=15
|
||||
spd=15
|
||||
garbageSpeed=.6
|
||||
BGM("cruelty")
|
||||
elseif gameStage==4 then
|
||||
s=10
|
||||
spd=10
|
||||
pushSpeed=3
|
||||
elseif gameStage==5 then
|
||||
s=5
|
||||
spd=5
|
||||
garbageSpeed=1
|
||||
elseif gameStage==6 then
|
||||
s=3
|
||||
spd=3
|
||||
BGM("final")
|
||||
end
|
||||
for i=1,#players.alive do
|
||||
local P=players.alive[i]
|
||||
P.gameEnv.drop=s
|
||||
P.gameEnv.drop=spd
|
||||
end
|
||||
if gameLevel==5 and players[1].alive then
|
||||
if curMode.lv==5 and players[1].alive then
|
||||
local P=players[1]
|
||||
P.gameEnv.drop=int(P.gameEnv.drop*.3)
|
||||
if P.gameEnv.drop==0 then
|
||||
@@ -393,7 +402,7 @@ function pressKey(i,p)
|
||||
end
|
||||
function releaseKey(i,p)
|
||||
p.keyPressing[i]=false
|
||||
P.isKeyDown[i]=false
|
||||
p.isKeyDown[i]=false
|
||||
-- if playmode=="recording"then ins(rec,{-i,frame})end
|
||||
end
|
||||
function spin(d,ifpre)
|
||||
@@ -581,7 +590,7 @@ function drop()
|
||||
if cc>0 then
|
||||
SFX(clear_n[cc])
|
||||
SFX(ren_n[min(P.combo,11)])
|
||||
VIB(cc<3 and 1 or cc-1)
|
||||
if P.id==1 then VIB(cc<3 and 1 or cc-1)end
|
||||
end
|
||||
P.b2b=max(min(P.b2b,600),0)
|
||||
|
||||
@@ -617,13 +626,10 @@ function drop()
|
||||
csend=csend-1
|
||||
end
|
||||
P.atkBuffer[1].amount=P.atkBuffer[1].amount-1
|
||||
P.atkBuffer.sum=P.atkBuffer.sum-1
|
||||
if P.atkBuffer[1].amount==0 then
|
||||
rem(P.atkBuffer,1)
|
||||
end
|
||||
if P.atkBuffer[1]and csend==0 then
|
||||
local s=P.atkBuffer[1].amount
|
||||
P.atkBuffer[1].lv=s<4 and 1 or s<7 and 2 or 3
|
||||
end
|
||||
end
|
||||
if csend>0 then
|
||||
if modeEnv.royaleMode then
|
||||
@@ -642,6 +648,7 @@ function drop()
|
||||
elseif #players.alive>1 then
|
||||
garbageSend(P,randomTarget(P),csend,sendTime)
|
||||
end
|
||||
if P.id==1 and csend>3 then sysSFX("emit",min(csend,8)*.125)end
|
||||
end
|
||||
elseif cc==0 then
|
||||
if P.b2b>480 then
|
||||
@@ -676,11 +683,13 @@ function lock()
|
||||
end
|
||||
function garbageSend(S,R,send,time)
|
||||
local pos=rnd(10)
|
||||
local level=send<4 and 1 or send<7 and 2 or 3
|
||||
createBeam(S,R,level)
|
||||
createBeam(S,R,send<4 and 1 or send<7 and 2 or 3)
|
||||
R.lastRecv=S
|
||||
if #R.atkBuffer<15 then
|
||||
ins(R.atkBuffer,{pos,amount=send,countdown=time,cd0=time,time=0,sent=false,lv=level})
|
||||
if R.atkBuffer.sum<20 then
|
||||
send=min(send,20-R.atkBuffer.sum)
|
||||
R.atkBuffer.sum=R.atkBuffer.sum+send
|
||||
ins(R.atkBuffer,{pos,amount=send,countdown=time,cd0=time,time=0,sent=false,lv=send<4 and 1 or send<7 and 2 or 3})
|
||||
if R.id==1 then sysSFX(send<4 and "blip_1"or"blip_2",min(send+1,5)*.1)end
|
||||
end
|
||||
end
|
||||
function garbageRelease()
|
||||
@@ -695,6 +704,7 @@ function garbageRelease()
|
||||
P.field[1][atk[k]]=0
|
||||
end
|
||||
end
|
||||
P.atkBuffer.sum=P.atkBuffer.sum-atk.amount
|
||||
atk.sent=true
|
||||
atk.time=0
|
||||
P.fieldBeneath=P.fieldBeneath+atk.amount*30
|
||||
@@ -755,7 +765,7 @@ act={
|
||||
P.cy=P.y_img
|
||||
P.spinLast=false
|
||||
SFX("drop")
|
||||
VIB(0)
|
||||
if P.id==1 then VIB(0)end
|
||||
end
|
||||
drop()
|
||||
end
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 201 B |
188
list.lua
188
list.lua
@@ -24,12 +24,12 @@ PClist={--ZSLJTOI
|
||||
{7,7,4,5},{7,7,6,4},{7,7,2,4},{7,7,1,3},{7,7,5,6},{7,7,5,2},{7,7,5,4},{7,7,5,3},
|
||||
{7,4,1,2},{7,3,5,7},{7,5,4,3},{7,5,1,2},{7,1,4,2},{7,4,2,5},{7,6,4,5},{7,5,4,2},
|
||||
{7,5,6,4},{7,5,3,6},{7,2,5,6},{7,2,6,4},{7,2,1,3},{7,5,2,7},{7,5,7,2},{7,5,2,3},
|
||||
{7,5,3,2},{7,6,4,5},{7,6,5,4},{7,3,1,5},{7,3,2,5},{7,4,1,5},{7,4,5,2},{7,7,3,6},
|
||||
{7,3,7,6},{7,3,6,2},{7,3,7,1},{7,6,4,2},{3,2,7,6},{3,2,6,7},{7,7,4,5},{7,5,3,4},
|
||||
{7,3,6,5},{7,3,2,5},{7,4,6,5},{7,6,4,5},{7,5,2,3},{7,3,5,7},{7,3,2,5},{7,3,5,1},
|
||||
{7,5,2,3},{3,6,2,5},{3,1,2,5},{3,1,1,5},{3,1,5,2},{3,1,5,1},{3,5,1,2},{4,5,3,2},
|
||||
{4,2,6,5},{6,5,3,2},{1,4,2,5},{1,5,3,6},{5,2,6,3},{5,2,1,3},{5,2,7,4},{2,4,1,5},
|
||||
{2,4,5,1},{2,1,4,5},{2,5,4,3},{2,5,6,7},{7,5,4,2},
|
||||
{7,5,3,2},{7,6,5,4},{7,3,1,5},{7,3,2,5},{7,4,1,5},{7,4,5,2},{7,7,3,6},{7,3,7,6},
|
||||
{7,3,6,2},{7,3,7,1},{7,6,4,2},{3,2,7,6},{3,2,6,7},{7,7,4,5},{7,5,3,4},{7,3,6,5},
|
||||
{7,3,2,5},{7,4,6,5},{7,5,2,3},{7,3,5,7},{7,3,2,5},{7,3,5,1},{7,5,2,3},{3,6,2,5},
|
||||
{3,1,2,5},{3,1,1,5},{3,1,5,2},{3,1,5,1},{3,5,1,2},{4,5,3,2},{4,2,6,5},{6,5,3,2},
|
||||
{1,4,2,5},{1,5,3,6},{5,2,6,3},{5,2,1,3},{5,2,7,4},{2,4,1,5},{2,4,5,1},{2,1,4,5},
|
||||
{2,5,4,3},{2,5,6,7},{7,5,4,2},
|
||||
}
|
||||
color={
|
||||
red={1,0,0},
|
||||
@@ -68,7 +68,7 @@ attackColor={
|
||||
gc.setColor(1,t,0)
|
||||
end,
|
||||
function(t)
|
||||
gc.setColor(1,.3,.2+t*.8)
|
||||
gc.setColor(1,.4,.3+t*.7)
|
||||
end,
|
||||
function(t)
|
||||
gc.setColor(.2+t*.8,.2+t*.8,1)
|
||||
@@ -104,7 +104,7 @@ for j=1,7 do
|
||||
spinName[0][j]=blockName[j].." spin"
|
||||
end
|
||||
|
||||
miniTitle_pixel={
|
||||
miniTitle_rect={
|
||||
{2,0,5,1},{4,1,1,6},
|
||||
{9,0,4,1},{9,3,4,1},{9,6,4,1},{8,0,1,7},
|
||||
{15,0,3,1},{15,6,3,1},{14,0,1,7},
|
||||
@@ -125,6 +125,7 @@ sfx={
|
||||
"ren_1","ren_2","ren_3","ren_4","ren_5","ren_6","ren_7","ren_8","ren_9","ren_10","ren_11",
|
||||
"clear_1","clear_2","clear_3","clear_4",
|
||||
"spin_0","spin_1","spin_2","spin_3",
|
||||
"emit","blip_1","blip_2",
|
||||
"perfectclear",
|
||||
}
|
||||
bgm={
|
||||
@@ -146,7 +147,7 @@ prevMenu={
|
||||
custom="mode",
|
||||
ready="mode",
|
||||
play=function()
|
||||
gotoScene(gameMode~="custom"and"mode"or"custom")
|
||||
gotoScene(curMode.id~="custom"and"mode"or"custom")
|
||||
end,
|
||||
help="main",
|
||||
stat="main",
|
||||
@@ -274,6 +275,12 @@ defaultModeEnv={
|
||||
},
|
||||
},
|
||||
marathon={
|
||||
{
|
||||
drop=1e99,
|
||||
lock=1e99,
|
||||
target=200,
|
||||
reach=Event.marathon_reach,
|
||||
},
|
||||
{
|
||||
drop=60,
|
||||
fall=20,
|
||||
@@ -286,6 +293,16 @@ defaultModeEnv={
|
||||
target=200,
|
||||
reach=Event.marathon_reach,
|
||||
},
|
||||
{
|
||||
_20G=true,
|
||||
drop=0,
|
||||
lock=death_lock[1],
|
||||
wait=death_wait[1],
|
||||
fall=death_fall[1],
|
||||
target=50,
|
||||
reach=Event.marathon_reach_lunatic,
|
||||
arr=1,
|
||||
},
|
||||
},
|
||||
zen={
|
||||
{
|
||||
@@ -305,18 +322,6 @@ defaultModeEnv={
|
||||
solo={
|
||||
{},
|
||||
},
|
||||
death={
|
||||
{
|
||||
_20G=true,
|
||||
drop=0,
|
||||
lock=death_lock[1],
|
||||
wait=death_wait[1],
|
||||
fall=death_fall[1],
|
||||
target=50,
|
||||
reach=Event.death_reach,
|
||||
arr=1,
|
||||
},
|
||||
},
|
||||
tsd={
|
||||
{
|
||||
oncehold=false,
|
||||
@@ -334,9 +339,9 @@ defaultModeEnv={
|
||||
},
|
||||
blind={
|
||||
{
|
||||
drop=1e99,
|
||||
lock=1e99,
|
||||
visible=0,
|
||||
drop=30,
|
||||
lock=60,
|
||||
visible=2,
|
||||
},
|
||||
{
|
||||
drop=15,
|
||||
@@ -350,6 +355,48 @@ defaultModeEnv={
|
||||
visible=0,
|
||||
freshLimit=15,
|
||||
},
|
||||
{
|
||||
_20G=true,
|
||||
drop=0,
|
||||
lock=15,
|
||||
wait=10,
|
||||
fall=15,
|
||||
visible=0,
|
||||
arr=1,
|
||||
},
|
||||
},
|
||||
dig={
|
||||
{
|
||||
drop=60,
|
||||
lock=120,
|
||||
fall=20,
|
||||
},
|
||||
{
|
||||
drop=10,
|
||||
lock=30,
|
||||
},
|
||||
},
|
||||
survivor={
|
||||
{
|
||||
drop=60,
|
||||
lock=120,
|
||||
fall=30,
|
||||
},
|
||||
{
|
||||
drop=30,
|
||||
lock=60,
|
||||
fall=20,
|
||||
},
|
||||
{
|
||||
drop=10,
|
||||
lock=20,
|
||||
fall=15,
|
||||
},
|
||||
{
|
||||
drop=5,
|
||||
lock=15,
|
||||
fall=10,
|
||||
},
|
||||
},
|
||||
sudden={
|
||||
{
|
||||
@@ -369,13 +416,13 @@ defaultModeEnv={
|
||||
drop=15,
|
||||
lock=60,
|
||||
target=0,
|
||||
reach=Event.sudden_reach_HARD,
|
||||
reach=Event.sudden_reach_hard,
|
||||
},
|
||||
{
|
||||
drop=5,
|
||||
lock=20,
|
||||
target=0,
|
||||
reach=Event.sudden_reach_HARD,
|
||||
reach=Event.sudden_reach_hard,
|
||||
},
|
||||
},
|
||||
pctrain={
|
||||
@@ -434,6 +481,7 @@ defaultModeEnv={
|
||||
royaleMode=true,
|
||||
royalePowerup={2,5,10,20},
|
||||
royaleRemain={30,20,15,10,5},
|
||||
pushSpeed=2,
|
||||
},
|
||||
},
|
||||
techmino99={
|
||||
@@ -442,6 +490,7 @@ defaultModeEnv={
|
||||
royaleMode=true,
|
||||
royalePowerup={2,6,14,30},
|
||||
royaleRemain={75,50,35,20,10},
|
||||
pushSpeed=2,
|
||||
},
|
||||
},
|
||||
drought={
|
||||
@@ -460,24 +509,7 @@ defaultModeEnv={
|
||||
reach=Event.gameover.win,
|
||||
},
|
||||
},
|
||||
gmroll={
|
||||
{
|
||||
drop=0,
|
||||
lock=15,
|
||||
wait=10,
|
||||
fall=15,
|
||||
_20G=true,
|
||||
visible=0,
|
||||
arr=1,
|
||||
},
|
||||
},
|
||||
p2={
|
||||
{},
|
||||
},
|
||||
p3={
|
||||
{},
|
||||
},
|
||||
p4={
|
||||
hotseat={
|
||||
{},
|
||||
},
|
||||
custom={
|
||||
@@ -488,23 +520,22 @@ defaultModeEnv={
|
||||
}
|
||||
modeLevel={
|
||||
sprint={"10L","20L","40L","100L","400L","1000L"},
|
||||
marathon={"NORMAL","LUNATIC"},
|
||||
marathon={"EASY","NORMAL","EXTRA","DEATH"},
|
||||
zen={"NORMAL"},
|
||||
infinite={"NORMAL"},
|
||||
solo={"EASY","NORMAL","HARD","LUNATIC"},
|
||||
death={"LUNATIC"},
|
||||
tsd={"NORMAL","HARD"},
|
||||
blind={"EASY","HARD","LUNATIC"},
|
||||
blind={"EASY","HARD","LUNATIC","GM"},
|
||||
dig={"NORMAL","LUNATIC"},
|
||||
survivor={"EASY","NORMAL","HARD","LUNATIC"},
|
||||
sudden={"EASY","NORMAL","HARD","LUNATIC"},
|
||||
pctrain={"HARD","LUNATIC"},
|
||||
pcchallenge={"NORMAL","HARD","LUNATIC"},
|
||||
techmino41={"EASY","NORMAL","HARD","LUNATIC","HELL"},
|
||||
techmino99={"EASY","NORMAL","HARD","LUNATIC","HELL"},
|
||||
techmino41={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE"},
|
||||
techmino99={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE"},
|
||||
drought={"NORMAL","MESS"},
|
||||
gmroll={"GM"},
|
||||
p2={"NORMAL"},
|
||||
p3={"NORMAL"},
|
||||
p4={"NORMAL"},
|
||||
hotseat={"2P","3P","4P",},
|
||||
custom={""},
|
||||
}
|
||||
modeLevelColor={
|
||||
EASY=color.cyan,
|
||||
@@ -515,7 +546,8 @@ modeLevelColor={
|
||||
|
||||
MESS=color.lightGrey,
|
||||
GM=color.blue,
|
||||
HELL=color.grey,
|
||||
ULTIMATE=color.lightYellow,
|
||||
DEATH=color.lightRed,
|
||||
["10L"]=color.cyan,
|
||||
["20L"]=color.lightBlue,
|
||||
["40L"]=color.green,
|
||||
@@ -524,32 +556,32 @@ modeLevelColor={
|
||||
["1000L"]=color.darkRed,
|
||||
}
|
||||
modeID={
|
||||
"sprint","marathon","zen","infinite","solo","death","tsd","blind","sudden",
|
||||
"pctrain","pcchallenge","techmino41","techmino99","drought","gmroll","p2","p3","p4"
|
||||
[0]="custom",
|
||||
"sprint","marathon","zen","infinite","solo","tsd","blind","dig","survivor","sudden",
|
||||
"pctrain","pcchallenge","techmino41","techmino99","drought","hotseat",
|
||||
}
|
||||
modeName={
|
||||
"Sprint","Marathon","Zen","Infinite","1v1","Death","TSD-only","Blind","Sudden",
|
||||
"PC Train","PC Challenge","Techmino41","Techmino99","Drought","GM roll","2P","3P","4P"
|
||||
[0]="Custom",
|
||||
"Sprint","Marathon","Zen","Infinite","1v1","TSD-only","Blind","Dig","Survivor","Sudden",
|
||||
"PC Train","PC Challenge","Techmino41","Techmino99","Drought","Hotseat",
|
||||
}
|
||||
modeInfo={
|
||||
sprint="Speed run.",
|
||||
marathon="Clear 200 Lines",
|
||||
marathon="Survive and reach target",
|
||||
zen="Clear 200 Lines without gravity",
|
||||
infinite="Infinite game,infinite happiness",
|
||||
solo="Beat AI",
|
||||
death="Survive under terrible speed",
|
||||
tsd="try to make 20 T-spin-double",
|
||||
tsd="Make more T-spin-doubles",
|
||||
blind="Invisible board",
|
||||
sudden="Try to survive",
|
||||
dig="Downstack!",
|
||||
survivor="Hand them!",
|
||||
sudden="Techniques practice",
|
||||
pctrain="Let's learn some PCs",
|
||||
pcchallenge="Make PCs in 100 Lines",
|
||||
techmino41="Melee fight with 40 AIs",
|
||||
techmino99="Melee fight with 98 AIs",
|
||||
drought="ERRSEQ flood attack",
|
||||
gmroll="Who want to be the grand master?",
|
||||
p2="2 players game",
|
||||
p3="3 players game",
|
||||
p4="4 players game",
|
||||
hotseat="",
|
||||
}
|
||||
|
||||
freshMethod={
|
||||
@@ -579,21 +611,7 @@ freshMethod={
|
||||
end,
|
||||
function()
|
||||
P.bn,P.cb=rem(P.nxt,1),rem(P.nb,1)
|
||||
if P.cstat.piece%4==0 then
|
||||
local r=rnd(#PClist)
|
||||
local P=players[1]
|
||||
local f=P.cstat.pc%2==0
|
||||
for i=1,4 do
|
||||
local b=PClist[r][i]
|
||||
if f then
|
||||
if b<3 then b=3-b
|
||||
elseif b<5 then b=7-b
|
||||
end
|
||||
end
|
||||
ins(P.nxt,b)
|
||||
ins(P.nb,blocks[b][0])
|
||||
end
|
||||
end
|
||||
--generate in newPC
|
||||
end,
|
||||
function()
|
||||
P.bn,P.cb=rem(P.nxt,1),rem(P.nb,1)
|
||||
@@ -701,14 +719,14 @@ Buttons={
|
||||
{x=250,y=360,w=350,h=100,rgb=color.blue,f=50,t="Settings",code=function()gotoScene("setting")end,up=1,down=3},
|
||||
{x=160,y=470,w=170,h=100,rgb=color.yellow,f=50,t="Help",code=function()gotoScene("help")end,up=2,down=5,right=4},
|
||||
{x=340,y=470,w=170,h=100,rgb=color.cyan,f=40,t="Statistics",code=function()gotoScene("stat")end,up=2,down=5,left=3},
|
||||
{x=250,y=580,w=350,h=100,rgb=color.grey,f=40,t="Quit",code=back,up=3},
|
||||
{x=250,y=580,w=350,h=100,rgb=color.grey,f=40,t="Quit",code=function()gotoScene("quit")end,up=3},
|
||||
},
|
||||
mode={
|
||||
{x=1000,y=210,w=200,h=140,rgb=color.white,hide=function()return modeSel==1 end,t="Λ",f=64,code=function()keyDown.mode("up")end},
|
||||
{x=1000,y=430,w=200,h=140,rgb=color.white,hide=function()return modeSel==#modeID end,t="v",f=80,code=function()keyDown.mode("down")end},
|
||||
{x=190,y=160,w=100,h=80,rgb=color.white,hide=function()return levelSel==1 end,t="<",code=function()keyDown.mode("left")end},
|
||||
{x=350,y=160,w=100,h=80,rgb=color.white,hide=function()return levelSel==#modeLevel[modeID[modeSel]] end,t=">",code=function()keyDown.mode("right")end},
|
||||
{x=1000,y=600,w=250,h=100,rgb=color.green,f=50,t="Start",code=function()loadGame(modeID[modeSel],levelSel)end},
|
||||
{x=1000,y=600,w=250,h=100,rgb=color.green,f=50,t="Start",code=function()loadGame(modeSel,levelSel)end},
|
||||
{x=270,y=540,w=190,h=85,rgb=color.yellow,t="Custom(c)",code=function()gotoScene("custom")end},
|
||||
{x=640,y=630,w=230,h=90,rgb=color.white,f=45,t="Back",code=back},
|
||||
},
|
||||
@@ -717,7 +735,7 @@ Buttons={
|
||||
{x=1000,y=440,w=100,h=100,rgb=color.white,t="v",f=50,code=function()optSel=optSel%#customID+1 end},
|
||||
{x=880,y=320,w=100,h=100,rgb=color.white,t="<",f=50,code=function()local k=customID[optSel]customSel[k]=(customSel[k]-2)%#customRange[k]+1 end},
|
||||
{x=1120,y=320,w=100,h=100,rgb=color.white,t=">",f=50,code=function()local k=customID[optSel]customSel[k]=customSel[k]%#customRange[k]+1 end},
|
||||
{x=1000,y=580,w=180,h=80,rgb=color.green,t="Start",code=function()loadGame("custom",levelSel)end},
|
||||
{x=1000,y=580,w=180,h=80,rgb=color.green,t="Start",code=function()loadGame(0,1)end},
|
||||
{x=640,y=630,w=180,h=60,rgb=color.white,t="Back",code=back},
|
||||
},
|
||||
play={
|
||||
@@ -938,7 +956,7 @@ Text={
|
||||
"Author:MrZ E-mail:1046101471@qq.com",
|
||||
"Programe:MrZ Art:MrZ Music:MrZ SFX:MrZ",
|
||||
"Tool used:VScode,GFIE,Beepbox,Goldwave",
|
||||
"Special thanks:farter,teatube,flyz,t830,[all test staff] and YOU!!",
|
||||
"Special thanks:Farter,Teatube,196,Flyz,T830,[all test staff] and YOU!",
|
||||
"Any bugs/suggestions to my E-mail.",
|
||||
},
|
||||
}
|
||||
286
main.lua
286
main.lua
@@ -25,7 +25,6 @@ system=sys.getOS()
|
||||
touching=nil--1st touching ID
|
||||
|
||||
scene=""
|
||||
gameMode=""
|
||||
bgmPlaying=nil
|
||||
curBG="none"
|
||||
BGblock={ct=150,next=7}
|
||||
@@ -98,7 +97,7 @@ loadmode={
|
||||
end,
|
||||
solo=function()
|
||||
createPlayer(1,20,15)--Player
|
||||
createPlayer(2,660,85,.9,customRange.opponent[3*gameLevel])--AI
|
||||
createPlayer(2,660,85,.9,customRange.opponent[3*curMode.lv])--AI
|
||||
curBG="game2"
|
||||
BGM("race")
|
||||
end,
|
||||
@@ -110,13 +109,45 @@ loadmode={
|
||||
tsd=function()
|
||||
createPlayer(1,340,15)
|
||||
curBG="matrix"
|
||||
BGM("infinite")
|
||||
BGM("reason")
|
||||
end,
|
||||
blind=function()
|
||||
createPlayer(1,340,15)
|
||||
curBG="glow"
|
||||
BGM("push")
|
||||
end,
|
||||
dig=function()
|
||||
createPlayer(1,340,15)
|
||||
local P=players[1]
|
||||
if curMode.lv==1 then
|
||||
ins(players[1].task,Event.task.dig_normal)
|
||||
pushSpeed=1
|
||||
elseif curMode.lv==2 then
|
||||
ins(players[1].task,Event.task.dig_lunatic)
|
||||
pushSpeed=1
|
||||
end
|
||||
curBG="game2"
|
||||
BGM("push")
|
||||
end,
|
||||
survivor=function()
|
||||
createPlayer(1,340,15)
|
||||
local P=players[1]
|
||||
if curMode.lv==1 then
|
||||
ins(players[1].task,Event.task.survivor_easy)
|
||||
pushSpeed=1
|
||||
elseif curMode.lv==2 then
|
||||
ins(players[1].task,Event.task.survivor_normal)
|
||||
pushSpeed=1
|
||||
elseif curMode.lv==3 then
|
||||
ins(players[1].task,Event.task.survivor_hard)
|
||||
pushSpeed=2
|
||||
elseif curMode.lv==4 then
|
||||
ins(players[1].task,Event.task.survivor_lunatic)
|
||||
pushSpeed=2
|
||||
end
|
||||
curBG="game2"
|
||||
BGM("push")
|
||||
end,
|
||||
sudden=function()
|
||||
createPlayer(1,340,15)
|
||||
curBG="matrix"
|
||||
@@ -142,17 +173,17 @@ loadmode={
|
||||
end,
|
||||
techmino41=function()
|
||||
createPlayer(1,340,15)--Player
|
||||
if gameLevel==5 then players[1].gameEnv.drop=15 end
|
||||
if curMode.lv==5 then players[1].gameEnv.drop=15 end
|
||||
local n,min,max=2
|
||||
if gameLevel==1 then
|
||||
if curMode.lv==1 then
|
||||
min,max=5,30
|
||||
elseif gameLevel==2 then
|
||||
elseif curMode.lv==2 then
|
||||
min,max=3,25
|
||||
elseif gameLevel==3 then
|
||||
elseif curMode.lv==3 then
|
||||
min,max=2,20
|
||||
elseif gameLevel==4 then
|
||||
elseif curMode.lv==4 then
|
||||
min,max=2,10
|
||||
elseif gameLevel==5 then
|
||||
elseif curMode.lv==5 then
|
||||
min,max=1,6
|
||||
end
|
||||
for i=1,4 do
|
||||
@@ -173,17 +204,17 @@ loadmode={
|
||||
end,
|
||||
techmino99=function()
|
||||
createPlayer(1,340,15)--Player
|
||||
if gameLevel==5 then players[1].gameEnv.drop=15 end
|
||||
if curMode.lv==5 then players[1].gameEnv.drop=15 end
|
||||
local n,min,max=2
|
||||
if gameLevel==1 then
|
||||
if curMode.lv==1 then
|
||||
min,max=5,32
|
||||
elseif gameLevel==2 then
|
||||
elseif curMode.lv==2 then
|
||||
min,max=3,25
|
||||
elseif gameLevel==3 then
|
||||
elseif curMode.lv==3 then
|
||||
min,max=2,18
|
||||
elseif gameLevel==4 then
|
||||
elseif curMode.lv==4 then
|
||||
min,max=2,12
|
||||
elseif gameLevel==5 then
|
||||
elseif curMode.lv==5 then
|
||||
min,max=1,12
|
||||
end
|
||||
for i=1,7 do
|
||||
@@ -212,27 +243,20 @@ loadmode={
|
||||
curBG="glow"
|
||||
BGM("push")
|
||||
end,
|
||||
p2=function()
|
||||
createPlayer(1,20,15)
|
||||
createPlayer(2,650,15)
|
||||
|
||||
curBG="game2"
|
||||
BGM("way")
|
||||
end,
|
||||
p3=function()
|
||||
createPlayer(1,20,100,.65)
|
||||
createPlayer(2,435,100,.65)
|
||||
createPlayer(3,850,100,.65)
|
||||
|
||||
curBG="game2"
|
||||
BGM("way")
|
||||
end,
|
||||
p4=function()
|
||||
createPlayer(1,25,150,.5)
|
||||
createPlayer(2,335,150,.5)
|
||||
createPlayer(3,645,150,.5)
|
||||
createPlayer(4,955,150,.5)
|
||||
|
||||
hotseat=function()
|
||||
if curMode.lv==1 then
|
||||
createPlayer(1,20,15)
|
||||
createPlayer(2,650,15)
|
||||
elseif curMode.lv==2 then
|
||||
createPlayer(1,20,100,.65)
|
||||
createPlayer(2,435,100,.65)
|
||||
createPlayer(3,850,100,.65)
|
||||
elseif curMode.lv==3 then
|
||||
createPlayer(1,25,160,.5)
|
||||
createPlayer(2,335,160,.5)
|
||||
createPlayer(3,645,160,.5)
|
||||
createPlayer(4,955,160,.5)
|
||||
end
|
||||
curBG="game2"
|
||||
BGM("way")
|
||||
end,
|
||||
@@ -278,12 +302,6 @@ mesDisp={
|
||||
mStr(P.gameEnv.target,-75,370)
|
||||
gc.rectangle("fill",-120,376,90,4)
|
||||
end,
|
||||
death=function()
|
||||
setFont(50)
|
||||
mStr(P.cstat.row,-75,320)
|
||||
mStr(P.gameEnv.target,-75,370)
|
||||
gc.rectangle("fill",-120,376,90,4)
|
||||
end,
|
||||
tsd=function()
|
||||
setFont(35)
|
||||
gc.print("TSD",-102,405)
|
||||
@@ -298,6 +316,18 @@ mesDisp={
|
||||
mStr(P.cstat.row,-75,220)
|
||||
mStr(P.cstat.techrash,-75,340)
|
||||
end,
|
||||
dig=function()
|
||||
setFont(70)
|
||||
mStr(P.cstat.event,-75,310)
|
||||
setFont(30)
|
||||
gc.print("Wave",-112,375)
|
||||
end,
|
||||
survivor=function()
|
||||
setFont(70)
|
||||
mStr(P.cstat.event,-75,310)
|
||||
setFont(30)
|
||||
gc.print("Wave",-112,375)
|
||||
end,
|
||||
pctrain=function()
|
||||
setFont(25)
|
||||
gc.print("Perfect Clear",-140,410)
|
||||
@@ -346,12 +376,6 @@ mesDisp={
|
||||
setFont(75)
|
||||
mStr(max(100-P.cstat.row,0),-75,280)
|
||||
end,
|
||||
gmroll=function()
|
||||
setFont(25)
|
||||
gc.print("Techrash",-123,420)
|
||||
setFont(80)
|
||||
mStr(P.cstat.techrash,-75,340)
|
||||
end,
|
||||
custom=function()
|
||||
if P.gameEnv.target<1e4 then
|
||||
setFont(75)
|
||||
@@ -367,8 +391,14 @@ Event={
|
||||
P.timing=false
|
||||
P.waiting=1e99
|
||||
P.b2b=0
|
||||
P.result="WIN"
|
||||
changeAtk(P)
|
||||
if modeEnv.royaleMode then
|
||||
P.rank=#players.alive
|
||||
P.result="WIN"
|
||||
changeAtk(P)
|
||||
end
|
||||
while P.task[1]do
|
||||
rem(P.task)
|
||||
end
|
||||
for i=1,#P.atkBuffer do
|
||||
P.atkBuffer[i].sent=true
|
||||
P.atkBuffer[i].time=0
|
||||
@@ -388,16 +418,19 @@ Event={
|
||||
P.timing=false
|
||||
P.waiting=1e99
|
||||
P.b2b=0
|
||||
P.result="K.O."
|
||||
showText(P,"LOSE","appear",90,nil,nil,true)
|
||||
while P.task[1]do
|
||||
rem(P.task)
|
||||
end
|
||||
for i=1,#players.alive do
|
||||
if players.alive[i]==P then
|
||||
rem(players.alive,i)
|
||||
break
|
||||
end
|
||||
end
|
||||
changeAtk(P)
|
||||
if modeEnv.royaleMode then
|
||||
changeAtk(P)
|
||||
P.result="K.O."
|
||||
P.rank=#players.alive
|
||||
P.strength=0
|
||||
if P.lastRecv and P.lastRecv.alive then
|
||||
local A=P.lastRecv
|
||||
@@ -412,7 +445,7 @@ Event={
|
||||
end
|
||||
end
|
||||
end
|
||||
freshRoyaleTarget()
|
||||
freshMostBadge()
|
||||
for i=1,#players.alive do
|
||||
if players.alive[i].atking==P then
|
||||
freshTarget(players.alive[i])
|
||||
@@ -431,6 +464,7 @@ Event={
|
||||
P.visTime[i][j]=min(P.visTime[i][j],20)
|
||||
end
|
||||
end
|
||||
showText(P,"LOSE","appear",90,nil,nil,true)
|
||||
if P.id==1 and players[2]and players[2].ai then SFX("fail")end
|
||||
ins(P.task,Event.task.lose)
|
||||
if #players.alive==1 then
|
||||
@@ -449,7 +483,7 @@ Event={
|
||||
SFX("reach")
|
||||
end
|
||||
end,
|
||||
death_reach=function()
|
||||
marathon_reach_lunatic=function()
|
||||
if P.gameEnv.target==250 then
|
||||
Event.gameover.win()
|
||||
else
|
||||
@@ -467,7 +501,7 @@ Event={
|
||||
Event.gameover.lose()
|
||||
else
|
||||
P.gameEnv.target=P.gameEnv.target+2
|
||||
if #P.field>10 and P.gameEnv.target%10~=0 then
|
||||
if P.cstat.row%10~=0 then
|
||||
ins(P.clearing,1)
|
||||
end
|
||||
end
|
||||
@@ -477,31 +511,45 @@ Event={
|
||||
Event.gameover.lose()
|
||||
end
|
||||
end,
|
||||
sudden_reach_HARD=function()
|
||||
sudden_reach_hard=function()
|
||||
if #P.clearing>0 and P.lastClear<10 and P.lastClear~=74 then
|
||||
Event.gameover.lose()
|
||||
end
|
||||
end,
|
||||
newPC=function()
|
||||
local P=players[1]
|
||||
if #P.field==#P.clearing then
|
||||
P.counter=P.cstat.piece==0 and 19 or 0
|
||||
ins(P.task,Event.task.PC)
|
||||
if gameLevel==2 then
|
||||
local s=P.cstat.pc*.5
|
||||
if int(s)==s and s>0 then
|
||||
P.gameEnv.drop=pc_drop[s]or 10
|
||||
P.gameEnv.lock=pc_lock[s]or 20
|
||||
P.gameEnv.fall=pc_fall[s]or 5
|
||||
if s==10 then
|
||||
showText(P,"Max speed","appear",80,-120)
|
||||
else
|
||||
showText(P,"Speed up","appear",30,-130)
|
||||
if P.cstat.piece%4==0 then
|
||||
if #P.field==#P.clearing then
|
||||
P.counter=P.cstat.piece==0 and 19 or 0
|
||||
ins(P.task,Event.task.PC)
|
||||
if curMode.lv==2 then
|
||||
local s=P.cstat.pc*.5
|
||||
if int(s)==s and s>0 then
|
||||
P.gameEnv.drop=pc_drop[s]or 10
|
||||
P.gameEnv.lock=pc_lock[s]or 20
|
||||
P.gameEnv.fall=pc_fall[s]or 5
|
||||
if s==10 then
|
||||
showText(P,"Max speed","appear",80,-120)
|
||||
else
|
||||
showText(P,"Speed up","appear",30,-130)
|
||||
end
|
||||
end
|
||||
end
|
||||
local r=rnd(#PClist)
|
||||
local f=P.cstat.pc%2==0
|
||||
for i=1,4 do
|
||||
local b=PClist[r][i]
|
||||
if f then
|
||||
if b<3 then b=3-b
|
||||
elseif b<5 then b=7-b
|
||||
end
|
||||
end
|
||||
ins(P.nxt,b)
|
||||
ins(P.nb,blocks[b][0])
|
||||
end
|
||||
else
|
||||
Event.gameover.lose()
|
||||
end
|
||||
else
|
||||
Event.gameover.lose()
|
||||
end
|
||||
end,
|
||||
task={
|
||||
@@ -510,8 +558,8 @@ Event={
|
||||
return true
|
||||
end,
|
||||
win=function()
|
||||
P.counter=P.counter+1
|
||||
if P.counter>80 then
|
||||
P.endCounter=P.endCounter+1
|
||||
if P.endCounter>80 then
|
||||
if P.gameEnv.visible==1 then
|
||||
for i=1,#P.field do
|
||||
for j=1,10 do
|
||||
@@ -520,21 +568,21 @@ Event={
|
||||
end
|
||||
end
|
||||
end
|
||||
if P.counter==100 then
|
||||
if P.endCounter==100 then
|
||||
for i=1,#P.field do
|
||||
removeRow(P.field)
|
||||
removeRow(P.visTime)
|
||||
end
|
||||
return true
|
||||
end
|
||||
elseif P.counter==100 then
|
||||
elseif P.endCounter==100 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end,
|
||||
lose=function()
|
||||
P.counter=P.counter+1
|
||||
if P.counter>80 then
|
||||
P.endCounter=P.endCounter+1
|
||||
if P.endCounter>80 then
|
||||
if P.gameEnv.visible==1 then
|
||||
for i=1,#P.field do
|
||||
for j=1,10 do
|
||||
@@ -543,26 +591,98 @@ Event={
|
||||
end
|
||||
end
|
||||
end
|
||||
if P.counter==100 then
|
||||
if P.endCounter==100 then
|
||||
for i=1,#P.field do
|
||||
removeRow(P.field)
|
||||
removeRow(P.visTime)
|
||||
end
|
||||
return true
|
||||
end
|
||||
elseif P.counter==100 then
|
||||
elseif P.endCounter==100 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end,
|
||||
garbagepush=function()
|
||||
|
||||
dig_normal=function()
|
||||
local P=players[1]
|
||||
P.counter=P.counter+1
|
||||
if #P.clearing==0 and P.counter>=max(90,180-2*P.cstat.event)then
|
||||
ins(P.field,1,getNewRow(13))
|
||||
ins(P.visTime,1,getNewRow(1e99))
|
||||
P.field[1][rnd(10)]=0
|
||||
P.fieldBeneath=P.fieldBeneath+30
|
||||
P.cy,P.y_img=P.cy+1,P.y_img+1
|
||||
P.counter=0
|
||||
P.cstat.event=P.cstat.event+1
|
||||
end
|
||||
end,
|
||||
dig_lunatic=function()
|
||||
local P=players[1]
|
||||
P.counter=P.counter+1
|
||||
if #P.clearing==0 and P.counter>=max(40,60-.5*P.cstat.event)then
|
||||
ins(P.field,1,getNewRow(13))
|
||||
ins(P.visTime,1,getNewRow(1e99))
|
||||
P.field[1][rnd(10)]=0
|
||||
P.fieldBeneath=P.fieldBeneath+30
|
||||
P.cy,P.y_img=P.cy+1,P.y_img+1
|
||||
P.counter=0
|
||||
P.cstat.event=P.cstat.event+1
|
||||
end
|
||||
end,
|
||||
survivor_easy=function()
|
||||
local P=players[1]
|
||||
P.counter=P.counter+1
|
||||
if P.counter==max(60,180-2*P.cstat.event)then
|
||||
ins(P.atkBuffer,{rnd(10),amount=1,countdown=0,cd0=0,time=0,sent=false,lv=1})
|
||||
P.counter=0
|
||||
P.cstat.event=P.cstat.event+1
|
||||
end
|
||||
end,
|
||||
survivor_normal=function()
|
||||
local P=players[1]
|
||||
P.counter=P.counter+1
|
||||
if P.counter==max(60,180-2*P.cstat.event)then
|
||||
local d=P.cstat.event
|
||||
if rnd()<.33 then
|
||||
ins(P.atkBuffer,{rnd(10),amount=1,countdown=20,cd0=20,time=0,sent=false,lv=1})
|
||||
elseif rnd()<.33 then
|
||||
ins(P.atkBuffer,{rnd(10),amount=2,countdown=40,cd0=40,time=0,sent=false,lv=1})
|
||||
elseif rnd()<.5 then
|
||||
ins(P.atkBuffer,{rnd(10),amount=3,countdown=60,cd0=60,time=0,sent=false,lv=2})
|
||||
else
|
||||
ins(P.atkBuffer,{rnd(10),amount=4,countdown=90,cd0=90,time=0,sent=false,lv=3})
|
||||
end
|
||||
P.counter=0
|
||||
P.cstat.event=P.cstat.event+1
|
||||
end
|
||||
end,
|
||||
survivor_hard=function()
|
||||
local P=players[1]
|
||||
P.counter=P.counter+1
|
||||
if P.counter==max(80,150-2*P.cstat.event)then
|
||||
if rnd()<.33 then
|
||||
ins(P.atkBuffer,{rnd(10),amount=1,countdown=0,cd0=0,time=0,sent=false,lv=1})
|
||||
else
|
||||
ins(P.atkBuffer,{rnd(10),amount=3,countdown=0,cd0=0,time=0,sent=false,lv=1})
|
||||
end
|
||||
P.counter=0
|
||||
P.cstat.event=P.cstat.event+1
|
||||
end
|
||||
end,
|
||||
survivor_lunatic=function()
|
||||
local P=players[1]
|
||||
P.counter=P.counter+1
|
||||
if P.counter==max(90,150-P.cstat.event)then
|
||||
local t=max(30,90-2*P.cstat.event)
|
||||
ins(P.atkBuffer,{rnd(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3})
|
||||
P.counter=0
|
||||
P.cstat.event=P.cstat.event+1
|
||||
end
|
||||
end,
|
||||
PC=function()
|
||||
local P=players[1]
|
||||
P.counter=P.counter+1
|
||||
if P.counter==21 then
|
||||
P.gameEnv.target=P.gameEnv.target+4
|
||||
local t=P.cstat.pc%2
|
||||
for i=1,4 do
|
||||
local r=getNewRow()
|
||||
|
||||
49
paint.lua
49
paint.lua
@@ -145,14 +145,11 @@ function drawButton()
|
||||
end
|
||||
end
|
||||
function drawDial(x,y,speed)
|
||||
gc.push("transform")
|
||||
gc.translate(x,y)
|
||||
gc.setColor(1,1,1)
|
||||
mStr(int(speed),0,-20)
|
||||
gc.draw(dialCircle,0,0,nil,nil,nil,32,32)
|
||||
gc.setColor(1,1,1,.6)
|
||||
gc.draw(dialNeedle,0,0,2.094+(speed<=175 and .02094*speed or 4.712-52.36/(speed-125)),nil,nil,5,4)
|
||||
gc.pop()
|
||||
gc.setColor(1,1,1)
|
||||
mStr(int(speed),x,y-18)
|
||||
gc.draw(dialCircle,x,y,nil,nil,nil,32,32)
|
||||
gc.setColor(1,1,1,.6)
|
||||
gc.draw(dialNeedle,x,y,2.094+(speed<=175 and .02094*speed or 4.712-52.36/(speed-125)),nil,nil,5,4)
|
||||
end
|
||||
function drawPixel(y,x,id,alpha)
|
||||
gc.setColor(1,1,1,alpha)
|
||||
@@ -264,7 +261,7 @@ end
|
||||
function Pnt.main()
|
||||
gc.setColor(1,1,1)
|
||||
setFont(30)
|
||||
gc.print("Alpha V0.7.6",370,140)
|
||||
gc.print("Alpha V0.7.7",370,140)
|
||||
gc.print(system,530,110)
|
||||
gc.draw(titleImage,30,30)
|
||||
end
|
||||
@@ -312,12 +309,12 @@ function Pnt.play()
|
||||
if P.small then
|
||||
gc.push("transform")
|
||||
gc.translate(P.x,P.y)gc.scale(P.size)--Scale
|
||||
gc.setColor(0,0,0,.5)gc.rectangle("fill",0,0,300,600)--Black Background
|
||||
gc.setColor(0,0,0,.4)gc.rectangle("fill",0,0,300,600)--Black Background
|
||||
gc.setLineWidth(13)
|
||||
gc.stencil(stencil_field_small,"replace",1)
|
||||
gc.translate(0,P.fieldBeneath)
|
||||
gc.setStencilTest("equal",1)
|
||||
gc.setColor(1,1,1,P.result and max(20-P.counter,0)*.05 or 1)
|
||||
gc.setColor(1,1,1,P.result and max(20-P.endCounter,0)*.05 or 1)
|
||||
for j=int(P.fieldBeneath/30+1),#P.field do
|
||||
if P.falling<=0 or without(P.clearing,j)then
|
||||
for i=1,10 do
|
||||
@@ -337,20 +334,20 @@ function Pnt.play()
|
||||
end
|
||||
end
|
||||
if P.result then
|
||||
gc.setColor(1,1,1,min(P.counter,60)*.01)
|
||||
gc.setColor(1,1,1,min(P.endCounter,60)*.01)
|
||||
setFont(100)
|
||||
mStr(P.result,150,235)
|
||||
if P.killMark then
|
||||
gc.setLineWidth(20)
|
||||
gc.setColor(1,0,0,min(P.counter,25)*.04)
|
||||
gc.circle("line",150,300,420-10*min(P.counter,30))
|
||||
gc.setColor(1,0,0,min(P.endCounter,25)*.04)
|
||||
gc.circle("line",150,300,420-10*min(P.endCounter,30))
|
||||
end
|
||||
end
|
||||
gc.pop()
|
||||
else
|
||||
gc.push("transform")
|
||||
gc.translate(P.x,P.y)gc.scale(P.size)--Scale
|
||||
gc.setColor(0,0,0,.7)gc.rectangle("fill",0,0,600,690)--Black Background
|
||||
gc.setColor(0,0,0,.6)gc.rectangle("fill",0,0,600,690)--Black Background
|
||||
gc.setLineWidth(7)
|
||||
gc.setColor(frameColor[P.strength])gc.rectangle("line",0,0,600,690)--Big frame
|
||||
gc.stencil(stencil_field,"replace", 1)
|
||||
@@ -398,7 +395,8 @@ function Pnt.play()
|
||||
gc.draw(PTC.dust[p])--Draw game field
|
||||
gc.setStencilTest()--In-playField mask
|
||||
gc.translate(0,-P.fieldBeneath)
|
||||
gc.setColor(1,1,1)gc.rectangle("line",-3,-13,306,616)--Draw boarder
|
||||
gc.setLineWidth(5)
|
||||
gc.setColor(1,1,1)gc.rectangle("line",-2,-12,304,614)--Draw boarder
|
||||
|
||||
local h=0
|
||||
for i=1,#P.atkBuffer do
|
||||
@@ -412,23 +410,22 @@ function Pnt.play()
|
||||
end
|
||||
if a.countdown>0 then
|
||||
gc.setColor(attackColor[a.lv][1])
|
||||
gc.rectangle("fill",308,600-h,10,-bar+5)
|
||||
gc.rectangle("fill",307,600-h,12,-bar+5)
|
||||
gc.setColor(attackColor[a.lv][2])
|
||||
gc.rectangle("fill",308,600-h+(-bar+5),10,-(-bar+5)*(1-a.countdown/a.cd0))
|
||||
gc.rectangle("fill",307,600-h+(-bar+5),12,-(-bar+5)*(1-a.countdown/a.cd0))
|
||||
--Timing
|
||||
else
|
||||
attackColor.animate[a.lv]((sin((Timer()-i)*20)+1)*.5)
|
||||
gc.rectangle("fill",308,600-h,10,-bar+5)
|
||||
gc.rectangle("fill",307,600-h,12,-bar+5)
|
||||
--Warning
|
||||
end
|
||||
else
|
||||
gc.setColor(attackColor[a.lv][1])
|
||||
bar=bar*(20-a.time)*.05
|
||||
gc.rectangle("fill",308,600-h,10,-bar+3)
|
||||
gc.rectangle("fill",307,600-h,12,-bar+3)
|
||||
--Disappear
|
||||
end
|
||||
h=h+bar
|
||||
if h>=600 then break end
|
||||
end--Buffer line
|
||||
|
||||
gc.setColor(P.b2b<40 and color.white or P.b2b<=480 and color.lightRed or color.lightBlue)
|
||||
@@ -462,6 +459,10 @@ function Pnt.play()
|
||||
end
|
||||
end
|
||||
end--Next
|
||||
setFont(30)
|
||||
gc.setColor(.8,.8,.8)
|
||||
gc.print(curMode.modeName,-135,-65)
|
||||
gc.printf(curMode.levelName,240,-65,200,"right")
|
||||
if frame<180 then
|
||||
local count=179-frame
|
||||
gc.push("transform")
|
||||
@@ -479,7 +480,7 @@ function Pnt.play()
|
||||
gc.setColor(1,1,1)
|
||||
setFont(35)
|
||||
mStr(format("%.2f",P.time),-75,520)--Draw time
|
||||
if mesDisp[gameMode]then mesDisp[gameMode]()end--Draw other message
|
||||
if mesDisp[curMode.id]then mesDisp[curMode.id]()end--Draw other message
|
||||
|
||||
gc.setColor(1,1,1)
|
||||
setFont(15)
|
||||
@@ -528,7 +529,7 @@ function Pnt.play()
|
||||
end
|
||||
if P.atkMode~=4 then
|
||||
if P.atking then
|
||||
gc.setColor(0,.5,1,.2+(sin(Timer()*7)+1)*.1)
|
||||
gc.setColor(0,.5,1,.2+(sin(Timer()*10)+1)*.1)
|
||||
gc.line(P.centerX,P.centerY,P.atking.centerX,P.atking.centerY)
|
||||
end
|
||||
end
|
||||
@@ -593,7 +594,7 @@ function Pnt.help()
|
||||
setFont(32)
|
||||
gc.setColor(1,1,1)
|
||||
for i=1,11 do
|
||||
mStr(Text.help[i],640,15+43*i)
|
||||
gc.printf(Text.help[i],140,15+43*i,1000,"center")
|
||||
end
|
||||
gc.draw(titleImage,180,600,.2,.7+.05*sin(Timer()*2),nil,140,100)
|
||||
end
|
||||
|
||||
@@ -196,7 +196,7 @@ function Tmr.play(dt)
|
||||
if P.falling<=0 then
|
||||
if #P.field>P.clearing[1]then
|
||||
SFX("fall")
|
||||
VIB(1)
|
||||
if P.id==1 then VIB(1)end
|
||||
end
|
||||
for i=1,#P.clearing do
|
||||
removeRow(P.field,P.clearing[i])
|
||||
@@ -205,7 +205,7 @@ function Tmr.play(dt)
|
||||
P.clearing={}
|
||||
end
|
||||
end--Rows cleared drop
|
||||
if P.counter<40 then
|
||||
if P.endCounter<40 then
|
||||
for j=1,#P.field do for i=1,10 do
|
||||
if P.visTime[j][i]<20 then P.visTime[j][i]=P.visTime[j][i]+.5 end
|
||||
end end--Make field visible
|
||||
@@ -246,7 +246,6 @@ function Tmr.play(dt)
|
||||
end
|
||||
end
|
||||
if modeEnv.royaleMode and frame%60==0 then
|
||||
freshRoyaleTarget()
|
||||
freshMostDangerous()
|
||||
end
|
||||
setmetatable(_G,nil)
|
||||
end
|
||||
@@ -16,7 +16,7 @@ function without(t,v)
|
||||
return true
|
||||
end
|
||||
function mStr(s,x,y)
|
||||
gc.printf(s,x-500,y,1000,"center")
|
||||
gc.printf(s,x-250,y,500,"center")
|
||||
end
|
||||
|
||||
function getNewRow(val)
|
||||
@@ -58,8 +58,8 @@ function timeSort(a,b)
|
||||
return a.time>b.time
|
||||
end
|
||||
function stencil_miniTitle()
|
||||
for i=1,#miniTitle_pixel do
|
||||
gc.rectangle("fill",unpack(miniTitle_pixel[i]))
|
||||
for i=1,#miniTitle_rect do
|
||||
gc.rectangle("fill",unpack(miniTitle_rect[i]))
|
||||
end
|
||||
end
|
||||
function stencil_field()
|
||||
@@ -72,7 +72,7 @@ end
|
||||
|
||||
function VIB(t)
|
||||
if setting.vib>0 then
|
||||
love.system.vibrate(setting.vib+t)
|
||||
love.system.vibrate(vibrateLevel[setting.vib+t])
|
||||
end
|
||||
end
|
||||
function sysSFX(s,v)
|
||||
@@ -83,6 +83,7 @@ function sysSFX(s,v)
|
||||
if not sfx[s][n]then
|
||||
sfx[s][n]=sfx[s][n-1]:clone()
|
||||
sfx[s][n]:seek(0)
|
||||
break
|
||||
end
|
||||
end
|
||||
sfx[s][n]:setVolume(v or 1)
|
||||
|
||||
Reference in New Issue
Block a user