Skip to content

Commit

Permalink
教程第六关草稿二
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Oct 10, 2024
1 parent 08b9f87 commit 14b89f2
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 80 deletions.
4 changes: 2 additions & 2 deletions assets/game/mechanicLib/brik/allclearGenerator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ function allclearGenerator._getLibQuestion(P,args)
local field={} -- 0-1 matrix
local seq={} -- briks' names

local pool=require'assets.game.mechanicLib.brik.allclearQuestLib'
local pool=require'datatable.allclearQuestLib'
local basePool=pool.base[args.lib]
local seqPool=pool.sequence[args.lib]

Expand Down Expand Up @@ -399,7 +399,7 @@ end
---@field highRate number

---@class Techmino.Mech.Brik.AllclearGenerator.arg2
---@field lib 'box_3_4'|'pco'|'box_4_4'
---@field lib 'box3'|'pco'|'box4'|'pco4'
---@field debugging boolean
---@field raw boolean
---@field holdUsed boolean|integer
Expand Down
75 changes: 0 additions & 75 deletions assets/game/mechanicLib/brik/allclearQuestLib.lua

This file was deleted.

20 changes: 17 additions & 3 deletions assets/game/mode/brik/interior/tutorial/6.allclearPractice.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
local function newQuestion(P)
---@cast P Techmino.Player.Brik
local score=P.modeData.score
P.modeData.questCount=P.modeData.questCount+1
P.modeData.currentQuestType=
P.modeData.score<10 and (
'box_3'
-- P.modeData.questCount%2==1 and 'box_3' or 'pco3'
) or
P.modeData.questCount%2==1 and 'box_4' or 'pco4'
local field,seq=mechLib.brik.allclearGenerator.newQuestion(P,{
lib=score<10 and 'box_3_4' or score%2==0 and 'pco' or 'box_4_4',
lib=P.modeData.currentQuestType,
raw=true,
})
P:setField(field)
Expand Down Expand Up @@ -38,9 +44,12 @@ return {
},
event={
playerInit=function(P)
P.modeData.currentQuestType="box_3"
P.modeData.questCount=0
P.modeData.score=0
P.modeData.protect=false
P.modeData.display=false
P.modeData.lastPassTime=0

if PROGRESS.getInteriorScore('tuto6_score')<99 then
P.modeData.display=PROGRESS.getInteriorScore('tuto6_score').."/99"
Expand All @@ -58,8 +67,13 @@ return {
local ac=#P.field._matrix==0
if #P.nextQueue==0 or ac then
if ac then
local timeUsed=(P.gameTime-P.modeData.lastPassTime)/1000
P.modeData.lastPassTime=P.gameTime
local parTime=P.modeData.currentQuestType=='box_3' and 6.26 or 10.33
local scoreAdd=timeUsed<parTime and not P.modeData.protect and 2 or 1
P:playSound(scoreAdd<=1 and 'beep_rise' or 'beep_notice')
P.modeData.score=math.min(P.modeData.score+scoreAdd,99)
P.modeData.protect=false
P.modeData.score=P.modeData.score+1
if P.modeData.score>=99 then
PROGRESS.setInteriorScore('tuto6_score',99)
PROGRESS.setInteriorScore('tuto6_time',P.gameTime,'<')
Expand Down
102 changes: 102 additions & 0 deletions datatable/allclearQuestLib.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
return {
base={
box3={
{
{4,4,4,3,3,3,7,0,0,0},
{4,1,6,6,2,3,7,0,0,0},
{1,1,6,6,2,2,7,0,0,0},
{1,7,7,7,7,2,7,0,0,0},
},
{
{4,4,4,3,3,3,0,0,0,7},
{4,1,6,6,2,3,0,0,0,7},
{1,1,6,6,2,2,0,0,0,7},
{1,7,7,7,7,2,0,0,0,7},
},
{
{2,7,7,7,7,1,7,0,0,0},
{2,2,6,6,1,1,7,0,0,0},
{3,2,6,6,1,4,7,0,0,0},
{3,3,3,4,4,4,7,0,0,0},
},
{
{2,7,7,7,7,1,0,0,0,7},
{2,2,6,6,1,1,0,0,0,7},
{3,2,6,6,1,4,0,0,0,7},
{3,3,3,4,4,4,0,0,0,7},
},
},
pco3={
{
{1,1,0,0,0,0,7,3,3,3},
{5,1,1,0,0,0,7,6,6,3},
{5,5,2,2,0,0,7,6,6,4},
{5,2,2,0,0,0,7,4,4,4},
},
{
{1,1,0,0,0,0,7,4,4,4},
{5,1,1,0,0,0,7,4,6,6},
{5,5,2,2,0,0,7,3,6,6},
{5,2,2,0,0,0,7,3,3,3},
},
{
{3,3,3,1,7,1,0,0,0,0},
{6,6,3,5,7,1,1,0,0,0},
{6,6,4,5,7,5,2,2,0,0},
{4,4,4,5,7,2,2,0,0,0},
},
{
{4,4,4,1,7,1,0,0,0,0},
{4,6,6,5,7,1,1,0,0,0},
{3,6,6,5,7,5,2,2,0,0},
{3,3,3,5,7,2,2,0,0,0},
},
},
box4={
{
{4,4,4,3,3,3,0,0,0,0},
{4,1,6,6,2,3,0,0,0,0},
{1,1,6,6,2,2,0,0,0,0},
{1,7,7,7,7,2,0,0,0,0},
},
{
{2,7,7,7,7,1,0,0,0,0},
{2,2,6,6,1,1,0,0,0,0},
{3,2,6,6,1,4,0,0,0,0},
{3,3,3,4,4,4,0,0,0,0},
},
},
pco4={
{
{1,1,0,0,0,0,0,3,3,3},
{5,1,1,0,0,0,0,6,6,3},
{5,5,2,2,0,0,0,6,6,4},
{5,2,2,0,0,0,0,4,4,4},
},
{
{1,1,0,0,0,0,0,4,4,4},
{5,1,1,0,0,0,0,4,6,6},
{5,5,2,2,0,0,0,3,6,6},
{5,2,2,0,0,0,0,3,3,3},
},
{
{3,3,3,1,1,0,0,0,0,0},
{6,6,3,5,1,1,0,0,0,0},
{6,6,4,5,5,2,2,0,0,0},
{4,4,4,5,2,2,0,0,0,0},
},
{
{4,4,4,1,1,0,0,0,0,0},
{4,6,6,5,1,1,0,0,0,0},
{3,6,6,5,5,2,2,0,0,0},
{3,3,3,5,2,2,0,0,0,0},
},
},
},
sequence={
box3={'ZJJ','ZJL','ZTJ','JZJ','JZL','JSL','JJS','JJT','JJO','JJI','JLZ','JLT','JLO','JTJ','JTL','JTT','JOJ','JOL','JIJ','JIL','TJL','TJT','TTZ','TTJ','TIJ','OJJ','OJL','OOI','OIO','IJJ','IJL','ITJ','IOO'},
pco3={'TJLL','TJII','TILL','JTLL','JLTL','JJIL','ITLL','ZTIL','ZSLT','ZLTT','ZLTS','ZLST','TZLT','TTLZ','TTLS','TTLL','TLTL','TLLT','TLLJ','TILO','TILJ','STLL','OILO','LZST','LTLT','LTII','LLJT','LLJO','LJLT','LJLO','LIJL','LIIT','JZLL','JZLJ','JZJL','JTTL','JTLT','JTII','JSTS','JSLL','JOLL','JLZJ','JLLT','JLLO','JLJI','JITI','JILJ','JIJL','ITLO','ITLJ','ITJL','ITIZ','IOLO','ILZT','ILTO','ILJL','ILIT','IJZT','IJTI','IJLL','IJJL','IJIT','IILT','ZZTS','ZZIL','ZTZS','ZTZJ','ZTTS','ZTSZ','ZTSJ','ZTOJ','ZTOI','ZTLZ','ZTLT','ZTLS','ZTLJ','ZTLI','ZTJZ','ZTJL','ZTIS','ZTIO','ZTII','ZSTZ','ZSTL','ZSIL','ZLZT','ZLTZ','ZLTL','ZLOT','ZLLJ','ZLJJ','ZJZS','ZJTS','ZJLL','ZJLJ','ZJJL','ZIZL','ZITO','ZITL','ZITJ','ZITI','ZISJ','ZIOL','ZILZ','ZILT','ZILI','ZIJZ','ZIIL','TZTS','TZTL','TZSJ','TZOJ','TZLZ','TZLS','TZLI','TZIS','TZIL','TTZS','TTZL','TTSZ','TTOI','TTLJ','TTJZ','TTJL','TTIO','TSZJ','TSTL','TSLT','TSJZ','TSJO','TSIZ','TOZJ','TOTI','TOOZ','TLZT','TLZI','TLTZ','TLTS','TLTJ','TLST','TLLZ','TLJZ','TLJT','TLJL','TLIZ','TJTL','TJTJ','TJSS','TJOO','TJLZ','TJLT','TJLJ','TJJZ','TJJL','TIZS','TIZL','TIZJ','TITI','TISZ','TIOL','TIOI','TILZ','TILS','TILI','TIJZ','TIJS','TIJO','TIJL','TIJI','TIIZ','TIIO','TIIL','TIIJ','SZTZ','SZLT','SZIL','STZZ','STLT','STJO','SLZT','SLLJ','SJTO','SIZL','SITT','SILZ','SIJI','SIIJ','OTOZ','OTJZ','OOTZ','OOLT','OOIL','OLOT','OLIT','OJLJ','OJJL','OIOL','OILZ','OILT','OILI','OIIL','LZZT','LZTZ','LZTT','LZTS','LZTI','LZOT','LZLJ','LZJL','LZJJ','LZIT','LTTL','LTLZ','LTLJ','LTJZ','LTJT','LSZT','LSLJ','LSJL','LOOT','LOLJ','LOJL','LLZJ','LLTZ','LLTJ','LLIJ','LJOL','LJLI','LJJT','LJIL','LIZT','LITO','LITI','LISZ','LIST','LIOT','LILJ','JZZS','JZTZ','JZTS','JZSZ','JZOT','JZOI','JZIO','JTZS','JTTZ','JTTO','JTTJ','JTSZ','JTSS','JTOT','JTOO','JTLZ','JTLJ','JTJZ','JTJT','JTJL','JSZT','JSTZ','JSST','JOZT','JOZI','JOTT','JOTO','JOOT','JOLJ','JOJL','JLTJ','JLSL','JLOL','JLOJ','JLJZ','JLJT','JLJS','JLJO','JLIJ','JJZL','JJTZ','JJTL','JJOL','JJLZ','JJLT','JJLS','JJLO','JJLI','JIZT','JITZ','JITS','JIST','JIOT','JIIT','IZZL','IZTO','IZTL','IZTJ','IZTI','IZSJ','IZOL','IZLZ','IZLT','IZLI','IZJZ','IZIL','ITZS','ITZO','ITZL','ITZJ','ITZI','ITTI','ITSZ','ITOL','ITOI','ITLZ','ITLS','ITLI','ITJZ','ITJS','ITJO','ITJI','ITIO','ITIL','ITIJ','ISZL','ISZJ','ISTT','ISLZ','ISJI','ISIJ','IOZL','IOTL','IOOL','IOLZ','IOLT','IOLI','IOIL','ILTZ','ILTS','ILTI','ILSZ','ILST','ILOT','ILLJ','IJTZ','IJTS','IJTO','IJTL','IJST','IJSI','IJOZ','IJOT','IJLJ','IJIS','IJIO','IIZL','IITZ','IITO','IITL','IITJ','IISJ','IIOL','IIOJ','IIJO'},
box4={'ZZJL','ZZLJ','ZSTJ','ZSTL','ZJLI','ZJTT','ZJIJ','ZJIL','ZLZL','ZLLO','ZTSJ','ZTJS','ZTJT','ZTLI','ZTTS','ZTTL','ZTIJ','ZTIL','ZOJJ','ZOTJ','ZIJJ','ZIJL','ZITJ','ZITL','JZJI','JZLI','JZTT','JZOJ','JZIJ','JZIL','JSSJ','JSJS','JSJO','JSLT','JSLI','JSTT','JSOJ','JSOL','JSIL','JJZT','JJSO','JJSI','JJLL','JJTL','JJOZ','JJOO','JJOI','JJIS','JJIT','JJIO','JJII','JLZS','JLZT','JLZI','JLSZ','JLST','JLSI','JLJL','JLLJ','JLTJ','JLTL','JLTI','JLOZ','JLOS','JLOI','JLIZ','JLIS','JLIT','JLIO','JTZS','JTSJ','JTST','JTJS','JTJL','JTLJ','JTLO','JTLI','JTTI','JTOL','JTIJ','JTIL','JTIT','JOZJ','JOSJ','JOSL','JOJZ','JOJT','JOJO','JOJI','JOLS','JOLI','JOTL','JOOJ','JOOL','JOIJ','JOIL','JIZJ','JIZL','JISL','JIJS','JIJT','JIJO','JIJI','JILZ','JILS','JILT','JILO','JITJ','JITL','JITT','JIOJ','JIOL','JIIJ','JIIL','TZSJ','TZJS','TZJL','TZLZ','TZLI','TZTL','TZIL','TJZS','TJZL','TJST','TJJL','TJJO','TJLJ','TJTS','TJTL','TJTI','TJIL','TJIT','TTZS','TTZL','TTJS','TTJJ','TTJL','TTJI','TTOJ','TTOI','TTIZ','TTIJ','TTIO','TOJT','TOJO','TOJI','TOTJ','TOOJ','TOIJ','TIZL','TIJL','TIJT','TITZ','TITJ','TITO','TIOJ','TIIJ','OZJJ','OJJT','OJJO','OJJI','OJLI','OJOJ','OJOL','OJIJ','OJIL','OTJT','OTJO','OTJI','OTOJ','OTIJ','OOJJ','OOJL','OOTJ','OOII','OIJJ','OIJL','OITJ','OIOI','OIIO','IZJJ','IZJL','IZTJ','IZTL','IJZJ','IJZL','IJSL','IJJS','IJJT','IJJO','IJJI','IJLZ','IJLS','IJLT','IJLO','IJTJ','IJTL','IJTT','IJOJ','IJOL','IJIJ','IJIL','ITZL','ITJL','ITJT','ITTZ','ITTJ','ITTO','ITOJ','ITIJ','IOJJ','IOJL','IOTJ','IOOI','IOIO','IIJJ','IIJL','IITJ','IIOO'},
pco4={},
},
}

0 comments on commit 14b89f2

Please sign in to comment.