tick20.mcfunction 672 B

12345678910111213
  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. # 0s:游戏结束
  7. execute if score $countdown mem matches 0 run function mini:main/game_end
  8. # 回复生命值
  9. execute if score $twice mem matches 1 run effect give @a[team=playing] regeneration 1 10 true
  10. execute if score $twice mem matches 1 run schedule function mini:diamond/game/clear_effect 1t replace