tick5.mcfunction 1.3 KB

123456789101112131415
  1. # 击杀音效与提示
  2. execute as @a[team=playing] run scoreboard players operation @s temp = @s kill_phantom
  3. execute as @a[team=playing] run scoreboard players operation @s temp -= @s kill_phantom2
  4. execute as @a[team=playing] run scoreboard players operation @s kill_phantom2 = @s kill_phantom
  5. execute as @a[team=playing] run scoreboard players operation @s kill_phantom2 %= #const_5 mem
  6. execute as @a[team=playing,scores={temp=1..,kill_phantom2=1..}] run function lib:sounds/hit
  7. execute as @a[team=playing,scores={temp=1..,kill_phantom2=0}] run function lib:sounds/levelup
  8. execute as @a[team=playing,scores={temp=1..,kill_phantom2=0}] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"}," 已击杀 ",{"score": { "name": "@s","objective": "kill_phantom"},"color":"gold"}," 只幻翼!"]
  9. execute as @a[team=playing] run scoreboard players operation @s kill_phantom2 = @s kill_phantom
  10. # 给予进度
  11. execute as @a[team=playing,scores={temp=1..,kill_phantom=8}] run advancement grant @s only ltw:combat/phantom1
  12. execute as @a[team=playing,scores={temp=1..,kill_phantom=16}] run advancement grant @s only ltw:combat/phantom2
  13. execute as @a[team=playing,scores={temp=1..,kill_phantom=24}] run advancement grant @s only ltw:combat/phantom3