tick20.mcfunction 868 B

12345678910111213141516171819202122
  1. # 随机召唤僵尸
  2. effect clear @a hunger
  3. # 生成随机数
  4. scoreboard players set $random_min mem 0
  5. scoreboard players set $random_max mem 100
  6. function lib:random
  7. scoreboard players operation $random mem += $zombie_luck mem
  8. execute if score $random mem matches 75.. run scoreboard players remove $zombie_luck mem 1
  9. # 清理恼鬼
  10. execute if score $random mem matches 40.. run tp @e[type=vex,limit=1,sort=random] ~ -100 ~
  11. # 赋予随机效果
  12. effect give @e[type=husk,limit=1,sort=random] speed 1 1
  13. effect give @e[type=husk,limit=1,sort=random] speed 4
  14. effect give @e[type=zombie,limit=1,sort=random] slowness 4
  15. effect give @e[type=zombie,limit=1,sort=random] slowness 2 1
  16. # 召唤怪物
  17. execute if score $random mem matches -5..5 run function mini:zombie/game/summon_zombie
  18. execute if score $random mem matches ..-8 run function mini:zombie/game/summon_skeleton