LTCatt 6 anni fa
parent
commit
00c028fbf8

+ 33 - 0
data/ltw/advancements/parkour/colormatch1.json

@@ -0,0 +1,33 @@
+{
+    "parent": "ltw:parkour/root",
+    "display": {
+      "icon": {
+        "item": "minecraft:cyan_glazed_terracotta"
+      },
+      "title": {
+        "text": "纷乱迷阵      "
+      },
+      "description": [
+        {"text": "在色彩迷阵中达到最高速度\n", "color":"gray"},
+        {"text": "奖励: ","color":"green"},
+        {"text": "1 绿宝石","color":"white"}
+      ],
+      "frame": "task",
+      "show_toast": true,
+      "announce_to_chat": true,
+      "hidden": false
+    },
+    "rewards": {
+      "function": "ltw:advancement/bonus_1"
+    },
+    "criteria": {
+      "get_score":{
+          "trigger": "minecraft:impossible"
+      }
+    },
+    "requirements": [
+      [
+          "get_score"
+      ]
+    ]
+  }

+ 33 - 0
data/ltw/advancements/parkour/colormatch2.json

@@ -0,0 +1,33 @@
+{
+    "parent": "ltw:parkour/colormatch1",
+    "display": {
+      "icon": {
+        "item": "minecraft:yellow_glazed_terracotta"
+      },
+      "title": {
+        "text": "终局迷阵      "
+      },
+      "description": [
+        {"text": "在色彩迷阵中达到最高速度, 并最终获胜\n", "color":"gray"},
+        {"text": "奖励: ","color":"green"},
+        {"text": "3 绿宝石","color":"white"}
+      ],
+      "frame": "challenge",
+      "show_toast": true,
+      "announce_to_chat": true,
+      "hidden": false
+    },
+    "rewards": {
+      "function": "ltw:advancement/bonus_3"
+    },
+    "criteria": {
+      "get_score":{
+          "trigger": "minecraft:impossible"
+      }
+    },
+    "requirements": [
+      [
+          "get_score"
+      ]
+    ]
+  }

+ 4 - 1
data/mini/functions/colormatch/game/start_new_round.mcfunction

@@ -5,7 +5,7 @@ execute positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 1050 15 4000
 
 # 设置倒计时
 execute if score $color_match_time mem matches 37.. run scoreboard players remove $color_match_time mem 5
-execute if score $color_match_time mem matches 12..36 run scoreboard players remove $color_match_time mem 1
+execute if score $color_match_time mem matches 11..36 run scoreboard players remove $color_match_time mem 1
 scoreboard players operation $countdown_fast mem = $color_match_time mem
 
 # 重置分数
@@ -26,6 +26,9 @@ scoreboard players set $bossbar_type mem 1
 function lib:bossbar/show
 bossbar set mini:red name "地板消失"
 
+# 给予进度
+execute if score $countdown_max mem matches 10 as @a[tag=!debug,gamemode=adventure] run advancement grant @s only ltw:parkour/colormatch1
+
 # 物品栏显示
 execute if score $color_match_floor mem matches 1 run replaceitem entity @a hotbar.8 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.8 birch_planks{game_item:1b,display:{Name:'[{"text":"本轮的地板方块","color":"white","italic":false}]'}}

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

@@ -30,6 +30,7 @@ execute if score $mini_type mem matches 1 as @a[tag=mini_rank1] run advancement
 execute if score $mini_type mem matches 1 as @a[tag=mini_rank1,scores={layer=3..}] run advancement grant @s only ltw:parkour/tnt2
 execute if score $mini_type mem matches 3 as @a[tag=mini_rank1] run advancement grant @s only ltw:vs/potato1
 execute if score $mini_type mem matches 3 as @a[tag=mini_rank1,scores={mini_heart=3..}] run advancement grant @s only ltw:vs/potato2
+execute if score $mini_type mem matches 4 if score $countdown_max mem matches 10 as @a[tag=mini_rank1] run advancement grant @s only ltw:parkour/colormatch2
 
 # 进入状态 6
 function ltw:state/6/state_enter