模式文件中改用玩家的随机而非系统随机,便于正确回放
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
local int,rnd=math.floor,math.random
|
||||
local int=math.floor
|
||||
return{
|
||||
color=color.magenta,
|
||||
env={
|
||||
@@ -14,12 +14,12 @@ return{
|
||||
local t
|
||||
if D.event<20 then
|
||||
t=1500-30*D.event--1500~900
|
||||
B[p]= {pos=rnd(4,7),amount=12,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||
B[p+1]= {pos=rnd(3,8),amount=10,countdown=t,cd0=t,time=0,sent=false,lv=4}
|
||||
B[p]= {pos=P:RND(4,7),amount=12,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||
B[p+1]= {pos=P:RND(3,8),amount=10,countdown=t,cd0=t,time=0,sent=false,lv=4}
|
||||
else
|
||||
t=900-10*(D.event-20)--900~600
|
||||
B[p]= {pos=rnd(10),amount=14,countdown=t,cd0=t,time=0,sent=false,lv=4}
|
||||
B[p+1]= {pos=rnd(4,7),amount=8,countdown=t,cd0=t,time=0,sent=false,lv=5}
|
||||
B[p]= {pos=P:RND(10),amount=14,countdown=t,cd0=t,time=0,sent=false,lv=4}
|
||||
B[p+1]= {pos=P:RND(4,7),amount=8,countdown=t,cd0=t,time=0,sent=false,lv=5}
|
||||
end
|
||||
B.sum=B.sum+22
|
||||
P.stat.recv=P.stat.recv+22
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local int,rnd,min=math.floor,math.random,math.min
|
||||
local int,min=math.floor,math.min
|
||||
return{
|
||||
color=color.lYellow,
|
||||
env={
|
||||
@@ -13,18 +13,18 @@ return{
|
||||
local s,t
|
||||
if D.event<10 then
|
||||
t=800-10*D.event--800~700
|
||||
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=11,countdown=t,cd0=t+62,time=0,sent=false,lv=4}
|
||||
B[p]= {pos=P:RND(5,6),amount=9,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||
B[p+1]= {pos=P:RND(4,7),amount=11,countdown=t,cd0=t+62,time=0,sent=false,lv=4}
|
||||
s=20
|
||||
elseif D.event<20 then
|
||||
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+1]= {pos=rnd(4,7),amount=13,countdown=t,cd0=t+62,time=0,sent=false,lv=5}
|
||||
B[p]= {pos=P:RND(3,8),amount=11,countdown=t,cd0=t,time=0,sent=false,lv=4}
|
||||
B[p+1]= {pos=P:RND(4,7),amount=13,countdown=t,cd0=t+62,time=0,sent=false,lv=5}
|
||||
s=24
|
||||
else
|
||||
t=600-15*(min(D.event-20,10))--600~450
|
||||
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=14,countdown=t+62,cd0=t,time=0,sent=false,lv=5}
|
||||
B[p]= {pos=P:RND(2)*9-8,amount=14,countdown=t,cd0=t,time=0,sent=false,lv=5}
|
||||
B[p+1]= {pos=P:RND(3,8),amount=14,countdown=t+62,cd0=t,time=0,sent=false,lv=5}
|
||||
s=28
|
||||
end
|
||||
B.sum=B.sum+s
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local rnd,min=math.random,math.min
|
||||
local min=math.random,math.min
|
||||
local function check_c4w(P)
|
||||
for i=1,#P.clearedRow do
|
||||
P.field[#P.field+1]=freeRow.get(13)
|
||||
@@ -35,7 +35,7 @@ return{
|
||||
P.visTime[i]=freeRow.get(20)
|
||||
for x=4,7 do F[i][x]=0 end
|
||||
end
|
||||
local r=rnd(6)
|
||||
local r=P:RND(6)
|
||||
if r==1 then F[1][5],F[1][4],F[2][4]=13,13,13
|
||||
elseif r==2 then F[1][6],F[1][7],F[2][7]=13,13,13
|
||||
elseif r==3 then F[1][4],F[2][4],F[2][5]=13,13,13
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local rnd,min=math.random,math.min
|
||||
local min=math.min
|
||||
local function check_c4w(P)
|
||||
for i=1,#P.clearedRow do
|
||||
P.field[#P.field+1]=freeRow.get(13)
|
||||
@@ -33,7 +33,7 @@ return{
|
||||
P.visTime[i]=freeRow.get(20)
|
||||
for x=4,7 do F[i][x]=0 end
|
||||
end
|
||||
local r=rnd(6)
|
||||
local r=P:RND(6)
|
||||
if r==1 then F[1][5],F[1][4],F[2][4]=13,13,13
|
||||
elseif r==2 then F[1][6],F[1][7],F[2][7]=13,13,13
|
||||
elseif r==3 then F[1][4],F[2][4],F[2][5]=13,13,13
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local int,rnd=math.floor,math.random
|
||||
local int=math.floor
|
||||
return{
|
||||
color=color.red,
|
||||
env={
|
||||
@@ -14,7 +14,7 @@ return{
|
||||
if P.modeData.counter>=t then
|
||||
P.modeData.counter=0
|
||||
for _=1,4 do
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=rnd(10),amount=1,countdown=5*t,cd0=5*t,time=0,sent=false,lv=2}
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=P:RND(10),amount=1,countdown=5*t,cd0=5*t,time=0,sent=false,lv=2}
|
||||
end
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+4
|
||||
P.stat.recv=P.stat.recv+4
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local int,rnd=math.floor,math.random
|
||||
local int=math.floor
|
||||
return{
|
||||
color=color.green,
|
||||
env={
|
||||
@@ -14,7 +14,7 @@ return{
|
||||
if P.modeData.counter>=t then
|
||||
P.modeData.counter=0
|
||||
for _=1,3 do
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=rnd(2,9),amount=1,countdown=2*t,cd0=2*t,time=0,sent=false,lv=1}
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=P:RND(2,9),amount=1,countdown=2*t,cd0=2*t,time=0,sent=false,lv=1}
|
||||
end
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+3
|
||||
P.stat.recv=P.stat.recv+3
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local max,rnd=math.max,math.random
|
||||
local max=math.max
|
||||
return{
|
||||
color=color.magenta,
|
||||
env={
|
||||
@@ -10,7 +10,7 @@ return{
|
||||
local D=P.modeData
|
||||
D.counter=D.counter+1
|
||||
if D.counter>=max(90,180-D.event)then
|
||||
P:garbageRise(10,1,rnd(10))
|
||||
P:garbageRise(10,1,P:RND(10))
|
||||
P.stat.recv=P.stat.recv+1
|
||||
D.counter=0
|
||||
D.event=D.event+1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local max,rnd=math.max,math.random
|
||||
local max=math.max
|
||||
return{
|
||||
color=color.lYellow,
|
||||
env={
|
||||
@@ -9,7 +9,7 @@ return{
|
||||
local D=P.modeData
|
||||
D.counter=D.counter+1
|
||||
if D.counter>=max(30,80-.3*D.event)then
|
||||
P:garbageRise(13+D.event%5,1,rnd(10))
|
||||
P:garbageRise(13+D.event%5,1,P:RND(10))
|
||||
P.stat.recv=P.stat.recv+1
|
||||
D.counter=0
|
||||
D.event=D.event+1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local rnd,min,rem=math.random,math.min,table.remove
|
||||
local min,rem=math.min,table.remove
|
||||
return{
|
||||
color=color.red,
|
||||
env={
|
||||
@@ -88,7 +88,7 @@ return{
|
||||
|
||||
::END::
|
||||
freeRow.discard(height)
|
||||
P:getNext(res[rnd(#res)])
|
||||
P:getNext(res[P:RND(#res)])
|
||||
end
|
||||
end,
|
||||
target=100,dropPiece=PLY.reach_winCheck,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
local format,rnd=string.format,math.random
|
||||
local format=string.format
|
||||
local function check_rise(P)
|
||||
if #P.clearedRow==0 then
|
||||
for i=1,8-P.garbageBeneath do
|
||||
P:garbageRise(13,1,rnd(10))
|
||||
P:garbageRise(13,1,P:RND(10))
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -19,7 +19,7 @@ return{
|
||||
load=function()
|
||||
PLY.newPlayer(1,340,15)
|
||||
for _=1,8 do
|
||||
players[1]:garbageRise(13,1,rnd(10))
|
||||
players[1]:garbageRise(13,1,P:RND(10))
|
||||
end
|
||||
end,
|
||||
mesDisp=function(P,dx,dy)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local int,rnd=math.floor,math.random
|
||||
local int=math.floor
|
||||
local ins=table.insert
|
||||
local pc_drop={50,45,40,35,30,26,22,18,15,12}
|
||||
local pc_lock={55,50,45,40,36,32,30}
|
||||
@@ -11,7 +11,7 @@ local function task_PC(P)
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter==26 then
|
||||
local base=PCbase[P.modeData.type]
|
||||
P:pushLine(base[rnd(#base)],P.modeData.symmetry)
|
||||
P:pushLine(base[P:RND(#base)],P.modeData.symmetry)
|
||||
return true
|
||||
end
|
||||
end
|
||||
@@ -24,9 +24,9 @@ local function newPC(P)
|
||||
if c<5 then P:lose()end
|
||||
end
|
||||
if #P.field==0 then
|
||||
local type=PCtype[P.stat.pc]or rnd(2,3)
|
||||
local L=PClist[type][rnd(#PClist[1])]
|
||||
local symmetry=rnd()>.5
|
||||
local type=PCtype[P.stat.pc]or P:RND(2,3)
|
||||
local L=PClist[type][P:RND(#PClist[1])]
|
||||
local symmetry=P:RND()>.5
|
||||
P.modeData.type=type
|
||||
P.modeData.symmetry=symmetry
|
||||
P:pushNext(L,symmetry)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
local rnd=math.random
|
||||
local PCbase=require("parts/PCbase")
|
||||
local PClist=require("parts/PClist")
|
||||
local PCtype={
|
||||
@@ -17,7 +16,7 @@ local function task_PC(P)
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter==26 then
|
||||
local base=PCbase[P.modeData.type]
|
||||
P:pushLine(base[rnd(#base)],P.modeData.symmetry)
|
||||
P:pushLine(base[P:RND(#base)],P.modeData.symmetry)
|
||||
return true
|
||||
end
|
||||
end
|
||||
@@ -30,9 +29,9 @@ local function newPC(P)
|
||||
if c<5 then P:lose()end
|
||||
end
|
||||
if #P.field==0 then
|
||||
local type=PCtype[P.stat.pc]or rnd(2,3)
|
||||
local L=PClist[type][rnd(#PClist[1])]
|
||||
local symmetry=rnd()>.5
|
||||
local type=PCtype[P.stat.pc]or P:RND(2,3)
|
||||
local L=PClist[type][P:RND(#PClist[1])]
|
||||
local symmetry=P:RND()>.5
|
||||
P.modeData.type=type
|
||||
P.modeData.symmetry=symmetry
|
||||
P:pushNext(L,symmetry)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local max,rnd=math.max,math.random
|
||||
local max=math.max
|
||||
return{
|
||||
color=color.cyan,
|
||||
env={
|
||||
@@ -8,7 +8,7 @@ return{
|
||||
if not(P.control and SCN.cur=="play")then return end
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter>=max(60,150-2*P.modeData.event)and P.atkBuffer.sum<4 then
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=rnd(10),amount=1,countdown=30,cd0=30,time=0,sent=false,lv=1}
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=P:RND(10),amount=1,countdown=30,cd0=30,time=0,sent=false,lv=1}
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+1
|
||||
P.stat.recv=P.stat.recv+1
|
||||
if P.modeData.event==45 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local max,rnd=math.max,math.random
|
||||
local max=math.max
|
||||
return{
|
||||
color=color.magenta,
|
||||
env={
|
||||
@@ -11,9 +11,9 @@ return{
|
||||
if P.modeData.counter>=max(60,180-2*P.modeData.event)and B.sum<15 then
|
||||
B[#B+1]=
|
||||
P.modeData.event%3<2 and
|
||||
{pos=rnd(10),amount=1,countdown=0,cd0=0,time=0,sent=false,lv=1}
|
||||
{pos=P:RND(10),amount=1,countdown=0,cd0=0,time=0,sent=false,lv=1}
|
||||
or
|
||||
{pos=rnd(10),amount=3,countdown=60,cd0=60,time=0,sent=false,lv=2}
|
||||
{pos=P:RND(10),amount=3,countdown=60,cd0=60,time=0,sent=false,lv=2}
|
||||
local R=(P.modeData.event%3<2 and 1 or 3)
|
||||
B.sum=B.sum+R
|
||||
P.stat.recv=P.stat.recv+R
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local max,rnd=math.max,math.random
|
||||
local max=math.max
|
||||
return{
|
||||
color=color.red,
|
||||
env={
|
||||
@@ -9,7 +9,7 @@ return{
|
||||
P.modeData.counter=P.modeData.counter+1
|
||||
if P.modeData.counter>=max(60,150-P.modeData.event)and P.atkBuffer.sum<20 then
|
||||
local t=max(60,90-P.modeData.event)
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=rnd(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||
P.atkBuffer[#P.atkBuffer+1]={pos=P:RND(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+4
|
||||
P.stat.recv=P.stat.recv+4
|
||||
if P.modeData.event==60 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local max,rnd=math.max,math.random
|
||||
local max=math.max
|
||||
return{
|
||||
color=color.green,
|
||||
env={
|
||||
@@ -10,10 +10,10 @@ return{
|
||||
if P.modeData.counter>=max(90,180-2*P.modeData.event)and P.atkBuffer.sum<8 then
|
||||
local d=P.modeData.event+1
|
||||
P.atkBuffer[#P.atkBuffer+1]=
|
||||
d%4==0 and{pos=rnd(10),amount=1,countdown=60,cd0=60,time=0,sent=false,lv=1}or
|
||||
d%4==1 and{pos=rnd(10),amount=2,countdown=70,cd0=70,time=0,sent=false,lv=1}or
|
||||
d%4==2 and{pos=rnd(10),amount=3,countdown=80,cd0=80,time=0,sent=false,lv=2}or
|
||||
d%4==3 and{pos=rnd(10),amount=4,countdown=90,cd0=90,time=0,sent=false,lv=3}
|
||||
d%4==0 and{pos=P:RND(10),amount=1,countdown=60,cd0=60,time=0,sent=false,lv=1}or
|
||||
d%4==1 and{pos=P:RND(10),amount=2,countdown=70,cd0=70,time=0,sent=false,lv=1}or
|
||||
d%4==2 and{pos=P:RND(10),amount=3,countdown=80,cd0=80,time=0,sent=false,lv=2}or
|
||||
d%4==3 and{pos=P:RND(10),amount=4,countdown=90,cd0=90,time=0,sent=false,lv=3}
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+d%4+1
|
||||
P.stat.recv=P.stat.recv+d%4+1
|
||||
if P.modeData.event==45 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local max,rnd=math.max,math.random
|
||||
local max=math.max
|
||||
return{
|
||||
color=color.lYellow,
|
||||
env={
|
||||
@@ -12,10 +12,10 @@ return{
|
||||
if P.modeData.counter>=max(300,600-10*P.modeData.event)and P.atkBuffer.sum<20 then
|
||||
local t=max(300,480-12*P.modeData.event)
|
||||
local p=#P.atkBuffer+1
|
||||
P.atkBuffer[p] ={pos=rnd(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=2}
|
||||
P.atkBuffer[p+1]={pos=rnd(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||
P.atkBuffer[p+2]={pos=rnd(10),amount=6,countdown=1.2*t,cd0=1.2*t,time=0,sent=false,lv=4}
|
||||
P.atkBuffer[p+3]={pos=rnd(10),amount=6,countdown=1.5*t,cd0=1.5*t,time=0,sent=false,lv=5}
|
||||
P.atkBuffer[p] ={pos=P:RND(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=2}
|
||||
P.atkBuffer[p+1]={pos=P:RND(10),amount=4,countdown=t,cd0=t,time=0,sent=false,lv=3}
|
||||
P.atkBuffer[p+2]={pos=P:RND(10),amount=6,countdown=1.2*t,cd0=1.2*t,time=0,sent=false,lv=4}
|
||||
P.atkBuffer[p+3]={pos=P:RND(10),amount=6,countdown=1.5*t,cd0=1.5*t,time=0,sent=false,lv=5}
|
||||
P.atkBuffer.sum=P.atkBuffer.sum+20
|
||||
P.stat.recv=P.stat.recv+20
|
||||
if P.modeData.event==31 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
||||
|
||||
Reference in New Issue
Block a user