ソースを参照

Merge branch 'master' into final

00ll00 6 年 前
親
コミット
4e7b1a2a84
91 ファイル変更、428 行追加、242 行削除
  1. 2 1
      data/item/functions/bonus_item/add_score.mcfunction
  2. 1 1
      data/item/functions/disable_slot/disable_slot_7.mcfunction
  3. 1 1
      data/item/functions/disable_slot/disable_slot_8.mcfunction
  4. 1 1
      data/item/functions/lobby_state/join_game.mcfunction
  5. 1 1
      data/item/functions/lobby_state/join_watch.mcfunction
  6. 4 4
      data/item/functions/shop/buy_armor1.mcfunction
  7. 7 7
      data/item/functions/shop/buy_armor2.mcfunction
  8. 7 7
      data/item/functions/shop/buy_armor3.mcfunction
  9. 0 16
      data/item/functions/shop/buy_armor4.mcfunction
  10. 16 0
      data/item/functions/shop/buy_dice.mcfunction
  11. 16 0
      data/item/functions/shop/buy_easter_egg.mcfunction
  12. 1 1
      data/item/functions/shop/buy_pig.mcfunction
  13. 4 3
      data/item/functions/shop/check.mcfunction
  14. 3 4
      data/item/functions/shop/refresh_equip.mcfunction
  15. 2 2
      data/item/functions/shop/refresh_gold.mcfunction
  16. 5 0
      data/item/functions/shop/special_dice.mcfunction
  17. 1 0
      data/item/functions/shop/special_easter_egg.mcfunction
  18. 1 1
      data/item/functions/tick2.mcfunction
  19. 2 24
      data/item/loot_tables/gameparty/normal/blue.json
  20. 3 14
      data/item/loot_tables/gameparty/normal/white.json
  21. 9 0
      data/lib/functions/effect/floating.mcfunction
  22. 8 0
      data/lib/functions/effect/regen.mcfunction
  23. 5 3
      data/lib/functions/random.mcfunction
  24. 0 7
      data/lib/functions/roll_dice/d100.mcfunction
  25. 0 7
      data/lib/functions/roll_dice/d20.mcfunction
  26. 0 7
      data/lib/functions/roll_dice/d6.mcfunction
  27. 0 7
      data/lib/functions/roll_dice/d8.mcfunction
  28. 1 1
      data/ltw/functions/clock/tick2.mcfunction
  29. 5 3
      data/ltw/functions/clock/tick20.mcfunction
  30. 3 0
      data/ltw/functions/clock/tick5.mcfunction
  31. 7 1
      data/ltw/functions/init.mcfunction
  32. 3 3
      data/ltw/functions/main/game_end.mcfunction
  33. 4 0
      data/ltw/functions/main/get_max_score.mcfunction
  34. 9 5
      data/ltw/functions/main/player_enter.mcfunction
  35. 1 1
      data/ltw/functions/state/0/parkour/tempo_block/marker_spawn.mcfunction
  36. 1 1
      data/ltw/functions/state/0/parkour/tempo_block/tempo_blue.mcfunction
  37. 1 1
      data/ltw/functions/state/0/parkour/tempo_block/tempo_red.mcfunction
  38. 7 0
      data/ltw/functions/state/0/roll_dice/d20.mcfunction
  39. 3 0
      data/ltw/functions/state/0/roll_dice/draw.mcfunction
  40. 3 0
      data/ltw/functions/state/0/roll_dice/lose.mcfunction
  41. 29 0
      data/ltw/functions/state/0/roll_dice/show_result.mcfunction
  42. 6 0
      data/ltw/functions/state/0/roll_dice/super_lose.mcfunction
  43. 5 0
      data/ltw/functions/state/0/roll_dice/super_win.mcfunction
  44. 3 0
      data/ltw/functions/state/0/roll_dice/win.mcfunction
  45. 4 5
      data/ltw/functions/state/0/summon_entity.mcfunction
  46. 9 1
      data/ltw/functions/state/0/tick5.mcfunction
  47. 1 1
      data/ltw/functions/state/6/state_enter.mcfunction
  48. 6 1
      data/ltw/functions/state/6/tick2.mcfunction
  49. 1 0
      data/ltw/functions/state/7/continue_gameparty.mcfunction
  50. 2 1
      data/ltw/functions/state/7/next2.mcfunction
  51. 1 1
      data/ltw/functions/state/7/tick2.mcfunction
  52. 4 4
      data/mini/functions/colormatch/game/generate_parts.mcfunction
  53. 5 4
      data/mini/functions/colormatch/game/get_random_floor.mcfunction
  54. 1 1
      data/mini/functions/colormatch/game/newarray.mcfunction
  55. 1 1
      data/mini/functions/colormatch/game/prepare_round.mcfunction
  56. 12 12
      data/mini/functions/colormatch/game/replace_wall.mcfunction
  57. 23 0
      data/mini/functions/colormatch/game/start_new_round.mcfunction
  58. 4 0
      data/mini/functions/colormatch/game_end.mcfunction
  59. 1 1
      data/mini/functions/colormatch/player_intro.mcfunction
  60. 1 1
      data/mini/functions/hotpm/game/damage_dealt.mcfunction
  61. 0 9
      data/mini/functions/hotpm/game/damage_dealt2.mcfunction
  62. 15 0
      data/mini/functions/hotpm/game/pm_check.mcfunction
  63. 2 0
      data/mini/functions/hotpm/game/pm_get.mcfunction
  64. 21 0
      data/mini/functions/hotpm/game/pm_give.mcfunction
  65. 8 10
      data/mini/functions/hotpm/game/pm_init.mcfunction
  66. 0 7
      data/mini/functions/hotpm/game/pm_init_first.mcfunction
  67. 3 1
      data/mini/functions/hotpm/game/pm_lost.mcfunction
  68. 9 0
      data/mini/functions/hotpm/game/transfer_potato.mcfunction
  69. 0 3
      data/mini/functions/hotpm/game_start.mcfunction
  70. 2 0
      data/mini/functions/hotpm/player_enter.mcfunction
  71. 2 2
      data/mini/functions/hotpm/player_leave.mcfunction
  72. 10 10
      data/mini/functions/hotpm/player_lose_heart.mcfunction
  73. 15 4
      data/mini/functions/hotpm/tick2.mcfunction
  74. 3 0
      data/mini/functions/main/get_max_score.mcfunction
  75. 6 0
      data/mini/functions/main/get_max_temp.mcfunction
  76. 0 1
      data/mini/functions/main/tick5.mcfunction
  77. 2 2
      data/mini/functions/parkour/game_start.mcfunction
  78. 2 1
      data/mini/functions/parkour/player_enter.mcfunction
  79. 5 1
      data/mini/functions/phantom/game_end.mcfunction
  80. 1 1
      data/mini/functions/phantom/player_intro.mcfunction
  81. 25 3
      data/mini/functions/tntrun/game_init.mcfunction
  82. 1 1
      data/mini/functions/tntrun/game_start.mcfunction
  83. 3 1
      data/mini/functions/tntrun/init.mcfunction
  84. 4 2
      data/mini/functions/tntrun/player_enter.mcfunction
  85. 1 1
      data/mini/functions/tntrun/player_enter2.mcfunction
  86. 1 0
      data/mini/functions/tntrun/player_failed.mcfunction
  87. 3 6
      data/mini/functions/tntrun/player_intro.mcfunction
  88. 12 2
      data/mini/functions/tntrun/tick2.mcfunction
  89. 0 2
      data/mini/functions/tntrun/tick5.mcfunction
  90. 2 2
      data/mini/functions/tntrun/watcher_limit.mcfunction
  91. 3 1
      data/mini/tags/blocks/tntrun_floor.json

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

@@ -22,7 +22,8 @@ function ltw:main/get_max_score
 tag @a remove highest
 tag @a remove may_highest
 execute as @a if score @s total_score = #score_max mem run tag @s add may_highest
-execute at @s run tag @a[tag=may_highest,limit=1,sort=furthest] add highest
+execute at @s run tag @a[tag=may_highest,limit=1,sort=furthest,scores={total_score=1..}] add highest
+execute unless entity @a[tag=highest] run tag @s add highest
 
 execute if score #bonus_add_score mem matches 200 run scoreboard players add @s total_score 1
 execute if score #bonus_add_score mem matches 200 run scoreboard players add @s total_score_disp 1

+ 1 - 1
data/item/functions/disable_slot/disable_slot_7.mcfunction

@@ -1,3 +1,3 @@
 clear @s barrier{LockItem:1b,LockSlot:7b}
-execute if data entity @s Inventory[{Slot:7b}] unless data entity @s Inventory[{Slot:7b,tag:{LockItem:1b}}] at @s run function item:return_slot/return_slot_7
+execute if data entity @s Inventory[{Slot:7b}] unless data entity @s Inventory[{Slot:7b,tag:{LockItem:1b}}] unless data entity @s Inventory[{Slot:7b,tag:{game_item:1b}}] unless data entity @s Inventory[{Slot:7b,tag:{lobby_item:1b}}] at @s run function item:return_slot/return_slot_7
 replaceitem entity @s hotbar.7 barrier{LockItem:1b,LockSlot:7b,display:{Name:'{"text":"已锁定","color":"red","italic":false}'}}

+ 1 - 1
data/item/functions/disable_slot/disable_slot_8.mcfunction

@@ -1,3 +1,3 @@
 clear @s barrier{LockItem:1b,LockSlot:8b}
-execute if data entity @s Inventory[{Slot:8b}] unless data entity @s Inventory[{Slot:8b,tag:{LockItem:1b}}] at @s run function item:return_slot/return_slot_8
+execute if data entity @s Inventory[{Slot:8b}] unless data entity @s Inventory[{Slot:8b,tag:{LockItem:1b}}] unless data entity @s Inventory[{Slot:8b,tag:{game_item:1b}}] unless data entity @s Inventory[{Slot:8b,tag:{lobby_item:1b}}] at @s run function item:return_slot/return_slot_8
 replaceitem entity @s hotbar.8 barrier{LockItem:1b,LockSlot:8b,display:{Name:'{"text":"已锁定","color":"red","italic":false}'}}

+ 1 - 1
data/item/functions/lobby_state/join_game.mcfunction

@@ -3,7 +3,7 @@ clear @s lime_dye{lobby_item:1b,lobby_ready:1b}
 clear @s gray_dye{lobby_item:1b,lobby_watch:1b}
 kill @e[type=item,nbt={Item:{id:"minecraft:gray_dye",tag:{lobby_item:1b,lobby_watch:1b}}}]
 execute if data entity @s Inventory[{Slot:8b}] unless data entity @s Inventory[{Slot:8b,tag:{lobby_item:1b,lobby_watch:1b}}] at @s run function item:disable_slot/disable_slot_8
-replaceitem entity @s hotbar.8 lime_dye{lobby_item:1b,lobby_ready:1b,display:{Name:'{"text":"已准备 (按 Q 切换)","color":"green","italic":false}',Lore:['{"text":"你将在下一局参与游戏","color":"gray","italic":false}']}}
+replaceitem entity @s hotbar.8 lime_dye{lobby_item:1b,lobby_ready:1b,display:{Name:'[{"text":"已准备 (按 ","color":"green","italic":false},{"keybind":"key.drop","color":"green","italic":false},{"text":" 切换)","color":"green","italic":false}]',Lore:['{"text":"你将在下一局参与游戏","color":"gray","italic":false}']}}
 execute at @s run function lib:sounds/hit
 
 # 处理数据

+ 1 - 1
data/item/functions/lobby_state/join_watch.mcfunction

@@ -3,7 +3,7 @@ clear @s lime_dye{lobby_item:1b,lobby_ready:1b}
 clear @s gray_dye{lobby_item:1b,lobby_watch:1b}
 kill @e[type=item,nbt={Item:{id:"minecraft:lime_dye",tag:{lobby_item:1b,lobby_ready:1b}}}]
 execute if data entity @s Inventory[{Slot:8b}] unless data entity @s Inventory[{Slot:8b,tag:{lobby_item:1b,lobby_ready:1b}}] at @s run function item:disable_slot/disable_slot_8
-replaceitem entity @s hotbar.8 gray_dye{lobby_item:1b,lobby_watch:1b,display:{Name:'{"text":"旁观 (按 Q 切换)","color":"white","italic":false}',Lore:['{"text":"你将在下一局旁观游戏","color":"gray","italic":false}']}}
+replaceitem entity @s hotbar.8 gray_dye{lobby_item:1b,lobby_watch:1b,display:{Name:'[{"text":"旁观 (按 ","color":"white","italic":false},{"keybind":"key.drop","color":"white","italic":false},{"text":" 切换)","color":"white","italic":false}]',Lore:['{"text":"你将在下一局旁观游戏","color":"gray","italic":false}']}}
 execute at @s run function lib:sounds/hit2
 
 # 处理数据

+ 4 - 4
data/item/functions/shop/buy_armor1.mcfunction

@@ -1,15 +1,15 @@
-# 金靴子 (1 gi)
+# 金靴子 (4 gi)
 # 触发器ID 3
 execute unless entity @s[scores={shop_armor=0..}] run scoreboard players set @s shop_armor 0
 tag @s remove canbuy
-tag @s[scores={shop_armor=0,gold=9..}] add canbuy
+tag @s[scores={shop_armor=0,gold=36..}] add canbuy
 tellraw @s[scores={shop_armor=1..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-tellraw @s[scores={shop_armor=0,gold=..8}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金锭来购买这个物品!","color":"red"}]
+tellraw @s[scores={shop_armor=0,gold=..35}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金锭来购买这个物品!","color":"red"}]
 tellraw @s[scores={shop_armor=..-1}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
 tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"金靴子","color":"green"}]
 execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"金靴子","color":"green"}]
 scoreboard players add @s[tag=canbuy] shop_armor 1
-scoreboard players remove @s[tag=canbuy] gold 9
+scoreboard players remove @s[tag=canbuy] gold 36
 execute as @s[tag=!canbuy] at @s run function lib:sounds/error
 execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
 execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 7 - 7
data/item/functions/shop/buy_armor2.mcfunction

@@ -1,15 +1,15 @@
-# 金头盔 (4 gi)
-# 触发器ID 4
+# 金护腿 (1 gb)
+# 触发器ID 5
 execute unless entity @s[scores={shop_armor=0..}] run scoreboard players set @s shop_armor 0
 tag @s remove canbuy
-tag @s[scores={shop_armor=1,gold=36..}] add canbuy
+tag @s[scores={shop_armor=1,gold=81..}] add canbuy
 tellraw @s[scores={shop_armor=2..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-tellraw @s[scores={shop_armor=1,gold=..35}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金锭来购买这个物品!","color":"red"}]
+tellraw @s[scores={shop_armor=1,gold=..80}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
 tellraw @s[scores={shop_armor=..0}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
-tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"金头盔","color":"green"}]
-execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"金头盔","color":"green"}]
+tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"金护腿","color":"green"}]
+execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"金护腿","color":"green"}]
 scoreboard players add @s[tag=canbuy] shop_armor 1
-scoreboard players remove @s[tag=canbuy] gold 36
+scoreboard players remove @s[tag=canbuy] gold 81
 execute as @s[tag=!canbuy] at @s run function lib:sounds/error
 execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
 execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 7 - 7
data/item/functions/shop/buy_armor3.mcfunction

@@ -1,15 +1,15 @@
-# 金护腿 (1 gb)
-# 触发器ID 5
+# 金胸甲 (3 gb)
+# 触发器ID 6
 execute unless entity @s[scores={shop_armor=0..}] run scoreboard players set @s shop_armor 0
 tag @s remove canbuy
-tag @s[scores={shop_armor=2,gold=81..}] add canbuy
+tag @s[scores={shop_armor=2,gold=243..}] add canbuy
 tellraw @s[scores={shop_armor=3..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-tellraw @s[scores={shop_armor=2,gold=..80}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
+tellraw @s[scores={shop_armor=2,gold=..242}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
 tellraw @s[scores={shop_armor=..1}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
-tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"金护腿","color":"green"}]
-execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"金护腿","color":"green"}]
+tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"金胸甲","color":"green"}]
+execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"金胸甲","color":"green"}]
 scoreboard players add @s[tag=canbuy] shop_armor 1
-scoreboard players remove @s[tag=canbuy] gold 81
+scoreboard players remove @s[tag=canbuy] gold 243
 execute as @s[tag=!canbuy] at @s run function lib:sounds/error
 execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
 execute as @s[tag=canbuy] run function item:shop/refresh_gold

+ 0 - 16
data/item/functions/shop/buy_armor4.mcfunction

@@ -1,16 +0,0 @@
-# 金胸甲 (3 gb)
-# 触发器ID 6
-execute unless entity @s[scores={shop_armor=0..}] run scoreboard players set @s shop_armor 0
-tag @s remove canbuy
-tag @s[scores={shop_armor=3,gold=243..}] add canbuy
-tellraw @s[scores={shop_armor=4..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
-tellraw @s[scores={shop_armor=3,gold=..242}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金块来购买这个物品!","color":"red"}]
-tellraw @s[scores={shop_armor=..2}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
-tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"金胸甲","color":"green"}]
-execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"金胸甲","color":"green"}]
-scoreboard players add @s[tag=canbuy] shop_armor 1
-scoreboard players remove @s[tag=canbuy] gold 243
-execute as @s[tag=!canbuy] at @s run function lib:sounds/error
-execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
-execute as @s[tag=canbuy] run function item:shop/refresh_gold
-tag @s remove canbuy

+ 16 - 0
data/item/functions/shop/buy_dice.mcfunction

@@ -0,0 +1,16 @@
+# 骰子 (1 gi)
+# 触发器ID 999
+execute unless entity @s[scores={shop_dice=0..}] run scoreboard players set @s shop_dice 0
+tag @s remove canbuy
+tag @s[scores={shop_dice=0,gold=9..}] add canbuy
+tellraw @s[scores={shop_dice=1..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购赌了这个骰子了!","color":"aqua"}]
+tellraw @s[scores={shop_dice=0,gold=..8}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金粒来赌骰子!","color":"red"}]
+tellraw @s[scores={shop_dice=..-1}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先赌上一级的骰子!","color":"red"}]
+tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你赌了一次 ",{"text":"20面骰子","color":"green"}]
+execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 赌了一次 ",{"text":"20面骰子","color":"green"}]
+execute as @s[tag=canbuy] run function item:shop/special_dice
+scoreboard players remove @s[tag=canbuy] gold 9
+execute as @s[tag=!canbuy] at @s run function lib:sounds/error
+execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
+execute as @s[tag=canbuy] run function item:shop/refresh_gold
+tag @s remove canbuy

+ 16 - 0
data/item/functions/shop/buy_easter_egg.mcfunction

@@ -0,0 +1,16 @@
+# 臭彩蛋 (1 gn)
+# 触发器ID 114514
+execute unless entity @s[scores={shop_easter_egg=0..}] run scoreboard players set @s shop_easter_egg 0
+tag @s remove canbuy
+tag @s[scores={shop_easter_egg=0,gold=1..}] add canbuy
+tellraw @s[scores={shop_easter_egg=1..}] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经购买了这个物品了!","color":"aqua"}]
+tellraw @s[scores={shop_easter_egg=0,gold=..0}] ["",{"text":">> ","color":"red","bold":true},{"text":"你没有足够的金粒来购买这个物品!","color":"red"}]
+tellraw @s[scores={shop_easter_egg=..-1}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
+tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"臭彩蛋","color":"green"}]
+execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"臭彩蛋","color":"green"}]
+execute as @s[tag=canbuy] run function item:shop/special_easter_egg
+scoreboard players remove @s[tag=canbuy] gold 1
+execute as @s[tag=!canbuy] at @s run function lib:sounds/error
+execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
+execute as @s[tag=canbuy] run function item:shop/refresh_gold
+tag @s remove canbuy

+ 1 - 1
data/item/functions/shop/buy_pig.mcfunction

@@ -8,7 +8,7 @@ tellraw @s[scores={shop_pig=0,gold=..0}] ["",{"text":">> ","color":"red","bold":
 tellraw @s[scores={shop_pig=..-1}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买上一级的物品!","color":"red"}]
 tellraw @s[tag=canbuy] ["",{"text":">> ","color":"green","bold":true},"你购买了 ",{"text":"哼唧","color":"green"}]
 execute as @s[tag=canbuy] run tellraw @a[tag=!canbuy] ["",{"text":">> ","color":"green","bold":true},{"selector": "@s","color":"green"}," 购买了 ",{"text":"哼唧","color":"green"}]
-function item:shop/special_pig
+execute as @s[tag=canbuy] run function item:shop/special_pig
 scoreboard players remove @s[tag=canbuy] gold 1
 execute as @s[tag=!canbuy] at @s run function lib:sounds/error
 execute as @s[tag=canbuy] at @s run function lib:sounds/levelup

+ 4 - 3
data/item/functions/shop/check.mcfunction

@@ -1,9 +1,8 @@
 execute if score @s buy_trigger matches 1 if score $state mem matches 0 run function item:shop/buy_apple1
 execute if score @s buy_trigger matches 2 if score $state mem matches 0 run function item:shop/buy_apple2
 execute if score @s buy_trigger matches 3 if score $state mem matches 0 run function item:shop/buy_armor1
-execute if score @s buy_trigger matches 4 if score $state mem matches 0 run function item:shop/buy_armor2
-execute if score @s buy_trigger matches 5 if score $state mem matches 0 run function item:shop/buy_armor3
-execute if score @s buy_trigger matches 6 if score $state mem matches 0 run function item:shop/buy_armor4
+execute if score @s buy_trigger matches 5 if score $state mem matches 0 run function item:shop/buy_armor2
+execute if score @s buy_trigger matches 6 if score $state mem matches 0 run function item:shop/buy_armor3
 execute if score @s buy_trigger matches 7 if score $state mem matches 0 run function item:shop/buy_arrow1
 execute if score @s buy_trigger matches 8 if score $state mem matches 0 run function item:shop/buy_arrow2
 execute if score @s buy_trigger matches 9 if score $state mem matches 0 run function item:shop/buy_arrow3
@@ -19,5 +18,7 @@ execute if score @s buy_trigger matches 18 if score $state mem matches 0 run fun
 execute if score @s buy_trigger matches 19 if score $state mem matches 0 run function item:shop/buy_firework
 execute if score @s buy_trigger matches 20 if score $state mem matches 0 run function item:shop/buy_bgm
 execute if score @s buy_trigger matches 21 if score $state mem matches 0 run function item:shop/buy_pig
+execute if score @s buy_trigger matches 999 if score $state mem matches 0 run function item:shop/buy_dice
+execute if score @s buy_trigger matches 114514 if score $state mem matches 0 run function item:shop/buy_easter_egg
 scoreboard players set @s buy_trigger 0
 execute if score $state mem matches 0 run scoreboard players enable @s buy_trigger

+ 3 - 4
data/item/functions/shop/refresh_equip.mcfunction

@@ -24,6 +24,7 @@ give @s[scores={shop_apple=2}] enchanted_golden_apple{display:{Name:'{"text":"
 scoreboard players reset @s shop_apple
 
 clear @s arrow
+clear @s tipped_arrow
 give @s[scores={shop_arrow=1}] arrow
 give @s[scores={shop_arrow=2}] arrow 2
 give @s[scores={shop_arrow=3}] tipped_arrow{Potion:"minecraft:slowness"} 2
@@ -31,11 +32,9 @@ give @s[scores={shop_arrow=3}] tipped_arrow{Potion:"minecraft:slowness"} 2
 clear @s crossbow
 give @s[scores={shop_firework=1}] minecraft:crossbow{display:{Name:'{"text":"烟花弩","italic":false,"color":"gray"}',Lore:['{"text":"发射一个漂亮的烟花!","italic":false,"color":"gray"}']},Damage:326,Charged:1b,ChargedProjectiles:[{id:"firework_rocket",Count:1b,tag:{Fireworks:{Flight:1b,Explosions:[{Type:0b,Colors:[I;11743532,15435844,14602026,4312372,6719955,2437522,8073150],Flicker:1b}]}}}]} 1
 
-replaceitem entity @s armor.head air
-replaceitem entity @s[scores={shop_armor=2}] armor.head golden_helmet{display:{Name:'{"text":"金头盔","italic":false,"color":"gray"}'}}
 replaceitem entity @s armor.chest air
-replaceitem entity @s[scores={shop_armor=4}] armor.chest golden_chestplate{display:{Name:'{"text":"金胸甲","italic":false,"color":"gray"}'}}
+replaceitem entity @s[scores={shop_armor=3..}] armor.chest golden_chestplate{display:{Name:'{"text":"金胸甲","italic":false,"color":"gray"}'}}
 replaceitem entity @s armor.legs air
-replaceitem entity @s[scores={shop_armor=3}] armor.legs golden_leggings{display:{Name:'{"text":"金护腿","italic":false,"color":"gray"}'}}
+replaceitem entity @s[scores={shop_armor=2}] armor.legs golden_leggings{display:{Name:'{"text":"金护腿","italic":false,"color":"gray"}'}}
 replaceitem entity @s armor.feet air
 replaceitem entity @s[scores={shop_armor=1}] armor.feet golden_boots{display:{Name:'{"text":"金靴子","italic":false,"color":"gray"}'}}

+ 2 - 2
data/item/functions/shop/refresh_gold.mcfunction

@@ -8,7 +8,7 @@ clear @s gold_nugget
 # 获取金块数,存于 temp
 scoreboard players operation @s temp = @s gold
 scoreboard players operation @s temp /= #const_81 mem
-# 给予金锭
+# 给予金块
 execute if score @s temp matches 1.. at @s run function item:shop/summon_block
 # 获取金锭数,存于 temp
 scoreboard players operation @s temp = @s gold
@@ -20,4 +20,4 @@ execute if score @s temp matches 1.. at @s run function item:shop/summon_gold
 scoreboard players operation @s temp = @s gold
 scoreboard players operation @s temp %= #const_9 mem
 # 给予金粒
-execute if score @s temp matches 1.. at @s run function item:shop/summon_nugget
+execute if score @s temp matches 1.. at @s run function item:shop/summon_nugget

+ 5 - 0
data/item/functions/shop/special_dice.mcfunction

@@ -0,0 +1,5 @@
+# 跟老板玩骰子
+function ltw:state/0/roll_dice/d20
+scoreboard players operation @s temp = $random mem
+execute as @e[type=piglin,tag=shop_piglin_11,tag=lobby_entity] run function ltw:state/0/roll_dice/d20
+function ltw:state/0/roll_dice/show_result

+ 1 - 0
data/item/functions/shop/special_easter_egg.mcfunction

@@ -0,0 +1 @@
+execute at @s run playsound entity.enderman.scream ambient @a 0 1000000 0 1000000

+ 1 - 1
data/item/functions/tick2.mcfunction

@@ -8,7 +8,7 @@ execute as @a if data entity @s Inventory[{"tag":{"bonus_new":1b}}] run function
 # 检测玩家格子锁定
 execute if score $state mem matches 1.. as @a[tag=!debug] run function item:disable_slot/check_slot
 execute if score $state mem matches 0 as @a run function item:lobby_state/check_slot
-execute if score $state mem matches 0.. run kill @e[type=item,tag=LockTempItem,nbt={Item:{tag:{LockTempItem:1b}}}]
+execute if score $state mem matches 0.. run kill @e[type=item,tag=LockTempItem]
 
 # 检查购买物品
 execute as @a run function item:shop/check

+ 2 - 24
data/item/loot_tables/gameparty/normal/blue.json

@@ -50,18 +50,7 @@
 },
 {
     "type": "minecraft:item",
-    "weight": 1,
-    "name": "minecraft:netherite_helmet",
-    "functions": [
-        {
-            "function": "minecraft:set_nbt",
-            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"下界合金头盔、胸甲\\\",\\\"color\\\":\\\"aqua\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"bonus_give_items\":[{\"id\":\"minecraft:netherite_chestplate\",\"Count\":1,\"tag\":{\"bonus_return\":1b,\"is_bonus\":1b}}]}"
-        }
-    ]
-},
-{
-    "type": "minecraft:item",
-    "weight": 1,
+    "weight": 2,
     "name": "minecraft:netherite_chestplate",
     "functions": [
         {
@@ -72,18 +61,7 @@
 },
 {
     "type": "minecraft:item",
-    "weight": 1,
-    "name": "minecraft:netherite_leggings",
-    "functions": [
-        {
-            "function": "minecraft:set_nbt",
-            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"下界合金头盔、护腿\\\",\\\"color\\\":\\\"aqua\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"bonus_give_items\":[{\"id\":\"minecraft:netherite_helmet\",\"Count\":1,\"tag\":{\"bonus_return\":1b,\"is_bonus\":1b}}]}"
-        }
-    ]
-},
-{
-    "type": "minecraft:item",
-    "weight": 1,
+    "weight": 2,
     "name": "minecraft:netherite_boots",
     "functions": [
         {

+ 3 - 14
data/item/loot_tables/gameparty/normal/white.json

@@ -176,18 +176,7 @@
 },
 {
     "type": "minecraft:item",
-    "weight": 3,
-    "name": "minecraft:netherite_helmet",
-    "functions": [
-        {
-            "function": "minecraft:set_nbt",
-            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"下界合金头盔\\\",\\\"color\\\":\\\"white\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b}"
-        }
-    ]
-},
-{
-    "type": "minecraft:item",
-    "weight": 3,
+    "weight": 4,
     "name": "minecraft:netherite_chestplate",
     "functions": [
         {
@@ -198,7 +187,7 @@
 },
 {
     "type": "minecraft:item",
-    "weight": 3,
+    "weight": 4,
     "name": "minecraft:netherite_leggings",
     "functions": [
         {
@@ -209,7 +198,7 @@
 },
 {
     "type": "minecraft:item",
-    "weight": 3,
+    "weight": 4,
     "name": "minecraft:netherite_boots",
     "functions": [
         {

+ 9 - 0
data/lib/functions/effect/floating.mcfunction

@@ -0,0 +1,9 @@
+# 5tick运行一次 计分板单位5tick
+# 钻石:起飞
+
+scoreboard players remove @a effect_floating 1
+execute as @a[gamemode=!spectator,scores={effect_floating=..-2}] at @s if block ~ ~-1 ~ diamond_block run effect give @s levitation 1 12
+execute as @a[gamemode=!spectator,scores={effect_floating=..-2}] at @s if block ~ ~-1 ~ diamond_block run effect give @s slow_falling 2 0 true
+execute as @a[gamemode=!spectator,scores={effect_floating=..-2}] at @s if block ~ ~-1 ~ diamond_block run function lib:sounds/teleport
+execute as @a[gamemode=!spectator,scores={effect_floating=..-2}] at @s if block ~ ~-1 ~ diamond_block run scoreboard players set @s effect_floating 2
+effect clear @a[scores={effect_floating=0}] levitation

+ 8 - 0
data/lib/functions/effect/regen.mcfunction

@@ -0,0 +1,8 @@
+# 每秒一次
+# 绿宝石:回血
+
+execute as @a[gamemode=!spectator] at @s if block ~ ~-1 ~ emerald_block run effect give @s regeneration 2 2
+# scoreboard players remove @a[scores={effect_regen=0..}] effect_regen 1
+# execute as @a[gamemode=!spectator,scores={effect_regen=..0}] at @s if block ~ ~-1 ~ emerald_block run effect give @s regeneration 2 2
+# execute as @a[gamemode=!spectator,scores={effect_regen=..0}] at @s if block ~ ~-1 ~ emerald_block run scoreboard players set @s effect_regen 4
+# effect clear @a[scores={effect_regen=0}] regeneration

+ 5 - 3
data/lib/functions/random.mcfunction

@@ -1,5 +1,7 @@
-# 输入:$random_min 最小值,$random_max 最大值
-# 输出:$random 结果
+#> lib:random
+# @input score $random_min mem 最小值
+# @input score $random_max mem 最大值
+# @output score $random 结果
 
 summon minecraft:area_effect_cloud ~ ~ ~ {Tags:["random"],Duration:1}
 execute store result score $random mem run data get entity @e[tag=random,limit=1] UUID[0]
@@ -7,4 +9,4 @@ kill @e[tag=random]
 scoreboard players operation $random_max mem -= $random_min mem
 scoreboard players add $random_max mem 1
 scoreboard players operation $random mem %= $random_max mem
-scoreboard players operation $random mem += $random_min mem
+scoreboard players operation $random mem += $random_min mem

+ 0 - 7
data/lib/functions/roll_dice/d100.mcfunction

@@ -1,7 +0,0 @@
-scoreboard players set $random_min mem 1
-scoreboard players set $random_max mem 100
-function lib:random
-execute if score $random mem matches 100 run tellraw @a [{"text":">> ","color":"green","bold":true},{"selector":"@s","color":"gold","bold":false},{"text":"掷出了D100=","color":"white","bold":false},{"score": {"name": "$random","objective": "mem"},"color":"gold"},{"text":",大成功!","color":"white"}]
-execute if score $random mem matches 51..99 run tellraw @a [{"text":">> ","color":"green","bold":true},{"selector":"@s","color":"gold","bold":false},{"text":"掷出了D100=","color":"white","bold":false},{"score": {"name": "$random","objective": "mem"},"color":"dark_green"},{"text":",还不错哟!","color":"white"}]
-execute if score $random mem matches 2..50 run tellraw @a [{"text":">> ","color":"green","bold":true},{"selector":"@s","color":"gold","bold":false},{"text":"掷出了D100=","color":"white","bold":false},{"score": {"name": "$random","objective": "mem"},"color":"dark_red"},{"text":",有点黑哟!","color":"white"}]
-execute if score $random mem matches 1 run tellraw @a [{"text":">> ","color":"green","bold":true},{"selector":"@s","color":"gold","bold":false},{"text":"掷出了D100=","color":"white","bold":false},{"score": {"name": "$random","objective": "mem"},"color":"dark_purple"},{"text":",大失败!","color":"white"}]

+ 0 - 7
data/lib/functions/roll_dice/d20.mcfunction

@@ -1,7 +0,0 @@
-scoreboard players set $random_min mem 1
-scoreboard players set $random_max mem 20
-function lib:random
-execute if score $random mem matches 20 run tellraw @a [{"text":">> ","color":"green","bold":true},{"selector":"@s","color":"gold","bold":false},{"text":"掷出了D20=","color":"white","bold":false},{"score": {"name": "$random","objective": "mem"},"color":"gold"},{"text":",大成功!","color":"white"}]
-execute if score $random mem matches 11..19 run tellraw @a [{"text":">> ","color":"green","bold":true},{"selector":"@s","color":"gold","bold":false},{"text":"掷出了D20=","color":"white","bold":false},{"score": {"name": "$random","objective": "mem"},"color":"dark_green"},{"text":",还不错哟!","color":"white"}]
-execute if score $random mem matches 2..10 run tellraw @a [{"text":">> ","color":"green","bold":true},{"selector":"@s","color":"gold","bold":false},{"text":"掷出了D20=","color":"white","bold":false},{"score": {"name": "$random","objective": "mem"},"color":"dark_red"},{"text":",有点黑哟!","color":"white"}]
-execute if score $random mem matches 1 run tellraw @a [{"text":">> ","color":"green","bold":true},{"selector":"@s","color":"gold","bold":false},{"text":"掷出了D20=","color":"white","bold":false},{"score": {"name": "$random","objective": "mem"},"color":"dark_purple"},{"text":",大失败!","color":"white"}]

+ 0 - 7
data/lib/functions/roll_dice/d6.mcfunction

@@ -1,7 +0,0 @@
-scoreboard players set $random_min mem 1
-scoreboard players set $random_max mem 6
-function lib:random
-execute if score $random mem matches 6 run tellraw @a [{"text":">> ","color":"green","bold":true},{"selector":"@s","color":"gold","bold":false},{"text":"掷出了D6=","color":"white","bold":false},{"score": {"name": "$random","objective": "mem"},"color":"gold"},{"text":",大成功!","color":"white"}]
-execute if score $random mem matches 4..5 run tellraw @a [{"text":">> ","color":"green","bold":true},{"selector":"@s","color":"gold","bold":false},{"text":"掷出了D6=","color":"white","bold":false},{"score": {"name": "$random","objective": "mem"},"color":"dark_green"},{"text":",还不错哟!","color":"white"}]
-execute if score $random mem matches 2..3 run tellraw @a [{"text":">> ","color":"green","bold":true},{"selector":"@s","color":"gold","bold":false},{"text":"掷出了D6=","color":"white","bold":false},{"score": {"name": "$random","objective": "mem"},"color":"dark_red"},{"text":",有点黑哟!","color":"white"}]
-execute if score $random mem matches 1 run tellraw @a [{"text":">> ","color":"green","bold":true},{"selector":"@s","color":"gold","bold":false},{"text":"掷出了D6=","color":"white","bold":false},{"score": {"name": "$random","objective": "mem"},"color":"dark_purple"},{"text":",大失败!","color":"white"}]

+ 0 - 7
data/lib/functions/roll_dice/d8.mcfunction

@@ -1,7 +0,0 @@
-scoreboard players set $random_min mem 1
-scoreboard players set $random_max mem 8
-function lib:random
-execute if score $random mem matches 8 run tellraw @a [{"text":">> ","color":"green","bold":true},{"selector":"@s","color":"gold","bold":false},{"text":"掷出了D8=","color":"white","bold":false},{"score": {"name": "$random","objective": "mem"},"color":"gold"},{"text":",大成功!","color":"white"}]
-execute if score $random mem matches 5..7 run tellraw @a [{"text":">> ","color":"green","bold":true},{"selector":"@s","color":"gold","bold":false},{"text":"掷出了D8=","color":"white","bold":false},{"score": {"name": "$random","objective": "mem"},"color":"dark_green"},{"text":",还不错哟!","color":"white"}]
-execute if score $random mem matches 2..4 run tellraw @a [{"text":">> ","color":"green","bold":true},{"selector":"@s","color":"gold","bold":false},{"text":"掷出了D8=","color":"white","bold":false},{"score": {"name": "$random","objective": "mem"},"color":"dark_red"},{"text":",有点黑哟!","color":"white"}]
-execute if score $random mem matches 1 run tellraw @a [{"text":">> ","color":"green","bold":true},{"selector":"@s","color":"gold","bold":false},{"text":"掷出了D8=","color":"white","bold":false},{"score": {"name": "$random","objective": "mem"},"color":"dark_purple"},{"text":",大失败!","color":"white"}]

+ 1 - 1
data/ltw/functions/clock/tick2.mcfunction

@@ -17,4 +17,4 @@ function item:tick2
 
 # 全局倒计时
 execute if score $countdown_fast mem matches 1.. run scoreboard players remove $countdown_fast mem 1
-scoreboard players remove @e[scores={countdown_fast=1..}] countdown_fast 1
+scoreboard players remove @e[scores={countdown_fast=1..}] countdown_fast 1

+ 5 - 3
data/ltw/functions/clock/tick20.mcfunction

@@ -11,14 +11,16 @@ execute if score $state mem matches 5 run function ltw:state/5/tick20
 execute if score $state mem matches 6 run function ltw:state/6/tick20
 execute if score $state mem matches 7 run function ltw:state/7/tick20
 
+# 特殊方块给予效果
+function lib:effect/regen
+
 # 全局倒计时
 execute if score $countdown mem matches 1.. run scoreboard players remove $countdown mem 1
 scoreboard players remove @e[scores={countdown=1..}] countdown 1
-
-# 两秒一次的支持
+# 两秒一次
 scoreboard players add $twice mem 1
 execute if score $twice mem matches 2.. run scoreboard players set $twice mem 0
 
 # 掐死原版 BGM
 stopsound @a music music.game
-stopsound @a music music.creative
+stopsound @a music music.creative

+ 3 - 0
data/ltw/functions/clock/tick5.mcfunction

@@ -6,5 +6,8 @@ execute if score $state mem matches 0 run function ltw:state/0/tick5
 execute if score $state mem matches 5 run function ltw:state/5/tick5
 function ltw:main/tick5
 
+# 特殊方块给予效果
+function lib:effect/floating
+
 # 死亡触发
 execute as @a[scores={death=1..,health=1..}] at @s run function ltw:main/player_death

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

@@ -20,7 +20,7 @@ gamerule doMobLoot false
 gamerule doTraderSpawning false
 gamerule drowningDamage false
 gamerule doLimitedCrafting true
-gamerule announceAdvancements false
+gamerule announceAdvancements true
 
 # 主寄存区块:将所有需要不卸载的都放里面
 #   已占用:(0,0,0) (0,0,1)
@@ -49,6 +49,10 @@ scoreboard objectives remove total_score_disp
 scoreboard objectives add total_score_disp dummy "得分"
 scoreboard objectives remove leave_game
 scoreboard objectives add leave_game minecraft.custom:leave_game "离开游戏"
+scoreboard objectives remove effect_floating
+scoreboard objectives add effect_floating dummy "悬浮计时"
+# scoreboard objectives remove effect_regen
+# scoreboard objectives add effect_regen dummy "恢复计时"
 scoreboard objectives remove game_id
 scoreboard objectives add game_id dummy "游戏编号"
 scoreboard players set $ game_id 0
@@ -69,6 +73,8 @@ scoreboard objectives add shop_bow dummy "弓升级"
 scoreboard objectives add shop_firework dummy "烟花"
 scoreboard objectives add shop_bgm dummy "BGM"
 scoreboard objectives add shop_pig dummy "猪叫"
+scoreboard objectives add shop_easter_egg dummy "臭彩蛋"
+scoreboard objectives add shop_dice dummy "骰子"
 
 # 常量与变量初始化
 scoreboard players set #mini_total mem 5

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

@@ -49,7 +49,7 @@ tellraw @a [" ",{"text":"\n\n\n\n----- 游戏结束 -----\n","color":"green","bo
 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"}]
-tellraw @a "\n"
+tellraw @a ""
 
 # 得分金粒奖励
 execute as @a[tag=!watcher] run scoreboard players operation @s gold += @s total_score
@@ -67,11 +67,11 @@ execute as @a run scoreboard players operation @s gold_total += @s temp
 tellraw @a[tag=!watcher] [" ",{"text": "名次奖励: ","color":"gold"},{"score":{"name": "*","objective": "temp"}}," 金粒"]
 
 # 奖励结束
-tellraw @a[tag=!watcher] "\n"
+tellraw @a[tag=!watcher] ""
 
 # 返回主大厅
 schedule function ltw:state/0/state_enter 2t replace
 execute as @a at @s run function lib:sounds/theend
 forceload remove all
 
-# TODO: 主要的需求见 https://shimo.im/docs/8dQtWhYp8rJhRRWG
+# TODO: https://shimo.im/docs/8dQtWhYp8rJhRRWG

+ 4 - 0
data/ltw/functions/main/get_max_score.mcfunction

@@ -1,2 +1,6 @@
+#> ltw:main/get_max_score
+# @input score @a[tag=!max_uncounted,tag=!watcher] total_score 进行统计的分数
+# @output score #score_max mem 最高分
+
 scoreboard players set #score_max mem -2147483648
 scoreboard players operation #score_max mem > @a[tag=!max_uncounted,tag=!watcher] total_score

+ 9 - 5
data/ltw/functions/main/player_enter.mcfunction

@@ -1,6 +1,5 @@
 # 当玩家加入游戏时触发
 team join player @s
-bossbar set ltw:notice players @a
 
 advancement revoke @s only lib:damage_dealt
 advancement revoke @s only lib:damage_taken
@@ -19,7 +18,12 @@ execute if entity @s[tag=!watcher] unless score @s game_id = $ game_id run funct
 # 如果不是旁观且局号正确:游戏中掉线
 execute if entity @s[tag=!watcher] if score @s game_id = $ game_id run function ltw:main/player_enter_rejoin
 
-# FIXME: [HIM] 旁观者可能会有一个灰色染料一直 tp 他
-# FIXME: 游戏结束时 kill 老板会有猪叫
-# FIXME: [HIM] 你可以打开背包把物品丢出去
-# TODO: 新的统计信息显示
+# 更新 Bossbar
+bossbar set ltw:notice players @a
+function lib:bossbar/show
+
+# FIXME: [LTCat] 旁观者在游戏开局的时候似乎会看到 2 然后 ding
+# FIXME: [010] 在 init 的时候也重置随机数组
+# TODO: [LTCat] 将开始准备延长到 30s
+# FIXME: [HIM] 反馈:色彩迷阵如果正好在切换轮次的时候死亡,就会一直卡在天上不会下来(存疑
+# FIXME: [010] 已确认确实可以用钓鱼竿获得两个奖励

+ 1 - 1
data/ltw/functions/state/0/parkour/tempo_block/marker_spawn.mcfunction

@@ -26,13 +26,13 @@ execute positioned 6 20 -27 run summon armor_stand ~ ~-0.4 ~ {Marker:1b,Invisibl
 execute positioned 13 44 -61 run summon armor_stand ~ ~-0.4 ~ {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["lobby_tempo","tempo_blue_t"]}
 execute positioned 12 46 -56 run summon armor_stand ~ ~-0.4 ~ {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["lobby_tempo","tempo_blue_t"]}
 execute positioned 17 46 -51 run summon armor_stand ~ ~-0.4 ~ {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["lobby_tempo","tempo_blue_t"]}
-execute positioned 21 48 -33 run summon armor_stand ~ ~-0.4 ~ {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["lobby_tempo","tempo_blue_t"]}
 
 execute positioned 17 43 -44 run summon armor_stand ~ ~-0.4 ~ {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["lobby_tempo","tempo_blue_r"]}
 execute positioned 11 47 -41 run summon armor_stand ~ ~-0.4 ~ {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["lobby_tempo","tempo_blue_r"]}
 execute positioned 16 47 -37 run summon armor_stand ~ ~-0.4 ~ {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["lobby_tempo","tempo_blue_r"]}
 execute positioned 23 47 -30 run summon armor_stand ~ ~-0.4 ~ {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["lobby_tempo","tempo_blue_r"]}
 execute positioned 14 50 -30 run summon armor_stand ~ ~-0.4 ~ {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["lobby_tempo","tempo_blue_r"]}
+execute positioned 21 49 -34 run summon armor_stand ~ ~-0.4 ~ {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["lobby_tempo","tempo_blue_r"]}
 
 # 显示as
 replaceitem entity @e[type=armor_stand,tag=tempo_red_t,tag=lobby_tempo] armor.head red_stained_glass

+ 1 - 1
data/ltw/functions/state/0/parkour/tempo_block/tempo_blue.mcfunction

@@ -1,6 +1,6 @@
 # 替换方块
 execute at @e[type=armor_stand,tag=lobby_tempo,tag=tempo_red_t] run setblock ~ ~0.4 ~ air
-execute at @e[type=armor_stand,tag=lobby_tempo,tag=tempo_blue_t] run setblock ~ ~0.4 ~ chiseled_sandstone
+execute at @e[type=armor_stand,tag=lobby_tempo,tag=tempo_blue_t] run setblock ~ ~0.4 ~ warped_hyphae
 execute at @e[type=armor_stand,tag=lobby_tempo,tag=tempo_red_r] run setblock ~ ~0.4 ~ black_glazed_terracotta
 execute at @e[type=armor_stand,tag=lobby_tempo,tag=tempo_blue_r] run setblock ~ ~0.4 ~ redstone_block
 

+ 1 - 1
data/ltw/functions/state/0/parkour/tempo_block/tempo_red.mcfunction

@@ -1,6 +1,6 @@
 # 替换方块
 execute at @e[type=armor_stand,tag=lobby_tempo,tag=tempo_blue_t] run setblock ~ ~0.4 ~ air
-execute at @e[type=armor_stand,tag=lobby_tempo,tag=tempo_red_t] run setblock ~ ~0.4 ~ chiseled_red_sandstone
+execute at @e[type=armor_stand,tag=lobby_tempo,tag=tempo_red_t] run setblock ~ ~0.4 ~ crimson_hyphae
 execute at @e[type=armor_stand,tag=lobby_tempo,tag=tempo_blue_r] run setblock ~ ~0.4 ~ black_glazed_terracotta
 execute at @e[type=armor_stand,tag=lobby_tempo,tag=tempo_red_r] run setblock ~ ~0.4 ~ redstone_block
 

+ 7 - 0
data/ltw/functions/state/0/roll_dice/d20.mcfunction

@@ -0,0 +1,7 @@
+scoreboard players set $random_min mem 1
+scoreboard players set $random_max mem 20
+function lib:random
+execute if score $random mem matches 20 run tellraw @a [{"text":">> ","color":"gold","bold":true},{"selector":"@s","color":"gold","bold":false},{"text":"扔了个二十面幸运骰,掷出了D20=","color":"white","bold":false},{"score": {"name": "$random","objective": "mem"},"color":"gold"},{"text":",大成功!","color":"white"}]
+execute if score $random mem matches 11..19 run tellraw @a [{"text":">> ","color":"dark_green","bold":true},{"selector":"@s","color":"dark_green","bold":false},{"text":"扔了个二十面幸运骰,掷出了D20=","color":"white","bold":false},{"score": {"name": "$random","objective": "mem"},"color":"dark_green"},{"text":"!","color":"white"}]
+execute if score $random mem matches 2..10 run tellraw @a [{"text":">> ","color":"dark_red","bold":true},{"selector":"@s","color":"dark_red","bold":false},{"text":"扔了个二十面幸运骰,掷出了D20=","color":"white","bold":false},{"score": {"name": "$random","objective": "mem"},"color":"dark_red"},{"text":"!","color":"white"}]
+execute if score $random mem matches 1 run tellraw @a [{"text":">> ","color":"dark_purple","bold":true},{"selector":"@s","color":"dark_purple","bold":false},{"text":"扔了个二十面幸运骰,掷出了D20=","color":"white","bold":false},{"score": {"name": "$random","objective": "mem"},"color":"dark_purple"},{"text":",大失败!","color":"white"}]

+ 3 - 0
data/ltw/functions/state/0/roll_dice/draw.mcfunction

@@ -0,0 +1,3 @@
+scoreboard players add @s gold 9
+tag @a remove self
+scoreboard players set @s temp 0

+ 3 - 0
data/ltw/functions/state/0/roll_dice/lose.mcfunction

@@ -0,0 +1,3 @@
+# 无事发生
+scoreboard players set @s temp 0
+tag @a remove self

+ 29 - 0
data/ltw/functions/state/0/roll_dice/show_result.mcfunction

@@ -0,0 +1,29 @@
+# 老板大成功,玩家非大成功/玩家大失败,老板非大失败:玩家失去所有金粒,被丢出赌博房
+execute if score $random mem matches 20 if score @s temp matches 1 run tellraw @s ["",{"text":">> ","color":"dark_purple","bold":true},"老板丢出了 ",{"text":"大成功","color":"dark_purple","bold":true}," ,你丢出了 ",{"text":"大失败","color":"dark_purple","bold":true}," ,你是超级非酋,你失去了所有金粒,被丢出了赌博房!"]
+execute if score $random mem matches 20 if score @s temp matches 2..19 run tellraw @s ["",{"text":">> ","color":"dark_purple","bold":true},"老板丢出了 ",{"text":"大成功","color":"dark_purple","bold":true}," ,你失去了所有金粒,被丢出了赌博房!"]
+execute if score $random mem matches 2..19 if score @s temp matches 1 run tellraw @s ["",{"text":">> ","color":"dark_purple","bold":true},"你丢出了 ",{"text":"大失败","color":"dark_purple","bold":true}," ,你失去了所有金粒,被丢出了赌博房!"]
+
+execute if score $random mem matches 20 if score @s temp matches 1..19 run function ltw:state/0/roll_dice/super_lose
+execute if score $random mem matches 2..19 if score @s temp matches 1 run function ltw:state/0/roll_dice/super_lose
+
+# 玩家大成功,老板非大成功/老板大失败,玩家非大失败:玩家获得3金块
+execute if score $random mem matches 1 if score @s temp matches 20 run tellraw @s ["",{"text":">> ","color":"gold","bold":true},"你丢出了 ",{"text":"大成功","color":"gold","bold":true}," ,老板丢出了 ",{"text":"大失败","color":"gold","bold":true}," ,你是超级欧皇,你获得了 ",{"text":"3金块","color":"gold","bold":true} ," !"]
+execute if score $random mem matches 2..19 if score @s temp matches 20 run tellraw @s ["",{"text":">> ","color":"gold","bold":true},"你丢出了 ",{"text":"大成功","color":"gold","bold":true}," ,你获得了 ",{"text":"3金块","color":"gold","bold":true} ," !"]
+execute if score $random mem matches 1 if score @s temp matches 2..19 run tellraw @s ["",{"text":">> ","color":"gold","bold":true},"老板丢出了 ",{"text":"大失败","color":"gold","bold":true}," ,你获得了 ",{"text":"3金块","color":"gold","bold":true} ," !"]
+
+execute if score $random mem matches 1 if score @s temp matches 2..20 run function ltw:state/0/roll_dice/super_win
+execute if score $random mem matches 2..19 if score @s temp matches 20 run function ltw:state/0/roll_dice/super_win
+
+# 老板比玩家大:无事发生
+execute if score $random mem matches 2..19 if score @s temp matches 2..19 if score $random mem > @s temp run tellraw @s ["",{"text":">> ","color":"dark_red","bold":true},"老板的点数比你大,你输了,你失去了 ",{"text":"1金锭","color":"dark_red","bold":true} ," !"]
+execute if score $random mem matches 2..19 if score @s temp matches 2..19 if score $random mem > @s temp run function ltw:state/0/roll_dice/lose
+
+# 玩家比老板大:获得18金粒
+execute if score $random mem matches 2..19 if score @s temp matches 2..19 if score $random mem < @s temp run tellraw @s ["",{"text":">> ","color":"dark_green","bold":true},"你的点数比老板大,你赢了,你获得了",{"text":"1金锭","color":"dark_green","bold":true} ," !"]
+execute if score $random mem matches 2..19 if score @s temp matches 2..19 if score $random mem < @s temp run function ltw:state/0/roll_dice/win
+
+# 老板和玩家一样大:玩家获得9金粒
+execute if score $random mem matches 20 if score @s temp matches 20 run tellraw @s ["",{"text":">> ","color":"green","bold":true},"你和老板一样欧,你们平局了,你拿回了 ",{"text":"1金锭","color":"green","bold":true} ," !"]
+execute if score $random mem matches 2..19 if score @s temp matches 2..19 if score $random mem = @s temp run tellraw @s ["",{"text":">> ","color":"green","bold":true},"你的点数和老板一样大,你们平局了,你拿回了 ",{"text":"1金锭","color":"green","bold":true} ," !"]
+execute if score $random mem matches 1 if score @s temp matches 1 run tellraw @s ["",{"text":">> ","color":"green","bold":true},"你和老板一样非,你们平局了,你拿回了 ",{"text":"1金锭","color":"green","bold":true} ," !"]
+execute if score $random mem = @s temp run function ltw:state/0/roll_dice/draw

+ 6 - 0
data/ltw/functions/state/0/roll_dice/super_lose.mcfunction

@@ -0,0 +1,6 @@
+scoreboard players set @s gold 0
+scoreboard players set @s temp 0
+tag @a remove self
+tag @s add self
+tellraw @a[tag=!self] ["",{"text":">> ","color":"red","bold":true},{"selector": "@s","color":"red"}," 非到了一个境界,倾家荡产,被老板丢出了赌博房!"]
+tp @s 20 23 -58

+ 5 - 0
data/ltw/functions/state/0/roll_dice/super_win.mcfunction

@@ -0,0 +1,5 @@
+scoreboard players add @s gold 243
+scoreboard players set @s temp 0
+tag @a remove self
+tag @s add self
+tellraw @a[tag=!self] ["",{"text":">> ","color":"gold","bold":true},{"selector": "@s","color":"gold"}," 欧到了一个境界,从老板那赢得了3金块!"]

+ 3 - 0
data/ltw/functions/state/0/roll_dice/win.mcfunction

@@ -0,0 +1,3 @@
+scoreboard players add @s gold 18
+scoreboard players set @s temp 0
+tag @a remove self

+ 4 - 5
data/ltw/functions/state/0/summon_entity.mcfunction

@@ -1,18 +1,17 @@
-# 干掉老板
-kill @e[type=piglin,tag=lobby_entity]
-
 # 召唤老板
 execute unless entity @e[type=piglin,tag=shop_piglin_1,tag=lobby_entity] run summon piglin 0 22 -60 {Tags:["lobby_entity","shop_piglin_1"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"firework_rocket",Count:1b},{}],HandDropChances:[0.0f,0.0f]}
 execute unless entity @e[type=piglin,tag=shop_piglin_2,tag=lobby_entity] run summon piglin 0 22 -60 {Tags:["lobby_entity","shop_piglin_2"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"music_disc_pigstep",Count:1b},{}],HandDropChances:[0.0f,0.0f]}
 execute unless entity @e[type=piglin,tag=shop_piglin_3,tag=lobby_entity] run summon piglin 1 8 -37 {Tags:["lobby_entity","shop_piglin_3"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"golden_shovel",Count:1b},{}],HandDropChances:[0.0f,0.0f]}
-# 活跃橙
-execute unless entity @e[type=piglin,tag=shop_piglin_4,tag=lobby_entity] run summon piglin 9 10 -36 {Tags:["lobby_entity","shop_piglin_4"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"orange_dye",Count:1b},{}],HandDropChances:[0.0f,0.0f]}
+# execute unless entity @e[type=piglin,tag=shop_piglin_4,tag=lobby_entity] run summon piglin 9 10 -36 {Tags:["lobby_entity","shop_piglin_4"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"orange_dye",Count:1b},{}],HandDropChances:[0.0f,0.0f]}
 execute unless entity @e[type=piglin,tag=shop_piglin_5,tag=lobby_entity] run summon piglin 19 11 -39 {Tags:["lobby_entity","shop_piglin_5"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,ArmorItems:[{id:"golden_boots",Count:1b},{id:"golden_leggings",Count:1b},{id:"golden_chestplate",Count:1b},{id:"golden_helmet",Count:1b}],ArmorDropChances:[0.0f,0.0f,0.0f,0.0f],HandItems:[{id:"golden_chestplate",Count:1b},{}],HandDropChances:[0.0f,0.0f]}
 execute unless entity @e[type=piglin,tag=shop_piglin_6,tag=lobby_entity] run summon piglin 23 9 -48 {Tags:["lobby_entity","shop_piglin_6"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"tipped_arrow",Count:1b,tag:{Potion:"minecraft:slowness"}},{}],HandDropChances:[0.0f,0.0f]}
 execute unless entity @e[type=piglin,tag=shop_piglin_7,tag=lobby_entity] run summon piglin 22 11 -59 {Tags:["lobby_entity","shop_piglin_7"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"potion",Count:1b,tag:{CustomPotionColor:8039610}},{}],HandDropChances:[0.0f,0.0f]}
 execute unless entity @e[type=piglin,tag=shop_piglin_8,tag=lobby_entity] run summon piglin 11 9 -62 {Tags:["lobby_entity","shop_piglin_8"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"enchanted_golden_apple",Count:1b},{}],HandDropChances:[0.0f,0.0f]}
 execute unless entity @e[type=piglin,tag=shop_piglin_9,tag=lobby_entity] run summon piglin 5 9 -58 {Tags:["lobby_entity","shop_piglin_9"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"potion",Count:1b,tag:{CustomPotionColor:9913400}},{}],HandDropChances:[0.0f,0.0f]}
 execute unless entity @e[type=piglin,tag=shop_piglin_10,tag=lobby_entity] run summon piglin 0 8 -55 {Tags:["lobby_entity","shop_piglin_10"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"bow",Count:1b},{}],HandDropChances:[0.0f,0.0f]}
+execute unless entity @e[type=piglin,tag=shop_piglin_11,tag=lobby_entity] run kill @e[type=minecart,tag=lobby_entity]
+execute unless entity @e[type=minecart,tag=lobby_entity] run kill @e[type=piglin,tag=lobby_entity,tag=shop_piglin_11]
+# execute unless entity @e[type=piglin,tag=shop_piglin_11,tag=lobby_entity] run summon minecart 4 47 -77 {Rotation:[0.0f,0.0f],Tags:["lobby_entity"],Passengers:[{id:"minecraft:piglin",Rotation:[90.0f,0.0f],Tags:["lobby_entity","shop_piglin_11"],CustomName:'{"text":"老板"}',ArmorItems:[{},{},{},{id:"player_head",Count:1b,tag:{SkullOwner:"HerobrineXia"}}],ArmorDropChances:[0.0f,0.0f,0.0f,0.0f],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"gold_block",Count:1b},{}],HandDropChances:[0.0f,0.0f]}]}
 # execute unless entity @e[type=piglin,tag=shop_piglin_4,tag=lobby_entity] run summon piglin 9 10 -36 {Tags:["lobby_entity","shop_piglin_4"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"orange_dye",Count:1b},{}],HandDropChances:[0.0f,0.0f]}
 # execute unless entity @e[type=piglin,tag=shop_piglin_4,tag=lobby_entity] run summon piglin 9 10 -36 {Tags:["lobby_entity","shop_piglin_4"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"orange_dye",Count:1b},{}],HandDropChances:[0.0f,0.0f]}
 # execute unless entity @e[type=piglin,tag=shop_piglin_4,tag=lobby_entity] run summon piglin 9 10 -36 {Tags:["lobby_entity","shop_piglin_4"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"orange_dye",Count:1b},{}],HandDropChances:[0.0f,0.0f]}

+ 9 - 1
data/ltw/functions/state/0/tick5.mcfunction

@@ -3,4 +3,12 @@
 # tag @a remove lobby_watch
 # tag @a[x=-24,y=8,z=-32,dx=5,dy=5,dz=5] add lobby_ready
 # tag @a[tag=!lobby_ready] add lobby_watch
-execute as @a[tag=!lobby_ready,tag=!lobby_watch] run function item:lobby_state/join_watch
+execute as @a[tag=!lobby_ready,tag=!lobby_watch] run function item:lobby_state/join_watch
+
+# 给予进度
+execute as @a at @s if entity @s[x=-1,y=22,z=-29,dx=5,dy=3,dz=3] run advancement grant @s only ltw:parkour/explore_1
+execute as @a at @s if entity @s[x=6,y=48,z=-32,dx=4,dy=3,dz=9] run advancement grant @s only ltw:parkour/explore_2
+
+# 隐藏名片
+execute as @e[type=piglin,tag=shop_piglin_11,tag=lobby_entity] at @s if entity @a[distance=..5] run data modify entity @s CustomNameVisible set value true
+execute as @e[type=piglin,tag=shop_piglin_11,tag=lobby_entity] at @s unless entity @a[distance=..5] run data modify entity @s CustomNameVisible set value false

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

@@ -10,7 +10,7 @@ scoreboard players set $bossbar_type mem 0
 function lib:bossbar/show
 
 # 初始化倒计时
-scoreboard players set $countdown mem 3
+scoreboard players set $countdown mem 4
 
 # 初始化地图
 forceload add 0 1900 50 2000

+ 6 - 1
data/ltw/functions/state/6/tick2.mcfunction

@@ -1 +1,6 @@
-function mini:main/watcher_limit
+# 旁观者限制
+function mini:main/watcher_limit
+
+# 渐渐变暗
+execute as @a[tag=!debug] at @s positioned ~ ~1.5 ~ positioned ^ ^ ^1 run particle dust 0 0 0 1000 ~ ~ ~ 1 1 1 0 15 force @s
+execute if score $countdown mem matches ..2 as @a[tag=!debug] at @s positioned ~ ~0.5 ~ positioned ^ ^ ^1 run particle dust 0 0 0 1000 ~ ~ ~ 1 1 1 0 25 force @s

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

@@ -3,6 +3,7 @@ scoreboard players set $bossbar_type mem 0
 function lib:bossbar/show
 
 # 继续下一轮小游戏
+gamemode adventure @a[tag=!debug]
 scoreboard players add $round mem 1
 schedule function ltw:state/3/state_enter 2t replace
 forceload remove 0 1900 50 2000

+ 2 - 1
data/ltw/functions/state/7/next2.mcfunction

@@ -7,5 +7,6 @@ tag @s remove mini_rank4
 tag @s add selecting
 
 gamemode adventure
+tp @s 24.5 11.0 1967.5
 
-tellraw @s ["",{"text": ">> ","color":"green","bold": true},{"text":"轮到你选择奖励了!","color":"green"}]
+tellraw @s ["",{"text": ">> ","color":"green","bold": true},{"text":"轮到你选择奖励了!","color":"green"}]

+ 1 - 1
data/ltw/functions/state/7/tick2.mcfunction

@@ -1,3 +1,3 @@
 # 观察者限制
 execute as @a[gamemode=spectator] run spectate
-execute as @a[gamemode=spectator] run tp @s[tag=!debug] 24.5 11.0 1967.5
+execute as @a[gamemode=spectator] unless entity @s[x=12,y=9,z=1955,dx=24,dy=14,dz=24] run tp @s[tag=!debug] 24.5 12.0 1967.5

+ 4 - 4
data/mini/functions/colormatch/game/generate_parts.mcfunction

@@ -11,12 +11,12 @@ execute if score $floor_generate_part mem matches 7 positioned 1000 10 4000 run
 execute if score $floor_generate_part mem matches 8 positioned 1000 10 4000 run setblock ~ ~ ~ minecraft:structure_block{posX:1,mode:"LOAD",name:"mini:color_match/color_8",integrity:0.125f}
 execute if score $floor_generate_part mem matches 9 positioned 1000 10 4000 run setblock ~ ~ ~ minecraft:structure_block{posX:1,mode:"LOAD",name:"mini:color_match/color_9",integrity:0.1111111111111111f}
 execute if score $floor_generate_part mem matches 10 positioned 1000 10 4000 run setblock ~ ~ ~ minecraft:structure_block{posX:1,mode:"LOAD",name:"mini:color_match/color_10",integrity:0.1f}
-execute if score $floor_generate_part mem matches 11 positioned 1000 10 4000 run setblock ~ ~ ~ minecraft:structure_block{posX:1,mode:"LOAD",name:"mini:color_match/color_11",integrity:0.09090909090909091f}
-execute if score $floor_generate_part mem matches 12 positioned 1000 10 4000 run setblock ~ ~ ~ minecraft:structure_block{posX:1,mode:"LOAD",name:"mini:color_match/color_12",integrity:0.08333333333333333f}
+execute if score $floor_generate_part mem matches 11 positioned 1000 10 4000 run setblock ~ ~ ~ minecraft:structure_block{posX:1,mode:"LOAD",name:"mini:color_match/color_15",integrity:0.02f}
+# execute if score $floor_generate_part mem matches 11 positioned 1000 10 4000 run setblock ~ ~ ~ minecraft:structure_block{posX:1,mode:"LOAD",name:"mini:color_match/color_11",integrity:0.09090909090909091f}
+# execute if score $floor_generate_part mem matches 12 positioned 1000 10 4000 run setblock ~ ~ ~ minecraft:structure_block{posX:1,mode:"LOAD",name:"mini:color_match/color_12",integrity:0.08333333333333333f}
 # execute if score $floor_generate_part mem matches 13 positioned 1000 10 4000 run setblock ~ ~ ~ minecraft:structure_block{posX:1,mode:"LOAD",name:"mini:color_match/color_13",integrity:0.07692307692307693f}
 # execute if score $floor_generate_part mem matches 14 positioned 1000 10 4000 run setblock ~ ~ ~ minecraft:structure_block{posX:1,mode:"LOAD",name:"mini:color_match/color_14",integrity:0.07142857142857142f}
-# execute if score $floor_generate_part mem matches 15 positioned 1000 10 4000 run setblock ~ ~ ~ minecraft:structure_block{posX:1,mode:"LOAD",name:"mini:color_match/color_15",integrity:0.06666666666666667f}
 setblock 1000 9 4000 redstone_block
 setblock 1000 9 4000 air
 setblock 1000 10 4000 air
-execute if score $floor_generate_part mem matches 1..14 run schedule function mini:colormatch/game/generate_parts 1t replace
+execute if score $floor_generate_part mem matches 1..10 run schedule function mini:colormatch/game/generate_parts 1t replace

+ 5 - 4
data/mini/functions/colormatch/game/get_random_floor.mcfunction

@@ -1,8 +1,9 @@
+# 抽取随机地板值
 execute unless data storage ltw:mini colormatch.types[0] run function mini:colormatch/game/newarray
 execute store result score $color_match_floor mem run data get storage ltw:mini colormatch.types[0]
 data remove storage ltw:mini colormatch.types[0]
 
-# 随机选择不消失的方块
+# 随机选择不消失的方块 # prismarine
 execute positioned 1001 10 4000 run fill ~ ~1 ~ ~24 ~1 ~24 air replace
 execute positioned 1001 10 4000 if score $color_match_floor mem matches 1 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered acacia_planks
 execute positioned 1001 10 4000 if score $color_match_floor mem matches 2 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered birch_planks
@@ -13,9 +14,9 @@ execute positioned 1001 10 4000 if score $color_match_floor mem matches 6 run cl
 execute positioned 1001 10 4000 if score $color_match_floor mem matches 7 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered bricks
 execute positioned 1001 10 4000 if score $color_match_floor mem matches 8 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered mossy_cobblestone
 execute positioned 1001 10 4000 if score $color_match_floor mem matches 9 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered purpur_block
-execute positioned 1001 10 4000 if score $color_match_floor mem matches 10 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered emerald_block
-execute positioned 1001 10 4000 if score $color_match_floor mem matches 11 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered prismarine
-execute positioned 1001 10 4000 if score $color_match_floor mem matches 12 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered soul_soil
+execute positioned 1001 10 4000 if score $color_match_floor mem matches 10 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered prismarine
+# execute positioned 1001 10 4000 if score $color_match_floor mem matches 11 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered emerald_block
+# execute positioned 1001 10 4000 if score $color_match_floor mem matches 12 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered soul_soil
 # execute positioned 1001 10 4000 if score $color_match_floor mem matches 13 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered packed_ice
 # execute positioned 1001 10 4000 if score $color_match_floor mem matches 14 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered white_wool
 # execute positioned 1001 10 4000 if score $color_match_floor mem matches 15 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered diamond_block

+ 1 - 1
data/mini/functions/colormatch/game/newarray.mcfunction

@@ -1,4 +1,4 @@
-scoreboard players set $randarray_max mem 12
+scoreboard players set $randarray_max mem 10
 scoreboard players operation $randarray_last mem = $color_match_floor mem
 function lib:randarray/call
 data modify storage ltw:mini colormatch.types set from storage lib:randarray out

+ 1 - 1
data/mini/functions/colormatch/game/prepare_round.mcfunction

@@ -1,5 +1,5 @@
 # 刷新地板
 function mini:colormatch/game/generate_floor
 
-# 获取保留地板
+# 复制要保留的地板
 schedule function mini:colormatch/game/get_random_floor 13t replace

+ 12 - 12
data/mini/functions/colormatch/game/replace_wall.mcfunction

@@ -34,18 +34,18 @@ execute if score $color_match_floor mem matches 9 run fill 1075 11 3999 1075 40
 execute if score $color_match_floor mem matches 9 run fill 1075 11 3999 1049 40 3999 purpur_block
 execute if score $color_match_floor mem matches 9 run fill 1049 11 3999 1049 40 4025 purpur_block
 execute if score $color_match_floor mem matches 9 run fill 1049 11 4025 1075 40 4025 purpur_block
-execute if score $color_match_floor mem matches 10 run fill 1075 11 3999 1075 40 4025 emerald_block
-execute if score $color_match_floor mem matches 10 run fill 1075 11 3999 1049 40 3999 emerald_block
-execute if score $color_match_floor mem matches 10 run fill 1049 11 3999 1049 40 4025 emerald_block
-execute if score $color_match_floor mem matches 10 run fill 1049 11 4025 1075 40 4025 emerald_block
-execute if score $color_match_floor mem matches 11 run fill 1075 11 3999 1075 40 4025 prismarine
-execute if score $color_match_floor mem matches 11 run fill 1075 11 3999 1049 40 3999 prismarine
-execute if score $color_match_floor mem matches 11 run fill 1049 11 3999 1049 40 4025 prismarine
-execute if score $color_match_floor mem matches 11 run fill 1049 11 4025 1075 40 4025 prismarine
-execute if score $color_match_floor mem matches 12 run fill 1075 11 3999 1075 40 4025 soul_soil
-execute if score $color_match_floor mem matches 12 run fill 1075 11 3999 1049 40 3999 soul_soil
-execute if score $color_match_floor mem matches 12 run fill 1049 11 3999 1049 40 4025 soul_soil
-execute if score $color_match_floor mem matches 12 run fill 1049 11 4025 1075 40 4025 soul_soil
+execute if score $color_match_floor mem matches 10 run fill 1075 11 3999 1075 40 4025 prismarine
+execute if score $color_match_floor mem matches 10 run fill 1075 11 3999 1049 40 3999 prismarine
+execute if score $color_match_floor mem matches 10 run fill 1049 11 3999 1049 40 4025 prismarine
+execute if score $color_match_floor mem matches 10 run fill 1049 11 4025 1075 40 4025 prismarine
+# execute if score $color_match_floor mem matches 11 run fill 1075 11 3999 1075 40 4025 prismarine
+# execute if score $color_match_floor mem matches 11 run fill 1075 11 3999 1049 40 3999 prismarine
+# execute if score $color_match_floor mem matches 11 run fill 1049 11 3999 1049 40 4025 prismarine
+# execute if score $color_match_floor mem matches 11 run fill 1049 11 4025 1075 40 4025 prismarine
+# execute if score $color_match_floor mem matches 12 run fill 1075 11 3999 1075 40 4025 soul_soil
+# execute if score $color_match_floor mem matches 12 run fill 1075 11 3999 1049 40 3999 soul_soil
+# execute if score $color_match_floor mem matches 12 run fill 1049 11 3999 1049 40 4025 soul_soil
+# execute if score $color_match_floor mem matches 12 run fill 1049 11 4025 1075 40 4025 soul_soil
 # execute if score $color_match_floor mem matches 13 run fill 1075 11 3999 1075 40 4025 packed_ice
 # execute if score $color_match_floor mem matches 13 run fill 1075 11 3999 1049 40 3999 packed_ice
 # execute if score $color_match_floor mem matches 13 run fill 1049 11 3999 1049 40 4025 packed_ice

+ 23 - 0
data/mini/functions/colormatch/game/start_new_round.mcfunction

@@ -25,3 +25,26 @@ scoreboard players operation $countdown_max mem = $countdown_fast mem
 scoreboard players set $bossbar_type mem 1
 function lib:bossbar/show
 bossbar set mini:red name "地板消失"
+
+# 物品栏显示
+execute if score $color_match_floor mem matches 1 run replaceitem entity @a hotbar.7 acacia_planks{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false}]'}}
+execute if score $color_match_floor mem matches 2 run replaceitem entity @a hotbar.7 birch_planks{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false}]'}}
+execute if score $color_match_floor mem matches 3 run replaceitem entity @a hotbar.7 bedrock{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false}]'}}
+execute if score $color_match_floor mem matches 4 run replaceitem entity @a hotbar.7 crimson_planks{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false}]'}}
+execute if score $color_match_floor mem matches 5 run replaceitem entity @a hotbar.7 warped_planks{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false}]'}}
+execute if score $color_match_floor mem matches 6 run replaceitem entity @a hotbar.7 gold_block{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false}]'}}
+execute if score $color_match_floor mem matches 7 run replaceitem entity @a hotbar.7 bricks{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false}]'}}
+execute if score $color_match_floor mem matches 8 run replaceitem entity @a hotbar.7 mossy_cobblestone{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false}]'}}
+execute if score $color_match_floor mem matches 9 run replaceitem entity @a hotbar.7 purpur_block{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false}]'}}
+execute if score $color_match_floor mem matches 10 run replaceitem entity @a hotbar.7 prismarine{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false}]'}}
+
+# execute if score $color_match_floor mem matches 1 run replaceitem entity @a hotbar.7 acacia_planks{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false},{"translate": "block.minecraft.acacia_planks","bold":true,"color":"gold"}]'}}
+# execute if score $color_match_floor mem matches 2 run replaceitem entity @a hotbar.7 birch_planks{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false},{"translate": "block.minecraft.birch_planks","bold":true,"color":"gold"}]'}}
+# execute if score $color_match_floor mem matches 3 run replaceitem entity @a hotbar.7 bedrock{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false},{"translate": "block.minecraft.bedrock","bold":true,"color":"gold"}]'}}
+# execute if score $color_match_floor mem matches 4 run replaceitem entity @a hotbar.7 crimson_planks{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false},{"translate": "block.minecraft.crimson_planks","bold":true,"color":"gold"}]'}}
+# execute if score $color_match_floor mem matches 5 run replaceitem entity @a hotbar.7 warped_planks{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false},{"translate": "block.minecraft.warped_planks","bold":true,"color":"gold"}]'}}
+# execute if score $color_match_floor mem matches 6 run replaceitem entity @a hotbar.7 gold_block{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false},{"translate": "block.minecraft.gold_block","bold":true,"color":"gold"}]'}}
+# execute if score $color_match_floor mem matches 7 run replaceitem entity @a hotbar.7 bricks{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false},{"translate": "block.minecraft.bricks","bold":true,"color":"gold"}]'}}
+# execute if score $color_match_floor mem matches 8 run replaceitem entity @a hotbar.7 mossy_cobblestone{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false},{"translate": "block.minecraft.mossy_cobblestone","bold":true,"color":"gold"}]'}}
+# execute if score $color_match_floor mem matches 9 run replaceitem entity @a hotbar.7 purpur_block{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false},{"translate": "block.minecraft.purpur_block","bold":true,"color":"gold"}]'}}
+# execute if score $color_match_floor mem matches 10 run replaceitem entity @a hotbar.7 prismarine{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false},{"translate": "block.minecraft.prismarine","bold":true,"color":"gold"}]'}}

+ 4 - 0
data/mini/functions/colormatch/game_end.mcfunction

@@ -1,2 +1,6 @@
 # 当前游戏结束时触发
 forceload remove 1001 4000 1075 4025
+
+# 清理锁定格子
+execute as @a run function item:disable_slot/disable_slot_7
+execute as @a run function item:disable_slot/disable_slot_8

+ 1 - 1
data/mini/functions/colormatch/player_intro.mcfunction

@@ -1,6 +1,6 @@
 # 向单个玩家展示小游戏介绍
 tp @s[tag=!debug] 1062.78 22.00 4019.40 178.41 40.03
-tellraw @s ["",{"text":"\n >> 色彩迷阵 >>\n\n","color":"gold","bold":true}," 墙壁会显示安全的歇脚方块,\n 在倒计时结束前站在它们上面以躲避陷阱!\n"]
+tellraw @s ["",{"text":"\n >> 色彩迷阵 >>\n\n","color":"gold","bold":true}," 倒计时结束时地板会消失, 只有站在与墙壁显示的方块相同的地板上才能存活!\n"]
 tellraw @s ["",{"text": " <生命淘汰制> ","color":"red","bold": true}, {"text":"你有 3 条生命, 生命耗尽后即被淘汰。","color":"gray"}]
 tellraw @s ["",{"text": " <PVP 干扰> ","color":"light_purple","bold": true}, {"text":"攻击其他玩家可以造成击退, 但没有伤害。","color":"gray"}]
 tellraw @s ["",{"text": " <原型> ","color":"gold","bold": true}, {"text":"此游戏目前仅用于玩法测试, 尚未进行修缮。","color":"gray"}]

+ 1 - 1
data/mini/functions/hotpm/game/damage_dealt.mcfunction

@@ -1,5 +1,5 @@
 # 如果是土豆持有者在热土豆游戏中打到人,才执行下一步
-execute if entity @s[tag=pm_holding] if entity @a[tag=pm_damage_taken] unless entity @s[tag=pm_damage_taken] at @s run function mini:hotpm/game/damage_dealt2
+execute if entity @s[tag=pm_holding] if entity @a[tag=pm_damage_taken,tag=!pm_holding] at @s run function mini:hotpm/game/transfer_potato
 
 # 结束伤害判断
 tag @a remove pm_damage_dealt

+ 0 - 9
data/mini/functions/hotpm/game/damage_dealt2.mcfunction

@@ -1,9 +0,0 @@
-# 土豆持有者打到人时执行
-tag @s add pm_damage_dealt
-function lib:sounds/hit
-
-# 转移土豆
-function mini:hotpm/game/pm_lost
-tellraw @s ["",{"text":">> ","color":"green","bold":true},"你把炸弹扔到了 ",{"selector":"@p[tag=pm_damage_taken,tag=!pm_damage_dealt]","color":"green"}," 的头上!"]
-tellraw @p[tag=pm_damage_taken,tag=!pm_damage_dealt] ["",{"text":">> ","color":"red","bold":true},{"selector":"@s","color":"red"}," 把炸弹扔到了你的头上!"]
-execute as @p[tag=pm_damage_taken,tag=!pm_damage_dealt] run function mini:hotpm/game/pm_get

+ 15 - 0
data/mini/functions/hotpm/game/pm_check.mcfunction

@@ -0,0 +1,15 @@
+# 计算应有土豆数量
+execute if score $player_alive mem matches 6..8 run scoreboard players set $potato_count mem 3
+execute if score $player_alive mem matches 4..5 run scoreboard players set $potato_count mem 2
+execute if score $player_alive mem matches 2..3 run scoreboard players set $potato_count mem 1
+execute if score $player_alive mem matches 1 run scoreboard players set $potato_count mem 0
+
+# 计算当前土豆数量
+execute store result score $current_potato mem if entity @a[tag=pm_holding]
+
+# 计算需求土豆数量
+scoreboard players operation $new_potato_count mem = $potato_count mem
+scoreboard players operation $new_potato_count mem -= $current_potato mem
+
+# 生成土豆
+execute if score $new_potato_count mem matches 1.. run function mini:hotpm/game/pm_init

+ 2 - 0
data/mini/functions/hotpm/game/pm_get.mcfunction

@@ -5,3 +5,5 @@ function lib:sounds/hit2
 effect give @s glowing 1000000 0 true
 effect clear @s speed
 effect give @s speed 1000000 2 true
+
+replaceitem entity @s armor.head tnt{Enchantments:[{id:"binding_curse",lvl:1}],display:{Name:'{"text":"真•TNT","italic":false,"color":"red"}'}}

+ 21 - 0
data/mini/functions/hotpm/game/pm_give.mcfunction

@@ -0,0 +1,21 @@
+# 计算权重
+scoreboard players reset @a temp
+execute as @a run scoreboard players operation @s temp = @s mini_heart
+execute as @a run scoreboard players operation @s temp *= #const_100 mem
+execute as @a run scoreboard players operation @s temp += @s total_score_disp
+scoreboard players add @a[tag=!pm_explode_last] temp 10000
+
+# 寻找最高分
+tag @a[tag=!mini_running] add max_uncounted
+tag @a[tag=pm_holding] add max_uncounted
+function mini:main/get_max_temp
+
+# 给予土豆
+execute as @a[tag=!max_uncounted] if score @s temp = #score_max mem run tag @s add pm_list
+execute as @a[tag=pm_list,sort=random,limit=1] run function mini:hotpm/game/pm_get
+tag @a[tag=pm_list] remove pm_list
+
+# 处理tag与分数
+tag @a[tag=max_uncounted] remove max_uncounted
+scoreboard players remove $new_potato_count mem 1
+execute if score $new_potato_count mem matches 1.. run function mini:hotpm/game/pm_give

+ 8 - 10
data/mini/functions/hotpm/game/pm_init.mcfunction

@@ -1,13 +1,11 @@
-# 刷新自己土豆
-function mini:hotpm/game/pm_get
+# 刷新对应人数的土豆
+function mini:hotpm/game/pm_give
+tag @a[tag=pm_explode_last] remove pm_explode_last
 
 # 告知玩家
-tellraw @a ["",{"text":">> ","color":"red","bold": true},{"selector":"@s","color":"red"}," 获得了炸弹!"]
+tellraw @a ["",{"text":">> ","color":"gold","bold": true},{"selector":"@a[tag=pm_holding]","color":"gold"}," 获得了炸弹!"]
 
-# 土豆爆炸时间 = 存活人数 * 2 + 5(秒)
-scoreboard players set $countdown_fast mem 50
-execute as @a[tag=mini_running] run scoreboard players add $countdown_fast mem 20
-scoreboard players operation $countdown_max mem = $countdown_fast mem
-
-# 删除效果云
-kill @s[type=area_effect_cloud,tag=pm_boom]
+# 土豆爆炸时间 = 存活人数 * 2.5 + 3(秒)
+scoreboard players set $countdown_fast mem 30
+execute as @a[tag=mini_running] run scoreboard players add $countdown_fast mem 25
+scoreboard players operation $countdown_max mem = $countdown_fast mem

+ 0 - 7
data/mini/functions/hotpm/game/pm_init_first.mcfunction

@@ -1,7 +0,0 @@
-# 第一次初始化土豆
-tag @a[tag=!mini_running] add max_uncounted
-function ltw:main/get_max_score
-tag @a[tag=max_uncounted] remove max_uncounted
-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

+ 3 - 1
data/mini/functions/hotpm/game/pm_lost.mcfunction

@@ -3,4 +3,6 @@ tag @s remove pm_holding
 
 effect clear @s glowing
 effect clear @s speed
-effect give @s speed 2 3 true
+effect give @s speed 2 3 true
+
+replaceitem entity @s armor.head air

+ 9 - 0
data/mini/functions/hotpm/game/transfer_potato.mcfunction

@@ -0,0 +1,9 @@
+# 土豆持有者打到人时执行
+tag @s add pm_damage_dealt
+function lib:sounds/hit
+
+# 转移土豆
+tellraw @s ["",{"text":">> ","color":"green","bold":true},"你把炸弹扔到了 ",{"selector":"@p[tag=pm_damage_taken,tag=!pm_holding]","color":"green"}," 的头上!"]
+tellraw @p[tag=pm_damage_taken,tag=!pm_holding] ["",{"text":">> ","color":"red","bold":true},{"selector":"@s","color":"red"}," 把炸弹扔到了你的头上!"]
+execute as @p[tag=pm_damage_taken,tag=!pm_holding] run function mini:hotpm/game/pm_get
+function mini:hotpm/game/pm_lost

+ 0 - 3
data/mini/functions/hotpm/game_start.mcfunction

@@ -1,6 +1,3 @@
-# 2秒后给予土豆
-schedule function mini:hotpm/game/pm_init_first 2s replace
-
 # HUD
 execute if score $mini_type mem matches 3 run scoreboard objectives setdisplay list mini_heart_disp
 execute if score $mini_type mem matches 3 run scoreboard objectives setdisplay belowName mini_heart

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

@@ -18,6 +18,8 @@ function mini:main/player_max_health
 tag @s remove pm_holding
 tag @s remove pm_damage_dealt
 tag @s remove pm_damage_taken
+tag @s remove pm_explode_last
+
 
 # 传送玩家
 tp @s[tag=!watcher,tag=!rejoining,tag=!debug] 1023 25 3021

+ 2 - 2
data/mini/functions/hotpm/player_leave.mcfunction

@@ -1,4 +1,4 @@
 # 玩家下线时检测重新生成土豆
 
-execute unless entity @a[tag=pm_holding] run tellraw @a ["",{"text":">> ","color":"red","bold": true},"由于有玩家带着炸弹跑路了, 正在为炸弹选择更适合它的拥有者!"]
-execute unless entity @a[tag=pm_holding] run function mini:hotpm/game/pm_init_first
+# execute unless entity @a[tag=pm_holding] run tellraw @a ["",{"text":">> ","color":"red","bold": true},"由于有玩家带着炸弹跑路了, 正在为炸弹选择更适合它的拥有者!"]
+# execute unless entity @a[tag=pm_holding] run function mini:hotpm/game/pm_init_first

+ 10 - 10
data/mini/functions/hotpm/player_lose_heart.mcfunction

@@ -1,16 +1,16 @@
 # 玩家失败时由玩家自己触发
 
-tellraw @a ["",{"text":">> ","color":"red","bold": true},{"selector":"@s","color":"red"}," 爆炸了!"]
-# 玩家失去土豆
-function mini:hotpm/game/pm_lost
+tellraw @a ["",{"text":">> ","color":"gold","bold": true},{"selector":"@a[tag=pm_holding]","color":"gold"}," 爆炸了!"]
+# 增加tag
+tag @a[tag=pm_holding] add pm_explode_last
+
 # 特效
-summon minecraft:creeper ~ ~-1 ~ {ignited:1,ExplosionRadius:1,Fuse:0,Invulnerable:1}
-particle minecraft:explosion ~ ~1 ~ 0.4 0.4 0.4 0 5
-# 记录位置
-summon minecraft:area_effect_cloud ~ ~ ~ {Tags:["pm_boom"]}
+execute at @a[tag=pm_holding] run summon minecraft:creeper ~ ~-1 ~ {ignited:1,ExplosionRadius:1,Fuse:0,Invulnerable:1}
+execute at @a[tag=pm_holding] run particle minecraft:explosion ~ ~1 ~ 0.4 0.4 0.4 0 5
 # 减少生命
-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 as @a[sort=furthest,tag=mini_running,tag=!watcher,limit=1] run function mini:hotpm/game/pm_init
+execute as @a[tag=pm_holding] run function mini:main/player_lose_heart
+# 玩家失去土豆
+execute as @a[tag=pm_holding] run function mini:hotpm/game/pm_lost
+
 # 强制观战
 # execute at @s as @a[gamemode=spectator,distance=..0.1] run spectate @p[tag=pm_holding]

+ 15 - 4
data/mini/functions/hotpm/tick2.mcfunction

@@ -1,5 +1,16 @@
+
+# 随机时间
+scoreboard players set $random_min mem -5
+scoreboard players set $random_max mem 5
+function lib:random
+scoreboard players operation $countdown_fast mem += $random mem
+execute if score $countdown_fast mem matches ..0 run scoreboard players set $countdown_fast mem 0
+
 # 爆炸
-execute if score $countdown_fast mem matches 0 as @a[tag=pm_holding] at @s run function mini:hotpm/player_lose_heart
+execute if score $countdown_fast mem matches 0 if entity @a[tag=pm_holding] run function mini:hotpm/player_lose_heart
+
+# 检测土豆
+function mini:hotpm/game/pm_check
 
 # HUD
 scoreboard players set $bossbar_color mem 0
@@ -8,6 +19,6 @@ execute as @p[tag=pm_holding] at @s run scoreboard players set @a[tag=!pm_holdin
 execute as @p[tag=pm_holding] at @s run scoreboard players set @a[tag=!pm_holding,distance=12..] bossbar_color 3
 scoreboard players set $bossbar_type mem 1
 function lib:bossbar/show
-bossbar set mini:green name "炸弹爆炸"
-bossbar set mini:yellow name "炸弹爆炸"
-bossbar set mini:red name {"text":"炸弹爆炸","color":"red"}
+bossbar set mini:green name "炸弹稳定度"
+bossbar set mini:yellow name "炸弹稳定度"
+bossbar set mini:red name {"text":"炸弹稳定度","color":"red"}

+ 3 - 0
data/mini/functions/main/get_max_score.mcfunction

@@ -1,2 +1,5 @@
+#> mini:main/get_max_score
+# @input score @a[tag=!max_uncounted,tag=!watcher] mini_score 进行统计的分数
+# @output score #score_max mem 最高分
 scoreboard players set #score_max mem -2147483648
 scoreboard players operation #score_max mem > @a[tag=!max_uncounted,tag=!watcher] mini_score

+ 6 - 0
data/mini/functions/main/get_max_temp.mcfunction

@@ -0,0 +1,6 @@
+#> mini:main/get_max_temp
+# @input score @a[tag=!max_uncounted,tag=!watcher] temp 进行统计的分数
+# @output score #score_max mem 最高分
+
+scoreboard players set #score_max mem -2147483648
+scoreboard players operation #score_max mem > @a[tag=!max_uncounted,tag=!watcher] temp

+ 0 - 1
data/mini/functions/main/tick5.mcfunction

@@ -1,7 +1,6 @@
 
 # 触发单个模块
 execute if score $mini_type mem matches 1 run function mini:parkour/tick5
-execute if score $mini_type mem matches 2 run function mini:tntrun/tick5
 execute if score $mini_type mem matches 3 run function mini:hotpm/tick5
 execute if score $mini_type mem matches 5 run function mini:phantom/tick5
 

+ 2 - 2
data/mini/functions/parkour/game_start.mcfunction

@@ -1,12 +1,12 @@
 # 游戏结束倒计时
-scoreboard players set $countdown mem 150
+scoreboard players set $countdown mem 140
 
 # HUD
 execute if score $mini_type mem matches 1 run scoreboard objectives setdisplay list total_score_disp
 execute if score $mini_type mem matches 1 run scoreboard objectives setdisplay belowName total_score_disp
 execute if score $mini_type mem matches 1 run scoreboard objectives setdisplay sidebar treasure
 scoreboard players set $bossbar_color mem 4
-scoreboard players set $countdown_max mem 150
+scoreboard players set $countdown_max mem 140
 scoreboard players set $bossbar_type mem 2
 function lib:bossbar/show
 bossbar set mini:blue name "剩余时间"

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

@@ -27,7 +27,8 @@ tag @s remove treasure9
 tag @s remove treasure10
 
 # 传送玩家
-tp @s[tag=!watcher,tag=!rejoining,tag=!debug] 1010.07 7.50 1006.98 -1518.69 -10.62
+spreadplayers 1018 1007 4 6 under 9 false @s[tag=!watcher,tag=!rejoining,tag=!debug]
+# tp @s[tag=!watcher,tag=!rejoining,tag=!debug] 1010.07 7.50 1006.98 -1518.69 -10.62
 
 # 调整模式
 gamemode spectator @s[tag=!debug]

+ 5 - 1
data/mini/functions/phantom/game_end.mcfunction

@@ -3,4 +3,8 @@ forceload remove 1000 6000 1064 6064
 gamerule doDaylightCycle false
 
 # 计算得分
-execute as @a[tag=!watcher,tag=!debug] run scoreboard players operation @s mini_score = @s kill_phantom
+execute as @a[tag=!watcher,tag=!debug] run scoreboard players operation @s mini_score = @s kill_phantom
+
+# 清理锁定格子
+execute as @a run function item:disable_slot/disable_slot_7
+execute as @a run function item:disable_slot/disable_slot_8

+ 1 - 1
data/mini/functions/phantom/player_intro.mcfunction

@@ -1,6 +1,6 @@
 # 向单个玩家展示小游戏介绍
 tp @s[tag=!debug] 1062.34 27.11 6040.84 461.44 28.30
-tellraw @s ["",{"text":"\n >> 月夜狩猎 >>\n\n","color":"gold","bold":true}," 在太阳升起之前, 用三叉戟尽量击杀幻翼吧!\n"]
+tellraw @s ["",{"text":"\n >> 月夜狩猎 >>\n\n","color":"gold","bold":true}," 在太阳升起之前, 用三叉戟尽量击杀幻翼吧!\n 同时也别被幻翼杀死了……你可以在两翼的洞穴中恢复生命值!\n"]
 tellraw @s ["",{"text": " <积分制> ","color":"red","bold": true}, {"text":"太阳升起时游戏即会结束, 然后根据击杀数决定排名。","color":"gray"}]
 tellraw @s ["",{"text": " <PVE> ","color":"light_purple","bold": true}, {"text":"无法攻击其他玩家, 但可以杀死幻翼。","color":"gray"}]
 tellraw @s ["",{"text": " <额外道具> ","color":"aqua","bold": true}, {"text":"地图的两翼顶端各有 1 个白色道具。","color":"gray"}]

+ 25 - 3
data/mini/functions/tntrun/game_init.mcfunction

@@ -4,8 +4,30 @@ forceload add 1000 2000 1050 2050
 scoreboard players set $finish_mode mem 0
 
 # 生成地图
-setblock 1000 10 2000 minecraft:structure_block{mode:"LOAD",name:"mini:tntrun"}
-setblock 1000 11 2000 minecraft:redstone_block
+##000
+setblock 1000 9 2000 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"chengzi_SC",rotation:"NONE",posX:0,mode:"LOAD",posY:1,sizeX:32,posZ:0,integrity:1.0f,showair:0b,name:"mini:tntrun000",sizeY:32,sizeZ:32,showboundingbox:0b}
+setblock 1000 10 2000 minecraft:redstone_block
+##001
+setblock 1000 9 2032 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"chengzi_SC",rotation:"NONE",posX:0,mode:"LOAD",posY:1,sizeX:32,posZ:0,integrity:1.0f,showair:0b,name:"mini:tntrun001",sizeY:32,sizeZ:8,showboundingbox:0b}
+setblock 1000 10 2032 minecraft:redstone_block
+##100
+setblock 1032 9 2000 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"chengzi_SC",rotation:"NONE",posX:0,mode:"LOAD",posY:1,sizeX:9,posZ:0,integrity:1.0f,showair:0b,name:"mini:tntrun100",sizeY:32,sizeZ:32,showboundingbox:0b}
+setblock 1032 10 2000 minecraft:redstone_block
+##101
+setblock 1032 9 2032 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"chengzi_SC",rotation:"NONE",posX:0,mode:"LOAD",posY:1,sizeX:9,posZ:0,integrity:1.0f,showair:0b,name:"mini:tntrun101",sizeY:32,sizeZ:8,showboundingbox:0b}
+setblock 1032 10 2032 minecraft:redstone_block
+##010
+setblock 1000 52 2000 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"chengzi_SC",rotation:"NONE",posX:0,mode:"LOAD",posY:-10,sizeX:32,posZ:0,integrity:1.0f,showair:0b,name:"mini:tntrun010",sizeY:10,sizeZ:32,showboundingbox:0b}
+setblock 1000 51 2000 minecraft:redstone_block
+##011
+setblock 1000 52 2032 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"chengzi_SC",rotation:"NONE",posX:0,mode:"LOAD",posY:-10,sizeX:32,posZ:0,integrity:1.0f,showair:0b,name:"mini:tntrun011",sizeY:10,sizeZ:8,showboundingbox:0b}
+setblock 1000 51 2032 minecraft:redstone_block
+##110
+setblock 1032 52 2000 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"chengzi_SC",rotation:"NONE",posX:0,mode:"LOAD",posY:-10,sizeX:9,posZ:0,integrity:1.0f,showair:0b,name:"mini:tntrun110",sizeY:10,sizeZ:32,showboundingbox:0b}
+setblock 1032 51 2000 minecraft:redstone_block
+##111
+setblock 1032 52 2032 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"chengzi_SC",rotation:"NONE",posX:0,mode:"LOAD",posY:-10,sizeX:9,posZ:0,integrity:1.0f,showair:0b,name:"mini:tntrun111",sizeY:10,sizeZ:8,showboundingbox:0b}
+setblock 1032 51 2032 minecraft:redstone_block
 
 # 清理残余实体
 kill @e[type=arrow]
@@ -14,7 +36,7 @@ kill @e[tag=tntrun_block]
 kill @e[type=trident]
 
 # 生成奖励
-execute positioned 1011.5 15.5 2011.5 run function item:bonus_item/gameparty/auto/white
+execute positioned 1019.5 19.2 2020.5 run function item:bonus_item/gameparty/auto/white
 
 # 伤害管理
 scoreboard players set $remove_resistance mem 0

+ 1 - 1
data/mini/functions/tntrun/game_start.mcfunction

@@ -7,6 +7,6 @@ schedule function mini:tntrun/player_enter3 2s replace
 # HUD
 execute if score $mini_type mem matches 2 run scoreboard objectives setdisplay list total_score_disp
 execute if score $mini_type mem matches 2 run scoreboard objectives setdisplay belowName total_score_disp
-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 sidebar layer
 scoreboard players set $bossbar_type mem 0
 function lib:bossbar/show

+ 3 - 1
data/mini/functions/tntrun/init.mcfunction

@@ -1,3 +1,5 @@
 # 计分板初始化
 scoreboard objectives remove tntrun_timer
-scoreboard objectives add tntrun_timer dummy ["TNT Run 方块消失计时"]
+scoreboard objectives add tntrun_timer dummy ["TNT Run 方块消失计时"]
+scoreboard objectives remove layer
+scoreboard objectives add layer dummy ["玩家层数"]

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

@@ -7,14 +7,16 @@ title @s actionbar ""
 effect clear @s
 effect give @s saturation 1000000 0 true
 gamerule naturalRegeneration true
-effect give @s night_vision 1000000 0 true
 effect give @s resistance 1000000 4 true
 
+# 计分板
+scoreboard players reset @s layer
+
 # 设置玩家生命
 attribute @s generic.max_health base set 20
 
 # 传送玩家
-spreadplayers 1011.5 2011.5 4 4 false @s[tag=!watcher,tag=!rejoining,tag=!debug]
+spreadplayers 1019.5 2020.5 2 2 false @s[tag=!watcher,tag=!rejoining,tag=!debug]
 # schedule: tp @a ~ ~-3 ~
 
 # 两秒后才开始 TNT 掉落

+ 1 - 1
data/mini/functions/tntrun/player_enter2.mcfunction

@@ -1,2 +1,2 @@
 # spreadplayer 后不能立即传送,所以延迟 1tick
-execute as @a[tag=!watcher,tag=!rejoining] at @s run tp @s[tag=!debug] ~ ~-3 ~
+execute as @a[tag=!watcher,tag=!rejoining] at @s run tp @s[tag=!debug] ~ 34.5 ~

+ 1 - 0
data/mini/functions/tntrun/player_failed.mcfunction

@@ -3,3 +3,4 @@ function mini:main/player_failed
 
 # 玩家死亡
 tag @s remove tntrun_pc
+scoreboard players reset @s layer

+ 3 - 6
data/mini/functions/tntrun/player_intro.mcfunction

@@ -1,10 +1,7 @@
 # 向单个玩家展示小游戏介绍
-tp @s[tag=!debug] 1011.5 18.0 2019.0 180 15
-tellraw @s ["",{"text":"\n >> 地陷之坛 >>\n\n","color":"gold","bold":true}," 你脚下的方块会不断塌陷! 保持移动, 千万不要停下来!\n"]
-tellraw @s ["",{"text": " <淘汰制> ","color":"red","bold": true}, {"text":"场地一共有三层, 掉到最下面即被淘汰。","color":"gray"}]
+tp @s[tag=!debug] 1023.65 20.29 2006.59 -345.99 17.34
+tellraw @s ["",{"text":"\n >> 地陷圣坛 >>\n\n","color":"gold","bold":true}," 你脚下的方块会不断塌陷! 保持移动, 千万不要停下来啊!\n"]
+tellraw @s ["",{"text": " <淘汰制> ","color":"red","bold": true}, {"text":"圣坛一共有四层, 掉到最下面即被淘汰。","color":"gray"}]
 tellraw @s ["",{"text": " <PVP 干扰> ","color":"light_purple","bold": true}, {"text":"攻击其他玩家可以造成击退, 但没有伤害。","color":"gray"}]
 tellraw @s ["",{"text": " <额外道具> ","color":"aqua","bold": true}, {"text":"小游戏地图中存在 1 个白色道具。","color":"gray"}]
-tellraw @s ["",{"text": " <原型> ","color":"gold","bold": true}, {"text":"此游戏目前仅用于玩法测试, 尚未进行修缮。","color":"gray"}]
 tellraw @s ""
-
-effect give @s night_vision 1000000 0 true

+ 12 - 2
data/mini/functions/tntrun/tick2.mcfunction

@@ -1,7 +1,17 @@
 # 控制方块消失
-
 # 修改下面这一行的数字以调整方块消失的延迟(单位为 2 刻,设置为 5 则为 10tick)
 execute as @e[tag=tntrun_block,scores={tntrun_timer=5}] at @s run setblock ~ ~ ~ air
 scoreboard players add @e[tag=tntrun_block] tntrun_timer 1
 execute as @e[tag=tntrun_block] at @s unless block ~ ~ ~ #mini:tntrun_floor run kill @s
-execute as @e[tag=tntrun_edge] at @s unless entity @a[tag=tntrun_pc,distance=..1.51] run kill @s
+execute as @e[tag=tntrun_edge] at @s unless entity @a[tag=tntrun_pc,distance=..1.51] run kill @s
+# execute as @e[tag=tntrun_block,tag=!tntrun_edge] at @s run particle
+
+# 玩家死亡判断
+execute as @a[tag=mini_running] at @s if block ~ ~-1 ~ magma_block run function mini:tntrun/player_failed
+execute as @a[tag=mini_running] at @s if block ~ ~-2 ~ magma_block run function mini:tntrun/player_failed
+
+# 显示层数
+execute as @a[tag=mini_running] at @s if entity @s[y=35,dy=10] run scoreboard players set @s layer 4
+execute as @a[tag=mini_running] at @s if entity @s[y=30,dy=3] run scoreboard players set @s layer 3
+execute as @a[tag=mini_running] at @s if entity @s[y=25,dy=3] run scoreboard players set @s layer 2
+execute as @a[tag=mini_running] at @s if entity @s[y=20,dy=3] run scoreboard players set @s layer 1 

+ 0 - 2
data/mini/functions/tntrun/tick5.mcfunction

@@ -1,2 +0,0 @@
-# 玩家死亡判断
-execute as @a[tag=mini_running] at @s if block ~ ~-1 ~ magma_block run function mini:tntrun/player_failed

+ 2 - 2
data/mini/functions/tntrun/watcher_limit.mcfunction

@@ -1,3 +1,3 @@
 # 观察者限制飞行范围
-execute as @a[gamemode=spectator] unless entity @s[x=1000,y=10,z=2000,dx=22,dz=22,dy=22] run spectate
-execute as @a[gamemode=spectator] unless entity @s[x=1000,y=10,z=2000,dx=22,dz=22,dy=22] run tp @s[tag=!debug] 1011.5 27.5 2011.5
+execute as @a[gamemode=spectator] unless entity @s[x=1001,y=10,z=2001,dx=37,dy=37,dz=37] run spectate
+execute as @a[gamemode=spectator] unless entity @s[x=1001,y=10,z=2001,dx=37,dy=37,dz=37] run tp @s[tag=!debug] 1023.65 20.29 2006.59 -345.99 17.34

+ 3 - 1
data/mini/tags/blocks/tntrun_floor.json

@@ -1,5 +1,7 @@
 {
     "values": [
-        "minecraft:cyan_terracotta"
+        "minecraft:dead_horn_coral_block",
+        "minecraft:crying_obsidian",
+        "minecraft:diamond_block"
     ]
 }