2
0
Эх сурвалжийг харах

修复2个物品相关的bug

HerobrineXia 5 жил өмнө
parent
commit
1c3a2a2570
25 өөрчлөгдсөн 265 нэмэгдсэн , 6 устгасан
  1. 0 1
      data/ltw/functions/main/player_enter.mcfunction
  2. 0 1
      data/ltw/functions/state/7/continue_gameparty.mcfunction
  3. 1 1
      data/mini/functions/diamond/player_death.mcfunction
  4. 24 0
      data/mini/functions/koth/game/marker_spawn.mcfunction
  5. 6 0
      data/mini/functions/koth/game/tempo_blue.mcfunction
  6. 5 0
      data/mini/functions/koth/game/tempo_red.mcfunction
  7. 2 0
      data/mini/functions/koth/game/tempo_sound.mcfunction
  8. 50 0
      data/mini/functions/koth/game/test_treasure.mcfunction
  9. 8 0
      data/mini/functions/koth/game_end.mcfunction
  10. 58 0
      data/mini/functions/koth/game_init.mcfunction
  11. 12 0
      data/mini/functions/koth/game_start.mcfunction
  12. 3 0
      data/mini/functions/koth/init.mcfunction
  13. 39 0
      data/mini/functions/koth/player_enter.mcfunction
  14. 2 0
      data/mini/functions/koth/player_finished.mcfunction
  15. 6 0
      data/mini/functions/koth/player_intro.mcfunction
  16. 11 0
      data/mini/functions/koth/tick2.mcfunction
  17. 14 0
      data/mini/functions/koth/tick20.mcfunction
  18. 11 0
      data/mini/functions/koth/tick5.mcfunction
  19. 3 0
      data/mini/functions/koth/watcher_limit.mcfunction
  20. 1 0
      data/mini/functions/main/game_end.mcfunction
  21. 2 0
      data/mini/functions/main/game_init.mcfunction
  22. 2 1
      data/mini/functions/main/game_start.mcfunction
  23. 1 0
      data/mini/functions/main/init.mcfunction
  24. 2 1
      data/mini/functions/main/player_enter.mcfunction
  25. 2 1
      data/mini/functions/main/player_intro.mcfunction

+ 0 - 1
data/ltw/functions/main/player_enter.mcfunction

@@ -41,7 +41,6 @@ function lib:bossbar/show
 # TODO: 跑酷 为已获取的宝藏标识新的粒子,并显示提示
 # TODO: TNTRun 检查场地是否造成了太多的粒子效果,并在特定电脑造成了卡顿
 # TODO: [LTCat] 钻石 重新考虑是否显示玩家的钻石数——现在这样似乎降低了玩家在最终阶段的攻击欲望
-# FIXME: [HIM] 在游戏中也可以通过打开物品栏丢出奇怪的游戏内物品,得想个办法进行限制
 # TODO: [LTCat] 增加文本可读性
 # FIXME: [LTCat] 玩家层数记分板可能会闪烁
 # TODO: [LTCat] 优化转场黑屏动画*

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

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

+ 1 - 1
data/mini/functions/diamond/player_death.mcfunction

@@ -15,7 +15,7 @@ execute store result entity @e[type=armor_stand,tag=dead_marker,limit=1] Pos[2]
 # 单独处理钻石
 execute store result score #diamond_count temp run clear @s diamond
 scoreboard players add #diamond_count temp 1
-execute at @e[type=armor_stand,tag=dead_marker,limit=1] run summon item ~ ~ ~ {Tags:["temp_diamond"],Item:{id:"minecraft:diamond",Count:1b}}
+execute at @e[type=armor_stand,tag=dead_marker,limit=1] run summon item ~ ~ ~ {Tags:["temp_diamond"],Item:{id:"minecraft:diamond",Count:1b},Glowing:1b}
 execute as @e[type=item,tag=temp_diamond,limit=1] store result entity @s Item.Count byte 0.5 run scoreboard players get #diamond_count temp
 tag @e[type=item,tag=temp_diamond,limit=1] remove temp_diamond
 # 随机槽位掉落

+ 24 - 0
data/mini/functions/koth/game/marker_spawn.mcfunction

@@ -0,0 +1,24 @@
+# 清除之前的as
+kill @e[type=armor_stand,tag=parkour_tempo]
+
+# 生成节奏方块实体
+summon armor_stand 1004 16.6 1050 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["parkour_tempo","tempo_red"]}
+summon armor_stand 1009 15.6 1051 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["parkour_tempo","tempo_red"]}
+
+summon armor_stand 1012 7.6 1039 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["parkour_tempo","tempo_red"]}
+summon armor_stand 1015 8.6 1037 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["parkour_tempo","tempo_red"]}
+summon armor_stand 1009 9.6 1036 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["parkour_tempo","tempo_red"]}
+summon armor_stand 1014 9.6 1033 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["parkour_tempo","tempo_red"]}
+summon armor_stand 1010 9.6 1033 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["parkour_tempo","tempo_red"]}
+summon armor_stand 1010 11.6 1030 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["parkour_tempo","tempo_red"]}
+
+summon armor_stand 1010 10.6 1030 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["parkour_tempo","tempo_blue"]}
+summon armor_stand 1012 10.6 1032 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["parkour_tempo","tempo_blue"]}
+summon armor_stand 1009 8.6 1036 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["parkour_tempo","tempo_blue"]}
+summon armor_stand 1015 9.6 1035 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["parkour_tempo","tempo_blue"]}
+summon armor_stand 1012 7.6 1036 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["parkour_tempo","tempo_blue"]}
+summon armor_stand 1014 8.6 1039 {Marker:1b,Invisible:1b,Invulnerable:1b,Small:1b,NoGravity:1b,Tags:["parkour_tempo","tempo_blue"]}
+
+# 显示as
+replaceitem entity @e[type=armor_stand,tag=tempo_red,tag=parkour_tempo] armor.head red_stained_glass
+replaceitem entity @e[type=armor_stand,tag=tempo_blue,tag=parkour_tempo] armor.head blue_stained_glass

+ 6 - 0
data/mini/functions/koth/game/tempo_blue.mcfunction

@@ -0,0 +1,6 @@
+# 替换方块
+execute at @e[type=armor_stand,tag=parkour_tempo,tag=tempo_red] run setblock ~ ~0.4 ~ air
+execute at @e[type=armor_stand,tag=parkour_tempo,tag=tempo_blue] run setblock ~ ~0.4 ~ warped_hyphae
+
+# 播放音效 (1007 15 1051)(1010 10 1033)
+execute at @e[type=armor_stand,tag=parkour_tempo] run playsound block.note_block.pling block @a[tag=parkour_portal,distance=..7] ~ ~0.4 ~ 0.5 0.6

+ 5 - 0
data/mini/functions/koth/game/tempo_red.mcfunction

@@ -0,0 +1,5 @@
+execute at @e[type=armor_stand,tag=parkour_tempo,tag=tempo_blue] run setblock ~ ~0.4 ~ air
+execute at @e[type=armor_stand,tag=parkour_tempo,tag=tempo_red] run setblock ~ ~0.4 ~ crimson_hyphae
+
+# 播放音效 (1007 15 1051)(1010 10 1033)
+execute at @e[type=armor_stand,tag=parkour_tempo] run playsound block.note_block.pling block @a[tag=parkour_portal,distance=..7] ~ ~0.4 ~ 0.5 1.1

+ 2 - 0
data/mini/functions/koth/game/tempo_sound.mcfunction

@@ -0,0 +1,2 @@
+# 音效
+execute at @e[type=armor_stand,tag=parkour_tempo] run playsound block.note_block.snare block @a[tag=parkour_portal,distance=..7] ~ ~0.4 ~ 0.4 2

+ 50 - 0
data/mini/functions/koth/game/test_treasure.mcfunction

@@ -0,0 +1,50 @@
+tag @a remove get_treasure
+
+execute positioned 1009.50 14.50 1007.50 as @a[tag=!treasure1,team=playing,distance=..2] unless entity @a[tag=treasure1] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"} , " 第一个获得了 ",{"text": "营地屋顶","color":"gold"}," 的宝藏!"]
+execute positioned 1009.50 14.50 1007.50 as @a[tag=!treasure1,team=playing,distance=..2] run tag @s add get_treasure
+execute positioned 1009.50 14.50 1007.50 as @a[tag=!treasure1,team=playing,distance=..2] run tag @s add treasure1
+
+execute positioned 1020.50 15.50 1016.50 as @a[tag=!treasure2,team=playing,distance=..2] unless entity @a[tag=treasure2] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"} , " 第一个获得了 ",{"text": "沙漠骨骸","color":"gold"}," 的宝藏!"]
+execute positioned 1020.50 15.50 1016.50 as @a[tag=!treasure2,team=playing,distance=..2] run tag @s add get_treasure
+execute positioned 1020.50 15.50 1016.50 as @a[tag=!treasure2,team=playing,distance=..2] run tag @s add treasure2
+
+execute positioned 1008.50 30.50 1020.50 as @a[tag=!treasure3,team=playing,distance=..2] unless entity @a[tag=treasure3] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"} , " 第一个获得了 ",{"text": "神庙立柱","color":"gold"}," 的宝藏!"]
+execute positioned 1008.50 30.50 1020.50 as @a[tag=!treasure3,team=playing,distance=..2] run tag @s add get_treasure
+execute positioned 1008.50 30.50 1020.50 as @a[tag=!treasure3,team=playing,distance=..2] run tag @s add treasure3
+
+execute positioned 1011.50 19.50 1058.50 as @a[tag=!treasure4,team=playing,distance=..2] unless entity @a[tag=treasure4] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"} , " 第一个获得了 ",{"text": "下界之门","color":"gold"}," 的宝藏!"]
+execute positioned 1011.50 19.50 1058.50 as @a[tag=!treasure4,team=playing,distance=..2] run tag @s add get_treasure
+execute positioned 1011.50 19.50 1058.50 as @a[tag=!treasure4,team=playing,distance=..2] run tag @s add treasure4
+
+execute positioned 1026.50 18.50 1047.00 as @a[tag=!treasure5,team=playing,distance=..2] unless entity @a[tag=treasure5] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"} , " 第一个获得了 ",{"text": "落日森林","color":"gold"}," 的宝藏!"]
+execute positioned 1026.50 18.50 1047.00 as @a[tag=!treasure5,team=playing,distance=..2] run tag @s add get_treasure
+execute positioned 1026.50 18.50 1047.00 as @a[tag=!treasure5,team=playing,distance=..2] run tag @s add treasure5
+
+execute positioned 1004.50 18.50 1043.50 as @a[tag=!treasure6,team=playing,distance=..2] unless entity @a[tag=treasure6] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"} , " 第一个获得了 ",{"text": "地狱之顶","color":"gold"}," 的宝藏!"]
+execute positioned 1004.50 18.50 1043.50 as @a[tag=!treasure6,team=playing,distance=..2] run tag @s add get_treasure
+execute positioned 1004.50 18.50 1043.50 as @a[tag=!treasure6,team=playing,distance=..2] run tag @s add treasure6
+
+execute positioned 1013.00 08.50 1041.00 as @a[tag=!treasure7,team=playing,distance=..2] unless entity @a[tag=treasure7] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"} , " 第一个获得了 ",{"text": "节奏舞厅","color":"gold"}," 的宝藏!"]
+execute positioned 1013.00 08.50 1041.00 as @a[tag=!treasure7,team=playing,distance=..2] run tag @s add get_treasure
+execute positioned 1013.00 08.50 1041.00 as @a[tag=!treasure7,team=playing,distance=..2] run tag @s add treasure7
+
+execute positioned 1007.50 13.50 1025.50 as @a[tag=!treasure8,team=playing,distance=..2] unless entity @a[tag=treasure8] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"} , " 第一个获得了 ",{"text": "末路营火","color":"gold"}," 的宝藏!"]
+execute positioned 1007.50 13.50 1025.50 as @a[tag=!treasure8,team=playing,distance=..2] run tag @s add get_treasure
+execute positioned 1007.50 13.50 1025.50 as @a[tag=!treasure8,team=playing,distance=..2] run tag @s add treasure8
+
+execute positioned 1024.50 29.50 1038.50 as @a[tag=!treasure9,team=playing,distance=..2] unless entity @a[tag=treasure9] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"} , " 第一个获得了 ",{"text": "活塞平台","color":"gold"}," 的宝藏!"]
+execute positioned 1024.50 29.50 1038.50 as @a[tag=!treasure9,team=playing,distance=..2] run tag @s add get_treasure
+execute positioned 1024.50 29.50 1038.50 as @a[tag=!treasure9,team=playing,distance=..2] run tag @s add treasure9
+
+execute positioned 1014.50 19.50 1024.50 as @a[tag=!treasure10,team=playing,distance=..2] unless entity @a[tag=treasure10] run tellraw @a ["",{"text": ">> ","color":"gold","bold": true},{"selector": "@s","color":"gold"} , " 第一个获得了 ",{"text": "沙漠密室","color":"gold"}," 的宝藏!"]
+execute positioned 1014.50 19.50 1024.50 as @a[tag=!treasure10,team=playing,distance=..2] run tag @s add get_treasure
+execute positioned 1014.50 19.50 1024.50 as @a[tag=!treasure10,team=playing,distance=..2] run tag @s add treasure10
+
+scoreboard players add @a[tag=get_treasure] treasure 1
+tellraw @a[tag=get_treasure,scores={treasure=..9}] ["",{"text":">> ","color":"green","bold": true},"你已获得 ",{"score": {"objective": "treasure","name": "*"},"color":"green"},{"text": " 份 ","color":"green"},"宝藏!"]
+execute as @a[tag=get_treasure,scores={treasure=10}] run function mini:parkour/player_finished
+execute as @a[tag=get_treasure] at @s run function lib:sounds/levelup
+
+execute as @a[tag=get_treasure] if score @s treasure matches 4 run advancement grant @s only ltw:parkour/treasure1
+execute as @a[tag=get_treasure] if score @s treasure matches 7 run advancement grant @s only ltw:parkour/treasure2
+execute as @a[tag=get_treasure] if score @s treasure matches 10 run advancement grant @s only ltw:parkour/treasure3

+ 8 - 0
data/mini/functions/koth/game_end.mcfunction

@@ -0,0 +1,8 @@
+# 结束跑酷
+forceload remove 1000 1000 1064 1064
+
+# 关闭节奏块
+scoreboard players set $tempo_enable mem 0
+
+# 计算得分
+execute as @a[team=playing] run scoreboard players operation @s mini_score += @s treasure

+ 58 - 0
data/mini/functions/koth/game_init.mcfunction

@@ -0,0 +1,58 @@
+# 初始化跑酷地图
+forceload add 1000 1000 1064 1064
+
+scoreboard players reset * treasure
+scoreboard players set $finish_mode mem 1
+scoreboard players set $tempo_enable mem 1
+scoreboard players set $countdown_fast mem 0
+scoreboard players set $survival mem 0
+
+# 生成地图
+setblock 1000 4 1000 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"00ll00",rotation:"NONE",posX:0,mode:"LOAD",posY:1,sizeX:32,posZ:0,integrity:1.0f,showair:0b,name:"mini:parkour0",sizeY:32,sizeZ:32,showboundingbox:0b}
+setblock 1000 5 1000 minecraft:redstone_block
+setblock 1000 4 1032 minecraft:structure_block[mode=load]{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"00ll00",rotation:"NONE",posX:0,mode:"LOAD",posY:1,sizeX:32,posZ:0,integrity:1.0f,showair:0b,name:"mini:parkour1",sizeY:32,sizeZ:32,showboundingbox:0b}
+setblock 1000 5 1032 minecraft:redstone_block
+setblock 1000 4 1000 air
+setblock 1000 4 1032 air
+
+# 清理残余实体
+kill @e[type=arrow]
+kill @e[type=item]
+kill @e[type=falling_block,tag=parkour_block]
+kill @e[tag=treasure_item]
+kill @e[type=trident]
+
+# 生成节奏方块实体
+function mini:parkour/game/marker_spawn
+
+# 生成奖励物品
+# execute positioned 1024.5 30.5 1038.5 run function item:bonus_item/gameparty/auto/green
+
+# 生成传送门实体
+summon minecraft:falling_block 1014 21 1057 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
+summon minecraft:falling_block 1014 21 1056 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
+summon minecraft:falling_block 1014 22 1057 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
+summon minecraft:falling_block 1014 22 1056 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
+summon minecraft:falling_block 1014 23 1057 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
+summon minecraft:falling_block 1014 23 1056 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
+
+# 生成宝藏实体
+summon armor_stand 1009.50 14.50 1007.50 {Tags:["treasure_item"],DisabledSlots:7967,ArmorItems:[{},{},{},{id:"chest",Count:1}],Invisible:1b,Small:1b,NoGravity:1b,Marker:1b}
+summon armor_stand 1020.50 15.50 1016.50 {Tags:["treasure_item"],DisabledSlots:7967,ArmorItems:[{},{},{},{id:"chest",Count:1}],Invisible:1b,Small:1b,NoGravity:1b,Marker:1b}
+summon armor_stand 1008.50 30.50 1020.50 {Tags:["treasure_item"],DisabledSlots:7967,ArmorItems:[{},{},{},{id:"chest",Count:1}],Invisible:1b,Small:1b,NoGravity:1b,Marker:1b}
+summon armor_stand 1011.50 19.50 1058.50 {Tags:["treasure_item"],DisabledSlots:7967,ArmorItems:[{},{},{},{id:"chest",Count:1}],Invisible:1b,Small:1b,NoGravity:1b,Marker:1b}
+summon armor_stand 1026.50 18.50 1047.00 {Tags:["treasure_item"],DisabledSlots:7967,ArmorItems:[{},{},{},{id:"chest",Count:1}],Invisible:1b,Small:1b,NoGravity:1b,Marker:1b}
+summon armor_stand 1004.50 18.50 1043.50 {Tags:["treasure_item"],DisabledSlots:7967,ArmorItems:[{},{},{},{id:"chest",Count:1}],Invisible:1b,Small:1b,NoGravity:1b,Marker:1b}
+summon armor_stand 1013.00 08.50 1041.00 {Tags:["treasure_item"],DisabledSlots:7967,ArmorItems:[{},{},{},{id:"chest",Count:1}],Invisible:1b,Small:1b,NoGravity:1b,Marker:1b}
+summon armor_stand 1007.50 13.50 1025.50 {Tags:["treasure_item"],DisabledSlots:7967,ArmorItems:[{},{},{},{id:"chest",Count:1}],Invisible:1b,Small:1b,NoGravity:1b,Marker:1b}
+summon armor_stand 1024.50 29.50 1038.50 {Tags:["treasure_item"],DisabledSlots:7967,ArmorItems:[{},{},{},{id:"chest",Count:1}],Invisible:1b,Small:1b,NoGravity:1b,Marker:1b}
+summon armor_stand 1014.50 19.50 1024.50 {Tags:["treasure_item"],DisabledSlots:7967,ArmorItems:[{},{},{},{id:"chest",Count:1}],Invisible:1b,Small:1b,NoGravity:1b,Marker:1b}
+team join gold @e[tag=treasure_item]
+effect give @e[tag=treasure_item] glowing 1000000 0 true
+
+# 伤害管理
+scoreboard players set $remove_resistance mem 0
+team modify playing friendlyFire false
+team modify playing collisionRule never
+team modify playing deathMessageVisibility never
+gamerule fallDamage false

+ 12 - 0
data/mini/functions/koth/game_start.mcfunction

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

+ 3 - 0
data/mini/functions/koth/init.mcfunction

@@ -0,0 +1,3 @@
+# 重置计分板
+scoreboard objectives remove treasure
+scoreboard objectives add treasure dummy "获得宝藏数"

+ 39 - 0
data/mini/functions/koth/player_enter.mcfunction

@@ -0,0 +1,39 @@
+# 单个玩家开始小游戏时执行
+function lib:sounds/music/mini_middle
+title @s clear
+title @s actionbar ""
+
+# 状态效果
+effect clear @s
+effect give @s saturation 1000000 0 true
+gamerule naturalRegeneration true
+effect give @s resistance 1000000 4 true
+
+# 设置玩家生命
+attribute @s generic.max_health base set 20
+
+# 计分板重置
+scoreboard players reset @s treasure
+scoreboard players set @s[team=playing,tag=!rejoining] treasure 0
+tag @s remove treasure1
+tag @s remove treasure2
+tag @s remove treasure3
+tag @s remove treasure4
+tag @s remove treasure5
+tag @s remove treasure6
+tag @s remove treasure7
+tag @s remove treasure8
+tag @s remove treasure9
+tag @s remove treasure10
+
+# 传送玩家
+spreadplayers 1018 1007 4 6 under 9 false @s[team=playing,tag=!rejoining]
+# tp @s[team=playing,tag=!rejoining] 1010.07 7.50 1006.98 -1518.69 -10.62
+
+# 调整模式
+gamemode spectator @s[team=!debugging]
+gamemode adventure @s[team=playing,tag=!rejoining]
+
+# 修改 Tag
+tag @s add parkour_portal
+tag @s[team=playing,tag=!rejoining] remove parkour_portal

+ 2 - 0
data/mini/functions/koth/player_finished.mcfunction

@@ -0,0 +1,2 @@
+# 玩家成功时由玩家自己触发
+function mini:main/player_finished

+ 6 - 0
data/mini/functions/koth/player_intro.mcfunction

@@ -0,0 +1,6 @@
+# 向单个玩家展示小游戏介绍
+tp @s[team=!debugging] 1010.96 26.83 1032.37 -385.24 16.67
+tellraw @s ["",{"text":"\n >> 遗迹寻宝 >>\n\n","color":"gold","bold":true}," 遗迹中共有十处宝藏, 赶在遗迹关闭前尽量收集吧!\n"]
+tellraw @s ["",{"text": " <积分制> ","color":"red","bold": true}, {"text":"根据寻得的宝藏数量进行排名。","color":"gray"}]
+tellraw @s ["",{"text": " <和平环境> ","color":"light_purple","bold": true}, {"text":"无法攻击其他玩家。","color":"gray"}]
+tellraw @s ""

+ 11 - 0
data/mini/functions/koth/tick2.mcfunction

@@ -0,0 +1,11 @@
+# 传送门粒子
+particle portal 1014.5 21.5 1057.0 0 1.5 1 1 15
+
+# 宝藏粒子
+execute as @e[tag=treasure_item] at @s run particle minecraft:crit ~ ~0.9 ~ 0.25 0.25 0.25 0.2 5
+
+# 测试宝藏
+function mini:parkour/game/test_treasure
+
+# 旋转宝藏
+execute as @e[tag=treasure_item] at @s run tp @s ~ ~ ~ ~2 ~

+ 14 - 0
data/mini/functions/koth/tick20.mcfunction

@@ -0,0 +1,14 @@
+# 地狱门音效
+scoreboard players set $random_max mem 3
+scoreboard players set $random_min mem 1
+function lib:random
+execute if score $random mem matches 2 run playsound block.portal.ambient ambient @a 1014.5 22 1057.5
+
+# 显示倒计时
+execute if score $countdown mem matches ..10 run title @a times 3 14 2
+execute if score $countdown mem matches ..10 run title @a subtitle {"score":{"name":"$countdown","objective":"mem"}}
+execute if score $countdown mem matches ..10 run title @a title [""]
+execute if score $countdown mem matches ..10 as @a at @s run function lib:sounds/hit2
+
+# 0s:游戏结束
+execute if score $countdown mem matches 0 run function mini:main/game_end

+ 11 - 0
data/mini/functions/koth/tick5.mcfunction

@@ -0,0 +1,11 @@
+# 回城营火
+execute as @a[tag=mini_running,x=1005,y=11,z=1018,dx=2,dy=3,dz=2] at @s run tag @s remove parkour_portal
+execute as @a[tag=mini_running,x=1005,y=11,z=1018,dx=2,dy=3,dz=2] at @s run function lib:sounds/teleport
+execute as @a[tag=mini_running,x=1005,y=11,z=1018,dx=2,dy=3,dz=2] at @s run tp ~5 ~-4 ~-12
+
+# 掉落方块保持
+execute as @e[type=falling_block,tag=parkour_block] run data modify entity @s Time set value 1
+
+# 标记是否通过传送门
+tag @a[x=1015.0,y=20.0,z=1055.0,dx=2,dy=4,dz=4,gamemode=!spectator] remove parkour_portal
+tag @a[x=1011.0,y=20.0,z=1055.0,dx=2,dy=4,dz=4,gamemode=!spectator] add parkour_portal

+ 3 - 0
data/mini/functions/koth/watcher_limit.mcfunction

@@ -0,0 +1,3 @@
+# 观察者限制飞行范围
+execute as @a[gamemode=spectator] unless entity @s[x=1001,y=7,z=1001,dx=30,dy=30,dz=62] run spectate
+execute as @a[gamemode=spectator] unless entity @s[x=1001,y=7,z=1001,dx=30,dy=30,dz=62] run tp @s[team=!debugging] 1027.56 18.03 1046.89 13.48 4.84

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

@@ -5,6 +5,7 @@ execute if score $mini_type mem matches 3 run function mini:hotpm/game_end
 execute if score $mini_type mem matches 4 run function mini:colormatch/game_end
 execute if score $mini_type mem matches 5 run function mini:phantom/game_end
 execute if score $mini_type mem matches 6 run function mini:diamond/game_end
+execute if score $mini_type mem matches 7 run function mini:koth/game_end
 
 # 计算排名
 tag @a remove mini_rank1

+ 2 - 0
data/mini/functions/main/game_init.mcfunction

@@ -10,3 +10,5 @@ execute if score $mini_type mem matches 3 run function mini:hotpm/game_init
 execute if score $mini_type mem matches 4 run function mini:colormatch/game_init
 execute if score $mini_type mem matches 5 run function mini:phantom/game_init
 execute if score $mini_type mem matches 6 run function mini:diamond/game_init
+execute if score $mini_type mem matches 7 run function mini:koth/game_init
+

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

@@ -3,4 +3,5 @@ execute if score $mini_type mem matches 2 run function mini:tntrun/game_start
 execute if score $mini_type mem matches 3 run function mini:hotpm/game_start
 execute if score $mini_type mem matches 4 run function mini:colormatch/game_start
 execute if score $mini_type mem matches 5 run function mini:phantom/game_start
-execute if score $mini_type mem matches 6 run function mini:diamond/game_start
+execute if score $mini_type mem matches 6 run function mini:diamond/game_start
+execute if score $mini_type mem matches 7 run function mini:koth/game_start

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

@@ -3,6 +3,7 @@ function mini:tntrun/init
 function mini:parkour/init
 function mini:phantom/init
 function mini:diamond/init
+function mini:koth/init
 
 # 计分板初始化
 scoreboard objectives remove mini_score

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

@@ -16,4 +16,5 @@ execute if score $mini_type mem matches 2 run function mini:tntrun/player_enter
 execute if score $mini_type mem matches 3 run function mini:hotpm/player_enter
 execute if score $mini_type mem matches 4 run function mini:colormatch/player_enter
 execute if score $mini_type mem matches 5 run function mini:phantom/player_enter
-execute if score $mini_type mem matches 6 run function mini:diamond/player_enter
+execute if score $mini_type mem matches 6 run function mini:diamond/player_enter
+execute if score $mini_type mem matches 7 run function mini:koth/player_enter

+ 2 - 1
data/mini/functions/main/player_intro.mcfunction

@@ -4,4 +4,5 @@ execute if score $mini_type mem matches 2 run function mini:tntrun/player_intro
 execute if score $mini_type mem matches 3 run function mini:hotpm/player_intro
 execute if score $mini_type mem matches 4 run function mini:colormatch/player_intro
 execute if score $mini_type mem matches 5 run function mini:phantom/player_intro
-execute if score $mini_type mem matches 6 run function mini:diamond/player_intro
+execute if score $mini_type mem matches 6 run function mini:diamond/player_intro
+execute if score $mini_type mem matches 7 run function mini:koth/player_intro