Compare commits
43 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c60dcb264 | ||
|
|
5ae8f2c5a7 | ||
|
|
86bc261042 | ||
|
|
8680a8175f | ||
|
|
c2d5fd7a90 | ||
|
|
5c382e63b0 | ||
|
|
e3e36d943e | ||
|
|
d15ca6e6d1 | ||
|
|
412248b6d9 | ||
|
|
f89da92b52 | ||
|
|
8a57bdf774 | ||
|
|
cad86487c1 | ||
|
|
1729e1f36d | ||
|
|
4850cdb292 | ||
|
|
f89655e5fa | ||
|
|
6c86a4e48b | ||
|
|
c7bd0e0e03 | ||
|
|
5a355a1d11 | ||
|
|
3bf44819e4 | ||
|
|
27257a40d2 | ||
|
|
4987120713 | ||
|
|
0ca43c0945 | ||
|
|
3eb3dde089 | ||
|
|
a495610f29 | ||
|
|
2506eee0fb | ||
|
|
b13d164ccf | ||
|
|
01bf8bc4a8 | ||
|
|
fe2abf6903 | ||
|
|
f611199fab | ||
|
|
8fffeaca94 | ||
|
|
aa4992469d | ||
|
|
7dd7aec10c | ||
|
|
bfac67fa87 | ||
|
|
06b9dc86d6 | ||
|
|
83253c76e8 | ||
|
|
66f5c30f5a | ||
|
|
da46057666 | ||
|
|
10343559a6 | ||
|
|
e3dd55a102 | ||
|
|
f6154ba46f | ||
|
|
a38e1f201d | ||
|
|
a97fc8b53a | ||
|
|
d0ec3f4139 |
@@ -7,11 +7,12 @@ local BGlist={
|
||||
}
|
||||
local BG={
|
||||
cur="none",
|
||||
init=nil,
|
||||
resize=nil,
|
||||
defaultBG="none",
|
||||
init=false,
|
||||
resize=false,
|
||||
update=NULL,
|
||||
draw=BGlist.none.draw,
|
||||
event=nil,
|
||||
event=false,
|
||||
discard=NULL,
|
||||
}
|
||||
|
||||
@@ -23,7 +24,13 @@ function BG.send(...)
|
||||
BG.event(...)
|
||||
end
|
||||
end
|
||||
function BG.setDefaultBG(bg)
|
||||
defaultBG=bg
|
||||
end
|
||||
function BG.set(background)
|
||||
if not background then
|
||||
background=defaultBG
|
||||
end
|
||||
if background==BG.cur or not SETTING.bg then return end
|
||||
BG.discard()
|
||||
BG.cur=background
|
||||
|
||||
@@ -31,7 +31,7 @@ local ins,rem=table.insert,table.remove
|
||||
local SCR=SCR
|
||||
|
||||
local mx,my,mouseShow=-20,-20,false
|
||||
local touching=nil--First touching ID(userdata)
|
||||
local touching--First touching ID(userdata)
|
||||
local xOy=SCR.xOy
|
||||
joysticks={}
|
||||
|
||||
@@ -146,7 +146,7 @@ function love.touchmoved(id,x,y,dx,dy)
|
||||
else
|
||||
WIDGET.moveCursor(x,y)
|
||||
if not WIDGET.sel then
|
||||
touching=nil
|
||||
touching=false
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -156,9 +156,9 @@ function love.touchreleased(id,x,y)
|
||||
if id==touching then
|
||||
WIDGET.press(x,y)
|
||||
WIDGET.release(x,y)
|
||||
touching=nil
|
||||
touching=false
|
||||
if WIDGET.sel and not WIDGET.sel.keepFocus then
|
||||
WIDGET.sel=nil
|
||||
WIDGET.sel=false
|
||||
end
|
||||
end
|
||||
if SCN.touchUp then SCN.touchUp(id,x,y)end
|
||||
|
||||
@@ -57,8 +57,10 @@ function LANG.init()--Attention, calling this will destory all initializing meth
|
||||
function LANG.set(l)
|
||||
text=langList[l]
|
||||
WIDGET.setLang(text.WidgetText)
|
||||
for _,s in next,drawableTextLoad do
|
||||
drawableText[s]:set(text[s])
|
||||
for k,v in next,drawableText do
|
||||
if text[k]then
|
||||
v:set(text[k])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
local gc=love.graphics
|
||||
local int,min=math.floor,math.min
|
||||
local int,max,min=math.floor,math.max,math.min
|
||||
local ins,rem=table.insert,table.remove
|
||||
|
||||
local debugMesList={}
|
||||
@@ -25,16 +25,14 @@ function LOG.update()
|
||||
end
|
||||
function LOG.draw()
|
||||
if debugMesList[1]then
|
||||
gc.push("transform")
|
||||
local k=SCR.w/SCR.w0
|
||||
setFont(int(4*k)*5)
|
||||
setFont(max(int(4*k)*5,5))
|
||||
for i=1,#debugMesList do
|
||||
local M=debugMesList[i]
|
||||
local t=M.time
|
||||
gc.setColor(M.r,M.g,M.b,M.blink>0 and int(M.blink/3)%2 or min(t/26,1))
|
||||
gc.print(M.text,10+(20-min(t,20))^1.5/4,25*i*k)
|
||||
end
|
||||
gc.pop()
|
||||
end
|
||||
end
|
||||
function LOG.print(text,T,C)--text,type/time,color
|
||||
|
||||
@@ -8,33 +8,33 @@ local SCN={
|
||||
cur="NULL",--Current scene name
|
||||
swapping=false,--If Swapping
|
||||
stat={
|
||||
tar=nil, --Swapping target
|
||||
style=nil, --Swapping style
|
||||
mid=nil, --Loading point
|
||||
time=nil, --Full swap time
|
||||
draw=nil, --Swap draw func
|
||||
tar=false, --Swapping target
|
||||
style=false,--Swapping style
|
||||
mid=false, --Loading point
|
||||
time=false, --Full swap time
|
||||
draw=false, --Swap draw func
|
||||
},
|
||||
stack={"quit","slowFade"},--Scene stack
|
||||
|
||||
scenes=scenes,
|
||||
|
||||
--Events
|
||||
update=nil,
|
||||
draw=nil,
|
||||
mouseClick=nil,
|
||||
touchClick=nil,
|
||||
mouseDown=nil,
|
||||
mouseMove=nil,
|
||||
mouseUp=nil,
|
||||
wheelMoved=nil,
|
||||
touchDown=nil,
|
||||
touchUp=nil,
|
||||
touchMove=nil,
|
||||
keyDown=nil,
|
||||
keyUp=nil,
|
||||
gamepadDown=nil,
|
||||
gamepadUp=nil,
|
||||
socketRead=nil,
|
||||
update=false,
|
||||
draw=false,
|
||||
mouseClick=false,
|
||||
touchClick=false,
|
||||
mouseDown=false,
|
||||
mouseMove=false,
|
||||
mouseUp=false,
|
||||
wheelMoved=false,
|
||||
touchDown=false,
|
||||
touchUp=false,
|
||||
touchMove=false,
|
||||
keyDown=false,
|
||||
keyUp=false,
|
||||
gamepadDown=false,
|
||||
gamepadUp=false,
|
||||
socketRead=false,
|
||||
}--Scene datas, returned
|
||||
|
||||
function SCN.add(name,scene)
|
||||
|
||||
@@ -34,7 +34,9 @@ end
|
||||
function SCR.print()
|
||||
LOG.print("Screen Info:")
|
||||
for k,v in next,SCR do
|
||||
LOG.print(k..": "..v)
|
||||
if type(v)=="number"then
|
||||
LOG.print(k..": "..v)
|
||||
end
|
||||
end
|
||||
end
|
||||
return SCR
|
||||
@@ -1,4 +1,7 @@
|
||||
local gc=love.graphics
|
||||
local gc_getColor,gc_setColor,gc_push,gc_pop,gc_translate,gc_scale,gc_rotate,gc_shear
|
||||
=gc.getColor,gc.setColor,gc.push,gc.pop,gc.translate,gc.scale,gc.rotate,gc.shear
|
||||
|
||||
local int,rnd,rem=math.floor,math.random,table.remove
|
||||
local setFont,mStr=setFont,mStr
|
||||
|
||||
@@ -9,63 +12,63 @@ function textFX.appear(t)
|
||||
mStr(t.text,t.x,t.y-t.font*.7)
|
||||
end
|
||||
function textFX.sudden(t)
|
||||
gc.setColor(1,1,1,1-t.c)
|
||||
gc_setColor(1,1,1,1-t.c)
|
||||
mStr(t.text,t.x,t.y-t.font*.7)
|
||||
end
|
||||
function textFX.fly(t)
|
||||
mStr(t.text,t.x+(t.c-.5)^3*300,t.y-t.font*.7)
|
||||
end
|
||||
function textFX.stretch(t)
|
||||
gc.push("transform")
|
||||
gc.translate(t.x,t.y)
|
||||
if t.c<.3 then gc.scale((.3-t.c)*1.6+1,1)end
|
||||
gc_push("transform")
|
||||
gc_translate(t.x,t.y)
|
||||
if t.c<.3 then gc_scale((.3-t.c)*1.6+1,1)end
|
||||
mStr(t.text,0,-t.font*.7)
|
||||
gc.pop()
|
||||
gc_pop()
|
||||
end
|
||||
function textFX.drive(t)
|
||||
gc.push("transform")
|
||||
gc.translate(t.x,t.y)
|
||||
if t.c<.3 then gc.shear((.3-t.c)*2,0)end
|
||||
gc_push("transform")
|
||||
gc_translate(t.x,t.y)
|
||||
if t.c<.3 then gc_shear((.3-t.c)*2,0)end
|
||||
mStr(t.text,0,-t.font*.7)
|
||||
gc.pop()
|
||||
gc_pop()
|
||||
end
|
||||
function textFX.spin(t)
|
||||
gc.push("transform")
|
||||
gc.translate(t.x,t.y)
|
||||
gc_push("transform")
|
||||
gc_translate(t.x,t.y)
|
||||
if t.c<.3 then
|
||||
gc.rotate((.3-t.c)^2*4)
|
||||
gc_rotate((.3-t.c)^2*4)
|
||||
elseif t.c>.8 then
|
||||
gc.rotate((t.c-.8)^2*-4)
|
||||
gc_rotate((t.c-.8)^2*-4)
|
||||
end
|
||||
mStr(t.text,0,-t.font*.7)
|
||||
gc.pop()
|
||||
gc_pop()
|
||||
end
|
||||
function textFX.flicker(t)
|
||||
local _,_,_,T=gc.getColor()
|
||||
gc.setColor(1,1,1,T*(rnd()+.5))
|
||||
local _,_,_,T=gc_getColor()
|
||||
gc_setColor(1,1,1,T*(rnd()+.5))
|
||||
mStr(t.text,t.x,t.y-t.font*.7)
|
||||
end
|
||||
function textFX.zoomout(t)
|
||||
gc.push("transform")
|
||||
gc_push("transform")
|
||||
local k=t.c^.5*.1+1
|
||||
gc.translate(t.x,t.y)
|
||||
gc.scale(k,k)
|
||||
gc_translate(t.x,t.y)
|
||||
gc_scale(k,k)
|
||||
mStr(t.text,0,-t.font*.7)
|
||||
gc.pop()
|
||||
gc_pop()
|
||||
end
|
||||
function textFX.beat(t)
|
||||
gc.push("transform")
|
||||
gc.translate(t.x,t.y)
|
||||
gc_push("transform")
|
||||
gc_translate(t.x,t.y)
|
||||
if t.c<.3 then
|
||||
local k=1.3-t.c^2/.3
|
||||
gc.scale(k,k)
|
||||
gc_scale(k,k)
|
||||
end
|
||||
mStr(t.text,0,-t.font*.7)
|
||||
gc.pop()
|
||||
gc_pop()
|
||||
end
|
||||
function textFX.score(t)
|
||||
local _,_,_,T=gc.getColor()
|
||||
gc.setColor(1,1,1,T*.5)
|
||||
local _,_,_,T=gc_getColor()
|
||||
gc_setColor(1,1,1,T*.5)
|
||||
mStr(t.text,t.x,t.y-t.font*.7-t.c^.2*50)
|
||||
end
|
||||
|
||||
@@ -117,7 +120,7 @@ function TEXT.draw(list)
|
||||
for i=1,#list do
|
||||
local t=list[i]
|
||||
local p=t.c
|
||||
gc.setColor(1,1,1,p<.2 and p*5 or p<.8 and 1 or 5-p*5)
|
||||
gc_setColor(1,1,1,p<.2 and p*5 or p<.8 and 1 or 5-p*5)
|
||||
setFont(t.font)
|
||||
t:draw()
|
||||
end
|
||||
|
||||
@@ -499,13 +499,13 @@ function WIDGET.newSlider(D)--name,x,y,w[,unit][,smooth][,font][,change],disp,co
|
||||
},
|
||||
|
||||
unit= D.unit or 1,
|
||||
smooth=nil,
|
||||
smooth= false,
|
||||
font= D.font or 30,
|
||||
change= D.change,
|
||||
disp= D.disp,
|
||||
code= D.code,
|
||||
hide= D.hide,
|
||||
show= nil,
|
||||
show= false,
|
||||
}
|
||||
if D.smooth~=nil then
|
||||
_.smooth=D.smooth
|
||||
@@ -534,7 +534,7 @@ local selector={
|
||||
type="selector",
|
||||
ATV=8,--Activating time(0~4)
|
||||
select=0,--Selected item ID
|
||||
selText=nil,--Selected item name
|
||||
selText=false,--Selected item name
|
||||
}
|
||||
function selector:reset()
|
||||
self.ATV=0
|
||||
@@ -787,7 +787,7 @@ function WIDGET.newTextBox(D)--name,x,y,w[,h][,font][,secret][,regex],hide
|
||||
end
|
||||
|
||||
WIDGET.active={}--Table contains all active widgets
|
||||
WIDGET.sel=nil--Selected widget
|
||||
WIDGET.sel=false--Selected widget
|
||||
|
||||
function WIDGET.lnk_BACK() SCN.back()end
|
||||
function WIDGET.lnk_CUSval(k) return function() return CUSTOMENV[k] end end
|
||||
@@ -813,7 +813,7 @@ WIDGET.indexMeta={
|
||||
}
|
||||
function WIDGET.set(list)
|
||||
kb.setTextInput(false)
|
||||
WIDGET.sel=nil
|
||||
WIDGET.sel=false
|
||||
WIDGET.active=list or NONE
|
||||
|
||||
--Reset all widgets
|
||||
@@ -822,6 +822,13 @@ function WIDGET.set(list)
|
||||
list[i]:reset()
|
||||
end
|
||||
end
|
||||
if FESTIVAL=="Xmas"and SCN.cur~="custom_field"then
|
||||
for _,W in next,list do
|
||||
if W.color then
|
||||
W.color=math.random()<.5 and COLOR.red or COLOR.white
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
function WIDGET.setLang(widgetText)
|
||||
for S,L in next,SCN.scenes do
|
||||
@@ -841,7 +848,7 @@ function WIDGET.moveCursor(x,y)
|
||||
end
|
||||
end
|
||||
if WIDGET.sel and not WIDGET.sel.keepFocus then
|
||||
WIDGET.sel=nil
|
||||
WIDGET.sel=false
|
||||
end
|
||||
end
|
||||
function WIDGET.press(x,y)
|
||||
@@ -852,7 +859,7 @@ function WIDGET.press(x,y)
|
||||
elseif W.type=="slider"then
|
||||
WIDGET.drag(x,y)
|
||||
end
|
||||
if W.hide and W.hide()then WIDGET.sel=nil end
|
||||
if W.hide and W.hide()then WIDGET.sel=false end
|
||||
end
|
||||
function WIDGET.drag(x,y)
|
||||
local W=WIDGET.sel
|
||||
@@ -860,7 +867,7 @@ function WIDGET.drag(x,y)
|
||||
if W.type=="slider"then
|
||||
W:drag(x,y)
|
||||
elseif not W:isAbove(x,y)then
|
||||
WIDGET.sel=nil
|
||||
WIDGET.sel=false
|
||||
end
|
||||
end
|
||||
function WIDGET.release(x,y)
|
||||
|
||||
7
conf.lua
7
conf.lua
@@ -1,5 +1,5 @@
|
||||
VERSION_CODE=1209
|
||||
VERSION_NAME="Alpha V0.12.9"
|
||||
VERSION_CODE=1226
|
||||
VERSION_NAME="Alpha V0.12.X"
|
||||
love.setDeprecationOutput(false)
|
||||
function love.conf(t)
|
||||
t.identity="Techmino"--Saving folder
|
||||
@@ -31,8 +31,7 @@ function love.conf(t)
|
||||
|
||||
local M=t.modules
|
||||
M.window,M.system,M.event=true,true,true
|
||||
M.audio,M.sound=true,true
|
||||
M.math,M.data=true,true
|
||||
M.audio,M.sound,M.math,M.data=true,true,true,true
|
||||
M.timer,M.graphics,M.font,M.image=true,true,true,true
|
||||
M.mouse,M.touch,M.keyboard,M.joystick=true,true,true,true
|
||||
M.physics,M.thread,M.video=false,false,false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
一个正确的模式文件应是一个合法lua程序,其必须立刻返回一个table,里面的内容包括:
|
||||
正确的模式文件应当是一个合法lua程序文件,必须返回一个table,里面的内容包括:
|
||||
color:模式的颜色,用于点击地图图标后显示的提示文本
|
||||
env:
|
||||
必选
|
||||
@@ -84,19 +84,19 @@
|
||||
无输出
|
||||
|
||||
score:
|
||||
可选(不填就没有分数保存和计算)
|
||||
可选(不填就没有分数保存和计算)
|
||||
一局打完后要存储的数据
|
||||
输入玩家对象
|
||||
输出游戏结束瞬间返回一个包含直接决定该模式成绩的数据table(会被强制加上date标签)
|
||||
输出游戏结束瞬间返回一个包含直接决定该模式成绩的数据table(会被强制加上date标签)
|
||||
|
||||
scoreDisp:
|
||||
可选(当模式不出现在地图上的时候)
|
||||
可选(模式不出现在地图上的时候不用写)
|
||||
是把score()存起来的table转换为字符串显示出来的函数
|
||||
输入一个成绩table
|
||||
输出一个字符串
|
||||
|
||||
comp:
|
||||
可选(当没有score函数的时候)
|
||||
可选(没有score函数的时候不用写)
|
||||
是成绩table之间对比并排序的规则
|
||||
输入两个成绩table
|
||||
输出[第一个是不是排在第二个前面]的布尔值(可以类比"小于"运算)
|
||||
@@ -137,7 +137,7 @@ return{--返回一个table,你也可以在之前定义一些常量或者函数
|
||||
T<=32.6 and 4 or--A级要求
|
||||
T<=52.6 and 3 or--B级要求
|
||||
T<=92.9 and 2 or--C级要求
|
||||
T<=183 and 1 or--D级要求,是解锁别的模式的最低标准
|
||||
0--打完了40行那成绩就给你记一下
|
||||
T<=183 and 1 or--D级要求,解锁别的模式的最低标准
|
||||
0--记录成绩的最低标准
|
||||
end,
|
||||
}
|
||||
29
main.lua
29
main.lua
@@ -24,7 +24,9 @@ LOADED=false
|
||||
NOGAME=false
|
||||
LOGIN=false
|
||||
EDITING=""
|
||||
WSCONN=nil
|
||||
WSCONN=false
|
||||
FESTIVAL=
|
||||
os.date"%m"=="12"and math.abs(os.date"%d"-25)<4 and"Xmas"
|
||||
|
||||
math.randomseed(os.time()*626)
|
||||
love.keyboard.setKeyRepeat(true)
|
||||
@@ -90,7 +92,6 @@ require"parts/gametoolfunc"
|
||||
SCR.setSize(1280,720)--Initialize Screen size
|
||||
FIELD[1]=newBoard()--Initialize field[1]
|
||||
|
||||
BLOCKS= require"parts/mino"
|
||||
AIBUILDER= require"parts/AITemplate"
|
||||
FREEROW= require"parts/freeRow"
|
||||
|
||||
@@ -141,7 +142,9 @@ SKIN.init{
|
||||
"PolkaDots(ScF)",
|
||||
"Smooth(MrZ)",
|
||||
"Glass(ScF)",
|
||||
"Pentagon(ScF)",
|
||||
"Penta(ScF)",
|
||||
"Bubble(ScF)",
|
||||
"Shape(ScF)",
|
||||
"Pure(MrZ)",
|
||||
"Glow(MrZ)",
|
||||
"Plastic(MrZ)",
|
||||
@@ -161,12 +164,12 @@ SKIN.init{
|
||||
SFX.init{
|
||||
--Stereo sfxs(cannot set position)
|
||||
"welcome_sfx",
|
||||
"click","enter",
|
||||
"button","click","enter",
|
||||
"finesseError","finesseError_long",
|
||||
|
||||
--Mono sfxs
|
||||
"virtualKey",
|
||||
"button","swipe",
|
||||
"swipe",
|
||||
"ready","start","win","fail","collect",
|
||||
"spawn_1","spawn_2","spawn_3","spawn_4","spawn_5","spawn_6","spawn_7",
|
||||
"move","rotate","rotatekick","hold",
|
||||
@@ -194,7 +197,6 @@ BGM.init{
|
||||
"new era",--bigbang, survivor-1, tech-normal
|
||||
"oxygen",--c4w/pc train
|
||||
"truth",--pc challenge
|
||||
"sugar fairy",--classic2
|
||||
|
||||
"distortion",--master-3
|
||||
"far",--GM
|
||||
@@ -202,8 +204,10 @@ BGM.init{
|
||||
"storm",--defender, survivor-4/5
|
||||
"down",--dig, tech-hard/lunatic
|
||||
|
||||
"rockblock",--classic, 49/99
|
||||
"sugar fairy","rockblock","magicblock",--classic, 49/99
|
||||
"cruelty","final","8-bit happiness","end","how feeling",--49/99
|
||||
|
||||
"mXmas",--Festival: Xmas
|
||||
}
|
||||
VOC.init{
|
||||
"zspin","sspin","lspin","jspin","tspin","ospin","ispin",
|
||||
@@ -234,7 +238,8 @@ LANG.setPublicText{
|
||||
"Z","S","J","L","T","O","I",
|
||||
"Z5","S5","Q","P","F","E",
|
||||
"T5","U","V","W","X",
|
||||
"J5","L5","R","Y","N","H","I5"
|
||||
"J5","L5","R","Y","N","H","I5",
|
||||
"I3","C","I2","O1"
|
||||
},
|
||||
}
|
||||
LANG.setPublicWidgetText{
|
||||
@@ -364,10 +369,14 @@ do
|
||||
if S.version<1208 then
|
||||
SETTING.skinSet=1
|
||||
end
|
||||
if S.version<1225 then
|
||||
SETTING.skin={1,7,11,3,14,4,9,1,7,2,6,10,2,13,5,9,15,10,11,3,12,2,16,8,4,10,13,2,8}
|
||||
end
|
||||
newVersionLaunch=true
|
||||
|
||||
S.version=VERSION_CODE
|
||||
FILE.save(RANKS,"conf/unlock","q")
|
||||
FILE.save(STAT,"conf/data")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
BG.setDefaultBG(FESTIVAL=="Xmas"and"snow"or"space")
|
||||
BIN
media/BGM/mXmas.ogg
Normal file
BIN
media/BGM/mXmas.ogg
Normal file
Binary file not shown.
BIN
media/BGM/magicblock.ogg
Normal file
BIN
media/BGM/magicblock.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
media/image/skin/Bubble(ScF).png
Normal file
BIN
media/image/skin/Bubble(ScF).png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
BIN
media/image/skin/Penta(ScF).png
Normal file
BIN
media/image/skin/Penta(ScF).png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.2 KiB |
BIN
media/image/skin/Shape(ScF).png
Normal file
BIN
media/image/skin/Shape(ScF).png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
@@ -51,6 +51,6 @@ function back.draw()
|
||||
gc.pop()
|
||||
end
|
||||
function back.discard()
|
||||
video=nil
|
||||
video=false
|
||||
end
|
||||
return back
|
||||
@@ -70,6 +70,6 @@ function back.draw()
|
||||
gc.pop()
|
||||
end
|
||||
function back.discard()
|
||||
petal=nil
|
||||
petal=false
|
||||
end
|
||||
return back
|
||||
54
parts/backgrounds/snow.lua
Normal file
54
parts/backgrounds/snow.lua
Normal file
@@ -0,0 +1,54 @@
|
||||
--Snow
|
||||
local gc=love.graphics
|
||||
local rnd=math.random
|
||||
local max,min=math.max,math.min
|
||||
local ins,rem=table.insert,table.remove
|
||||
local back={}
|
||||
|
||||
local t
|
||||
local snow
|
||||
function back.init()
|
||||
t=0
|
||||
snow={}
|
||||
BG.resize()
|
||||
end
|
||||
function back.update()
|
||||
t=t+1
|
||||
if t%(t%626>260 and 3 or 6)==0 then
|
||||
ins(snow,{
|
||||
x=SCR.w*rnd(),
|
||||
y=0,
|
||||
vy=1+rnd()*.6,
|
||||
vx=rnd()*2-.5,
|
||||
rx=2+rnd()*2,
|
||||
ry=2+rnd()*2,
|
||||
})
|
||||
end
|
||||
for i=#snow,1,-1 do
|
||||
local P=snow[i]
|
||||
P.y=P.y+P.vy
|
||||
if P.y>SCR.h then
|
||||
rem(snow,i)
|
||||
else
|
||||
P.x=P.x+P.vx
|
||||
P.vx=P.vx-.02+rnd()*.04
|
||||
P.rx=max(min(P.rx+rnd()-.5,4),2)
|
||||
P.ry=max(min(P.ry+rnd()-.5,5),3)
|
||||
end
|
||||
end
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.2,.2,.2)
|
||||
gc.push("transform")
|
||||
gc.setColor(.7,.7,.7)
|
||||
gc.origin()
|
||||
for i=1,#snow do
|
||||
local P=snow[i]
|
||||
gc.ellipse("fill",P.x,P.y,P.rx,P.ry)
|
||||
end
|
||||
gc.pop()
|
||||
end
|
||||
function back.discard()
|
||||
snow=false
|
||||
end
|
||||
return back
|
||||
@@ -43,6 +43,6 @@ function back.draw()
|
||||
gc.translate(10,10)
|
||||
end
|
||||
function back.discard()
|
||||
stars=nil
|
||||
stars=false
|
||||
end
|
||||
return back
|
||||
@@ -38,6 +38,6 @@ function back.draw()
|
||||
end
|
||||
end
|
||||
function back.discard()
|
||||
ring=nil
|
||||
ring=false
|
||||
end
|
||||
return back
|
||||
@@ -68,6 +68,6 @@ function back.event(level)
|
||||
end
|
||||
end
|
||||
function back.discard()
|
||||
bar,crystal=nil
|
||||
bar,crystal=false,false
|
||||
end
|
||||
return back
|
||||
@@ -44,7 +44,7 @@ function destroyPlayers()
|
||||
CC.free(P.bot_opt)
|
||||
CC.free(P.bot_wei)
|
||||
CC.destroy(P.AI_bot)
|
||||
P.AI_mode=nil
|
||||
P.AI_mode=false
|
||||
end
|
||||
PLAYERS[i]=nil
|
||||
end
|
||||
@@ -137,7 +137,7 @@ function pasteSequence(str)
|
||||
for _=1,b-32 do
|
||||
ins(bag,reg)
|
||||
end
|
||||
reg=nil
|
||||
reg=false
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -293,7 +293,7 @@ function pasteMission(str)
|
||||
for _=1,b-113 do
|
||||
ins(mission,reg)
|
||||
end
|
||||
reg=nil
|
||||
reg=false
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -356,7 +356,7 @@ function randomTarget(P)--Return a random opponent for P
|
||||
end
|
||||
end
|
||||
function freshMostDangerous()
|
||||
GAME.mostDangerous,GAME.secDangerous=nil
|
||||
GAME.mostDangerous,GAME.secDangerous=false,false
|
||||
local m,m2=0,0
|
||||
for i=1,#PLAYERS.alive do
|
||||
local h=#PLAYERS.alive[i].field
|
||||
@@ -376,7 +376,7 @@ function freshMostDangerous()
|
||||
end
|
||||
end
|
||||
function freshMostBadge()
|
||||
GAME.mostBadge,GAME.secBadge=nil
|
||||
GAME.mostBadge,GAME.secBadge=false,false
|
||||
local m,m2=0,0
|
||||
for i=1,#PLAYERS.alive do
|
||||
local P=PLAYERS.alive[i]
|
||||
@@ -430,7 +430,7 @@ function royaleLevelup()
|
||||
local P=PLAYERS.alive[i]
|
||||
P.gameEnv.drop=int(P.gameEnv.drop*.3)
|
||||
if P.gameEnv.drop==0 then
|
||||
P.curY=P.imgY
|
||||
P.curY=P.ghoY
|
||||
P:set20G(true)
|
||||
end
|
||||
end
|
||||
@@ -485,40 +485,39 @@ function loadGame(M,ifQuickPlay)--Load a mode and go to game scene
|
||||
SFX.play("enter")
|
||||
end
|
||||
end
|
||||
function initPlayerPosition()--Set initial position for every player
|
||||
function initPlayerPosition(sudden)--Set initial position for every player
|
||||
local L=PLAYERS.alive
|
||||
local y=#L<=5 and 360 or -62
|
||||
for i=1,#L do
|
||||
L[i]:setPosition(640,y,0)
|
||||
if not sudden then
|
||||
for i=1,#L do
|
||||
L[i]:setPosition(640,#L<=5 and 360 or -62,0)
|
||||
end
|
||||
end
|
||||
resetPlayerPosition()
|
||||
end
|
||||
function resetPlayerPosition()--Set position & size for every player
|
||||
local L=PLAYERS.alive
|
||||
L[1]:movePosition(340,75,1)
|
||||
|
||||
local method=sudden and"setPosition"or"movePosition"
|
||||
L[1][method](L[1],340,75,1)
|
||||
if #L<=5 then
|
||||
if L[2]then L[2]:movePosition(965,390,.5)end
|
||||
if L[3]then L[3]:movePosition(965,30,.5)end
|
||||
if L[4]then L[4]:movePosition(20,390,.5)end
|
||||
if L[5]then L[5]:movePosition(20,30,.5)end
|
||||
if L[2]then L[2][method](L[2],965,390,.5)end
|
||||
if L[3]then L[3][method](L[3],965,30,.5)end
|
||||
if L[4]then L[4][method](L[4],20,390,.5)end
|
||||
if L[5]then L[5][method](L[5],20,30,.5)end
|
||||
elseif #L==49 then
|
||||
local n=2
|
||||
for i=1,4 do for j=1,6 do
|
||||
L[n]:movePosition(78*i-54,115*j-98,.09)
|
||||
L[n][method](L[n],78*i-54,115*j-98,.09)
|
||||
n=n+1
|
||||
end end
|
||||
for i=9,12 do for j=1,6 do
|
||||
L[n]:movePosition(78*i+267,115*j-98,.09)
|
||||
L[n][method](L[n],78*i+267,115*j-98,.09)
|
||||
n=n+1
|
||||
end end
|
||||
elseif #L==99 then
|
||||
local n=2
|
||||
for i=1,7 do for j=1,7 do
|
||||
L[n]:movePosition(46*i-36,97*j-72,.068)
|
||||
L[n][method](L[n],46*i-36,97*j-72,.068)
|
||||
n=n+1
|
||||
end end
|
||||
for i=15,21 do for j=1,7 do
|
||||
L[n]:movePosition(46*i+264,97*j-72,.068)
|
||||
L[n][method](L[n],46*i+264,97*j-72,.068)
|
||||
n=n+1
|
||||
end end
|
||||
end
|
||||
@@ -538,7 +537,8 @@ local function tick_showMods()
|
||||
end
|
||||
end
|
||||
end
|
||||
function resetGameData(replaying)
|
||||
function resetGameData(args)
|
||||
if not args then args=""end
|
||||
if PLAYERS[1]and not GAME.replaying and(GAME.frame>400 or GAME.result)then
|
||||
mergeStat(STAT,PLAYERS[1].stat)
|
||||
STAT.todayTime=STAT.todayTime+PLAYERS[1].stat.time
|
||||
@@ -547,7 +547,7 @@ function resetGameData(replaying)
|
||||
GAME.result=false
|
||||
GAME.warnLVL0=0
|
||||
GAME.warnLVL=0
|
||||
if replaying then
|
||||
if args:find("r")then
|
||||
GAME.frame=0
|
||||
GAME.recording=false
|
||||
GAME.replaying=1
|
||||
@@ -567,7 +567,7 @@ function resetGameData(replaying)
|
||||
|
||||
destroyPlayers()
|
||||
GAME.curMode.load()
|
||||
initPlayerPosition()
|
||||
initPlayerPosition(args:find("q"))
|
||||
restoreVirtualKey()
|
||||
if GAME.modeEnv.task then
|
||||
for i=1,#PLAYERS do
|
||||
@@ -582,11 +582,11 @@ function resetGameData(replaying)
|
||||
for i=1,#PLAYERS do
|
||||
PLAYERS[i]:changeAtk(randomTarget(PLAYERS[i]))
|
||||
end
|
||||
GAME.stage=nil
|
||||
GAME.mostBadge=nil
|
||||
GAME.secBadge=nil
|
||||
GAME.mostDangerous=nil
|
||||
GAME.secDangerous=nil
|
||||
GAME.stage=false
|
||||
GAME.mostBadge=false
|
||||
GAME.secBadge=false
|
||||
GAME.mostDangerous=false
|
||||
GAME.secDangerous=false
|
||||
GAME.stage=1
|
||||
end
|
||||
STAT.game=STAT.game+1
|
||||
|
||||
@@ -206,42 +206,42 @@ GAME={--Global game data
|
||||
|
||||
frame=0, --Frame count
|
||||
result=false, --Game result (string)
|
||||
rank=nil, --Rank reached
|
||||
rank=false, --Rank reached
|
||||
pauseTime=0, --Time paused
|
||||
pauseCount=0, --Pausing count
|
||||
warnLVL0=0, --Warning level
|
||||
warnLVL=0, --Warning level (show)
|
||||
|
||||
seed=1046101471, --Game seed
|
||||
curMode=nil, --Current gamemode object
|
||||
curMode=false, --Current gamemode object
|
||||
mod={}, --List of loaded mods
|
||||
modeEnv=nil, --Current gamemode environment
|
||||
modeEnv=false, --Current gamemode environment
|
||||
setting={}, --Game settings
|
||||
rep={}, --Recording list, key,time,key,time...
|
||||
recording=false, --If recording
|
||||
replaying=false, --If replaying
|
||||
saved=false, --If recording saved
|
||||
|
||||
prevBG=nil, --Previous background, for restore BG when quit setting page
|
||||
prevBG=false, --Previous background, for restore BG when quit setting page
|
||||
|
||||
--Data for royale mode
|
||||
stage=nil, --Game stage
|
||||
mostBadge=nil, --Most badge owner
|
||||
secBadge=nil, --Second badge owner
|
||||
mostDangerous=nil, --Most dangerous player
|
||||
secDangerous=nil, --Second dangerous player
|
||||
stage=false, --Game stage
|
||||
mostBadge=false, --Most badge owner
|
||||
secBadge=false, --Second badge owner
|
||||
mostDangerous=false,--Most dangerous player
|
||||
secDangerous=false, --Second dangerous player
|
||||
}
|
||||
|
||||
--Userdata tables
|
||||
RANKS=FILE.load("conf/unlock")or{sprint_10=0}--Ranks of modes
|
||||
USER=FILE.load("conf/user")or{--User infomation
|
||||
email=nil,
|
||||
auth_token=nil,
|
||||
access_token=nil,
|
||||
email=false,
|
||||
auth_token=false,
|
||||
access_token=false,
|
||||
|
||||
username=nil,
|
||||
motto=nil,
|
||||
avatar=nil,
|
||||
username=false,
|
||||
motto=false,
|
||||
avatar=false,
|
||||
xp=0,lv=1,
|
||||
}
|
||||
SETTING={--Settings
|
||||
@@ -259,8 +259,12 @@ SETTING={--Settings
|
||||
appLock=false,
|
||||
lang=1,
|
||||
skinSet=1,
|
||||
skin={1,7,11,3,14,4,9,1,7,1,7,11,3,14,4,9,14,9,11,3,11,3,1,7,4},
|
||||
face={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
||||
skin={
|
||||
1,7,11,3,14,4,9,
|
||||
1,7,2,6,10,2,13,5,9,15,10,11,3,12,2,16,8,4,
|
||||
10,13,2,8
|
||||
},
|
||||
face={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
||||
|
||||
--Graphic
|
||||
block=true,ghost=.3,center=1,
|
||||
@@ -319,9 +323,9 @@ else
|
||||
clear={},spin={},
|
||||
pc=0,hpc=0,b2b=0,b3b=0,score=0,
|
||||
lastPlay="sprint_10",--Last played mode ID
|
||||
date=nil,
|
||||
date=false,
|
||||
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
|
||||
}for i=1,29 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"},{},
|
||||
|
||||
@@ -1,17 +1,28 @@
|
||||
local zero={0,0}
|
||||
local noKick,noKick_180 do
|
||||
local noKick,noKick_180,pushZero do
|
||||
local zero={0,0}
|
||||
local Zero={zero}
|
||||
noKick={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero}
|
||||
noKick_180={[01]=Zero,[10]=Zero,[03]=Zero,[30]=Zero,[12]=Zero,[21]=Zero,[32]=Zero,[23]=Zero,[02]=Zero,[20]=Zero,[13]=Zero,[31]=Zero}
|
||||
function pushZero(t)
|
||||
for _,L in next,t do
|
||||
if type(L)=="table"then
|
||||
for _,v in next,L do
|
||||
table.insert(v,1,zero)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local map={}
|
||||
for x=-3,3 do map[x]={}for y=-3,3 do map[x][y]={x,y}end end
|
||||
local function collect(T)--Make all vec point to the same vec
|
||||
if type(T)=="table"then
|
||||
for _,t in next,T do
|
||||
for k,vec in next,t do
|
||||
t[k]=map[vec[1]][vec[2]]
|
||||
local collect do
|
||||
local map={}
|
||||
for x=-3,3 do map[x]={}for y=-3,3 do map[x][y]={x,y}end end
|
||||
function collect(T)--Make all vec point to the same vec
|
||||
if type(T)=="table"then
|
||||
for _,t in next,T do
|
||||
for k,vec in next,t do
|
||||
t[k]=map[vec[1]][vec[2]]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -45,15 +56,6 @@ local function reflect(a)
|
||||
b[13]=flipList(a[31])
|
||||
return b
|
||||
end
|
||||
local function pushZero(t)
|
||||
for _,L in next,t do
|
||||
if type(L)=="table"then
|
||||
for _,v in next,L do
|
||||
table.insert(v,1,zero)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local TRS
|
||||
do
|
||||
@@ -122,11 +124,11 @@ do
|
||||
if P.type=="human"then SFX.fieldPlay("rotate",nil,P)end
|
||||
if not P.gameEnv.ospin then return end
|
||||
local x,y=P.curX,P.curY
|
||||
if y==P.imgY and((P:solid(x-1,y)or P:solid(x-1,y+1)))and(P:solid(x+2,y)or P:solid(x+2,y+1))then
|
||||
if y==P.ghoY and((P:solid(x-1,y)or P:solid(x-1,y+1)))and(P:solid(x+2,y)or P:solid(x+2,y+1))then
|
||||
local D=P.spinSeq%100*10+d
|
||||
P.spinSeq=D
|
||||
if D<100 then
|
||||
P:freshBlock(true,true)
|
||||
P:freshBlock("fresh")
|
||||
return
|
||||
end
|
||||
for i=1,#OspinList do
|
||||
@@ -144,7 +146,7 @@ do
|
||||
P.dir,P.sc=dir,spinCenters[id][dir]
|
||||
P.spinLast=2
|
||||
P.stat.rotate=P.stat.rotate+1
|
||||
P:freshBlock(false,true)
|
||||
P:freshBlock("move")
|
||||
P.spinSeq=0
|
||||
SFX.fieldPlay("rotatekick",nil,P)
|
||||
return
|
||||
@@ -153,7 +155,7 @@ do
|
||||
end
|
||||
else
|
||||
P.spinSeq=0
|
||||
P:freshBlock(true,true)
|
||||
P:freshBlock("fresh")
|
||||
end
|
||||
end,--O
|
||||
{
|
||||
@@ -271,12 +273,12 @@ do
|
||||
if not P:ifoverlap(P.cur.bk,x,y)then
|
||||
P.curX,P.curY=x,y
|
||||
P.spinLast=1
|
||||
P:freshBlock(false,true)
|
||||
P:freshBlock("move")
|
||||
P.stat.rotate=P.stat.rotate+1
|
||||
return
|
||||
end
|
||||
end
|
||||
P:freshBlock(true,true)
|
||||
P:freshBlock("fresh")
|
||||
end,--X
|
||||
{
|
||||
[01]={{-1, 0},{-1, 1},{ 0,-3},{-1, 1},{-1, 2},{ 0, 1}},
|
||||
@@ -329,6 +331,43 @@ do
|
||||
[03]={{-1,-1},{-1, 0},{-1, 1},{-0, 1},{ 1, 1},{ 1, 0},{ 1,-1},{-0,-1},{-0,-2},{ 2,-1},{ 2,-2},{-2, 0},{-2,-1},{-2,-2},{-1, 2},{-2, 2},{ 1, 2},{ 2, 2}},
|
||||
[30]={{ 1, 0},{ 1,-1},{-0,-1},{-1,-1},{ 2,-2},{ 2,-1},{ 2, 0},{ 1,-2},{-0,-2},{-1,-2},{-2,-2},{ 1, 1},{ 2, 1},{ 2, 2},{-1, 0},{-2, 0},{-2,-1},{ 0, 1},{-1,-1},{-2,-2}},
|
||||
},--I5
|
||||
{
|
||||
[01]={{-1, 0},{-1,-1},{ 1, 1},{-1, 1}},
|
||||
[10]={{-1, 0},{ 1, 0},{-1,-1},{ 1, 1}},
|
||||
[03]={{ 1, 0},{ 1,-1},{-1, 1},{ 1, 1}},
|
||||
[30]={{ 1, 0},{-1, 0},{ 1,-1},{-1, 1}},
|
||||
},--I3
|
||||
{
|
||||
[01]={{-1, 0},{ 1, 0}},
|
||||
[10]={{ 1, 0},{-1, 0}},
|
||||
[03]={{ 0, 1},{ 0,-1}},
|
||||
[30]={{ 0,-1},{ 0, 1}},
|
||||
[12]={{ 0, 1},{ 0,-1}},
|
||||
[21]={{ 0,-1},{ 0, 1}},
|
||||
[32]={{-1, 0},{ 1, 0}},
|
||||
[23]={{ 1, 0},{-1, 0}},
|
||||
[02]={{ 0,-1},{ 1,-1},{-1,-1}},
|
||||
[20]={{ 0, 1},{-1, 1},{ 1, 1}},
|
||||
[13]={{ 0,-1},{-1,-1},{ 1,-1}},
|
||||
[31]={{ 0, 1},{ 1, 1},{-1, 1}},
|
||||
},--C
|
||||
{
|
||||
[01]={{-1, 0},{ 0, 1}},
|
||||
[10]={{ 1, 0},{ 0, 1}},
|
||||
[03]={{ 1, 0},{ 0, 1}},
|
||||
[30]={{-1, 0},{ 0, 1}},
|
||||
[12]={{ 1, 0},{ 0, 2}},
|
||||
[21]={{ 0,-1},{-1, 0}},
|
||||
[32]={{-1, 0},{ 0, 2}},
|
||||
[23]={{ 0,-1},{-1, 0}},
|
||||
[02]={{ 0,-1},{ 0, 1}},
|
||||
[20]={{ 0, 1},{ 0,-1}},
|
||||
[13]={{-1, 0},{ 1, 0}},
|
||||
[31]={{ 1, 0},{-1, 0}},
|
||||
},--I2
|
||||
{
|
||||
[01]={},[10]={},[03]={},[30]={},
|
||||
},--O1
|
||||
}
|
||||
TRS[2]= reflect(TRS[1])--SZ
|
||||
TRS[4]= reflect(TRS[3])--LJ
|
||||
@@ -338,10 +377,9 @@ do
|
||||
TRS[20]=reflect(TRS[19])--L5J5
|
||||
TRS[22]=reflect(TRS[21])--RY
|
||||
TRS[24]=reflect(TRS[23])--HN
|
||||
C_sym(TRS[8])
|
||||
C_sym(TRS[9])
|
||||
C_sym(TRS[25])
|
||||
for i=1,25 do collect(TRS[i])end
|
||||
C_sym(TRS[8])C_sym(TRS[9])
|
||||
C_sym(TRS[25])C_sym(TRS[26])C_sym(TRS[29])
|
||||
for i=1,29 do collect(TRS[i])end
|
||||
pushZero(TRS)
|
||||
end
|
||||
|
||||
@@ -380,7 +418,7 @@ do
|
||||
collect(SRS[7])
|
||||
pushZero(SRS)
|
||||
for i=2,5 do SRS[i]=SRS[1]end
|
||||
for i=8,25 do SRS[i]=SRS[1]end
|
||||
for i=8,29 do SRS[i]=SRS[1]end
|
||||
end
|
||||
|
||||
local C2
|
||||
@@ -394,7 +432,7 @@ do
|
||||
}
|
||||
}
|
||||
collect(C2[1])
|
||||
for i=2,25 do C2[i]=C2[1]end
|
||||
for i=2,29 do C2[i]=C2[1]end
|
||||
end
|
||||
|
||||
local C2sym
|
||||
@@ -417,6 +455,7 @@ do
|
||||
Z,--T
|
||||
noKick,--O
|
||||
Z,--I
|
||||
|
||||
Z,S,--Z5,S5
|
||||
Z,S,--P,Q
|
||||
Z,S,--F,E
|
||||
@@ -425,14 +464,17 @@ do
|
||||
Z,S,--J5,L5
|
||||
Z,S,--R,Y
|
||||
Z,S,--N,H
|
||||
|
||||
Z,Z,--I3,C
|
||||
Z,Z,--I2,O1
|
||||
}
|
||||
end
|
||||
|
||||
local Classic={}
|
||||
for i=1,25 do Classic[i]=noKick end
|
||||
for i=1,29 do Classic[i]=noKick end
|
||||
|
||||
local None={}
|
||||
for i=1,25 do None[i]=noKick_180 end
|
||||
for i=1,29 do None[i]=noKick_180 end
|
||||
|
||||
return{
|
||||
TRS=TRS,
|
||||
|
||||
@@ -98,6 +98,8 @@ return{
|
||||
chatHistory="------New messages below------",
|
||||
chatQuit="Press again to exit",
|
||||
|
||||
roomsFetchFailed="Failed to fetch rooms",
|
||||
|
||||
errorMsg="An error has occurred and Techmino needs to restart.\nError info has been created, and you can send it to the author.",
|
||||
|
||||
modInstruction="Select mods (modifiers) to use!\nMods will modify the game in different ways\n(and possibly break the game in weird ways).\nSome mods will make your game unranked.",
|
||||
@@ -241,7 +243,7 @@ return{
|
||||
restart="Retry (R)",
|
||||
quit="Quit (Q)",
|
||||
},
|
||||
netgame={
|
||||
net_menumenu={
|
||||
ffa="FFA",
|
||||
rooms="Rooms",
|
||||
chat="Chat",
|
||||
@@ -442,16 +444,10 @@ return{
|
||||
|
||||
sequence="Sequence",
|
||||
|
||||
Z="Z",S="S",J="J",L="L",T="T",O="O",I="I",
|
||||
Z5="Z5",S5="S5",P="P",Q="Q",F="F",E="E",T5="T5",U="U",
|
||||
V="V",W="W",X="X",J5="J5",L5="L5",R="R",Y="Y",N="N",H="H",I5="I5",
|
||||
left="←",
|
||||
right="→",
|
||||
ten="→→",
|
||||
backsp="<X",
|
||||
reset="R",
|
||||
copy="Copy",
|
||||
paste="Paste",
|
||||
Z="Z",S="S",J="J",L="L",T="T",O="O",I="I",left="←",right="→",ten="→→",backsp="<X",reset="Reset",
|
||||
Z5="Z5",S5="S5",P="P",Q="Q",F="F",E="E",T5="T5",U="U",I3="I3",C="C",rnd="Rand",
|
||||
V="V",W="W",X="X",J5="J5",L5="L5",R="R",Y="Y",N="N",H="H",I5="I5",I2="I2",O1="O1",
|
||||
copy="Copy",paste="Paste",
|
||||
},
|
||||
custom_mission={
|
||||
title="Custom Game",
|
||||
|
||||
@@ -6,9 +6,9 @@ return{
|
||||
httpTimeout="La connexion au réseau ne s'est pas faite à temps.",
|
||||
marking="Créateur du jeu: MrZ_26\nSi vous pouvez voir ceci, cet enregistrement est illégal\nToute explication est fausse et invalide.",
|
||||
holdR="Hold to restart",
|
||||
-- newDay="新的一天,新的开始~",
|
||||
-- playedLong="已经玩很久了!注意休息!",
|
||||
-- playedTooMuch="今天玩太久啦!打块好玩但也要适可而止哦~",
|
||||
-- newDay="[Anti-addiction] New day, new beginning!",
|
||||
-- playedLong="[Anti-addiction] You've been playing quite a bit today. Make sure to take breaks.",
|
||||
-- playedTooMuch="[Anti-addiction] You've been playing too much today! You can't play any more.",
|
||||
|
||||
atkModeName={"Aléatoire","Badges","K.O.s faciles","Attaquants"},
|
||||
royale_remain="$1 Joueurs restants",
|
||||
@@ -89,17 +89,19 @@ return{
|
||||
-- loginFailed="Login failed",
|
||||
-- accessSuccessed="Successfully authorized!",
|
||||
-- accessFailed="Authorization failed",
|
||||
-- wsSuccessed="WS连接成功",
|
||||
-- wsFailed="WS连接失败",
|
||||
-- wsDisconnected="WS连接断开",
|
||||
-- wsNoConn="WS未连接",
|
||||
-- wsSuccessed="WebSocket: connected",
|
||||
-- wsFailed="WebSocket: connection failed",
|
||||
-- wsDisconnected="WebSocket: disconnected",
|
||||
-- wsNoConn="WebSocket: you are not connected",
|
||||
|
||||
-- chatJoin="进入房间",
|
||||
-- chatLeave="离开房间",
|
||||
-- chatRemain="人数:",
|
||||
-- chatStart="------消息的开头------",
|
||||
-- chatHistory="------以上是历史消息------",
|
||||
-- chatQuit="再按一次退出",
|
||||
-- chatJoin="joined the room.",
|
||||
-- chatLeave="left the room.",
|
||||
-- chatRemain="Online: ",
|
||||
-- chatStart="------Beginning of log------",
|
||||
-- chatHistory="------New messages below------",
|
||||
-- chatQuit="Press again to exit",
|
||||
|
||||
-- roomsFetchFailed="Failed to fetch rooms",
|
||||
|
||||
errorMsg="Une erreur est survenue et Techmino doit redémarrer.\nDes informations concernant l'erreur ont été créées, et vous pouvez les envoyer au créateur.",
|
||||
|
||||
@@ -220,7 +222,7 @@ return{
|
||||
restart="Réessayer (R)",
|
||||
quit="Quitter (Q)",
|
||||
},
|
||||
netgame={
|
||||
net_menumenu={
|
||||
-- ffa="FFA",
|
||||
-- rooms="Rooms",
|
||||
-- chat="Chat",
|
||||
@@ -421,15 +423,8 @@ return{
|
||||
subTitle="Séquence",
|
||||
|
||||
sequence="Séquence",
|
||||
|
||||
Z="Z",S="S",J="J",L="L",T="T",O="O",I="I",
|
||||
Z5="Z5",S5="S5",P="P",Q="Q",F="F",E="E",T5="T5",U="U",
|
||||
V="V",W="W",X="X",J5="J5",L5="L5",R="R",Y="Y",N="N",H="H",I5="I5",
|
||||
left="←",
|
||||
right="→",
|
||||
ten="→→",
|
||||
backsp="<X",
|
||||
reset="R",
|
||||
-- reset="Redémarrer",
|
||||
-- rnd="Rand",
|
||||
copy="Copier",
|
||||
paste="Coller",
|
||||
},
|
||||
@@ -437,17 +432,6 @@ return{
|
||||
title="Mode personnalisé",
|
||||
subTitle="Mission",
|
||||
|
||||
_1="1",_2="2",_3="3",_4="4",
|
||||
any1="any1",any2="any2",any3="any3",any4="any4",
|
||||
PC="PC",
|
||||
Z1="Z1",S1="S1",J1="J1",L1="L1",T1="T1",O1="O1",I1="I1",
|
||||
Z2="Z2",S2="S2",J2="J2",L2="L2",T2="T2",O2="O2",I2="I2",
|
||||
Z3="Z3",S3="S3",J3="J3",L3="L3",T3="T3",O3="O3",I3="I3",
|
||||
O4="O4",I4="I4",
|
||||
left="←",right="→",
|
||||
ten="→→",
|
||||
backsp="<X",
|
||||
reset="R",
|
||||
copy="Copier",
|
||||
paste="Coller",
|
||||
mission="Dorcer la mission",
|
||||
@@ -507,55 +491,10 @@ return{
|
||||
prehold="Préréserve",
|
||||
_pc="PC",
|
||||
|
||||
clear1="Clear 1",
|
||||
clear2="Clear 2",
|
||||
clear3="Clear 3",
|
||||
clear4="Clear 4",
|
||||
spin0="spin 0",
|
||||
spin1="spin 1",
|
||||
spin2="spin 2",
|
||||
spin3="spin 3",
|
||||
|
||||
_1="Simple",
|
||||
_2="Double",
|
||||
_3="Triple",
|
||||
_4="Techrash",
|
||||
z0="Z-spin",
|
||||
z1="Z-spin 1",
|
||||
z2="Z-spin 2",
|
||||
z3="Z-spin 3",
|
||||
s0="S-spin",
|
||||
s1="S-spin 1",
|
||||
s2="S-spin 2",
|
||||
s3="S-spin 3",
|
||||
|
||||
j0="J-spin",
|
||||
j1="J-spin 1",
|
||||
j2="J-spin 2",
|
||||
j3="J-spin 3",
|
||||
l0="L-spin",
|
||||
l1="L-spin 1",
|
||||
l2="L-spin 2",
|
||||
l3="L-spin 3",
|
||||
|
||||
t0="T-spin",
|
||||
t1="T-spin 1",
|
||||
t2="T-spin 2",
|
||||
t3="T-spin 3",
|
||||
o0="O-spin",
|
||||
o1="O-spin 1",
|
||||
o2="O-spin 2",
|
||||
o3="O-spin 3",
|
||||
|
||||
i0="I-spin",
|
||||
i1="I-spin 1",
|
||||
i2="I-spin 2",
|
||||
i3="I-spin 3",
|
||||
|
||||
mini="Mini",
|
||||
b2b="B2B",
|
||||
b3b="B3B",
|
||||
pc="PC",
|
||||
},
|
||||
mg_15p={
|
||||
reset="Réinitialiser",
|
||||
|
||||
@@ -6,9 +6,9 @@ return{
|
||||
httpTimeout="¡Tiempo de espera de conexión agotado!",
|
||||
marking="Autor:MrZ_26\nEsta grabación es ilegal si ves esto\nNo se aceptan excusas",
|
||||
holdR="Mantén presionado para reiniciar",
|
||||
-- newDay="新的一天,新的开始~",
|
||||
-- playedLong="已经玩很久了!注意休息!",
|
||||
-- playedTooMuch="今天玩太久啦!打块好玩但也要适可而止哦~",
|
||||
-- newDay="[Anti-addiction] New day, new beginning!",
|
||||
-- playedLong="[Anti-addiction] You've been playing quite a bit today. Make sure to take breaks.",
|
||||
-- playedTooMuch="[Anti-addiction] You've been playing too much today! You can't play any more.",
|
||||
|
||||
atkModeName={"Al azar","Medallas","KOs","Atacantes"},
|
||||
royale_remain="$1 Jugadores Restantes",
|
||||
@@ -90,17 +90,19 @@ return{
|
||||
-- loginFailed="Login failed",
|
||||
-- accessSuccessed="Successfully authorized!",
|
||||
-- accessFailed="Authorization failed",
|
||||
-- wsSuccessed="WS连接成功",
|
||||
-- wsFailed="WS连接失败",
|
||||
-- wsDisconnected="WS连接断开",
|
||||
-- wsNoConn="WS未连接",
|
||||
-- wsSuccessed="WebSocket: connected",
|
||||
-- wsFailed="WebSocket: connection failed",
|
||||
-- wsDisconnected="WebSocket: disconnected",
|
||||
-- wsNoConn="WebSocket: you are not connected",
|
||||
|
||||
-- chatJoin="进入房间",
|
||||
-- chatLeave="离开房间",
|
||||
-- chatRemain="人数:",
|
||||
-- chatStart="------消息的开头------",
|
||||
-- chatHistory="------以上是历史消息------",
|
||||
-- chatQuit="再按一次退出",
|
||||
-- chatJoin="joined the room.",
|
||||
-- chatLeave="left the room.",
|
||||
-- chatRemain="Online: ",
|
||||
-- chatStart="------Beginning of log------",
|
||||
-- chatHistory="------New messages below------",
|
||||
-- chatQuit="Press again to exit",
|
||||
|
||||
-- roomsFetchFailed="Failed to fetch rooms",
|
||||
|
||||
errorMsg="Ha ocurrido un error y Techmino necesita reiniciarse.\nSe creó un registro de error, puedes enviarlo al autor.",
|
||||
|
||||
@@ -224,7 +226,7 @@ return{
|
||||
restart="Reiniciar (R)",
|
||||
quit= "Finalizar (Q)",
|
||||
},
|
||||
netgame={
|
||||
net_menumenu={
|
||||
-- ffa="FFA",
|
||||
-- rooms="Rooms",
|
||||
-- chat="Chat",
|
||||
@@ -311,7 +313,6 @@ return{
|
||||
},
|
||||
setting_skin={
|
||||
title="Ajustes de Texturas",
|
||||
spin1="R",spin2="R",spin3="R",spin4="R",spin5="R",spin6="R",spin7="R",
|
||||
skinR="Color por def.",
|
||||
faceR="Direc. por def.",
|
||||
},
|
||||
@@ -419,17 +420,9 @@ return{
|
||||
custom_sequence={
|
||||
title="Juego Personalizado",
|
||||
subTitle="Secuencia",
|
||||
|
||||
sequence="Secuencia",
|
||||
|
||||
Z="Z",S="S",J="J",L="L",T="T",O="O",I="I",
|
||||
Z5="Z5",S5="S5",P="P",Q="Q",F="F",E="E",T5="T5",U="U",
|
||||
V="V",W="W",X="X",J5="J5",L5="L5",R="R",Y="Y",N="N",H="H",I5="I5",
|
||||
left="←",
|
||||
right="→",
|
||||
ten="→→",
|
||||
backsp="<X",
|
||||
reset="R",
|
||||
-- reset="Reset",
|
||||
-- rnd="Rand",
|
||||
copy="Copiar",
|
||||
paste="Pegar",
|
||||
},
|
||||
@@ -437,17 +430,6 @@ return{
|
||||
title="Juego Personalizado",
|
||||
subTitle="Misiones",
|
||||
|
||||
_1="1",_2="2",_3="3",_4="4",
|
||||
any1="any1",any2="any2",any3="any3",any4="any4",
|
||||
PC="PC",
|
||||
Z1="Z1",S1="S1",J1="J1",L1="L1",T1="T1",O1="O1",I1="I1",
|
||||
Z2="Z2",S2="S2",J2="J2",L2="L2",T2="T2",O2="O2",I2="I2",
|
||||
Z3="Z3",S3="S3",J3="J3",L3="L3",T3="T3",O3="O3",I3="I3",
|
||||
O4="O4",I4="I4",
|
||||
left="←",right="→",
|
||||
ten="→→",
|
||||
backsp="<X",
|
||||
reset="R",
|
||||
copy="Copiar",
|
||||
paste="Pegar",
|
||||
mission="Forzar misión",
|
||||
@@ -511,57 +493,11 @@ return{
|
||||
-- hold="Hold",
|
||||
-- prerotate="Prerotate",
|
||||
-- prehold="Prehold",
|
||||
-- _pc="PC",
|
||||
|
||||
-- clear1="clear 1",
|
||||
-- clear2="clear 2",
|
||||
-- clear3="clear 3",
|
||||
-- clear4="clear 4",
|
||||
-- spin0="spin 0",
|
||||
-- spin1="spin 1",
|
||||
-- spin2="spin 2",
|
||||
-- spin3="spin 3",
|
||||
|
||||
-- _1="Single",
|
||||
-- _2="Double",
|
||||
-- _3="Triple",
|
||||
-- _4="Techrash",
|
||||
-- z0="Z-spin",
|
||||
-- z1="Z-spin 1",
|
||||
-- z2="Z-spin 2",
|
||||
-- z3="Z-spin 3",
|
||||
-- s0="S-spin",
|
||||
-- s1="S-spin 1",
|
||||
-- s2="S-spin 2",
|
||||
-- s3="S-spin 3",
|
||||
|
||||
-- j0="J-spin",
|
||||
-- j1="J-spin 1",
|
||||
-- j2="J-spin 2",
|
||||
-- j3="J-spin 3",
|
||||
-- l0="L-spin",
|
||||
-- l1="L-spin 1",
|
||||
-- l2="L-spin 2",
|
||||
-- l3="L-spin 3",
|
||||
|
||||
-- t0="T-spin",
|
||||
-- t1="T-spin 1",
|
||||
-- t2="T-spin 2",
|
||||
-- t3="T-spin 3",
|
||||
-- o0="O-spin",
|
||||
-- o1="O-spin 1",
|
||||
-- o2="O-spin 2",
|
||||
-- o3="O-spin 3",
|
||||
|
||||
-- i0="I-spin",
|
||||
-- i1="I-spin 1",
|
||||
-- i2="I-spin 2",
|
||||
-- i3="I-spin 3",
|
||||
|
||||
-- mini="Mini",
|
||||
-- b2b="B2B",
|
||||
-- b3b="B3B",
|
||||
-- pc="PC",
|
||||
_1="Single",
|
||||
_2="Doble",
|
||||
_3="Triple",
|
||||
_4="Techrash",
|
||||
},
|
||||
mg_15p={
|
||||
reset="Mezclar",
|
||||
|
||||
@@ -319,15 +319,8 @@ return{
|
||||
subTitle="Sequence",
|
||||
|
||||
sequence="$=",
|
||||
|
||||
Z="Z",S="S",J="J",L="L",T="T",O="O",I="I",
|
||||
Z5="Z5",S5="S5",P="P",Q="Q",F="F",E="E",T5="T5",U="U",
|
||||
V="V",W="W",X="X",J5="J5",L5="L5",R="R",Y="Y",N="N",H="H",I5="I5",
|
||||
left="←",
|
||||
right="→",
|
||||
ten="→→",
|
||||
backsp="<X",
|
||||
reset="R",
|
||||
rnd="R",
|
||||
copy="→__",
|
||||
paste="__→",
|
||||
},
|
||||
@@ -335,17 +328,6 @@ return{
|
||||
title="!@#$%^&*",
|
||||
subTitle="(!)",
|
||||
|
||||
_1="1",_2="2",_3="3",_4="4",
|
||||
any1="any1",any2="any2",any3="any3",any4="any4",
|
||||
PC="PC",
|
||||
Z1="Z1",S1="S1",J1="J1",L1="L1",T1="T1",O1="O1",I1="I1",
|
||||
Z2="Z2",S2="S2",J2="J2",L2="L2",T2="T2",O2="O2",I2="I2",
|
||||
Z3="Z3",S3="S3",J3="J3",L3="L3",T3="T3",O3="O3",I3="I3",
|
||||
O4="O4",I4="I4",
|
||||
left="←",right="→",
|
||||
ten="→→",
|
||||
backsp="<X",
|
||||
reset="R",
|
||||
copy="→__",
|
||||
paste="__→",
|
||||
mission="Force mission",
|
||||
|
||||
@@ -99,6 +99,8 @@ return{
|
||||
chatHistory="------以上是历史消息------",
|
||||
chatQuit="再按一次退出",
|
||||
|
||||
roomsFetchFailed="拉取房间列表失败",
|
||||
|
||||
errorMsg="Techmino遭受了雷击,需要重新启动.\n我们已收集了一些错误信息,你可以向作者进行反馈.",
|
||||
|
||||
modInstruction="选择你要使用的Mod!\n不同Mod会用不同的方式改变初始游戏规则(可能导致不能正常游玩)\n来开发新玩法或者挑战自我吧!\n提醒:开启一些Mod会让成绩无效,你也可以用键盘开关Mod,按住shift反向",
|
||||
@@ -244,7 +246,7 @@ return{
|
||||
restart="重新开始(R)",
|
||||
quit= "退出(Q)",
|
||||
},
|
||||
netgame={
|
||||
net_menumenu={
|
||||
ffa="FFA",
|
||||
rooms="房间列表",
|
||||
chat="聊天室",
|
||||
@@ -443,16 +445,10 @@ return{
|
||||
|
||||
sequence="序列",
|
||||
|
||||
Z="Z",S="S",J="J",L="L",T="T",O="O",I="I",
|
||||
Z5="Z5",S5="S5",P="P",Q="Q",F="F",E="E",T5="T5",U="U",
|
||||
V="V",W="W",X="X",J5="J5",L5="L5",R="R",Y="Y",N="N",H="H",I5="I5",
|
||||
left="←",
|
||||
right="→",
|
||||
ten="→→",
|
||||
backsp="<X",
|
||||
reset="R",
|
||||
copy="复制",
|
||||
paste="粘贴",
|
||||
Z="Z",S="S",J="J",L="L",T="T",O="O",I="I",left="←",right="→",ten="→→",backsp="<X",reset="清空",
|
||||
Z5="Z5",S5="S5",P="P",Q="Q",F="F",E="E",T5="T5",U="U",I3="I3",C="C",rnd="随机",
|
||||
V="V",W="W",X="X",J5="J5",L5="L5",R="R",Y="Y",N="N",H="H",I5="I5",I2="I2",O1="O1",
|
||||
copy="复制",paste="粘贴",
|
||||
},
|
||||
custom_mission={
|
||||
title="自定义游戏",
|
||||
|
||||
128
parts/list.lua
128
parts/list.lua
@@ -149,12 +149,12 @@ title2[5]={
|
||||
]]
|
||||
|
||||
do--title_fan
|
||||
local sin,cos=math.sin,math.cos
|
||||
title_fan={}
|
||||
local sin,cos=math.sin,math.cos
|
||||
for i=1,8 do
|
||||
local L={}
|
||||
title_fan[i]=L
|
||||
for j=1,#title[i]do
|
||||
for j=1,#title[i]do
|
||||
L[j]=title[i][j]
|
||||
end
|
||||
for j=1,#L,2 do
|
||||
@@ -179,33 +179,24 @@ do--missionEnum
|
||||
O1=61,O2=62,O3=63,O4=64,
|
||||
I1=71,I2=72,I3=73,I4=74,
|
||||
}
|
||||
local _={}
|
||||
for k,v in next,missionEnum do _[v]=k end
|
||||
for k,v in next,_ do missionEnum[k]=v end
|
||||
local L={}
|
||||
for k,v in next,missionEnum do L[v]=k end
|
||||
for k,v in next,L do missionEnum[k]=v end
|
||||
end
|
||||
|
||||
do--drawableTextLoad, drawableText
|
||||
do--drawableText
|
||||
local function T(s,t)return love.graphics.newText(getFont(s),t)end
|
||||
drawableTextLoad={
|
||||
"anykey",
|
||||
"replaying",
|
||||
"next","hold",
|
||||
"win","finish","gameover","pause",
|
||||
|
||||
"speedLV",
|
||||
"line","atk","eff",
|
||||
"rpm","tsd",
|
||||
"grade","techrash",
|
||||
"wave","nextWave",
|
||||
"combo","maxcmb",
|
||||
"pc","ko",
|
||||
|
||||
"noScore","highScore",
|
||||
}
|
||||
drawableText={
|
||||
question=T(100,"?"),
|
||||
small=T(30,"<"),large=T(30,">"),
|
||||
bpm=T(15,"BPM"),kpm=T(15,"KPM"),
|
||||
modeName=T(30),levelName=T(30),
|
||||
|
||||
anykey=T(40),
|
||||
replaying=T(20),
|
||||
next=T(40),hold=T(40),
|
||||
win=T(120),finish=T(120),
|
||||
gameover=T(100),pause=T(120),
|
||||
|
||||
speedLV=T(20),
|
||||
line=T(25),atk=T(20),eff=T(20),
|
||||
@@ -215,14 +206,6 @@ do--drawableTextLoad, drawableText
|
||||
combo=T(20),maxcmb=T(20),
|
||||
pc=T(20),ko=T(25),
|
||||
|
||||
modeName=T(30),levelName=T(30),
|
||||
|
||||
anykey=T(40),
|
||||
replaying=T(20),
|
||||
next=T(40),hold=T(40),
|
||||
win=T(120),finish=T(120),
|
||||
gameover=T(100),pause=T(120),
|
||||
|
||||
noScore=T(45),highScore=T(30),
|
||||
}
|
||||
end
|
||||
@@ -232,6 +215,8 @@ do--spinCenters
|
||||
local I1,I2,I3,I4={-.5,1.5},{1.5,-.5},{.5,1.5},{1.5,.5}
|
||||
local V4={1.5,1.5}
|
||||
local L1,L2={0,2},{2,0}
|
||||
local S1,S2={-.5,.5},{.5,-.5}
|
||||
local D={0,0}
|
||||
spinCenters={
|
||||
--Tetramino
|
||||
{[0]=N1,N2,N3,N3},--Z
|
||||
@@ -243,26 +228,97 @@ do--spinCenters
|
||||
{[0]=I1,I2,I3,I4},--I
|
||||
|
||||
--Pentomino
|
||||
{[0]=N3,N3,N3,N3},--Z
|
||||
{[0]=N3,N3,N3,N3},--S
|
||||
{[0]=N3,N3,N3,N3},--Z5
|
||||
{[0]=N3,N3,N3,N3},--S5
|
||||
{[0]=N1,N2,N3,N3},--P
|
||||
{[0]=N1,N2,N3,N3},--Q
|
||||
{[0]=N3,N3,N3,N3},--F
|
||||
{[0]=N3,N3,N3,N3},--E
|
||||
{[0]=N3,N3,N3,N3},--T
|
||||
{[0]=N3,N3,N3,N3},--T5
|
||||
{[0]=N1,N2,N3,N3},--U
|
||||
{[0]=I3,N4,I4,V4},--V
|
||||
{[0]=N3,N3,N3,N3},--W
|
||||
{[0]=N3,N3,N3,N3},--X
|
||||
{[0]=I3,I4,I3,I4},--J
|
||||
{[0]=I3,I4,I3,I4},--L
|
||||
{[0]=I3,I4,I3,I4},--J5
|
||||
{[0]=I3,I4,I3,I4},--L5
|
||||
{[0]=I3,I4,I3,I4},--R
|
||||
{[0]=I3,I4,I3,I4},--Y
|
||||
{[0]=I3,I4,I3,I4},--N
|
||||
{[0]=I3,I4,I3,I4},--H
|
||||
{[0]=L1,L2,L1,L2},--I
|
||||
{[0]=L1,L2,L1,L2},--I5
|
||||
|
||||
--Trimino
|
||||
{[0]=N1,N2,N1,N2},--I3
|
||||
{[0]=N4,N4,N4,N4},--C
|
||||
|
||||
--Domino
|
||||
{[0]=S1,S2,N4,N4},--I2
|
||||
|
||||
--Dot
|
||||
{[0]=D,D,D,D},--O1
|
||||
}
|
||||
end
|
||||
do--BLOCKS
|
||||
local function RotCW(B)
|
||||
local N={}
|
||||
local r,c=#B,#B[1]--row,col
|
||||
for x=1,c do
|
||||
N[x]={}
|
||||
for y=1,r do
|
||||
N[x][y]=B[y][c-x+1]
|
||||
end
|
||||
end
|
||||
return N
|
||||
end
|
||||
local O,_=true,false
|
||||
BLOCKS={
|
||||
--Tetramino
|
||||
{{_,O,O},{O,O,_}}, --Z
|
||||
{{O,O,_},{_,O,O}}, --S
|
||||
{{O,O,O},{O,_,_}}, --J
|
||||
{{O,O,O},{_,_,O}}, --L
|
||||
{{O,O,O},{_,O,_}}, --T
|
||||
{{O,O},{O,O}}, --O
|
||||
{{O,O,O,O}}, --I
|
||||
|
||||
--Pentomino
|
||||
{{_,O,O},{_,O,_},{O,O,_}}, --Z5
|
||||
{{O,O,_},{_,O,_},{_,O,O}}, --S5
|
||||
{{O,O,O},{O,O,_}}, --P
|
||||
{{O,O,O},{_,O,O}}, --Q
|
||||
{{_,O,_},{O,O,O},{O,_,_}}, --F
|
||||
{{_,O,_},{O,O,O},{_,_,O}}, --E
|
||||
{{O,O,O},{_,O,_},{_,O,_}}, --T5
|
||||
{{O,O,O},{O,_,O}}, --U
|
||||
{{O,O,O},{_,_,O},{_,_,O}}, --V
|
||||
{{_,O,O},{O,O,_},{O,_,_}}, --W
|
||||
{{_,O,_},{O,O,O},{_,O,_}}, --X
|
||||
{{O,O,O,O},{O,_,_,_}}, --J5
|
||||
{{O,O,O,O},{_,_,_,O}}, --L5
|
||||
{{O,O,O,O},{_,O,_,_}}, --R
|
||||
{{O,O,O,O},{_,_,O,_}}, --Y
|
||||
{{_,O,O,O},{O,O,_,_}}, --N
|
||||
{{O,O,O,_},{_,_,O,O}}, --H
|
||||
{{O,O,O,O,O}}, --I5
|
||||
|
||||
--Trimino
|
||||
{{O,O,O}}, --I3
|
||||
{{O,O},{_,O}}, --C
|
||||
|
||||
--Domino
|
||||
{{O,O}}, --I2
|
||||
|
||||
--Dot
|
||||
{{O}}, --O1
|
||||
}
|
||||
for i=1,#BLOCKS do
|
||||
local B=BLOCKS[i]
|
||||
BLOCKS[i]={[0]=B}
|
||||
B=RotCW(B)BLOCKS[i][1]=B
|
||||
B=RotCW(B)BLOCKS[i][2]=B
|
||||
B=RotCW(B)BLOCKS[i][3]=B
|
||||
end
|
||||
end
|
||||
|
||||
rankColor={
|
||||
COLOR.dRed, --D
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
local function RotCW(B)
|
||||
local N={}
|
||||
local r,c=#B,#B[1]--row,col
|
||||
for x=1,c do
|
||||
N[x]={}
|
||||
for y=1,r do
|
||||
N[x][y]=B[y][c-x+1]
|
||||
end
|
||||
end
|
||||
return N
|
||||
end
|
||||
local O,_=true,false
|
||||
local L={
|
||||
--Tetramino
|
||||
{{_,O,O},{O,O,_}}, --Z
|
||||
{{O,O,_},{_,O,O}}, --S
|
||||
{{O,O,O},{O,_,_}}, --J
|
||||
{{O,O,O},{_,_,O}}, --L
|
||||
{{O,O,O},{_,O,_}}, --T
|
||||
{{O,O},{O,O}}, --O
|
||||
{{O,O,O,O}}, --I
|
||||
|
||||
--Pentomino
|
||||
{{_,O,O},{_,O,_},{O,O,_}}, --Z
|
||||
{{O,O,_},{_,O,_},{_,O,O}}, --S
|
||||
{{O,O,O},{O,O,_}}, --P
|
||||
{{O,O,O},{_,O,O}}, --Q
|
||||
{{_,O,_},{O,O,O},{O,_,_}}, --F
|
||||
{{_,O,_},{O,O,O},{_,_,O}}, --E
|
||||
{{O,O,O},{_,O,_},{_,O,_}}, --T
|
||||
{{O,O,O},{O,_,O}}, --U
|
||||
{{O,O,O},{_,_,O},{_,_,O}}, --V
|
||||
{{_,O,O},{O,O,_},{O,_,_}}, --W
|
||||
{{_,O,_},{O,O,O},{_,O,_}}, --X
|
||||
{{O,O,O,O},{O,_,_,_}}, --J
|
||||
{{O,O,O,O},{_,_,_,O}}, --L
|
||||
{{O,O,O,O},{_,O,_,_}}, --R
|
||||
{{O,O,O,O},{_,_,O,_}}, --Y
|
||||
{{_,O,O,O},{O,O,_,_}}, --N
|
||||
{{O,O,O,_},{_,_,O,O}}, --H
|
||||
{{O,O,O,O,O}}, --I
|
||||
}
|
||||
for i=1,#L do
|
||||
local B=L[i]
|
||||
L[i]={[0]=B}
|
||||
B=RotCW(B)L[i][1]=B
|
||||
B=RotCW(B)L[i][2]=B
|
||||
B=RotCW(B)L[i][3]=B
|
||||
end
|
||||
return L
|
||||
@@ -5,7 +5,6 @@ return{
|
||||
drop=1e99,lock=1e99,
|
||||
holdCount=0,
|
||||
dropPiece=function(P)P:lose()end,
|
||||
task=nil,
|
||||
bg="bg1",bgm="new era",
|
||||
},
|
||||
pauseLimit=true,
|
||||
|
||||
@@ -19,7 +19,7 @@ return{
|
||||
color=COLOR.lBlue,
|
||||
env={
|
||||
smooth=false,
|
||||
noTele=true,keyCancel={6},
|
||||
noTele=true,keyCancel={5,6},
|
||||
das=16,arr=6,sddas=2,sdarr=2,
|
||||
irs=false,ims=false,
|
||||
center=0,ghost=0,
|
||||
@@ -30,7 +30,7 @@ return{
|
||||
freshLimit=0,
|
||||
face={0,0,2,2,2,0,0},
|
||||
target=10,dropPiece=check_LVup,
|
||||
bg="rgb",bgm="rockblock",
|
||||
bg="rgb",bgm="magicblock",
|
||||
},
|
||||
slowMark=true,
|
||||
load=function()
|
||||
|
||||
@@ -7,7 +7,7 @@ local function check_LVup(P)
|
||||
--Stage 1: clear 3 techrash
|
||||
if T==12 then--Stage 2: swap color of S/Z & J/L
|
||||
P.waiting=30
|
||||
P.curMission=nil
|
||||
P.curMission=false
|
||||
|
||||
ENV.skin[1],ENV.skin[2]=ENV.skin[2],ENV.skin[1]
|
||||
ENV.skin[3],ENV.skin[4]=ENV.skin[4],ENV.skin[3]
|
||||
|
||||
@@ -25,7 +25,7 @@ return{
|
||||
garbageSpeed=.3,
|
||||
pushSpeed=2,
|
||||
freshLimit=15,
|
||||
bg="rainbow",bgm="rockblock",
|
||||
bg="rainbow",bgm="sugar fairy",
|
||||
},
|
||||
load=function()
|
||||
royaleData={
|
||||
|
||||
@@ -25,7 +25,7 @@ return{
|
||||
garbageSpeed=.3,
|
||||
pushSpeed=2,
|
||||
freshLimit=15,
|
||||
bg="rainbow",bgm="rockblock",
|
||||
bg="rainbow",bgm="magicblock",
|
||||
},
|
||||
load=function()
|
||||
royaleData={
|
||||
|
||||
@@ -25,7 +25,7 @@ return{
|
||||
garbageSpeed=.3,
|
||||
pushSpeed=2,
|
||||
freshLimit=15,
|
||||
bg="rainbow",bgm="rockblock",
|
||||
bg="rainbow",bgm="sugar fairy",
|
||||
},
|
||||
load=function()
|
||||
royaleData={
|
||||
|
||||
@@ -25,7 +25,7 @@ return{
|
||||
garbageSpeed=.3,
|
||||
pushSpeed=2,
|
||||
freshLimit=15,
|
||||
bg="rainbow",bgm="rockblock",
|
||||
bg="rainbow",bgm="magicblock",
|
||||
},
|
||||
load=function()
|
||||
royaleData={
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
local gc=love.graphics
|
||||
local gc_rectangle,gc_setColor=gc.rectangle,gc.setColor
|
||||
local gc_draw,gc_print,gc_rectangle,gc_setColor=gc.draw,gc.print,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
|
||||
local format=string.format
|
||||
local SCR=SCR
|
||||
local setFont=setFont
|
||||
local Draw=gc.draw--Use to speed up gc.draw(blockTexture)
|
||||
local setFont,mStr=setFont,mStr
|
||||
|
||||
local frameColorList={
|
||||
[0]=COLOR.white,
|
||||
@@ -15,7 +14,7 @@ local frameColorList={
|
||||
COLOR.lPurple,
|
||||
COLOR.lOrange,
|
||||
}
|
||||
--local function drawCell(y,x,id)gc.draw(SKIN.curText[id],30*x-30,-30*y)end
|
||||
--local function drawCell(y,x,id)gc_draw(SKIN.curText[id],30*x-30,-30*y)end
|
||||
local function drawGrid(P,alpha)
|
||||
local FBN,FUP=P.fieldBeneath,P.fieldUp
|
||||
gc.setLineWidth(1)
|
||||
@@ -23,10 +22,12 @@ local function drawGrid(P,alpha)
|
||||
for x=1,9 do
|
||||
gc.line(30*x,-10,30*x,600)
|
||||
end
|
||||
gc.push("transform")
|
||||
gc.translate(0,FBN+FUP-30*int((FBN+FUP)/30))
|
||||
for y=0,19 do
|
||||
y=30*(y-int((FBN+FUP)/30))+FBN+FUP
|
||||
gc.line(0,y,300,y)
|
||||
gc.line(0,30*y,300,30*y)
|
||||
end
|
||||
gc.pop()
|
||||
end
|
||||
local function drawField(P)
|
||||
local V,F=P.visTime,P.field
|
||||
@@ -34,14 +35,15 @@ local function drawField(P)
|
||||
local rep=GAME.replaying
|
||||
local texture=SKIN.curText
|
||||
if P.falling==-1 then--Blocks only
|
||||
local t=TIME()*4
|
||||
for j=start,min(start+21,#F)do
|
||||
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))
|
||||
Draw(texture[F[j][i]],30*i-30,-30*j)-- drawCell(j,i,F[j][i])
|
||||
gc_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_setColor(1,1,1,.3+.08*sin(.5*(j-i)+t))
|
||||
gc_rectangle("fill",30*i-30,-30*j,30,30)
|
||||
end
|
||||
end
|
||||
@@ -64,7 +66,7 @@ local function drawField(P)
|
||||
if F[j][i]>0 then
|
||||
if V[j][i]>0 then
|
||||
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])
|
||||
gc_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)
|
||||
@@ -101,7 +103,7 @@ local function drawFXs(P)
|
||||
for i=1,#P.moveFX do
|
||||
local S=P.moveFX[i]
|
||||
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])
|
||||
gc_draw(texture[S[1]],30*S[2]-30,-30*S[3])-- drawCell(S[3],S[2],S[1])
|
||||
end
|
||||
|
||||
--ClearFX
|
||||
@@ -119,21 +121,22 @@ local function drawGhost(P,clr)
|
||||
local texture=SKIN.curText
|
||||
for i=1,P.r do for j=1,P.c do
|
||||
if P.cur.bk[i][j]then
|
||||
Draw(texture[clr],30*(j+P.curX-1)-30,-30*(i+P.imgY-1))-- drawCell(i+P.imgY-1,j+P.curX-1,clr)
|
||||
gc_draw(texture[clr],30*(j+P.curX-1)-30,-30*(i+P.ghoY-1))-- drawCell(i+P.ghoY-1,j+P.curX-1,clr)
|
||||
end
|
||||
end end
|
||||
end
|
||||
local function drawBlockOutline(P,texture,trans)
|
||||
SHADER.alpha:send("a",trans)
|
||||
gc.setShader(SHADER.alpha)
|
||||
local B=P.cur.bk
|
||||
for i=1,P.r do for j=1,P.c do
|
||||
if P.cur.bk[i][j]then
|
||||
if B[i][j]then
|
||||
local x=30*(j+P.curX)-60-3
|
||||
local y=30-30*(i+P.curY)-3
|
||||
Draw(texture,x,y)
|
||||
Draw(texture,x+6,y+6)
|
||||
Draw(texture,x+6,y)
|
||||
Draw(texture,x,y+6)
|
||||
gc_draw(texture,x,y)
|
||||
gc_draw(texture,x+6,y+6)
|
||||
gc_draw(texture,x+6,y)
|
||||
gc_draw(texture,x,y+6)
|
||||
end
|
||||
end end
|
||||
gc.setShader()
|
||||
@@ -141,9 +144,10 @@ end
|
||||
local function drawBlock(P,clr)
|
||||
gc_setColor(1,1,1)
|
||||
local texture=SKIN.curText
|
||||
local B=P.cur.bk
|
||||
for i=1,P.r do for j=1,P.c do
|
||||
if P.cur.bk[i][j]then
|
||||
Draw(texture[clr],30*(j+P.curX-1)-30,-30*(i+P.curY-1))-- drawCell(i+P.curY-1,j+P.curX-1,clr)
|
||||
if B[i][j]then
|
||||
gc_draw(texture[clr],30*(j+P.curX-1)-30,-30*(i+P.curY-1))-- drawCell(i+P.curY-1,j+P.curX-1,clr)
|
||||
end
|
||||
end end
|
||||
end
|
||||
@@ -153,7 +157,7 @@ local function drawNextPreview(P,B)
|
||||
local y=21+ceil(P.fieldBeneath/30)
|
||||
for i=1,#B do for j=1,#B[1]do
|
||||
if B[i][j]then
|
||||
Draw(puzzleMark[-1],30*(x+j-2),30*(1-y-i))
|
||||
gc_draw(puzzleMark[-1],30*(x+j-2),30*(1-y-i))
|
||||
end
|
||||
end end
|
||||
end
|
||||
@@ -174,17 +178,17 @@ function draw.drawNext_norm(P)
|
||||
local bk,clr=P.nextQueue[N].bk,P.nextQueue[N].color
|
||||
for i=1,#bk do for j=1,#bk[1] do
|
||||
if bk[i][j]then
|
||||
Draw(texture[clr],30*(j+2.06-#bk[1]*.5)-30,-30*(i+3.76-2.4*N-#bk*.5))-- drawCell(i-2.4*N-#bk*.5,j+12.6-#bk[1]*.5,clr)
|
||||
gc_draw(texture[clr],30*(j+2.06-#bk[1]*.5)-30,-30*(i+3.76-2.4*N-#bk*.5))-- drawCell(i-2.4*N-#bk*.5,j+12.6-#bk[1]*.5,clr)
|
||||
end
|
||||
end end
|
||||
N=N+1
|
||||
end
|
||||
|
||||
if ENV.bagLine then
|
||||
local L=ENV.bagLen
|
||||
local C=-P.pieceCount%L--Phase
|
||||
local len=ENV.bagLen
|
||||
local phase=-P.pieceCount%len
|
||||
gc_setColor(.8,.5,.5)
|
||||
for i=C,N-1,L do
|
||||
for i=phase,N-1,len do
|
||||
local y=72*i-77
|
||||
gc.line(2+P.fieldOff.x,y,120,y)
|
||||
end
|
||||
@@ -205,17 +209,17 @@ function draw.drawNext_hidden(P)
|
||||
local bk,clr=P.nextQueue[N].bk,P.nextQueue[N].color
|
||||
for i=1,#bk do for j=1,#bk[1] do
|
||||
if bk[i][j]then
|
||||
Draw(texture[clr],30*(j+2.06-#bk[1]*.5)-30,-30*(i+3.76-2.4*N-#bk*.5))-- drawCell(i-2.4*N-#bk*.5,j+12.6-#bk[1]*.5,clr)
|
||||
gc_draw(texture[clr],30*(j+2.06-#bk[1]*.5)-30,-30*(i+3.76-2.4*N-#bk*.5))-- drawCell(i-2.4*N-#bk*.5,j+12.6-#bk[1]*.5,clr)
|
||||
end
|
||||
end end
|
||||
N=N+1
|
||||
end
|
||||
|
||||
if ENV.bagLine then
|
||||
local L=ENV.bagLen
|
||||
local C=-P.pieceCount%L--Phase
|
||||
local len=ENV.bagLen
|
||||
local phase=-P.pieceCount%len
|
||||
gc_setColor(.8,.5,.5)
|
||||
for i=C,N-1,L do
|
||||
for i=phase,N-1,len do
|
||||
local y=72*i-77
|
||||
gc.line(2+P.fieldOff.x,y,120,y)
|
||||
end
|
||||
@@ -237,7 +241,7 @@ function draw.drawHold_norm(P)
|
||||
local bk,clr=B.bk,B.color
|
||||
for i=1,#bk do for j=1,#bk[1]do
|
||||
if bk[i][j]then
|
||||
Draw(texture[clr],30*(j+2.06-#bk[1]*.5)-30,-30*(i+3.76-2.4*1-#bk*.5))-- drawCell(i+1.36-#B*.5,j+2.06-#B[1]*.5,clr)
|
||||
gc_draw(texture[clr],30*(j+2.06-#bk[1]*.5)-30,-30*(i+3.76-2.4*1-#bk*.5))-- drawCell(i+1.36-#B*.5,j+2.06-#B[1]*.5,clr)
|
||||
end
|
||||
end end
|
||||
end
|
||||
@@ -265,7 +269,7 @@ function draw.drawHold_multi(P)
|
||||
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
|
||||
Draw(texture[clr],30*(j+2.06-#bk[1]*.5)-30,-30*(i+3.76-2.4*n-#bk*.5))-- drawCell(i+1.36-#B*.5,j+2.06-#B[1]*.5,clr)
|
||||
gc_draw(texture[clr],30*(j+2.06-#bk[1]*.5)-30,-30*(i+3.76-2.4*n-#bk*.5))-- drawCell(i+1.36-#B*.5,j+2.06-#B[1]*.5,clr)
|
||||
end
|
||||
end end
|
||||
end
|
||||
@@ -293,16 +297,14 @@ local function drawDial(x,y,speed)
|
||||
gc_setColor(1,1,1)
|
||||
mStr(int(speed),x,y-18)
|
||||
|
||||
gc.setLineWidth(2)
|
||||
gc.circle("line",x,y,30,6)
|
||||
|
||||
gc_draw(IMG.dialNeedle,x,y,2.094+(speed<=175 and .02094*speed or 4.712-52.36/(speed-125)),nil,nil,5,4)
|
||||
|
||||
gc.setLineWidth(4)
|
||||
gc_setColor(1,1,1,.4)
|
||||
gc.circle("line",x,y,30,10)
|
||||
|
||||
gc.setLineWidth(2)
|
||||
gc_setColor(1,1,1,.6)
|
||||
gc.circle("line",x,y,30,10)
|
||||
|
||||
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)
|
||||
gc.circle("line",x,y,30,6)
|
||||
end
|
||||
local hideBoardStencil={
|
||||
up=function()gc_rectangle("fill",0,0,300,300)end,
|
||||
@@ -351,7 +353,7 @@ function draw.norm(P)
|
||||
|
||||
--Draw dangerous area
|
||||
gc_setColor(1,0,0,.3)
|
||||
gc_rectangle("fill",0,-600,300,-610-FUP-FBN)
|
||||
gc_rectangle("fill",0,-600,300,-FUP-FBN-10)
|
||||
|
||||
--Draw field
|
||||
drawField(P)
|
||||
@@ -371,7 +373,7 @@ function draw.norm(P)
|
||||
--Draw ghost
|
||||
if ENV.ghost then drawGhost(P,curColor)end
|
||||
|
||||
local dy=ENV.smooth and P.imgY~=P.curY and(P.dropDelay/ENV.drop-1)*30 or 0
|
||||
local dy=ENV.smooth and P.ghoY~=P.curY and(P.dropDelay/ENV.drop-1)*30 or 0
|
||||
gc.translate(0,-dy)
|
||||
local trans=P.lockDelay/ENV.lock
|
||||
|
||||
@@ -385,12 +387,12 @@ function draw.norm(P)
|
||||
local x=30*(P.curX+P.sc[2])-15
|
||||
if ENV.center and ENV.block then
|
||||
gc_setColor(1,1,1,ENV.center)
|
||||
gc.draw(IMG.spinCenter,x,-30*(P.curY+P.sc[1])+15,nil,nil,nil,4,4)
|
||||
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.draw(IMG.spinCenter,x,-30*(P.imgY+P.sc[1])+15,nil,nil,nil,4,4)
|
||||
gc_draw(IMG.spinCenter,x,-30*(P.ghoY+P.sc[1])+15,nil,nil,nil,4,4)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -504,7 +506,7 @@ 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.ghoY then gc_setColor(0,1,.4,.42)gc.line(0,615-P.ghoY*30,300,615-P.ghoY*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()
|
||||
@@ -514,33 +516,44 @@ function draw.norm(P)
|
||||
drawDial(510,510,P.dropSpeed)
|
||||
drawDial(555,565,P.keySpeed)
|
||||
gc_setColor(1,1,1)
|
||||
gc.draw(drawableText.bpm,540,480)
|
||||
gc.draw(drawableText.kpm,494,573)
|
||||
gc_draw(drawableText.bpm,540,480)
|
||||
gc_draw(drawableText.kpm,494,573)
|
||||
|
||||
local S=P.stat
|
||||
|
||||
--Score & Time
|
||||
setFont(25)
|
||||
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_print(P.score1,18,509)
|
||||
gc_print(format("%.2f",S.time),18,539)
|
||||
gc_setColor(COLOR.lYellow)gc_print(P.score1,20,510)
|
||||
gc_setColor(COLOR.sky)gc_print(format("%.2f",S.time),20,540)
|
||||
|
||||
--FinesseCombo
|
||||
if P.finesseCombo>2 then
|
||||
_=P.finesseComboTime
|
||||
local str=P.finesseCombo.."x"
|
||||
if _>0 then
|
||||
if S.finesseRate==5*S.piece then
|
||||
gc_setColor(.9,.9,.3,_*.2)
|
||||
gc_print(str,20,570)
|
||||
gc_setColor(.9,.9,.3,1.2-_*.1)
|
||||
elseif S.maxFinesseCombo==S.piece then
|
||||
gc_setColor(.7,.7,1,_*.2)
|
||||
gc_print(str,20,570)
|
||||
gc_setColor(.7,.7,1,1.2-_*.1)
|
||||
else
|
||||
gc_setColor(1,1,1,_*.2)
|
||||
gc.print(str,20,570)
|
||||
gc_print(str,20,570)
|
||||
gc_setColor(1,1,1,1.2-_*.1)
|
||||
end
|
||||
if _>0 then
|
||||
gc.push("transform")
|
||||
gc.translate(20,600)
|
||||
gc.scale(1+_*.08)
|
||||
gc.print(str,0,-30)
|
||||
gc_print(str,0,-30)
|
||||
gc.pop()
|
||||
else
|
||||
gc_setColor(1,1,1)
|
||||
gc.print(str,20,570)
|
||||
gc_print(str,20,570)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -549,13 +562,13 @@ function draw.norm(P)
|
||||
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)
|
||||
gc_draw(IMG.lifeIcon,450+25*i,595,nil,.8)
|
||||
end
|
||||
else
|
||||
gc.draw(IMG.lifeIcon,475,595,nil,.8)
|
||||
gc_draw(IMG.lifeIcon,475,595,nil,.8)
|
||||
setFont(20)
|
||||
gc.print("x",503,595)
|
||||
gc.print(P.life,517,595)
|
||||
gc_print("x",503,595)
|
||||
gc_print(P.life,517,595)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -577,7 +590,7 @@ function draw.norm(P)
|
||||
else
|
||||
gc_setColor(1,1,1)
|
||||
end
|
||||
gc.print(missionEnum[L[P.curMission]],85,110)
|
||||
gc_print(missionEnum[L[P.curMission]],85,110)
|
||||
|
||||
--Draw next mission
|
||||
setFont(20)
|
||||
@@ -585,7 +598,7 @@ function draw.norm(P)
|
||||
local m=L[P.curMission+i]
|
||||
if m then
|
||||
m=missionEnum[m]
|
||||
gc.print(m,87-28*i,117)
|
||||
gc_print(m,87-28*i,117)
|
||||
else
|
||||
break
|
||||
end
|
||||
@@ -622,7 +635,7 @@ function draw.small(P)
|
||||
local texture=SKIN.curTextMini
|
||||
for j=1,#F do
|
||||
for i=1,10 do if F[j][i]>0 then
|
||||
Draw(texture[F[j][i]],6*i-6,120-6*j)
|
||||
gc_draw(texture[F[j][i]],6*i-6,120-6*j)
|
||||
end end
|
||||
end
|
||||
|
||||
@@ -637,7 +650,7 @@ function draw.small(P)
|
||||
if GAME.modeEnv.royaleMode then
|
||||
gc_setColor(1,1,1)
|
||||
for i=1,P.strength do
|
||||
gc.draw(IMG.badgeIcon,12*i-7,4,nil,.5)
|
||||
gc_draw(IMG.badgeIcon,12*i-7,4,nil,.5)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -653,7 +666,7 @@ function draw.small(P)
|
||||
|
||||
--Draw Canvas
|
||||
gc_setColor(1,1,1)
|
||||
gc.draw(P.canvas,P.x,P.y,nil,P.size*10)
|
||||
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)
|
||||
@@ -688,7 +701,7 @@ function draw.demo(P)
|
||||
if P.cur and P.waiting==-1 then
|
||||
if ENV.ghost then drawGhost(P,curColor)end
|
||||
if ENV.block then
|
||||
local dy=ENV.smooth and P.imgY~=P.curY and(P.dropDelay/ENV.drop-1)*30 or 0
|
||||
local dy=ENV.smooth and P.ghoY~=P.curY and(P.dropDelay/ENV.drop-1)*30 or 0
|
||||
gc.translate(0,-dy)
|
||||
drawBlockOutline(P,SKIN.curText[curColor],P.lockDelay/ENV.lock)
|
||||
drawBlock(P,curColor)
|
||||
@@ -698,14 +711,16 @@ function draw.demo(P)
|
||||
gc.pop()
|
||||
|
||||
local blockImg=TEXTURE.miniBlock
|
||||
local libColor=SKIN.libColor
|
||||
local skinSet=ENV.skin
|
||||
--Draw hold
|
||||
local N=1
|
||||
while P.holdQueue[N]do
|
||||
local id=P.holdQueue[N].id
|
||||
_=P.color[id]
|
||||
_=libColor[skinSet[id]]
|
||||
gc_setColor(_[1],_[2],_[3],.3)
|
||||
_=blockImg[id]
|
||||
gc.draw(_,15,40*N-10,nil,16,nil,0,_:getHeight()*.5)
|
||||
gc_draw(_,15,40*N-10,nil,16,nil,0,_:getHeight()*.5)
|
||||
N=N+1
|
||||
end
|
||||
|
||||
@@ -713,10 +728,10 @@ function draw.demo(P)
|
||||
N=1
|
||||
while N<=ENV.nextCount and P.nextQueue[N]do
|
||||
local id=P.nextQueue[N].id
|
||||
_=P.color[id]
|
||||
_=libColor[skinSet[id]]
|
||||
gc_setColor(_[1],_[2],_[3],.3)
|
||||
_=blockImg[id]
|
||||
gc.draw(_,285,40*N-10,nil,16,nil,_:getWidth(),_:getHeight()*.5)
|
||||
gc_draw(_,285,40*N-10,nil,16,nil,_:getWidth(),_:getHeight()*.5)
|
||||
N=N+1
|
||||
end
|
||||
gc.pop()
|
||||
|
||||
@@ -24,7 +24,7 @@ local function getNewStatTable()
|
||||
pc=0,hpc=0,b2b=0,b3b=0,
|
||||
maxCombo=0,maxFinesseCombo=0,
|
||||
}
|
||||
for i=1,25 do
|
||||
for i=1,29 do
|
||||
T.clear[i]={0,0,0,0,0,0}
|
||||
T.spin[i]={0,0,0,0,0,0,0}
|
||||
T.clears[i]=0
|
||||
@@ -130,14 +130,13 @@ local function newEmptyPlayer(id,mini)
|
||||
P.atker,P.atking,P.lastRecv={}
|
||||
|
||||
P.dropDelay,P.lockDelay=0,0
|
||||
P.color={}
|
||||
P.showTime=nil
|
||||
P.showTime=false
|
||||
P.keepVisible=true
|
||||
|
||||
--P.cur={bk=matrix[2], id=shapeID, color=colorID, name=nameID}
|
||||
--P.sc,P.dir={0,0},0--SpinCenterCoord, direction
|
||||
--P.r,P.c=0,0--row, col
|
||||
-- P.curX,P.curY,P.imgY,P.minY=0,0,0,0--x,y,ghostY
|
||||
-- P.curX,P.curY,P.ghoY,P.minY=0,0,0,0--x,y,ghostY
|
||||
P.holdQueue={}
|
||||
P.holdTime=0
|
||||
P.nextQueue={}
|
||||
@@ -166,7 +165,7 @@ local function newEmptyPlayer(id,mini)
|
||||
P.type="none"
|
||||
P.sound=false
|
||||
|
||||
-- P.newNext=nil--Call prepareSequence()to get a function to get new next
|
||||
-- P.newNext=false--Call prepareSequence()to get a function to get new next
|
||||
|
||||
P.keyPressing={}for i=1,12 do P.keyPressing[i]=false end
|
||||
P.movDir,P.moving,P.downing=0,0,0--Last move key,DAS charging,downDAS charging
|
||||
@@ -185,7 +184,7 @@ local function newEmptyPlayer(id,mini)
|
||||
P.bonus={}--Text objects
|
||||
|
||||
P.endCounter=0--Used after gameover
|
||||
P.result=nil--String:"WIN"/"K.O."
|
||||
P.result=false--String:"WIN"/"K.O."
|
||||
|
||||
return P
|
||||
end
|
||||
@@ -228,11 +227,6 @@ local function applyGameEnv(P)--Finish gameEnv processing
|
||||
P.lockDelay=ENV.lock
|
||||
P.freshTime=ENV.freshLimit
|
||||
|
||||
P.color={}
|
||||
for _=1,7 do
|
||||
P.color[_]=SKIN.libColor[ENV.skin[_]]
|
||||
end
|
||||
|
||||
P.life=ENV.life
|
||||
|
||||
P.keyAvailable={true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true}
|
||||
@@ -278,23 +272,23 @@ local function applyGameEnv(P)--Finish gameEnv processing
|
||||
if ENV.nextCount==0 then ENV.nextPos=false end
|
||||
|
||||
if P.mini then
|
||||
ENV.lockFX=nil
|
||||
ENV.dropFX=nil
|
||||
ENV.moveFX=nil
|
||||
ENV.clearFX=nil
|
||||
ENV.splashFX=nil
|
||||
ENV.shakeFX=nil
|
||||
ENV.text=nil
|
||||
ENV.lockFX=false
|
||||
ENV.dropFX=false
|
||||
ENV.moveFX=false
|
||||
ENV.clearFX=false
|
||||
ENV.splashFX=false
|
||||
ENV.shakeFX=false
|
||||
ENV.text=false
|
||||
else
|
||||
if ENV.lockFX==0 then ENV.lockFX=nil end
|
||||
if ENV.dropFX==0 then ENV.dropFX=nil end
|
||||
if ENV.moveFX==0 then ENV.moveFX=nil end
|
||||
if ENV.clearFX==0 then ENV.clearFX=nil end
|
||||
if ENV.splashFX==0 then ENV.splashFX=nil end
|
||||
if ENV.shakeFX==0 then ENV.shakeFX=nil end
|
||||
if ENV.lockFX==0 then ENV.lockFX=false end
|
||||
if ENV.dropFX==0 then ENV.dropFX=false end
|
||||
if ENV.moveFX==0 then ENV.moveFX=false end
|
||||
if ENV.clearFX==0 then ENV.clearFX=false end
|
||||
if ENV.splashFX==0 then ENV.splashFX=false end
|
||||
if ENV.shakeFX==0 then ENV.shakeFX=false end
|
||||
end
|
||||
if ENV.ghost==0 then ENV.ghost=nil end
|
||||
if ENV.center==0 then ENV.center=nil end
|
||||
if ENV.ghost==0 then ENV.ghost=false end
|
||||
if ENV.center==0 then ENV.center=false end
|
||||
end
|
||||
--------------------------</Lib Func>--------------------------
|
||||
|
||||
|
||||
@@ -12,13 +12,6 @@ local ct=coroutine
|
||||
local kickList=require"parts/kickList"
|
||||
local scs=spinCenters
|
||||
|
||||
local function without(L,e)
|
||||
for i=1,#L do
|
||||
if L[i]==e then return end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
--------------------------<FX>--------------------------
|
||||
function Player.showText(P,text,dx,dy,font,style,spd,stop)
|
||||
if P.gameEnv.text then
|
||||
@@ -34,14 +27,17 @@ function Player.createLockFX(P)
|
||||
|
||||
for i=1,P.r do
|
||||
local y=P.curY+i-1
|
||||
if without(P.clearedRow,y)then
|
||||
y=-30*y
|
||||
for j=1,P.c do
|
||||
if BK[i][j]then
|
||||
ins(P.lockFX,{30*(P.curX+j-2),y,0,t})
|
||||
end
|
||||
local L=P.clearedRow
|
||||
for j=1,#L do
|
||||
if L[j]==y then goto continue end
|
||||
end
|
||||
y=-30*y
|
||||
for j=1,P.c do
|
||||
if BK[i][j]then
|
||||
ins(P.lockFX,{30*(P.curX+j-2),y,0,t})
|
||||
end
|
||||
end
|
||||
::continue::
|
||||
end
|
||||
end
|
||||
function Player.createDropFX(P,x,y,w,h)
|
||||
@@ -262,13 +258,13 @@ function Player.garbageRise(P,color,amount,pos)--Release n-lines garbage to fiel
|
||||
P.fieldBeneath=P.fieldBeneath+amount*30
|
||||
if P.cur then
|
||||
P.curY=P.curY+amount
|
||||
P.imgY=P.imgY+amount
|
||||
P.ghoY=P.ghoY+amount
|
||||
end
|
||||
P.garbageBeneath=P.garbageBeneath+amount
|
||||
for i=1,#P.clearingRow do
|
||||
P.clearingRow[i]=P.clearingRow[i]+amount
|
||||
end
|
||||
P:freshBlock(false,false)
|
||||
P:freshBlock("push")
|
||||
for i=1,#P.lockFX do
|
||||
_=P.lockFX[i]
|
||||
_[2]=_[2]-30*amount--Shift 30px per line cleared
|
||||
@@ -300,8 +296,8 @@ function Player.pushLineList(P,L,mir)--Push some lines to field
|
||||
end
|
||||
P.fieldBeneath=P.fieldBeneath+30*l
|
||||
P.curY=P.curY+l
|
||||
P.imgY=P.imgY+l
|
||||
P:freshBlock(false,false)
|
||||
P.ghoY=P.ghoY+l
|
||||
P:freshBlock("push")
|
||||
end
|
||||
function Player.pushNextList(P,L,mir)--Push some nexts to nextQueue
|
||||
for i=1,#L do
|
||||
@@ -400,65 +396,68 @@ function Player.changeAtk(P,R)
|
||||
P.atking=R
|
||||
ins(R.atker,P)
|
||||
else
|
||||
P.atking=nil
|
||||
P.atking=false
|
||||
end
|
||||
end
|
||||
function Player.freshBlock(P,keepGhost,control,system)
|
||||
function Player.freshBlock(P,mode)--string mode: push/move/fresh/newBlock
|
||||
local ENV=P.gameEnv
|
||||
if not keepGhost and P.cur then
|
||||
P.imgY=min(#P.field+1,P.curY)
|
||||
|
||||
--Fresh ghost
|
||||
if(mode=="push"or mode=="move"or mode=="newBlock")and P.cur then
|
||||
P.ghoY=min(#P.field+1,P.curY)
|
||||
if P._20G or P.keyPressing[7]and ENV.sdarr==0 then
|
||||
local _=P.imgY
|
||||
local _=P.ghoY
|
||||
|
||||
--Move ghost to bottom
|
||||
while not P:ifoverlap(P.cur.bk,P.curX,P.imgY-1)do
|
||||
P.imgY=P.imgY-1
|
||||
while not P:ifoverlap(P.cur.bk,P.curX,P.ghoY-1)do
|
||||
P.ghoY=P.ghoY-1
|
||||
end
|
||||
|
||||
--Cancel spinLast
|
||||
if _~=P.imgY then
|
||||
if _~=P.ghoY then
|
||||
P.spinLast=false
|
||||
end
|
||||
|
||||
--Create FX if dropped
|
||||
if P.curY>P.imgY then
|
||||
if ENV.dropFX and ENV.block and P.curY-P.imgY-P.r>-1 then
|
||||
P:createDropFX(P.curX,P.curY-1,P.c,P.curY-P.imgY-P.r+1)
|
||||
if P.curY>P.ghoY then
|
||||
if ENV.dropFX and ENV.block and P.curY-P.ghoY-P.r>-1 then
|
||||
P:createDropFX(P.curX,P.curY-1,P.c,P.curY-P.ghoY-P.r+1)
|
||||
end
|
||||
if ENV.shakeFX then
|
||||
P.fieldOff.vy=ENV.shakeFX*.5
|
||||
end
|
||||
P.curY=P.imgY
|
||||
P.curY=P.ghoY
|
||||
end
|
||||
else
|
||||
while not P:ifoverlap(P.cur.bk,P.curX,P.imgY-1)do
|
||||
P.imgY=P.imgY-1
|
||||
while not P:ifoverlap(P.cur.bk,P.curX,P.ghoY-1)do
|
||||
P.ghoY=P.ghoY-1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if control then
|
||||
--Fresh delays
|
||||
if mode=="move"or mode=="fresh"or mode=="newBlock"then
|
||||
local d0,l0=ENV.drop,ENV.lock
|
||||
if ENV.easyFresh then
|
||||
local d0=ENV.lock
|
||||
if P.lockDelay<d0 and P.freshTime>0 then
|
||||
if not system then
|
||||
if P.lockDelay<l0 and P.freshTime>0 then
|
||||
if mode~="newBlock"then
|
||||
P.freshTime=P.freshTime-1
|
||||
end
|
||||
P.lockDelay=d0
|
||||
P.dropDelay=ENV.drop
|
||||
P.lockDelay=l0
|
||||
P.dropDelay=d0
|
||||
end
|
||||
if P.curY<P.minY then
|
||||
P.minY=P.curY
|
||||
P.dropDelay=ENV.drop
|
||||
P.lockDelay=ENV.lock
|
||||
P.dropDelay=d0
|
||||
P.lockDelay=l0
|
||||
end
|
||||
else
|
||||
if P.curY<P.minY then
|
||||
P.minY=P.curY
|
||||
if P.lockDelay<ENV.lock and P.freshTime>0 then
|
||||
if P.lockDelay<l0 and P.freshTime>0 then
|
||||
P.freshTime=P.freshTime-1
|
||||
P.dropDelay=ENV.drop
|
||||
P.lockDelay=ENV.lock
|
||||
P.dropDelay=d0
|
||||
P.lockDelay=l0
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -557,7 +556,7 @@ function Player.spin(P,d,ifpre)
|
||||
iki=iki[P.dir*10+idir]
|
||||
if not iki then
|
||||
if P.gameEnv.easyFresh then
|
||||
P:freshBlock(false,true)
|
||||
P:freshBlock("move")
|
||||
end
|
||||
SFX.fieldPlay(ifpre and"prerotate"or"rotate",nil,P)
|
||||
return
|
||||
@@ -574,7 +573,7 @@ function Player.spin(P,d,ifpre)
|
||||
P.r,P.c=ir,ic
|
||||
P.spinLast=test==2 and 0 or 1
|
||||
if not ifpre then
|
||||
P:freshBlock(false,true)
|
||||
P:freshBlock("move")
|
||||
end
|
||||
if iki[test][2]>0 and not P.gameEnv.easyFresh then
|
||||
P.freshTime=P.freshTime-1
|
||||
@@ -621,7 +620,7 @@ function Player.hold(P,ifpre)
|
||||
P.cur=rem(P.holdQueue,1)
|
||||
|
||||
P:resetBlock()
|
||||
P:freshBlock(false,true)
|
||||
P:freshBlock("move")
|
||||
P.dropDelay=P.gameEnv.drop
|
||||
P.lockDelay=P.gameEnv.lock
|
||||
if P:ifoverlap(P.cur.bk,P.curX,P.curY)then
|
||||
@@ -692,7 +691,7 @@ function Player.popNext(P,ifhold)--Pop nextQueue to hand
|
||||
P:lock()
|
||||
P:lose()
|
||||
end
|
||||
P:freshBlock(false,true,true)
|
||||
P:freshBlock("newBlock")
|
||||
end
|
||||
|
||||
--IHdS
|
||||
@@ -823,6 +822,26 @@ do--Player.drop(P)--Place piece
|
||||
{2,3,2,2,1,2,3,2,3,2},
|
||||
1,2
|
||||
},--I5
|
||||
{
|
||||
{1,2,1,0,1,2,2,1},
|
||||
{2,2,3,2,1,2,3,3,2,2},
|
||||
1,2
|
||||
},--I3
|
||||
{
|
||||
{1,2,2,1,0,1,2,2,1},
|
||||
{2,3,3,2,1,2,3,3,2},
|
||||
{3,4,4,3,2,3,4,4,3},
|
||||
2
|
||||
},--C
|
||||
{
|
||||
{1,2,2,1,0,1,2,2,1},
|
||||
{2,2,3,2,1,1,2,3,2,2},
|
||||
1,2
|
||||
},--I2
|
||||
{
|
||||
{1,2,2,1,0,1,2,3,2,1},
|
||||
1,1,1
|
||||
},--O1
|
||||
}
|
||||
for k,v in next,finesseList do
|
||||
if type(v)=="table"then
|
||||
@@ -1309,7 +1328,7 @@ do--Player.drop(P)--Place piece
|
||||
P.curMission=P.curMission+1
|
||||
SFX.play("reach")
|
||||
if P.curMission>#ENV.mission then
|
||||
P.curMission=nil
|
||||
P.curMission=false
|
||||
if not finish then finish="finish"end
|
||||
end
|
||||
elseif ENV.missionKill then
|
||||
@@ -1728,8 +1747,8 @@ function Player.act_moveLeft(P,auto)
|
||||
P:createMoveFX("left")
|
||||
end
|
||||
P.curX=P.curX-1
|
||||
P:freshBlock(false,true)
|
||||
if P.sound and P.curY==P.imgY then SFX.play("move")end
|
||||
P:freshBlock("move")
|
||||
if P.sound and P.curY==P.ghoY then SFX.play("move")end
|
||||
if not auto then P.moving=0 end
|
||||
P.spinLast=false
|
||||
else
|
||||
@@ -1755,8 +1774,8 @@ function Player.act_moveRight(P,auto)
|
||||
P:createMoveFX("right")
|
||||
end
|
||||
P.curX=P.curX+1
|
||||
P:freshBlock(false,true)
|
||||
if P.sound and P.curY==P.imgY then SFX.play("move")end
|
||||
P:freshBlock("move")
|
||||
if P.sound and P.curY==P.ghoY then SFX.play("move")end
|
||||
if not auto then P.moving=0 end
|
||||
P.spinLast=false
|
||||
else
|
||||
@@ -1794,11 +1813,11 @@ function Player.act_hardDrop(P)
|
||||
end
|
||||
P.keyPressing[6]=false
|
||||
elseif P.control and P.waiting==-1 and P.cur then
|
||||
if P.curY>P.imgY then
|
||||
if P.gameEnv.dropFX and P.gameEnv.block and P.curY-P.imgY-P.r>-1 then
|
||||
P:createDropFX(P.curX,P.curY-1,P.c,P.curY-P.imgY-P.r+1)
|
||||
if P.curY>P.ghoY then
|
||||
if P.gameEnv.dropFX and P.gameEnv.block and P.curY-P.ghoY-P.r>-1 then
|
||||
P:createDropFX(P.curX,P.curY-1,P.c,P.curY-P.ghoY-P.r+1)
|
||||
end
|
||||
P.curY=P.imgY
|
||||
P.curY=P.ghoY
|
||||
P.spinLast=false
|
||||
if P.gameEnv.shakeFX then
|
||||
P.fieldOff.vy=P.gameEnv.shakeFX*.6
|
||||
@@ -1821,9 +1840,9 @@ function Player.act_softDrop(P)
|
||||
else
|
||||
P.downing=1
|
||||
if P.control and P.waiting==-1 and P.cur then
|
||||
if P.curY>P.imgY then
|
||||
if P.curY>P.ghoY then
|
||||
P.curY=P.curY-1
|
||||
P:freshBlock(true,true)
|
||||
P:freshBlock("fresh")
|
||||
P.spinLast=false
|
||||
end
|
||||
end
|
||||
@@ -1838,7 +1857,9 @@ function Player.act_func(P)
|
||||
P.gameEnv.Fkey(P)
|
||||
end
|
||||
function Player.act_restart()
|
||||
if GAME.frame<240 or GAME.result then
|
||||
if GAME.frame<240 then
|
||||
resetGameData("q")
|
||||
elseif GAME.result then
|
||||
resetGameData()
|
||||
else
|
||||
LOG.print(text.holdR,20,COLOR.orange)
|
||||
@@ -1853,7 +1874,7 @@ function Player.act_insLeft(P,auto)
|
||||
P:createMoveFX("left")
|
||||
end
|
||||
P.curX=P.curX-1
|
||||
P:freshBlock(false,true)
|
||||
P:freshBlock("move")
|
||||
end
|
||||
if P.curX~=x0 then
|
||||
P.spinLast=false
|
||||
@@ -1875,7 +1896,7 @@ function Player.act_insRight(P,auto)
|
||||
P:createMoveFX("right")
|
||||
end
|
||||
P.curX=P.curX+1
|
||||
P:freshBlock(false,true)
|
||||
P:freshBlock("move")
|
||||
end
|
||||
if P.curX~=x0 then
|
||||
P.spinLast=false
|
||||
@@ -1890,48 +1911,49 @@ function Player.act_insRight(P,auto)
|
||||
end
|
||||
end
|
||||
function Player.act_insDown(P)
|
||||
if P.cur and P.curY>P.imgY then
|
||||
if P.gameEnv.dropFX and P.gameEnv.block and P.curY-P.imgY-P.r>-1 then
|
||||
P:createDropFX(P.curX,P.curY-1,P.c,P.curY-P.imgY-P.r+1)
|
||||
if P.cur and P.curY>P.ghoY then
|
||||
local ENV=P.gameEnv
|
||||
if ENV.dropFX and ENV.block and P.curY-P.ghoY-P.r>-1 then
|
||||
P:createDropFX(P.curX,P.curY-1,P.c,P.curY-P.ghoY-P.r+1)
|
||||
end
|
||||
if P.gameEnv.shakeFX then
|
||||
P.fieldOff.vy=P.gameEnv.shakeFX*.5
|
||||
if ENV.shakeFX then
|
||||
P.fieldOff.vy=ENV.shakeFX*.5
|
||||
end
|
||||
P.curY=P.imgY
|
||||
P.lockDelay=P.gameEnv.lock
|
||||
P.curY=P.ghoY
|
||||
P.lockDelay=ENV.lock
|
||||
P.spinLast=false
|
||||
P:freshBlock(true,true)
|
||||
P:freshBlock("fresh")
|
||||
end
|
||||
end
|
||||
function Player.act_down1(P)
|
||||
if P.cur and P.curY>P.imgY then
|
||||
if P.cur and P.curY>P.ghoY then
|
||||
if P.gameEnv.moveFX and P.gameEnv.block then
|
||||
P:createMoveFX("down")
|
||||
end
|
||||
P.curY=P.curY-1
|
||||
P:freshBlock(true,true)
|
||||
P:freshBlock("fresh")
|
||||
P.spinLast=false
|
||||
end
|
||||
end
|
||||
function Player.act_down4(P)
|
||||
if P.cur and P.curY>P.imgY then
|
||||
local y=max(P.curY-4,P.imgY)
|
||||
if P.cur and P.curY>P.ghoY then
|
||||
local y=max(P.curY-4,P.ghoY)
|
||||
if P.gameEnv.dropFX and P.gameEnv.block and P.curY-y-P.r>-1 then
|
||||
P:createDropFX(P.curX,P.curY-1,P.c,P.curY-y-P.r+1)
|
||||
end
|
||||
P.curY=y
|
||||
P:freshBlock(true,true)
|
||||
P:freshBlock("fresh")
|
||||
P.spinLast=false
|
||||
end
|
||||
end
|
||||
function Player.act_down10(P)
|
||||
if P.cur and P.curY>P.imgY then
|
||||
local y=max(P.curY-10,P.imgY)
|
||||
if P.cur and P.curY>P.ghoY then
|
||||
local y=max(P.curY-10,P.ghoY)
|
||||
if P.gameEnv.dropFX and P.gameEnv.block and P.curY-y-P.r>-1 then
|
||||
P:createDropFX(P.curX,P.curY-1,P.c,P.curY-y-P.r+1)
|
||||
end
|
||||
P.curY=y
|
||||
P:freshBlock(true,true)
|
||||
P:freshBlock("fresh")
|
||||
P.spinLast=false
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
local int,max,min,abs=math.floor,math.max,math.min,math.abs
|
||||
local rem=table.remove
|
||||
local ct=coroutine
|
||||
local resume=coroutine.resume
|
||||
local status=coroutine.status
|
||||
local assert=assert
|
||||
|
||||
local function updateLine(P)--Attacks, line pushing, cam moving
|
||||
@@ -29,7 +30,7 @@ local function updateLine(P)--Attacks, line pushing, cam moving
|
||||
if not P.alive then
|
||||
y=0
|
||||
else
|
||||
y=30*max(min(#P.field-19.5-P.fieldBeneath/30,P.imgY-17),0)
|
||||
y=30*max(min(#P.field-19.5-P.fieldBeneath/30,P.ghoY-17),0)
|
||||
end
|
||||
if f~=y then
|
||||
P.fieldUp=f>y and max(f*.95+y*.05-2,y)or min(f*.97+y*.03+1,y)
|
||||
@@ -98,14 +99,15 @@ local function updateTasks(P)
|
||||
local L=P.tasks
|
||||
for i=#L,1,-1 do
|
||||
local tr=L[i].thread
|
||||
assert(ct.resume(tr))
|
||||
if ct.status(tr)=="dead"then
|
||||
assert(resume(tr))
|
||||
if status(tr)=="dead"then
|
||||
rem(L,i)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function update_alive(P,dt)
|
||||
local ENV=P.gameEnv
|
||||
if P.timing then
|
||||
local S=P.stat
|
||||
S.time=S.time+dt
|
||||
@@ -160,7 +162,7 @@ local function update_alive(P,dt)
|
||||
|
||||
--Moving pressed
|
||||
if P.movDir~=0 then
|
||||
local das,arr=P.gameEnv.das,P.gameEnv.arr
|
||||
local das,arr=ENV.das,ENV.arr
|
||||
local mov=P.moving
|
||||
if P.waiting==-1 then
|
||||
if P.movDir==1 then
|
||||
@@ -182,8 +184,8 @@ local function update_alive(P,dt)
|
||||
mov=mov+1
|
||||
end
|
||||
end
|
||||
if mov>=das and P.gameEnv.shakeFX and P.cur and P:ifoverlap(P.cur.bk,P.curX+1,P.curY)then
|
||||
P.fieldOff.vx=P.gameEnv.shakeFX*.5
|
||||
if mov>=das and ENV.shakeFX and P.cur and P:ifoverlap(P.cur.bk,P.curX+1,P.curY)then
|
||||
P.fieldOff.vx=ENV.shakeFX*.5
|
||||
end
|
||||
else
|
||||
P.movDir=0
|
||||
@@ -207,8 +209,8 @@ local function update_alive(P,dt)
|
||||
mov=mov+1
|
||||
end
|
||||
end
|
||||
if mov>=das and P.gameEnv.shakeFX and P.cur and P:ifoverlap(P.cur.bk,P.curX-1,P.curY)then
|
||||
P.fieldOff.vx=-P.gameEnv.shakeFX*.5
|
||||
if mov>=das and ENV.shakeFX and P.cur and P:ifoverlap(P.cur.bk,P.curX-1,P.curY)then
|
||||
P.fieldOff.vx=-ENV.shakeFX*.5
|
||||
end
|
||||
else
|
||||
P.movDir=0
|
||||
@@ -222,18 +224,18 @@ local function update_alive(P,dt)
|
||||
|
||||
--Drop pressed
|
||||
if P.keyPressing[7]and not P.keyPressing[9]then
|
||||
local d=P.downing-P.gameEnv.sddas
|
||||
local d=P.downing-ENV.sddas
|
||||
P.downing=P.downing+1
|
||||
if d>1 then
|
||||
if P.gameEnv.sdarr>0 then
|
||||
if d%P.gameEnv.sdarr==0 then
|
||||
if ENV.sdarr>0 then
|
||||
if d%ENV.sdarr==0 then
|
||||
P:act_down1()
|
||||
end
|
||||
else
|
||||
P:act_insDown()
|
||||
end
|
||||
if P.gameEnv.shakeFX then
|
||||
P.fieldOff.vy=P.gameEnv.shakeFX*.3
|
||||
if ENV.shakeFX then
|
||||
P.fieldOff.vy=ENV.shakeFX*.3
|
||||
end
|
||||
end
|
||||
else
|
||||
@@ -247,7 +249,7 @@ local function update_alive(P,dt)
|
||||
goto stop
|
||||
else
|
||||
local L=#P.clearingRow
|
||||
if P.sound and P.gameEnv.fall>0 and #P.field+L>P.clearingRow[L]then SFX.play("fall")end
|
||||
if P.sound and ENV.fall>0 and #P.field+L>P.clearingRow[L]then SFX.play("fall")end
|
||||
P.clearingRow={}
|
||||
end
|
||||
end
|
||||
@@ -262,7 +264,7 @@ local function update_alive(P,dt)
|
||||
|
||||
--Natural block falling
|
||||
if P.cur then
|
||||
if P.curY>P.imgY then
|
||||
if P.curY>P.ghoY then
|
||||
local D=P.dropDelay
|
||||
if D>1 then
|
||||
P.dropDelay=D-1
|
||||
@@ -270,14 +272,14 @@ local function update_alive(P,dt)
|
||||
end
|
||||
|
||||
if D==1 then
|
||||
if P.gameEnv.moveFX and P.gameEnv.block then
|
||||
if ENV.moveFX and ENV.block then
|
||||
P:createMoveFX("down")
|
||||
end
|
||||
P.curY=P.curY-1
|
||||
else
|
||||
D=1/D--Fall dist
|
||||
if D>P.curY-P.imgY then D=P.curY-P.imgY end
|
||||
if P.gameEnv.moveFX and P.gameEnv.block then
|
||||
if D>P.curY-P.ghoY then D=P.curY-P.ghoY end
|
||||
if ENV.moveFX and ENV.block then
|
||||
for _=1,D do
|
||||
P:createMoveFX("down")
|
||||
P.curY=P.curY-1
|
||||
@@ -286,14 +288,14 @@ local function update_alive(P,dt)
|
||||
P.curY=P.curY-D
|
||||
end
|
||||
end
|
||||
P:freshBlock(true,true)
|
||||
P:freshBlock("fresh")
|
||||
P.spinLast=false
|
||||
|
||||
if P.imgY~=P.curY then
|
||||
P.dropDelay=P.gameEnv.drop
|
||||
if P.ghoY~=P.curY then
|
||||
P.dropDelay=ENV.drop
|
||||
elseif P.AI_mode=="CC"then
|
||||
CC.updateField(P)
|
||||
if not P.AIdata._20G and P.gameEnv.drop<P.AI_delay0*.5 then
|
||||
if not P.AIdata._20G and ENV.drop<P.AI_delay0*.5 then
|
||||
CC.switch20G(P)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -79,10 +79,10 @@ function scene.keyDown(k)
|
||||
pass,MARKING=true
|
||||
LOG.print("\68\69\86\58\87\97\116\101\114\109\97\114\107\32\82\101\109\111\118\101\100","message")
|
||||
SFX.play("clear")
|
||||
elseif v==72943816 then
|
||||
elseif v==7294e4+3816 then
|
||||
pass=true
|
||||
for name,M in next,MODES do
|
||||
if not RANKS[name]then
|
||||
if not RANKS[name]and M.x then
|
||||
RANKS[name]=M.score and 0 or 6
|
||||
end
|
||||
end
|
||||
|
||||
@@ -31,7 +31,7 @@ local scene={}
|
||||
|
||||
function scene.sceneInit()
|
||||
heartBeatTimer=0
|
||||
remain=nil
|
||||
remain=false
|
||||
|
||||
if #texts==0 then
|
||||
ins(texts,{COLOR.dG,text.chatStart})
|
||||
@@ -48,7 +48,7 @@ function scene.sceneInit()
|
||||
end
|
||||
function scene.sceneBack()
|
||||
wsWrite("/quit")
|
||||
WSCONN=nil
|
||||
WSCONN=false
|
||||
LOG.print(text.wsDisconnected,"warn")
|
||||
end
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ function scene.sceneInit()
|
||||
end
|
||||
end
|
||||
function scene.sceneBack()
|
||||
BGM.play("blank")
|
||||
BGM.play(FESTIVAL=="Xmas"and"mXmas"or"blank")
|
||||
end
|
||||
|
||||
function scene.keyDown(key)
|
||||
@@ -169,7 +169,7 @@ scene.widgetList={
|
||||
--Else
|
||||
WIDGET.newSelector{name="bg",
|
||||
x=1070, y=150,w=250,color="yellow",
|
||||
list={"none","grey","glow","rgb","flink","wing","fan","badapple","welcome","aura","bg1","bg2","rainbow","rainbow2","tunnel","lightning","lightning2","matrix","space"},
|
||||
list={"none","grey","glow","rgb","flink","wing","fan","badapple","welcome","aura","bg1","bg2","rainbow","rainbow2","tunnel","lightning","lightning2","matrix","space","snow"},
|
||||
disp=WIDGET.lnk_CUSval("bg"),
|
||||
code=function(i)CUSTOMENV.bg=i BG.set(i)end
|
||||
},
|
||||
|
||||
@@ -20,10 +20,11 @@ local minoKey={
|
||||
z=1,s=2,j=3,l=4,t=5,o=6,i=7,
|
||||
p=10,q=11,f=12,e=13,u=15,
|
||||
v=16,w=17,x=18,r=21,y=22,n=23,h=24,
|
||||
["/"]=26,c=27,[","]=27,["'"]=27,["-"]=28,[";"]=28,["."]=29,
|
||||
}
|
||||
local minoKey2={
|
||||
["1"]=8,["2"]=9,["3"]=19,["4"]=20,["5"]=14,["7"]=25,
|
||||
z=8,s=9,t=14,j=19,l=20,i=25
|
||||
z=8,s=9,t=14,j=19,l=20,i=25,["-"]=26,o=29,
|
||||
}
|
||||
function scene.keyDown(key)
|
||||
if key=="left"then
|
||||
@@ -74,6 +75,9 @@ function scene.keyDown(key)
|
||||
else
|
||||
sure=50
|
||||
end
|
||||
elseif key=="="then
|
||||
local l={1,2,3,4,5,6,7}
|
||||
repeat scene.keyDown(rem(l,math.random(#l)))until not l[1]
|
||||
elseif key=="tab"then
|
||||
local W=WIDGET.active.sequence
|
||||
if kb.isDown("lshift","rshift")then
|
||||
@@ -191,41 +195,47 @@ scene.widgetList={
|
||||
code=WIDGET.lnk_CUSsto("sequence")
|
||||
},
|
||||
|
||||
WIDGET.newKey{name="Z", x=100,y=440,w=90,font=50,code=WIDGET.lnk_pressKey(1)},
|
||||
WIDGET.newKey{name="S", x=200,y=440,w=90,font=50,code=WIDGET.lnk_pressKey(2)},
|
||||
WIDGET.newKey{name="J", x=300,y=440,w=90,font=50,code=WIDGET.lnk_pressKey(3)},
|
||||
WIDGET.newKey{name="L", x=400,y=440,w=90,font=50,code=WIDGET.lnk_pressKey(4)},
|
||||
WIDGET.newKey{name="T", x=500,y=440,w=90,font=50,code=WIDGET.lnk_pressKey(5)},
|
||||
WIDGET.newKey{name="O", x=600,y=440,w=90,font=50,code=WIDGET.lnk_pressKey(6)},
|
||||
WIDGET.newKey{name="I", x=700,y=440,w=90,font=50,code=WIDGET.lnk_pressKey(7)},
|
||||
WIDGET.newKey{name="Z", x=120,y=460,w=80,font=50,code=WIDGET.lnk_pressKey(1)},
|
||||
WIDGET.newKey{name="S", x=200,y=460,w=80,font=50,code=WIDGET.lnk_pressKey(2)},
|
||||
WIDGET.newKey{name="J", x=280,y=460,w=80,font=50,code=WIDGET.lnk_pressKey(3)},
|
||||
WIDGET.newKey{name="L", x=360,y=460,w=80,font=50,code=WIDGET.lnk_pressKey(4)},
|
||||
WIDGET.newKey{name="T", x=440,y=460,w=80,font=50,code=WIDGET.lnk_pressKey(5)},
|
||||
WIDGET.newKey{name="O", x=520,y=460,w=80,font=50,code=WIDGET.lnk_pressKey(6)},
|
||||
WIDGET.newKey{name="I", x=600,y=460,w=80,font=50,code=WIDGET.lnk_pressKey(7)},
|
||||
WIDGET.newKey{name="left", x=680,y=460,w=80,color="lGreen",font=55,code=WIDGET.lnk_pressKey("left")},
|
||||
WIDGET.newKey{name="right", x=760,y=460,w=80,color="lGreen",font=55,code=WIDGET.lnk_pressKey("right")},
|
||||
WIDGET.newKey{name="ten", x=840,y=460,w=80,color="lGreen",font=40,code=WIDGET.lnk_pressKey("ten")},
|
||||
WIDGET.newKey{name="backsp",x=920,y=460,w=80,color="lYellow",font=50,code=WIDGET.lnk_pressKey("backspace")},
|
||||
WIDGET.newKey{name="reset", x=1000,y=460,w=80,color="lYellow",font=25,code=WIDGET.lnk_pressKey("delete")},
|
||||
|
||||
WIDGET.newKey{name="Z5", x=100,y=540,w=90,color="grey",font=50,code=WIDGET.lnk_pressKey(8)},
|
||||
WIDGET.newKey{name="S5", x=200,y=540,w=90,color="grey",font=50,code=WIDGET.lnk_pressKey(9)},
|
||||
WIDGET.newKey{name="P", x=300,y=540,w=90,color="grey",font=50,code=WIDGET.lnk_pressKey(10)},
|
||||
WIDGET.newKey{name="Q", x=400,y=540,w=90,color="grey",font=50,code=WIDGET.lnk_pressKey(11)},
|
||||
WIDGET.newKey{name="F", x=500,y=540,w=90,color="grey",font=50,code=WIDGET.lnk_pressKey(12)},
|
||||
WIDGET.newKey{name="E", x=600,y=540,w=90,color="grey",font=50,code=WIDGET.lnk_pressKey(13)},
|
||||
WIDGET.newKey{name="T5", x=700,y=540,w=90,color="grey",font=50,code=WIDGET.lnk_pressKey(14)},
|
||||
WIDGET.newKey{name="U", x=800,y=540,w=90,color="grey",font=50,code=WIDGET.lnk_pressKey(15)},
|
||||
WIDGET.newKey{name="V", x=900,y=540,w=90,color="grey",font=50,code=WIDGET.lnk_pressKey(16)},
|
||||
WIDGET.newKey{name="W", x=100,y=640,w=90,color="grey",font=50,code=WIDGET.lnk_pressKey(17)},
|
||||
WIDGET.newKey{name="X", x=200,y=640,w=90,color="grey",font=50,code=WIDGET.lnk_pressKey(18)},
|
||||
WIDGET.newKey{name="J5", x=300,y=640,w=90,color="grey",font=50,code=WIDGET.lnk_pressKey(19)},
|
||||
WIDGET.newKey{name="L5", x=400,y=640,w=90,color="grey",font=50,code=WIDGET.lnk_pressKey(20)},
|
||||
WIDGET.newKey{name="R", x=500,y=640,w=90,color="grey",font=50,code=WIDGET.lnk_pressKey(21)},
|
||||
WIDGET.newKey{name="Y", x=600,y=640,w=90,color="grey",font=50,code=WIDGET.lnk_pressKey(22)},
|
||||
WIDGET.newKey{name="N", x=700,y=640,w=90,color="grey",font=50,code=WIDGET.lnk_pressKey(23)},
|
||||
WIDGET.newKey{name="H", x=800,y=640,w=90,color="grey",font=50,code=WIDGET.lnk_pressKey(24)},
|
||||
WIDGET.newKey{name="I5", x=900,y=640,w=90,color="grey",font=50,code=WIDGET.lnk_pressKey(25)},
|
||||
WIDGET.newKey{name="Z5", x=120,y=540,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(8)},
|
||||
WIDGET.newKey{name="S5", x=200,y=540,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(9)},
|
||||
WIDGET.newKey{name="P", x=280,y=540,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(10)},
|
||||
WIDGET.newKey{name="Q", x=360,y=540,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(11)},
|
||||
WIDGET.newKey{name="F", x=440,y=540,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(12)},
|
||||
WIDGET.newKey{name="E", x=520,y=540,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(13)},
|
||||
WIDGET.newKey{name="T5", x=600,y=540,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(14)},
|
||||
WIDGET.newKey{name="U", x=680,y=540,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(15)},
|
||||
WIDGET.newKey{name="V", x=760,y=540,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(16)},
|
||||
WIDGET.newKey{name="I3", x=840,y=540,w=80,color="grey",font=50,code=WIDGET.lnk_pressKey(26)},
|
||||
WIDGET.newKey{name="C", x=920,y=540,w=80,color="grey",font=50,code=WIDGET.lnk_pressKey(27)},
|
||||
WIDGET.newKey{name="rnd", x=1000,y=540,w=80,color="red",font=25,code=WIDGET.lnk_pressKey("=")},
|
||||
|
||||
WIDGET.newKey{name="left", x=800, y=440,w=90, color="lGreen", font=55,code=WIDGET.lnk_pressKey("left")},
|
||||
WIDGET.newKey{name="right", x=900, y=440,w=90, color="lGreen", font=55,code=WIDGET.lnk_pressKey("right")},
|
||||
WIDGET.newKey{name="ten", x=1000, y=440,w=90, color="lGreen", font=40,code=WIDGET.lnk_pressKey("ten")},
|
||||
WIDGET.newKey{name="backsp", x=1000, y=540,w=90, color="lYellow",font=50,code=WIDGET.lnk_pressKey("backspace")},
|
||||
WIDGET.newKey{name="reset", x=1000, y=640,w=90, color="lYellow",font=50,code=WIDGET.lnk_pressKey("delete")},
|
||||
WIDGET.newButton{name="copy", x=1140, y=440,w=170,h=80,color="lRed", font=40,code=WIDGET.lnk_pressKey("cC"),hide=function()return #BAG==0 end},
|
||||
WIDGET.newButton{name="paste", x=1140, y=540,w=170,h=80,color="lBlue", font=40,code=WIDGET.lnk_pressKey("cV")},
|
||||
WIDGET.newKey{name="W", x=120,y=620,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(17)},
|
||||
WIDGET.newKey{name="X", x=200,y=620,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(18)},
|
||||
WIDGET.newKey{name="J5", x=280,y=620,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(19)},
|
||||
WIDGET.newKey{name="L5", x=360,y=620,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(20)},
|
||||
WIDGET.newKey{name="R", x=440,y=620,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(21)},
|
||||
WIDGET.newKey{name="Y", x=520,y=620,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(22)},
|
||||
WIDGET.newKey{name="N", x=600,y=620,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(23)},
|
||||
WIDGET.newKey{name="H", x=680,y=620,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(24)},
|
||||
WIDGET.newKey{name="I5", x=760,y=620,w=80,color="lGrey",font=50,code=WIDGET.lnk_pressKey(25)},
|
||||
WIDGET.newKey{name="I2", x=840,y=620,w=80,color="dGrey",font=50,code=WIDGET.lnk_pressKey(28)},
|
||||
WIDGET.newKey{name="O1", x=920,y=620,w=80,color="dGrey",font=50,code=WIDGET.lnk_pressKey(29)},
|
||||
|
||||
|
||||
WIDGET.newButton{name="copy", x=1140, y=460,w=170,h=80,color="lRed", font=40,code=WIDGET.lnk_pressKey("cC"),hide=function()return #BAG==0 end},
|
||||
WIDGET.newButton{name="paste", x=1140, y=550,w=170,h=80,color="lBlue", font=40,code=WIDGET.lnk_pressKey("cV")},
|
||||
WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80, font=40,code=WIDGET.lnk_BACK},
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ local sin=math.sin
|
||||
local scene={}
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set("space")
|
||||
BG.set()
|
||||
end
|
||||
|
||||
function scene.draw()
|
||||
|
||||
@@ -11,7 +11,7 @@ function scene.sceneInit()
|
||||
texts=require"parts/updateLog"
|
||||
scrollPos=1
|
||||
if newVersionLaunch then
|
||||
newVersionLaunch=nil
|
||||
newVersionLaunch=false
|
||||
scrollPos=3
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,8 +9,8 @@ local scene={}
|
||||
local t1,t2,r
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set("space")
|
||||
BGM.play("blank")
|
||||
BG.set()
|
||||
BGM.play(FESTIVAL=="Xmas"and"mXmas"or"blank")
|
||||
t1,t2=0,0--Timer
|
||||
r={}--Random animation type
|
||||
for i=1,8 do r[i]=rnd(5)end
|
||||
|
||||
@@ -29,7 +29,7 @@ local function tick_httpREQ_launch(task)
|
||||
end
|
||||
time=time+1
|
||||
if time>360 then
|
||||
LOG.print(text.httpTimeout,"message")
|
||||
LOG.print(text.getNoticeFail..": "..text.httpTimeout,"message")
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -60,7 +60,7 @@ local function tick_httpREQ_autoLogin(task)
|
||||
end
|
||||
time=time+1
|
||||
if time>360 then
|
||||
LOG.print(text.httpTimeout,"message")
|
||||
LOG.print(text.loginFailed..": "..text.httpTimeout,"message")
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -190,6 +190,7 @@ function scene.update()
|
||||
RANKS[name]=nil
|
||||
end
|
||||
end
|
||||
FILE.save(RANKS,"conf/unlock","q")
|
||||
end
|
||||
STAT.run=STAT.run+1
|
||||
LOADED=true
|
||||
@@ -208,6 +209,11 @@ function scene.update()
|
||||
}
|
||||
)
|
||||
end
|
||||
if FESTIVAL=="Xmas"then
|
||||
LOG.print("==============",COLOR.red)
|
||||
LOG.print("Merry Christmas!",COLOR.white)
|
||||
LOG.print("==============",COLOR.red)
|
||||
end
|
||||
end
|
||||
if loadTar then
|
||||
loadCur=loadCur+1
|
||||
|
||||
@@ -34,7 +34,7 @@ local function tick_httpREQ_newLogin(task)
|
||||
end
|
||||
time=time+1
|
||||
if time>360 then
|
||||
LOG.print(text.httpTimeout,"message")
|
||||
LOG.print(text.loginFailed..": "..text.httpTimeout,"message")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
@@ -8,7 +8,7 @@ local function tick_httpREQ_checkAccessToken(task)
|
||||
if response then
|
||||
if response.code==200 then
|
||||
LOG.print(text.accessSuccessed)
|
||||
SCN.go("netgame")
|
||||
SCN.go("net_menumenu")
|
||||
elseif response.code==403 or response.code==401 then
|
||||
httpRequest(
|
||||
TICK.httpREQ_getAccessToken,
|
||||
@@ -33,7 +33,7 @@ local function tick_httpREQ_checkAccessToken(task)
|
||||
end
|
||||
time=time+1
|
||||
if time>360 then
|
||||
LOG.print(text.httpTimeout,"message")
|
||||
LOG.print(text.loginFailed..": "..text.httpTimeout,"message")
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -45,7 +45,10 @@ local tip
|
||||
|
||||
function scene.sceneInit()
|
||||
tip=text.getTip()
|
||||
BG.set("space")
|
||||
BG.set(
|
||||
FESTIVAL=="Xmas"and"snow"or
|
||||
"space"
|
||||
)
|
||||
|
||||
GAME.modeEnv=NONE
|
||||
--Create demo player
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
local scene={}
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set("space")
|
||||
BG.set()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
|
||||
@@ -44,12 +44,12 @@ local scene={}
|
||||
local selected--Mod selected
|
||||
|
||||
function scene.sceneInit()
|
||||
selected=nil
|
||||
selected=false
|
||||
BG.set("tunnel")
|
||||
end
|
||||
|
||||
function scene.mouseMove(x,y)
|
||||
selected=nil
|
||||
selected=false
|
||||
for _,M in next,MODOPT do
|
||||
if(x-M.x)^2+(y-M.y)^2<2000 then
|
||||
selected=M
|
||||
|
||||
@@ -7,20 +7,20 @@ local int,abs=math.floor,math.abs
|
||||
local sin=math.sin
|
||||
|
||||
local mapCam={
|
||||
sel=nil,--Selected mode ID
|
||||
sel=false,--Selected mode ID
|
||||
xOy=mt.newTransform(0,0,0,1),--Transformation for map display
|
||||
keyCtrl=false,--If controlling with key
|
||||
|
||||
--For auto zooming when enter/leave scene
|
||||
zoomMethod=nil,
|
||||
zoomK=nil,
|
||||
zoomMethod=false,
|
||||
zoomK=false,
|
||||
}
|
||||
local touchDist=nil
|
||||
local touchDist
|
||||
|
||||
local scene={}
|
||||
|
||||
function scene.sceneInit(org)
|
||||
BG.set("space")
|
||||
BG.set()
|
||||
destroyPlayers()
|
||||
local cam=mapCam
|
||||
cam.zoomK=org=="main"and 5 or 1
|
||||
@@ -82,7 +82,7 @@ function scene.mouseClick(x,y)
|
||||
mapCam.sel=SEL
|
||||
SFX.play("click")
|
||||
else
|
||||
mapCam.sel=nil
|
||||
mapCam.sel=false
|
||||
end
|
||||
elseif _ then
|
||||
scene.keyDown("return")
|
||||
@@ -91,7 +91,7 @@ function scene.mouseClick(x,y)
|
||||
mapCam.keyCtrl=false
|
||||
end
|
||||
function scene.touchDown()
|
||||
touchDist=nil
|
||||
touchDist=false
|
||||
end
|
||||
function scene.touchMove(_,x,y,dx,dy)
|
||||
local L=tc.getTouches()
|
||||
@@ -124,7 +124,7 @@ function scene.keyDown(key)
|
||||
SCN.go("mod")
|
||||
elseif key=="escape"then
|
||||
if mapCam.sel then
|
||||
mapCam.sel=nil
|
||||
mapCam.sel=false
|
||||
else
|
||||
SCN.back()
|
||||
end
|
||||
|
||||
@@ -6,7 +6,7 @@ end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="ffa", x=640, y=200,w=350,h=120,font=40,code=NULL},
|
||||
WIDGET.newButton{name="rooms", x=640, y=360,w=350,h=120,font=40,code=NULL},
|
||||
WIDGET.newButton{name="rooms", x=640, y=360,w=350,h=120,font=40,code=WIDGET.lnk_goScene("net_menurooms")},
|
||||
WIDGET.newButton{name="chat", x=640, y=540,w=350,h=120,font=40,code=WIDGET.lnk_goScene("chat")},
|
||||
WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK},
|
||||
}
|
||||
93
parts/scenes/net_rooms.lua
Normal file
93
parts/scenes/net_rooms.lua
Normal file
@@ -0,0 +1,93 @@
|
||||
local gc=love.graphics
|
||||
local max,min=math.max,math.min
|
||||
|
||||
local rooms
|
||||
local scrollPos,curPos
|
||||
local lastfreshTime
|
||||
|
||||
local function task_fetchRooms(task)
|
||||
local time=0
|
||||
while true do
|
||||
coroutine.yield()
|
||||
local response,request_error=client.poll(task)
|
||||
if response then
|
||||
local res=json.decode(response.body)
|
||||
if res then
|
||||
if response.code==200 then
|
||||
rooms=res.rooms
|
||||
curPos=1
|
||||
else
|
||||
LOG.print(text.netErrorCode..response.code..": "..res.message,"warn")
|
||||
end
|
||||
end
|
||||
return
|
||||
elseif request_error then
|
||||
LOG.print(text.roomsFetchFailed..": "..request_error,"warn")
|
||||
return
|
||||
end
|
||||
time=time+1
|
||||
if time>210 then
|
||||
LOG.print(text.roomsFetchFailed..": "..text.httpTimeout,"warn")
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
local function fresh()
|
||||
lastfreshTime=TIME()
|
||||
rooms=nil
|
||||
httpRequest(
|
||||
task_fetchRooms,
|
||||
PATH.api..PATH.access,
|
||||
"GET"
|
||||
)
|
||||
end
|
||||
|
||||
local scene={}
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set("bg1")
|
||||
scrollPos=0
|
||||
curPos=0
|
||||
fresh()
|
||||
end
|
||||
|
||||
function scene.wheelMoved(_,y)
|
||||
wheelScroll(y)
|
||||
end
|
||||
function scene.keyDown(k)
|
||||
if rooms then
|
||||
if k=="down"then
|
||||
curPos=min(curPos+1,#rooms)
|
||||
elseif k=="up"then
|
||||
curPos=max(curPos-1,1)
|
||||
elseif k=="r"then
|
||||
fresh()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function scene.update()
|
||||
if TIME()-lastfreshTime>5 then
|
||||
fresh()
|
||||
end
|
||||
end
|
||||
|
||||
function scene.draw()
|
||||
if rooms then
|
||||
setFont(40)
|
||||
for i=scrollPos,min(scrollPos+9,#rooms)do
|
||||
local R=rooms[i+1]
|
||||
gc.setColor(.7,.7,1)
|
||||
gc.print(i,50,100+50*i)
|
||||
gc.setColor(1,1,.7)
|
||||
gc.print(R.name,130,100+50*i)
|
||||
end
|
||||
gc.print("→",20,50+50*curPos)
|
||||
end
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newButton{name="back",x=1140,y=640,w=170,h=80,font=40,code=WIDGET.lnk_BACK},
|
||||
}
|
||||
|
||||
return scene
|
||||
@@ -4,9 +4,7 @@ local int=math.floor
|
||||
local sin,log=math.sin,math.log10
|
||||
local format=string.format
|
||||
|
||||
local setFont=setFont
|
||||
local mStr=mStr
|
||||
local SCR=SCR
|
||||
local SCR,setFont,mStr=SCR,setFont,mStr
|
||||
|
||||
local fnsRankColor={
|
||||
Z=COLOR.lYellow,
|
||||
@@ -111,6 +109,8 @@ function scene.sceneInit(org)
|
||||
trophy=text.finesse_fc
|
||||
trophyColor=COLOR.lCyan
|
||||
end
|
||||
else
|
||||
rank,trophy=nil
|
||||
end
|
||||
if not(GAME.result or GAME.replaying)then
|
||||
GAME.pauseCount=GAME.pauseCount+1
|
||||
@@ -141,7 +141,7 @@ function scene.keyDown(key)
|
||||
SCN.swapTo("play","none")
|
||||
elseif key=="p"then
|
||||
if(GAME.result or GAME.replaying)and #PLAYERS==1 then
|
||||
resetGameData(true)
|
||||
resetGameData("r")
|
||||
SCN.swapTo("play","none")
|
||||
end
|
||||
elseif key=="o"then
|
||||
@@ -197,6 +197,32 @@ function scene.draw()
|
||||
|
||||
--Infos
|
||||
if GAME.frame>180 then
|
||||
gc.setLineWidth(2)
|
||||
--Finesse rank & trophy
|
||||
if rank then
|
||||
gc.setColor(1,1,1,T*.2)
|
||||
gc.rectangle("fill",35,305,465,405)
|
||||
|
||||
setFont(60)
|
||||
local c=fnsRankColor[rank]
|
||||
gc.setColor(c[1],c[2],c[3],T)
|
||||
gc.print(rank,420,635)
|
||||
if trophy then
|
||||
setFont(40)
|
||||
gc.setColor(trophyColor[1],trophyColor[2],trophyColor[3],T*2-1)
|
||||
gc.printf(trophy,100-120*(1-T^.5),650,300,"right")
|
||||
end
|
||||
|
||||
gc.setColor(1,1,1,T)
|
||||
gc.rectangle("line",35,305,465,405)
|
||||
gc.line(35,620,500,620)
|
||||
else
|
||||
gc.setColor(1,1,1,T*.2)
|
||||
gc.rectangle("fill",35,305,465,350)
|
||||
gc.setColor(1,1,1,T)
|
||||
gc.rectangle("line",35,305,465,350)
|
||||
end
|
||||
|
||||
_=form
|
||||
setFont(25)
|
||||
for i=1,10 do
|
||||
@@ -208,17 +234,22 @@ function scene.draw()
|
||||
--Mods
|
||||
if #GAME.mod>0 then
|
||||
if scoreValid()then
|
||||
gc.setColor(.7,.7,.7,T*.3)
|
||||
gc.setColor(.7,.7,.7,T)
|
||||
gc.rectangle("line",780,560,485,140)
|
||||
gc.setColor(.7,.7,.7,T*.26)
|
||||
gc.rectangle("fill",780,560,485,140)
|
||||
else
|
||||
gc.setColor(1,0,0,T*.3)
|
||||
gc.setColor(1,0,0,T)
|
||||
gc.rectangle("line",780,560,485,140)
|
||||
gc.setColor(1,0,0,T*.26)
|
||||
gc.rectangle("fill",780,560,485,140)
|
||||
end
|
||||
gc.rectangle("fill",780,575,485,140)
|
||||
setFont(35)
|
||||
for _,M in next,MODOPT do
|
||||
if M.sel>0 then
|
||||
_=M.color
|
||||
gc.setColor(_[1],_[2],_[3],T)
|
||||
mStr(M.id,810+M.no%8*60,575+int(M.no/8)*45)
|
||||
mStr(M.id,810+M.no%8*60,560+int(M.no/8)*45)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -245,25 +276,12 @@ function scene.draw()
|
||||
gc.print(str,50,-10,nil,1.8)
|
||||
end
|
||||
|
||||
--Finesse rank & trophy
|
||||
if rank then
|
||||
setFont(60)
|
||||
local c=fnsRankColor[rank]
|
||||
gc.setColor(c[1],c[2],c[3],T)
|
||||
gc.print(rank,420,635)
|
||||
if trophy then
|
||||
setFont(40)
|
||||
gc.setColor(trophyColor[1],trophyColor[2],trophyColor[3],T*2-1)
|
||||
gc.printf(trophy,100-120*(1-T^.5),650,300,"right")
|
||||
end
|
||||
end
|
||||
|
||||
--Radar Chart
|
||||
if T>.5 and GAME.frame>180 then
|
||||
T=T*2-1
|
||||
gc.setLineWidth(2)
|
||||
gc.push("transform")
|
||||
gc.translate(1026,400)
|
||||
gc.translate(1026,370)
|
||||
|
||||
--Polygon
|
||||
gc.push("transform")
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
local gc=love.graphics
|
||||
local gc_circle=gc.circle
|
||||
local tc=love.touch
|
||||
local TIME=TIME
|
||||
|
||||
@@ -31,7 +32,7 @@ function scene.sceneInit()
|
||||
GAME.restartCount=0
|
||||
if GAME.init then
|
||||
resetGameData()
|
||||
GAME.init=nil
|
||||
GAME.init=false
|
||||
end
|
||||
noKey=GAME.replaying
|
||||
noTouch=not SETTING.VKSwitch or noKey
|
||||
@@ -253,47 +254,10 @@ end
|
||||
local function drawAtkPointer(x,y)
|
||||
local t=sin(TIME()*20)
|
||||
gc.setColor(.2,.7+t*.2,1,.6+t*.4)
|
||||
gc.circle("fill",x,y,25,6)
|
||||
gc_circle("fill",x,y,25,6)
|
||||
local a=TIME()*3%1*.8
|
||||
gc.setColor(0,.6,1,.8-a)
|
||||
gc.circle("line",x,y,30*(1+a),6)
|
||||
end
|
||||
local function drawVirtualkey()
|
||||
local a=SETTING.VKAlpha
|
||||
local _
|
||||
if SETTING.VKIcon then
|
||||
local icons=TEXTURE.VKIcon
|
||||
for i=1,#VK do
|
||||
if VK[i].ava then
|
||||
local B=VK[i]
|
||||
gc.setColor(1,1,1,a)
|
||||
gc.setLineWidth(B.r*.07)
|
||||
gc.circle("line",B.x,B.y,B.r,10)--Button outline
|
||||
_=VK[i].pressTime
|
||||
gc.draw(icons[i],B.x,B.y,nil,B.r*.026+_*.08,nil,18,18)--Icon
|
||||
if _>0 then
|
||||
gc.setColor(1,1,1,a*_*.08)
|
||||
gc.circle("fill",B.x,B.y,B.r*.94,10)--Glow
|
||||
gc.circle("line",B.x,B.y,B.r*(1.4-_*.04),10)--Ripple
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
for i=1,#VK do
|
||||
if VK[i].ava then
|
||||
local B=VK[i]
|
||||
gc.setColor(1,1,1,a)
|
||||
gc.setLineWidth(B.r*.07)
|
||||
gc.circle("line",B.x,B.y,B.r,10)
|
||||
_=VK[i].pressTime
|
||||
if _>0 then
|
||||
gc.setColor(1,1,1,a*_*.08)
|
||||
gc.circle("fill",B.x,B.y,B.r*.94,10)
|
||||
gc.circle("line",B.x,B.y,B.r*(1.4-_*.04),10)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
gc_circle("line",x,y,30*(1+a),6)
|
||||
end
|
||||
function scene.draw()
|
||||
local t=TIME()
|
||||
@@ -302,13 +266,53 @@ function scene.draw()
|
||||
gc.setColor(1,1,1,.2+.1*(sin(3*t)+sin(2.6*t)))
|
||||
mStr(text.marking,190,60+26*sin(t))
|
||||
end
|
||||
|
||||
--Players
|
||||
for p=1,#PLAYERS do
|
||||
PLAYERS[p]:draw()
|
||||
end
|
||||
|
||||
--Virtual keys
|
||||
gc.setColor(1,1,1)
|
||||
if SETTING.VKSwitch then drawVirtualkey()end
|
||||
if SETTING.VKSwitch then
|
||||
local a=SETTING.VKAlpha
|
||||
local _
|
||||
if SETTING.VKIcon then
|
||||
local icons=TEXTURE.VKIcon
|
||||
for i=1,#VK do
|
||||
if VK[i].ava then
|
||||
local B=VK[i]
|
||||
gc.setColor(1,1,1,a)
|
||||
gc.setLineWidth(B.r*.07)
|
||||
gc_circle("line",B.x,B.y,B.r,10)--Button outline
|
||||
_=VK[i].pressTime
|
||||
gc.draw(icons[i],B.x,B.y,nil,B.r*.026+_*.08,nil,18,18)--Icon
|
||||
if _>0 then
|
||||
gc.setColor(1,1,1,a*_*.08)
|
||||
gc_circle("fill",B.x,B.y,B.r*.94,10)--Glow when press
|
||||
gc_circle("line",B.x,B.y,B.r*(1.4-_*.04),10)--Ripple
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
for i=1,#VK do
|
||||
if VK[i].ava then
|
||||
local B=VK[i]
|
||||
gc.setColor(1,1,1,a)
|
||||
gc.setLineWidth(B.r*.07)
|
||||
gc_circle("line",B.x,B.y,B.r,10)
|
||||
_=VK[i].pressTime
|
||||
if _>0 then
|
||||
gc.setColor(1,1,1,a*_*.08)
|
||||
gc_circle("fill",B.x,B.y,B.r*.94,10)
|
||||
gc_circle("line",B.x,B.y,B.r*(1.4-_*.04),10)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--Attacking & Being attacked
|
||||
if GAME.modeEnv.royaleMode then
|
||||
local P=PLAYERS[1]
|
||||
gc.setLineWidth(5)
|
||||
@@ -318,7 +322,9 @@ function scene.draw()
|
||||
gc.line(p.centerX,p.centerY,P.x+300*P.size,P.y+670*P.size)
|
||||
end
|
||||
if P.atkMode~=4 then
|
||||
if P.atking then drawAtkPointer(P.atking.centerX,P.atking.centerY)end
|
||||
if P.atking then
|
||||
drawAtkPointer(P.atking.centerX,P.atking.centerY)
|
||||
end
|
||||
else
|
||||
for i=1,#P.atker do
|
||||
local p=P.atker[i]
|
||||
|
||||
@@ -19,7 +19,7 @@ local function tick_httpREQ_register(task)
|
||||
end
|
||||
time=time+1
|
||||
if time>360 then
|
||||
LOG.print(text.httpTimeout,"message")
|
||||
LOG.print(text.loginFailed..": "..text.httpTimeout,"message")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
@@ -4,7 +4,7 @@ local int=math.floor
|
||||
local scene={}
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set("space")
|
||||
BG.set()
|
||||
end
|
||||
function scene.sceneBack()
|
||||
FILE.save(SETTING,"conf/settings")
|
||||
|
||||
@@ -60,12 +60,12 @@ scene.widgetList={
|
||||
|
||||
WIDGET.newButton{name="skinR", x=200,y=640,w=220,h=80,color="lPurple",font=35,
|
||||
code=function()
|
||||
SETTING.skin={1,7,11,3,14,4,9,1,7,1,7,11,3,14,4,9,14,9,11,3,11,3,1,7,4}
|
||||
SETTING.skin={1,7,11,3,14,4,9,1,7,2,6,10,2,13,5,9,15,10,11,3,10,2,16,8,4,10,13,2,8}
|
||||
SFX.play("rotate")
|
||||
end},
|
||||
WIDGET.newButton{name="faceR", x=480,y=640,w=220,h=80,color="lRed",font=35,
|
||||
code=function()
|
||||
for i=1,25 do
|
||||
for i=1,29 do
|
||||
SETTING.face[i]=0
|
||||
end
|
||||
SFX.play("hold")
|
||||
|
||||
@@ -13,7 +13,7 @@ function scene.sceneInit()
|
||||
last=0
|
||||
jump=0
|
||||
cv=SETTING.cv
|
||||
BG.set("space")
|
||||
BG.set()
|
||||
end
|
||||
function scene.sceneBack()
|
||||
FILE.save(SETTING,"conf/settings")
|
||||
|
||||
@@ -7,13 +7,13 @@ local scene={}
|
||||
|
||||
local defaultSetSelect
|
||||
local snapUnit
|
||||
local select--Button selected
|
||||
local selected--Button selected
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set("rainbow")
|
||||
defaultSetSelect=1
|
||||
snapUnit=1
|
||||
select=nil
|
||||
selected=false
|
||||
end
|
||||
function scene.sceneBack()
|
||||
FILE.save(VK_org,"conf/virtualkey")
|
||||
@@ -36,34 +36,34 @@ local function onVK_org(x,y)
|
||||
end
|
||||
function scene.mouseDown(x,y,k)
|
||||
if k==2 then SCN.back()end
|
||||
select=onVK_org(x,y)or select
|
||||
selected=onVK_org(x,y)or selected
|
||||
end
|
||||
function scene.mouseMove(_,_,dx,dy)
|
||||
if select and ms.isDown(1)and not WIDGET.sel then
|
||||
local B=VK_org[select]
|
||||
if selected and ms.isDown(1)and not WIDGET.sel then
|
||||
local B=VK_org[selected]
|
||||
B.x,B.y=B.x+dx,B.y+dy
|
||||
end
|
||||
end
|
||||
function scene.mouseUp()
|
||||
if select then
|
||||
local B=VK_org[select]
|
||||
if selected then
|
||||
local B=VK_org[selected]
|
||||
local k=snapUnit
|
||||
B.x,B.y=int(B.x/k+.5)*k,int(B.y/k+.5)*k
|
||||
end
|
||||
end
|
||||
function scene.touchDown(_,x,y)
|
||||
select=onVK_org(x,y)or select
|
||||
selected=onVK_org(x,y)or selected
|
||||
end
|
||||
function scene.touchUp()
|
||||
if select then
|
||||
local B=VK_org[select]
|
||||
if selected then
|
||||
local B=VK_org[selected]
|
||||
local k=snapUnit
|
||||
B.x,B.y=int(B.x/k+.5)*k,int(B.y/k+.5)*k
|
||||
end
|
||||
end
|
||||
function scene.touchMove(_,_,_,dx,dy)
|
||||
if select and not WIDGET.sel then
|
||||
local B=VK_org[select]
|
||||
if selected and not WIDGET.sel then
|
||||
local B=VK_org[selected]
|
||||
B.x,B.y=B.x+dx,B.y+dy
|
||||
end
|
||||
end
|
||||
@@ -73,7 +73,7 @@ local function VirtualkeyPreview()
|
||||
for i=1,#VK_org do
|
||||
local B=VK_org[i]
|
||||
if B.ava then
|
||||
local c=select==i and .6 or 1
|
||||
local c=selected==i and .6 or 1
|
||||
gc.setColor(c,1,c,SETTING.VKAlpha)
|
||||
gc.setLineWidth(B.r*.07)
|
||||
gc.circle("line",B.x,B.y,B.r,10)
|
||||
@@ -190,7 +190,7 @@ scene.widgetList={
|
||||
end
|
||||
end
|
||||
defaultSetSelect=defaultSetSelect%5+1
|
||||
select=nil
|
||||
selected=false
|
||||
LOG.print("[ "..defaultSetSelect.." ]")
|
||||
end},
|
||||
WIDGET.newSelector{name="snap", x=760,y=90,w=200,h=80,color="yellow",list={1,10,20,40,60,80},disp=function()return snapUnit end,code=function(i)snapUnit=i end},
|
||||
@@ -201,15 +201,15 @@ scene.widgetList={
|
||||
WIDGET.newButton{name="back", x=760,y=190,w=200,h=80,font=35,code=WIDGET.lnk_BACK},
|
||||
WIDGET.newSlider{name="size", x=450,y=270,w=460,unit=19,font=40,show="vkSize",
|
||||
disp=function()
|
||||
return VK_org[select].r/10-1
|
||||
return VK_org[selected].r/10-1
|
||||
end,
|
||||
code=function(v)
|
||||
if select then
|
||||
VK_org[select].r=(v+1)*10
|
||||
if selected then
|
||||
VK_org[selected].r=(v+1)*10
|
||||
end
|
||||
end,
|
||||
hide=function()
|
||||
return not select
|
||||
return not selected
|
||||
end},
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
local scene={}
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set("space")
|
||||
BG.set()
|
||||
end
|
||||
function scene.sceneBack()
|
||||
FILE.save(SETTING,"conf/settings")
|
||||
@@ -51,7 +51,7 @@ scene.widgetList={
|
||||
code=function()
|
||||
BG.set("none")
|
||||
SETTING.bg=not SETTING.bg
|
||||
BG.set("space")
|
||||
BG.set()
|
||||
end},
|
||||
WIDGET.newSwitch{name="power", x=990, y=640,font=35,disp=WIDGET.lnk_SETval("powerInfo"),
|
||||
code=function()
|
||||
|
||||
@@ -8,7 +8,7 @@ local time,v
|
||||
function scene.sceneInit()
|
||||
time=0
|
||||
v=1
|
||||
BG.set("space")
|
||||
BG.set()
|
||||
end
|
||||
|
||||
function scene.mouseDown(x,y)
|
||||
|
||||
@@ -17,7 +17,7 @@ for i=1,20 do
|
||||
end
|
||||
|
||||
TEXTURE.miniBlock={}
|
||||
for i=1,25 do
|
||||
for i=1,29 do
|
||||
local b=BLOCKS[i][0]
|
||||
TEXTURE.miniBlock[i]=C(#b[1],#b)
|
||||
for y=1,#b do for x=1,#b[1]do
|
||||
|
||||
@@ -11,14 +11,14 @@ function Tick.httpREQ_getAccessToken(task)
|
||||
LOG.print(text.accessSuccessed)
|
||||
USER.access_token=res.access_token
|
||||
FILE.save(USER,"conf/user")
|
||||
SCN.swapTo("netgame")
|
||||
SCN.swapTo("net_menumenu")
|
||||
else
|
||||
LOG.print(text.netErrorCode..response.code..": "..res.message,"warn")
|
||||
end
|
||||
else
|
||||
LOGIN=false
|
||||
USER.access_token=nil
|
||||
USER.auth_token=nil
|
||||
USER.access_token=false
|
||||
USER.auth_token=false
|
||||
local err=json.decode(response.body)
|
||||
if err then
|
||||
LOG.print(text.loginFailed..": "..text.netErrorCode..response.code.."-"..err.message,"warn")
|
||||
@@ -33,7 +33,7 @@ function Tick.httpREQ_getAccessToken(task)
|
||||
end
|
||||
time=time+1
|
||||
if time>360 then
|
||||
LOG.print(text.httpTimeout,"message")
|
||||
LOG.print(text.loginFailed..": "..text.httpTimeout,"message")
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -54,7 +54,7 @@ local function tick_wsCONN_read()
|
||||
end
|
||||
elseif readErr then
|
||||
wsWrite("/quit")
|
||||
WSCONN=nil
|
||||
WSCONN=false
|
||||
LOG.print(text.wsDisconnected,"warn")
|
||||
return
|
||||
end
|
||||
@@ -76,7 +76,7 @@ function Tick.wsCONN_connect(task)
|
||||
end
|
||||
time=time+1
|
||||
if time>360 then
|
||||
LOG.print(text.httpTimeout,"message")
|
||||
LOG.print(text.wsFailed..": "..text.httpTimeout,"message")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
@@ -36,15 +36,45 @@ local S=[=[
|
||||
扫雷; 坦克大战
|
||||
打砖块; 速算; 各种计算器小游戏移植
|
||||
按块回放录像; 联网对战
|
||||
UI重做; 游戏内文档
|
||||
隔断消除; 架空消除; 混合消除; 彩色消除
|
||||
物理hold; 多方块; 自由场地尺寸
|
||||
物理hold; 多方块; 自由场地尺寸; XRS
|
||||
特殊控件(虚拟摇杆等); task-Z(新AI)
|
||||
移动n格+硬降复合操作键; 手柄/手势操作
|
||||
画图智能画笔; 自定义游戏按各种目标复制数据
|
||||
任意尺寸屏幕的UI; 3D背景; 1/2/3连块
|
||||
移动n格+硬降复合操作键; 手柄操作; 手势操作
|
||||
特殊控件(虚拟摇杆等); task-Z(新AI); 机器人调试模式
|
||||
UI重做; 游戏内文档
|
||||
任意尺寸屏幕的UI; 3D背景
|
||||
热更新; 工程编译到字节码; 超60帧; 跳帧开关
|
||||
|
||||
0.12.X: 圣诞快乐 Merry Christmas
|
||||
新增:
|
||||
新增BGM:mXmas
|
||||
改动:
|
||||
调整magicblock的音质
|
||||
升级i2的踢墙表
|
||||
修复:
|
||||
o1旋转后锁定报错
|
||||
自定义模式开ai报错
|
||||
非20G高重力块穿模
|
||||
|
||||
0.12.25: N连块 N-mino
|
||||
新增:
|
||||
加入1~3连块
|
||||
新BGM:Magicblock(用于混战模式)
|
||||
极简连击计数器显示AP和FC的颜色
|
||||
两个ScF做的新皮肤,Penta皮肤微调
|
||||
自定义序列添加随机生成一包的按钮,调整ui支持1~3连块
|
||||
节日彩蛋系统,新背景飘雪
|
||||
改动:
|
||||
暂停界面排版升级
|
||||
快速重开不再有入场动画
|
||||
五连块颜色调整
|
||||
调整一些模式的bgm
|
||||
高速经典模式隐藏180度旋转键
|
||||
代码:
|
||||
玩家属性imgY更名ghoY
|
||||
删除mino文件,较小规模代码整理
|
||||
一些性能优化
|
||||
|
||||
0.12.9: 修复更新 Fixup Update
|
||||
改动:
|
||||
玩家出场动画加速
|
||||
|
||||
Reference in New Issue
Block a user