00ll00 пре 6 година
родитељ
комит
19797b4467

+ 3 - 6
data/mini/functions/hotpm/game/pm_init.mcfunction

@@ -1,11 +1,8 @@
-# 将土豆刷新给离自己最远的人
-execute at @s as @a[sort=furthest,tag=mini_running,tag=!watcher,limit=1] run function mini:hotpm/game/pm_get
+# 刷新自己土豆
+function mini:hotpm/game/pm_get
 
 # 告知玩家
-tellraw @a [{"text":">> ","color":"gold","bold": true},{"selector":"@a[tag=pm_hoding]","color":"yellow","bold":false},{"text":" 获得了土豆!","color":"white","bold":false}]
-
-# 强制观战
-execute at @s as @a[gamemode=spectator,distance=..0.1] run spectate @p[tag=pm_hoding]
+tellraw @a [{"text":">> ","color":"gold","bold": true},{"selector":"@s","color":"yellow","bold":false},{"text":" 获得了土豆!","color":"white","bold":false}]
 
 # 土豆爆炸时间 = 2 * 存活人数 + 4(秒)
 scoreboard players set $countdown_fast mem 40

+ 4 - 2
data/mini/functions/hotpm/player_lose_heart.mcfunction

@@ -10,5 +10,7 @@ particle minecraft:explosion ~ ~1 ~ 0.4 0.4 0.4 0 5
 summon minecraft:area_effect_cloud ~ ~ ~ {Tags:["pm_boom"]}
 # 减少生命
 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 run function mini:hotpm/game/pm_init
+# 最远的人新土豆
+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_hoding]