Compare commits

...

1 Commits

Author SHA1 Message Date
MrZ_26
c35152cf6e Alpha V0.7.7 2020-02-04 19:31:17 +08:00
13 changed files with 388 additions and 239 deletions

BIN
SFX/blip_1.ogg Normal file

Binary file not shown.

BIN
SFX/blip_2.ogg Normal file

Binary file not shown.

BIN
SFX/emit.ogg Normal file

Binary file not shown.

View File

@@ -88,7 +88,7 @@ function keyDown.mode(key)
levelSel=levelSel+1 levelSel=levelSel+1
end end
elseif key=="return"then elseif key=="return"then
loadGame(modeID[modeSel],levelSel) loadGame(modeSel,levelSel)
elseif key=="c"then elseif key=="c"then
gotoScene("custom") gotoScene("custom")
elseif key=="escape"then elseif key=="escape"then
@@ -107,7 +107,7 @@ function keyDown.custom(key)
elseif key=="up"then elseif key=="up"then
optSel=(optSel-2)%#customID+1 optSel=(optSel-2)%#customID+1
elseif key=="return"then elseif key=="return"then
loadGame("custom",1) loadGame(0,1)
elseif key=="escape"then elseif key=="escape"then
back() back()
end end
@@ -185,7 +185,7 @@ function gamepadDown.mode(key)
elseif key=="dpup"then elseif key=="dpup"then
if modeSel>1 then modeSel=modeSel-1 end if modeSel>1 then modeSel=modeSel-1 end
elseif key=="start"then elseif key=="start"then
loadGame(modeID[modeSel],levelSel) loadGame(modeSel,levelSel)
elseif key=="back"then elseif key=="back"then
back() back()
end end

View File

@@ -9,7 +9,7 @@ function love.conf(t)
t.audio.mixwithsystem=true--Switch on to keep sysBGM t.audio.mixwithsystem=true--Switch on to keep sysBGM
local W=t.window local W=t.window
W.title="Techmino V0.7.6" W.title="Techmino V0.7.7"
W.icon="/image/icon.png" W.icon="/image/icon.png"
W.width,W.height=1280,720 W.width,W.height=1280,720
W.borderless=X W.borderless=X

View File

@@ -1,15 +1,17 @@
function loadGame(mode,level) function loadGame(mode,level)
--rec={} --rec={}
gameMode,gameLevel=mode,level print(mode)
curMode={id=modeID[mode],lv=level,modeName=modeName[mode],levelName=modeLevel[modeID[mode]][level]}
gotoScene("play") gotoScene("play")
end end
function resetGameData() function resetGameData()
frame=0 frame=0
pushSpeed,garbageSpeed=3,1 garbageSpeed=1
pushSpeed=3
players={alive={}} players={alive={}}
modeEnv=defaultModeEnv[gameMode][gameLevel]or defaultModeEnv[gameMode][1] modeEnv=defaultModeEnv[curMode.id][curMode.lv]or defaultModeEnv[curMode.id][1]
loadmode[gameMode]() loadmode[curMode.id]()
FX.beam={} FX.beam={}
for k,v in pairs(PTC.dust)do for k,v in pairs(PTC.dust)do
@@ -27,8 +29,8 @@ function resetGameData()
end end
mostBadge,mostDangerous,secBadge,secDangerous=nil mostBadge,mostDangerous,secBadge,secDangerous=nil
gameStage=1 gameStage=1
pushSpeed=2
garbageSpeed=.3 garbageSpeed=.3
pushSpeed=2
end end
for i=1,#virtualkey do for i=1,#virtualkey do
virtualkey[i].press=false virtualkey[i].press=false
@@ -77,12 +79,12 @@ function createPlayer(id,x,y,size,AIspeed,data)
P.control=false P.control=false
P.timing=false P.timing=false
P.time=0 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.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.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.ko,P.badge,P.strength=0,0,0
P.atkMode,P.swappingAtkMode=1,20 P.atkMode,P.swappingAtkMode=1,20
@@ -151,11 +153,12 @@ function createPlayer(id,x,y,size,AIspeed,data)
P.b2b=0 P.b2b=0
P.b2b1=0 P.b2b1=0
P.endCounter=0
P.counter=0 P.counter=0
P.result=nil--string,"win"/"lose" P.result=nil--string,"win"/"lose"
P.task={} P.task={}
P.bonus={} P.bonus={}
end end
function showText(P,text,type,font,dy,spd,inf) function showText(P,text,type,font,dy,spd,inf)
if not P.small then 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}) 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 P.atking=nil
end end
end end
function freshRoyaleTarget() function freshMostBadge()
mostBadge,secBadge,mostDangerous,secDangerous=nil mostBadge,secBadge=nil
local h,b=0,0 local m=0
for i=1,#players.alive do 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 mostBadge,secBadge=players.alive[i],mostBadge
h=players[i].badge m=players.alive[i].badge
end 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 mostDangerous,secDangerous=players.alive[i],mostDangerous
b=#players.alive[i].field m=#players.alive[i].field
end end
end end
end end
function royaleLevelup() function royaleLevelup()
gameStage=gameStage+1 gameStage=gameStage+1
local s local spd
if(gameStage==3 or gameStage>4)and players[1].alive then if(gameStage==3 or gameStage>4)and players[1].alive then
showText(players[1],#players.alive.." Players Remain","beat",50,-100,.3) showText(players[1],#players.alive.." Players Remain","beat",50,-100,.3)
end end
if gameStage==2 then if gameStage==2 then
s=30 spd=30
elseif gameStage==3 then elseif gameStage==3 then
s=15 spd=15
garbageSpeed=.6 garbageSpeed=.6
BGM("cruelty") BGM("cruelty")
elseif gameStage==4 then elseif gameStage==4 then
s=10 spd=10
pushSpeed=3 pushSpeed=3
elseif gameStage==5 then elseif gameStage==5 then
s=5 spd=5
garbageSpeed=1 garbageSpeed=1
elseif gameStage==6 then elseif gameStage==6 then
s=3 spd=3
BGM("final") BGM("final")
end end
for i=1,#players.alive do for i=1,#players.alive do
local P=players.alive[i] local P=players.alive[i]
P.gameEnv.drop=s P.gameEnv.drop=spd
end end
if gameLevel==5 and players[1].alive then if curMode.lv==5 and players[1].alive then
local P=players[1] local P=players[1]
P.gameEnv.drop=int(P.gameEnv.drop*.3) P.gameEnv.drop=int(P.gameEnv.drop*.3)
if P.gameEnv.drop==0 then if P.gameEnv.drop==0 then
@@ -393,7 +402,7 @@ function pressKey(i,p)
end end
function releaseKey(i,p) function releaseKey(i,p)
p.keyPressing[i]=false p.keyPressing[i]=false
P.isKeyDown[i]=false p.isKeyDown[i]=false
-- if playmode=="recording"then ins(rec,{-i,frame})end -- if playmode=="recording"then ins(rec,{-i,frame})end
end end
function spin(d,ifpre) function spin(d,ifpre)
@@ -581,7 +590,7 @@ function drop()
if cc>0 then if cc>0 then
SFX(clear_n[cc]) SFX(clear_n[cc])
SFX(ren_n[min(P.combo,11)]) 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 end
P.b2b=max(min(P.b2b,600),0) P.b2b=max(min(P.b2b,600),0)
@@ -617,13 +626,10 @@ function drop()
csend=csend-1 csend=csend-1
end end
P.atkBuffer[1].amount=P.atkBuffer[1].amount-1 P.atkBuffer[1].amount=P.atkBuffer[1].amount-1
P.atkBuffer.sum=P.atkBuffer.sum-1
if P.atkBuffer[1].amount==0 then if P.atkBuffer[1].amount==0 then
rem(P.atkBuffer,1) rem(P.atkBuffer,1)
end 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 end
if csend>0 then if csend>0 then
if modeEnv.royaleMode then if modeEnv.royaleMode then
@@ -642,6 +648,7 @@ function drop()
elseif #players.alive>1 then elseif #players.alive>1 then
garbageSend(P,randomTarget(P),csend,sendTime) garbageSend(P,randomTarget(P),csend,sendTime)
end end
if P.id==1 and csend>3 then sysSFX("emit",min(csend,8)*.125)end
end end
elseif cc==0 then elseif cc==0 then
if P.b2b>480 then if P.b2b>480 then
@@ -676,11 +683,13 @@ function lock()
end end
function garbageSend(S,R,send,time) function garbageSend(S,R,send,time)
local pos=rnd(10) local pos=rnd(10)
local level=send<4 and 1 or send<7 and 2 or 3 createBeam(S,R,send<4 and 1 or send<7 and 2 or 3)
createBeam(S,R,level)
R.lastRecv=S R.lastRecv=S
if #R.atkBuffer<15 then if R.atkBuffer.sum<20 then
ins(R.atkBuffer,{pos,amount=send,countdown=time,cd0=time,time=0,sent=false,lv=level}) 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
end end
function garbageRelease() function garbageRelease()
@@ -695,6 +704,7 @@ function garbageRelease()
P.field[1][atk[k]]=0 P.field[1][atk[k]]=0
end end
end end
P.atkBuffer.sum=P.atkBuffer.sum-atk.amount
atk.sent=true atk.sent=true
atk.time=0 atk.time=0
P.fieldBeneath=P.fieldBeneath+atk.amount*30 P.fieldBeneath=P.fieldBeneath+atk.amount*30
@@ -755,7 +765,7 @@ act={
P.cy=P.y_img P.cy=P.y_img
P.spinLast=false P.spinLast=false
SFX("drop") SFX("drop")
VIB(0) if P.id==1 then VIB(0)end
end end
drop() drop()
end 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
View File

@@ -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,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,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,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,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,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,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,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,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},
{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}, {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},
{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}, {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,4,5,1},{2,1,4,5},{2,5,4,3},{2,5,6,7},{7,5,4,2}, {2,5,4,3},{2,5,6,7},{7,5,4,2},
} }
color={ color={
red={1,0,0}, red={1,0,0},
@@ -68,7 +68,7 @@ attackColor={
gc.setColor(1,t,0) gc.setColor(1,t,0)
end, end,
function(t) function(t)
gc.setColor(1,.3,.2+t*.8) gc.setColor(1,.4,.3+t*.7)
end, end,
function(t) function(t)
gc.setColor(.2+t*.8,.2+t*.8,1) gc.setColor(.2+t*.8,.2+t*.8,1)
@@ -104,7 +104,7 @@ for j=1,7 do
spinName[0][j]=blockName[j].." spin" spinName[0][j]=blockName[j].." spin"
end end
miniTitle_pixel={ miniTitle_rect={
{2,0,5,1},{4,1,1,6}, {2,0,5,1},{4,1,1,6},
{9,0,4,1},{9,3,4,1},{9,6,4,1},{8,0,1,7}, {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}, {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", "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", "clear_1","clear_2","clear_3","clear_4",
"spin_0","spin_1","spin_2","spin_3", "spin_0","spin_1","spin_2","spin_3",
"emit","blip_1","blip_2",
"perfectclear", "perfectclear",
} }
bgm={ bgm={
@@ -146,7 +147,7 @@ prevMenu={
custom="mode", custom="mode",
ready="mode", ready="mode",
play=function() play=function()
gotoScene(gameMode~="custom"and"mode"or"custom") gotoScene(curMode.id~="custom"and"mode"or"custom")
end, end,
help="main", help="main",
stat="main", stat="main",
@@ -274,6 +275,12 @@ defaultModeEnv={
}, },
}, },
marathon={ marathon={
{
drop=1e99,
lock=1e99,
target=200,
reach=Event.marathon_reach,
},
{ {
drop=60, drop=60,
fall=20, fall=20,
@@ -286,6 +293,16 @@ defaultModeEnv={
target=200, target=200,
reach=Event.marathon_reach, 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={ zen={
{ {
@@ -305,18 +322,6 @@ defaultModeEnv={
solo={ 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={ tsd={
{ {
oncehold=false, oncehold=false,
@@ -334,9 +339,9 @@ defaultModeEnv={
}, },
blind={ blind={
{ {
drop=1e99, drop=30,
lock=1e99, lock=60,
visible=0, visible=2,
}, },
{ {
drop=15, drop=15,
@@ -350,6 +355,48 @@ defaultModeEnv={
visible=0, visible=0,
freshLimit=15, 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={ sudden={
{ {
@@ -369,13 +416,13 @@ defaultModeEnv={
drop=15, drop=15,
lock=60, lock=60,
target=0, target=0,
reach=Event.sudden_reach_HARD, reach=Event.sudden_reach_hard,
}, },
{ {
drop=5, drop=5,
lock=20, lock=20,
target=0, target=0,
reach=Event.sudden_reach_HARD, reach=Event.sudden_reach_hard,
}, },
}, },
pctrain={ pctrain={
@@ -434,6 +481,7 @@ defaultModeEnv={
royaleMode=true, royaleMode=true,
royalePowerup={2,5,10,20}, royalePowerup={2,5,10,20},
royaleRemain={30,20,15,10,5}, royaleRemain={30,20,15,10,5},
pushSpeed=2,
}, },
}, },
techmino99={ techmino99={
@@ -442,6 +490,7 @@ defaultModeEnv={
royaleMode=true, royaleMode=true,
royalePowerup={2,6,14,30}, royalePowerup={2,6,14,30},
royaleRemain={75,50,35,20,10}, royaleRemain={75,50,35,20,10},
pushSpeed=2,
}, },
}, },
drought={ drought={
@@ -460,24 +509,7 @@ defaultModeEnv={
reach=Event.gameover.win, reach=Event.gameover.win,
}, },
}, },
gmroll={ hotseat={
{
drop=0,
lock=15,
wait=10,
fall=15,
_20G=true,
visible=0,
arr=1,
},
},
p2={
{},
},
p3={
{},
},
p4={
{}, {},
}, },
custom={ custom={
@@ -488,23 +520,22 @@ defaultModeEnv={
} }
modeLevel={ modeLevel={
sprint={"10L","20L","40L","100L","400L","1000L"}, sprint={"10L","20L","40L","100L","400L","1000L"},
marathon={"NORMAL","LUNATIC"}, marathon={"EASY","NORMAL","EXTRA","DEATH"},
zen={"NORMAL"}, zen={"NORMAL"},
infinite={"NORMAL"}, infinite={"NORMAL"},
solo={"EASY","NORMAL","HARD","LUNATIC"}, solo={"EASY","NORMAL","HARD","LUNATIC"},
death={"LUNATIC"},
tsd={"NORMAL","HARD"}, 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"}, sudden={"EASY","NORMAL","HARD","LUNATIC"},
pctrain={"HARD","LUNATIC"}, pctrain={"HARD","LUNATIC"},
pcchallenge={"NORMAL","HARD","LUNATIC"}, pcchallenge={"NORMAL","HARD","LUNATIC"},
techmino41={"EASY","NORMAL","HARD","LUNATIC","HELL"}, techmino41={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE"},
techmino99={"EASY","NORMAL","HARD","LUNATIC","HELL"}, techmino99={"EASY","NORMAL","HARD","LUNATIC","ULTIMATE"},
drought={"NORMAL","MESS"}, drought={"NORMAL","MESS"},
gmroll={"GM"}, hotseat={"2P","3P","4P",},
p2={"NORMAL"}, custom={""},
p3={"NORMAL"},
p4={"NORMAL"},
} }
modeLevelColor={ modeLevelColor={
EASY=color.cyan, EASY=color.cyan,
@@ -515,7 +546,8 @@ modeLevelColor={
MESS=color.lightGrey, MESS=color.lightGrey,
GM=color.blue, GM=color.blue,
HELL=color.grey, ULTIMATE=color.lightYellow,
DEATH=color.lightRed,
["10L"]=color.cyan, ["10L"]=color.cyan,
["20L"]=color.lightBlue, ["20L"]=color.lightBlue,
["40L"]=color.green, ["40L"]=color.green,
@@ -524,32 +556,32 @@ modeLevelColor={
["1000L"]=color.darkRed, ["1000L"]=color.darkRed,
} }
modeID={ modeID={
"sprint","marathon","zen","infinite","solo","death","tsd","blind","sudden", [0]="custom",
"pctrain","pcchallenge","techmino41","techmino99","drought","gmroll","p2","p3","p4" "sprint","marathon","zen","infinite","solo","tsd","blind","dig","survivor","sudden",
"pctrain","pcchallenge","techmino41","techmino99","drought","hotseat",
} }
modeName={ modeName={
"Sprint","Marathon","Zen","Infinite","1v1","Death","TSD-only","Blind","Sudden", [0]="Custom",
"PC Train","PC Challenge","Techmino41","Techmino99","Drought","GM roll","2P","3P","4P" "Sprint","Marathon","Zen","Infinite","1v1","TSD-only","Blind","Dig","Survivor","Sudden",
"PC Train","PC Challenge","Techmino41","Techmino99","Drought","Hotseat",
} }
modeInfo={ modeInfo={
sprint="Speed run.", sprint="Speed run.",
marathon="Clear 200 Lines", marathon="Survive and reach target",
zen="Clear 200 Lines without gravity", zen="Clear 200 Lines without gravity",
infinite="Infinite game,infinite happiness", infinite="Infinite game,infinite happiness",
solo="Beat AI", solo="Beat AI",
death="Survive under terrible speed", tsd="Make more T-spin-doubles",
tsd="try to make 20 T-spin-double",
blind="Invisible board", blind="Invisible board",
sudden="Try to survive", dig="Downstack!",
survivor="Hand them!",
sudden="Techniques practice",
pctrain="Let's learn some PCs", pctrain="Let's learn some PCs",
pcchallenge="Make PCs in 100 Lines", pcchallenge="Make PCs in 100 Lines",
techmino41="Melee fight with 40 AIs", techmino41="Melee fight with 40 AIs",
techmino99="Melee fight with 98 AIs", techmino99="Melee fight with 98 AIs",
drought="ERRSEQ flood attack", drought="ERRSEQ flood attack",
gmroll="Who want to be the grand master?", hotseat="",
p2="2 players game",
p3="3 players game",
p4="4 players game",
} }
freshMethod={ freshMethod={
@@ -579,21 +611,7 @@ freshMethod={
end, end,
function() function()
P.bn,P.cb=rem(P.nxt,1),rem(P.nb,1) P.bn,P.cb=rem(P.nxt,1),rem(P.nb,1)
if P.cstat.piece%4==0 then --generate in newPC
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
end, end,
function() function()
P.bn,P.cb=rem(P.nxt,1),rem(P.nb,1) 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=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=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=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={ 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=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=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=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=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=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}, {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=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=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=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}, {x=640,y=630,w=180,h=60,rgb=color.white,t="Back",code=back},
}, },
play={ play={
@@ -938,7 +956,7 @@ Text={
"Author:MrZ E-mail:1046101471@qq.com", "Author:MrZ E-mail:1046101471@qq.com",
"Programe:MrZ Art:MrZ Music:MrZ SFX:MrZ", "Programe:MrZ Art:MrZ Music:MrZ SFX:MrZ",
"Tool used:VScode,GFIE,Beepbox,Goldwave", "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.", "Any bugs/suggestions to my E-mail.",
}, },
} }

286
main.lua
View File

@@ -25,7 +25,6 @@ system=sys.getOS()
touching=nil--1st touching ID touching=nil--1st touching ID
scene="" scene=""
gameMode=""
bgmPlaying=nil bgmPlaying=nil
curBG="none" curBG="none"
BGblock={ct=150,next=7} BGblock={ct=150,next=7}
@@ -98,7 +97,7 @@ loadmode={
end, end,
solo=function() solo=function()
createPlayer(1,20,15)--Player 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" curBG="game2"
BGM("race") BGM("race")
end, end,
@@ -110,13 +109,45 @@ loadmode={
tsd=function() tsd=function()
createPlayer(1,340,15) createPlayer(1,340,15)
curBG="matrix" curBG="matrix"
BGM("infinite") BGM("reason")
end, end,
blind=function() blind=function()
createPlayer(1,340,15) createPlayer(1,340,15)
curBG="glow" curBG="glow"
BGM("push") BGM("push")
end, 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() sudden=function()
createPlayer(1,340,15) createPlayer(1,340,15)
curBG="matrix" curBG="matrix"
@@ -142,17 +173,17 @@ loadmode={
end, end,
techmino41=function() techmino41=function()
createPlayer(1,340,15)--Player 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 local n,min,max=2
if gameLevel==1 then if curMode.lv==1 then
min,max=5,30 min,max=5,30
elseif gameLevel==2 then elseif curMode.lv==2 then
min,max=3,25 min,max=3,25
elseif gameLevel==3 then elseif curMode.lv==3 then
min,max=2,20 min,max=2,20
elseif gameLevel==4 then elseif curMode.lv==4 then
min,max=2,10 min,max=2,10
elseif gameLevel==5 then elseif curMode.lv==5 then
min,max=1,6 min,max=1,6
end end
for i=1,4 do for i=1,4 do
@@ -173,17 +204,17 @@ loadmode={
end, end,
techmino99=function() techmino99=function()
createPlayer(1,340,15)--Player 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 local n,min,max=2
if gameLevel==1 then if curMode.lv==1 then
min,max=5,32 min,max=5,32
elseif gameLevel==2 then elseif curMode.lv==2 then
min,max=3,25 min,max=3,25
elseif gameLevel==3 then elseif curMode.lv==3 then
min,max=2,18 min,max=2,18
elseif gameLevel==4 then elseif curMode.lv==4 then
min,max=2,12 min,max=2,12
elseif gameLevel==5 then elseif curMode.lv==5 then
min,max=1,12 min,max=1,12
end end
for i=1,7 do for i=1,7 do
@@ -212,27 +243,20 @@ loadmode={
curBG="glow" curBG="glow"
BGM("push") BGM("push")
end, end,
p2=function() hotseat=function()
createPlayer(1,20,15) if curMode.lv==1 then
createPlayer(2,650,15) createPlayer(1,20,15)
createPlayer(2,650,15)
curBG="game2" elseif curMode.lv==2 then
BGM("way") createPlayer(1,20,100,.65)
end, createPlayer(2,435,100,.65)
p3=function() createPlayer(3,850,100,.65)
createPlayer(1,20,100,.65) elseif curMode.lv==3 then
createPlayer(2,435,100,.65) createPlayer(1,25,160,.5)
createPlayer(3,850,100,.65) createPlayer(2,335,160,.5)
createPlayer(3,645,160,.5)
curBG="game2" createPlayer(4,955,160,.5)
BGM("way") end
end,
p4=function()
createPlayer(1,25,150,.5)
createPlayer(2,335,150,.5)
createPlayer(3,645,150,.5)
createPlayer(4,955,150,.5)
curBG="game2" curBG="game2"
BGM("way") BGM("way")
end, end,
@@ -278,12 +302,6 @@ mesDisp={
mStr(P.gameEnv.target,-75,370) mStr(P.gameEnv.target,-75,370)
gc.rectangle("fill",-120,376,90,4) gc.rectangle("fill",-120,376,90,4)
end, 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() tsd=function()
setFont(35) setFont(35)
gc.print("TSD",-102,405) gc.print("TSD",-102,405)
@@ -298,6 +316,18 @@ mesDisp={
mStr(P.cstat.row,-75,220) mStr(P.cstat.row,-75,220)
mStr(P.cstat.techrash,-75,340) mStr(P.cstat.techrash,-75,340)
end, 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() pctrain=function()
setFont(25) setFont(25)
gc.print("Perfect Clear",-140,410) gc.print("Perfect Clear",-140,410)
@@ -346,12 +376,6 @@ mesDisp={
setFont(75) setFont(75)
mStr(max(100-P.cstat.row,0),-75,280) mStr(max(100-P.cstat.row,0),-75,280)
end, end,
gmroll=function()
setFont(25)
gc.print("Techrash",-123,420)
setFont(80)
mStr(P.cstat.techrash,-75,340)
end,
custom=function() custom=function()
if P.gameEnv.target<1e4 then if P.gameEnv.target<1e4 then
setFont(75) setFont(75)
@@ -367,8 +391,14 @@ Event={
P.timing=false P.timing=false
P.waiting=1e99 P.waiting=1e99
P.b2b=0 P.b2b=0
P.result="WIN" if modeEnv.royaleMode then
changeAtk(P) 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 for i=1,#P.atkBuffer do
P.atkBuffer[i].sent=true P.atkBuffer[i].sent=true
P.atkBuffer[i].time=0 P.atkBuffer[i].time=0
@@ -388,16 +418,19 @@ Event={
P.timing=false P.timing=false
P.waiting=1e99 P.waiting=1e99
P.b2b=0 P.b2b=0
P.result="K.O." while P.task[1]do
showText(P,"LOSE","appear",90,nil,nil,true) rem(P.task)
end
for i=1,#players.alive do for i=1,#players.alive do
if players.alive[i]==P then if players.alive[i]==P then
rem(players.alive,i) rem(players.alive,i)
break break
end end
end end
changeAtk(P)
if modeEnv.royaleMode then if modeEnv.royaleMode then
changeAtk(P)
P.result="K.O."
P.rank=#players.alive
P.strength=0 P.strength=0
if P.lastRecv and P.lastRecv.alive then if P.lastRecv and P.lastRecv.alive then
local A=P.lastRecv local A=P.lastRecv
@@ -412,7 +445,7 @@ Event={
end end
end end
end end
freshRoyaleTarget() freshMostBadge()
for i=1,#players.alive do for i=1,#players.alive do
if players.alive[i].atking==P then if players.alive[i].atking==P then
freshTarget(players.alive[i]) freshTarget(players.alive[i])
@@ -431,6 +464,7 @@ Event={
P.visTime[i][j]=min(P.visTime[i][j],20) P.visTime[i][j]=min(P.visTime[i][j],20)
end end
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 if P.id==1 and players[2]and players[2].ai then SFX("fail")end
ins(P.task,Event.task.lose) ins(P.task,Event.task.lose)
if #players.alive==1 then if #players.alive==1 then
@@ -449,7 +483,7 @@ Event={
SFX("reach") SFX("reach")
end end
end, end,
death_reach=function() marathon_reach_lunatic=function()
if P.gameEnv.target==250 then if P.gameEnv.target==250 then
Event.gameover.win() Event.gameover.win()
else else
@@ -467,7 +501,7 @@ Event={
Event.gameover.lose() Event.gameover.lose()
else else
P.gameEnv.target=P.gameEnv.target+2 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) ins(P.clearing,1)
end end
end end
@@ -477,31 +511,45 @@ Event={
Event.gameover.lose() Event.gameover.lose()
end end
end, end,
sudden_reach_HARD=function() sudden_reach_hard=function()
if #P.clearing>0 and P.lastClear<10 and P.lastClear~=74 then if #P.clearing>0 and P.lastClear<10 and P.lastClear~=74 then
Event.gameover.lose() Event.gameover.lose()
end end
end, end,
newPC=function() newPC=function()
local P=players[1] local P=players[1]
if #P.field==#P.clearing then if P.cstat.piece%4==0 then
P.counter=P.cstat.piece==0 and 19 or 0 if #P.field==#P.clearing then
ins(P.task,Event.task.PC) P.counter=P.cstat.piece==0 and 19 or 0
if gameLevel==2 then ins(P.task,Event.task.PC)
local s=P.cstat.pc*.5 if curMode.lv==2 then
if int(s)==s and s>0 then local s=P.cstat.pc*.5
P.gameEnv.drop=pc_drop[s]or 10 if int(s)==s and s>0 then
P.gameEnv.lock=pc_lock[s]or 20 P.gameEnv.drop=pc_drop[s]or 10
P.gameEnv.fall=pc_fall[s]or 5 P.gameEnv.lock=pc_lock[s]or 20
if s==10 then P.gameEnv.fall=pc_fall[s]or 5
showText(P,"Max speed","appear",80,-120) if s==10 then
else showText(P,"Max speed","appear",80,-120)
showText(P,"Speed up","appear",30,-130) else
showText(P,"Speed up","appear",30,-130)
end
end 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 end
else
Event.gameover.lose()
end end
end, end,
task={ task={
@@ -510,8 +558,8 @@ Event={
return true return true
end, end,
win=function() win=function()
P.counter=P.counter+1 P.endCounter=P.endCounter+1
if P.counter>80 then if P.endCounter>80 then
if P.gameEnv.visible==1 then if P.gameEnv.visible==1 then
for i=1,#P.field do for i=1,#P.field do
for j=1,10 do for j=1,10 do
@@ -520,21 +568,21 @@ Event={
end end
end end
end end
if P.counter==100 then if P.endCounter==100 then
for i=1,#P.field do for i=1,#P.field do
removeRow(P.field) removeRow(P.field)
removeRow(P.visTime) removeRow(P.visTime)
end end
return true return true
end end
elseif P.counter==100 then elseif P.endCounter==100 then
return true return true
end end
end end
end, end,
lose=function() lose=function()
P.counter=P.counter+1 P.endCounter=P.endCounter+1
if P.counter>80 then if P.endCounter>80 then
if P.gameEnv.visible==1 then if P.gameEnv.visible==1 then
for i=1,#P.field do for i=1,#P.field do
for j=1,10 do for j=1,10 do
@@ -543,26 +591,98 @@ Event={
end end
end end
end end
if P.counter==100 then if P.endCounter==100 then
for i=1,#P.field do for i=1,#P.field do
removeRow(P.field) removeRow(P.field)
removeRow(P.visTime) removeRow(P.visTime)
end end
return true return true
end end
elseif P.counter==100 then elseif P.endCounter==100 then
return true return true
end end
end 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, end,
PC=function() PC=function()
local P=players[1] local P=players[1]
P.counter=P.counter+1 P.counter=P.counter+1
if P.counter==21 then if P.counter==21 then
P.gameEnv.target=P.gameEnv.target+4
local t=P.cstat.pc%2 local t=P.cstat.pc%2
for i=1,4 do for i=1,4 do
local r=getNewRow() local r=getNewRow()

View File

@@ -145,14 +145,11 @@ function drawButton()
end end
end end
function drawDial(x,y,speed) function drawDial(x,y,speed)
gc.push("transform") gc.setColor(1,1,1)
gc.translate(x,y) mStr(int(speed),x,y-18)
gc.setColor(1,1,1) gc.draw(dialCircle,x,y,nil,nil,nil,32,32)
mStr(int(speed),0,-20) gc.setColor(1,1,1,.6)
gc.draw(dialCircle,0,0,nil,nil,nil,32,32) gc.draw(dialNeedle,x,y,2.094+(speed<=175 and .02094*speed or 4.712-52.36/(speed-125)),nil,nil,5,4)
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()
end end
function drawPixel(y,x,id,alpha) function drawPixel(y,x,id,alpha)
gc.setColor(1,1,1,alpha) gc.setColor(1,1,1,alpha)
@@ -264,7 +261,7 @@ end
function Pnt.main() function Pnt.main()
gc.setColor(1,1,1) gc.setColor(1,1,1)
setFont(30) setFont(30)
gc.print("Alpha V0.7.6",370,140) gc.print("Alpha V0.7.7",370,140)
gc.print(system,530,110) gc.print(system,530,110)
gc.draw(titleImage,30,30) gc.draw(titleImage,30,30)
end end
@@ -312,12 +309,12 @@ function Pnt.play()
if P.small then if P.small then
gc.push("transform") gc.push("transform")
gc.translate(P.x,P.y)gc.scale(P.size)--Scale 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.setLineWidth(13)
gc.stencil(stencil_field_small,"replace",1) gc.stencil(stencil_field_small,"replace",1)
gc.translate(0,P.fieldBeneath) gc.translate(0,P.fieldBeneath)
gc.setStencilTest("equal",1) 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 for j=int(P.fieldBeneath/30+1),#P.field do
if P.falling<=0 or without(P.clearing,j)then if P.falling<=0 or without(P.clearing,j)then
for i=1,10 do for i=1,10 do
@@ -337,20 +334,20 @@ function Pnt.play()
end end
end end
if P.result then 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) setFont(100)
mStr(P.result,150,235) mStr(P.result,150,235)
if P.killMark then if P.killMark then
gc.setLineWidth(20) gc.setLineWidth(20)
gc.setColor(1,0,0,min(P.counter,25)*.04) gc.setColor(1,0,0,min(P.endCounter,25)*.04)
gc.circle("line",150,300,420-10*min(P.counter,30)) gc.circle("line",150,300,420-10*min(P.endCounter,30))
end end
end end
gc.pop() gc.pop()
else else
gc.push("transform") gc.push("transform")
gc.translate(P.x,P.y)gc.scale(P.size)--Scale 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.setLineWidth(7)
gc.setColor(frameColor[P.strength])gc.rectangle("line",0,0,600,690)--Big frame gc.setColor(frameColor[P.strength])gc.rectangle("line",0,0,600,690)--Big frame
gc.stencil(stencil_field,"replace", 1) gc.stencil(stencil_field,"replace", 1)
@@ -398,7 +395,8 @@ function Pnt.play()
gc.draw(PTC.dust[p])--Draw game field gc.draw(PTC.dust[p])--Draw game field
gc.setStencilTest()--In-playField mask gc.setStencilTest()--In-playField mask
gc.translate(0,-P.fieldBeneath) 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 local h=0
for i=1,#P.atkBuffer do for i=1,#P.atkBuffer do
@@ -412,23 +410,22 @@ function Pnt.play()
end end
if a.countdown>0 then if a.countdown>0 then
gc.setColor(attackColor[a.lv][1]) 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.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 --Timing
else else
attackColor.animate[a.lv]((sin((Timer()-i)*20)+1)*.5) 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 --Warning
end end
else else
gc.setColor(attackColor[a.lv][1]) gc.setColor(attackColor[a.lv][1])
bar=bar*(20-a.time)*.05 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 --Disappear
end end
h=h+bar h=h+bar
if h>=600 then break end
end--Buffer line end--Buffer line
gc.setColor(P.b2b<40 and color.white or P.b2b<=480 and color.lightRed or color.lightBlue) 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 end
end--Next 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 if frame<180 then
local count=179-frame local count=179-frame
gc.push("transform") gc.push("transform")
@@ -479,7 +480,7 @@ function Pnt.play()
gc.setColor(1,1,1) gc.setColor(1,1,1)
setFont(35) setFont(35)
mStr(format("%.2f",P.time),-75,520)--Draw time 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) gc.setColor(1,1,1)
setFont(15) setFont(15)
@@ -528,7 +529,7 @@ function Pnt.play()
end end
if P.atkMode~=4 then if P.atkMode~=4 then
if P.atking 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) gc.line(P.centerX,P.centerY,P.atking.centerX,P.atking.centerY)
end end
end end
@@ -593,7 +594,7 @@ function Pnt.help()
setFont(32) setFont(32)
gc.setColor(1,1,1) gc.setColor(1,1,1)
for i=1,11 do 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 end
gc.draw(titleImage,180,600,.2,.7+.05*sin(Timer()*2),nil,140,100) gc.draw(titleImage,180,600,.2,.7+.05*sin(Timer()*2),nil,140,100)
end end

View File

@@ -196,7 +196,7 @@ function Tmr.play(dt)
if P.falling<=0 then if P.falling<=0 then
if #P.field>P.clearing[1]then if #P.field>P.clearing[1]then
SFX("fall") SFX("fall")
VIB(1) if P.id==1 then VIB(1)end
end end
for i=1,#P.clearing do for i=1,#P.clearing do
removeRow(P.field,P.clearing[i]) removeRow(P.field,P.clearing[i])
@@ -205,7 +205,7 @@ function Tmr.play(dt)
P.clearing={} P.clearing={}
end end
end--Rows cleared drop 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 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 if P.visTime[j][i]<20 then P.visTime[j][i]=P.visTime[j][i]+.5 end
end end--Make field visible end end--Make field visible
@@ -246,7 +246,6 @@ function Tmr.play(dt)
end end
end end
if modeEnv.royaleMode and frame%60==0 then if modeEnv.royaleMode and frame%60==0 then
freshRoyaleTarget() freshMostDangerous()
end end
setmetatable(_G,nil)
end end

View File

@@ -16,7 +16,7 @@ function without(t,v)
return true return true
end end
function mStr(s,x,y) function mStr(s,x,y)
gc.printf(s,x-500,y,1000,"center") gc.printf(s,x-250,y,500,"center")
end end
function getNewRow(val) function getNewRow(val)
@@ -58,8 +58,8 @@ function timeSort(a,b)
return a.time>b.time return a.time>b.time
end end
function stencil_miniTitle() function stencil_miniTitle()
for i=1,#miniTitle_pixel do for i=1,#miniTitle_rect do
gc.rectangle("fill",unpack(miniTitle_pixel[i])) gc.rectangle("fill",unpack(miniTitle_rect[i]))
end end
end end
function stencil_field() function stencil_field()
@@ -72,7 +72,7 @@ end
function VIB(t) function VIB(t)
if setting.vib>0 then if setting.vib>0 then
love.system.vibrate(setting.vib+t) love.system.vibrate(vibrateLevel[setting.vib+t])
end end
end end
function sysSFX(s,v) function sysSFX(s,v)
@@ -83,6 +83,7 @@ function sysSFX(s,v)
if not sfx[s][n]then if not sfx[s][n]then
sfx[s][n]=sfx[s][n-1]:clone() sfx[s][n]=sfx[s][n-1]:clone()
sfx[s][n]:seek(0) sfx[s][n]:seek(0)
break
end end
end end
sfx[s][n]:setVolume(v or 1) sfx[s][n]:setVolume(v or 1)