00ll00 6 лет назад
Родитель
Сommit
21dd33fb97

+ 6 - 6
data/ltw/functions/main/game_end.mcfunction

@@ -5,17 +5,17 @@ tag @a remove total_rank1
 tag @a remove total_rank2
 tag @a remove total_rank3
 # 1
-scoreboard players set $t_score_max total_score -2147483648
+scoreboard players set $t_score_max mem -2147483648
 execute as @a run function ltw:main/get_max_score
-execute as @a unless entity @a[tag=total_rank1] if score @s total_score = $t_score_max total_score run tag @s add total_rank1
+execute as @a unless entity @a[tag=total_rank1] if score @s total_score = $t_score_max mem run tag @s add total_rank1
 # 2
-scoreboard players set $t_score_max total_score -2147483648
+scoreboard players set $t_score_max mem -2147483648
 execute as @a[tag=!total_rank1] run function ltw:main/get_max_score
-execute as @a[tag=!total_rank1] unless entity @a[tag=total_rank2] if score @s total_score = $t_score_max total_score run tag @s add total_rank2
+execute as @a[tag=!total_rank1] unless entity @a[tag=total_rank2] if score @s total_score = $t_score_max mem run tag @s add total_rank2
 # 3
-scoreboard players set $t_score_max total_score -2147483648
+scoreboard players set $t_score_max mem -2147483648
 execute as @a[tag=!total_rank1,tag=!total_rank2] run function ltw:main/get_max_score
-execute as @a[tag=!total_rank1,tag=!total_rank2] unless entity @a[tag=total_rank3] if score @s total_score = $t_score_max total_score run tag @s add total_rank3
+execute as @a[tag=!total_rank1,tag=!total_rank2] unless entity @a[tag=total_rank3] if score @s total_score = $t_score_max mem run tag @s add total_rank3
 
 # 显示排名
 execute if entity @a[tag=total_rank2] if entity @a[tag=total_rank3] run tellraw @a ["",{"text":"\n\n----- 游戏结束 -----\n\n","color":"gold","bold":true},{"text": "第一名 - ","color":"green"},{"selector": "@a[tag=total_rank1]","color":"white"},{"text":" (","color":"gray"},{"score":{"name": "@p[tag=total_rank1]","objective": "total_score"},"color":"gray"},{"text":")","color":"gray"},{"text": "\n第二名 - ","color":"green"},{"selector": "@a[tag=total_rank2]","color":"white"},{"text":" (","color":"gray"},{"score":{"name": "@p[tag=total_rank2]","objective": "total_score"},"color":"gray"},{"text":")","color":"gray"},{"text": "\n第三名 - ","color":"green"},{"selector": "@a[tag=total_rank3]","color":"white"},{"text":" (","color":"gray"},{"score":{"name": "@p[tag=total_rank3]","objective": "total_score"},"color":"gray"},{"text":")","color":"gray"},"\n\n"]

+ 1 - 1
data/ltw/functions/main/get_max_score.mcfunction

@@ -1 +1 @@
-execute if score @s total_score > $t_score_max total_score run scoreboard players operation $t_score_max total_score = @s total_score
+execute if score @s total_score > $t_score_max mem run scoreboard players operation $t_score_max mem = @s total_score

+ 2 - 2
data/mini/functions/hotpm/game/pm_init_first.mcfunction

@@ -1,6 +1,6 @@
 # 第一次初始化土豆
-scoreboard players set $t_score_max total_score -2147483648
+scoreboard players set $t_score_max mem -2147483648
 execute as @a[tag=mini_running] run function ltw:main/get_max_score
-execute as @a[tag=mini_running] if score @s total_score = $t_score_max total_score run tag @s add mini_hotpm_top
+execute as @a[tag=mini_running] if score @s total_score = $t_score_max mem run tag @s add mini_hotpm_top
 execute as @a[tag=mini_hotpm_top,limit=1,sort=random] run function mini:hotpm/game/pm_init
 tag @a[tag=mini_hotpm_top] remove mini_hotpm_top

+ 6 - 6
data/mini/functions/main/game_end.mcfunction

@@ -10,17 +10,17 @@ tag @a remove mini_rank2
 tag @a remove mini_rank3
 tag @a remove mini_rank4
 # 1
-scoreboard players set $t_score_max mini_score -2147483648
+scoreboard players set $t_score_max mem -2147483648
 execute as @a run function mini:main/get_max_score
-execute as @a unless entity @a[tag=mini_rank1] if score @s mini_score = $t_score_max mini_score run tag @s[tag=!watcher] add mini_rank1
+execute as @a unless entity @a[tag=mini_rank1] if score @s mini_score = $t_score_max mem run tag @s[tag=!watcher] add mini_rank1
 # 2
-scoreboard players set $t_score_max mini_score -2147483648
+scoreboard players set $t_score_max mem -2147483648
 execute as @a[tag=!mini_rank1] run function mini:main/get_max_score
-execute as @a[tag=!mini_rank1] unless entity @a[tag=mini_rank2] if score @s mini_score = $t_score_max mini_score run tag @s[tag=!watcher] add mini_rank2
+execute as @a[tag=!mini_rank1] unless entity @a[tag=mini_rank2] if score @s mini_score = $t_score_max mem run tag @s[tag=!watcher] add mini_rank2
 # 3
-scoreboard players set $t_score_max mini_score -2147483648
+scoreboard players set $t_score_max mem -2147483648
 execute as @a[tag=!mini_rank1,tag=!mini_rank2] run function mini:main/get_max_score
-execute as @a[tag=!mini_rank1,tag=!mini_rank2] unless entity @a[tag=mini_rank3] if score @s mini_score = $t_score_max mini_score run tag @s[tag=!watcher] add mini_rank3
+execute as @a[tag=!mini_rank1,tag=!mini_rank2] unless entity @a[tag=mini_rank3] if score @s mini_score = $t_score_max mem run tag @s[tag=!watcher] add mini_rank3
 # 4
 tag @a[tag=!mini_rank1,tag=!mini_rank2,tag=!mini_rank3,tag=!watcher] add mini_rank4
 

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

@@ -1 +1 @@
-execute if score @s mini_score > $t_score_max mini_score run scoreboard players operation $t_score_max mini_score = @s mini_score
+execute if score @s mini_score > $t_score_max mem run scoreboard players operation $t_score_max mem = @s mini_score