Ver Fonte

尸海寻路:僵尸改成猪灵

HerobrineXia há 6 anos atrás
pai
commit
66ae69e43d

+ 0 - 0
data/mini/functions/zombie/game/summon_evoker.mcfuntion → data/mini/functions/zombie/game/summon_evoker.mcfunction


+ 17 - 0
data/mini/functions/zombie/game/summon_piglin.mcfunction

@@ -0,0 +1,17 @@
+# 召唤猪灵
+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 minecraft:piglin ~ ~ ~ {IsImmuneToZombification:1b}
+execute if score $random mem matches 1 positioned 1002.0 19.1 5016.0 unless entity @e[tag=mini_mob,distance=..1] run summon minecraft:piglin ~ ~ ~ {IsImmuneToZombification:1b}
+execute if score $random mem matches 2 positioned 1019.0 13.1 5013.0 unless entity @e[tag=mini_mob,distance=..1] run summon minecraft:piglin ~ ~ ~ {IsImmuneToZombification:1b}
+execute if score $random mem matches 3 positioned 1002.0 13.1 5024.0 unless entity @e[tag=mini_mob,distance=..1] run summon minecraft:piglin ~ ~ ~ {IsImmuneToZombification:1b}
+execute if score $random mem matches 4 positioned 1002.0 13.1 5002.0 unless entity @e[tag=mini_mob,distance=..1] run summon minecraft:piglin ~ ~ ~ {IsImmuneToZombification:1b}
+tag @e[type=piglin] add mini_mob
+
+# 提高追踪范围
+execute as @e[type=piglin] run attribute @s generic.follow_range base set 35
+
+# 关闭怪物间友伤
+team join white @e[tag=mini_mob]

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

@@ -10,13 +10,13 @@ function lib:random
 execute if score $random mem matches 40.. run tp @e[type=vex,limit=1,sort=random] ~ -100 ~
 
 # 赋予随机效果
-effect give @e[type=!player,limit=1,sort=random] speed 1 1
-effect give @e[type=!player,limit=1,sort=random] speed 4
-effect give @e[type=zombie,limit=1,sort=random] slowness 3
-effect give @e[type=zombie,limit=1,sort=random] slowness 1 1
+effect give @e[type=!player,type=!piglin,limit=1,sort=random] speed 1 1
+effect give @e[type=!player,type=!piglin,limit=1,sort=random] speed 4
+effect give @e[type=piglin,limit=1,sort=random] slowness 3 0
+effect give @e[type=piglin,limit=1,sort=random] slowness 3 1
 
 # 召唤怪物
-execute if score $countdown mem matches 61..120 if score $random mem matches 0..10 run function mini:zombie/game/summon_zombie
+execute if score $countdown mem matches 61..120 if score $random mem matches 0..10 run function mini:zombie/game/summon_piglin
 execute if score $countdown mem matches 1..90 if score $random mem matches 11..20 run function mini:zombie/game/summon_skeleton
 execute if score $countdown mem matches ..60 if score $random mem matches 21..30 run function mini:zombie/game/summon_creeper
 execute if score $countdown mem matches ..0 if score $random mem matches 31..40 run function mini:zombie/game/summon_evoker