tick20.mcfunction 1.1 KB

1234567891011121314151617
  1. # 显示倒计时
  2. execute if score $countdown mem matches ..10 run title @a times 3 14 2
  3. execute if score $countdown mem matches ..10 run title @a subtitle {"score":{"name":"$countdown","objective":"mem"}}
  4. execute if score $countdown mem matches ..10 run title @a title [""]
  5. execute if score $countdown mem matches ..10 as @a at @s run function lib:sounds/hit2
  6. # 60s / 30s:雷达提示
  7. execute if score $countdown mem matches 60 run tellraw @a ["",{"text": ">> ","color": "aqua","bold": true},"玩家雷达将在 ",{"text": "30 秒","color": "aqua"}, "后开启!"]
  8. execute if score $countdown mem matches 30 run tellraw @a ["",{"text": ">> ","color": "aqua","bold": true},"玩家雷达已开启, 游戏将在 ",{"text": "30 秒","color": "aqua"}, "后结束!"]
  9. # 0s:游戏结束
  10. execute if score $countdown mem matches 0 run function mini:main/game_end
  11. # 回复生命值
  12. execute if score $foursec mem matches 1 run effect give @a[team=playing] regeneration 1 10 true
  13. execute if score $foursec mem matches 1 run schedule function mini:diamond/game/clear_effect 1t replace