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

+ 1 - 0
data/ltw/functions/state/0/state_enter.mcfunction

@@ -3,6 +3,7 @@ scoreboard players set $state mem 0
 execute as @a run function ltw:state/0/player_enter
 execute as @a run function ltw:state/0/player_enter
 
 
 # HUD
 # HUD
+scoreboard objectives setdisplay belowName
 scoreboard objectives setdisplay sidebar
 scoreboard objectives setdisplay sidebar
 scoreboard objectives setdisplay list
 scoreboard objectives setdisplay list
 
 

+ 1 - 0
data/ltw/functions/state/3/state_enter.mcfunction

@@ -3,6 +3,7 @@ scoreboard players set $state mem 3
 execute as @a run function ltw:state/3/player_enter
 execute as @a run function ltw:state/3/player_enter
 
 
 # HUD
 # HUD
+scoreboard objectives setdisplay belowName total_score
 scoreboard objectives setdisplay sidebar total_score
 scoreboard objectives setdisplay sidebar total_score
 scoreboard objectives setdisplay list total_score
 scoreboard objectives setdisplay list total_score
 
 

+ 1 - 0
data/ltw/functions/state/4/state_enter.mcfunction

@@ -3,6 +3,7 @@ scoreboard players set $state mem 4
 execute as @a run function ltw:state/4/player_enter
 execute as @a run function ltw:state/4/player_enter
 
 
 # HUD
 # HUD
+scoreboard objectives setdisplay belowName total_score
 scoreboard objectives setdisplay sidebar total_score
 scoreboard objectives setdisplay sidebar total_score
 scoreboard objectives setdisplay list total_score
 scoreboard objectives setdisplay list total_score
 
 

+ 1 - 0
data/ltw/functions/state/6/state_enter.mcfunction

@@ -3,6 +3,7 @@ scoreboard players set $state mem 6
 execute as @a run function ltw:state/6/player_enter
 execute as @a run function ltw:state/6/player_enter
 
 
 # HUD
 # HUD
+scoreboard objectives setdisplay belowName total_score
 scoreboard objectives setdisplay sidebar total_score
 scoreboard objectives setdisplay sidebar total_score
 scoreboard objectives setdisplay list total_score
 scoreboard objectives setdisplay list total_score
 
 

+ 1 - 0
data/ltw/functions/state/7/state_enter.mcfunction

@@ -3,6 +3,7 @@ scoreboard players set $state mem 7
 execute as @a run function ltw:state/7/player_enter
 execute as @a run function ltw:state/7/player_enter
 
 
 # HUD
 # HUD
+scoreboard objectives setdisplay belowName total_score
 scoreboard objectives setdisplay sidebar total_score
 scoreboard objectives setdisplay sidebar total_score
 scoreboard objectives setdisplay list total_score
 scoreboard objectives setdisplay list total_score
 
 

+ 4 - 2
data/mini/functions/colormatch/player_enter.mcfunction

@@ -18,8 +18,10 @@ gamemode adventure @s[tag=!watcher,tag=!rejoining]
 
 
 # 设置玩家生命数量
 # 设置玩家生命数量
 scoreboard players set @s[tag=!watcher,tag=!rejoining] mini_heart 3
 scoreboard players set @s[tag=!watcher,tag=!rejoining] mini_heart 3
+scoreboard players reset @s[tag=!watcher,tag=rejoining] mini_heart
 function mini:main/player_max_health
 function mini:main/player_max_health
 
 
 # 重新加入处理
 # 重新加入处理
-execute if entity @s[tag=rejoining] run function mini:hotpm/player_lose_heart
-# TODO 旁观者应该直接让生命值清零
+execute if entity @s[tag=rejoining] run function mini:main/player_failed
+
+# FIXME : 持有土豆的玩家如果掉线会导致游戏无法继续

+ 2 - 1
data/mini/functions/hotpm/player_enter.mcfunction

@@ -24,7 +24,8 @@ gamemode adventure @s[tag=!watcher,tag=!rejoining]
 
 
 # 设置玩家生命数量
 # 设置玩家生命数量
 scoreboard players set @s[tag=!watcher,tag=!rejoining] mini_heart 2
 scoreboard players set @s[tag=!watcher,tag=!rejoining] mini_heart 2
+scoreboard players reset @s[tag=!watcher,tag=rejoining] mini_heart
 function mini:main/player_max_health
 function mini:main/player_max_health
 
 
 # 重新加入处理
 # 重新加入处理
-execute if entity @s[tag=rejoining] run function mini:hotpm/player_lose_heart
+execute if entity @s[tag=rejoining] run function mini:main/player_failed

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

@@ -8,4 +8,4 @@ execute if score $mini_type mem matches 2 run function mini:tntrun/game_init
 execute if score $mini_type mem matches 3 run function mini:hotpm/game_init
 execute if score $mini_type mem matches 3 run function mini:hotpm/game_init
 execute if score $mini_type mem matches 4 run function mini:colormatch/game_init
 execute if score $mini_type mem matches 4 run function mini:colormatch/game_init
 
 
-# TODO 旁观者会在进入阶段 4 后显示 0 分
+# FIXME 旁观者会在侧边栏显示为 0 分

+ 6 - 2
data/mini/functions/main/game_start.mcfunction

@@ -1,9 +1,13 @@
 
 
 # HUD
 # HUD
-execute if score $mini_type mem matches 1 run scoreboard objectives setdisplay sidebar
-execute if score $mini_type mem matches 2 run scoreboard objectives setdisplay sidebar
+execute if score $mini_type mem matches 1 run scoreboard objectives setdisplay sidebar total_score
+execute if score $mini_type mem matches 1 run scoreboard objectives setdisplay belowName total_score
+execute if score $mini_type mem matches 2 run scoreboard objectives setdisplay sidebar total_score
+execute if score $mini_type mem matches 2 run scoreboard objectives setdisplay belowName total_score
 execute if score $mini_type mem matches 3 run scoreboard objectives setdisplay sidebar mini_heart
 execute if score $mini_type mem matches 3 run scoreboard objectives setdisplay sidebar mini_heart
+execute if score $mini_type mem matches 3 run scoreboard objectives setdisplay belowName mini_heart
 execute if score $mini_type mem matches 4 run scoreboard objectives setdisplay sidebar mini_heart
 execute if score $mini_type mem matches 4 run scoreboard objectives setdisplay sidebar mini_heart
+execute if score $mini_type mem matches 4 run scoreboard objectives setdisplay belowName mini_heart
 scoreboard objectives setdisplay list total_score
 scoreboard objectives setdisplay list total_score