LTCatt пре 6 година
родитељ
комит
036a34cbe4

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

@@ -37,4 +37,9 @@ execute if score #bonus_add_score mem matches 200 if entity @s[tag=!highest] run
 # 300:金粒 +2
 execute if score #bonus_add_score mem matches 300 run scoreboard players add @s gold 2
 execute if score #bonus_add_score mem matches 300 run scoreboard players add @s gold_total 2
-execute if score #bonus_add_score mem matches 300 run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 获得了 2 金粒"]
+execute if score #bonus_add_score mem matches 300 run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 获得了 2 金粒"]
+
+# 给予进度
+execute if entity @s[scores={total_score=6..}] run advancement grant @s only ltw:story/score1
+execute if entity @s[scores={total_score=12..}] run advancement grant @s only ltw:story/score2
+execute if entity @s[scores={total_score=18..}] run advancement grant @s only ltw:story/score3

+ 28 - 0
data/ltw/advancements/story/root.json

@@ -0,0 +1,28 @@
+{
+    "display": {
+      "icon": {
+        "item": "minecraft:paper"
+      },
+      "title": {
+        "text":"履历"
+      },
+      "description": [
+        {"text": "", "color":"gray"}
+      ],
+      "frame": "task",
+      "show_toast": false,
+      "announce_to_chat": false,
+      "hidden": false,
+      "background": "minecraft:textures/gui/advancements/backgrounds/adventure.png"
+    },
+    "criteria": {
+      "root": {
+        "trigger": "minecraft:location"
+      }
+    },
+    "requirements": [
+      [
+        "root"
+      ]
+    ]
+  }

+ 33 - 0
data/ltw/advancements/story/score1.json

@@ -0,0 +1,33 @@
+{
+    "parent": "ltw:story/root",
+    "display": {
+      "icon": {
+        "item": "minecraft:paper"
+      },
+      "title": {
+        "text": "分数猎手      "
+      },
+      "description": [
+        {"text": "在单局游戏中达到 6 分\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/story/score2.json

@@ -0,0 +1,33 @@
+{
+    "parent": "ltw:story/score1",
+    "display": {
+      "icon": {
+        "item": "minecraft:map"
+      },
+      "title": {
+        "text": "分数狂魔      "
+      },
+      "description": [
+        {"text": "在单局游戏中达到 12 分\n", "color":"gray"},
+        {"text": "奖励: ","color":"green"},
+        {"text": "2 绿宝石","color":"white"}
+      ],
+      "frame": "task",
+      "show_toast": true,
+      "announce_to_chat": true,
+      "hidden": false
+    },
+    "rewards": {
+      "function": "ltw:advancement/bonus_2"
+    },
+    "criteria": {
+      "get_score":{
+          "trigger": "minecraft:impossible"
+      }
+    },
+    "requirements": [
+      [
+          "get_score"
+      ]
+    ]
+  }

+ 33 - 0
data/ltw/advancements/story/score3.json

@@ -0,0 +1,33 @@
+{
+    "parent": "ltw:story/score1",
+    "display": {
+      "icon": {
+        "item": "minecraft:nether_star"
+      },
+      "title": {
+        "text": "分数满屋      "
+      },
+      "description": [
+        {"text": "在单局游戏中达到 18 分\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"
+      ]
+    ]
+  }