Skip to content

Commit

Permalink
修简单消四挑战玩不了
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Nov 3, 2023
1 parent 759d37e commit de7e73e
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions assets/game/mechanicLib/mino/techrashChallenge.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,30 @@ local gc=love.graphics
---@type Techmino.Mech.mino
local techrash={}

function techrash.easy_seqType(P)
P.modeData.bagLoop=0
local l1={}
local l2={}
while true do
-- Fill list1 (bag7 + 0~4)
if not l1[1] then
P.modeData.bagLoop=P.modeData.bagLoop+1
for i=1,7 do table.insert(l1,i) end
for _=1,
P.modeData.bagLoop<=10 and 0 or
P.modeData.bagLoop<=20 and 1 or
P.modeData.bagLoop<=30 and 2 or
P.modeData.bagLoop<=40 and 3 or
4
do
-- Fill list2 (bag6)
if not l2[1] then for i=1,6 do table.insert(l2,i) end end
table.insert(l1,table.remove(l2,P:random(#l2)))
end
function techrash.easy_seqType(P,d,init)
if init then
P.modeData.bagLoop=0
d.l1={}
d.l2={}
return
end
-- Fill list1 (bag7_p0to4_by_bagLoop_fromBag6_noI)
if not d.l1[1] then
P.modeData.bagLoop=P.modeData.bagLoop+1
for i=1,7 do table.insert(d.l1,i) end
for _=1,
P.modeData.bagLoop<=10 and 0 or
P.modeData.bagLoop<=20 and 1 or
P.modeData.bagLoop<=30 and 2 or
P.modeData.bagLoop<=40 and 3 or
4
do
-- Fill list2 (bag6_noI)
if not d.l2[1] then for i=1,6 do table.insert(d.l2,i) end end
table.insert(d.l1,table.remove(d.l2,P:random(#d.l2)))
end
coroutine.yield(table.remove(l1,P:random(#l1)))
end
return table.remove(d.l1,P:random(#d.l1))
end
function techrash.easy_event_playerInit(P)
P.modeData.techrash=0
Expand Down

0 comments on commit de7e73e

Please sign in to comment.