Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ecc1ae826f | ||
|
|
408377e51b | ||
|
|
1f5698ce15 | ||
|
|
d4a23ee68c | ||
|
|
b76b82d6ee | ||
|
|
2a0154dfa0 | ||
|
|
622177e0df | ||
|
|
b04131b408 | ||
|
|
e93ef851ac | ||
|
|
4d7f2e6698 | ||
|
|
abf827bc2b | ||
|
|
ee25d35220 | ||
|
|
eef8e594a2 | ||
|
|
5edeffbda4 | ||
|
|
af4df9c2e2 | ||
|
|
ac18ad2fcd | ||
|
|
1d293bb186 | ||
|
|
99611910de |
@@ -1,28 +1,25 @@
|
||||
local fs=love.filesystem
|
||||
local FILE={}
|
||||
function FILE.load(name)
|
||||
local F=fs.newFile(name)
|
||||
if F:open("r")then
|
||||
local s=F:read()
|
||||
F:close()
|
||||
if s:sub(1,6)=="return"then
|
||||
s=loadstring(s)
|
||||
if s then
|
||||
setfenv(s,{})
|
||||
return s()
|
||||
if fs.getInfo(name)then
|
||||
local F=fs.newFile(name)
|
||||
if F:open("r")then
|
||||
local s=F:read()
|
||||
F:close()
|
||||
if s:sub(1,6)=="return"then
|
||||
s=loadstring(s)
|
||||
if s then
|
||||
setfenv(s,{})
|
||||
return s()
|
||||
end
|
||||
else
|
||||
LOG.print(name.." "..text.loadError,COLOR.red)
|
||||
return
|
||||
end
|
||||
else
|
||||
local res=json.decode(s)
|
||||
if res then
|
||||
return res
|
||||
else
|
||||
LOG.print(name.." "..text.loadError,COLOR.red)
|
||||
return
|
||||
local res=json.decode(s)
|
||||
if res then
|
||||
return res
|
||||
end
|
||||
end
|
||||
end
|
||||
LOG.print(name.." "..text.loadError,COLOR.red)
|
||||
end
|
||||
end
|
||||
function FILE.save(data,name,mode)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
local gc=love.graphics
|
||||
local rnd,rem=math.random,table.remove
|
||||
local int,rnd,rem=math.floor,math.random,table.remove
|
||||
local setFont,mStr=setFont,mStr
|
||||
|
||||
local texts={}
|
||||
@@ -79,7 +79,7 @@ function TEXT.show(text,x,y,font,style,spd,stop)
|
||||
text=text, --String
|
||||
x=x or 0, --X
|
||||
y=y or 0, --Y
|
||||
font=font or 40, --Font
|
||||
font=int(font/5)*5 or 40, --Font
|
||||
spd=(spd or 1)/60, --Timing speed(1=last 1 sec)
|
||||
stop=stop, --Stop time(sustained text)
|
||||
draw=textFX[style]or error("unavailable type:"..style), --Draw method
|
||||
@@ -91,7 +91,7 @@ function TEXT.getText(text,x,y,font,style,spd,stop)--Another version of TEXT.sho
|
||||
text=text,
|
||||
x=x or 0,
|
||||
y=y or 0,
|
||||
font=font or 40,
|
||||
font=int(font/5)*5 or 40,
|
||||
spd=(spd or 1)/60,
|
||||
stop=stop,
|
||||
draw=textFX[style]or error("unavailable type:"..style),
|
||||
|
||||
4
conf.lua
@@ -1,5 +1,5 @@
|
||||
VERSION_CODE=1207
|
||||
VERSION_NAME="Alpha V0.12.7"
|
||||
VERSION_CODE=1209
|
||||
VERSION_NAME="Alpha V0.12.9"
|
||||
love.setDeprecationOutput(false)
|
||||
function love.conf(t)
|
||||
t.identity="Techmino"--Saving folder
|
||||
|
||||
@@ -41,12 +41,12 @@ spin判定:
|
||||
没有用上的额外抵挡会被丢弃,最后剩下的攻击力会发送给对手
|
||||
|
||||
back to back(B2B)点数说明:
|
||||
B2B点数的范围在0~1200,在点数>=40时进行特殊消除为B2B,>1000时特殊消除为B3B
|
||||
B2B点数的范围在0~1000,在点数>=50时进行特殊消除为B2B,>800时特殊消除为B3B
|
||||
普通消除:-250
|
||||
spin1~5:+[50/100/180/1000/1200](mini变为原来25%)
|
||||
spin1~5:+[50/100/180/800/1000](mini变为原来50%)
|
||||
消四/五:+[100/200]
|
||||
空spin:+20,此法得到的点数不能超过1000
|
||||
当点数在1000以上时空放一块-40(不低于1000)
|
||||
空spin:+20,此法得到的点数不能超过800
|
||||
当点数在800以上时空放一块-40(不低于800)
|
||||
|
||||
混战模式说明:
|
||||
许多玩家同时进行一局游戏(对手都是AI,不是真人).随着玩家数量的减少,方块下落/垃圾生效速度/垃圾升起速度都会增加.淘汰其它玩家后可以获得一个徽章和该玩家持有的徽章,增强自己的攻击力.
|
||||
|
||||
@@ -43,12 +43,12 @@ Countering:
|
||||
Any extra blocking you didn't use will be discarded, and finally the remaining attack power will be sent to your opponent.
|
||||
|
||||
Back to Back (B2B) gauge:
|
||||
The B2B gauge ranges from 0 to 1,200. Special line clears are B2B if the gauge is >=40, B2B2B if >1,000.
|
||||
The B2B gauge ranges from 0 to 1,000. Special line clears are B2B if the gauge is >=50, B2B2B if >800.
|
||||
A regular line clear -250
|
||||
Spin Single/Double/Triple/Techrash/Techrash+ +50/100/180/1000/1200 (x25% if Mini)
|
||||
Spin Single/Double/Triple/Techrash/Techrash+ +50/100/180/800/1000 (x50% if Mini)
|
||||
Techrash/Techrash+ +100/200
|
||||
Spin (0 lines) +20. Do note that the B2B gauge cannot exceed 1000 using this method.
|
||||
When gauge is above 1,000, a drop without clearing lines decreases it by 40, but cannot drop below 1,000
|
||||
Spin (0 lines) +20. Do note that the B2B gauge cannot exceed 800 using this method.
|
||||
When gauge is above 800, a drop without clearing lines decreases it by 40, but cannot drop below 800
|
||||
|
||||
Battle Royale modes:
|
||||
Many players play a game at the same time (against AI bots, not real players). As players get eliminated, blocks fall faster, and garbage take effect faster, as well as rise faster. Eliminate other players to gain a badge and the player's badge to increase your attack power.
|
||||
|
||||
62
main.lua
@@ -108,8 +108,6 @@ if not fs.getInfo("conf/settings")and MOBILE then
|
||||
SETTING.vib=2
|
||||
SETTING.powerInfo=true
|
||||
SETTING.fullscreen=true
|
||||
love.window.setFullscreen(true)
|
||||
love.resize(love.graphics.getWidth(),love.graphics.getHeight())
|
||||
end
|
||||
if SETTING.fullscreen then love.window.setFullscreen(true)end
|
||||
|
||||
@@ -138,29 +136,25 @@ IMG.init{
|
||||
hbm="mess/hbm.png",
|
||||
}
|
||||
SKIN.init{
|
||||
"normal(mrz)",
|
||||
"smooth(mrz)",
|
||||
"contrast(mrz)",
|
||||
"glow(mrz)",
|
||||
"plastic(mrz)",
|
||||
"pure(mrz)",
|
||||
"glass(ScF)",
|
||||
"paper(mrz)",
|
||||
"jelly(miya)",
|
||||
"polka_dots(ScF)",
|
||||
"brick(notypey)",
|
||||
"brick_light(notypey)",
|
||||
"cartoon_cup(earety)",
|
||||
"ball(shaw)",
|
||||
"steel(kulumi)",
|
||||
"gem(notypey)",
|
||||
"classic(_)",
|
||||
"crack(earety)",
|
||||
"retro(notypey)",
|
||||
"retro_grey(notypey)",
|
||||
"text_bone(mrz)",
|
||||
"colored_bone(mrz)",
|
||||
"white_bone(mrz)",
|
||||
"Normal(MrZ)",
|
||||
"Contrast(MrZ)",
|
||||
"PolkaDots(ScF)",
|
||||
"Smooth(MrZ)",
|
||||
"Glass(ScF)",
|
||||
"Pentagon(ScF)",
|
||||
"Pure(MrZ)",
|
||||
"Glow(MrZ)",
|
||||
"Plastic(MrZ)",
|
||||
"Paper(MrZ)",
|
||||
"CartoonCup(Earety)",
|
||||
"Jelly(Miya)",
|
||||
"Brick(Notypey)",
|
||||
"Gem(Notypey)",
|
||||
"Classic",
|
||||
"Ball(Shaw)",
|
||||
"Retro(Notypey)",
|
||||
"TextBone(MrZ)",
|
||||
"ColoredBone(MrZ)",
|
||||
"WTF",
|
||||
}
|
||||
--Initialize sound libs
|
||||
@@ -367,22 +361,10 @@ do
|
||||
SETTING.VKCurW=SETTING.VKCurW*.1
|
||||
SETTING.VKTchW=SETTING.VKTchW*.1
|
||||
end
|
||||
newVersionLaunch=true
|
||||
|
||||
--Try unlock modes which should be unlocked
|
||||
for name,rank in next,RANKS do
|
||||
if rank and rank>0 then
|
||||
for _,mode in next,MODES do
|
||||
if mode.name==name and mode.unlock then
|
||||
for _,unlockName in next,mode.unlock do
|
||||
if not RANKS[unlockName]then
|
||||
RANKS[unlockName]=0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if S.version<1208 then
|
||||
SETTING.skinSet=1
|
||||
end
|
||||
newVersionLaunch=true
|
||||
|
||||
S.version=VERSION_CODE
|
||||
FILE.save(RANKS,"conf/unlock","q")
|
||||
|
||||
BIN
media/image/skin/Ball(Shaw).png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
media/image/skin/Brick(Notypey).png
Normal file
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
BIN
media/image/skin/Classic.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
media/image/skin/ColoredBone(MrZ).png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
media/image/skin/Contrast(MrZ).png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
media/image/skin/Gem(Notypey).png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
media/image/skin/Glass(ScF).png
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
media/image/skin/Glow(MrZ).png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
media/image/skin/Jelly(Miya).png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
media/image/skin/Normal(MrZ).png
Normal file
|
After Width: | Height: | Size: 9.4 KiB |
BIN
media/image/skin/Paper(MrZ).png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
media/image/skin/Pentagon(ScF).png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
media/image/skin/Plastic(MrZ).png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
media/image/skin/PolkaDots(ScF).png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
media/image/skin/Pure(MrZ).png
Normal file
|
After Width: | Height: | Size: 613 B |
BIN
media/image/skin/Retro(Notypey).png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
media/image/skin/Smooth(MrZ).png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
media/image/skin/TextBone(MrZ).png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 612 B After Width: | Height: | Size: 613 B |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
@@ -8,7 +8,7 @@ function FREEROW.reset(num)
|
||||
end
|
||||
elseif num>len then
|
||||
for i=len+1,num do
|
||||
L[i]={0,0,0,0,0,0,0,0,0,0}
|
||||
L[i]={0,0,0,0,0,0,0,0,0,0,garbage=false}
|
||||
end
|
||||
end
|
||||
len=num
|
||||
@@ -16,7 +16,7 @@ end
|
||||
function FREEROW.get(val,ifGarbage)
|
||||
if len==0 then
|
||||
for i=1,10 do
|
||||
L[i]={0,0,0,0,0,0,0,0,0,0}
|
||||
L[i]={0,0,0,0,0,0,0,0,0,0,garbage=false}
|
||||
end
|
||||
len=len+10
|
||||
end
|
||||
|
||||
@@ -304,20 +304,25 @@ SETTING={--Settings
|
||||
VKIcon=true,--If disp icon
|
||||
VKAlpha=.3,
|
||||
}local S=FILE.load("conf/settings")if S then addToTable(S,SETTING)end
|
||||
STAT=FILE.load("conf/data")or{--Statistics
|
||||
version=VERSION_CODE,
|
||||
run=0,game=0,time=0,frame=0,
|
||||
key=0,rotate=0,hold=0,
|
||||
extraPiece=0,finesseRate=0,
|
||||
piece=0,row=0,dig=0,
|
||||
atk=0,digatk=0,
|
||||
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
|
||||
date=nil,
|
||||
todayTime=0,
|
||||
}for i=1,25 do STAT.clear[i]={0,0,0,0,0,0}STAT.spin[i]={0,0,0,0,0,0,0}end
|
||||
S=FILE.load("conf/data")
|
||||
if S then--Statistics
|
||||
STAT=S
|
||||
else
|
||||
STAT={
|
||||
version=VERSION_CODE,
|
||||
run=0,game=0,time=0,frame=0,
|
||||
key=0,rotate=0,hold=0,
|
||||
extraPiece=0,finesseRate=0,
|
||||
piece=0,row=0,dig=0,
|
||||
atk=0,digatk=0,
|
||||
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
|
||||
date=nil,
|
||||
todayTime=0,
|
||||
}for i=1,25 do STAT.clear[i]={0,0,0,0,0,0}STAT.spin[i]={0,0,0,0,0,0,0}end
|
||||
end
|
||||
keyMap=FILE.load("conf/key")or{--Key setting
|
||||
{"left","right","x","z","c","up","down","space","tab","r"},{},
|
||||
--Keyboard
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
local gc=love.graphics
|
||||
local gc_rectangle,gc_setColor=gc.rectangle,gc.setColor
|
||||
local TIME=love.timer.getTime
|
||||
local int,ceil,rnd=math.floor,math.ceil,math.random
|
||||
local max,min,sin=math.max,math.min,math.sin
|
||||
@@ -18,7 +19,7 @@ local frameColorList={
|
||||
local function drawGrid(P,alpha)
|
||||
local FBN,FUP=P.fieldBeneath,P.fieldUp
|
||||
gc.setLineWidth(1)
|
||||
gc.setColor(1,1,1,alpha)
|
||||
gc_setColor(1,1,1,alpha)
|
||||
for x=1,9 do
|
||||
gc.line(30*x,-10,30*x,600)
|
||||
end
|
||||
@@ -37,11 +38,11 @@ local function drawField(P)
|
||||
for i=1,10 do
|
||||
if F[j][i]>0 then
|
||||
if V[j][i]>0 then
|
||||
gc.setColor(1,1,1,min(V[j][i]*.05,1))
|
||||
gc_setColor(1,1,1,min(V[j][i]*.05,1))
|
||||
Draw(texture[F[j][i]],30*i-30,-30*j)-- drawCell(j,i,F[j][i])
|
||||
elseif rep then
|
||||
gc.setColor(1,1,1,.3+.08*sin(.5*(j-i)+TIME()*4))
|
||||
gc.rectangle("fill",30*i-30,-30*j,30,30)
|
||||
gc_setColor(1,1,1,.3+.08*sin(.5*(j-i)+TIME()*4))
|
||||
gc_rectangle("fill",30*i-30,-30*j,30,30)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -56,17 +57,17 @@ local function drawField(P)
|
||||
while j==P.clearingRow[h]do
|
||||
h=h+1
|
||||
gc.translate(0,-stepY)
|
||||
gc.setColor(1,1,1,A)
|
||||
gc.rectangle("fill",0,30-30*j,300,stepY)
|
||||
gc_setColor(1,1,1,A)
|
||||
gc_rectangle("fill",0,30-30*j,300,stepY)
|
||||
end
|
||||
for i=1,10 do
|
||||
if F[j][i]>0 then
|
||||
if V[j][i]>0 then
|
||||
gc.setColor(1,1,1,min(V[j][i]*.05,1))
|
||||
gc_setColor(1,1,1,min(V[j][i]*.05,1))
|
||||
Draw(texture[F[j][i]],30*i-30,-30*j)-- drawCell(j,i,F[j][i])
|
||||
elseif rep then
|
||||
gc.setColor(1,1,1,.2)
|
||||
gc.rectangle("fill",30*i-30,-30*j,30,30)
|
||||
gc_setColor(1,1,1,.2)
|
||||
gc_rectangle("fill",30*i-30,-30*j,30,30)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -79,27 +80,27 @@ local function drawFXs(P)
|
||||
for i=1,#P.lockFX do
|
||||
local S=P.lockFX[i]
|
||||
if S[3]<.5 then
|
||||
gc.setColor(1,1,1,2*S[3])
|
||||
gc.rectangle("fill",S[1],S[2],60*S[3],30)
|
||||
gc_setColor(1,1,1,2*S[3])
|
||||
gc_rectangle("fill",S[1],S[2],60*S[3],30)
|
||||
else
|
||||
gc.setColor(1,1,1,2-2*S[3])
|
||||
gc.rectangle("fill",S[1]+30,S[2],60*S[3]-60,30)
|
||||
gc_setColor(1,1,1,2-2*S[3])
|
||||
gc_rectangle("fill",S[1]+30,S[2],60*S[3]-60,30)
|
||||
end
|
||||
end
|
||||
|
||||
--DropFX
|
||||
for i=1,#P.dropFX do
|
||||
local S=P.dropFX[i]
|
||||
gc.setColor(1,1,1,.6-S[5]*.6)
|
||||
gc_setColor(1,1,1,.6-S[5]*.6)
|
||||
local w=30*S[3]*(1-S[5]*.5)
|
||||
gc.rectangle("fill",30*S[1]-30+15*S[3]-w*.5,-30*S[2],w,30*S[4])
|
||||
gc_rectangle("fill",30*S[1]-30+15*S[3]-w*.5,-30*S[2],w,30*S[4])
|
||||
end
|
||||
|
||||
--MoveFX
|
||||
local texture=SKIN.curText
|
||||
for i=1,#P.moveFX do
|
||||
local S=P.moveFX[i]
|
||||
gc.setColor(1,1,1,.6-S[4]*.6)
|
||||
gc_setColor(1,1,1,.6-S[4]*.6)
|
||||
Draw(texture[S[1]],30*S[2]-30,-30*S[3])-- drawCell(S[3],S[2],S[1])
|
||||
end
|
||||
|
||||
@@ -109,12 +110,12 @@ local function drawFXs(P)
|
||||
local t=S[2]
|
||||
local x=t<.3 and 1-(3.3333*t-1)^2 or 1
|
||||
local y=t<.2 and 5*t or 1-1.25*(t-.2)
|
||||
gc.setColor(1,1,1,y)
|
||||
gc.rectangle("fill",150-x*150,15-S[1]*30-y*15,300*x,y*30)
|
||||
gc_setColor(1,1,1,y)
|
||||
gc_rectangle("fill",150-x*150,15-S[1]*30-y*15,300*x,y*30)
|
||||
end
|
||||
end
|
||||
local function drawGhost(P,clr)
|
||||
gc.setColor(1,1,1,P.gameEnv.ghost)
|
||||
gc_setColor(1,1,1,P.gameEnv.ghost)
|
||||
local texture=SKIN.curText
|
||||
for i=1,P.r do for j=1,P.c do
|
||||
if P.cur.bk[i][j]then
|
||||
@@ -138,7 +139,7 @@ local function drawBlockOutline(P,texture,trans)
|
||||
gc.setShader()
|
||||
end
|
||||
local function drawBlock(P,clr)
|
||||
gc.setColor(1,1,1)
|
||||
gc_setColor(1,1,1)
|
||||
local texture=SKIN.curText
|
||||
for i=1,P.r do for j=1,P.c do
|
||||
if P.cur.bk[i][j]then
|
||||
@@ -147,7 +148,7 @@ local function drawBlock(P,clr)
|
||||
end end
|
||||
end
|
||||
local function drawNextPreview(P,B)
|
||||
gc.setColor(1,1,1,.8)
|
||||
gc_setColor(1,1,1,.8)
|
||||
local x=int(6-#B[1]*.5)
|
||||
local y=21+ceil(P.fieldBeneath/30)
|
||||
for i=1,#B do for j=1,#B[1]do
|
||||
@@ -165,8 +166,8 @@ function draw.drawNext_norm(P)
|
||||
local texture=SKIN.curText
|
||||
gc.push("transform")
|
||||
gc.translate(316,116)
|
||||
gc.setColor(0,0,0,.4)gc.rectangle("fill",0,-80,124,N+8)
|
||||
gc.setColor(1,1,1)gc.rectangle("line",0,-80,124,N+8)
|
||||
gc_setColor(0,0,0,.4)gc_rectangle("fill",0,-80,124,N+8)
|
||||
gc_setColor(1,1,1)gc_rectangle("line",0,-80,124,N+8)
|
||||
mText(drawableText.next,62,-131)
|
||||
N=1
|
||||
while N<=ENV.nextCount and P.nextQueue[N]do
|
||||
@@ -182,7 +183,7 @@ function draw.drawNext_norm(P)
|
||||
if ENV.bagLine then
|
||||
local L=ENV.bagLen
|
||||
local C=-P.pieceCount%L--Phase
|
||||
gc.setColor(.8,.5,.5)
|
||||
gc_setColor(.8,.5,.5)
|
||||
for i=C,N-1,L do
|
||||
local y=72*i-77
|
||||
gc.line(2+P.fieldOff.x,y,120,y)
|
||||
@@ -196,8 +197,8 @@ function draw.drawNext_hidden(P)
|
||||
local texture=SKIN.curText
|
||||
gc.push("transform")
|
||||
gc.translate(316,116)
|
||||
gc.setColor(.5,0,0,.4)gc.rectangle("fill",0,-80,124,N+8)
|
||||
gc.setColor(1,1,1)gc.rectangle("line",0,-80,124,N+8)
|
||||
gc_setColor(.5,0,0,.4)gc_rectangle("fill",0,-80,124,N+8)
|
||||
gc_setColor(1,1,1)gc_rectangle("line",0,-80,124,N+8)
|
||||
mText(drawableText.next,62,-131)
|
||||
N=min(ENV.nextStartPos,P.pieceCount+1)
|
||||
while N<=ENV.nextCount and P.nextQueue[N]do
|
||||
@@ -213,7 +214,7 @@ function draw.drawNext_hidden(P)
|
||||
if ENV.bagLine then
|
||||
local L=ENV.bagLen
|
||||
local C=-P.pieceCount%L--Phase
|
||||
gc.setColor(.8,.5,.5)
|
||||
gc_setColor(.8,.5,.5)
|
||||
for i=C,N-1,L do
|
||||
local y=72*i-77
|
||||
gc.line(2+P.fieldOff.x,y,120,y)
|
||||
@@ -226,9 +227,9 @@ function draw.drawHold_norm(P)
|
||||
local texture=SKIN.curText
|
||||
gc.push("transform")
|
||||
gc.translate(-140,116)
|
||||
gc.setColor(0,0,0,.4)gc.rectangle("fill",0,-80,124,80)
|
||||
gc.setColor(1,1,1)gc.rectangle("line",0,-80,124,80)
|
||||
if P.holdTime==0 then gc.setColor(.6,.4,.4)end
|
||||
gc_setColor(0,0,0,.4)gc_rectangle("fill",0,-80,124,80)
|
||||
gc_setColor(1,1,1)gc_rectangle("line",0,-80,124,80)
|
||||
if P.holdTime==0 then gc_setColor(.6,.4,.4)end
|
||||
mText(drawableText.hold,62,-131)
|
||||
|
||||
local B=P.holdQueue[1]
|
||||
@@ -248,19 +249,19 @@ function draw.drawHold_multi(P)
|
||||
local texture=SKIN.curText
|
||||
gc.push("transform")
|
||||
gc.translate(-140,116)
|
||||
gc.setColor(0,0,0,.4)gc.rectangle("fill",0,-80,124,N+8)
|
||||
gc.setColor(1,1,1)gc.rectangle("line",0,-80,124,N+8)
|
||||
if P.holdTime==0 then gc.setColor(.6,.4,.4)end
|
||||
gc_setColor(0,0,0,.4)gc_rectangle("fill",0,-80,124,N+8)
|
||||
gc_setColor(1,1,1)gc_rectangle("line",0,-80,124,N+8)
|
||||
if P.holdTime==0 then gc_setColor(.6,.4,.4)end
|
||||
mText(drawableText.hold,62,-131)
|
||||
|
||||
gc.setColor(1,1,1)
|
||||
gc_setColor(1,1,1)
|
||||
if #P.holdQueue<P.gameEnv.holdCount and P.nextQueue[1]then
|
||||
N=1
|
||||
else
|
||||
N=P.holdTime+1
|
||||
end
|
||||
for n=1,#P.holdQueue do
|
||||
if n==N then gc.setColor(.6,.4,.4)end
|
||||
if n==N then gc_setColor(.6,.4,.4)end
|
||||
local bk,clr=P.holdQueue[n].bk,P.holdQueue[n].color
|
||||
for i=1,#bk do for j=1,#bk[1]do
|
||||
if bk[i][j]then
|
||||
@@ -274,7 +275,7 @@ end
|
||||
function draw.drawTargetLine(P,r)
|
||||
if r<21+(P.fieldBeneath+P.fieldUp)/30 and r>0 then
|
||||
gc.setLineWidth(4)
|
||||
gc.setColor(1,r>10 and 0 or rnd(),.5)
|
||||
gc_setColor(1,r>10 and 0 or rnd(),.5)
|
||||
local dx,dy=150+P.fieldOff.x,P.fieldOff.y+P.fieldBeneath+P.fieldUp
|
||||
gc.line(dx,600-30*r+dy,300+dx,600-30*r+dy)
|
||||
end
|
||||
@@ -289,24 +290,24 @@ local attackColor={
|
||||
}
|
||||
local RCPB={5,33,195,33,100,5,100,60}
|
||||
local function drawDial(x,y,speed)
|
||||
gc.setColor(1,1,1)
|
||||
gc_setColor(1,1,1)
|
||||
mStr(int(speed),x,y-18)
|
||||
|
||||
gc.setLineWidth(4)
|
||||
gc.setColor(1,1,1,.4)
|
||||
gc_setColor(1,1,1,.4)
|
||||
gc.circle("line",x,y,30,10)
|
||||
|
||||
gc.setLineWidth(2)
|
||||
gc.setColor(1,1,1,.6)
|
||||
gc_setColor(1,1,1,.6)
|
||||
gc.circle("line",x,y,30,10)
|
||||
|
||||
gc.setColor(1,1,1,.8)
|
||||
gc_setColor(1,1,1,.8)
|
||||
gc.draw(IMG.dialNeedle,x,y,2.094+(speed<=175 and .02094*speed or 4.712-52.36/(speed-125)),nil,nil,5,4)
|
||||
end
|
||||
local hideBoardStencil={
|
||||
up=function()gc.rectangle("fill",0,0,300,300)end,
|
||||
down=function()gc.rectangle("fill",0,300,300,300)end,
|
||||
all=function()gc.rectangle("fill",0,0,300,600)end,
|
||||
up=function()gc_rectangle("fill",0,0,300,300)end,
|
||||
down=function()gc_rectangle("fill",0,300,300,300)end,
|
||||
all=function()gc_rectangle("fill",0,0,300,600)end,
|
||||
}
|
||||
function draw.norm(P)
|
||||
local _
|
||||
@@ -325,8 +326,8 @@ function draw.norm(P)
|
||||
gc.translate(P.fieldOff.x,P.fieldOff.y)
|
||||
|
||||
--Fill field
|
||||
gc.setColor(0,0,0,.6)
|
||||
gc.rectangle("fill",0,-10,300,610)
|
||||
gc_setColor(0,0,0,.6)
|
||||
gc_rectangle("fill",0,-10,300,610)
|
||||
|
||||
--Draw grid
|
||||
if ENV.grid then drawGrid(P,ENV.grid)end
|
||||
@@ -349,14 +350,14 @@ function draw.norm(P)
|
||||
gc.setScissor(SCR.x+(P.absFieldX+P.fieldOff.x)*SCR.k,SCR.y+(P.absFieldY+P.fieldOff.y)*SCR.k,300*P.size*SCR.k,610*P.size*SCR.k)
|
||||
|
||||
--Draw dangerous area
|
||||
gc.setColor(1,0,0,.3)
|
||||
gc.rectangle("fill",0,-600,300,-610-FUP-FBN)
|
||||
gc_setColor(1,0,0,.3)
|
||||
gc_rectangle("fill",0,-600,300,-610-FUP-FBN)
|
||||
|
||||
--Draw field
|
||||
drawField(P)
|
||||
|
||||
--Draw spawn line
|
||||
gc.setColor(1,sin(t)*.4+.5,0,.5)
|
||||
gc_setColor(1,sin(t)*.4+.5,0,.5)
|
||||
gc.setLineWidth(4)
|
||||
gc.line(0,-600-FBN,300,-600-FBN)
|
||||
|
||||
@@ -383,12 +384,12 @@ function draw.norm(P)
|
||||
--Draw rotate center
|
||||
local x=30*(P.curX+P.sc[2])-15
|
||||
if ENV.center and ENV.block then
|
||||
gc.setColor(1,1,1,ENV.center)
|
||||
gc_setColor(1,1,1,ENV.center)
|
||||
gc.draw(IMG.spinCenter,x,-30*(P.curY+P.sc[1])+15,nil,nil,nil,4,4)
|
||||
end
|
||||
gc.translate(0,dy)
|
||||
if ENV.center and ENV.ghost then
|
||||
gc.setColor(1,1,1,trans*ENV.center)
|
||||
gc_setColor(1,1,1,trans*ENV.center)
|
||||
gc.draw(IMG.spinCenter,x,-30*(P.imgY+P.sc[1])+15,nil,nil,nil,4,4)
|
||||
end
|
||||
end
|
||||
@@ -402,10 +403,10 @@ function draw.norm(P)
|
||||
gc.pop()
|
||||
|
||||
gc.setLineWidth(2)
|
||||
gc.setColor(frameColorList[P.frameColor])
|
||||
gc.rectangle("line",-1,-11,302,612)--Boarder
|
||||
gc.rectangle("line",301,-3,15,604)--AtkBuffer boarder
|
||||
gc.rectangle("line",-16,-3,15,604)--B2b bar boarder
|
||||
gc_setColor(frameColorList[P.frameColor])
|
||||
gc_rectangle("line",-1,-11,302,612)--Boarder
|
||||
gc_rectangle("line",301,-3,15,604)--AtkBuffer boarder
|
||||
gc_rectangle("line",-16,-3,15,604)--B2b bar boarder
|
||||
|
||||
--Buffer line
|
||||
local h=0
|
||||
@@ -420,21 +421,21 @@ function draw.norm(P)
|
||||
end
|
||||
if A.countdown>0 then
|
||||
--Timing
|
||||
gc.setColor(attackColor[A.lv][1])
|
||||
gc.rectangle("fill",303,599-h,11,-bar)
|
||||
gc.setColor(attackColor[A.lv][2])
|
||||
gc.rectangle("fill",303,599-h-bar,11,bar*(1-A.countdown/A.cd0))
|
||||
gc_setColor(attackColor[A.lv][1])
|
||||
gc_rectangle("fill",303,599-h,11,-bar)
|
||||
gc_setColor(attackColor[A.lv][2])
|
||||
gc_rectangle("fill",303,599-h-bar,11,bar*(1-A.countdown/A.cd0))
|
||||
else
|
||||
--Warning
|
||||
local a=math.sin((t-i)*30)*.5+.5
|
||||
local c1,c2=attackColor[A.lv][1],attackColor[A.lv][2]
|
||||
gc.setColor(c1[1]*a+c2[1]*(1-a),c1[2]*a+c2[2]*(1-a),c1[3]*a+c2[3]*(1-a))
|
||||
gc.rectangle("fill",303,599-h,11,-bar)
|
||||
gc_setColor(c1[1]*a+c2[1]*(1-a),c1[2]*a+c2[2]*(1-a),c1[3]*a+c2[3]*(1-a))
|
||||
gc_rectangle("fill",303,599-h,11,-bar)
|
||||
end
|
||||
else
|
||||
gc.setColor(attackColor[A.lv][1])
|
||||
gc_setColor(attackColor[A.lv][1])
|
||||
bar=bar*(20-A.time)*.05
|
||||
gc.rectangle("fill",303,599-h,11,-bar)
|
||||
gc_rectangle("fill",303,599-h,11,-bar)
|
||||
--Disappear
|
||||
end
|
||||
h=h+bar
|
||||
@@ -442,27 +443,27 @@ function draw.norm(P)
|
||||
|
||||
--B2B indictator
|
||||
local a,b=P.b2b,P.b2b1 if a>b then a,b=b,a end
|
||||
gc.setColor(.8,1,.2)
|
||||
gc.rectangle("fill",-14,599,11,-b*.5)
|
||||
gc.setColor(P.b2b<40 and COLOR.white or P.b2b<=1e3 and COLOR.lRed or COLOR.lBlue)
|
||||
gc.rectangle("fill",-14,599,11,-a*.5)
|
||||
gc.setColor(1,1,1)
|
||||
gc_setColor(.8,1,.2)
|
||||
gc_rectangle("fill",-14,599,11,-b*.6)
|
||||
gc_setColor(P.b2b<40 and COLOR.white or P.b2b<=800 and COLOR.lRed or COLOR.lBlue)
|
||||
gc_rectangle("fill",-14,599,11,-a*.6)
|
||||
gc_setColor(1,1,1)
|
||||
if t%.5<.3 then
|
||||
gc.rectangle("fill",-15,b<40 and 578.5 or 98.5,13,3)
|
||||
gc_rectangle("fill",-15,b<40 and 568.5 or 118.5,13,3)
|
||||
end
|
||||
|
||||
--LockDelay indicator
|
||||
if ENV.easyFresh then
|
||||
gc.setColor(1,1,1)
|
||||
gc_setColor(1,1,1)
|
||||
else
|
||||
gc.setColor(1,.26,.26)
|
||||
gc_setColor(1,.26,.26)
|
||||
end
|
||||
if P.lockDelay>=0 then
|
||||
gc.rectangle("fill",0,602,300*P.lockDelay/ENV.lock,6)--Lock delay indicator
|
||||
gc_rectangle("fill",0,602,300*P.lockDelay/ENV.lock,6)--Lock delay indicator
|
||||
end
|
||||
local x=3
|
||||
for _=1,min(P.freshTime,15)do
|
||||
gc.rectangle("fill",x,615,14,5)
|
||||
gc_rectangle("fill",x,615,14,5)
|
||||
x=x+20
|
||||
end
|
||||
|
||||
@@ -475,13 +476,13 @@ function draw.norm(P)
|
||||
--Draw target selecting pad
|
||||
if GAME.modeEnv.royaleMode then
|
||||
if P.atkMode then
|
||||
gc.setColor(1,.8,0,P.swappingAtkMode*.02)
|
||||
gc.rectangle("fill",RCPB[2*P.atkMode-1],RCPB[2*P.atkMode],90,35,8,4)
|
||||
gc_setColor(1,.8,0,P.swappingAtkMode*.02)
|
||||
gc_rectangle("fill",RCPB[2*P.atkMode-1],RCPB[2*P.atkMode],90,35,8,4)
|
||||
end
|
||||
gc.setColor(1,1,1,P.swappingAtkMode*.025)
|
||||
gc_setColor(1,1,1,P.swappingAtkMode*.025)
|
||||
setFont(35)
|
||||
for i=1,4 do
|
||||
gc.rectangle("line",RCPB[2*i-1],RCPB[2*i],90,35,8,4)
|
||||
gc_rectangle("line",RCPB[2*i-1],RCPB[2*i],90,35,8,4)
|
||||
gc.printf(text.atkModeName[i],RCPB[2*i-1]-4,RCPB[2*i]+4,200,"center",nil,.5)
|
||||
end
|
||||
end
|
||||
@@ -490,7 +491,7 @@ function draw.norm(P)
|
||||
gc.setStencilTest("equal",1)
|
||||
gc.setLineWidth(20)
|
||||
for i=0,24 do
|
||||
gc.setColor(COLOR.rainbow_grey(t*.626+i*.1))
|
||||
gc_setColor(COLOR.rainbow_grey(t*.626+i*.1))
|
||||
gc.line(20*i-190,-2,20*i+10,602)
|
||||
end
|
||||
gc.setStencilTest()
|
||||
@@ -502,50 +503,50 @@ function draw.norm(P)
|
||||
|
||||
--Display Ys
|
||||
-- gc.setLineWidth(6)
|
||||
-- if P.curY then gc.setColor(1,.4,0,.42)gc.line(0,611-P.curY*30,300,611-P.curY*30)end
|
||||
-- if P.imgY then gc.setColor(0,1,.4,.42)gc.line(0,615-P.imgY*30,300,615-P.imgY*30)end
|
||||
-- if P.minY then gc.setColor(0,.4,1,.42)gc.line(0,619-P.minY*30,300,619-P.minY*30)end
|
||||
-- gc.setColor(0,.4,1,.42)gc.line(0,600-P.garbageBeneath*30,300,600-P.garbageBeneath*30)
|
||||
-- if P.curY then gc_setColor(1,.4,0,.42)gc.line(0,611-P.curY*30,300,611-P.curY*30)end
|
||||
-- if P.imgY then gc_setColor(0,1,.4,.42)gc.line(0,615-P.imgY*30,300,615-P.imgY*30)end
|
||||
-- if P.minY then gc_setColor(0,.4,1,.42)gc.line(0,619-P.minY*30,300,619-P.minY*30)end
|
||||
-- gc_setColor(0,.4,1,.42)gc.line(0,600-P.garbageBeneath*30,300,600-P.garbageBeneath*30)
|
||||
gc.pop()
|
||||
|
||||
--Speed dials
|
||||
setFont(25)
|
||||
drawDial(510,510,P.dropSpeed)
|
||||
drawDial(555,565,P.keySpeed)
|
||||
gc.setColor(1,1,1)
|
||||
gc_setColor(1,1,1)
|
||||
gc.draw(drawableText.bpm,540,480)
|
||||
gc.draw(drawableText.kpm,494,573)
|
||||
|
||||
--Score & Time
|
||||
setFont(25)
|
||||
gc.setColor(0,0,0,.3)
|
||||
gc_setColor(0,0,0,.3)
|
||||
gc.print(P.score1,18,509)
|
||||
gc.print(format("%.2f",P.stat.time),18,539)
|
||||
gc.setColor(COLOR.lYellow)gc.print(P.score1,20,510)
|
||||
gc.setColor(COLOR.sky)gc.print(format("%.2f",P.stat.time),20,540)
|
||||
gc_setColor(COLOR.lYellow)gc.print(P.score1,20,510)
|
||||
gc_setColor(COLOR.sky)gc.print(format("%.2f",P.stat.time),20,540)
|
||||
|
||||
--FinesseCombo
|
||||
if P.finesseCombo>2 then
|
||||
_=P.finesseComboTime
|
||||
local str=P.finesseCombo.."x"
|
||||
if _>0 then
|
||||
gc.setColor(1,1,1,_*.2)
|
||||
gc_setColor(1,1,1,_*.2)
|
||||
gc.print(str,20,570)
|
||||
gc.setColor(1,1,1,1.2-_*.1)
|
||||
gc_setColor(1,1,1,1.2-_*.1)
|
||||
gc.push("transform")
|
||||
gc.translate(20,600)
|
||||
gc.scale(1+_*.08)
|
||||
gc.print(str,0,-30)
|
||||
gc.pop()
|
||||
else
|
||||
gc.setColor(1,1,1)
|
||||
gc_setColor(1,1,1)
|
||||
gc.print(str,20,570)
|
||||
end
|
||||
end
|
||||
|
||||
--Lives
|
||||
if P.life>0 then
|
||||
gc.setColor(1,1,1)
|
||||
gc_setColor(1,1,1)
|
||||
if P.life<=3 then
|
||||
for i=1,P.life do
|
||||
gc.draw(IMG.lifeIcon,450+25*i,595,nil,.8)
|
||||
@@ -559,7 +560,7 @@ function draw.norm(P)
|
||||
end
|
||||
|
||||
--Other messages
|
||||
gc.setColor(1,1,1)
|
||||
gc_setColor(1,1,1)
|
||||
if GAME.curMode.mesDisp then
|
||||
GAME.curMode.mesDisp(P)
|
||||
end
|
||||
@@ -572,9 +573,9 @@ function draw.norm(P)
|
||||
--Draw current mission
|
||||
setFont(35)
|
||||
if ENV.missionKill then
|
||||
gc.setColor(1,.7+.2*sin(t*6.26),.4)
|
||||
gc_setColor(1,.7+.2*sin(t*6.26),.4)
|
||||
else
|
||||
gc.setColor(1,1,1)
|
||||
gc_setColor(1,1,1)
|
||||
end
|
||||
gc.print(missionEnum[L[P.curMission]],85,110)
|
||||
|
||||
@@ -592,7 +593,7 @@ function draw.norm(P)
|
||||
end
|
||||
|
||||
--Draw starting counter
|
||||
gc.setColor(1,1,1)
|
||||
gc_setColor(1,1,1)
|
||||
if GAME.frame<180 then
|
||||
local count=179-GAME.frame
|
||||
gc.push("transform")
|
||||
@@ -614,7 +615,7 @@ function draw.small(P)
|
||||
gc.clear(0,0,0,.4)
|
||||
gc.push("transform")
|
||||
gc.origin()
|
||||
gc.setColor(1,1,1,P.result and max(20-P.endCounter,0)*.05 or 1)
|
||||
gc_setColor(1,1,1,P.result and max(20-P.endCounter,0)*.05 or 1)
|
||||
|
||||
--Field
|
||||
local F=P.field
|
||||
@@ -628,13 +629,13 @@ function draw.small(P)
|
||||
--Draw boarder
|
||||
if P.alive then
|
||||
gc.setLineWidth(2)
|
||||
gc.setColor(frameColorList[P.frameColor])
|
||||
gc.rectangle("line",0,0,60,120)
|
||||
gc_setColor(frameColorList[P.frameColor])
|
||||
gc_rectangle("line",0,0,60,120)
|
||||
end
|
||||
|
||||
--Draw badge
|
||||
if GAME.modeEnv.royaleMode then
|
||||
gc.setColor(1,1,1)
|
||||
gc_setColor(1,1,1)
|
||||
for i=1,P.strength do
|
||||
gc.draw(IMG.badgeIcon,12*i-7,4,nil,.5)
|
||||
end
|
||||
@@ -642,7 +643,7 @@ function draw.small(P)
|
||||
|
||||
--Draw result
|
||||
if P.result then
|
||||
gc.setColor(1,1,1,min(P.endCounter,60)*.01)
|
||||
gc_setColor(1,1,1,min(P.endCounter,60)*.01)
|
||||
setFont(20)mStr(P.result,32,47)
|
||||
setFont(15)mStr(P.modeData.event,30,82)
|
||||
end
|
||||
@@ -651,11 +652,11 @@ function draw.small(P)
|
||||
end
|
||||
|
||||
--Draw Canvas
|
||||
gc.setColor(1,1,1)
|
||||
gc_setColor(1,1,1)
|
||||
gc.draw(P.canvas,P.x,P.y,nil,P.size*10)
|
||||
if P.killMark then
|
||||
gc.setLineWidth(3)
|
||||
gc.setColor(1,0,0,min(P.endCounter,25)*.04)
|
||||
gc_setColor(1,0,0,min(P.endCounter,25)*.04)
|
||||
gc.circle("line",P.centerX,P.centerY,(840-20*min(P.endCounter,30))*P.size)
|
||||
end
|
||||
setFont(30)
|
||||
@@ -674,11 +675,11 @@ function draw.demo(P)
|
||||
gc.translate(P.fieldOff.x,P.fieldOff.y)
|
||||
|
||||
--Frame
|
||||
gc.setColor(0,0,0,.6)
|
||||
gc.rectangle("fill",0,0,300,600)
|
||||
gc_setColor(0,0,0,.6)
|
||||
gc_rectangle("fill",0,0,300,600)
|
||||
gc.setLineWidth(2)
|
||||
gc.setColor(1,1,1)
|
||||
gc.rectangle("line",-1,-1,302,602)
|
||||
gc_setColor(1,1,1)
|
||||
gc_rectangle("line",-1,-1,302,602)
|
||||
|
||||
gc.push("transform")
|
||||
gc.translate(0,600)
|
||||
@@ -702,7 +703,7 @@ function draw.demo(P)
|
||||
while P.holdQueue[N]do
|
||||
local id=P.holdQueue[N].id
|
||||
_=P.color[id]
|
||||
gc.setColor(_[1],_[2],_[3],.3)
|
||||
gc_setColor(_[1],_[2],_[3],.3)
|
||||
_=blockImg[id]
|
||||
gc.draw(_,15,40*N-10,nil,16,nil,0,_:getHeight()*.5)
|
||||
N=N+1
|
||||
@@ -713,7 +714,7 @@ function draw.demo(P)
|
||||
while N<=ENV.nextCount and P.nextQueue[N]do
|
||||
local id=P.nextQueue[N].id
|
||||
_=P.color[id]
|
||||
gc.setColor(_[1],_[2],_[3],.3)
|
||||
gc_setColor(_[1],_[2],_[3],.3)
|
||||
_=blockImg[id]
|
||||
gc.draw(_,285,40*N-10,nil,16,nil,_:getWidth(),_:getHeight()*.5)
|
||||
N=N+1
|
||||
|
||||
@@ -216,7 +216,7 @@ local function loadGameEnv(P)--Load gameEnv
|
||||
end
|
||||
if not ENV.noMod then
|
||||
for _,M in next,GAME.mod do
|
||||
M.func(P,M.list[M.sel])
|
||||
M.func(P,M.list and M.list[M.sel])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6,7 +6,6 @@ local Player={}--Player class
|
||||
|
||||
local int,ceil,rnd=math.floor,math.ceil,math.random
|
||||
local max,min=math.max,math.min
|
||||
local lg=math.log10
|
||||
local ins,rem=table.insert,table.remove
|
||||
local ct=coroutine
|
||||
|
||||
@@ -154,15 +153,13 @@ local function task_movePosition(P,x,y,size)
|
||||
local x1,y1,size1=P.x,P.y,P.size
|
||||
while true do
|
||||
coroutine.yield()
|
||||
local d=((x1-x)^2+(y1-y)^2)^.5
|
||||
if d<.626 then
|
||||
if (x1-x)^2+(y1-y)^2<1 then
|
||||
P:setPosition(x,y,size)
|
||||
return true
|
||||
else
|
||||
d=max(.085-lg(d)*.02,.03)
|
||||
x1=x1+(x-x1)*d
|
||||
y1=y1+(y-y1)*d
|
||||
size1=size1+(size-size1)*d
|
||||
x1=x1+(x-x1)*.126
|
||||
y1=y1+(y-y1)*.126
|
||||
size1=size1+(size-size1)*.126
|
||||
P:setPosition(x1,y1,size1)
|
||||
end
|
||||
end
|
||||
@@ -747,7 +744,7 @@ do--Player.drop(P)--Place piece
|
||||
{300,1200,1700,4000,6000},--I
|
||||
{220,800,2000,3000,8000,26000},--Else
|
||||
}--B2Bmul:1.2/2.0; Mini*=.6
|
||||
local b2bPoint={50,100,180,1000,1200,9999}
|
||||
local b2bPoint={50,100,180,800,1000,9999}
|
||||
|
||||
local b2bATK={3,5,8,12,18}
|
||||
local reAtk={0,0,1,1,1,2,2,3,3}
|
||||
@@ -1052,7 +1049,7 @@ do--Player.drop(P)--Place piece
|
||||
cmb=cmb+1
|
||||
if dospin then
|
||||
cscore=(spinSCR[CB.name]or spinSCR[8])[cc]
|
||||
if P.b2b>1000 then
|
||||
if P.b2b>800 then
|
||||
P:showText(text.b3b..text.block[CB.name]..text.spin.." "..text.clear[cc],0,-30,35,"stretch")
|
||||
atk=b2bATK[cc]+cc*.5
|
||||
exblock=exblock+1
|
||||
@@ -1094,7 +1091,7 @@ do--Player.drop(P)--Place piece
|
||||
end
|
||||
elseif cc>=4 then
|
||||
cscore=cc==4 and 1000 or cc==5 and 1500 or 2000
|
||||
if P.b2b>1000 then
|
||||
if P.b2b>800 then
|
||||
P:showText(text.b3b..text.clear[cc],0,-30,50,"fly")
|
||||
atk=4*cc-10
|
||||
sendTime=100
|
||||
@@ -1134,7 +1131,7 @@ do--Player.drop(P)--Place piece
|
||||
exblock=exblock+2
|
||||
sendTime=sendTime+120
|
||||
if STAT.row+cc>4 then
|
||||
P.b2b=1200
|
||||
P.b2b=1000
|
||||
cscore=cscore+300*min(6+STAT.pc,10)
|
||||
else
|
||||
cscore=cscore+626
|
||||
@@ -1184,7 +1181,7 @@ do--Player.drop(P)--Place piece
|
||||
cscore=cscore+min(50*cmb,500)*(2*cc-1)
|
||||
end
|
||||
|
||||
if P.b2b>1200 then P.b2b=1200 end
|
||||
if P.b2b>1000 then P.b2b=1000 end
|
||||
|
||||
--Bonus atk/def when focused
|
||||
if GAME.modeEnv.royaleMode then
|
||||
@@ -1196,45 +1193,42 @@ do--Player.drop(P)--Place piece
|
||||
end
|
||||
|
||||
--Send Lines
|
||||
atk=int(atk*(1+P.strength*.25))--Badge Buff
|
||||
send=atk
|
||||
if send>0 then
|
||||
if exblock>0 then
|
||||
exblock=int(exblock*(1+P.strength*.25))--Badge Buff
|
||||
P:showText("+"..exblock,0,53,20,"fly")
|
||||
off=off+P:cancel(exblock)
|
||||
end
|
||||
|
||||
send=int(send*(1+P.strength*.25))--Badge Buff
|
||||
if exblock>0 then
|
||||
exblock=int(exblock*(1+P.strength*.25))--Badge Buff
|
||||
P:showText("+"..exblock,0,53,20,"fly")
|
||||
off=off+P:cancel(exblock)
|
||||
end
|
||||
if send>=1 then
|
||||
P:showText(send,0,80,35,"zoomout")
|
||||
_=P:cancel(send)
|
||||
send=send-_
|
||||
off=off+_
|
||||
if send>0 then
|
||||
P:showText(send,0,80,35,"zoomout")
|
||||
_=P:cancel(send)
|
||||
send=send-_
|
||||
off=off+_
|
||||
if send>0 then
|
||||
local T
|
||||
if GAME.modeEnv.royaleMode then
|
||||
if P.atkMode==4 then
|
||||
local M=#P.atker
|
||||
if M>0 then
|
||||
for i=1,M do
|
||||
P:attack(P.atker[i],send,CB.color)
|
||||
end
|
||||
else
|
||||
T=randomTarget(P)
|
||||
local T
|
||||
if GAME.modeEnv.royaleMode then
|
||||
if P.atkMode==4 then
|
||||
local M=#P.atker
|
||||
if M>0 then
|
||||
for i=1,M do
|
||||
P:attack(P.atker[i],send,CB.color)
|
||||
end
|
||||
else
|
||||
T=P.atking
|
||||
P:freshTarget()
|
||||
T=randomTarget(P)
|
||||
end
|
||||
elseif #PLAYERS.alive>1 then
|
||||
T=randomTarget(P)
|
||||
end
|
||||
if T then
|
||||
P:attack(T,send,CB.color)
|
||||
else
|
||||
T=P.atking
|
||||
P:freshTarget()
|
||||
end
|
||||
elseif #PLAYERS.alive>1 then
|
||||
T=randomTarget(P)
|
||||
end
|
||||
if T then
|
||||
P:attack(T,send,CB.color)
|
||||
end
|
||||
if P.sound and send>3 then SFX.play("emit",min(send,7)*.1)end
|
||||
end
|
||||
if P.sound and send>3 then SFX.play("emit",min(send,7)*.1)end
|
||||
end
|
||||
|
||||
--SFX & Vibrate
|
||||
@@ -1258,8 +1252,8 @@ do--Player.drop(P)--Place piece
|
||||
cscore=30
|
||||
end
|
||||
|
||||
if P.b2b>1000 then
|
||||
P.b2b=max(P.b2b-40,1000)
|
||||
if P.b2b>800 then
|
||||
P.b2b=max(P.b2b-40,800)
|
||||
end
|
||||
P:garbageRelease()
|
||||
end
|
||||
@@ -1282,7 +1276,7 @@ do--Player.drop(P)--Place piece
|
||||
|
||||
cscore=int(cscore)
|
||||
if ENV.score then
|
||||
P:showText(cscore,(P.curX+P.sc[2]-5.5)*30,(10-P.curY-P.sc[1])*30+P.fieldBeneath+P.fieldUp,int(8-120/(cscore+20))*5,"score",2)
|
||||
P:showText(cscore,(P.curX+P.sc[2]-5.5)*30,(10-P.curY-P.sc[1])*30+P.fieldBeneath+P.fieldUp,40-600/(cscore+20),"score",2)
|
||||
end
|
||||
|
||||
piece.row,piece.dig=cc,gbcc
|
||||
@@ -1342,7 +1336,9 @@ do--Player.drop(P)--Place piece
|
||||
end
|
||||
if gbcc>0 then
|
||||
STAT.dig=STAT.dig+gbcc
|
||||
STAT.digatk=STAT.digatk+atk*gbcc/cc
|
||||
if atk>0 then
|
||||
STAT.digatk=STAT.digatk+atk*gbcc/cc
|
||||
end
|
||||
end
|
||||
local n=CB.name
|
||||
if dospin then
|
||||
|
||||
@@ -333,8 +333,8 @@ local update={
|
||||
function update.dead(P,dt)
|
||||
if P.keyRec then
|
||||
local S=P.stat
|
||||
P.keySpeed=P.keySpeed*.96+S.key/S.frame*.04
|
||||
P.dropSpeed=P.dropSpeed*.96+S.piece/S.frame*.04
|
||||
P.keySpeed=P.keySpeed*.96+S.key/S.frame*144
|
||||
P.dropSpeed=P.dropSpeed*.96+S.piece/S.frame*144
|
||||
--Final average speeds
|
||||
if GAME.modeEnv.royaleMode then
|
||||
P.swappingAtkMode=min(P.swappingAtkMode+2,30)
|
||||
|
||||
@@ -174,6 +174,23 @@ function scene.update()
|
||||
gc.setCanvas()
|
||||
elseif phase==9 then
|
||||
SKIN.change(SETTING.skinSet)
|
||||
if newVersionLaunch then--Delete old ranks & Unlock modes which should be unlocked
|
||||
for name,rank in next,RANKS do
|
||||
local M=MODES[name]
|
||||
if type(rank)~="number"then
|
||||
RANKS[name]=nil
|
||||
elseif M and M.unlock and rank>0 then
|
||||
for _,unlockName in next,M.unlock do
|
||||
if not RANKS[unlockName]then
|
||||
RANKS[unlockName]=0
|
||||
end
|
||||
end
|
||||
end
|
||||
if not(M and M.score)then
|
||||
RANKS[name]=nil
|
||||
end
|
||||
end
|
||||
end
|
||||
STAT.run=STAT.run+1
|
||||
LOADED=true
|
||||
SFX.play("welcome_sfx")
|
||||
|
||||
@@ -73,8 +73,8 @@ function scene.draw()
|
||||
gc.print(tip,50,660)
|
||||
local L=text.modes[STAT.lastPlay]
|
||||
setFont(25)
|
||||
gc.print(L[1],700,390)
|
||||
gc.print(L[2],700,420)
|
||||
gc.print(L[1],700,230)
|
||||
gc.print(L[2],700,260)
|
||||
PLAYERS[1]:draw()
|
||||
end
|
||||
|
||||
@@ -109,10 +109,10 @@ scene.widgetList={
|
||||
SCN.go("login")
|
||||
end
|
||||
end},
|
||||
WIDGET.newButton{name="custom", x=590,y=220,w=200,h=140,color="lBlue", font=40,code=WIDGET.lnk_goScene("customGame")},
|
||||
WIDGET.newButton{name="qplay", x=590,y=220,w=200,h=140,color="lBlue", font=40,code=function()loadGame(STAT.lastPlay,true)end},
|
||||
WIDGET.newButton{name="setting",x=150,y=380,w=200,h=140,color="lOrange",font=40,code=WIDGET.lnk_goScene("setting_game")},
|
||||
WIDGET.newButton{name="stat", x=370,y=380,w=200,h=140,color="lGreen", font=40,code=WIDGET.lnk_goScene("stat")},
|
||||
WIDGET.newButton{name="qplay", x=590,y=380,w=200,h=140,color="white", font=40,code=function()loadGame(STAT.lastPlay,true)end},
|
||||
WIDGET.newButton{name="custom", x=590,y=380,w=200,h=140,color="white", font=40,code=WIDGET.lnk_goScene("customGame")},
|
||||
WIDGET.newButton{name="lang", x=150,y=515,w=200,h=90,color="lYellow", font=40,code=WIDGET.lnk_goScene("lang")},
|
||||
WIDGET.newButton{name="help", x=370,y=515,w=200,h=90,color="dGreen", font=40,code=WIDGET.lnk_goScene("help")},
|
||||
WIDGET.newButton{name="quit", x=590,y=515,w=200,h=90,color="grey", font=40,code=function()VOC.play("bye")SCN.swapTo("quit","slowFade")end},
|
||||
|
||||
@@ -3,10 +3,8 @@ local tc=love.touch
|
||||
local TIME=TIME
|
||||
|
||||
local max,sin=math.max,math.sin
|
||||
local log=math.log
|
||||
|
||||
local SCR=SCR--play/pause
|
||||
|
||||
local SCR=SCR
|
||||
local VK=virtualkey
|
||||
local function onVirtualkey(x,y)
|
||||
local dist,nearest=1e10
|
||||
@@ -24,8 +22,7 @@ local function onVirtualkey(x,y)
|
||||
return nearest
|
||||
end
|
||||
|
||||
local noTouch
|
||||
local noKey
|
||||
local noTouch,noKey
|
||||
|
||||
local scene={}
|
||||
|
||||
@@ -239,7 +236,7 @@ function scene.update(dt)
|
||||
end
|
||||
end
|
||||
end
|
||||
GAME.warnLVL0=log(height-15+P1.atkBuffer.sum*.8)
|
||||
GAME.warnLVL0=math.log(height-15+P1.atkBuffer.sum*.8)
|
||||
end
|
||||
_=GAME.warnLVL
|
||||
if _<GAME.warnLVL0 then
|
||||
@@ -345,7 +342,6 @@ function scene.draw()
|
||||
gc.push("transform")
|
||||
gc.origin()
|
||||
if GAME.warnLVL>0 then
|
||||
gc.setColor(0,0,0,0)
|
||||
SHADER.warning:send("level",GAME.warnLVL)
|
||||
gc.setShader(SHADER.warning)
|
||||
gc.rectangle("fill",0,0,SCR.w,SCR.h)
|
||||
|
||||
@@ -35,8 +35,8 @@ local S=[=[
|
||||
2048 (1next, 固定规则发牌(轮格,移动顺/反方向...))
|
||||
扫雷; 坦克大战
|
||||
打砖块; 速算; 各种计算器小游戏移植
|
||||
录像保存/导出; 按块回放录像; 联网游戏
|
||||
重制菜单UI; 游戏内文档
|
||||
按块回放录像; 联网对战
|
||||
UI重做; 游戏内文档
|
||||
隔断消除; 架空消除; 混合消除; 彩色消除
|
||||
物理hold; 多方块; 自由场地尺寸
|
||||
画图智能画笔; 自定义游戏按各种目标复制数据
|
||||
@@ -45,6 +45,28 @@ local S=[=[
|
||||
特殊控件(虚拟摇杆等); task-Z(新AI); 机器人调试模式
|
||||
热更新; 工程编译到字节码; 超60帧; 跳帧开关
|
||||
|
||||
0.12.9: 修复更新 Fixup Update
|
||||
改动:
|
||||
玩家出场动画加速
|
||||
代码:
|
||||
几处细节调整
|
||||
修复:
|
||||
开局硬降后卡顿
|
||||
|
||||
0.12.8: 皮肤调整 Better Skins
|
||||
改动:
|
||||
攻击力统计算法修改
|
||||
b3b触发点和上限都减小200,变为800和1000
|
||||
新增/删除几个方块皮肤
|
||||
调整部分皮肤亮度
|
||||
代码:
|
||||
尝试让文件读取更安全
|
||||
尝试修正读取老版本存档的错误
|
||||
修复:
|
||||
手机第一次安装永远进不去
|
||||
每次启动游戏统计信息的消除信息必定丢失
|
||||
游戏结束后两个码表显示不正确
|
||||
|
||||
0.12.7: 视野 Sight
|
||||
新增:
|
||||
场地遮挡和场地反转的mod完成
|
||||
|
||||