Procházet zdrojové kódy

陷阱以 0.1s 作为单位

LTCatt před 6 roky
rodič
revize
4085100ee8

+ 0 - 1
data/ltw/functions/clock/tick20.mcfunction

@@ -4,7 +4,6 @@ schedule function ltw:clock/tick20 20t replace
 # 调用其他模块
 execute if score $state mem matches 3 run function ltw:state/3/tick20
 execute if score $state mem matches 4 run function ltw:state/4/tick20
-execute if score $state mem matches 5 run function ltw:state/5/tick20
 execute if score $state mem matches 6 run function ltw:state/6/tick20
 
 # 全局倒计时

+ 0 - 1
data/ltw/functions/state/5/tick20.mcfunction

@@ -1 +0,0 @@
-function mini:main/tick20

+ 3 - 2
data/mini/functions/colormatch/game/remove_ground.mcfunction

@@ -2,9 +2,10 @@
 execute positioned 1001 11 4000 run clone ~ ~ ~ ~24 ~ ~24 1050 15 4000
 
 # 告知玩家
-tellraw @a [{"text":">> ","color":"gold","bold": true},{"text":"时间到!","color":"white","bold": false}]
+# tellraw @a [{"text":">> ","color":"gold","bold": true},{"text":"时间到!","color":"white","bold": false}]
+execute as @a at @s run function lib:sounds/hit
 # 重置分数
-scoreboard players set $countdown mem 3
+scoreboard players set $countdown_fast mem 50
 scoreboard players set $color_match_type mem 1
 
 # 预备下一轮

+ 4 - 8
data/mini/functions/colormatch/game/start_new_round.mcfunction

@@ -4,12 +4,8 @@ function mini:colormatch/game/replace_wall
 execute positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 1050 15 4000
 
 # 设置倒计时
-scoreboard players add $color_match_round mem 1
-execute if score $color_match_round mem matches 2 if score $color_match_time mem matches 4.. run scoreboard players remove $color_match_time mem 1
-execute if score $color_match_round mem matches 2 if score $color_match_time mem matches 4.. run tellraw @a [{"text":">> ","color":"gold","bold": true},{"text":"地板消失速度提升!","color":"white","bold": false}]
-
-execute if score $color_match_round mem matches 2 run scoreboard players set $color_match_round mem 0
-scoreboard players operation $countdown mem = $color_match_time mem
+scoreboard players remove $color_match_time mem 2
+scoreboard players operation $countdown_fast mem = $color_match_time mem
 
 # 重置分数
 scoreboard players set $color_match_type mem 0
@@ -18,6 +14,6 @@ scoreboard players set $color_match_type mem 0
 execute as @a[tag=color_match_fall] at @s run tp @s ~ 20 ~
 tag @a[tag=color_match_fall] remove color_match_fall
 
-# 龙猫:我觉得没必要告知玩家是啥方块,看墙壁就够了……
 # 告知玩家
-tellraw @a [{"text":">> ","color":"gold","bold": true},{"text":"新的一轮开始了!","color":"white","bold": false}]
+execute as @a at @s run function lib:sounds/hit
+# tellraw @a [{"text":">> ","color":"gold","bold": true},{"text":"新的一轮开始了!","color":"white","bold": false}]

+ 1 - 2
data/mini/functions/colormatch/game_init.mcfunction

@@ -10,8 +10,7 @@ fill 1049 11 4025 1075 40 4025 stone
 fill 1074 30 4024 1050 30 4000 barrier
 
 # 设置分数
-scoreboard players set $color_match_round mem 0
-scoreboard players set $color_match_time mem 10
+scoreboard players set $color_match_time mem 100
 
 # 设置模式为地板消失
 scoreboard players set $color_match_type mem 0

+ 8 - 0
data/mini/functions/colormatch/tick2.mcfunction

@@ -0,0 +1,8 @@
+
+# 开始新的一轮
+execute if score $countdown_fast mem matches 0 if score $color_match_type mem matches 0 run function mini:colormatch/game/remove_ground
+execute if score $countdown_fast mem matches 0 if score $color_match_type mem matches 1 run function mini:colormatch/game/start_new_round
+
+# 显示当前剩余秒数
+execute if score $countdown_fast mem matches 1.. if score $color_match_type mem matches 0 run title @a actionbar [{"text":"地板消失: ","color":"red","bold": true},{"score": { "name": "$countdown_fast","objective": "mem"}}]
+execute if score $countdown_fast mem matches 1.. if score $color_match_type mem matches 1 run title @a actionbar [{"text":"下一轮: ","color":"red","bold": true},{"score": { "name": "$countdown_fast","objective": "mem"}}]

+ 0 - 8
data/mini/functions/colormatch/tick20.mcfunction

@@ -1,8 +0,0 @@
-# 每秒函数
-# 开新的一轮
-execute if score $countdown mem matches 0 if score $color_match_type mem matches 0 run function mini:colormatch/game/remove_ground
-execute if score $countdown mem matches 0 if score $color_match_type mem matches 1 run function mini:colormatch/game/start_new_round
-
-# 显示当前剩余秒数
-execute if score $countdown mem matches 1.. if score $color_match_type mem matches 0 run title @a actionbar [{"text":"距离地板消失: ","color":"red","bold": true},{"score": { "name": "$countdown","objective": "mem"}}]
-execute if score $countdown mem matches 1.. if score $color_match_type mem matches 1 run title @a actionbar [{"text":"距离下一轮开始: ","color":"red","bold": true},{"score": { "name": "$countdown","objective": "mem"}}]

+ 2 - 1
data/mini/functions/main/tick2.mcfunction

@@ -1,2 +1,3 @@
 execute if score $mini_type mem matches 2 run function mini:tntrun/tick2
-execute if score $mini_type mem matches 3 run function mini:hotpm/tick2
+execute if score $mini_type mem matches 3 run function mini:hotpm/tick2
+execute if score $mini_type mem matches 4 run function mini:colormatch/tick2

+ 0 - 1
data/mini/functions/main/tick20.mcfunction

@@ -1 +0,0 @@
-execute if score $mini_type mem matches 4 run function mini:colormatch/tick20