pm_init.mcfunction 694 B

123456789101112131415
  1. # 将土豆刷新给离自己最远的人
  2. execute at @s as @a[sort=furthest,tag=mini_running,tag=!watcher,limit=1] run function mini:hotpm/game/pm_get
  3. # 告知玩家
  4. tellraw @a [{"text":">> ","color":"gold","bold": true},{"selector":"@a[tag=pm_hoding]","color":"yellow","bold":false},{"text":" 获得了土豆!","color":"white","bold":false}]
  5. # 强制观战
  6. execute at @s as @a[gamemode=spectator,distance=..0.1] run spectate @p[tag=pm_hoding]
  7. # 土豆爆炸时间 = 2.5 * 存活人数 + 3(秒)
  8. scoreboard players set $countdown_fast mem 25
  9. execute as @a[tag=mini_running] run scoreboard players add $countdown_fast mem 30
  10. # 删除效果云
  11. kill @s[type=area_effect_cloud,tag=pm_boom]