挖掘相关模式垃圾行尽量不出在同一列

This commit is contained in:
MrZ626
2020-10-26 08:57:41 +08:00
parent 68c8ce48bb
commit 051307d4d7
7 changed files with 20 additions and 9 deletions

View File

@@ -15,7 +15,7 @@ return{
PLY.newPlayer(1,340,15)
local P=PLAYERS[1]
for _=1,10 do
P:garbageRise(13,1,P:RND(10))
P:garbageRise(13,1,P:getHolePos())
end
P.fieldBeneath=0
end,

View File

@@ -1,6 +1,6 @@
local function check_rise(P)
for _=1,math.min(8,100-P.stat.dig)-P.garbageBeneath do
P:garbageRise(13,1,P:RND(10))
P:garbageRise(13,1,P:getHolePos())
end
if P.stat.dig==100 then
P:win("finish")
@@ -18,7 +18,7 @@ return{
PLY.newPlayer(1,340,15)
local P=PLAYERS[1]
for _=1,10 do
P:garbageRise(13,1,P:RND(10))
P:garbageRise(13,1,P:getHolePos())
end
P.fieldBeneath=0
end,

View File

@@ -1,6 +1,6 @@
local function check_rise(P)
for _=1,math.min(8,40-P.stat.dig)-P.garbageBeneath do
P:garbageRise(13,1,P:RND(10))
P:garbageRise(13,1,P:getHolePos())
end
if P.stat.dig==40 then
P:win("finish")
@@ -18,7 +18,7 @@ return{
PLY.newPlayer(1,340,15)
local P=PLAYERS[1]
for _=1,10 do
P:garbageRise(13,1,P:RND(10))
P:garbageRise(13,1,P:getHolePos())
end
P.fieldBeneath=0
end,

View File

@@ -1,6 +1,6 @@
local function check_rise(P)
for _=1,math.min(8,400-P.stat.dig)-P.garbageBeneath do
P:garbageRise(13,1,P:RND(10))
P:garbageRise(13,1,P:getHolePos())
end
if P.stat.dig==400 then
P:win("finish")
@@ -18,7 +18,7 @@ return{
PLY.newPlayer(1,340,15)
local P=PLAYERS[1]
for _=1,10 do
P:garbageRise(13,1,P:RND(10))
P:garbageRise(13,1,P:getHolePos())
end
P.fieldBeneath=0
end,

View File

@@ -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,P:RND(10))
P:garbageRise(10,1,P:getHolePos())
P.stat.recv=P.stat.recv+1
D.counter=0
D.event=D.event+1

View File

@@ -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,P:RND(10))
P:garbageRise(13+D.event%5,1,P:getHolePos())
P.stat.recv=P.stat.recv+1
D.counter=0
D.event=D.event+1

View File

@@ -1601,6 +1601,17 @@ function player.attack(P,R,send,time,...)
end
end
function player.getHolePos(P)
if P.garbageBeneath==0 then
return P:RND(10)
else
local p=P:RND(10)
if P.field[1][p]>0 then
return P:RND(10)
end
return p
end
end
function player.garbageRelease(P)
local n,flag=1
while true do