LTCatt 6 лет назад
Родитель
Сommit
9f4cb96fbb

+ 1 - 0
data/lib/functions/sounds/hurt.mcfunction

@@ -0,0 +1 @@
+playsound minecraft:entity.player.hurt ambient @s

+ 15 - 16
data/mini/functions/colormatch/game/get_random_floor.mcfunction

@@ -2,24 +2,23 @@ scoreboard players set $random_min mem 1
 scoreboard players set $random_max mem 15
 function lib:random
 
-# TODO 更换地板方块-增强对比+辨识度
 # 随机选择不消失的方块
 execute positioned 1001 10 4000 run fill ~ ~1 ~ ~24 ~1 ~24 air replace
-execute positioned 1001 10 4000 if score $random mem matches 1 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered iron_block
-execute positioned 1001 10 4000 if score $random mem matches 2 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered white_concrete
-execute positioned 1001 10 4000 if score $random mem matches 3 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered quartz_block
-execute positioned 1001 10 4000 if score $random mem matches 4 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered snow_block
-execute positioned 1001 10 4000 if score $random mem matches 5 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered white_wool
-execute positioned 1001 10 4000 if score $random mem matches 6 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered gold_block
-execute positioned 1001 10 4000 if score $random mem matches 7 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered sponge
-execute positioned 1001 10 4000 if score $random mem matches 8 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered sandstone
-execute positioned 1001 10 4000 if score $random mem matches 9 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered yellow_concrete
-execute positioned 1001 10 4000 if score $random mem matches 10 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered end_stone
-execute positioned 1001 10 4000 if score $random mem matches 11 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered emerald_block
-execute positioned 1001 10 4000 if score $random mem matches 12 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered lime_concrete
-execute positioned 1001 10 4000 if score $random mem matches 13 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered melon
-execute positioned 1001 10 4000 if score $random mem matches 14 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered dark_prismarine
-execute positioned 1001 10 4000 if score $random mem matches 15 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered green_wool
+execute positioned 1001 10 4000 if score $random mem matches 1 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered acacia_planks
+execute positioned 1001 10 4000 if score $random mem matches 2 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered birch_planks
+execute positioned 1001 10 4000 if score $random mem matches 3 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered bedrock
+execute positioned 1001 10 4000 if score $random mem matches 4 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered crimson_planks
+execute positioned 1001 10 4000 if score $random mem matches 5 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered warped_planks
+execute positioned 1001 10 4000 if score $random mem matches 6 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered slime_block
+execute positioned 1001 10 4000 if score $random mem matches 7 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered bricks
+execute positioned 1001 10 4000 if score $random mem matches 8 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered mossy_cobblestone
+execute positioned 1001 10 4000 if score $random mem matches 9 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered purpur_block
+execute positioned 1001 10 4000 if score $random mem matches 10 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered granite
+execute positioned 1001 10 4000 if score $random mem matches 11 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered prismarine
+execute positioned 1001 10 4000 if score $random mem matches 12 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered soul_sand
+execute positioned 1001 10 4000 if score $random mem matches 13 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered packed_ice
+execute positioned 1001 10 4000 if score $random mem matches 14 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered white_wool
+execute positioned 1001 10 4000 if score $random mem matches 15 run clone ~ ~ ~ ~24 ~ ~24 ~ ~1 ~ filtered honey_block
 
 # 存计分板
 scoreboard players operation $color_match_floor mem = $random mem

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

@@ -1,60 +1,60 @@
-execute if score $color_match_floor mem matches 1 run fill 1075 11 3999 1075 40 4025 iron_block
-execute if score $color_match_floor mem matches 1 run fill 1075 11 3999 1049 40 3999 iron_block
-execute if score $color_match_floor mem matches 1 run fill 1049 11 3999 1049 40 4025 iron_block
-execute if score $color_match_floor mem matches 1 run fill 1049 11 4025 1075 40 4025 iron_block
-execute if score $color_match_floor mem matches 2 run fill 1075 11 3999 1075 40 4025 white_concrete
-execute if score $color_match_floor mem matches 2 run fill 1075 11 3999 1049 40 3999 white_concrete
-execute if score $color_match_floor mem matches 2 run fill 1049 11 3999 1049 40 4025 white_concrete
-execute if score $color_match_floor mem matches 2 run fill 1049 11 4025 1075 40 4025 white_concrete
-execute if score $color_match_floor mem matches 3 run fill 1075 11 3999 1075 40 4025 quartz_block
-execute if score $color_match_floor mem matches 3 run fill 1075 11 3999 1049 40 3999 quartz_block
-execute if score $color_match_floor mem matches 3 run fill 1049 11 3999 1049 40 4025 quartz_block
-execute if score $color_match_floor mem matches 3 run fill 1049 11 4025 1075 40 4025 quartz_block
-execute if score $color_match_floor mem matches 4 run fill 1075 11 3999 1075 40 4025 snow_block
-execute if score $color_match_floor mem matches 4 run fill 1075 11 3999 1049 40 3999 snow_block
-execute if score $color_match_floor mem matches 4 run fill 1049 11 3999 1049 40 4025 snow_block
-execute if score $color_match_floor mem matches 4 run fill 1049 11 4025 1075 40 4025 snow_block
-execute if score $color_match_floor mem matches 5 run fill 1075 11 3999 1075 40 4025 white_wool
-execute if score $color_match_floor mem matches 5 run fill 1075 11 3999 1049 40 3999 white_wool
-execute if score $color_match_floor mem matches 5 run fill 1049 11 3999 1049 40 4025 white_wool
-execute if score $color_match_floor mem matches 5 run fill 1049 11 4025 1075 40 4025 white_wool
-execute if score $color_match_floor mem matches 6 run fill 1075 11 3999 1075 40 4025 gold_block
-execute if score $color_match_floor mem matches 6 run fill 1075 11 3999 1049 40 3999 gold_block
-execute if score $color_match_floor mem matches 6 run fill 1049 11 3999 1049 40 4025 gold_block
-execute if score $color_match_floor mem matches 6 run fill 1049 11 4025 1075 40 4025 gold_block
-execute if score $color_match_floor mem matches 7 run fill 1075 11 3999 1075 40 4025 sponge
-execute if score $color_match_floor mem matches 7 run fill 1075 11 3999 1049 40 3999 sponge
-execute if score $color_match_floor mem matches 7 run fill 1049 11 3999 1049 40 4025 sponge
-execute if score $color_match_floor mem matches 7 run fill 1049 11 4025 1075 40 4025 sponge
-execute if score $color_match_floor mem matches 8 run fill 1075 11 3999 1075 40 4025 sandstone
-execute if score $color_match_floor mem matches 8 run fill 1075 11 3999 1049 40 3999 sandstone
-execute if score $color_match_floor mem matches 8 run fill 1049 11 3999 1049 40 4025 sandstone
-execute if score $color_match_floor mem matches 8 run fill 1049 11 4025 1075 40 4025 sandstone
-execute if score $color_match_floor mem matches 9 run fill 1075 11 3999 1075 40 4025 yellow_concrete
-execute if score $color_match_floor mem matches 9 run fill 1075 11 3999 1049 40 3999 yellow_concrete
-execute if score $color_match_floor mem matches 9 run fill 1049 11 3999 1049 40 4025 yellow_concrete
-execute if score $color_match_floor mem matches 9 run fill 1049 11 4025 1075 40 4025 yellow_concrete
-execute if score $color_match_floor mem matches 10 run fill 1075 11 3999 1075 40 4025 end_stone
-execute if score $color_match_floor mem matches 10 run fill 1075 11 3999 1049 40 3999 end_stone
-execute if score $color_match_floor mem matches 10 run fill 1049 11 3999 1049 40 4025 end_stone
-execute if score $color_match_floor mem matches 10 run fill 1049 11 4025 1075 40 4025 end_stone
-execute if score $color_match_floor mem matches 11 run fill 1075 11 3999 1075 40 4025 emerald_block
-execute if score $color_match_floor mem matches 11 run fill 1075 11 3999 1049 40 3999 emerald_block
-execute if score $color_match_floor mem matches 11 run fill 1049 11 3999 1049 40 4025 emerald_block
-execute if score $color_match_floor mem matches 11 run fill 1049 11 4025 1075 40 4025 emerald_block
-execute if score $color_match_floor mem matches 12 run fill 1075 11 3999 1075 40 4025 lime_concrete
-execute if score $color_match_floor mem matches 12 run fill 1075 11 3999 1049 40 3999 lime_concrete
-execute if score $color_match_floor mem matches 12 run fill 1049 11 3999 1049 40 4025 lime_concrete
-execute if score $color_match_floor mem matches 12 run fill 1049 11 4025 1075 40 4025 lime_concrete
-execute if score $color_match_floor mem matches 13 run fill 1075 11 3999 1075 40 4025 melon
-execute if score $color_match_floor mem matches 13 run fill 1075 11 3999 1049 40 3999 melon
-execute if score $color_match_floor mem matches 13 run fill 1049 11 3999 1049 40 4025 melon
-execute if score $color_match_floor mem matches 13 run fill 1049 11 4025 1075 40 4025 melon
-execute if score $color_match_floor mem matches 14 run fill 1075 11 3999 1075 40 4025 dark_prismarine
-execute if score $color_match_floor mem matches 14 run fill 1075 11 3999 1049 40 3999 dark_prismarine
-execute if score $color_match_floor mem matches 14 run fill 1049 11 3999 1049 40 4025 dark_prismarine
-execute if score $color_match_floor mem matches 14 run fill 1049 11 4025 1075 40 4025 dark_prismarine
-execute if score $color_match_floor mem matches 15 run fill 1075 11 3999 1075 40 4025 green_wool
-execute if score $color_match_floor mem matches 15 run fill 1075 11 3999 1049 40 3999 green_wool
-execute if score $color_match_floor mem matches 15 run fill 1049 11 3999 1049 40 4025 green_wool
-execute if score $color_match_floor mem matches 15 run fill 1049 11 4025 1075 40 4025 green_wool
+execute if score $color_match_floor mem matches 1 run fill 1075 11 3999 1075 40 4025 acacia_planks
+execute if score $color_match_floor mem matches 1 run fill 1075 11 3999 1049 40 3999 acacia_planks
+execute if score $color_match_floor mem matches 1 run fill 1049 11 3999 1049 40 4025 acacia_planks
+execute if score $color_match_floor mem matches 1 run fill 1049 11 4025 1075 40 4025 acacia_planks
+execute if score $color_match_floor mem matches 2 run fill 1075 11 3999 1075 40 4025 birch_planks
+execute if score $color_match_floor mem matches 2 run fill 1075 11 3999 1049 40 3999 birch_planks
+execute if score $color_match_floor mem matches 2 run fill 1049 11 3999 1049 40 4025 birch_planks
+execute if score $color_match_floor mem matches 2 run fill 1049 11 4025 1075 40 4025 birch_planks
+execute if score $color_match_floor mem matches 3 run fill 1075 11 3999 1075 40 4025 bedrock
+execute if score $color_match_floor mem matches 3 run fill 1075 11 3999 1049 40 3999 bedrock
+execute if score $color_match_floor mem matches 3 run fill 1049 11 3999 1049 40 4025 bedrock
+execute if score $color_match_floor mem matches 3 run fill 1049 11 4025 1075 40 4025 bedrock
+execute if score $color_match_floor mem matches 4 run fill 1075 11 3999 1075 40 4025 crimson_planks
+execute if score $color_match_floor mem matches 4 run fill 1075 11 3999 1049 40 3999 crimson_planks
+execute if score $color_match_floor mem matches 4 run fill 1049 11 3999 1049 40 4025 crimson_planks
+execute if score $color_match_floor mem matches 4 run fill 1049 11 4025 1075 40 4025 crimson_planks
+execute if score $color_match_floor mem matches 5 run fill 1075 11 3999 1075 40 4025 warped_planks
+execute if score $color_match_floor mem matches 5 run fill 1075 11 3999 1049 40 3999 warped_planks
+execute if score $color_match_floor mem matches 5 run fill 1049 11 3999 1049 40 4025 warped_planks
+execute if score $color_match_floor mem matches 5 run fill 1049 11 4025 1075 40 4025 warped_planks
+execute if score $color_match_floor mem matches 6 run fill 1075 11 3999 1075 40 4025 slime_block
+execute if score $color_match_floor mem matches 6 run fill 1075 11 3999 1049 40 3999 slime_block
+execute if score $color_match_floor mem matches 6 run fill 1049 11 3999 1049 40 4025 slime_block
+execute if score $color_match_floor mem matches 6 run fill 1049 11 4025 1075 40 4025 slime_block
+execute if score $color_match_floor mem matches 7 run fill 1075 11 3999 1075 40 4025 bricks
+execute if score $color_match_floor mem matches 7 run fill 1075 11 3999 1049 40 3999 bricks
+execute if score $color_match_floor mem matches 7 run fill 1049 11 3999 1049 40 4025 bricks
+execute if score $color_match_floor mem matches 7 run fill 1049 11 4025 1075 40 4025 bricks
+execute if score $color_match_floor mem matches 8 run fill 1075 11 3999 1075 40 4025 mossy_cobblestone
+execute if score $color_match_floor mem matches 8 run fill 1075 11 3999 1049 40 3999 mossy_cobblestone
+execute if score $color_match_floor mem matches 8 run fill 1049 11 3999 1049 40 4025 mossy_cobblestone
+execute if score $color_match_floor mem matches 8 run fill 1049 11 4025 1075 40 4025 mossy_cobblestone
+execute if score $color_match_floor mem matches 9 run fill 1075 11 3999 1075 40 4025 purpur_block
+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 granite
+execute if score $color_match_floor mem matches 10 run fill 1075 11 3999 1049 40 3999 granite
+execute if score $color_match_floor mem matches 10 run fill 1049 11 3999 1049 40 4025 granite
+execute if score $color_match_floor mem matches 10 run fill 1049 11 4025 1075 40 4025 granite
+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_sand
+execute if score $color_match_floor mem matches 12 run fill 1075 11 3999 1049 40 3999 soul_sand
+execute if score $color_match_floor mem matches 12 run fill 1049 11 3999 1049 40 4025 soul_sand
+execute if score $color_match_floor mem matches 12 run fill 1049 11 4025 1075 40 4025 soul_sand
+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
+execute if score $color_match_floor mem matches 13 run fill 1049 11 4025 1075 40 4025 packed_ice
+execute if score $color_match_floor mem matches 14 run fill 1075 11 3999 1075 40 4025 white_wool
+execute if score $color_match_floor mem matches 14 run fill 1075 11 3999 1049 40 3999 white_wool
+execute if score $color_match_floor mem matches 14 run fill 1049 11 3999 1049 40 4025 white_wool
+execute if score $color_match_floor mem matches 14 run fill 1049 11 4025 1075 40 4025 white_wool
+execute if score $color_match_floor mem matches 15 run fill 1075 11 3999 1075 40 4025 honey_block
+execute if score $color_match_floor mem matches 15 run fill 1075 11 3999 1049 40 3999 honey_block
+execute if score $color_match_floor mem matches 15 run fill 1049 11 3999 1049 40 4025 honey_block
+execute if score $color_match_floor mem matches 15 run fill 1049 11 4025 1075 40 4025 honey_block

+ 2 - 2
data/mini/functions/colormatch/game/start_new_round.mcfunction

@@ -4,8 +4,8 @@ function mini:colormatch/game/replace_wall
 execute positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 1050 15 4000
 
 # 设置倒计时
-execute if score $color_match_time mem matches 42.. run scoreboard players remove $color_match_time mem 5
-execute if score $color_match_time mem matches 21..41 run scoreboard players remove $color_match_time mem 1
+execute if score $color_match_time mem matches 47.. run scoreboard players remove $color_match_time mem 5
+execute if score $color_match_time mem matches 18..46 run scoreboard players remove $color_match_time mem 1
 scoreboard players operation $countdown_fast mem = $color_match_time mem
 
 # 重置分数

+ 1 - 0
data/mini/functions/colormatch/player_lose_heart.mcfunction

@@ -7,3 +7,4 @@ function mini:main/player_lose_heart
 # 拉回来
 execute if entity @s[tag=mini_running] run tp @s ~ 16.5 ~
 effect give @s levitation 5 255
+effect give @s speed 5 1

+ 3 - 1
data/mini/functions/main/player_lose_heart.mcfunction

@@ -1,7 +1,9 @@
 # 玩家失去一条命时调用此函数
+
 # 减少命
 execute if score @s mini_heart matches 1.. run scoreboard players remove @s mini_heart 1
+execute at @s run function lib:sounds/hurt
 # 计算血量
 function mini:main/player_max_health
-# 生命值归0判定失败
+# 判定失败
 execute if score @s mini_heart matches 0 run function mini:main/player_failed