tick20.mcfunction 1.2 KB

12345678910111213141516171819
  1. # 强制死亡机制
  2. execute if score $countdown mem matches 45 run tellraw @a ["",{"text": ">> ","color": "gold","bold": true},{"text": "即死模式已开启, 游戏将在 ","color": "gold"},"45 秒 ", {"text": "后结束","color": "gold"}]
  3. execute if score $countdown mem matches 45 run scoreboard players set $bossbar_color mem 1
  4. execute if score $countdown mem matches 45 run function lib:bossbar/show
  5. execute if score $countdown mem matches ..45 run effect give @a[team=playing] wither 60 1 true
  6. # 显示倒计时
  7. execute if score $countdown mem matches ..10 run title @a times 3 14 2
  8. execute if score $countdown mem matches ..10 run title @a subtitle {"score":{"name":"$countdown","objective":"mem"}}
  9. execute if score $countdown mem matches ..10 run title @a title [""]
  10. execute if score $countdown mem matches ..10 as @a at @s run function lib:sounds/hit2
  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
  14. # 0s:游戏结束
  15. execute if score $countdown mem matches 0 run function mini:main/game_end