|
|
@@ -16,11 +16,12 @@ execute as @e[type=piglin,tag=shop_piglin_11,tag=lobby_entity] at @s unless enti
|
|
|
|
|
|
# 检查已准备人数
|
|
|
execute store result score $count mem if entity @a[tag=lobby_ready]
|
|
|
+execute store result score #total_count mem if entity @a
|
|
|
|
|
|
# 开始:提示开始
|
|
|
execute if score $count mem matches 3.. if score #start_countdown mem matches 999.. run tellraw @a [{"text":"","color":"green"},{"text": ">> ","bold": true},"游戏即将开始, 请使用快捷栏最后一格确定自己是否参与!"]
|
|
|
execute if score $count mem matches 3.. if score #start_countdown mem matches 999.. as @a at @s run function lib:sounds/levelup
|
|
|
-execute if score $count mem matches 3.. if score #start_countdown mem matches 999.. run scoreboard players set #start_countdown mem 161
|
|
|
+execute if score $count mem matches 3.. if score #start_countdown mem matches 999.. run scoreboard players set #start_countdown mem 121
|
|
|
|
|
|
# 取消:提示取消
|
|
|
execute if score $count mem matches ..2 if score #start_countdown mem matches ..999 run tellraw @a [{"text":"","color":"red"},{"text": ">> ","bold": true},"已准备人数不足, 游戏取消!"]
|
|
|
@@ -35,13 +36,12 @@ scoreboard players operation #start_sec mem /= #const_4 mem
|
|
|
# 20s:提示未准备
|
|
|
execute if score #start_sec mem matches 20 run tellraw @a[tag=!lobby_ready] [{"text":"","color":"red"},{"text":">> ","bold": true},"你还没有准备, 如果要参加游戏, 请丢出快捷栏最后一格的物品!"]
|
|
|
|
|
|
-# 30、10s:提示玩家数量过多
|
|
|
-execute if score #start_sec mem matches 30 if score $count mem matches 9.. run tellraw @a [{"text":"","color":"gold"},{"text":">> ","bold": true},"已超出游戏最多支持的 8 人人数上限, 将随机抽取 8 人开始游戏!"]
|
|
|
+# 10s:提示玩家数量过多
|
|
|
execute if score #start_sec mem matches 10 if score $count mem matches 9.. run tellraw @a [{"text":"","color":"gold"},{"text":">> ","bold": true},"已超出游戏最多支持的 8 人人数上限, 将随机抽取 8 人开始游戏!"]
|
|
|
|
|
|
# 0s:开始游戏
|
|
|
execute if score #start_sec mem matches 0 run function ltw:state/0/start_game
|
|
|
|
|
|
# 显示信息
|
|
|
-execute if score #start_countdown mem matches ..999 run title @a actionbar [{"text":"","color":"green"},{"score":{"name":"$count","objective":"mem"}}," 人已准备 | ","将在 ",{"score":{"name":"#start_sec","objective":"mem"}}," 秒后开始游戏"]
|
|
|
-execute if score #start_countdown mem matches 999.. run title @a actionbar [{"text":"","color":"red"},{"score":{"name":"$count","objective":"mem"}}," 人已准备 | 人数不足"]
|
|
|
+execute if score #start_countdown mem matches ..999 run title @a actionbar [{"text":"","color":"green"},{"score":{"name":"$count","objective":"mem"}},"/",{"score":{"name":"#total_count","objective":"mem"}}," 人已准备 | ","将在 ",{"score":{"name":"#start_sec","objective":"mem"}}," 秒后开始游戏"]
|
|
|
+execute if score #start_countdown mem matches 999.. run title @a actionbar [{"text":"","color":"red"},{"score":{"name":"$count","objective":"mem"}},"/",{"score":{"name":"#total_count","objective":"mem"}}," 人已准备 | 人数不足"]
|