Ver código fonte

增加让得分随机变化的道具

LTCatt 6 anos atrás
pai
commit
02421cfa15

+ 16 - 2
data/item/functions/bonus_item/add_score.mcfunction

@@ -1,4 +1,18 @@
 #as player
 execute store result score #bonus_add_score mem run data get block 0 0 0 RecordItem.tag.bonus_add_score
-scoreboard players operation @s total_score += #bonus_add_score mem
-scoreboard players operation @s total_score_disp += #bonus_add_score mem
+
+# 正常的加分
+execute unless score #bonus_add_score mem matches 100 run scoreboard players operation @s total_score += #bonus_add_score mem
+execute unless score #bonus_add_score mem matches 100 run scoreboard players operation @s total_score_disp += #bonus_add_score mem
+execute unless score #bonus_add_score mem matches 100 run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 获得了 ",{"score": {"name":"#bonus_add_score","objective": "mem"}}, " 分, 当前共有 ",{"score": {"name": "@s","objective": "total_score"}}, " 分"]
+
+# 100:硬币
+scoreboard players set $random_max mem 1
+scoreboard players set $random_min mem 0
+function lib:random
+execute if score #bonus_add_score mem matches 100 if score $random mem matches 1 run scoreboard players operation @s total_score *= $c_2 mem
+execute if score #bonus_add_score mem matches 100 if score $random mem matches 1 run scoreboard players operation @s total_score_disp *= $c_2 mem
+execute if score #bonus_add_score mem matches 100 if score $random mem matches 1 run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 的硬币投出了正面, 得分加倍, 当前共有 ",{"score": {"name": "@s","objective": "total_score"}}, " 分"]
+execute if score #bonus_add_score mem matches 100 if score $random mem matches 0 run scoreboard players operation @s total_score /= $c_2 mem
+execute if score #bonus_add_score mem matches 100 if score $random mem matches 0 run scoreboard players operation @s total_score_disp /= $c_2 mem
+execute if score #bonus_add_score mem matches 100 if score $random mem matches 0 run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 的硬币投出了反面, 得分减半, 当前共有 ",{"score": {"name": "@s","objective": "total_score"}}, " 分"]

+ 2 - 2
data/item/functions/bonus_item/call.mcfunction

@@ -8,8 +8,8 @@ clear @s #item:bonus{"bonus_new":1b}
 # 播放音效
 function lib:sounds/hit
 
-# 显示物品拾取
-tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 获得了 ",{"nbt": "RecordItem.tag.item_name","block": "0 0 0","interpret": true}]
+# 显示拾取提示(获得得分的提示由 add_score 显示)
+execute unless data block 0 0 0 RecordItem.tag.bonus_add_score run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 获得了 ",{"nbt": "RecordItem.tag.item_name","block": "0 0 0","interpret": true}]
 
 # 如果有 return 标签则退回物品(最先执行)
 execute if data block 0 0 0 RecordItem.tag{"bonus_return":1b} run function item:bonus_item/return_item

+ 5 - 5
data/item/functions/bonus_item/gameparty/last/random.mcfunction

@@ -4,13 +4,13 @@
 scoreboard players set $random_min mem 1
 scoreboard players set $random_max mem 100
 function lib:random
-scoreboard players operation $t_quality mem = $random mem
+scoreboard players operation #quality mem = $random mem
 
 # 根据品质生成不同的物品
-execute if score $t_quality mem matches ..24 run function item:bonus_item/gameparty/last/white
+execute if score #quality mem matches ..24 run function item:bonus_item/gameparty/last/white
 # 绿色:35%
-execute if score $t_quality mem matches 25..59 run function item:bonus_item/gameparty/last/green
+execute if score #quality mem matches 25..59 run function item:bonus_item/gameparty/last/green
 # 蓝色:25%
-execute if score $t_quality mem matches 60..84 run function item:bonus_item/gameparty/last/blue
+execute if score #quality mem matches 60..84 run function item:bonus_item/gameparty/last/blue
 # 紫色:15%
-execute if score $t_quality mem matches 85.. run function item:bonus_item/gameparty/last/purple
+execute if score #quality mem matches 85.. run function item:bonus_item/gameparty/last/purple

+ 7 - 7
data/item/functions/bonus_item/gameparty/normal/random.mcfunction

@@ -4,15 +4,15 @@
 scoreboard players set $random_min mem -49
 scoreboard players set $random_max mem 50
 function lib:random
-scoreboard players operation $t_quality mem = $round mem
-scoreboard players operation $t_quality mem *= $c_10 mem
-scoreboard players operation $t_quality mem += $random mem
+scoreboard players operation #quality mem = $round mem
+scoreboard players operation #quality mem *= $c_10 mem
+scoreboard players operation #quality mem += $random mem
 
 # 根据品质生成不同的物品
-execute if score $t_quality mem matches ..24 run function item:bonus_item/gameparty/normal/white
+execute if score #quality mem matches ..24 run function item:bonus_item/gameparty/normal/white
 # 绿色:35%
-execute if score $t_quality mem matches 25..59 run function item:bonus_item/gameparty/normal/green
+execute if score #quality mem matches 25..59 run function item:bonus_item/gameparty/normal/green
 # 蓝色:25%
-execute if score $t_quality mem matches 60..84 run function item:bonus_item/gameparty/normal/blue
+execute if score #quality mem matches 60..84 run function item:bonus_item/gameparty/normal/blue
 # 紫色:15%
-execute if score $t_quality mem matches 85.. run function item:bonus_item/gameparty/normal/purple
+execute if score #quality mem matches 85.. run function item:bonus_item/gameparty/normal/purple

+ 12 - 1
data/item/loot_tables/gameparty/last/blue.json

@@ -2,7 +2,7 @@
 
 {
     "type": "minecraft:item",
-    "weight": 11,
+    "weight": 2,
     "name": "minecraft:nether_star",
     "functions": [
         {
@@ -14,6 +14,17 @@
             "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分 +3\\\",\\\"color\\\":\\\"aqua\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":3}"
         }
     ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 1,
+    "name": "minecraft:snowball",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分随机翻倍或减半\\\",\\\"color\\\":\\\"aqua\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":100}"
+        }
+    ]
 }
 
 ]}]}

+ 67 - 1
data/item/loot_tables/gameparty/last/purple.json

@@ -2,7 +2,7 @@
 
 {
     "type": "minecraft:item",
-    "weight": 3,
+    "weight": 12,
     "name": "minecraft:nether_star",
     "functions": [
         {
@@ -14,6 +14,72 @@
             "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分 +4\\\",\\\"color\\\":\\\"light_purple\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":4}"
         }
     ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 1,
+    "name": "minecraft:target",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分随机 +1~6\\\",\\\"color\\\":\\\"light_purple\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":1}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 1,
+    "name": "minecraft:target",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分随机 +1~6\\\",\\\"color\\\":\\\"light_purple\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":2}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 1,
+    "name": "minecraft:target",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分随机 +1~6\\\",\\\"color\\\":\\\"light_purple\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":3}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 1,
+    "name": "minecraft:target",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分随机 +1~6\\\",\\\"color\\\":\\\"light_purple\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":4}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 1,
+    "name": "minecraft:target",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分随机 +1~6\\\",\\\"color\\\":\\\"light_purple\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":5}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 1,
+    "name": "minecraft:target",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分随机 +1~6\\\",\\\"color\\\":\\\"light_purple\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":6}"
+        }
+    ]
 }
 
 ]}]}

+ 12 - 1
data/item/loot_tables/gameparty/normal/blue.json

@@ -2,7 +2,7 @@
 
 {
     "type": "minecraft:item",
-    "weight": 11,
+    "weight": 15,
     "name": "minecraft:nether_star",
     "functions": [
         {
@@ -15,6 +15,17 @@
         }
     ]
 },
+{
+    "type": "minecraft:item",
+    "weight": 4,
+    "name": "minecraft:snowball",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分随机翻倍或减半\\\",\\\"color\\\":\\\"aqua\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":100}"
+        }
+    ]
+},
 {
     "type": "minecraft:item",
     "weight": 4,

+ 67 - 1
data/item/loot_tables/gameparty/normal/purple.json

@@ -2,7 +2,7 @@
 
 {
     "type": "minecraft:item",
-    "weight": 3,
+    "weight": 12,
     "name": "minecraft:nether_star",
     "functions": [
         {
@@ -14,6 +14,72 @@
             "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分 +4\\\",\\\"color\\\":\\\"light_purple\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":4}"
         }
     ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 1,
+    "name": "minecraft:target",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分随机 +1~6\\\",\\\"color\\\":\\\"light_purple\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":1}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 1,
+    "name": "minecraft:target",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分随机 +1~6\\\",\\\"color\\\":\\\"light_purple\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":2}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 1,
+    "name": "minecraft:target",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分随机 +1~6\\\",\\\"color\\\":\\\"light_purple\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":3}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 1,
+    "name": "minecraft:target",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分随机 +1~6\\\",\\\"color\\\":\\\"light_purple\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":4}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 1,
+    "name": "minecraft:target",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分随机 +1~6\\\",\\\"color\\\":\\\"light_purple\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":5}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 1,
+    "name": "minecraft:target",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"得分随机 +1~6\\\",\\\"color\\\":\\\"light_purple\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_add_score\":6}"
+        }
+    ]
 }
 
 ]}]}

+ 2 - 0
data/item/tags/items/bonus.json

@@ -1,5 +1,7 @@
 {
     "values": [
+        "minecraft:target",
+        "minecraft:snowball",
         "minecraft:ender_pearl",
         "minecraft:enchanted_golden_apple",
         "minecraft:golden_apple",

+ 1 - 0
data/ltw/functions/init.mcfunction

@@ -48,6 +48,7 @@ scoreboard players set $ game_id 0
 
 # 常量与变量初始化
 scoreboard players set $c_mini_total mem 5
+scoreboard players set $c_2 mem 2
 scoreboard players set $c_10 mem 10
 scoreboard players set $game_type mem 1
 

+ 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 mem -2147483648
+scoreboard players set #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 mem run tag @s add total_rank1
+execute as @a unless entity @a[tag=total_rank1] if score @s total_score = #score_max mem run tag @s add total_rank1
 # 2
-scoreboard players set $t_score_max mem -2147483648
+scoreboard players set #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 mem run tag @s add total_rank2
+execute as @a[tag=!total_rank1] unless entity @a[tag=total_rank2] if score @s total_score = #score_max mem run tag @s add total_rank2
 # 3
-scoreboard players set $t_score_max mem -2147483648
+scoreboard players set #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 mem 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 = #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 mem run scoreboard players operation $t_score_max mem = @s total_score
+execute if score @s total_score > #score_max mem run scoreboard players operation #score_max mem = @s total_score

+ 4 - 5
data/ltw/functions/main/player_leave.mcfunction

@@ -2,9 +2,9 @@
 execute as @a at @s run function lib:sounds/error
 
 # 由于玩家人数不足,强制结束游戏
-execute store result score $t_count mem if entity @a[tag=!watcher]
-execute if score $state mem matches 1.. if score $game_type mem matches 1 if score $t_count mem matches ..1 run function ltw:main/game_end
-execute if score $state mem matches 1.. if score $game_type mem matches 1 if score $t_count mem matches ..1 run tellraw @a {"text": "由于玩家人数不足, 游戏直接结束!","color":"red"}
+execute store result score #count mem if entity @a[tag=!watcher]
+execute if score $state mem matches 1.. if score $game_type mem matches 1 if score #count mem matches ..1 run function ltw:main/game_end
+execute if score $state mem matches 1.. if score $game_type mem matches 1 if score #count mem matches ..1 run tellraw @a {"text": "由于玩家人数不足, 游戏直接结束!","color":"red"}
 
 # 如果携带热土豆的玩家掉线,则重新生成土豆
 execute if score $state mem matches 5 if score $mini_type mem matches 3 run function mini:hotpm/player_leave
@@ -14,5 +14,4 @@ execute if score $state mem matches 5 if score $mini_type mem matches 3 run func
 # FIXME : 喝完药的玻璃瓶没有 clear
 # FIXME : <! 紧急> 跑酷中途掉线导致名次判断错误
 # FIXME : <! 紧急> [010] 弩和箭可能给不到人
-# FIXME : [010/HIM] 关闭原版进度,它会给玩家经验值什么的很烦
-# TODO : [010] 制作命运硬币(拾取时得分加倍或减半)、命运骰子(拾取时得分 +1~6)
+# FIXME : [010/HIM] 关闭原版进度,它会给玩家经验值什么的很烦

+ 3 - 3
data/ltw/functions/state/0/tick20.mcfunction

@@ -4,9 +4,9 @@ execute if score $countdown mem matches 1.. if score $game_type mem matches 1 ru
 
 # 显示倒计时,播放音效
 execute if score $countdown mem matches 1.. run title @a times 3 14 2
-scoreboard players operation $t_time mem = $countdown mem
-scoreboard players remove $t_time mem 1
-execute if score $countdown mem matches 1.. run title @a subtitle {"score":{"name":"$t_time","objective":"mem"}}
+scoreboard players operation #time mem = $countdown mem
+scoreboard players remove #time mem 1
+execute if score $countdown mem matches 1.. run title @a subtitle {"score":{"name":"#time","objective":"mem"}}
 execute if score $countdown mem matches 1.. if score $game_type mem matches 0 run title @a title ["经典模式"]
 execute if score $countdown mem matches 1.. if score $game_type mem matches 1 run title @a title ["小游戏模式"]
 execute if score $countdown mem matches 1..10 run execute as @a at @s run function lib:sounds/hit2

+ 1 - 1
data/ltw/functions/state/3/tick20.mcfunction

@@ -2,7 +2,7 @@
 title @a times 3 14 2
 title @a subtitle {"score":{"name":"$countdown","objective":"mem"}}
 execute if score $round mem matches ..5 run title @a title ["第 ",{"score": {"objective": "mem","name": "$round"}},"/6 轮"]
-execute if score $round mem matches 6 run title @a title {"text":"最后一轮","color":"gold"}
+execute if score $round mem matches 6 run title @a title {"text":"最终轮","color":"gold"}
 
 # 退出状态
 execute if score $countdown mem matches 10 run function ltw:state/4/state_enter

+ 10 - 10
data/ltw/functions/state/6/generate_bonus.mcfunction

@@ -5,16 +5,16 @@ kill @e[type=item]
 kill @e[type=arrow]
 kill @e[type=trident]
 
-execute store result score $t_bonus_count mem if entity @a[tag=!watcher]
-# scoreboard players add $t_bonus_count mem 1
-execute if score $t_bonus_count mem matches 1.. positioned 17.5 10.2 1967.5 run function item:bonus_item/gameparty/random
-execute if score $t_bonus_count mem matches 2.. positioned 19.5 10.2 1962.5 run function item:bonus_item/gameparty/random
-execute if score $t_bonus_count mem matches 3.. positioned 24.5 10.2 1960.5 run function item:bonus_item/gameparty/random
-execute if score $t_bonus_count mem matches 4.. positioned 29.5 10.2 1962.5 run function item:bonus_item/gameparty/random
-execute if score $t_bonus_count mem matches 5.. positioned 31.5 10.2 1967.5 run function item:bonus_item/gameparty/random
-execute if score $t_bonus_count mem matches 6.. positioned 29.5 10.2 1972.5 run function item:bonus_item/gameparty/random
-execute if score $t_bonus_count mem matches 7.. positioned 24.5 10.2 1974.5 run function item:bonus_item/gameparty/random
-execute if score $t_bonus_count mem matches 8.. positioned 19.5 10.2 1972.5 run function item:bonus_item/gameparty/random
+execute store result score #bonus_count mem if entity @a[tag=!watcher]
+# scoreboard players add #bonus_count mem 1
+execute if score #bonus_count mem matches 1.. positioned 17.5 10.2 1967.5 run function item:bonus_item/gameparty/random
+execute if score #bonus_count mem matches 2.. positioned 19.5 10.2 1962.5 run function item:bonus_item/gameparty/random
+execute if score #bonus_count mem matches 3.. positioned 24.5 10.2 1960.5 run function item:bonus_item/gameparty/random
+execute if score #bonus_count mem matches 4.. positioned 29.5 10.2 1962.5 run function item:bonus_item/gameparty/random
+execute if score #bonus_count mem matches 5.. positioned 31.5 10.2 1967.5 run function item:bonus_item/gameparty/random
+execute if score #bonus_count mem matches 6.. positioned 29.5 10.2 1972.5 run function item:bonus_item/gameparty/random
+execute if score #bonus_count mem matches 7.. positioned 24.5 10.2 1974.5 run function item:bonus_item/gameparty/random
+execute if score #bonus_count mem matches 8.. positioned 19.5 10.2 1972.5 run function item:bonus_item/gameparty/random
 
 # 生成拾取背景
 execute positioned 17.0 10.0 1967.0 run function ltw:state/6/generate_background

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

@@ -1,6 +1,6 @@
 # 第一次初始化土豆
-scoreboard players set $t_score_max mem -2147483648
+scoreboard players set #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 mem run tag @s add mini_hotpm_top
+execute as @a[tag=mini_running] if score @s total_score = #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 mem -2147483648
+scoreboard players set #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 mem run tag @s[tag=!watcher] add mini_rank1
+execute as @a unless entity @a[tag=mini_rank1] if score @s mini_score = #score_max mem run tag @s[tag=!watcher] add mini_rank1
 # 2
-scoreboard players set $t_score_max mem -2147483648
+scoreboard players set #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 mem 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 = #score_max mem run tag @s[tag=!watcher] add mini_rank2
 # 3
-scoreboard players set $t_score_max mem -2147483648
+scoreboard players set #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 mem 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 = #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 mem run scoreboard players operation $t_score_max mem = @s mini_score
+execute if score @s mini_score > #score_max mem run scoreboard players operation #score_max mem = @s mini_score