tick2.mcfunction 1023 B

123456789101112131415161718192021222324
  1. # 随机时间
  2. scoreboard players set $random_min mem -5
  3. scoreboard players set $random_max mem 5
  4. function lib:random
  5. scoreboard players operation $countdown_fast mem += $random mem
  6. execute if score $countdown_fast mem matches ..0 run scoreboard players set $countdown_fast mem 0
  7. # 爆炸
  8. execute if score $countdown_fast mem matches 0 if entity @a[tag=pm_holding] run function mini:hotpm/player_lose_heart
  9. # 检测土豆
  10. function mini:hotpm/game/pm_check
  11. # HUD
  12. scoreboard players set $bossbar_color mem 0
  13. scoreboard players set @a[tag=pm_holding] bossbar_color 1
  14. execute as @p[tag=pm_holding] at @s run scoreboard players set @a[tag=!pm_holding,distance=..12] bossbar_color 2
  15. execute as @p[tag=pm_holding] at @s run scoreboard players set @a[tag=!pm_holding,distance=12..] bossbar_color 3
  16. scoreboard players set $bossbar_type mem 1
  17. function lib:bossbar/show
  18. bossbar set mini:green name "炸弹稳定度"
  19. bossbar set mini:yellow name "炸弹稳定度"
  20. bossbar set mini:red name {"text":"炸弹稳定度","color":"red"}