模式文件中改用玩家的随机而非系统随机,便于正确回放
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
local int,rnd=math.floor,math.random
|
local int=math.floor
|
||||||
return{
|
return{
|
||||||
color=color.magenta,
|
color=color.magenta,
|
||||||
env={
|
env={
|
||||||
@@ -14,12 +14,12 @@ return{
|
|||||||
local t
|
local t
|
||||||
if D.event<20 then
|
if D.event<20 then
|
||||||
t=1500-30*D.event--1500~900
|
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]= {pos=P: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+1]= {pos=P:RND(3,8),amount=10,countdown=t,cd0=t,time=0,sent=false,lv=4}
|
||||||
else
|
else
|
||||||
t=900-10*(D.event-20)--900~600
|
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]= {pos=P: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+1]= {pos=P:RND(4,7),amount=8,countdown=t,cd0=t,time=0,sent=false,lv=5}
|
||||||
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
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
local int,rnd,min=math.floor,math.random,math.min
|
local int,min=math.floor,math.min
|
||||||
return{
|
return{
|
||||||
color=color.lYellow,
|
color=color.lYellow,
|
||||||
env={
|
env={
|
||||||
@@ -13,18 +13,18 @@ return{
|
|||||||
local s,t
|
local s,t
|
||||||
if D.event<10 then
|
if D.event<10 then
|
||||||
t=800-10*D.event--800~700
|
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]= {pos=P: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+1]= {pos=P:RND(4,7),amount=11,countdown=t,cd0=t+62,time=0,sent=false,lv=4}
|
||||||
s=20
|
s=20
|
||||||
elseif D.event<20 then
|
elseif D.event<20 then
|
||||||
t=800-10*D.event--700~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=P: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+1]= {pos=P:RND(4,7),amount=13,countdown=t,cd0=t+62,time=0,sent=false,lv=5}
|
||||||
s=24
|
s=24
|
||||||
else
|
else
|
||||||
t=600-15*(min(D.event-20,10))--600~450
|
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]= {pos=P: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+1]= {pos=P: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
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
local rnd,min=math.random,math.min
|
local min=math.random,math.min
|
||||||
local function check_c4w(P)
|
local function check_c4w(P)
|
||||||
for i=1,#P.clearedRow do
|
for i=1,#P.clearedRow do
|
||||||
P.field[#P.field+1]=freeRow.get(13)
|
P.field[#P.field+1]=freeRow.get(13)
|
||||||
@@ -35,7 +35,7 @@ return{
|
|||||||
P.visTime[i]=freeRow.get(20)
|
P.visTime[i]=freeRow.get(20)
|
||||||
for x=4,7 do F[i][x]=0 end
|
for x=4,7 do F[i][x]=0 end
|
||||||
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
|
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==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
|
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)
|
local function check_c4w(P)
|
||||||
for i=1,#P.clearedRow do
|
for i=1,#P.clearedRow do
|
||||||
P.field[#P.field+1]=freeRow.get(13)
|
P.field[#P.field+1]=freeRow.get(13)
|
||||||
@@ -33,7 +33,7 @@ return{
|
|||||||
P.visTime[i]=freeRow.get(20)
|
P.visTime[i]=freeRow.get(20)
|
||||||
for x=4,7 do F[i][x]=0 end
|
for x=4,7 do F[i][x]=0 end
|
||||||
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
|
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==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
|
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{
|
return{
|
||||||
color=color.red,
|
color=color.red,
|
||||||
env={
|
env={
|
||||||
@@ -14,7 +14,7 @@ return{
|
|||||||
if P.modeData.counter>=t then
|
if P.modeData.counter>=t then
|
||||||
P.modeData.counter=0
|
P.modeData.counter=0
|
||||||
for _=1,4 do
|
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
|
end
|
||||||
P.atkBuffer.sum=P.atkBuffer.sum+4
|
P.atkBuffer.sum=P.atkBuffer.sum+4
|
||||||
P.stat.recv=P.stat.recv+4
|
P.stat.recv=P.stat.recv+4
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
local int,rnd=math.floor,math.random
|
local int=math.floor
|
||||||
return{
|
return{
|
||||||
color=color.green,
|
color=color.green,
|
||||||
env={
|
env={
|
||||||
@@ -14,7 +14,7 @@ return{
|
|||||||
if P.modeData.counter>=t then
|
if P.modeData.counter>=t then
|
||||||
P.modeData.counter=0
|
P.modeData.counter=0
|
||||||
for _=1,3 do
|
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
|
end
|
||||||
P.atkBuffer.sum=P.atkBuffer.sum+3
|
P.atkBuffer.sum=P.atkBuffer.sum+3
|
||||||
P.stat.recv=P.stat.recv+3
|
P.stat.recv=P.stat.recv+3
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
local max,rnd=math.max,math.random
|
local max=math.max
|
||||||
return{
|
return{
|
||||||
color=color.magenta,
|
color=color.magenta,
|
||||||
env={
|
env={
|
||||||
@@ -10,7 +10,7 @@ return{
|
|||||||
local D=P.modeData
|
local D=P.modeData
|
||||||
D.counter=D.counter+1
|
D.counter=D.counter+1
|
||||||
if D.counter>=max(90,180-D.event)then
|
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
|
P.stat.recv=P.stat.recv+1
|
||||||
D.counter=0
|
D.counter=0
|
||||||
D.event=D.event+1
|
D.event=D.event+1
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
local max,rnd=math.max,math.random
|
local max=math.max
|
||||||
return{
|
return{
|
||||||
color=color.lYellow,
|
color=color.lYellow,
|
||||||
env={
|
env={
|
||||||
@@ -9,7 +9,7 @@ return{
|
|||||||
local D=P.modeData
|
local D=P.modeData
|
||||||
D.counter=D.counter+1
|
D.counter=D.counter+1
|
||||||
if D.counter>=max(30,80-.3*D.event)then
|
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
|
P.stat.recv=P.stat.recv+1
|
||||||
D.counter=0
|
D.counter=0
|
||||||
D.event=D.event+1
|
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{
|
return{
|
||||||
color=color.red,
|
color=color.red,
|
||||||
env={
|
env={
|
||||||
@@ -88,7 +88,7 @@ return{
|
|||||||
|
|
||||||
::END::
|
::END::
|
||||||
freeRow.discard(height)
|
freeRow.discard(height)
|
||||||
P:getNext(res[rnd(#res)])
|
P:getNext(res[P:RND(#res)])
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
target=100,dropPiece=PLY.reach_winCheck,
|
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)
|
local function check_rise(P)
|
||||||
if #P.clearedRow==0 then
|
if #P.clearedRow==0 then
|
||||||
for i=1,8-P.garbageBeneath do
|
for i=1,8-P.garbageBeneath do
|
||||||
P:garbageRise(13,1,rnd(10))
|
P:garbageRise(13,1,P:RND(10))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -19,7 +19,7 @@ return{
|
|||||||
load=function()
|
load=function()
|
||||||
PLY.newPlayer(1,340,15)
|
PLY.newPlayer(1,340,15)
|
||||||
for _=1,8 do
|
for _=1,8 do
|
||||||
players[1]:garbageRise(13,1,rnd(10))
|
players[1]:garbageRise(13,1,P:RND(10))
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
mesDisp=function(P,dx,dy)
|
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 ins=table.insert
|
||||||
local pc_drop={50,45,40,35,30,26,22,18,15,12}
|
local pc_drop={50,45,40,35,30,26,22,18,15,12}
|
||||||
local pc_lock={55,50,45,40,36,32,30}
|
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
|
P.modeData.counter=P.modeData.counter+1
|
||||||
if P.modeData.counter==26 then
|
if P.modeData.counter==26 then
|
||||||
local base=PCbase[P.modeData.type]
|
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
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -24,9 +24,9 @@ local function newPC(P)
|
|||||||
if c<5 then P:lose()end
|
if c<5 then P:lose()end
|
||||||
end
|
end
|
||||||
if #P.field==0 then
|
if #P.field==0 then
|
||||||
local type=PCtype[P.stat.pc]or rnd(2,3)
|
local type=PCtype[P.stat.pc]or P:RND(2,3)
|
||||||
local L=PClist[type][rnd(#PClist[1])]
|
local L=PClist[type][P:RND(#PClist[1])]
|
||||||
local symmetry=rnd()>.5
|
local symmetry=P:RND()>.5
|
||||||
P.modeData.type=type
|
P.modeData.type=type
|
||||||
P.modeData.symmetry=symmetry
|
P.modeData.symmetry=symmetry
|
||||||
P:pushNext(L,symmetry)
|
P:pushNext(L,symmetry)
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
local rnd=math.random
|
|
||||||
local PCbase=require("parts/PCbase")
|
local PCbase=require("parts/PCbase")
|
||||||
local PClist=require("parts/PClist")
|
local PClist=require("parts/PClist")
|
||||||
local PCtype={
|
local PCtype={
|
||||||
@@ -17,7 +16,7 @@ local function task_PC(P)
|
|||||||
P.modeData.counter=P.modeData.counter+1
|
P.modeData.counter=P.modeData.counter+1
|
||||||
if P.modeData.counter==26 then
|
if P.modeData.counter==26 then
|
||||||
local base=PCbase[P.modeData.type]
|
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
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -30,9 +29,9 @@ local function newPC(P)
|
|||||||
if c<5 then P:lose()end
|
if c<5 then P:lose()end
|
||||||
end
|
end
|
||||||
if #P.field==0 then
|
if #P.field==0 then
|
||||||
local type=PCtype[P.stat.pc]or rnd(2,3)
|
local type=PCtype[P.stat.pc]or P:RND(2,3)
|
||||||
local L=PClist[type][rnd(#PClist[1])]
|
local L=PClist[type][P:RND(#PClist[1])]
|
||||||
local symmetry=rnd()>.5
|
local symmetry=P:RND()>.5
|
||||||
P.modeData.type=type
|
P.modeData.type=type
|
||||||
P.modeData.symmetry=symmetry
|
P.modeData.symmetry=symmetry
|
||||||
P:pushNext(L,symmetry)
|
P:pushNext(L,symmetry)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
local max,rnd=math.max,math.random
|
local max=math.max
|
||||||
return{
|
return{
|
||||||
color=color.cyan,
|
color=color.cyan,
|
||||||
env={
|
env={
|
||||||
@@ -8,7 +8,7 @@ return{
|
|||||||
if not(P.control and SCN.cur=="play")then return end
|
if not(P.control and SCN.cur=="play")then return end
|
||||||
P.modeData.counter=P.modeData.counter+1
|
P.modeData.counter=P.modeData.counter+1
|
||||||
if P.modeData.counter>=max(60,150-2*P.modeData.event)and P.atkBuffer.sum<4 then
|
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.atkBuffer.sum=P.atkBuffer.sum+1
|
||||||
P.stat.recv=P.stat.recv+1
|
P.stat.recv=P.stat.recv+1
|
||||||
if P.modeData.event==45 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
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{
|
return{
|
||||||
color=color.magenta,
|
color=color.magenta,
|
||||||
env={
|
env={
|
||||||
@@ -11,9 +11,9 @@ return{
|
|||||||
if P.modeData.counter>=max(60,180-2*P.modeData.event)and B.sum<15 then
|
if P.modeData.counter>=max(60,180-2*P.modeData.event)and B.sum<15 then
|
||||||
B[#B+1]=
|
B[#B+1]=
|
||||||
P.modeData.event%3<2 and
|
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
|
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)
|
local R=(P.modeData.event%3<2 and 1 or 3)
|
||||||
B.sum=B.sum+R
|
B.sum=B.sum+R
|
||||||
P.stat.recv=P.stat.recv+R
|
P.stat.recv=P.stat.recv+R
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
local max,rnd=math.max,math.random
|
local max=math.max
|
||||||
return{
|
return{
|
||||||
color=color.red,
|
color=color.red,
|
||||||
env={
|
env={
|
||||||
@@ -9,7 +9,7 @@ return{
|
|||||||
P.modeData.counter=P.modeData.counter+1
|
P.modeData.counter=P.modeData.counter+1
|
||||||
if P.modeData.counter>=max(60,150-P.modeData.event)and P.atkBuffer.sum<20 then
|
if P.modeData.counter>=max(60,150-P.modeData.event)and P.atkBuffer.sum<20 then
|
||||||
local t=max(60,90-P.modeData.event)
|
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.atkBuffer.sum=P.atkBuffer.sum+4
|
||||||
P.stat.recv=P.stat.recv+4
|
P.stat.recv=P.stat.recv+4
|
||||||
if P.modeData.event==60 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
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{
|
return{
|
||||||
color=color.green,
|
color=color.green,
|
||||||
env={
|
env={
|
||||||
@@ -10,10 +10,10 @@ return{
|
|||||||
if P.modeData.counter>=max(90,180-2*P.modeData.event)and P.atkBuffer.sum<8 then
|
if P.modeData.counter>=max(90,180-2*P.modeData.event)and P.atkBuffer.sum<8 then
|
||||||
local d=P.modeData.event+1
|
local d=P.modeData.event+1
|
||||||
P.atkBuffer[#P.atkBuffer+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==0 and{pos=P: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==1 and{pos=P: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==2 and{pos=P: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==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.atkBuffer.sum=P.atkBuffer.sum+d%4+1
|
||||||
P.stat.recv=P.stat.recv+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
|
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{
|
return{
|
||||||
color=color.lYellow,
|
color=color.lYellow,
|
||||||
env={
|
env={
|
||||||
@@ -12,10 +12,10 @@ return{
|
|||||||
if P.modeData.counter>=max(300,600-10*P.modeData.event)and P.atkBuffer.sum<20 then
|
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 t=max(300,480-12*P.modeData.event)
|
||||||
local p=#P.atkBuffer+1
|
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] ={pos=P: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+1]={pos=P: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+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=rnd(10),amount=6,countdown=1.5*t,cd0=1.5*t,time=0,sent=false,lv=5}
|
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.atkBuffer.sum=P.atkBuffer.sum+20
|
||||||
P.stat.recv=P.stat.recv+20
|
P.stat.recv=P.stat.recv+20
|
||||||
if P.modeData.event==31 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
if P.modeData.event==31 then P:showTextF(text.maxspeed,0,-140,100,"appear",.6)end
|
||||||
|
|||||||
@@ -86,24 +86,22 @@ local CCblockID={4,3,6,5,1,2,0}
|
|||||||
local freshPrepare={
|
local freshPrepare={
|
||||||
none=NULL,
|
none=NULL,
|
||||||
bag=function(P)
|
bag=function(P)
|
||||||
local R=P.RND
|
|
||||||
local bag=P.gameEnv.bag
|
local bag=P.gameEnv.bag
|
||||||
local L
|
local L
|
||||||
repeat
|
repeat
|
||||||
L={}for i=1,#bag do L[i]=i end
|
L={}for i=1,#bag do L[i]=i end
|
||||||
repeat P:getNext(bag[rem(L,R:random(#L))])until not L[1]
|
repeat P:getNext(bag[rem(L,P:RND(#L))])until not L[1]
|
||||||
until #P.next>5
|
until #P.next>5
|
||||||
end,
|
end,
|
||||||
his4=function(P)
|
his4=function(P)
|
||||||
local R=P.RND
|
|
||||||
local bag=P.gameEnv.bag
|
local bag=P.gameEnv.bag
|
||||||
local L=#bag
|
local L=#bag
|
||||||
P.his={bag[R:random(L)],bag[R:random(L)],bag[R:random(L)],bag[R:random(L)]}
|
P.his={bag[P:RND(L)],bag[P:RND(L)],bag[P:RND(L)],bag[P:RND(L)]}
|
||||||
for _=1,6 do
|
for _=1,6 do
|
||||||
local i
|
local i
|
||||||
local j=0
|
local j=0
|
||||||
repeat
|
repeat
|
||||||
i=bag[R:random(L)]
|
i=bag[P:RND(L)]
|
||||||
j=j+1
|
j=j+1
|
||||||
until i~=P.his[1]and i~=P.his[2]and i~=P.his[3]and i~=P.his[4]or j==6
|
until i~=P.his[1]and i~=P.his[2]and i~=P.his[3]and i~=P.his[4]or j==6
|
||||||
P:getNext(i)
|
P:getNext(i)
|
||||||
@@ -111,15 +109,14 @@ local freshPrepare={
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
rnd=function(P)
|
rnd=function(P)
|
||||||
local R=P.RND
|
|
||||||
local bag=P.gameEnv.bag
|
local bag=P.gameEnv.bag
|
||||||
local L=#bag
|
local L=#bag
|
||||||
P:getNext(bag[R:random(L)])
|
P:getNext(bag[P:RND(L)])
|
||||||
for i=1,5 do
|
for i=1,5 do
|
||||||
local count=0
|
local count=0
|
||||||
local i
|
local i
|
||||||
repeat
|
repeat
|
||||||
i=bag[R:random(L)]
|
i=bag[P:RND(L)]
|
||||||
count=count+1
|
count=count+1
|
||||||
until i~=P.next[#P.next].id or count>=L
|
until i~=P.next[#P.next].id or count>=L
|
||||||
P:getNext(i)
|
P:getNext(i)
|
||||||
@@ -143,22 +140,20 @@ local freshPrepare={
|
|||||||
local freshMethod={
|
local freshMethod={
|
||||||
none=NULL,
|
none=NULL,
|
||||||
bag=function(P)
|
bag=function(P)
|
||||||
local R=P.RND
|
|
||||||
if #P.next<6 then
|
if #P.next<6 then
|
||||||
local bag0,bag=P.gameEnv.bag,{}
|
local bag0,bag=P.gameEnv.bag,{}
|
||||||
for i=1,#bag0 do bag[i]=bag0[i]end
|
for i=1,#bag0 do bag[i]=bag0[i]end
|
||||||
repeat P:getNext(rem(bag,R:random(#bag)))until not bag[1]
|
repeat P:getNext(rem(bag,P:RND(#bag)))until not bag[1]
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
his4=function(P)
|
his4=function(P)
|
||||||
local R=P.RND
|
|
||||||
if #P.next<6 then
|
if #P.next<6 then
|
||||||
local bag=P.gameEnv.bag
|
local bag=P.gameEnv.bag
|
||||||
local L=#bag
|
local L=#bag
|
||||||
for n=1,4 do
|
for n=1,4 do
|
||||||
local j,i=0
|
local j,i=0
|
||||||
repeat
|
repeat
|
||||||
i=bag[R:random(L)]
|
i=bag[P:RND(L)]
|
||||||
j=j+1
|
j=j+1
|
||||||
until i~=P.his[1]and i~=P.his[2]and i~=P.his[3]and i~=P.his[4]or j==4
|
until i~=P.his[1]and i~=P.his[2]and i~=P.his[3]and i~=P.his[4]or j==4
|
||||||
P:getNext(i)
|
P:getNext(i)
|
||||||
@@ -167,7 +162,6 @@ local freshMethod={
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
rnd=function(P)
|
rnd=function(P)
|
||||||
local R=P.RND
|
|
||||||
if #P.next<6 then
|
if #P.next<6 then
|
||||||
local bag=P.gameEnv.bag
|
local bag=P.gameEnv.bag
|
||||||
local L=#bag
|
local L=#bag
|
||||||
@@ -175,7 +169,7 @@ local freshMethod={
|
|||||||
local count=0
|
local count=0
|
||||||
local i
|
local i
|
||||||
repeat
|
repeat
|
||||||
i=bag[R:random(L)]
|
i=bag[P:RND(L)]
|
||||||
count=count+1
|
count=count+1
|
||||||
until i~=P.next[#P.next].id or count>=L
|
until i~=P.next[#P.next].id or count>=L
|
||||||
P:getNext(i)
|
P:getNext(i)
|
||||||
@@ -1089,6 +1083,11 @@ end
|
|||||||
--------------------------</FX>--------------------------
|
--------------------------</FX>--------------------------
|
||||||
|
|
||||||
--------------------------<Method>--------------------------
|
--------------------------<Method>--------------------------
|
||||||
|
function player.RND(P,a,b)
|
||||||
|
local R=P.randGen
|
||||||
|
return R:random(a,b)
|
||||||
|
end
|
||||||
|
|
||||||
local function getNewStatTable()
|
local function getNewStatTable()
|
||||||
local T={
|
local T={
|
||||||
time=0,score=0,
|
time=0,score=0,
|
||||||
@@ -1157,7 +1156,7 @@ function player.attack(P,R,send,time,...)
|
|||||||
B[i+1]=B[i]
|
B[i+1]=B[i]
|
||||||
end
|
end
|
||||||
B[k]={
|
B[k]={
|
||||||
pos=rnd(10),
|
pos=P:RND(10),
|
||||||
amount=send,
|
amount=send,
|
||||||
countdown=time,
|
countdown=time,
|
||||||
cd0=time,
|
cd0=time,
|
||||||
@@ -2507,7 +2506,7 @@ local function newEmptyPlayer(id,x,y,size)
|
|||||||
P.draw=Pdraw_norm
|
P.draw=Pdraw_norm
|
||||||
P.bonus={}--Text objects
|
P.bonus={}--Text objects
|
||||||
end
|
end
|
||||||
P.RND=mt.newRandomGenerator(game.seed)
|
P.randGen=mt.newRandomGenerator(game.seed)
|
||||||
|
|
||||||
P.small=false
|
P.small=false
|
||||||
P.life=0
|
P.life=0
|
||||||
|
|||||||
Reference in New Issue
Block a user