totem.mcfunction 767 B

1234567891011121314
  1. # 去除进度
  2. advancement revoke @s only item:special/consume_totem
  3. # 有生命计数
  4. execute if score @s mini_heart matches 1.. run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 使用了不死图腾, 抵挡了一次死亡!"]
  5. # 无生命计数
  6. execute unless score @s mini_heart matches 1.. run effect give @s instant_health 1 0 true
  7. execute unless score @s mini_heart matches 1.. run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 使用了不死图腾!"]
  8. # $remove_resistance 信息在小游戏初始化时提供
  9. # 去除buff
  10. execute unless score @s mini_heart matches 1.. run tag @s add have_totem
  11. schedule function mini:special/clear_totem_effect 2t replace