LTCatt 6 лет назад
Родитель
Сommit
f9da3ee411

+ 11 - 1
data/mini/functions/zombie/game/summon_evoker.mcfunction

@@ -1,4 +1,14 @@
 # 召唤唤魔者
 
-summon evoker 1010.5 16.5 5007.5 {Tags:["mini_mob"]}
+scoreboard players set $random_min mem 0
+scoreboard players set $random_max mem 4
+function lib:random
+
+# 尸壳
+execute if score $random mem matches 0 positioned 1019.0 20.1 5002.0 unless entity @e[tag=mini_mob,distance=..1] run summon evoker ~ ~ ~ {Tags:["mini_mob"]}
+execute if score $random mem matches 1 positioned 1002.0 19.1 5016.0 unless entity @e[tag=mini_mob,distance=..1] run summon evoker ~ ~ ~ {Tags:["mini_mob"]}
+execute if score $random mem matches 2 positioned 1019.0 13.1 5013.0 unless entity @e[tag=mini_mob,distance=..1] run summon evoker ~ ~ ~ {Tags:["mini_mob"]}
+execute if score $random mem matches 3 positioned 1002.0 13.1 5024.0 unless entity @e[tag=mini_mob,distance=..1] run summon evoker ~ ~ ~ {Tags:["mini_mob"]}
+execute if score $random mem matches 4 positioned 1002.0 13.1 5002.0 unless entity @e[tag=mini_mob,distance=..1] run summon evoker ~ ~ ~ {Tags:["mini_mob"]}
+
 tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"text": "唤魔者 ","color":"gold"},"已出现!"]

+ 11 - 9
data/mini/functions/zombie/game/summon_zombie.mcfunction

@@ -1,16 +1,18 @@
 # 随机召唤僵尸或尸壳
 
 scoreboard players set $random_min mem 0
-scoreboard players set $random_max mem 11
+scoreboard players set $random_max mem 14
 function lib:random
 
 # 尸壳
-execute if score $random mem matches 0 positioned 1019.0 18.1 5013.0 unless entity @e[tag=mini_mob,distance=..1] run summon husk ~ ~ ~ {Tags:["mini_mob"]}
-execute if score $random mem matches 1 positioned 1002.0 18.1 5013.0 unless entity @e[tag=mini_mob,distance=..1] run summon husk ~ ~ ~ {Tags:["mini_mob"]}
-execute if score $random mem matches 2 positioned 1002.5 13.1 5002.5 unless entity @e[tag=mini_mob,distance=..1] run summon husk ~ ~ ~ {Tags:["mini_mob"]}
-execute if score $random mem matches 3 positioned 1018.5 13.1 5023.5 unless entity @e[tag=mini_mob,distance=..1] run summon husk ~ ~ ~ {Tags:["mini_mob"]}
+execute if score $random mem matches 0 positioned 1019.0 20.1 5002.0 unless entity @e[tag=mini_mob,distance=..1] run summon husk ~ ~ ~ {Tags:["mini_mob"]}
+execute if score $random mem matches 1 positioned 1002.0 19.1 5016.0 unless entity @e[tag=mini_mob,distance=..1] run summon husk ~ ~ ~ {Tags:["mini_mob"]}
+execute if score $random mem matches 2 positioned 1019.0 13.1 5013.0 unless entity @e[tag=mini_mob,distance=..1] run summon husk ~ ~ ~ {Tags:["mini_mob"]}
+execute if score $random mem matches 3 positioned 1002.0 13.1 5024.0 unless entity @e[tag=mini_mob,distance=..1] run summon husk ~ ~ ~ {Tags:["mini_mob"]}
+execute if score $random mem matches 4 positioned 1002.0 13.1 5002.0 unless entity @e[tag=mini_mob,distance=..1] run summon husk ~ ~ ~ {Tags:["mini_mob"]}
 # 僵尸
-execute if score $random mem matches 4..5 positioned 1019.0 18.1 5013.0 unless entity @e[tag=mini_mob,distance=..1] run summon zombie ~ ~ ~ {Tags:["mini_mob"]}
-execute if score $random mem matches 6..7 positioned 1002.0 18.1 5013.0 unless entity @e[tag=mini_mob,distance=..1] run summon zombie ~ ~ ~ {Tags:["mini_mob"]}
-execute if score $random mem matches 8..9 positioned 1002.5 13.1 5002.5 unless entity @e[tag=mini_mob,distance=..1] run summon zombie ~ ~ ~ {Tags:["mini_mob"]}
-execute if score $random mem matches 10..11 positioned 1018.5 13.1 5023.5 unless entity @e[tag=mini_mob,distance=..1] run summon zombie ~ ~ ~ {Tags:["mini_mob"]}
+execute if score $random mem matches 5..6 positioned 1019.0 20.1 5002.0 unless entity @e[tag=mini_mob,distance=..1] run summon zombie ~ ~ ~ {Tags:["mini_mob"]}
+execute if score $random mem matches 7..8 positioned 1002.0 19.1 5016.0 unless entity @e[tag=mini_mob,distance=..1] run summon zombie ~ ~ ~ {Tags:["mini_mob"]}
+execute if score $random mem matches 9..10 positioned 1019.0 13.1 5013.0 unless entity @e[tag=mini_mob,distance=..1] run summon zombie ~ ~ ~ {Tags:["mini_mob"]}
+execute if score $random mem matches 11..12 positioned 1002.0 13.1 5024.0 unless entity @e[tag=mini_mob,distance=..1] run summon zombie ~ ~ ~ {Tags:["mini_mob"]}
+execute if score $random mem matches 13..14 positioned 1002.0 13.1 5002.0 unless entity @e[tag=mini_mob,distance=..1] run summon zombie ~ ~ ~ {Tags:["mini_mob"]}

+ 4 - 4
data/mini/functions/zombie/tick20.mcfunction

@@ -8,13 +8,13 @@ function lib:random
 scoreboard players operation $random mem += $zombie_luck mem
 execute if score $random mem matches 80.. run scoreboard players remove $zombie_luck mem 1
 
-# 召唤怪物
-execute if score $random mem matches -5..5 run function mini:zombie/game/summon_zombie
-execute if score $random mem matches ..-10 run function mini:zombie/game/summon_evoker
-
 # 清理恼鬼
 execute if score $random mem matches 50.. run tp @e[type=vex,limit=1,sort=random] ~ -100 ~
 
 # 赋予随机效果
 effect give @e[type=husk,limit=1,sort=random] speed 4
 effect give @e[type=zombie,limit=1,sort=random] slowness 4
+
+# 召唤怪物
+execute if score $random mem matches -5..5 run function mini:zombie/game/summon_zombie
+execute if score $random mem matches ..-10 run function mini:zombie/game/summon_evoker