From 726928aadc72b1a33305459ecd86f84e9b19f4f9 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Thu, 26 Aug 2021 23:58:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=96=E6=8E=98=E6=A8=A1=E5=BC=8F=E5=BC=80?= =?UTF-8?q?=E5=B1=8010=E7=9A=84=E8=A1=8C=E4=B9=9F=E4=BD=BF=E7=94=A8eventSe?= =?UTF-8?q?t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/eventsets/digBase.lua | 8 ++++++++ parts/modes/dig_100l.lua | 11 ++--------- parts/modes/dig_10l.lua | 9 +-------- parts/modes/dig_400l.lua | 11 ++--------- parts/modes/dig_40l.lua | 11 ++--------- 5 files changed, 15 insertions(+), 35 deletions(-) create mode 100644 parts/eventsets/digBase.lua diff --git a/parts/eventsets/digBase.lua b/parts/eventsets/digBase.lua new file mode 100644 index 00000000..8d9fef0c --- /dev/null +++ b/parts/eventsets/digBase.lua @@ -0,0 +1,8 @@ +return{ + task=function(P) + for _=1,10 do + P:garbageRise(21,1,P:getHolePos()) + end + P.fieldBeneath=0 + end, +} \ No newline at end of file diff --git a/parts/modes/dig_100l.lua b/parts/modes/dig_100l.lua index d0ce2ee4..8b88baa5 100644 --- a/parts/modes/dig_100l.lua +++ b/parts/modes/dig_100l.lua @@ -1,5 +1,5 @@ local function check_rise(P) - for _=1,math.min(8,100-P.stat.dig)-P.garbageBeneath do + for _=1,math.min(10,100-P.stat.dig)-P.garbageBeneath do P:garbageRise(21,1,P:getHolePos()) end if P.stat.dig==100 then @@ -12,16 +12,9 @@ return{ env={ pushSpeed=6, dropPiece=check_rise, + eventSet='digBase', bg='bg2',bgm='way', }, - load=function() - PLY.newPlayer(1) - local P=PLAYERS[1] - for _=1,10 do - P:garbageRise(21,1,P:getHolePos()) - end - P.fieldBeneath=0 - end, mesDisp=function(P) setFont(55) mStr(100-P.stat.dig,63,265) diff --git a/parts/modes/dig_10l.lua b/parts/modes/dig_10l.lua index 7fbdd052..b3a1a890 100644 --- a/parts/modes/dig_10l.lua +++ b/parts/modes/dig_10l.lua @@ -9,16 +9,9 @@ return{ env={ pushSpeed=6, dropPiece=check_rise, + eventSet='digBase', bg='bg1',bgm='way', }, - load=function() - PLY.newPlayer(1) - local P=PLAYERS[1] - for _=1,10 do - P:garbageRise(21,1,P:getHolePos()) - end - P.fieldBeneath=0 - end, mesDisp=function(P) setFont(55) mStr(10-P.stat.dig,63,265) diff --git a/parts/modes/dig_400l.lua b/parts/modes/dig_400l.lua index 117b8c3a..b301cb4b 100644 --- a/parts/modes/dig_400l.lua +++ b/parts/modes/dig_400l.lua @@ -1,5 +1,5 @@ local function check_rise(P) - for _=1,math.min(8,400-P.stat.dig)-P.garbageBeneath do + for _=1,math.min(10,400-P.stat.dig)-P.garbageBeneath do P:garbageRise(21,1,P:getHolePos()) end if P.stat.dig==400 then @@ -12,16 +12,9 @@ return{ env={ pushSpeed=6, dropPiece=check_rise, + eventSet='digBase', bg='bg2',bgm='way', }, - load=function() - PLY.newPlayer(1) - local P=PLAYERS[1] - for _=1,10 do - P:garbageRise(21,1,P:getHolePos()) - end - P.fieldBeneath=0 - end, mesDisp=function(P) setFont(55) mStr(400-P.stat.dig,63,265) diff --git a/parts/modes/dig_40l.lua b/parts/modes/dig_40l.lua index 325b78b8..323d9eef 100644 --- a/parts/modes/dig_40l.lua +++ b/parts/modes/dig_40l.lua @@ -1,5 +1,5 @@ local function check_rise(P) - for _=1,math.min(8,40-P.stat.dig)-P.garbageBeneath do + for _=1,math.min(10,40-P.stat.dig)-P.garbageBeneath do P:garbageRise(21,1,P:getHolePos()) end if P.stat.dig==40 then @@ -12,16 +12,9 @@ return{ env={ pushSpeed=6, dropPiece=check_rise, + eventSet='digBase', bg='bg1',bgm='way', }, - load=function() - PLY.newPlayer(1) - local P=PLAYERS[1] - for _=1,10 do - P:garbageRise(21,1,P:getHolePos()) - end - P.fieldBeneath=0 - end, mesDisp=function(P) setFont(55) mStr(40-P.stat.dig,63,265)