next.mcfunction 1.5 KB

12345678910111213141516171819
  1. # 选取下一轮选择的人群
  2. tag @a remove selecting
  3. execute as @a[tag=mini_rank1] run tag @s add selecting
  4. execute if entity @a[tag=selecting] run tellraw @a[tag=!selecting] ["",{"text": ">> ","color":"gold"},"轮到第一名 ",{"selector": "@a[tag=mini_rank1]","color":"gold"}," 选择奖励了!"]
  5. execute unless entity @a[tag=selecting] as @a[tag=mini_rank2] run tag @s add selecting
  6. execute if entity @a[tag=selecting] run tellraw @a[tag=!selecting] ["",{"text": ">> ","color":"gold"},"轮到第二名 ",{"selector": "@a[tag=mini_rank2]","color":"gold"}," 选择奖励了!"]
  7. execute unless entity @a[tag=selecting] as @a[tag=mini_rank3] run tag @s add selecting
  8. execute if entity @a[tag=selecting] run tellraw @a[tag=!selecting] ["",{"text": ">> ","color":"gold"},"轮到第三名 ",{"selector": "@a[tag=mini_rank3]","color":"gold"}," 选择奖励了!"]
  9. execute unless entity @a[tag=selecting] as @a[tag=mini_rank4] run tag @s add selecting
  10. execute if entity @a[tag=selecting] run tellraw @a[tag=!selecting] ["",{"text": ">> ","color":"gold"},"轮到其他人选择奖励了!"]
  11. # 以玩家为对象开始执行
  12. execute as @a[tag=selecting] run function ltw:state/8/next2
  13. execute unless entity @a[tag=selecting] if score $game_type mem matches 1 if score $round mem matches ..5 run function ltw:state/8/continue_gameparty
  14. execute unless entity @a[tag=selecting] if score $game_type mem matches 1 if score $round mem matches 6.. run function ltw:main/game_end
  15. # 初始化倒计时
  16. scoreboard players set $countdown mem 5