|
|
@@ -17,6 +17,16 @@ function ltw:main/get_max_score
|
|
|
execute as @a[tag=!max_uncounted] if score @s total_score = #score_max mem run tag @s add total_rank3
|
|
|
tag @a[tag=max_uncounted] remove max_uncounted
|
|
|
|
|
|
+# 给予进度
|
|
|
+scoreboard players add @a[tag=!watcher] stat_total 1
|
|
|
+advancement grant @a[scores={stat_total=5..}] only ltw:story/total1
|
|
|
+advancement grant @a[scores={stat_total=20..}] only ltw:story/total2
|
|
|
+advancement grant @a[scores={stat_total=50..}] only ltw:story/total3
|
|
|
+scoreboard players add @a[tag=total_rank1] stat_win 1
|
|
|
+advancement grant @a[scores={stat_win=1..}] only ltw:story/win1
|
|
|
+advancement grant @a[scores={stat_win=5..}] only ltw:story/win2
|
|
|
+advancement grant @a[scores={stat_win=20..}] only ltw:story/win3
|
|
|
+
|
|
|
# 计算金粒奖励
|
|
|
scoreboard players set #total_gold mem 0
|
|
|
execute as @a[tag=!watcher] run scoreboard players add #total_gold mem 400
|
|
|
@@ -45,7 +55,7 @@ execute if score #count mem matches ..2 run scoreboard players set #rank2_gold m
|
|
|
execute if score #count mem matches ..2 run scoreboard players set #rank3_gold mem 0
|
|
|
|
|
|
# 显示排名
|
|
|
-tellraw @a [" ",{"text":"\n\n\n\n----- 游戏结束 -----\n","color":"green","bold":true}]
|
|
|
+tellraw @a [" ",{"text":"\n----- 游戏结束 -----\n","color":"green","bold":true}]
|
|
|
tellraw @a [" ",{"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"}]
|
|
|
execute if entity @a[tag=total_rank2] run tellraw @a [" ",{"text": "第二名 - ","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"}]
|
|
|
execute if entity @a[tag=total_rank3] run tellraw @a [" ",{"text": "第三名 - ","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"}]
|
|
|
@@ -66,16 +76,6 @@ execute as @a run scoreboard players operation @s gold += @s temp
|
|
|
execute as @a run scoreboard players operation @s gold_total += @s temp
|
|
|
tellraw @a[tag=!watcher] [" ",{"text": "名次奖励: ","color":"gold"},{"score":{"name": "*","objective": "temp"}}," 金粒"]
|
|
|
|
|
|
-# 给予进度
|
|
|
-scoreboard players add @a[tag=!watcher] stat_total 1
|
|
|
-advancement grant @a[scores={stat_total=5..}] only ltw:story/total1
|
|
|
-advancement grant @a[scores={stat_total=20..}] only ltw:story/total2
|
|
|
-advancement grant @a[scores={stat_total=50..}] only ltw:story/total3
|
|
|
-scoreboard players add @a[tag=total_rank1] stat_win 1
|
|
|
-advancement grant @a[scores={stat_win=1..}] only ltw:story/win1
|
|
|
-advancement grant @a[scores={stat_win=5..}] only ltw:story/win2
|
|
|
-advancement grant @a[scores={stat_win=20..}] only ltw:story/win3
|
|
|
-
|
|
|
# 奖励结束
|
|
|
tellraw @a[tag=!watcher] ""
|
|
|
|