tick20.mcfunction 892 B

12345678910111213141516171819
  1. # 更新绿宝石数量
  2. execute as @a[team=playing] store result score @s emerald run clear @s emerald 0
  3. # 刷新交易
  4. execute as @e[type=villager,tag=TradePlayer] run function mini:trade/game/villager_update_trade
  5. # 显示倒计时
  6. execute if score $countdown mem matches ..10 run title @a times 3 14 2
  7. execute if score $countdown mem matches ..10 run title @a subtitle {"score":{"name":"$countdown","objective":"mem"}}
  8. execute if score $countdown mem matches ..10 run title @a title [""]
  9. execute if score $countdown mem matches ..10 as @a at @s run function lib:sounds/hit2
  10. # 0s:游戏结束
  11. execute if score $countdown mem matches 0 run function mini:main/game_end
  12. # 回复生命值
  13. execute if score $foursec mem matches 1 run effect give @a[team=playing] regeneration 1 10 true
  14. execute if score $foursec mem matches 1 run schedule function mini:trade/game/clear_effect 1t replace