Zframework finished

This commit is contained in:
MrZ_26
2020-07-08 20:26:28 +08:00
parent cdd5194108
commit a3302ab2bc
47 changed files with 308 additions and 275 deletions

View File

@@ -1,7 +1,7 @@
local min=math.min local min=math.min
local rem=table.remove local rem=table.remove
local function fadeOut(_,id) local function fadeOut(id)
local src=BGM.list[id] local src=BGM.list[id]
local v=src:getVolume()-.025*setting.bgm*.1 local v=src:getVolume()-.025*setting.bgm*.1
src:setVolume(v>0 and v or 0) src:setVolume(v>0 and v or 0)
@@ -10,7 +10,7 @@ local function fadeOut(_,id)
return true return true
end end
end end
local function fadeIn(_,id) local function fadeIn(id)
local src=BGM.list[id] local src=BGM.list[id]
local v=min(src:getVolume()+.025*setting.bgm*.1,setting.bgm*.1) local v=min(src:getVolume()+.025*setting.bgm*.1,setting.bgm*.1)
src:setVolume(v) src:setVolume(v)
@@ -27,7 +27,7 @@ BGM.list={
"secret7th","secret8th", "secret7th","secret8th",
"shining terminal","oxygen","distortion","far", "shining terminal","oxygen","distortion","far",
"rockblock","cruelty","final","8-bit happiness","end", "rockblock","cruelty","final","8-bit happiness","end",
"hay what kind of feeling", "how feeling",
} }
BGM.len=#BGM.list BGM.len=#BGM.list
function BGM.loadOne(N) function BGM.loadOne(N)
@@ -53,12 +53,12 @@ function BGM.play(s)
return return
end end
if BGM.nowPlay~=s then if BGM.nowPlay~=s then
if BGM.nowPlay then TASK.new(fadeOut,nil,BGM.nowPlay)end if BGM.nowPlay then TASK.new(fadeOut,BGM.nowPlay)end
TASK.changeCode(fadeIn,fadeOut) TASK.changeCode(fadeIn,fadeOut)
TASK.removeTask_data(s) TASK.removeTask_data(s)
BGM.nowPlay,BGM.suspend=s BGM.nowPlay,BGM.suspend=s
TASK.new(fadeIn,nil,s) TASK.new(fadeIn,s)
BGM.playing=BGM.list[s] BGM.playing=BGM.list[s]
BGM.playing:play() BGM.playing:play()
end end
@@ -81,7 +81,7 @@ function BGM.freshVolume()
end end
function BGM.stop() function BGM.stop()
if BGM.nowPlay then if BGM.nowPlay then
TASK.new(fadeOut,nil,BGM.nowPlay) TASK.new(fadeOut,BGM.nowPlay)
end end
TASK.changeCode(fadeIn,fadeOut) TASK.changeCode(fadeIn,fadeOut)
BGM.playing,BGM.nowPlay=nil BGM.playing,BGM.nowPlay=nil

View File

@@ -15,7 +15,7 @@ local function splitS(s,sep)
return t return t
end end
local tabs={ local tabs={
[0]="", [0]="",
"\t", "\t",
"\t\t", "\t\t",
"\t\t\t", "\t\t\t",

View File

@@ -1,3 +1,24 @@
require("Zframework/toolfunc")
color= require("Zframework/color")
SHADER= require("Zframework/shader")
VIB= require("Zframework/vib")
SFX= require("Zframework/sfx")
sysFX= require("Zframework/sysFX")
BG= require("Zframework/bg")
BGM= require("Zframework/bgm")
VOC= require("Zframework/voice")
LANG= require("Zframework/languages")
FILE= require("Zframework/file")
TEXT= require("Zframework/text")
TASK= require("Zframework/task")
IMG= require("Zframework/img")
WIDGET= require("Zframework/widget")
Widgets=require("Zframework/widgetList")
LIGHT= require("Zframework/light")
SCN= require("Zframework/scene")
local Tmr=require("Zframework/timer")
local Pnt=require("Zframework/paint")
local ms,kb,tc=love.mouse,love.keyboard,love.touch local ms,kb,tc=love.mouse,love.keyboard,love.touch
local gc,sys=love.graphics,love.system local gc,sys=love.graphics,love.system
local Timer=love.timer.getTime local Timer=love.timer.getTime
@@ -14,9 +35,6 @@ joysticks={}
local devMode local devMode
local Tmr=require("timer")
local Pnt=require("paint")
local infoCanvas=gc.newCanvas(108,27) local infoCanvas=gc.newCanvas(108,27)
local function updatePowerInfo() local function updatePowerInfo()
local state,pow=sys.getPowerInfo() local state,pow=sys.getPowerInfo()

View File

@@ -9,17 +9,14 @@ end
function TASK.update() function TASK.update()
for i=#tasks,1,-1 do for i=#tasks,1,-1 do
local T=tasks[i] local T=tasks[i]
if T.code(T.P,T.data)then if T.code(T.data)then
for i=i,#tasks do rem(tasks,i)
tasks[i]=tasks[i+1]
end
end end
end end
end end
function TASK.new(code,P,data) function TASK.new(code,data)
tasks[#tasks+1]={ tasks[#tasks+1]={
code=code, code=code,
P=P,
data=data, data=data,
} }
end end

View File

@@ -1,4 +1,6 @@
local gc=love.graphics local gc=love.graphics
local int=math.floor
local format=string.format
local fontData=love.filesystem.newFile("font.ttf") local fontData=love.filesystem.newFile("font.ttf")
local newFont=gc.setNewFont local newFont=gc.setNewFont
@@ -19,8 +21,6 @@ function setFont(s)
return f return f
end end
local int=math.floor
local format=string.format
function toTime(s) function toTime(s)
if s<60 then if s<60 then
return format("%.3fs",s) return format("%.3fs",s)

View File

@@ -1,7 +1,7 @@
local level={0,0,.015,.02,.03,.04,.05,.06,.07,.08} local level={0,0,.015,.02,.03,.04,.05,.06,.07,.08}
local _=love.system.vibrate local _=love.system.vibrate
return function(t) return function(t)
local L=setting.vib local L=setting.vib
if L>0 then if L>0 then
_(level[L+t]) _(level[L+t])
end end

View File

@@ -1,10 +1,10 @@
gameVersion="Alpha V0.8.24" gameVersion="Alpha V0.9.0"
function love.conf(t) function love.conf(t)
t.identity="Techmino"--folder name t.identity="Techmino"--saving folder
t.version="11.1" t.version="11.1"
t.console=false t.console=false
t.gammacorrect=false t.gammacorrect=false
t.appendidentity=true--search files in source before save directory t.appendidentity=true--search files in source then in save directory
t.accelerometerjoystick=false--accelerometer=joystick on ios/android t.accelerometerjoystick=false--accelerometer=joystick on ios/android
if t.audio then t.audio.mixwithsystem=true end if t.audio then t.audio.mixwithsystem=true end

View File

@@ -56,60 +56,60 @@ back to back(B2B)点数说明:
在拼图模式下,按功能键切换是否展示提示.其中打"X"的格子不允许有方块,空的格子可以是任何状态,普通的七种彩色方块必须颜色对应,垃圾行方块的为止只要有方块就可以,但是不能是空气,玩家拼出自己画的图后就会判定胜利. 在拼图模式下,按功能键切换是否展示提示.其中打"X"的格子不允许有方块,空的格子可以是任何状态,普通的七种彩色方块必须颜色对应,垃圾行方块的为止只要有方块就可以,但是不能是空气,玩家拼出自己画的图后就会判定胜利.
Gameplay: Gameplay:
System will offer a series of tetrominoes ("Pieces". There are 7 types), and the player needs to control [them] (move left and right, rotate 90, 180 or 270 degrees), filling a row on the play field will clear it, attack will be sent depending on the type of the line clear (if there is an opponent) System will offer a series of tetrominoes ("Pieces". There are 7 types), and the player needs to control [them] (move left and right, rotate 90, 180 or 270 degrees), filling a row on the play field will clear it, attack will be sent depending on the type of the line clear (if there is an opponent)
Survive till the last or complete the level's goal to win. Survive till the last or complete the level's goal to win.
Rotation system: Rotation system:
Uses Techmino's custom rotation system. Too lazy to write the details Uses Techmino's custom rotation system. Too lazy to write the details
Spin detection: Spin detection:
Combines immobile and 3-corner detection, and whether a spin is mini also depends on the data used for detection. Also too lazy to write the details Combines immobile and 3-corner detection, and whether a spin is mini also depends on the data used for detection. Also too lazy to write the details
Attack system: Attack system:
Regular line clears: Regular line clears:
Single/Double/Triple/Techrash sends 0.25/1.25/2.25/4 Single/Double/Triple/Techrash sends 0.25/1.25/2.25/4
Special line clears: Special line clears:
Spin Single/Double/Triple sends 2/4/6, half if Mini Spin Single/Double/Triple sends 2/4/6, half if Mini
B2B: +1 (Techrash/Spin Single/Spin Double) or +2 (Spin Triple) B2B: +1 (Techrash/Spin Single/Spin Double) or +2 (Spin Triple)
B2B2B/B3B: In addition to B2B, +1 if Techrash, +(0.5 * lines cleared) if Spin, and in both cases +1 additional blocking B2B2B/B3B: In addition to B2B, +1 if Techrash, +(0.5 * lines cleared) if Spin, and in both cases +1 additional blocking
Wide Combo: 0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 3, then 2 afterwards Wide Combo: 0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 3, then 2 afterwards
Dig Combo: 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 4, then 5 afterwards Dig Combo: 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 4, then 5 afterwards
Special line clears will increase B2B gauge, making later special line clears have B2B or B2B2B bonus (see below) Special line clears will increase B2B gauge, making later special line clears have B2B or B2B2B bonus (see below)
Half Perfect Clear (a Perfect Clear "with blocks left below". If it's an I clearing 1 line, then the remaining blocks must not be player-placed): Attack +2, Extra Blocking +2 Half Perfect Clear (a Perfect Clear "with blocks left below". If it's an I clearing 1 line, then the remaining blocks must not be player-placed): Attack +2, Extra Blocking +2
Perfect Clear: square root all damage above, then +6 to +12 attack (increases within a round) and +2 extra blocking. (note: if lines cleared in this round >4, then B2B gauge will be filled) Perfect Clear: square root all damage above, then +6 to +12 attack (increases within a round) and +2 extra blocking. (note: if lines cleared in this round >4, then B2B gauge will be filled)
After calculating all above, the damage value will be rounded down then sent After calculating all above, the damage value will be rounded down then sent
Score system: Score system:
The more impressive you play, the more score you get The more impressive you play, the more score you get
Attack delay: Attack delay:
Attack from Doubles/Triples take effect the faster, then Techrash, Spins send rather slow attack, and high combos will send the slowest Attack from Doubles/Triples take effect the faster, then Techrash, Spins send rather slow attack, and high combos will send the slowest
B2B or B2B2B, while they increase lines sent, they also increase the attack delay. Minis will greatly increase delay. B2B or B2B2B, while they increase lines sent, they also increase the attack delay. Minis will greatly increase delay.
Countering: Countering:
When you send attack, if there is garbage in queue, extra blocking will be used first, then attack, countering the earliest attack at a 1:1 ratio. When you send attack, if there is garbage in queue, extra blocking will be used first, then attack, countering the earliest attack at a 1:1 ratio.
Unused extra blocking will be discarded, then remaining attack will be sent to your opponent. Unused extra blocking will be discarded, then remaining attack will be sent to your opponent.
Back to Back (B2B) gauge: Back to Back (B2B) gauge:
The B2B gauge ranges from 0 to 1,200. Special line clears are B2B if the gauge is >=40, B2B2B if >1,000. The B2B gauge ranges from 0 to 1,200. Special line clears are B2B if the gauge is >=40, B2B2B if >1,000.
A regular line clear -250 A regular line clear -250
Spin Single/Double/Triple +50/100/180 (x40% if Mini) Spin Single/Double/Triple +50/100/180 (x40% if Mini)
Techrash +100 Techrash +100
Spin without clearing lines +20, but gauge cannot exceed 1,000 with this method Spin without clearing lines +20, but gauge cannot exceed 1,000 with this method
When gauge is above 1,000, a drop without clearing lines -40 (cannot drop below 1,000 with this method) When gauge is above 1,000, a drop without clearing lines -40 (cannot drop below 1,000 with this method)
Battle Royale modes: Battle Royale modes:
Many players play within one game (all opponents are bots, not real players). As players get eliminated, blocks fall faster, and garbage take effect faster, as well as rise faster. KO-ing another player grants you one badge plus all badge that player has, increasing your attack power. Many players play within one game (all opponents are bots, not real players). As players get eliminated, blocks fall faster, and garbage take effect faster, as well as rise faster. KO-ing another player grants you one badge plus all badge that player has, increasing your attack power.
Players can select one of 4 attack modes: Players can select one of 4 attack modes:
1. Random: Every time you attack, 10% chance to lock onto a random player. 1. Random: Every time you attack, 10% chance to lock onto a random player.
2. Badges: After you attack or when your target dies, lock onto the player with the most badges. 2. Badges: After you attack or when your target dies, lock onto the player with the most badges.
3. KOs: After you attack or when your target dies, lock onto the player with the highest field. (This refreshes every second) 3. KOs: After you attack or when your target dies, lock onto the player with the highest field. (This refreshes every second)
4. Counter: attack all players locking onto yourself. Your attack will be sent to all of them. If you are not targetted, you attack a random player (not locking). 4. Counter: attack all players locking onto yourself. Your attack will be sent to all of them. If you are not targetted, you attack a random player (not locking).
The last survivor wins. The last survivor wins.
Custom mode: Custom mode:
You can freely adjust most parameters (not including special effects of other game modes), and you can also draw a field to clear or make a template to build. You can freely adjust most parameters (not including special effects of other game modes), and you can also draw a field to clear or make a template to build.
In build (puzzle) mode, you can toggle template display with Function key. Cells with a X cannot have blocks; empty cells can be in any state; regular colored cells have to be made of the corresponding block; garbage-colored cells can be any block but not air. Once you make the shape, you will win. In build (puzzle) mode, you can toggle template display with Function key. Cells with a X cannot have blocks; empty cells can be in any state; regular colored cells have to be made of the corresponding block; garbage-colored cells can be any block but not air. Once you make the shape, you will win.
附录Appendix: 附录Appendix:
ZXC's cool O-spin map:XY0BCgAwCAIR7v9vHtUSt8AS0xKqgpnNGyXkrmFNePf6qi3BbQPrHT2Owxe6D66NeKi86dwB ZXC's cool O-spin map:XY0BCgAwCAIR7v9vHtUSt8AS0xKqgpnNGyXkrmFNePf6qi3BbQPrHT2Owxe6D66NeKi86dwB

View File

@@ -4,7 +4,6 @@
]] ]]
--Global Setting & Vars --Global Setting & Vars
package.path="./?.lua;./parts/?.lua;./modules/?.lua"
math.randomseed(os.time()*626) math.randomseed(os.time()*626)
love.keyboard.setKeyRepeat(true) love.keyboard.setKeyRepeat(true)
love.keyboard.setTextInput(false) love.keyboard.setTextInput(false)
@@ -32,41 +31,23 @@ preField={h=20}for i=1,20 do preField[i]={0,0,0,0,0,0,0,0,0,0}end
players={alive={},human=0} players={alive={},human=0}
--blockSkin,blockSkinMini={},{}--redefined in SKIN.change --blockSkin,blockSkinMini={},{}--redefined in SKIN.change
require("Zframework")--load Zframework
--Load modules --Load modules
color= require("color") blocks= require("parts/mino")
blocks= require("mino") AITemplate= require("parts/AITemplate")
AITemplate= require("AITemplate") freeRow= require("parts/freeRow")
freeRow= require("freeRow")
require("toolfunc") require("parts/list")
require("list") require("parts/gametoolfunc")
require("gametoolfunc") require("parts/texture")
require("texture") require("parts/default_data")
require("default_data")
SKIN= require("skin") SKIN= require("parts/skin")
PLY= require("player") PLY= require("parts/player")
AIfunc= require("ai") AIfunc= require("parts/ai")
Modes= require("modes") Modes= require("parts/modes")
--load Z's Framework
SHADER= require("shader")
VIB= require("vib")
SFX= require("sfx")
sysFX= require("sysFX")
BG= require("bg")
BGM= require("bgm")
VOC= require("voice")
LANG= require("languages")
FILE= require("file")
TEXT= require("text")
TASK= require("task")
IMG= require("img")
WIDGET= require("widget")
Widgets=require("widgetList")
LIGHT= require("light")
SCN= require("scene")
require("callback")
--load files & settings --load files & settings
modeRanks={}for i=1,#Modes do modeRanks[i]=false assert(i==Modes[i].id,"ModeID error:"..i)end modeRanks={}for i=1,#Modes do modeRanks[i]=false assert(i==Modes[i].id,"ModeID error:"..i)end
@@ -76,7 +57,8 @@ local fs=love.filesystem
if fs.getInfo("keymap.dat")then fs.remove("keymap.dat")end if fs.getInfo("keymap.dat")then fs.remove("keymap.dat")end
if fs.getInfo("setting.dat")then fs.remove("setting.dat")end if fs.getInfo("setting.dat")then fs.remove("setting.dat")end
if fs.getInfo("settings.dat")then FILE.loadSetting() if fs.getInfo("settings.dat")then
FILE.loadSetting()
else else
-- firstRun=true -- firstRun=true
if system=="Android"or system=="iOS" then if system=="Android"or system=="iOS" then

View File

@@ -23,9 +23,8 @@ return{
end end
B.sum=B.sum+22 B.sum=B.sum+22
P.stat.recv=P.stat.recv+22 P.stat.recv=P.stat.recv+22
if D.event<50 then D.event=D.event+1
D.event=D.event+1 if D.event%10==0 then
D.point=int(72e4/t)*.1
if D.event==20 then if D.event==20 then
P:showTextF(text.great,0,-140,100,"appear",.6) P:showTextF(text.great,0,-140,100,"appear",.6)
P.gameEnv.pushSpeed=3 P.gameEnv.pushSpeed=3

View File

@@ -1,4 +1,4 @@
local int,rnd=math.floor,math.random local int,rnd,min=math.floor,math.random,math.min
return{ return{
color=color.lightYellow, color=color.lightYellow,
env={ env={
@@ -7,32 +7,31 @@ return{
freshLimit=15, freshLimit=15,
task=function(P) task=function(P)
if not(P.control and SCN.cur=="play")then return end if not(P.control and SCN.cur=="play")then return end
if P.atkBuffer.sum<2 then if P.atkBuffer.sum<4 then
local p=#P.atkBuffer+1 local p=#P.atkBuffer+1
local B,D=P.atkBuffer,P.modeData local B,D=P.atkBuffer,P.modeData
local s,t local s,t
if D.event<10 then if D.event<10 then
t=1000-20*D.event--1000~800 t=800-10*D.event--800~700
B[p]= {pos=rnd(5,6),amount=10,countdown=t,cd0=t,time=0,sent=false,lv=3} B[p]= {pos=rnd(5,6),amount=9,countdown=t,cd0=t,time=0,sent=false,lv=3}
B[p+1]= {pos=rnd(4,7),amount=12,countdown=t,cd0=t,time=0,sent=false,lv=4} B[p+1]= {pos=rnd(4,7),amount=11,countdown=t,cd0=t+62,time=0,sent=false,lv=4}
s=22 s=20
elseif D.event<20 then elseif D.event<20 then
t=800-20*(D.event-15)--800~600 t=800-10*D.event--700~600
B[p]= {pos=rnd(3,8),amount=11,countdown=t,cd0=t,time=0,sent=false,lv=4} B[p]= {pos=rnd(3,8),amount=11,countdown=t,cd0=t,time=0,sent=false,lv=4}
B[p+1]= {pos=rnd(4,7),amount=14,countdown=t,cd0=t,time=0,sent=false,lv=5} B[p+1]= {pos=rnd(4,7),amount=13,countdown=t,cd0=t+62,time=0,sent=false,lv=5}
s=25 s=24
else else
t=600-15*(D.event-30)--600~450 t=600-15*(min(D.event-20,10))--600~450
B[p]= {pos=rnd(2)*9-8,amount=12,countdown=t,cd0=t,time=0,sent=false,lv=5} B[p]= {pos=rnd(2)*9-8,amount=14,countdown=t,cd0=t,time=0,sent=false,lv=5}
B[p+1]= {pos=rnd(3,8),amount=16,countdown=t,cd0=t,time=0,sent=false,lv=5} B[p+1]= {pos=rnd(3,8),amount=14,countdown=t+62,cd0=t,time=0,sent=false,lv=5}
s=28 s=28
end end
B.sum=B.sum+s B.sum=B.sum+s
P.stat.recv=P.stat.recv+s P.stat.recv=P.stat.recv+s
if D.event<45 then D.event=D.event+1
D.event=D.event+1 if D.event%10==0 then
D.point=int(s*36e3/t)*.1 if D.event==10 then
if D.event==10 then
P:showTextF(text.great,0,-140,100,"appear",.6) P:showTextF(text.great,0,-140,100,"appear",.6)
P.gameEnv.pushSpeed=4 P.gameEnv.pushSpeed=4
elseif D.event==20 then elseif D.event==20 then

View File

@@ -59,7 +59,7 @@ return{
if L==100 then if L==100 then
local T=P.stat.time local T=P.stat.time
return return
T<=40 and 5 or T<=36 and 5 or
T<=60 and 4 or T<=60 and 4 or
3 3
else else

View File

@@ -57,7 +57,7 @@ return{
if L==100 then if L==100 then
local T=P.stat.time local T=P.stat.time
return return
T<=30 and 5 or T<=32 and 5 or
T<=50 and 4 or T<=50 and 4 or
T<=80 and 3 or T<=80 and 3 or
2 2

View File

@@ -31,7 +31,7 @@ local function newPC(P)
P.modeData.symmetry=symmetry P.modeData.symmetry=symmetry
P:pushNext(L,symmetry) P:pushNext(L,symmetry)
P.modeData.counter=P.stat.piece==0 and 20 or 0 P.modeData.counter=P.stat.piece==0 and 20 or 0
TASK.new(task_PC,P) P:newTask(task_PC)
local s=P.stat.pc*.25 local s=P.stat.pc*.25
if int(s)==s and s>0 then if int(s)==s and s>0 then

View File

@@ -37,7 +37,7 @@ local function newPC(P)
P.modeData.symmetry=symmetry P.modeData.symmetry=symmetry
P:pushNext(L,symmetry) P:pushNext(L,symmetry)
P.modeData.counter=P.stat.piece==0 and 20 or 0 P.modeData.counter=P.stat.piece==0 and 20 or 0
TASK.new(task_PC,P) P:newTask(task_PC)
end end
end end
return{ return{

View File

@@ -32,8 +32,8 @@ return{
T<=62 and 5 or T<=62 and 5 or
T<=90 and 4 or T<=90 and 4 or
T<=130 and 3 or T<=130 and 3 or
T<=200 and 2 or T<=196 and 2 or
T<=360 and 1 or T<=260 and 1 or
0 0
end, end,
} }

View File

@@ -32,8 +32,8 @@ return{
T<=626 and 5 or T<=626 and 5 or
T<=1000 and 4 or T<=1000 and 4 or
T<=1400 and 3 or T<=1400 and 3 or
T<=2260 and 2 or T<=2060 and 2 or
T<=3260 and 1 or T<=2600 and 1 or
0 0
end, end,
} }

View File

@@ -32,8 +32,8 @@ return{
T<=255 and 5 or T<=255 and 5 or
T<=326 and 4 or T<=326 and 4 or
T<=462 and 3 or T<=462 and 3 or
T<=626 and 2 or T<=555 and 2 or
T<=1260 and 1 or T<=626 and 1 or
0 0
end, end,
} }

View File

@@ -3,6 +3,9 @@ local function tech_check_hard(P)
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
P:lose() P:lose()
end end
if P.stat.row>=200 then
P:win("finish")
end
end end
return{ return{

View File

@@ -3,6 +3,9 @@ local function tech_check_easy(P)
if #P.clearedRow>0 and P.b2b<40 then if #P.clearedRow>0 and P.b2b<40 then
P:lose() P:lose()
end end
if P.stat.row>=200 then
P:win("finish")
end
end end
return{ return{

View File

@@ -3,6 +3,9 @@ local function tech_check_hard(P)
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
P:lose() P:lose()
end end
if P.stat.row>=200 then
P:win("finish")
end
end end
return{ return{

View File

@@ -3,6 +3,9 @@ local function tech_check_easy(P)
if #P.clearedRow>0 and P.b2b<40 then if #P.clearedRow>0 and P.b2b<40 then
P:lose() P:lose()
end end
if P.stat.row>=200 then
P:win("finish")
end
end end
return{ return{

View File

@@ -3,6 +3,9 @@ local function tech_check_hard(P)
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
P:lose() P:lose()
end end
if P.stat.row>=200 then
P:win("finish")
end
end end
return{ return{

View File

@@ -3,6 +3,9 @@ local function tech_check_easy(P)
if #P.clearedRow>0 and P.b2b<40 then if #P.clearedRow>0 and P.b2b<40 then
P:lose() P:lose()
end end
if P.stat.row>=200 then
P:win("finish")
end
end end
return{ return{

View File

@@ -3,6 +3,9 @@ local function tech_check_hard(P)
if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then if #P.clearedRow>0 and P.lastClear<10 or P.lastClear==74 then
P:lose() P:lose()
end end
if P.stat.row>=200 then
P:win("finish")
end
end end
return{ return{

View File

@@ -7,6 +7,7 @@ return{
drop=1e99,lock=60, drop=1e99,lock=60,
freshLimit=15, freshLimit=15,
target=200, target=200,
dropPiece=PLY.reach_winCheck,
fineKill=true, fineKill=true,
bg="flink",bgm="infinite", bg="flink",bgm="infinite",
}, },

View File

@@ -20,9 +20,9 @@ function freeRow.get(val)
end end
_=_+10 _=_+10
end end
local t=L[_] local t=L[_]
for i=1,10 do t[i]=val end for i=1,10 do t[i]=val end
L[_]=nil L[_]=nil
_=_-1 _=_-1
return t return t
end end
@@ -31,6 +31,6 @@ function freeRow.discard(t)
L[_]=t L[_]=t
end end
function freeRow.getCount() function freeRow.getCount()
return _ return _
end end
return freeRow return freeRow

View File

@@ -236,7 +236,7 @@ function resetPartGameData()
TEXT.clear() TEXT.clear()
if modeEnv.task then if modeEnv.task then
for i=1,#players do for i=1,#players do
players[i].newTask(modeEnv.task) players[i]:newTask(modeEnv.task)
end end
end end
if modeEnv.royaleMode then if modeEnv.royaleMode then
@@ -271,7 +271,7 @@ function resetGameData()
curMode.load()--bg/bgm need redefine in custom,so up here curMode.load()--bg/bgm need redefine in custom,so up here
if modeEnv.task then if modeEnv.task then
for i=1,#players do for i=1,#players do
players[i].newTask(modeEnv.task) players[i]:newTask(modeEnv.task)
end end
end end
BG.set(modeEnv.bg) BG.set(modeEnv.bg)

View File

@@ -1,155 +1,151 @@
local L local L
if setting.lang==1 then if setting.lang==1 or setting.lang==2 then
L={ L={
"不是动画,真的在加载!", "ZS JL T O I",
"大满贯10连击消四全清!", "tetr.js 也很好玩!",
"<方块研究所>有一个Nspire-CX版本!", "tetr.io 也很好玩!",
"B2B2B???", "Techminohaowan",
"B2B2B2B存在吗?", "Techmino 好玩!",
"MEGACMB!", "S T S D 必 死",
"ALLSPIN!", "REGRET!!",
"O型回旋三清!", "osu好玩!",
"O spin Triple!",
"nullpomino 也很好玩!",
"Miya:喵!", "Miya:喵!",
"2+2=Miya", "LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF",
"225238922 哔哩哔哩 干杯~",
"适度游戏益脑,沉迷游戏伤身,合理安排时间,享受健康生活",
"合群了就会消失, 但是消失不代表没有意义",
"学会使用两个旋转键, 三个更好",
"更小的DAS和ARR拥有更高的操作上限(如果你还能控制得了的话)",
"注意到\"旋转\"到底对方块做了些什么吗?",
"20G本质是一套全新的游戏规则",
"不要在上课时玩游戏!",
"本游戏难度上限很高, 做好心理准备",
"本游戏可不是休闲游戏",
"调到特殊的日期也不会发生什么的",
"3.1415926535897932384",
"2.7182818284590452353",
"Let-The-Bass-Kick!", "Let-The-Bass-Kick!",
"使用love2d引擎制作", "l-=-1",
"jstris 也很好玩!",
"iced,永远的神",
"DT炮=TSD+TST炮",
"COOL!!",
"CLASSIC SEXY RUSSIAN BLOCKS",
"BT炮=beta炮",
"bdg tql wsl",
"B2B2B2B存在吗?",
"B2B2B???",
"Am G F G",
"ALLSPIN!",
"注意到\"旋转\"到底对方块做了些什么吗?",
"有疑问? 先看设置有没有你想要的", "有疑问? 先看设置有没有你想要的",
"有建议的话可以把信息反馈给作者~", "有建议的话可以把信息反馈给作者~",
"不要按F10", "学会使用两个旋转键, 三个更好",
"秘密数字:626", "享受特色旋转系统!",
"CLASSIC SEXY RUSSIAN BLOCKS", "我的世界好玩!",
"戴上耳机以获得最佳体验", "提前旋转等设置可以用来救命",
"少女祈祷中", "泰拉瑞亚好玩!",
"LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF",
"(RUR'U')R'FR2U'R'U'(RUR'F')",
"Am G F G",
"联网还没做呢, 别急",
"\"免费吃鸡方块\"",
"Techminohaowan",
"Techmino 好玩!",
"tetr.js 也很好玩!",
"jstris 也很好玩!",
"tetr.io 也很好玩!",
"nullpomino 也很好玩!",
"↑↑↓↓←→←→BABA",
"草(日本语)",
"dym,永远的神",
"iced,永远的神",
}
elseif setting.lang==2 then
L={
"不是动画,真的在加载!",
"大满贯10连击消四全清!",
"<方块研究所>有一个Nspire-CX版本!",
"B2B2B???",
"B2B2B2B存在吗?",
"MEGACMB!",
"ALLSPIN!",
"O spin triple!",
"Miya:喵!",
"2*2=Miya",
"225238922 哔哩哔哩 干杯~",
"适度游戏益脑,沉迷游戏伤身,合理安排时间,享受健康生活", "适度游戏益脑,沉迷游戏伤身,合理安排时间,享受健康生活",
"合群了就会消失,但是消失不代表没有意义",
"学会使用两个旋转键,三个更好",
"更小的DAS和ARR拥有更高的操作上限(如果你还能控制得了的话)",
"注意到\"旋转\"到底对方块做了些什么吗?",
"20G本质是一套全新的游戏规则",
"不要在上课时玩游戏!",
"本游戏难度上限很高,做好心理准备",
"本游戏可不是休闲游戏",
"调到特殊的日期也不会发生什么的",
"3.1415926535897932384",
"2.7182818284590452353",
"Let-The-Bass-Kick!",
"使用love2d引擎制作", "使用love2d引擎制作",
"有疑问?先看设置有没有你想要的",
"有建议的话可以把信息反馈给作者~",
"不要按F10",
"秘密数字:626",
"CLASSIC SEXY RUSSIAN BLOCKS",
"戴上耳机以获得最佳体验",
"少女祈祷中", "少女祈祷中",
"LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF", "扫雷好玩!",
"(RUR'U')R'FR2U'R'U'(RUR'F')", "你可以从统计页面打开游戏存档目录",
"Am G F G", "你好 世界!",
"魔方好玩!",
"秘密数字:626",
"每个虚拟按键都可以隐藏/显示",
"联网还没做呢, 别急", "联网还没做呢, 别急",
"\"免费吃鸡方块\"", "键位是可以自定义的",
"Techminohaowan", "合群了就会消失, 但是消失不代表没有意义",
"Techmino 好玩!", "更小的DAS和ARR拥有更高的操作上限(如果你还能控制得了的话)",
"tetr.js 也很好玩!", "俄罗斯方块环游记也不错!",
"jstris 也很好玩!", "调到特殊的日期也不会发生什么的",
"tetr.io 也很好玩!", "低帧率会降低游戏体验",
"nullpomino 也很好玩!", "戴上耳机以获得最佳体验",
"↑↑↓↓←→←→BABA", "大满贯10连击消四全清!",
"草(日本语)", "草(日本语)",
"dym,永远的神", "不要在上课时玩游戏!",
"iced,永远的神", "不要盯着bug不放",
"不要按F10",
"不是动画,真的在加载!",
"本游戏难度上限很高, 做好心理准备",
"本游戏可不是休闲游戏",
"3.1415926535897932384",
"26连T2来一个?",
"225238922 哔哩哔哩 干杯~",
"20G本质是一套全新的游戏规则",
"20连PC来一个?",
"2+2=Miya",
"2.7182818284590452353",
"15puzzle好玩!",
"11renPC!",
"<方块研究所>有一个Nspire-CX版本!",
"↑↑↓↓←→←→BABA",
"\"免费吃鸡方块\"",
"(RUR'U')R'FR2U'R'U'(RUR'F')",
} }
elseif setting.lang==3 then elseif setting.lang==3 then
L={ L={
"Not animation,real loading!", "ZS JL T O I",
"Back to Back 10 combo Techrash PC!", "You can open saving directory from stat. page",
"Techmino has a Nspire-CX edition!", "wwwwww",
"B2B2B???",
"Is B2B2B2B possible?",
"MEGACMB!",
"ALLSPIN!",
"O spin triple!",
"Miya:Nya!",
"2^2=Miya",
"225238922 Bilibili cheers!",
"Playing too much = taking drugs",
"Disappearing doesn't mean useless",
"Try to use two rotate button,three better",
"Small DAS&ARR can make you faster,if you can control block correctly",
"Have you noticed what does \"rotating\" do to block?",
"20G actually is a brand new game rule",
"Do not play game in class!",
"This game can be very hard,be mentally perpared",
"This in not a casual game",
"Nothing will happen when some special day come",
"3.1415926535897932384",
"2.7182818284590452353",
"Let-The-Bass-Kick!",
"Powered by love2d",
"Find out what's in the setting!",
"Any suggestions to author!",
"DO NOT PRESS F10",
"Secret num:626",
"Techmino=Technique+Tetromino",
"CLASSIC SEXY RUSSIAN BLOCKS",
"Headphones for better experience",
"少女祈禱中",
"(RUR'U')R'FR2U'R'U'(RUR'F')",
"Am G F G",
"LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF",
"Only offline game now",
"\"Free block game with royale-mode\"",
"Techmino is so fun!",
"Who is diao", "Who is diao",
"What about 26 TSDs?",
"What about 20 PCs?",
"Try to use two rotate button,three better",
"This in not a casual game",
"This game can be very hard,be mentally perpared",
"Tetris journey has network battle!",
"Terraria is fun!",
"Techmino=Technique+Tetromino",
"Techmino is so fun!",
"Techmino has a Nspire-CX edition!",
"Small DAS&ARR can make you faster,if you can control block correctly",
"Secret num:626",
"Rubik's cube is fun!",
"REGRET!!",
"Powered by love2d",
"Playing too much = taking drugs",
"osu is fun!",
"Only offline game now",
"OHHHHHHHHHHHHHH",
"O spin triple!",
"Nothing will happen when some special day come",
"Not animation,real loading!",
"Miya:Nya!",
"Minesweeper is fun!",
"Minecraft is fun!",
"LrL RlR LLr RRl RRR LLL FFF RfR RRf rFF",
"lower fps causes lower game experience",
"Let-The-Bass-Kick!",
"l-=-1",
"Is B2B2B2B possible?",
"Initial Rotation etc. can save your life",
"iced so bully",
"Hello world!",
"Headphones for better experience",
"Have you noticed what does \"rotating\" do to block?",
"Find out what's in the setting!",
"Enjoy Tech. Rotation System!",
"DT cannon=TSD+TST",
"Don't look directly at the bugs!",
"DO NOT PRESS F10",
"Do not play game in class!",
"Disappearing doesn't mean useless",
"diaoyoumei so bully",
"diao so bully",
"COOL!!",
"CLASSIC SEXY RUSSIAN BLOCKS",
"BT cannon=beta",
"Back to Back 10 combo Techrash PC!",
"B2B2B???",
"Any suggestions to author!",
"Am G F G",
"Also try tetr.js!", "Also try tetr.js!",
"Also try jstris!",
"Also try tetr.io!", "Also try tetr.io!",
"Also try nullpomino!", "Also try nullpomino!",
"Also try jstris!",
"ALLSPIN!",
"少女祈禱中",
"3.1415926535897932384",
"225238922 Bilibili cheers!",
"20G actually is a brand new game rule",
"2^2=Miya",
"2.7182818284590452353",
"15puzzle is fun!",
"11renPC!",
"↑↑↓↓←→←→BABA", "↑↑↓↓←→←→BABA",
"wwwwww", "\"Free block game with royale mode\"",
"diaoyoumei so bully", "(RUR'U')R'FR2U'R'U'(RUR'F')",
"iced so bully",
"diao so bully",
} }
elseif setting.lang==4 then elseif setting.lang==4 then
L={'!','@','#','$','%','^','&','*','(',')','-','=','_','+','[',']','{','}','\\','|',';',':','\'','"',',','<','.','>','/','?'} L={'!','@','#','$','%','^','&','*','(',')','-','=','_','+','[',']','{','}','\\','|',';',':','\'','"',',','<','.','>','/','?'}

View File

@@ -153,8 +153,8 @@ local ren_n={}for i=1,11 do ren_n[i]="ren_"..i end
--------------------------</GameData>-------------------------- --------------------------</GameData>--------------------------
--------------------------<LIB>-------------------------- --------------------------<LIB>--------------------------
local player={} local player={}--player object
local PLY={} local PLY={}--lib
--------------------------</LIB>-------------------------- --------------------------</LIB>--------------------------
--------------------------<Update>-------------------------- --------------------------<Update>--------------------------
@@ -217,6 +217,12 @@ local function updateFXs(P,dt)
end end
if P.fieldBeneath>0 then P.fieldBeneath=max(P.fieldBeneath-P.gameEnv.pushSpeed,0)end if P.fieldBeneath>0 then P.fieldBeneath=max(P.fieldBeneath-P.gameEnv.pushSpeed,0)end
end end
local function updateTasks(P)
local L=P.tasks
for i=#L,1,-1 do
if L[i].code(P,L[i].data)then end
end
end
local function Pupdate_alive(P,dt) local function Pupdate_alive(P,dt)
if P.timing then P.stat.time=P.stat.time+dt end if P.timing then P.stat.time=P.stat.time+dt end
if P.keyRec then if P.keyRec then
@@ -393,6 +399,7 @@ local function Pupdate_alive(P,dt)
P.b2b1=max(P.b2b1*.95+P.b2b*.05-.6,P.b2b) P.b2b1=max(P.b2b1*.95+P.b2b*.05-.6,P.b2b)
end end
updateFXs(P,dt) updateFXs(P,dt)
updateTasks(P)
end end
local function Pupdate_dead(P,dt) local function Pupdate_dead(P,dt)
if P.timing then P.stat.time=P.stat.time+dt end if P.timing then P.stat.time=P.stat.time+dt end
@@ -422,6 +429,7 @@ local function Pupdate_dead(P,dt)
end end
if P.b2b1>0 then P.b2b1=max(0,P.b2b1*.92-1)end if P.b2b1>0 then P.b2b1=max(0,P.b2b1*.92-1)end
updateFXs(P,dt) updateFXs(P,dt)
updateTasks(P)
end end
--------------------------</Update>-------------------------- --------------------------</Update>--------------------------
@@ -950,6 +958,13 @@ function player.createBeam(P,R,send,time,target,color,clear,spin,mini,combo)
drag={},--Afterimage coordinate list drag={},--Afterimage coordinate list
} }
end end
function player.newTask(P,code,data)
local L=P.tasks
L[#L+1]={
code=code,
data=data,
}
end
--------------------------</FX>-------------------------- --------------------------</FX>--------------------------
--------------------------<Method>-------------------------- --------------------------<Method>--------------------------
@@ -1801,10 +1816,10 @@ function tick.lose(P)
end end
end end
end end
function tick.throwBadge(A,data) function tick.throwBadge(data)--{ifAI,Sender,timer}
data[2]=data[2]-1 data[3]=data[3]-1
if data[2]%4==0 then if data[3]%4==0 then
local S,R=data[1],data[1].lastRecv local S,R=data[2],data[2].lastRecv
local x1,y1,x2,y2 local x1,y1,x2,y2
if S.small then if S.small then
x1,y1=S.centerX,S.centerY x1,y1=S.centerX,S.centerY
@@ -1819,11 +1834,11 @@ function tick.throwBadge(A,data)
FX_badge[#FX_badge+1]={x1,y1,x2,y2,t=0} FX_badge[#FX_badge+1]={x1,y1,x2,y2,t=0}
--generate badge object --generate badge object
if not A.ai and data[2]%8==0 then if not data[1]and data[3]%8==0 then
SFX.play("collect") SFX.play("collect")
end end
end end
if data[2]<=0 then return true end if data[3]<=0 then return true end
end end
local function gameOver() local function gameOver()
@@ -1872,7 +1887,7 @@ local function gameOver()
end end
end--Save record end--Save record
function player.die(P)--Same thing when win/lose,not really die! function player.die(P)--Called when win/lose,not really die!
P.alive=false P.alive=false
P.timing=false P.timing=false
P.control=false P.control=false
@@ -1913,7 +1928,7 @@ function player.win(P,result)
if P.human then if P.human then
gameOver() gameOver()
end end
TASK.new(tick.finish,P) P:newTask(tick.finish)
end end
function player.lose(P) function player.lose(P)
if P.life>0 then if P.life>0 then
@@ -1957,7 +1972,7 @@ function player.lose(P)
end end
P.lastRecv=A P.lastRecv=A
if P.id==1 or A.id==1 then if P.id==1 or A.id==1 then
TASK.new(tick.throwBadge,A,{P,max(3,P.badge)*4}) TASK.new(tick.throwBadge,{A.ai,P,max(3,P.badge)*4})
end end
freshMostBadge() freshMostBadge()
end end
@@ -1990,9 +2005,9 @@ function player.lose(P)
end end
end end
gameOver() gameOver()
TASK.new(#players>1 and tick.lose or tick.finish,P) P:newTask(#players>1 and tick.lose or tick.finish)
else else
TASK.new(tick.lose,P) P:newTask(tick.lose)
end end
if #players.alive==1 then if #players.alive==1 then
players.alive[1]:win() players.alive[1]:win()
@@ -2337,6 +2352,7 @@ local function newEmptyPlayer(id,x,y,size)
P.score1,P.b2b1=0,0 P.score1,P.b2b1=0,0
P.dropFX,P.lockFX,P.clearFX={},{},{} P.dropFX,P.lockFX,P.clearFX={},{},{}
P.tasks={}--tasks
P.bonus={}--texts P.bonus={}--texts
P.endCounter=0--used after gameover P.endCounter=0--used after gameover

View File

@@ -19,7 +19,7 @@ local S=[=[
PCX kagura77 呆喂 GlowingEmbers PCX kagura77 呆喂 GlowingEmbers
轩辕辚 HimuroAki TCV100 tech有养成系统了@7065 轩辕辚 HimuroAki TCV100 tech有养成系统了@7065
HAGE KANOBU 闪电和拐棍 葡萄味的曼妥思 世界沃德 HAGE KANOBU 闪电和拐棍 葡萄味的曼妥思 世界沃德
蓝绿 天生的魔法师 saki 琳雨空 蓝绿 天生的魔法师 saki 琳雨空 T8779.易缄
Thanks!!! Thanks!!!
@@ -55,9 +55,9 @@ Future outlook:
field flip(LR/UD) field flip(LR/UD)
no fail(∞ lives) no fail(∞ lives)
mini games: mini games:
15 puzzle 15 puzzle (with hidden mode)
2048 (with next (with deadly mode))
mine sweeper mine sweeper
2048
tank battle tank battle
time-based-rank for master advanced mode(1:58/228/303/300P/100P) time-based-rank for master advanced mode(1:58/228/303/300P/100P)
简易防沉迷系统 简易防沉迷系统
@@ -82,11 +82,15 @@ Future outlook:
0.8.25: Custom Sequence Update 0.8.25: Custom Sequence Update
new: new:
--TODO: custom sequence --TODO: custom sequence
many new tips
changed: changed:
faster&harder attacker-ultimate
little easier to get S in PC challenge (easy mode) little easier to get S in PC challenge (easy mode)
easier to get S in infinite mode easier to get S in infinite mode, c4w, PC
harder to unlock sprint 400/1000
code: code:
file sorted file sorted
task system rewrited, now perfect
fixed: fixed:
hard move won't deactive "spin" hard move won't deactive "spin"
do not clear dead enemies' field do not clear dead enemies' field