Jelajahi Sumber

新游戏:assassinate(ass)

HerobrineXia 5 tahun lalu
induk
melakukan
be5546bc5e
49 mengubah file dengan 165 tambahan dan 279 penghapusan
  1. 7 0
      data/mini/functions/ass/game/give_creeper.mcfunction
  2. 7 0
      data/mini/functions/ass/game/give_stick.mcfunction
  3. 6 0
      data/mini/functions/ass/game/use_creeper.mcfunction
  4. 2 0
      data/mini/functions/ass/game_end.mcfunction
  5. 22 0
      data/mini/functions/ass/game_init.mcfunction
  6. 13 0
      data/mini/functions/ass/game_start.mcfunction
  7. 3 0
      data/mini/functions/ass/init.mcfunction
  8. 24 0
      data/mini/functions/ass/player_enter.mcfunction
  9. 8 0
      data/mini/functions/ass/player_failed.mcfunction
  10. 7 0
      data/mini/functions/ass/player_intro.mcfunction
  11. 8 0
      data/mini/functions/ass/tick2.mcfunction
  12. 14 0
      data/mini/functions/ass/tick20.mcfunction
  13. 2 2
      data/mini/functions/ass/watcher_limit.mcfunction
  14. 1 3
      data/mini/functions/colormatch/game_init.mcfunction
  15. 2 3
      data/mini/functions/hotpm/game_init.mcfunction
  16. 0 24
      data/mini/functions/koth/game/marker_spawn.mcfunction
  17. 0 6
      data/mini/functions/koth/game/tempo_blue.mcfunction
  18. 0 5
      data/mini/functions/koth/game/tempo_red.mcfunction
  19. 0 2
      data/mini/functions/koth/game/tempo_sound.mcfunction
  20. 0 50
      data/mini/functions/koth/game/test_treasure.mcfunction
  21. 0 8
      data/mini/functions/koth/game_end.mcfunction
  22. 0 58
      data/mini/functions/koth/game_init.mcfunction
  23. 0 12
      data/mini/functions/koth/game_start.mcfunction
  24. 0 3
      data/mini/functions/koth/init.mcfunction
  25. 0 39
      data/mini/functions/koth/player_enter.mcfunction
  26. 0 2
      data/mini/functions/koth/player_finished.mcfunction
  27. 0 6
      data/mini/functions/koth/player_intro.mcfunction
  28. 0 11
      data/mini/functions/koth/tick2.mcfunction
  29. 0 14
      data/mini/functions/koth/tick20.mcfunction
  30. 0 11
      data/mini/functions/koth/tick5.mcfunction
  31. 1 1
      data/mini/functions/main/game_end.mcfunction
  32. 1 1
      data/mini/functions/main/game_init.mcfunction
  33. 1 1
      data/mini/functions/main/game_start.mcfunction
  34. 1 1
      data/mini/functions/main/init.mcfunction
  35. 5 0
      data/mini/functions/main/kill_entity.mcfunction
  36. 1 0
      data/mini/functions/main/player_death.mcfunction
  37. 1 1
      data/mini/functions/main/player_enter.mcfunction
  38. 1 1
      data/mini/functions/main/player_intro.mcfunction
  39. 1 0
      data/mini/functions/main/tick2.mcfunction
  40. 1 0
      data/mini/functions/main/tick20.mcfunction
  41. 1 0
      data/mini/functions/main/watcher_limit.mcfunction
  42. 2 3
      data/mini/functions/parkour/game_init.mcfunction
  43. 1 3
      data/mini/functions/phantom/game_init.mcfunction
  44. 0 1
      data/mini/functions/phantom/player_failed.mcfunction
  45. 1 4
      data/mini/functions/phantom/tick2.mcfunction
  46. 1 3
      data/mini/functions/tntrun/game_init.mcfunction
  47. 8 0
      data/mini/tags/blocks/creeper_block.json
  48. 1 0
      data/mini/tags/items/game_item.json
  49. 10 0
      data/test/functions/mini/ass.mcfunction

+ 7 - 0
data/mini/functions/ass/game/give_creeper.mcfunction

@@ -0,0 +1,7 @@
+clear @s creeper_spawn_egg{game_item:1b}
+
+# 返还格子上的物品
+execute if data entity @s Inventory[{Slot:8b}] run scoreboard players set @s item_slot 8
+execute if data entity @s Inventory[{Slot:8b}] at @s run function item:pop_slot/return_item
+
+replaceitem entity @s hotbar.8 creeper_spawn_egg{game_item:1b,display:{Name:'{"text":"苦力怕刷怪蛋","italic":false}'},EntityTag:{ignited:1b,Fuse:30s,AbsorptionAmount:1000},CanPlaceOn:["#mini:creeper_block"]} 1

+ 7 - 0
data/mini/functions/ass/game/give_stick.mcfunction

@@ -0,0 +1,7 @@
+clear @s stick{game_item:1b}
+
+# 返还格子上的物品
+execute if data entity @s Inventory[{Slot:7b}] run scoreboard players set @s item_slot 7
+execute if data entity @s Inventory[{Slot:7b}] at @s run function item:pop_slot/return_item
+
+replaceitem entity @s hotbar.7 stick{game_item:1b,display:{Name:'{"text":"击退棒","italic":false}'},Enchantments:[{id:"knockback",lvl:2}]} 1

+ 6 - 0
data/mini/functions/ass/game/use_creeper.mcfunction

@@ -0,0 +1,6 @@
+# 设置玩家分数
+scoreboard players set @s countdown_fast 20
+scoreboard players reset @s creeperUse
+
+# 清除三叉戟以防bug
+clear @s creeper_spawn_egg{game_item:1b}

+ 2 - 0
data/mini/functions/ass/game_end.mcfunction

@@ -0,0 +1,2 @@
+# 结束刺客
+forceload remove 1000 7000 1032 7032

+ 22 - 0
data/mini/functions/ass/game_init.mcfunction

@@ -0,0 +1,22 @@
+# 初始化刺客地图
+forceload add 1000 7000 1032 7032
+
+scoreboard players set $finish_mode mem 0
+scoreboard players set $countdown_fast mem 0
+scoreboard players set $survival mem 0
+
+# 生成地图
+setblock 1000 4 7000 minecraft:structure_block[mode=load]{mode:"LOAD",posX:0,posY:1,posZ:0,name:"mini:ass"}
+setblock 1000 5 7000 minecraft:redstone_block
+setblock 1000 4 7000 air
+
+# 清理残余实体
+function mini:main/kill_entity
+
+# 伤害管理
+scoreboard players set $remove_resistance mem 1
+team modify playing friendlyFire false
+team modify playing collisionRule always
+team modify playing deathMessageVisibility always
+gamerule fallDamage false
+

+ 13 - 0
data/mini/functions/ass/game_start.mcfunction

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

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

@@ -0,0 +1,3 @@
+# 重置计分板
+scoreboard objectives remove creeperUse
+scoreboard objectives add creeperUse minecraft.used:minecraft.creeper_spawn_egg "苦力怕计数器"

+ 24 - 0
data/mini/functions/ass/player_enter.mcfunction

@@ -0,0 +1,24 @@
+# 单个玩家开始小游戏时执行
+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 set @s countdown_fast 0
+scoreboard players set @s creeperUse 0
+
+# 传送玩家
+spreadplayers 1015 7015 1 10 false @s[team=playing,tag=!rejoining]
+
+# 调整模式
+gamemode spectator @s[team=!debugging]
+gamemode adventure @s[team=playing,tag=!rejoining]

+ 8 - 0
data/mini/functions/ass/player_failed.mcfunction

@@ -0,0 +1,8 @@
+# 玩家死亡时由玩家自己触发
+
+tag @s remove mini_running
+gamemode spectator
+tp @s[team=!debugging] 1062.34 27.11 6040.84 461.44 28.30
+# tellraw @a ["",{"text": ">> ","color":"red","bold": true},{"selector": "@s","color":"red"}," 已死亡!"]
+execute as @a at @s run function lib:sounds/error
+execute unless entity @a[tag=mini_running] run function mini:main/game_end

+ 7 - 0
data/mini/functions/ass/player_intro.mcfunction

@@ -0,0 +1,7 @@
+# 向单个玩家展示小游戏介绍
+tp @s[team=!debugging] 1015 20 7015 0 90
+tellraw @s ["",{"text":"\n >> 核爆刺客 >>\n\n","color":"gold","bold":true}," 尝试在躲避苦力怕的同时击杀对方!\n"]
+tellraw @s ["",{"text": " <PVP> ","color":"red","bold": true}, {"text":"无法直接攻击玩家,但可以通过放置苦力怕击杀。","color":"gray"}]
+tellraw @s ["",{"text": " <PVE> ","color":"red","bold": true}, {"text":"无法对苦力怕造成伤害,但可以击退苦力怕。","color":"gray"}]
+tellraw @s ["",{"text": " <原型> ","color":"gold","bold": true}, {"text":"此游戏目前仅用于玩法测试, 尚未进行修缮。","color":"gray"}]
+tellraw @s ""

+ 8 - 0
data/mini/functions/ass/tick2.mcfunction

@@ -0,0 +1,8 @@
+# 使用苦力怕刷怪蛋调用函数
+execute as @a[tag=mini_running] if score @s creeperUse matches 1.. run function mini:ass/game/use_creeper
+
+# 给予苦力怕刷怪蛋
+execute as @a[tag=mini_running] unless data entity @s Inventory[{Slot:8b,id:"minecraft:creeper_spawn_egg",tag:{game_item:1b}}] unless score @s countdown_fast matches 1.. run function mini:ass/game/give_creeper
+
+# 给予击退棒
+execute as @a[tag=mini_running] unless data entity @s Inventory[{Slot:7b,id:"minecraft:stick",tag:{game_item:1b}}] run function mini:ass/game/give_stick

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

@@ -0,0 +1,14 @@
+# 强制死亡机制
+execute if score $countdown mem matches 45 run tellraw @a ["",{"text": ">> ","color": "gold","bold": true},{"text": "即死模式已开启, 游戏将在 ","color": "gold"},"45 秒 ", {"text": "后结束","color": "gold"}]
+execute if score $countdown mem matches 45 run scoreboard players set $bossbar_color mem 1
+execute if score $countdown mem matches 45 run function lib:bossbar/show
+execute if score $countdown mem matches ..45 run effect give @a[team=playing] wither 60 1 true
+
+# 显示倒计时
+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

+ 2 - 2
data/mini/functions/koth/watcher_limit.mcfunction → data/mini/functions/ass/watcher_limit.mcfunction

@@ -1,3 +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
+execute as @a[gamemode=spectator] unless entity @s[x=1001,y=7,z=7001,dx=30,dy=30,dz=30] run spectate
+execute as @a[gamemode=spectator] unless entity @s[x=1001,y=7,z=7001,dx=30,dy=30,dz=30] run tp @s[team=!debugging] 1016 18 7016

+ 1 - 3
data/mini/functions/colormatch/game_init.mcfunction

@@ -14,9 +14,7 @@ function mini:colormatch/game/prepare_round
 schedule function mini:colormatch/game_init2 12t replace
 
 # 清理残余实体
-kill @e[type=arrow]
-kill @e[type=item]
-kill @e[type=trident]
+function mini:main/kill_entity
 
 # 生成物品
 execute positioned 1060.5 22.0 4010.5 run function item:bonus_item/gameparty/auto/white

+ 2 - 3
data/mini/functions/hotpm/game_init.mcfunction

@@ -13,9 +13,8 @@ team modify playing deathMessageVisibility never
 gamerule fallDamage false
 
 # 清理残余实体
-kill @e[type=arrow]
-kill @e[type=item]
-kill @e[type=trident]
+function mini:main/kill_entity
+
 
 # 生成地图
 

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

@@ -1,24 +0,0 @@
-# 清除之前的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

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

@@ -1,6 +0,0 @@
-# 替换方块
-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

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

@@ -1,5 +0,0 @@
-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

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

@@ -1,2 +0,0 @@
-# 音效
-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

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

@@ -1,50 +0,0 @@
-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

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

@@ -1,8 +0,0 @@
-# 结束跑酷
-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

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

@@ -1,58 +0,0 @@
-# 初始化跑酷地图
-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

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

@@ -1,12 +0,0 @@
-# 游戏结束倒计时
-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 "剩余时间"

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

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

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

@@ -1,39 +0,0 @@
-# 单个玩家开始小游戏时执行
-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

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

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

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

@@ -1,6 +0,0 @@
-# 向单个玩家展示小游戏介绍
-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 ""

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

@@ -1,11 +0,0 @@
-# 传送门粒子
-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 ~

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

@@ -1,14 +0,0 @@
-# 地狱门音效
-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

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

@@ -1,11 +0,0 @@
-# 回城营火
-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

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

@@ -5,7 +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
+execute if score $mini_type mem matches 7 run function mini:ass/game_end
 execute if score $mini_type mem matches 8 run function mini:trade/game_end
 
 # 计算排名

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

@@ -10,6 +10,6 @@ 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
+execute if score $mini_type mem matches 7 run function mini:ass/game_init
 execute if score $mini_type mem matches 8 run function mini:trade/game_init
 

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

@@ -4,5 +4,5 @@ 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 7 run function mini:koth/game_start
+execute if score $mini_type mem matches 7 run function mini:ass/game_start
 execute if score $mini_type mem matches 8 run function mini:trade/game_start

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

@@ -4,7 +4,7 @@ function mini:parkour/init
 function mini:hotpm/init
 function mini:phantom/init
 function mini:diamond/init
-function mini:koth/init
+function mini:ass/init
 function mini:trade/init
 
 # 计分板初始化

+ 5 - 0
data/mini/functions/main/kill_entity.mcfunction

@@ -0,0 +1,5 @@
+# 清理残留实体
+kill @e[type=arrow]
+kill @e[type=item]
+kill @e[type=creeper]
+kill @e[type=trident]

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

@@ -1,4 +1,5 @@
 # 玩家死亡后触发
 execute if score $mini_type mem matches 5 run function mini:phantom/player_failed
 execute if score $mini_type mem matches 6 run function mini:diamond/player_death
+execute if score $mini_type mem matches 7 run function mini:main/player_failed
 execute if score $mini_type mem matches 8 run function mini:trade/player_death

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

@@ -17,5 +17,5 @@ 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 7 run function mini:koth/player_enter
+execute if score $mini_type mem matches 7 run function mini:ass/player_enter
 execute if score $mini_type mem matches 8 run function mini:trade/player_enter

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

@@ -5,5 +5,5 @@ 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 7 run function mini:koth/player_intro
+execute if score $mini_type mem matches 7 run function mini:ass/player_intro
 execute if score $mini_type mem matches 8 run function mini:trade/player_intro

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

@@ -5,4 +5,5 @@ execute if score $mini_type mem matches 3 run function mini:hotpm/tick2
 execute if score $mini_type mem matches 4 run function mini:colormatch/tick2
 execute if score $mini_type mem matches 5 run function mini:phantom/tick2
 execute if score $mini_type mem matches 6 run function mini:diamond/tick2
+execute if score $mini_type mem matches 7 run function mini:ass/tick2
 execute if score $mini_type mem matches 8 run function mini:trade/tick2

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

@@ -3,6 +3,7 @@
 execute if score $mini_type mem matches 1 run function mini:parkour/tick20
 execute if score $mini_type mem matches 5 run function mini:phantom/tick20
 execute if score $mini_type mem matches 6 run function mini:diamond/tick20
+execute if score $mini_type mem matches 7 run function mini:ass/tick20
 execute if score $mini_type mem matches 8 run function mini:trade/tick20
 
 # 结束游戏判定

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

@@ -5,4 +5,5 @@ execute if score $mini_type mem matches 3 run function mini:hotpm/watcher_limit
 execute if score $mini_type mem matches 4 run function mini:colormatch/watcher_limit
 execute if score $mini_type mem matches 5 run function mini:phantom/watcher_limit
 execute if score $mini_type mem matches 6 run function mini:diamond/watcher_limit
+execute if score $mini_type mem matches 7 run function mini:ass/watcher_limit
 execute if score $mini_type mem matches 8 run function mini:trade/watcher_limit

+ 2 - 3
data/mini/functions/parkour/game_init.mcfunction

@@ -16,11 +16,10 @@ 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:main/kill_entity
+
 
 # 生成节奏方块实体
 function mini:parkour/game/marker_spawn

+ 1 - 3
data/mini/functions/phantom/game_init.mcfunction

@@ -24,10 +24,8 @@ setblock 1032 4 6000 air
 setblock 1032 4 6032 air
 
 # 清理残余实体
-kill @e[type=arrow]
-kill @e[type=item]
+function mini:main/kill_entity
 tp @e[type=phantom] 1000 -100 6000
-kill @e[type=trident]
 
 # 生成奖励物品
 execute positioned 1034.0 27.5 6058.5 run function item:bonus_item/gameparty/auto/white

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

@@ -1,5 +1,4 @@
 # 玩家死亡时由玩家自己触发
-
 tag @s remove mini_running
 gamemode spectator
 tp @s[team=!debugging] 1062.34 27.11 6040.84 461.44 28.30

+ 1 - 4
data/mini/functions/phantom/tick2.mcfunction

@@ -2,10 +2,7 @@
 execute as @a[tag=mini_running] if score @s use_trident matches 1.. run function mini:phantom/game/use_trident
 
 # 给予三叉戟
-execute as @a[tag=mini_running] unless data entity @s Inventory[{id:"minecraft:trident",tag:{game_item:1b}}] unless score @s countdown_fast matches 1.. run function mini:phantom/game/give_trident
-
-# 清理错位的三叉戟
-execute as @a[tag=mini_running] unless score @s countdown_fast matches 1.. unless data entity @s Inventory[{id:"minecraft:trident",Slot:8b,tag:{game_item:1b}}] if data entity @s Inventory[{id:"minecraft:trident",tag:{game_item:1b}}] run function mini:phantom/game/give_trident
+execute as @a[tag=mini_running] unless data entity @s Inventory[{Slot:8b,id:"minecraft:trident",tag:{game_item:1b}}] unless score @s countdown_fast matches 1.. run function mini:phantom/game/give_trident
 
 # 更改丢出的三叉戟的nbt
 execute as @e[type=trident,tag=!fixed_trident] run function mini:phantom/game/fix_trident

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

@@ -33,10 +33,8 @@ setblock 1032 52 2032 minecraft:structure_block[mode=load]{metadata:"",mirror:"N
 setblock 1032 51 2032 minecraft:redstone_block
 
 # 清理残余实体
-kill @e[type=arrow]
-kill @e[type=item]
+function mini:main/kill_entity
 kill @e[tag=tntrun_block]
-kill @e[type=trident]
 
 # 生成奖励
 execute positioned 1019.5 19.2 2020.5 run function item:bonus_item/gameparty/auto/white

+ 8 - 0
data/mini/tags/blocks/creeper_block.json

@@ -0,0 +1,8 @@
+{
+    "values": [
+        "minecraft:clay",
+        "#minecraft:white_concrete",
+        "#minecraft:wool",
+        "minecraft:diamond_block"
+    ]
+}

+ 1 - 0
data/mini/tags/items/game_item.json

@@ -2,6 +2,7 @@
     "values": [
         "minecraft:trident",
         "minecraft:stick",
+        "minecraft:creeper_spawn_egg",
         "minecraft:acacia_planks",
         "minecraft:birch_planks",
         "minecraft:bedrock",

+ 10 - 0
data/test/functions/mini/ass.mcfunction

@@ -0,0 +1,10 @@
+# 测试用:快速开始 Assassinate
+team join playing @a[team=watching]
+function ltw:state/0/start_game
+scoreboard players set $round mem 5
+scoreboard players set $mini_type mem 7
+function mini:main/game_init
+function ltw:state/4/state_enter
+say 已开始单个测试游戏!
+
+schedule function test:countdown/quick 20t