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

+ 0 - 2
data/ltw/functions/state/7/next.mcfunction

@@ -25,5 +25,3 @@ scoreboard players set $countdown mem 10
 # 播放音效
 execute as @a[tag=new_selector] at @s run function lib:sounds/hit
 execute if entity @a[tag=new_selector] as @a[tag=!new_selector] at @s run function lib:sounds/hit2
-
-# FIXME : 僵尸游戏的旁观者偶尔会传送到他人身上

+ 1 - 1
data/mini/functions/hotpm/player_lose_heart.mcfunction

@@ -13,4 +13,4 @@ function mini:main/player_lose_heart
 # 最远的人新土豆
 execute if score $player_alive mem matches 2.. as @e[type=area_effect_cloud,tag=pm_boom] at @s as @a[sort=furthest,tag=mini_running,tag=!watcher,limit=1] run function mini:hotpm/game/pm_init
 # 强制观战
-execute at @s as @a[gamemode=spectator,distance=..0.1] run spectate @p[tag=pm_holding]
+# execute at @s as @a[gamemode=spectator,distance=..0.1] run spectate @p[tag=pm_holding]

+ 1 - 2
data/mini/functions/main/player_failed.mcfunction

@@ -12,8 +12,7 @@ execute as @a at @s run function lib:sounds/error
 scoreboard players add @a[tag=mini_running] mini_score 1
 
 # 进入旁观
-gamemode spectator @s
-spectate @r[tag=mini_running]
+gamemode spectator
 
 # 检查游戏是否结束
 function mini:main/check_game_end

+ 1 - 1
data/mini/functions/main/player_finished.mcfunction

@@ -13,7 +13,7 @@ scoreboard players add @a[tag=!mini_running] mini_score 1
 
 # 进入旁观
 gamemode spectator @s
-spectate @r[tag=mini_running]
+# spectate @r[tag=mini_running]
 
 # 检查游戏是否结束
 function mini:main/check_game_end

+ 13 - 0
data/mini/functions/zombie/game/give_equip.mcfunction

@@ -0,0 +1,13 @@
+# 将无装备猪灵变为有装备猪灵
+
+tag @s remove empty_pig
+
+# 生成随机数
+scoreboard players set $random_min mem 1
+scoreboard players set $random_max mem 4
+function lib:random
+
+# 给予装备
+execute if score $random mem matches 1..2 run replaceitem entity @s weapon.mainhand minecraft:crossbow
+execute if score $random mem matches 3..4 run replaceitem entity @s weapon.mainhand minecraft:golden_sword
+execute if score $random mem matches 2..3 run replaceitem entity @s armor.legs minecraft:golden_leggings

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

@@ -1,17 +0,0 @@
-# 召唤苦力怕
-
-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 1017.0 21.0 5004.0 unless entity @e[tag=mini_mob,distance=..1] run summon creeper
-execute if score $random mem matches 1 positioned 1004.0 21.0 5019.0 unless entity @e[tag=mini_mob,distance=..1] run summon creeper
-execute if score $random mem matches 2 positioned 1002.0 13.1 5002.0 unless entity @e[tag=mini_mob,distance=..1] run summon creeper
-execute if score $random mem matches 3 positioned 1019.0 13.1 5024.0 unless entity @e[tag=mini_mob,distance=..1] run summon creeper
-tag @e[type=creeper] add mini_mob
-
-# 提高追踪范围
-execute as @e[type=creeper] run attribute @s generic.follow_range base set 35
-
-# 关闭怪物间友伤
-team join white @e[tag=mini_mob]

+ 15 - 0
data/mini/functions/zombie/game/summon_empty.mcfunction

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

+ 6 - 6
data/mini/functions/zombie/game/summon_piglin.mcfunction → data/mini/functions/zombie/game/summon_equip.mcfunction

@@ -1,13 +1,13 @@
-# 召唤猪灵
+# 召唤有装备猪灵
 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 1017.0 21.0 5004.0 unless entity @e[tag=mini_mob,distance=..1] run summon piglin ~ ~ ~ {IsImmuneToZombification:1b}
-execute if score $random mem matches 1 positioned 1004.0 21.0 5019.0 unless entity @e[tag=mini_mob,distance=..1] run summon piglin ~ ~ ~ {IsImmuneToZombification:1b}
-execute if score $random mem matches 2 positioned 1002.0 13.1 5002.0 unless entity @e[tag=mini_mob,distance=..1] run summon piglin ~ ~ ~ {IsImmuneToZombification:1b}
-execute if score $random mem matches 3 positioned 1019.0 13.1 5024.0 unless entity @e[tag=mini_mob,distance=..1] run summon piglin ~ ~ ~ {IsImmuneToZombification:1b}
-tag @e[type=piglin] add mini_mob
+execute if score $random mem matches 0 positioned 1017.0 21.0 5004.0 unless entity @e[tag=mini_mob,distance=..1] run summon piglin
+execute if score $random mem matches 1 positioned 1004.0 21.0 5019.0 unless entity @e[tag=mini_mob,distance=..1] run summon piglin
+execute if score $random mem matches 2 positioned 1002.0 13.1 5002.0 unless entity @e[tag=mini_mob,distance=..1] run summon piglin
+execute if score $random mem matches 3 positioned 1019.0 13.1 5024.0 unless entity @e[tag=mini_mob,distance=..1] run summon piglin
+execute as @e[type=piglin] run data merge entity @s {IsImmuneToZombification:1b,Tags:["mini_mob"]}
 
 # 提高追踪范围
 execute as @e[type=piglin] run attribute @s generic.follow_range base set 35

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

@@ -1,17 +0,0 @@
-# 召唤唤魔者
-
-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 1017.0 21.0 5004.0 unless entity @e[tag=mini_mob,distance=..1] run summon evoker
-execute if score $random mem matches 1 positioned 1004.0 21.0 5019.0 unless entity @e[tag=mini_mob,distance=..1] run summon evoker
-execute if score $random mem matches 2 positioned 1002.0 13.1 5002.0 unless entity @e[tag=mini_mob,distance=..1] run summon evoker
-execute if score $random mem matches 3 positioned 1019.0 13.1 5024.0 unless entity @e[tag=mini_mob,distance=..1] run summon evoker
-tag @e[type=evoker] add mini_mob
-
-# 提高追踪范围
-execute as @e[type=evoker] run attribute @s generic.follow_range base set 35
-
-# 关闭怪物间友伤
-team join white @e[tag=mini_mob]

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

@@ -1,17 +0,0 @@
-# 召唤骷髅
-
-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 1017.0 21.0 5004.0 unless entity @e[tag=mini_mob,distance=..1] run summon skeleton
-execute if score $random mem matches 1 positioned 1004.0 21.0 5019.0 unless entity @e[tag=mini_mob,distance=..1] run summon skeleton
-execute if score $random mem matches 2 positioned 1002.0 13.1 5002.0 unless entity @e[tag=mini_mob,distance=..1] run summon skeleton
-execute if score $random mem matches 3 positioned 1019.0 13.1 5024.0 unless entity @e[tag=mini_mob,distance=..1] run summon skeleton
-tag @e[type=skeleton] add mini_mob
-
-# 提高追踪范围
-execute as @e[type=evoker] run attribute @s generic.follow_range base set 35
-
-# 关闭怪物间友伤
-team join white @e[tag=mini_mob]

+ 1 - 1
data/mini/functions/zombie/player_intro.mcfunction

@@ -1,3 +1,3 @@
 # 向单个玩家展示小游戏介绍
 tp @s 1010.5 20 5006.0 0 25
-tellraw @s ["",{"text":"\n>> 最后的幸存者(测试) >>\n\n","color":"red","bold":true},{"text": "怪物正在不断地涌现……成为最后的幸存者吧!\n这个小游戏还在测试中, 欢迎告诉我们让它变得更好玩的方法!\n"}]
+tellraw @s ["",{"text":"\n>> 猪海寻路(测试) >>\n\n","color":"red","bold":true},{"text": "猪灵正在不断地涌现……成为最后的幸存者吧!\n这个小游戏还在测试中, 欢迎告诉我们让它变得更好玩的方法!\n"}]

+ 10 - 18
data/mini/functions/zombie/tick20.mcfunction

@@ -1,27 +1,19 @@
 # 随机召唤怪物
 
 # 生成随机数
-scoreboard players set $random_min mem 0
+scoreboard players set $random_min mem 1
 scoreboard players set $random_max mem 100
 function lib:random
 
-# 清理恼鬼
-execute if score $random mem matches 50.. run tp @e[type=vex,limit=1,sort=random] ~ -100 ~
+# 赋予缓慢效果
+execute if score $countdown mem matches 61.. run effect give @e[tag=mini_mob,limit=3,sort=random] slowness 2 0
+execute if score $countdown mem matches 91.. run effect give @e[tag=mini_mob,limit=1,sort=random] slowness 2 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 0
-effect give @e[type=piglin,limit=1,sort=random] slowness 3 0
-effect give @e[type=piglin,limit=1,sort=random] slowness 3 1
-effect give @e[type=!player,limit=2,sort=random] resistance 3 1
-
-# 召唤怪物
-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
+# 召唤猪灵
+execute if score $random mem matches 1..15 if score $countdown mem matches 1.. run function mini:zombie/game/summon_empty
+execute if score $random mem matches 1..15 if score $countdown mem matches ..0 as @e[tag=empty_pig,limit=1,sort=random] run function mini:zombie/game/give_equip
+execute if score $random mem matches 1..15 if score $countdown mem matches ..0 unless entity @e[tag=empty_pig] run function mini:zombie/game/summon_equip
 
 # 显示提示
-execute if score $countdown mem matches 90 run tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"text": "骷髅 ","color":"red"},"已开始出现!"]
-execute if score $countdown mem matches 60 run tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"text": "苦力怕 ","color":"red"},"已开始出现!"]
-execute if score $countdown mem matches 1 run tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"text": "唤魔者 ","color":"red"},"已开始出现!"]
+execute if score $countdown mem matches 60 run tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"text": "猪灵摆脱了缓慢的束缚!","color":"red"}]
+execute if score $countdown mem matches 0 run tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"text": "猪灵取回了他们的装备!","color":"red"}]

+ 1 - 1
data/test/functions/mini/zombie.mcfunction

@@ -7,4 +7,4 @@ scoreboard players set $mini_type mem 5
 function mini:main/game_init
 function ltw:state/4/state_enter
 scoreboard players set $countdown mem 5
-say 已开始尸海寻路!
+say 已开始猪海寻路!